haikuwebkit/Source/WebCore/ChangeLog-2013-10-13

88561 lines
3.7 MiB
Raw Permalink Blame History

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

2013-10-13 Andreas Kling <akling@apple.com>
RenderLayerBacking should have RenderLayer& backpointer.
<https://webkit.org/b/122731>
Reviewed by Anders Carlsson.
RenderLayerBacking is always owned by a RenderLayer and so should
store its backpointer in a reference.
2013-10-13 Darin Adler <darin@apple.com>
Make element predicates and type casts work more consistently on more types
https://bugs.webkit.org/show_bug.cgi?id=122718
Reviewed by Antti Koivisto.
* dom/ContainerNodeAlgorithms.cpp:
(WebCore::assertConnectedSubrameCountIsConsistent):
* dom/ContainerNodeAlgorithms.h:
(WebCore::ChildFrameDisconnector::collectFrameOwners):
Updated for name change.
* dom/Document.cpp:
(WebCore::Document::adoptNode): Use a reference instead of a pointer.
(WebCore::Document::dispatchFullScreenChangeOrErrorEvent): Updated for
typecast name change and also to cast a reference, since we don't overload
for pointers.
(WebCore::Document::updateHoverActiveState): Ditto.
* dom/Element.h: Made the isElementOfType functions take references instead
of pointers. Also use const in the type template argument. These changes go
hand in hand with the changes in the generated code and all the classes.
Also use a bit of nullptr.
* dom/ElementIterator.h:
(WebCore::findElementAncestorOfType): Got rid of the ElementTypeWithConst
naming since this works with or without const. Added const to the call site
for isElementOfType, because it works that way now.
* dom/ElementTraversal.h:
(WebCore::Traversal::firstChildTemplate): Add const to the type when calling
isElementOfType. Along with the corresponding changes, this makes these
templates work for const types.
(WebCore::Traversal::lastChildTemplate): Ditto.
(WebCore::Traversal::firstWithinTemplate): Ditto.
(WebCore::Traversal::lastWithinTemplate): Ditto.
(WebCore::Traversal::nextTemplate): Ditto.
(WebCore::Traversal::previousTemplate): Ditto.
(WebCore::Traversal::nextSiblingTemplate): Ditto.
(WebCore::Traversal::previousSiblingTemplate): Ditto.
(WebCore::Traversal::nextSkippingChildrenTemplate): Ditto.
* dom/Node.cpp:
(WebCore::Node::handleLocalEvents): Check isElementNode and then call the
isDisabledFormControl member function, since we no longer have a helper that
takes a node.
(WebCore::Node::willRespondToMouseMoveEvents): Ditto.
(WebCore::Node::willRespondToMouseClickEvents): Ditto.
(WebCore::Node::willRespondToTouchEvents): Ditto.
* dom/PseudoElement.h: Use some nullptr. Added an isPseudoElement function
that the ELEMENT_TYPE_CASTS macro can use, and also used that macro to make
the toPseudoElement functions instead of a hand-written local variant.
* dom/make_names.pl:
(printTypeHelpers): Added unimplemented versions of the element predicate
functions that return void to catch unnecessary runtime checks of types
that are already known at compile time. Added assertions to the pointer
overloads of the predicates. Maybe later we can delete them. Added const
to the isElementOf template arguments to make these work with both const
and non-const. Put overloads in a consistent order, most specific class
first, then less specific. Changed isElementOfType to take references
rather than pointers.
* editing/Editor.cpp:
(WebCore::Editor::selectionForCommand): Updated to pass a reference.
(WebCore::Editor::setBaseWritingDirection): Ditto.
(WebCore::findFirstMarkable): Ditto.
* html/FormAssociatedElement.h: Tweaked a comment.
* html/HTMLBodyElement.cpp:
(WebCore::HTMLBodyElement::insertedInto): Updated for name change and to
pass a reference.
* html/HTMLElement.cpp:
(WebCore::HTMLElement::translate): Removed FIXME and const_cast since the
problem is fixed.
(WebCore::HTMLElement::directionality): Use a reference.
* html/HTMLElement.h: Use const in the type of the isElementOfType functions.
Use references for all the arguments, not pointers.
* html/HTMLFieldSetElement.cpp:
(WebCore::HTMLFieldSetElement::refreshElementsIfNeeded): Use documentVersion
instead of docVersion for local variable name. Use elementDescendants instead
of elementTraversal.
(WebCore::HTMLFieldSetElement::length): Use length instead of len for name.
* html/HTMLFormControlElement.h: Put predicates into the standard format and
did them on single lines. Added ELEMENT_TYPE_CASTS so we get standard casts.
* html/HTMLFrameElementBase.h: Ditto.
* html/HTMLFrameOwnerElement.h: Ditto, but changed the name to match the class,
so it's now isHTMLFrameOwnerElement and toHTMLFrameOwnerElement.
* html/HTMLLabelElement.cpp:
(WebCore::nodeAsSupportedLabelableElement): Updated to use references.
* html/HTMLMediaElement.h: Put predicates into the standard format and did
them on single lines. Added ELEMENT_TYPE_CASTS so we get standard casts.
* html/HTMLPlugInElement.h: Ditto. Also marked isPluginElement FINAL.
* html/HTMLPlugInImageElement.h: Ditto.
* html/HTMLTableCellElement.cpp: Removed old hand-written cast functions.
* html/HTMLTableCellElement.h: Did same predicate and ELEMENT_TYPE_CASTS
changes. Also fixed up the ordering of functions in the class.
* html/HTMLTextFormControlElement.cpp:
(WebCore::enclosingTextFormControl): Updated to use references and nullptr.
* html/HTMLTextFormControlElement.h: Did same predicate and ELEMENT_TYPE_CASTS.
* html/HTMLTrackElement.cpp:
(WebCore::HTMLTrackElement::removedFrom): Call isHTMLMediaElement by its new name.
* html/LabelableElement.h: Did same predicate and ELEMENT_TYPE_CASTS.
* html/track/WebVTTElement.h: Made isWebVTTElement private. Changed the argument
type of setLanguage to const AtomicString& to avoid excess reference count churn.
Did the predicate and type casts thing.
* loader/archive/cf/LegacyWebArchive.cpp:
(WebCore::LegacyWebArchive::create): Update for name changes and use references.
* mathml/MathMLElement.h: Did same predicate and ELEMENT_TYPE_CASTS.
* page/FocusController.cpp:
(WebCore::FocusController::findFocusableElementDescendingDownIntoFrameDocument):
(WebCore::FocusController::advanceFocusInDocumentOrder):
* page/PageSerializer.cpp:
(WebCore::SerializerMarkupAccumulator::appendCustomAttributes):
Update for name change.
* platform/Pasteboard.h: Removed unneeded forward declaration.
* rendering/RenderWidget.h: Updated for name change.
* rendering/svg/RenderSVGResourceFilter.cpp:
(WebCore::RenderSVGResourceFilter::buildPrimitives): Use element iterator
and nullptr.
* svg/SVGAElement.cpp:
(WebCore::SVGAElement::defaultEventHandler): Update for name changes.
* svg/SVGAnimateElement.cpp:
(WebCore::isSVGAnimateElement): Moved here since we don't want to inline such
a long list of tag names.
* svg/SVGAnimateElement.h: Marked a lot more virtual functions OVERRIDE.
Did predicate and ELEMENT_TYPE_CASTS changes, but did not make the predicate
be inlined.
* svg/SVGElement.h: Did predicate and ELEMENT_TYPE_CASTS changes.
* svg/SVGFilterPrimitiveStandardAttributes.h: Ditto.
* svg/SVGGradientElement.cpp:
(WebCore::isSVGGradientElement): Moved here since we don't want to inline
the two tag names.
* svg/SVGGradientElement.h: Did predicate and ELEMENT_TYPE_CASTS changes.
* svg/SVGGraphicsElement.h: Ditto.
* svg/SVGImageElement.cpp:
(WebCore::SVGImageElement::SVGImageElement): Took out assertion, since it
was asserting the class of the obejct we just created.
* svg/SVGPolyElement.cpp:
(WebCore::isSVGPolyElement): Moved here since we don't want to inline the
two tag names.
* svg/SVGPolyElement.h: Did predicate and ELEMENT_TYPE_CASTS changes.
* svg/SVGTextContentElement.h: Ditto.
* svg/animation/SVGSMILElement.cpp:
(WebCore::SVGSMILElement::connectConditions): Update for name changes,
to use references and nullptr, and to get rid of a non-helpful local.
* svg/animation/SVGSMILElement.h: Added a virtual function to check if a
given SVGElement is an SVGSMILElement so we don't have to check a long list
of tag names instead. Also did the predicate and ELEMENT_TYPE_CASTS changes.
* testing/Internals.cpp:
(WebCore::Internals::visiblePlaceholder): Updated to use references.
2013-10-13 Antti Koivisto <antti@apple.com>
Text::renderer() should return RenderText
https://bugs.webkit.org/show_bug.cgi?id=122729
Reviewed by Andreas Kling.
Tighten typing.
2013-10-13 Andreas Kling <akling@apple.com>
Devirtualize RenderView::viewRect().
<https://webkit.org/b/122730>
Reviewed by Antti Koivisto.
There's no need for viewRect() to be a virtual RenderObject function.
The single call site that didn't already access it through RenderView
can just go via view().
2013-10-13 Andreas Kling <akling@apple.com>
Move setPseudoStyle() to RenderImage (from RenderElement.)
<https://webkit.org/b/122726>
Reviewed by Antti Koivisto.
Only RenderImages ever use setPseudoStyle() so move it there and
remove the non-image codepath.
2013-10-13 Andreas Kling <akling@apple.com>
CTTE: RenderSlider always has an HTMLInputElement.
<https://webkit.org/b/122728>
Reviewed by Anders Carlsson.
This renderer is never anonymous and always has a corresponding
HTMLInputElement. Tighten this up by having the constructor take
the element by reference, and override element() with a stronger
return type.
2013-10-13 Andreas Kling <akling@apple.com>
Remove two unused AX functions for getting a FrameView*.
<https://webkit.org/b/122724>
Reviewed by Anders Carlsson.
2013-10-13 Antti Koivisto <antti@apple.com>
Add traverseNextSkippingChildren to ElementIterators
https://bugs.webkit.org/show_bug.cgi?id=122727
Reviewed by Andreas Kling.
Also switch some code using ElementTraversal over to iterators.
2013-10-13 Antti Koivisto <antti@apple.com>
Rename InlineBox::remove() to removeFromParent
https://bugs.webkit.org/show_bug.cgi?id=122725
Reviewed by Andreas Kling.
Also make it clear from the code that all InlineTextBoxes have behavesLikeText set.
2013-10-13 Antti Koivisto <antti@apple.com>
Make absoluteQuads/Rects functions return Vectors
https://bugs.webkit.org/show_bug.cgi?id=122722
Reviewed by Andreas Kling.
* dom/Document.cpp:
(WebCore::Document::adjustFloatQuadsForScrollAndAbsoluteZoomAndFrameScale):
(WebCore::Document::adjustFloatRectForScrollAndAbsoluteZoomAndFrameScale):
Take RenderStyle instead of RenderObject
* dom/Document.h:
* dom/Element.cpp:
(WebCore::Element::getClientRects):
(WebCore::Element::getBoundingClientRect):
* dom/Range.cpp:
(WebCore::Range::textRects):
(WebCore::Range::textQuads):
(WebCore::Range::getBorderAndTextQuads):
Adapt to the changes.
* rendering/RenderObject.h:
Removed unnecessary adjustFloatQuad/RectForAbsoluteZoom functions, inline code to
adjustFloatQuads/RectForScrollAndAbsoluteZoomAndFrameScale.
* rendering/RenderText.cpp:
(WebCore::RenderText::absoluteRects):
(WebCore::RenderText::absoluteRectsForRange):
(WebCore::RenderText::absoluteQuadsClippedToEllipsis):
(WebCore::RenderText::absoluteQuads):
(WebCore::RenderText::absoluteQuadsForRange):
* rendering/RenderText.h:
* rendering/RenderTextLineBoxes.cpp:
(WebCore::RenderTextLineBoxes::absoluteRects):
(WebCore::RenderTextLineBoxes::absoluteRectsForRange):
(WebCore::RenderTextLineBoxes::absoluteQuads):
(WebCore::RenderTextLineBoxes::absoluteQuadsForRange):
* rendering/RenderTextLineBoxes.h:
Use return value instead of an out-arg, except for the virtual versions.
2013-10-13 Andreas Kling <akling@apple.com>
LiveNodeList: rootNode() and document() should return references.
<https://webkit.org/b/122720>
Reviewed by Antti Koivisto.
Tighten up this code a bit by having rootNode() and document()
return references. Also replaced some handwritten traversal
with a call to Node::lastDescendant().
2013-10-13 Andreas Kling <akling@apple.com>
Document::createRenderTree() should assert that there is no arena.
<https://webkit.org/b/122723>
Reviewed by Antti Koivisto.
Calling createRenderTree() with a RenderArena already in place would
be a programming error.
2013-10-13 Andreas Kling <akling@apple.com>
Remove dead ENABLE(CUSTOM_ELEMENTS) code.
<https://webkit.org/b/122721>
Reviewed by Antti Koivisto.
There are no ports building with this flag since April and the code
has bitrotted since. Remove it for now. If someone wants to resurrect
the feature someday, getting back to this point is trivial.
2013-10-12 Antti Koivisto <antti@apple.com>
Move absoluteRects/Quads to RenderTextLineBoxes
https://bugs.webkit.org/show_bug.cgi?id=122706
Reviewed by Andreas Kling.
* rendering/RenderTextLineBoxes.cpp:
(WebCore::RenderTextLineBoxes::absoluteRects):
(WebCore::RenderTextLineBoxes::absoluteRectsForRange):
(WebCore::RenderTextLineBoxes::absoluteQuads):
(WebCore::RenderTextLineBoxes::absoluteQuadsForRange):
These move.
(WebCore::RenderTextLineBoxes::selectionRectForRange):
(WebCore::RenderTextLineBoxes::setSelectionState):
Also moved a few smaller functions.
2013-10-13 Andreas Kling <akling@apple.com>
Remove dead code hiding behind ENABLE(TOUCH_EVENT_TRACKING).
<https://webkit.org/b/122719>
Reviewed by Antti Koivisto.
Nobody is building with this flag, and it has broken-looking code
behind it anyway. Nuke from orbit.
2013-10-13 Andreas Kling <akling@apple.com>
RenderLayer: Check SVG bit instead of element namespace in isTransparent().
<https://webkit.org/b/118171>
Reviewed by Darin Adler.
Replace the (virtual) namespaceURI() check with an isSVGElement() bit check.
* rendering/RenderLayer.cpp:
(WebCore::RenderLayer::isTransparent):
2013-10-12 Darin Adler <darin@apple.com>
Use nullptr in Document.cpp
https://bugs.webkit.org/show_bug.cgi?id=122715
Reviewed by Sam Weinig.
* dom/Document.cpp:
(WebCore::widgetForElement):
(WebCore::Document::Document):
(WebCore::Document::~Document):
(WebCore::Document::dropChildren):
(WebCore::Document::getElementByAccessKey):
(WebCore::Document::doctype):
(WebCore::Document::createElement):
(WebCore::Document::createElementNS):
(WebCore::Document::registerElement):
(WebCore::Document::createCDATASection):
(WebCore::Document::createProcessingInstruction):
(WebCore::Document::createEntityReference):
(WebCore::Document::importNode):
(WebCore::Document::adoptNode):
(WebCore::Document::webkitGetNamedFlows):
(WebCore::Document::elementFromPoint):
(WebCore::Document::caretRangeFromPoint):
(WebCore::Document::setTitle):
(WebCore::Document::removeTitle):
(WebCore::Document::view):
(WebCore::Document::page):
(WebCore::Document::settings):
(WebCore::Document::createNodeIterator):
(WebCore::Document::createTreeWalker):
(WebCore::Document::updateStyleIfNeeded):
(WebCore::Document::styleForElementIgnoringPendingStylesheets):
(WebCore::Document::disconnectFromFrame):
(WebCore::Document::destroyRenderTree):
(WebCore::Document::existingAXObjectCache):
(WebCore::Document::axObjectCache):
(WebCore::Document::scriptableDocumentParser):
(WebCore::Document::body):
(WebCore::Document::head):
(WebCore::Document::processBaseElement):
(WebCore::Document::findUnsafeParentScrollPropagationBoundary):
(WebCore::Document::cloneNode):
(WebCore::Document::styleResolverChanged):
(WebCore::Document::removeFocusedNodeOfSubtree):
(WebCore::Document::setFocusedElement):
(WebCore::Document::getWindowAttributeEventListener):
(WebCore::Document::createEvent):
(WebCore::Document::getOverrideStyle):
(WebCore::Document::ownerElement):
(WebCore::Document::setInPageCache):
(WebCore::Document::parentDocument):
(WebCore::Document::createAttributeNS):
(WebCore::Document::initSecurityContext):
(WebCore::Document::resetHiddenFocusElementTimer):
(WebCore::Document::getCSSCanvasContext):
(WebCore::Document::enqueuePopstateEvent):
(WebCore::Document::takeAnyMediaCanStartListener):
(WebCore::Document::requestFullScreenForElement):
(WebCore::Document::webkitExitFullscreen):
(WebCore::Document::webkitWillEnterFullScreenForElement):
(WebCore::Document::webkitDidExitFullScreenForElement):
(WebCore::Document::fullScreenRendererDestroyed):
(WebCore::Document::webkitPointerLockElement):
(WebCore::Document::seamlessParentIFrame):
(WebCore::Document::loader):
(WebCore::eventTargetElementForDocument):
(WebCore::nearestCommonHoverAncestor):
(WebCore::Document::ensureTemplateDocument):
Use nullptr in many places we were using 0.
2013-10-12 Darin Adler <darin@apple.com>
Get rid of the toHTMLElement helper for casting FormAssociatedElement to HTMLElement
https://bugs.webkit.org/show_bug.cgi?id=122713
Reviewed by Sam Weinig.
Since we are using the function name toHTMLElement for casting to an HTMLElement
from a Node or Element, it's awkward to also use it for a quite different type of
type conversion on a FormAssociatedElement. We already have an asHTMLElement member
function, so lets use that.
* html/DOMFormData.cpp:
(WebCore::DOMFormData::DOMFormData): Use references instead of pointers, and
asHTMLElement instead of toHTMLElement.
* html/FormAssociatedElement.cpp: Made FormAttributeTargetObserver FINAL, made
its private inheritance explicit, made its constructor public so we can use it
with make_unique and got rid of its creation function. Also use reference instead
of a pointer.
(WebCore::FormAssociatedElement::FormAssociatedElement): Use nullptr.
(WebCore::FormAssociatedElement::~FormAssociatedElement): Ditto.
(WebCore::FormAssociatedElement::didMoveToNewDocument): Use asHTMLElement instead
of toHTMLElement and use a reference instead of a pointer.
(WebCore::FormAssociatedElement::insertedInto): Ditto.
(WebCore::FormAssociatedElement::removedFrom): Ditto.
(WebCore::FormAssociatedElement::formRemovedFromTree): Ditto.
(WebCore::FormAssociatedElement::resetFormOwner): Ditto.
(WebCore::FormAssociatedElement::formAttributeChanged): Ditto.
(WebCore::FormAssociatedElement::customError): Ditto.
(WebCore::FormAssociatedElement::resetFormAttributeTargetObserver): Use make_unique
instead of create here.
(WebCore::FormAssociatedElement::name): Use asHTMLElement.
(WebCore::FormAttributeTargetObserver::FormAttributeTargetObserver): Ditto.
(WebCore::FormAttributeTargetObserver::idTargetChanged): Updated since m_element is
now a reference.
* html/FormAssociatedElement.h: Removed some unneeded class declarations.
Made isFormAssociatedElement const. Use std::unique_ptr instead of OwnPtr.
* html/FormNamedItem.h: Made asHTMLElement return a reference, and overloaded it
for both const and non-const. Made isFormAssociatedElement const.
* html/HTMLFormControlElement.h: Updated for FormNamedItem changes. Removed an
unneeded class declaration.
* html/HTMLFormControlsCollection.cpp:
(WebCore::HTMLFormControlsCollection::virtualItemAfter): Use references, asHTMLElement,
and nullptr.
(WebCore::firstNamedItem): Ditto.
(WebCore::HTMLFormControlsCollection::namedItem): Ditto.
(WebCore::HTMLFormControlsCollection::updateNameCache): Ditto.
* html/HTMLFormElement.cpp:
(WebCore::HTMLFormElement::validateInteractively): Use asHTMLElement and references.
(WebCore::HTMLFormElement::getTextFieldValues): Ditto.
(WebCore::HTMLFormElement::formElementIndexWithFormAttribute): Ditto.
(WebCore::HTMLFormElement::formElementIndex): Ditto.
(WebCore::HTMLFormElement::assertItemCanBeInPastNamesMap): Ditto.
(WebCore::HTMLFormElement::elementFromPastNamesMap): Ditto, and nullptr.
* html/HTMLImageElement.h: Updated for FormNamedItem changes.
* html/HTMLObjectElement.h: Ditto.
* loader/FormSubmission.cpp:
(WebCore::FormSubmission::create): Use asHTMLElement and references.
2013-10-12 Darin Adler <darin@apple.com>
Use nullptr instead of 0 in TreeScope.cpp
https://bugs.webkit.org/show_bug.cgi?id=122711
Reviewed by Andreas Kling.
* dom/TreeScope.cpp:
(WebCore::TreeScope::TreeScope):
(WebCore::TreeScope::~TreeScope):
(WebCore::TreeScope::clearDocumentScope):
(WebCore::TreeScope::getElementById):
(WebCore::TreeScope::getAllElementsById):
(WebCore::TreeScope::getElementByName):
(WebCore::TreeScope::ancestorInThisScope):
(WebCore::TreeScope::getImageMap):
(WebCore::nodeFromPoint):
(WebCore::TreeScope::labelElementForId):
(WebCore::TreeScope::getSelection):
(WebCore::TreeScope::findAnchor):
(WebCore::focusedFrameOwnerElement):
(WebCore::TreeScope::focusedElement):
(WebCore::commonTreeScope):
Use a lot more nullptr, and also rewrite one while loop as a for loop.
2013-10-12 Darin Adler <darin@apple.com>
Remove the not-much-used isShadowHost function from Element.h
https://bugs.webkit.org/show_bug.cgi?id=122710
Reviewed by Andreas Kling.
* dom/Element.h: Removed isShadowHost, which just checks if shadowRoot is null.
* page/FocusController.cpp:
(WebCore::FocusNavigationScope::focusNavigationScopeOwnedByShadowHost): Added
individual assertions instead of just asserting isShadowHost.
(WebCore::FocusNavigationScope::focusNavigationScopeOwnedByIFrame): Broke an
assertion with && in it into two assertions.
(WebCore::hasCustomFocusLogic): Changed argument type to be Element& and take
a reference instead of a pointer.
(WebCore::isNonFocusableShadowHost): Made arguments references instead of pointers.
Replaced isShadowHost check with a direct check of whether shadowRoot returns null
or not, which seems nearly as clear.
(WebCore::isFocusableShadowHost): Ditto.
(WebCore::adjustedTabIndex): Ditto.
(WebCore::shouldVisit): Ditto.
(WebCore::FocusController::findFocusableElementDescendingDownIntoFrameDocument):
Updated for changes above.
(WebCore::FocusController::advanceFocusInDocumentOrder): Ditto. Also some nullptr.
(WebCore::FocusController::findFocusableElementAcrossFocusScope): Ditto.
(WebCore::FocusController::findFocusableElementRecursively): Ditto.
(WebCore::FocusController::findElementWithExactTabIndex): Ditto.
(WebCore::nextElementWithGreaterTabIndex): Ditto.
(WebCore::previousElementWithLowerTabIndex): Ditto.
(WebCore::FocusController::nextFocusableElement): Ditto.
(WebCore::FocusController::previousFocusableElement): Ditto.
2013-10-12 Darin Adler <darin@apple.com>
Move querySelector from Node to ContainerNode and use references instead of pointers
https://bugs.webkit.org/show_bug.cgi?id=122709
Reviewed by Anders Carlsson.
* dom/ContainerNode.cpp:
(WebCore::ContainerNode::querySelector): Moved here from Node. Pass a reference instead
of a pointer to SelectorQuery. Changed return types to RefPtr and raw pointer instead of
PassRefPtr.
(WebCore::ContainerNode::querySelectorAll): Ditto.
* dom/ContainerNode.h: Added the new functions.
* dom/Element.cpp:
(WebCore::Element::webkitMatchesSelector): Use && instead of an if statement and a reference rather than
a pointer.
* dom/Node.cpp: Sorted includes, removed SelectorQuery.h, removed the querySelector functions.
(WebCore::Node::ownerDocument): Use document instead of doc and nullptr instead of 0.
* dom/Node.h: Removed the querySelector functions.
* dom/SelectorQuery.cpp:
(WebCore::SelectorDataList::selectorMatches): Take references instead of pointers.
(WebCore::SelectorDataList::matches): Ditto.
(WebCore::SelectorDataList::queryAll): Return a RefPtr instead of PassRefPtr.
(WebCore::SelectorDataList::queryFirst): Ditto. Also use nullptr.
(WebCore::selectorForIdLookup): Take references instead of pointers.
(WebCore::isTreeScopeRoot): Ditto.
(WebCore::SelectorDataList::executeFastPathForIdSelector): Ditto.
(WebCore::isSingleTagNameSelector): Ditto.
(WebCore::elementsForLocalName): Ditto. Also use iterators instead of traversal.
(WebCore::anyElement): Ditto.
(WebCore::SelectorDataList::executeSingleTagNameSelectorData): Ditto.
(WebCore::isSingleClassNameSelector): Ditto.
(WebCore::SelectorDataList::executeSingleClassNameSelectorData): Ditto.
(WebCore::SelectorDataList::executeSingleSelectorData): Ditto.
(WebCore::SelectorDataList::executeSingleMultiSelectorData): Ditto.
(WebCore::SelectorDataList::execute): Ditto.
(WebCore::SelectorQueryCache::add): Ditto.
* dom/SelectorQuery.h: Update to use ContainerNode, references, and RefPtr and raw pointers
rather than PassRefPtr.
* dom/TreeScope.cpp:
(WebCore::TreeScope::getElementById): Use nullptr instead of 0.
(WebCore::TreeScope::getAllElementsById): Ditto.
(WebCore::TreeScope::getElementByName): Ditto.
(WebCore::TreeScope::ancestorInThisScope): Ditto.
* inspector/InspectorDOMAgent.cpp:
(WebCore::InspectorDOMAgent::assertNode): Use nullptr instead of 0.
(WebCore::InspectorDOMAgent::assertDocument): Ditto.
(WebCore::InspectorDOMAgent::assertElement): Ditto. Also use isElementNode instead of nodeType.
(WebCore::InspectorDOMAgent::assertEditableNode): Use nullptr instead of 0.
(WebCore::InspectorDOMAgent::assertEditableElement): Ditto.
(WebCore::InspectorDOMAgent::getDocument): Use document instead of doc.
(WebCore::InspectorDOMAgent::querySelector): Changed to pass a ContainerNode.
(WebCore::InspectorDOMAgent::querySelectorAll): Ditto.
2013-10-12 Darin Adler <darin@apple.com>
Move code to find elements in slider shadow tree into RangeInputType class, since it creates that tree
https://bugs.webkit.org/show_bug.cgi?id=122708
Reviewed by Anders Carlsson.
* accessibility/AccessibilitySlider.cpp:
(WebCore::AccessibilitySliderThumb::elementRect): Use HTMLInputElement::sliderThumbElement
to find the thumb, rather than using the sliderThumbElementOf function.
* html/InputType.h: Use nullptr instead of 0. Tweak formatting a bit.
* html/RangeInputType.cpp:
(WebCore::RangeInputType::handleMouseDownEvent): Use typedSliderThumbElement function.
(WebCore::RangeInputType::handleTouchEvent): Ditto.
(WebCore::RangeInputType::createShadowSubtree): Fixed assertion to match the code below.
(WebCore::RangeInputType::sliderTrackElement): Moved next to the createShadowSubtree function
since it is finding an element in that subtree. Changed to do the work here instead of calling
a function in another file.
(WebCore::RangeInputType::typedSliderThumbElement): Added. Finds the slider thumb element,
and returns it as a reference with a specific type.
(WebCore::RangeInputType::sliderThumbElement): Changed to call typedSliderThumbElement, loosening
the type, and returning a pointer Changed to call typedSliderThumbElement, loosening
the type, and returning a pointer.
(WebCore::RangeInputType::minOrMaxAttributeChanged): Use typedSliderThumbElement.
(WebCore::RangeInputType::setValue): Ditto.
(WebCore::RangeInputType::listAttributeTargetChanged): Ditto.
* html/RangeInputType.h: Marked the class FINAL. Tweaked formatting a bit.
Added the typedSliderThumbElement function.
* html/shadow/SliderThumbElement.cpp:
(WebCore::SliderThumbElement::setPositionFromPoint): Call the HTMLInputElement::sliderTrackElement
function instead of having the input element's shadow subtree hierarchy hard-coded here.
(WebCore::SliderThumbElement::cloneElementWithoutAttributesAndChildren): Moved here from the header,
since it's a virtual function that won't be inlined.
* html/shadow/SliderThumbElement.h: Removed unneeded forward declarations. Made more virtual
functions private and added more OVERRIDE. Removed the toSliderThumbElement, sliderThumbElementOf,
and sliderTrackElementOf functions.
* rendering/RenderSlider.cpp:
(WebCore::RenderSlider::layout): Use HTMLInputElement::sliderThumbElement.
(WebCore::RenderSlider::inDragMode): Ditto.
2013-10-12 Darin Adler <darin@apple.com>
Remove unneeded extra memory allocation and indirection for ValidityState
https://bugs.webkit.org/show_bug.cgi?id=122705
Reviewed by Anders Carlsson.
* CMakeLists.txt: Removed ValidityState.cpp.
* GNUmakefile.list.am: Ditto.
* WebCore.vcxproj/WebCore.vcxproj: Ditto.
* WebCore.vcxproj/WebCore.vcxproj.filters: Ditto.
* WebCore.xcodeproj/project.pbxproj: Ditto.
* html/FormAssociatedElement.cpp: Removed ValidityState.h include and the
FormAssociatedElement::validity function. That function is now an inline
in the ValidityState.h header.
* html/FormAssociatedElement.h: Added badInput function, the only function
from the ValidityState interface that was not already present here. Removed
m_validityState.
* html/HTMLFormControlElement.cpp: Removed include of ValidityState.h.
(WebCore::HTMLFormControlElement::isValidFormControlElement): Use the valid
function directly instead of indirectly through the validity state.
(WebCore::HTMLFormControlElement::setNeedsValidityCheck): Ditto.
* html/ValidityState.cpp: Removed.
* html/ValidityState.h: Removed the body of the ValidityState class and
made it effectively a "typedef" for FormAssociatedElement. It's actually
a derived class that adds no members, which is not quite right but will
work just fine for this.
(WebCore::FormAssociatedElement::validity): Implemented; just returns the
FormAssociatedElement, which the bindings expose as a ValidityState.
* html/ValidityState.idl: Use SkipVTableValidation instead of
ImplementationLacksVTable because FormAssociatedElement does have a vtable.
2013-10-12 Darin Adler <darin@apple.com>
Rename toParentMediaElement to parentMediaElement, since it's not a type cast
https://bugs.webkit.org/show_bug.cgi?id=122707
Reviewed by Eric Carlson.
* accessibility/AccessibilityMediaControls.cpp:
(WebCore::AccessibilityMediaControlsContainer::controllingVideoElement): Call the
function by its new name, and also remove unnecessary type casting.
* html/shadow/MediaControlElementTypes.cpp:
(WebCore::parentMediaElement): Renamed from toParentMediaElement. Changed to use
nullptr. Removed an unnecessary null check.
* html/shadow/MediaControlElementTypes.h: Renamed from toParentMediaElement.
Changed the argument to the RenderObject overload to be a reference rather than
a pointer since it doesn't handle null.
* html/shadow/MediaControlElements.cpp:
(WebCore::MediaControlClosedCaptionsTrackListElement::defaultEventHandler):
(WebCore::MediaControlClosedCaptionsTrackListElement::updateDisplay):
(WebCore::MediaControlClosedCaptionsTrackListElement::rebuildTrackListMenu):
(WebCore::MediaControlFullscreenButtonElement::defaultEventHandler):
(WebCore::MediaControlTextTrackContainerElement::updateDisplay):
(WebCore::MediaControlTextTrackContainerElement::updateTimerFired):
(WebCore::MediaControlTextTrackContainerElement::clearTextTrackRepresentation):
(WebCore::MediaControlTextTrackContainerElement::updateSizes):
(WebCore::MediaControlTextTrackContainerElement::createTextTrackRepresentationImage):
Updated to use the new name. Also use nullptr.
* html/shadow/MediaControlsBlackBerry.cpp:
(WebCore::MediaControlFullscreenFullscreenButtonElement::defaultEventHandler):
Updated to use the new name.
* platform/blackberry/RenderThemeBlackBerry.cpp:
(WebCore::determineFullScreenMultiplier):
(WebCore::RenderThemeBlackBerry::adjustMediaControlStyle):
(WebCore::RenderThemeBlackBerry::paintMediaPlayButton):
(WebCore::RenderThemeBlackBerry::paintMediaRewindButton):
(WebCore::RenderThemeBlackBerry::paintMediaMuteButton):
(WebCore::RenderThemeBlackBerry::paintMediaFullscreenButton):
(WebCore::RenderThemeBlackBerry::paintMediaSliderTrack):
(WebCore::RenderThemeBlackBerry::paintMediaVolumeSliderTrack):
Updated to use the new name.
* platform/efl/RenderThemeEfl.cpp:
(WebCore::RenderThemeEfl::paintMediaSliderTrack):
Updated to use the new name.
* platform/gtk/RenderThemeGtk.cpp:
(WebCore::RenderThemeGtk::paintMediaSliderTrack):
(WebCore::RenderThemeGtk::paintMediaVolumeSliderTrack):
Updated to use the new name.
* rendering/RenderMediaControls.cpp:
(WebCore::RenderMediaControls::paintMediaControlsPart):
Call the function by its new name and with a reference instead of a pointer.
2013-10-12 Antti Koivisto <antti@apple.com>
Move positionForPoint to RenderTextLineBoxes
https://bugs.webkit.org/show_bug.cgi?id=122703
Reviewed by Andreas Kling.
2013-10-12 Andreas Kling <akling@apple.com>
Remove unused ScrollingCoordinator hooks.
<https://webkit.org/b/122701>
Reviewed by Anders Carlsson.
Remove leftover ScrollingCoordinator hooks that were only used
by the Chromium port.
2013-10-12 Zan Dobersek <zdobersek@igalia.com>
[Soup] The NeverDestroyed<std::unique_ptr<NetworkStorageSession>> variable in defaultSession() should be static
https://bugs.webkit.org/show_bug.cgi?id=122700
Reviewed by Anders Carlsson.
* platform/network/soup/NetworkStorageSessionSoup.cpp:
(WebCore::defaultSession): The NeverDestroyed variable should be static to avoid its reinitialization every time
the function is called. This was exposed by r157337 and should fix the subsequent crashes.
2013-10-12 Antti Koivisto <antti@apple.com>
Move line dirtying code to RenderTextLineBoxes
https://bugs.webkit.org/show_bug.cgi?id=122699
Reviewed by Andreas Kling.
* rendering/RenderTextLineBoxes.cpp:
(WebCore::RenderTextLineBoxes::removeAllFromParent):
Also moved the removal loop.
(WebCore::RenderTextLineBoxes::dirtyAll):
(WebCore::RenderTextLineBoxes::dirtyRange):
2013-10-12 Antti Koivisto <antti@apple.com>
Move more code to RenderTextLineBoxes
https://bugs.webkit.org/show_bug.cgi?id=122697
Reviewed by Andreas Kling.
* rendering/RenderTextLineBoxes.cpp:
(WebCore::RenderTextLineBoxes::boundingBox):
(WebCore::RenderTextLineBoxes::visualOverflowBoundingBox):
(WebCore::RenderTextLineBoxes::hasRenderedText):
(WebCore::RenderTextLineBoxes::caretMinOffset):
(WebCore::RenderTextLineBoxes::caretMaxOffset):
Moved these.
2013-10-12 Alexey Proskuryakov <ap@apple.com>
Add a feature define for SubtleCrypto
https://bugs.webkit.org/show_bug.cgi?id=122683
Reviewed by Anders Carlsson.
* Configurations/FeatureDefines.xcconfig:
2013-10-12 Andreas Kling <akling@apple.com>
Generate tighter isFooElement() functions for HTML elements.
<https://webkit.org/b/122696>
Reviewed by Antti Koivisto.
Specialize HTML element type checking helpers to only compare the
localName and not the fully qualified tag name.
2013-09-27 Jessica Pease <jessica_n_pease@apple.com>
Replace static cast ASSERTs with ASSERT_WITH_SECURITY_IMPLICATION
https://bugs.webkit.org/show_bug.cgi?id=120803
Reviewed by Andreas Kling.
No new tests because we're just changing assertions.
* accessibility/AccessibilityMockObject.h:
(WebCore::toAccessibilityMockObject):
* bindings/js/JSCanvasRenderingContextCustom.cpp:
(WebCore::toJS):
* bindings/js/ScheduledAction.cpp:
(WebCore::ScheduledAction::execute):
* css/CSSGradientValue.cpp:
(WebCore::CSSGradientValue::image):
* css/DeprecatedStyleBuilder.cpp:
(WebCore::ApplyPropertyTextUnderlinePosition::applyValue):
* dom/Element.cpp:
(WebCore::Element::elementRareData):
(WebCore::Element::synchronizeAttribute):
* dom/FocusEvent.h:
(WebCore::toFocusEvent):
* dom/MouseEvent.h:
(WebCore::toMouseEvent):
* dom/Node.cpp:
(WebCore::Node::rareData):
* dom/StyledElement.cpp:
(WebCore::StyledElement::ensureMutableInlineStyle):
* dom/TouchEvent.h:
(WebCore::toTouchEvent):
* editing/CompositeEditCommand.h:
(WebCore::toCompositeEditCommand):
* html/HTMLObjectElement.cpp:
(WebCore::HTMLObjectElement::shouldAllowQuickTimeClassIdQuirk):
* html/track/AudioTrack.h:
(WebCore::toAudioTrack):
* html/track/TextTrack.h:
(WebCore::toTextTrack):
* html/track/VideoTrack.h:
(WebCore::toVideoTrack):
* inspector/InspectorCSSAgent.cpp:
(WebCore::InspectorCSSAgent::buildObjectForAttributesStyle):
* loader/cache/CachedResourceClientWalker.h:
(WebCore::CachedResourceClientWalker::next):
* page/FrameView.h:
(WebCore::toFrameView):
* rendering/InlineBox.cpp:
(WebCore::InlineBox::root):
* rendering/RenderBlockLineLayout.cpp:
(WebCore::RenderBlock::createLineBoxesFromBidiRuns):
* rendering/svg/SVGPathData.cpp:
(WebCore::updatePathFromEllipseElement):
(WebCore::updatePathFromLineElement):
(WebCore::updatePathFromPolygonElement):
(WebCore::updatePathFromPolylineElement):
* workers/WorkerMessagingProxy.cpp:
(WebCore::WorkerMessagingProxy::startWorkerGlobalScope):
* xml/XMLHttpRequest.cpp:
(WebCore::XMLHttpRequest::document):
2013-09-06 Jessica Pease <jessica_n_pease@apple.com>
Replace bounds checking ASSERTs with ASSERT_WITH_SECURITY_IMPLICATION
https://bugs.webkit.org/show_bug.cgi?id=120893
Reviewed by Darin Adler.
* Modules/indexeddb/IDBKeyPath.cpp:
(WebCore::IDBKeyPathLexer::lex):
* Modules/indexeddb/IDBLevelDBCoding.cpp:
(WebCore::IDBLevelDBCoding::compareEncodedIDBKeys):
* bindings/js/JSCSSStyleDeclarationCustom.cpp:
(WebCore::cssPropertyIDForJSCSSPropertyName):
* css/CSSFontSelector.cpp:
(WebCore::compareFontFaces):
* css/CSSParser.cpp:
(WebCore::CSSParser::rewriteSpecifiers):
* html/HTMLCollection.cpp:
(WebCore::traverseMatchingElementsForwardToOffset):
(WebCore::LiveNodeListBase::traverseChildNodeListForwardToOffset):
(WebCore::HTMLCollection::traverseForwardToOffset):
* html/HTMLFontElement.cpp:
(WebCore::parseFontSize):
* html/parser/HTMLParserIdioms.cpp:
(WebCore::parseHTMLIntegerInternal):
(WebCore::parseHTMLNonNegativeIntegerInternal):
* inspector/InspectorStyleSheet.h:
(WebCore::InspectorStyleProperty::setRawTextFromStyleDeclaration):
* platform/graphics/StringTruncator.cpp:
(WebCore::centerTruncateToBuffer):
(WebCore::rightTruncateToBuffer):
(WebCore::truncateString):
* platform/graphics/TextRun.h:
(WebCore::TextRun::subRun):
* platform/text/BidiRunList.h:
(WebCore::::reverseRuns):
* rendering/svg/SVGInlineTextBox.cpp:
(WebCore::SVGInlineTextBox::selectionRectForTextFragment):
(WebCore::SVGInlineTextBox::mapStartEndPositionsIntoFragmentCoordinates):
* rendering/svg/SVGTextChunkBuilder.cpp:
(WebCore::SVGTextChunkBuilder::buildTextChunks):
* rendering/svg/SVGTextLayoutEngine.cpp:
(WebCore::SVGTextLayoutEngine::currentLogicalCharacterMetrics):
* rendering/svg/SVGTextQuery.cpp:
(WebCore::SVGTextQuery::mapStartEndPositionsIntoFragmentCoordinates):
* svg/SVGAnimationElement.cpp:
(WebCore::SVGAnimationElement::currentValuesForValuesAnimation):
* svg/SVGPathByteStreamSource.h:
(WebCore::SVGPathByteStreamSource::readType):
2013-10-12 Antti Koivisto <antti@apple.com>
Factor line box code from RenderText to a class
https://bugs.webkit.org/show_bug.cgi?id=122694
Reviewed by Andreas Kling.
Create RenderTextLineBoxes and move some line box specific code there.
2013-10-12 Antti Koivisto <antti@apple.com>
Replace RenderText::renderedTextLength with hasRenderedText
https://bugs.webkit.org/show_bug.cgi?id=122693
Reviewed by Andreas Kling.
2013-10-12 Darin Adler <darin@apple.com>
Use unique_ptr instead of delete in a few places
https://bugs.webkit.org/show_bug.cgi?id=122639
Reviewed by Anders Carlsson.
* Modules/webdatabase/DatabaseBackendBase.cpp:
(WebCore::guidToDatabaseMap): Use NeverDestroyed instead of DEFINE_STATIC_LOCAL.
(WebCore::guidForOriginAndName): Ditto.
(WebCore::DatabaseBackendBase::DatabaseBackendBase): Removed unneeded initialization
of m_guid, which is set in the body of the constructor explicitly anyway. Use emptyString.
Use unique_ptr for the values in the map. Use the add idiom instead of the get/set idiom.
(WebCore::DatabaseBackendBase::closeDatabase): Use the find/remove idiom instead of the
get/remove idiom.
(WebCore::DatabaseBackendBase::performOpenAndVerify): Use auto here to avoid having to
use the map type by name.
* loader/cache/CachedFont.cpp:
(WebCore::CachedFont::CachedFont): Don't initialize m_fontData to 0; unique_ptr will do that.
(WebCore::CachedFont::~CachedFont): Don't delete m_fontData. unique_ptr will do that.
(WebCore::CachedFont::ensureCustomFontData): Add a get.
(WebCore::CachedFont::allClientsRemoved): Don't delete m_fontData. Use nullptr instead of 0.
* loader/cache/CachedFont.h: Changed m_fontData to a unique_ptr.
* platform/graphics/BitmapImage.cpp:
(WebCore::BitmapImage::BitmapImage): Don't initialize m_frameTimer to 0; unique_ptr will do that.
(WebCore::BitmapImage::startAnimation): Use make_unique to create the timer.
(WebCore::BitmapImage::stopAnimation): Don't delete m_frameTimer. Use nullptr instead of 0.
* platform/graphics/BitmapImage.h: Changed m_FrameTimer to a unique_ptr.
* platform/graphics/cg/BitmapImageCG.cpp:
(WebCore::BitmapImage::BitmapImage): Don't initialize m_frameTimer to 0; unique_ptr will do that.
* platform/graphics/mac/FontCustomPlatformData.cpp:
(WebCore::FontCustomPlatformData::~FontCustomPlatformData): Don't call CGFontRelease on m_cgFont.
(WebCore::FontCustomPlatformData::fontPlatformData): Use get on m_cgFont.
(WebCore::createFontCustomPlatformData): Use nullptr instead of 0, and make_unique instead of new.
* platform/graphics/mac/FontCustomPlatformData.h: Chnaged m_cgFont to be a RetainPtr, and the
return value from createFontCustomPlatformData to be a unique_ptr.
* platform/graphics/blackberry/FontCustomPlatformData.h:
* platform/graphics/blackberry/FontCustomPlatformDataBlackBerry.cpp:
(WebCore::createFontCustomPlatformData):
* platform/graphics/cairo/BitmapImageCairo.cpp:
(WebCore::BitmapImage::BitmapImage):
* platform/graphics/cairo/FontCustomPlatformData.h:
* platform/graphics/cg/BitmapImageCG.cpp:
(WebCore::BitmapImage::BitmapImage):
* platform/graphics/freetype/FontCustomPlatformDataFreeType.cpp:
(WebCore::createFontCustomPlatformData):
* platform/graphics/win/FontCustomPlatformData.cpp:
(WebCore::createFontCustomPlatformData):
* platform/graphics/win/FontCustomPlatformData.h:
* platform/graphics/win/FontCustomPlatformDataCairo.cpp:
(WebCore::createFontCustomPlatformData):
* platform/graphics/wince/FontCustomPlatformData.cpp:
(WebCore::createFontCustomPlatformData):
* platform/graphics/wince/FontCustomPlatformData.h:
Same thing on all the other platforms.
* platform/network/NetworkStorageSession.h: Changed return value of createPrivateBrowsingSession
to a unique_ptr, and made constructors public.
* platform/network/cf/NetworkStorageSessionCFNet.cpp:
(WebCore::NetworkStorageSession::createPrivateBrowsingSession): Use make_unique.
* platform/network/soup/NetworkStorageSessionSoup.cpp:
(WebCore::defaultSession):
(WebCore::NetworkStorageSession::defaultStorageSession):
(WebCore::NetworkStorageSession::createPrivateBrowsingSession):
(WebCore::NetworkStorageSession::switchToNewTestingSession):
Same thing on all the other platforms.
2013-10-11 Andreas Kling <akling@apple.com>
Make LayoutState not arena-allocated.
<https://webkit.org/b/122649>
Reviewed by Antti Koivisto.
Let RenderView own a singly-linked chain of LayoutState objects
managed by unique_ptr.
2013-10-10 Andreas Kling <akling@apple.com>
Make RenderLayer not arena-allocated.
<https://webkit.org/b/87523>
Reviewed by Antti Koivisto.
Let RenderLayerModelObject store its RenderLayer in a unique_ptr.
Layers are relatively low-volume objects and this looks neutral
on our performance tests.
Re-landing this since the original commit exposed a problem with
the destruction order. This pattern:
m_someRenderer->destroy();
m_someRenderer = nullptr;
..is different from what we get with unique_ptr, which clears
the pointer storage before calling the destructor.
I believe that the new order is strictly better as it removes
one path to accessing an object that is undergoing destruction.
The exposed bug was in RLC::fixedRootBackgroundLayerChanged()
where we were dereferencing the RenderView's layer() without
checking, despite it being called below ~RenderLayer.
2013-10-11 Zoltan Horvath <zoltan@webkit.org>
Move firstPositiveWidth/adjustLogicalLineTop functions where they're actually used
https://bugs.webkit.org/show_bug.cgi?id=122685
Reviewed by Darin Adler.
I'm working on the refactoring of RenderBlockLineLayout, progress tracked under bug #121261. For the better readability, I moved
firstPositiveWidth and adjustLogicalLineTop functions above pushShapeContentOverflowBelowTheContentBox, where these're actually used.
No new tests, no behavior change.
* rendering/RenderBlockLineLayout.cpp:
(WebCore::firstPositiveWidth):
(WebCore::adjustLogicalLineTop):
2013-10-11 Ryosuke Niwa <rniwa@webkit.org>
Extract an iterator/resolver class from calculateAdjustedNodes
https://bugs.webkit.org/show_bug.cgi?id=122687
Reviewed by Darin Adler.
Extracted EventRelatedNodeResolver out of calculateAdjustedNodes and replaced calls to calculateAdjustedNodes
in updateTouchListsInEventPath and setRelatedTarget by the use of this newly added class.
* dom/EventContext.h: Added some helper functions to TouchEventContext so that updateTouchListsInEventPath
could obtain respective TouchList* without having to hard-code the name.
* dom/EventDispatcher.cpp:
(WebCore::EventRelatedNodeResolver::EventRelatedNodeResolver): Added.
(WebCore::EventRelatedNodeResolver::moveToParentOrShadowHost): Extracted from calculateAdjustedNodes.
(WebCore::EventPath::updateTouchListsInEventPath): Updated to use EventRelatedNodeResolver. Also made this
a member function of EventPath.
(WebCore::EventPath::updateTouchLists): Removed local Vectors to TouchList now that updateTouchListsInEventPath
can obtain TouchList* on demand.
(WebCore::EventPath::setRelatedTarget): Upsed to use EventRelatedNodeResolver.
2013-10-11 Darin Adler <darin@apple.com>
Change most call sites to call ICU directly instead of through WTF::Unicode
https://bugs.webkit.org/show_bug.cgi?id=122635
Reviewed by Alexey Proskuryakov.
* Modules/indexeddb/IDBKeyPath.cpp:
(isIdentifierStartCharacter): Use U_GET_GC_MASK instead of WTF::Unicode::category.
(isIdentifierCharacter): Ditto.
* css/CSSParser.cpp:
(WebCore::makeLower): Use u_tolower instead of WTF::Unicode::toLower.
Also assert the character fits in a UChar.
* dom/Document.cpp:
(WebCore::isValidNameStart): Use U_GET_GC_MASK instead of WTF::Unicode::category,
and u_getIntPropertyValue instead of WTF::Unicode::decompositionType.
(WebCore::isValidNamePart): Ditto.
(WebCore::canonicalizedTitle): Ditto.
* editing/Editor.cpp:
(WebCore::Editor::insertTextWithoutSendingTextEvent): Use u_isPunct instead of
WTF::Unicode::isPunct.
* editing/TextIterator.cpp:
(WebCore::SearchBuffer::append): Use u_strFoldCase instead of WTF::Unicode::foldCase.
* html/HTMLElement.cpp:
(WebCore::HTMLElement::directionality): Use UCharDirection instead of
WTF::Unicode::Direction.
* html/HTMLSelectElement.cpp:
(WebCore::HTMLSelectElement::defaultEventHandler): Use u_isprint instead of
WTF::Unicode::isPrintableChar.
* html/TypeAhead.cpp:
(WebCore::stripLeadingWhiteSpace): Use u_charDirection instead of
WTF::Unicode::direction.
* html/track/TextTrackCue.cpp:
(WebCore::isCueParagraphSeparator): Use u_charType instead of
WTF::Unicode::category.
(WebCore::TextTrackCue::determineTextDirection): Use u_charDirection instead of
WTF::Unicode::direction.
* page/ContextMenuController.cpp:
(WebCore::selectionContainsPossibleWord): Use U_GET_GC_MASK instead of
WTF::Unicode::category.
* platform/graphics/Font.cpp:
(WebCore::Font::canReceiveTextEmphasis): Ditto.
* platform/graphics/FontGlyphs.cpp:
(WebCore::FontGlyphs::glyphDataAndPageForCharacter): Use u_toupper instead of
WTF::Unicode::toUpper. Use u_charMirror instead of WTF::Unicode::mirroredChar.
* platform/graphics/GraphicsContext.cpp:
(WebCore::TextRunIterator::direction): Use u_charDirection instead of
WTF::Unicode::direction.
* platform/graphics/SVGGlyph.cpp:
(WebCore::charactersWithArabicForm): Use ublock_getCode instead of
WTF::Unicode::isArabicChar.
* platform/graphics/SurrogatePairAwareTextIterator.cpp:
(WebCore::SurrogatePairAwareTextIterator::normalizeVoicingMarks): Use
u_getCombiningClass instead of WTF::Unicode::combiningClass.
* platform/graphics/WidthIterator.cpp:
(WebCore::WidthIterator::advanceInternal): Use u_toupper instead of
WTF::Unicode::toUpper.
* platform/graphics/mac/ComplexTextController.cpp:
(WebCore::ComplexTextController::collectComplexTextRuns): Added some
assertions about the user of u_toupper and tweaked coding style a bit.
* platform/text/BidiContext.cpp:
(WebCore::BidiContext::createUncached): Use UCharDirection instead of
WTF::Unicode::Direction.
(WebCore::BidiContext::create): Ditto.
(WebCore::copyContextAndRebaselineLevel): Ditto.
* platform/text/BidiContext.h:
(WebCore::BidiContext::dir): Ditto.
(WebCore::BidiContext::BidiContext): Ditto.
* platform/text/BidiResolver.h:
(WebCore::BidiStatus::BidiStatus): Ditto.
(WebCore::BidiEmbedding::BidiEmbedding): Ditto.
(WebCore::BidiEmbedding::direction): Ditto.
(WebCore::BidiCharacterRun::BidiCharacterRun): Ditto.
(WebCore::BidiResolver::BidiResolver): Ditto.
(WebCore::BidiResolver::setLastDir): Ditto.
(WebCore::BidiResolver::setLastStrongDir): Ditto.
(WebCore::BidiResolver::setEorDir): Ditto.
(WebCore::BidiResolver::dir): Ditto.
(WebCore::BidiResolver::setDir): Ditto.
(WebCore::BidiResolver::appendRun): Ditto.
(WebCore::BidiResolver::embed): Ditto.
(WebCore::BidiResolver::checkDirectionInLowerRaiseEmbeddingLevel): Ditto.
(WebCore::BidiResolver::lowerExplicitEmbeddingLevel): Ditto.
(WebCore::BidiResolver::raiseExplicitEmbeddingLevel): Ditto.
(WebCore::BidiResolver::commitExplicitEmbedding): Ditto.
(WebCore::BidiResolver::updateStatusLastFromCurrentDirection): Ditto.
(WebCore::BidiResolver::createBidiRunsForLine): Ditto.
* platform/text/SegmentedString.h:
(WebCore::SegmentedString::advanceAndASSERTIgnoringCase): Use u_foldCase
instead of WTF::Unicode::foldCase.
* platform/text/TextBoundaries.cpp:
(WebCore::findNextWordFromIndex): Use u_isalnum instead of
WTF::Unicode::isAlphanumeric.
* platform/text/TextBoundaries.h:
(WebCore::requiresContextForWordBoundary): Use u_getIntPropertyValue directly
instead of WTF::Unicode::requiresComplexContextForWordBreaking.
* platform/text/mac/TextBoundaries.mm: Removed explicit use of WTF::Unicode,
which was unneeded and also will no longer compile.
* rendering/BidiRun.h:
(WebCore::BidiRun::BidiRun): Use UCharDirection instead of WTF::Unicode::Direction.
* rendering/InlineFlowBox.h: Ditto.
* rendering/InlineIterator.h:
(WebCore::embedCharFromDirection): Ditto.
(WebCore::notifyObserverWillExitObject): Ditto.
(WebCore::InlineIterator::direction): Ditto.
(WebCore::IsolateTracker::embed): Ditto.
(WebCore::InlineBidiResolver::appendRun): Ditto.
* rendering/RenderBlock.cpp:
(WebCore::isPunctuationForFirstLetter): Use U_GET_GC_MASK instead of
WTF::Unicode::category.
* rendering/RenderBlockLineLayout.cpp:
(WebCore::determineDirectionality): Use u_charDirection instead of
WTF::Unicode::direction.
(WebCore::RenderBlockFlow::handleTrailingSpaces): Ditto.
(WebCore::statusWithDirection): Ditto.
(WebCore::LineBreaker::nextSegmentBreak): Use U_GET_GC_MASK instead of
WTF::Unicode::category.
* rendering/RenderListMarker.cpp:
(WebCore::RenderListMarker::paint): Use u_charDirection instead of
WTF::Unicode::direction.
* rendering/RenderMenuList.cpp:
(WebCore::RenderMenuList::adjustInnerStyle): Use UCharDirection instead of
WTF::Unicode::Direction.
* rendering/RenderText.cpp:
(WebCore::makeCapitalized): Use u_totile instead of WTF::Unicode::toTitleCase.
Also added a comment about the fact that we need to use u_strToTitle instead.
* rendering/RootInlineBox.cpp:
(WebCore::RootInlineBox::lineBreakBidiStatus): Use UCharDirection instead of
WTF::Unicode::Direction.
* svg/SVGFontData.cpp:
(WebCore::SVGFontData::createStringWithMirroredCharacters): Use u_charMirror
instead of WTF::Unicode::mirroredChar.
* xml/XPathParser.cpp:
(WebCore::XPath::charCat): Use U_GET_GC_MASK instead of WTF::Unicode::category.
* platform/graphics/win/UniscribeController.cpp:
(WebCore::UniscribeController::advance):
* platform/win/PopupMenuWin.cpp:
(WebCore::PopupMenuWin::paint):
* platform/win/WebCoreTextRenderer.cpp:
(WebCore::isOneLeftToRightRun):
More of the same for Windows.
2013-10-11 Ryosuke Niwa <rniwa@webkit.org>
Dramatically simplify calculateAdjustedNodes
https://bugs.webkit.org/show_bug.cgi?id=122680
Reviewed by Antti Koivisto.
Without insertion points, we never have to worry about entering a shadow DOM we've already climbed out of.
Deleted the logic to deal with insertion points in calculateAdjustedNodes accordingly.
* dom/EventDispatcher.cpp:
(WebCore::EventPath::EventPath):
(WebCore::calculateAdjustedNodes):
(WebCore::updateTouchListsInEventPath):
(WebCore::EventPath::updateTouchLists):
(WebCore::EventPath::setRelatedTarget):
2013-10-11 Roger Fong <roger_fong@apple.com>
[Windows] Fix for fast/xpath test regressions caused by r157205.
https://bugs.webkit.org/show_bug.cgi?id=122658.
Reviewed by Darin Adler.
* xml/XPathStep.h:
(WebCore::XPath::Step::NodeTest::NodeTest):
(WebCore::XPath::Step::NodeTest::operator=):
We were incorrectly setting the predicate list to null instead of the predicate list of the NodeTest being passed in.
2013-10-11 Zoltan Horvath <zoltan@webkit.org>
[CSS Shapes] Use the floatingObject's logical coordinates to determine its size in computeLogicalLocationForFloat
https://bugs.webkit.org/show_bug.cgi?id=122663
Reviewed by David Hyatt.
Covered by existing float tests in fast/shapes/shape-inside.
I'll add additional tests in bug #122664.
* rendering/RenderBlockFlow.cpp:
(WebCore::RenderBlockFlow::computeLogicalLocationForFloat):
2013-10-11 Anders Carlsson <andersca@apple.com>
Remove gesture event support from WebCore
https://bugs.webkit.org/show_bug.cgi?id=122650
Reviewed by Ryosuke Niwa.
* CMakeLists.txt:
* GNUmakefile.list.am:
* WebCore.exp.in:
* WebCore.xcodeproj/project.pbxproj:
* dom/GestureEvent.cpp: Removed.
* dom/GestureEvent.h: Removed.
* dom/Node.cpp:
* dom/Node.h:
* page/EventHandler.cpp:
(WebCore::EventHandler::EventHandler):
(WebCore::EventHandler::clear):
(WebCore::EventHandler::sendContextMenuEventForKey):
* page/EventHandler.h:
* platform/PlatformGestureEvent.h: Removed.
* platform/Scrollbar.cpp:
* platform/Scrollbar.h:
* platform/mac/PlatformEventFactoryMac.h:
* platform/mac/PlatformEventFactoryMac.mm:
2013-10-11 Tim Horton <timothy_horton@apple.com>
Remove some dead code from PlatformCALayer*
https://bugs.webkit.org/show_bug.cgi?id=122641
Reviewed by Anders Carlsson.
Remove some unused getters from PlatformCALayer and its implementations.
No new tests, just removing dead code.
* platform/graphics/ca/PlatformCALayer.h:
* platform/graphics/ca/mac/PlatformCALayerMac.mm:
* platform/graphics/ca/win/PlatformCALayerWin.cpp:
2013-10-11 Adam Roben <aroben@webkit.org>
Confusing CGImageRef memory management in ImageBuffer::copyImage
https://bugs.webkit.org/show_bug.cgi?id=122605
BitmapImage::create was adopting the CGImage passed into it, which
resulted in some strange contortions in ImageBuffer::copyImage that
made it look like it was leaking CGImages, when in fact it was just
relying on BitmapImage to adopt the extra references.
BitmapImage::create now retains the passed-in CGImage, and I updated
the two callers to it to expect that (one here, one in WebKit2). I
also changed ImageBuffer::copyNativeImage to return a RetainPtr to
reduce the number of adoptCF()s needed and make it harder to make
programming mistakes.
Reviewed by Simon Fraser.
No new tests because this is just a code cleanup.
* platform/graphics/ImageBuffer.h: Changed copyNativeImage to return a
RetainPtr<CGImageRef.
* platform/graphics/cg/BitmapImageCG.cpp:
(WebCore::BitmapImage::BitmapImage): Adopt the passed-in CGImage,
since we're taking ownership of it. (We release it in
FrameData::clear.)
* platform/graphics/cg/ImageBufferCG.cpp:
(WebCore::ImageBuffer::copyImage): Updated for copyNativeImage's new
return type and to take into account BitmapImage::create's new
retaining semantics. This makes this function not have to be so clever
about retain counts.
(WebCore::ImageBuffer::copyNativeImage): Changed to return a
RetainPtr<CGImageRef>.
(WebCore::ImageBuffer::draw):
(WebCore::ImageBuffer::clip):
(WebCore::ImageBuffer::putByteArray):
(WebCore::ImageBuffer::toDataURL):
Updated for changes to copyNativeImage.
2013-10-11 Bear Travis <betravis@adobe.com>
[CSS Shapes] Shape-Image-Threshold should be animatable
https://bugs.webkit.org/show_bug.cgi?id=122622
Reviewed by Darin Adler.
Make the shape-image-threshold property respond to dynamic changes
made through JS or CSS animations. Responding to changes made to
shape-image-threshold is handled in RenderBox::updateShapeOutsideInfoAfterStyleChange,
while CSSPropertyAnimation.cpp adds the property to the list of
animatable properties.
Tests: fast/shapes/shape-outside-floats/shape-outside-dynamic-shape-image-threshold.html
fast/shapes/shape-outside-floats/shape-outside-shape-image-threshold-animation.html
* page/animation/CSSPropertyAnimation.cpp:
(WebCore::CSSPropertyAnimationWrapperMap::CSSPropertyAnimationWrapperMap): Add
shape-image-threshold to the list of animatable properties.
* rendering/RenderBox.cpp:
(WebCore::RenderBox::styleDidChange): updateShapeOutsideInfoAfterStyleChange
needs to take two RenderStyle arguments to compare multiple shape properties,
rather than just the shape-outside property.
(WebCore::RenderBox::updateShapeOutsideInfoAfterStyleChange): Compare
shape-image-threshold values to see if they changed, and invalidate the layout
if necessary.
* rendering/RenderBox.h:
2013-10-11 Brent Fulgham <bfulgham@apple.com>
Unreviewed gardening. Remove a Windows work-around that is not needed.
* dom/Range.cpp:
(WebCore::rangeOfContents): Move implementation back to source file.
* dom/Range.h: Remove inline I added to work around a compiler bug.
2013-10-11 Commit Queue <commit-queue@webkit.org>
Unreviewed, rolling out r157297.
http://trac.webkit.org/changeset/157297
https://bugs.webkit.org/show_bug.cgi?id=122651
Caused crashes on multiple platform/mac-wk2/tiled-drawing
tests (Requested by ap on #webkit).
* rendering/RenderLayer.cpp:
(WebCore::RenderLayer::operator new):
(WebCore::RenderLayer::operator delete):
(WebCore::RenderLayer::destroy):
* rendering/RenderLayer.h:
* rendering/RenderLayerModelObject.cpp:
(WebCore::RenderLayerModelObject::RenderLayerModelObject):
(WebCore::RenderLayerModelObject::destroyLayer):
(WebCore::RenderLayerModelObject::ensureLayer):
* rendering/RenderLayerModelObject.h:
(WebCore::RenderLayerModelObject::layer):
2013-10-11 Darin Adler <darin@apple.com>
Fix build.
* html/HTMLElement.cpp:
(WebCore::HTMLElement::translate): Do a const_cast when creating the
lineage, since it doesn't yet work with const pointers.
2013-10-11 Darin Adler <darin@apple.com>
Do a bit of optimization and cleanup in the HTMLElement class
https://bugs.webkit.org/show_bug.cgi?id=122640
Reviewed by Andreas Kling.
* html/HTMLElement.cpp:
(WebCore::unicodeBidiAttributeForDirAuto): Take a reference.
(WebCore::HTMLElement::collectStyleForPresentationAttribute): Pass one.
(WebCore::mergeWithNextTextNode): Take a reference to a Text node instead
of a PassRefPtr to a Node. Also removed unnecessary check of parentNode.
Also update to new calling convention for mergeWithNextTextNode.
(WebCore::HTMLElement::setOuterHTML): Use parentElement instead of
parentNode, since Antti says that's the future, and either will work here.
Also use nullptr.
(WebCore::HTMLElement::textToFragment): Fix indentation and use nullptr.
(WebCore::HTMLElement::setOuterText): Use a RefPtr for the parent here,
since otherwise there is no guarantee it survives. Also use nullptr and
update to new calling convention for mergeWithNextTextNode.
(WebCore::HTMLElement::insertAdjacent): Use nullptr.
(WebCore::HTMLElement::insertAdjacentElement): Use nullptr.
(WebCore::contextElementForInsertion): Use nullptr.
(WebCore::HTMLElement::contentEditable): Use ASCIILiteral.
(WebCore::HTMLElement::setContentEditable): Use AtomicString::ConstructFromLiteral.
(WebCore::HTMLElement::draggable): Use fastGetAttribute.
(WebCore::HTMLElement::setDraggable): Use AtomicString::ConstructFromLiteral.
(WebCore::HTMLElement::setSpellcheck): Use AtomicString::ConstructFromLiteral.
(WebCore::HTMLElement::click): Use nullptr.
(WebCore::HTMLElement::accessKeyAction): Use nullptr.
(WebCore::HTMLElement::title): Use fastGetAttribute.
(WebCore::HTMLElement::translateAttributeMode): Use fastGetAttribute, isNull,
and isEmpty.
(WebCore::HTMLElement::translate): Use parentElement and toHTMLElement.
Use early-continue style instead of nesting the whole loop body inside an if.
(WebCore::setHasDirAutoFlagRecursively): Use nullptr.
(WebCore::HTMLElement::hasDirectionAuto): Use isNull.
(WebCore::HTMLElement::directionality): Use nullptr.
(WebCore::HTMLElement::adjustDirectionalityIfNeededAfterChildrenChanged): Use nullptr.
(WebCore::HTMLElement::addHTMLLengthToStyle): Use longer variable names.
* html/HTMLTableCellElement.cpp:
(WebCore::HTMLTableCellElement::abbr): Use fastGetAttribute.
(WebCore::HTMLTableCellElement::axis): Ditto.
(WebCore::HTMLTableCellElement::headers): Ditto.
(WebCore::HTMLTableCellElement::scope): Ditto.
* html/HTMLTableColElement.cpp:
(WebCore::HTMLTableColElement::width): Ditto.
2013-10-10 Darin Adler <darin@apple.com>
Use after free in WebCore::DisplayRefreshMonitorClient::fireDisplayRefreshIfNeeded
https://bugs.webkit.org/show_bug.cgi?id=121033
Reviewed by Dean Jackson.
For safe iteration, use a set rather than a vector, and remove the clients from
the set if they are removed during iteration.
Test: fast/animation/request-animation-frame-remove-client.html
* platform/graphics/DisplayRefreshMonitor.cpp:
(WebCore::DisplayRefreshMonitor::DisplayRefreshMonitor): Initialize the
m_clientsToBeNotified pointer to null.
(WebCore::DisplayRefreshMonitor::removeClient): If there is a m_clientsToBeNotified
set, remove from it as well as the real m_clients set.
(WebCore::DisplayRefreshMonitor::displayDidRefresh): Use a HashSet instead of a
vector for the copy of the clients set we iterate.
* platform/graphics/DisplayRefreshMonitor.h: Moved some of the BlackBerry-specific
part of this out of the header. Added a new HashSet pointer, m_clientsToBeNotified,
to be used to remove clients during the notification process. Also added a FIXME.
* platform/graphics/blackberry/DisplayRefreshMonitorBlackBerry.cpp: Moved the
DisplayAnimationClient class in here.
2013-10-10 Dean Jackson <dino@apple.com>
Use after free in WebCore::DisplayRefreshMonitorClient::fireDisplayRefreshIfNeeded
http://webkit.org/b/121033
Reviewed by Darin Adler.
Add an ASSERT to detect if an animation client will be removed
during the callback dispatch.
Test: fast/animation/request-animation-frame-remove-client.html
* platform/graphics/DisplayRefreshMonitor.cpp:
(WebCore::DisplayRefreshMonitor::displayDidRefresh):
2013-10-11 Andreas Kling <akling@apple.com>
Make RenderLayer not arena-allocated.
<https://webkit.org/b/87523>
Reviewed by Antti Koivisto.
Let RenderLayerModelObject store its RenderLayer in a unique_ptr.
Layers are relatively low-volume objects and this looks neutral
on our performance tests.
2013-10-11 Zalan Bujtas <zalan@apple.com>
REGRESSION (r155607): Javascript site does not load visually on panerabread.com
https://bugs.webkit.org/show_bug.cgi?id=122461
Reviewed by Simon Fraser.
Do not modify the composited layer backing's internal layer structure directly
when the clipping behaviour changes.
When we directly create/destroy RenderLayerBacking::m_ancestorClippingLayer to
reflect the new clipping state, other, depending layers need updating. In order to
not to corrupt the internal hierarchy, mark the compositing layers dirty and let
the normal updating mechanism take care of creating/destroying the ancestor layers.
Existing tests are extended.
* rendering/RenderLayer.cpp:
(WebCore::RenderLayer::checkIfDescendantClippingContextNeedsUpdate):
(WebCore::RenderLayer::styleChanged):
* rendering/RenderLayer.h:
* rendering/RenderLayerBacking.h:
2013-10-10 Ryosuke Niwa <rniwa@webkit.org>
Make EventPath private to EventDispatcher.cpp
https://bugs.webkit.org/show_bug.cgi?id=122638
Reviewed by Darin Adler.
Move the declaration of EventPath into EventDispatcher.cpp since EventPath is only used in this file.
Also make EventDispatcher a namespace since it is never instantiated since r157250.
* dom/EventDispatcher.cpp:
(WebCore::EventPath::isEmpty):
(WebCore::EventPath::size):
(WebCore::EventPath::contextAt):
(WebCore::EventPath::lastContextIfExists):
* dom/EventDispatcher.h:
* inspector/InspectorInstrumentation.h:
(WebCore::InspectorInstrumentation::willDispatchEvent):
2013-10-10 Santosh Mahto <santosh.ma@samsung.com>
contentEditable with "position:relative" paragraphs is buggy
https://bugs.webkit.org/show_bug.cgi?id=33950
Reviewed by Darin Adler.
When paragraph is positioned(relative/absolute/fixed) then deleting
that paragraph cause wrong merging of other(below) paragraphs. This is
happening because positioned element is treated as special element and
on deletion complete paragraph element is removed. The ranges become
paragraph. This issue happens when all the content of special element
are deleted. So the merging of paragraph is avoided in this scenario.
Test: editing/deleting/deleting-relative-positioned-special-element.html
* editing/DeleteSelectionCommand.cpp:
(WebCore::DeleteSelectionCommand::initializeStartEnd):Avoid merging
block when special candidate are included in deletion range
2013-10-10 Brendan Long <b.long@cablelabs.com>
Track controls show metadata and chapter tracks
https://bugs.webkit.org/show_bug.cgi?id=122468
Reviewed by Darin Adler.
Test: media/video-controls-captions-trackmenu-only-captions-descriptions-and-subtitles.html
* page/CaptionUserPreferences.cpp:
(WebCore::CaptionUserPreferences::sortedTrackListForMenu): Only show captions, descriptions and subtitles in the track controls.
2013-10-10 Ryosuke Niwa <rniwa@webkit.org>
EventContext should be used only in EventDispatcher.cpp
https://bugs.webkit.org/show_bug.cgi?id=122631
Reviewed by Anders Carlsson.
Merged WindowEventContext into EventDispatcher. Moved the code to avoid dispatching load event on
window into dispatchEventInDOM so that WindowEventContext's constructor doesn't need Event.
Also replaced DOMWindow, Node, and EventPath arguments to InspectorInstrumentation::willDispatchEvent
by a single boolean indicating whether window, the origin, or the event path has an event listener.
* CMakeLists.txt:
* GNUmakefile.list.am:
* WebCore.vcxproj/WebCore.vcxproj:
* WebCore.vcxproj/WebCore.vcxproj.filters:
* WebCore.xcodeproj/project.pbxproj:
* dom/DOMAllInOne.cpp:
* dom/EventDispatcher.cpp:
(WebCore::WindowEventContext::window): Moved from WindowEventContext.
(WebCore::WindowEventContext::target): Ditto.
(WebCore::WindowEventContext::WindowEventContext): Ditto; removed the code to avoid dispatching load
event on window since that's checked in dispatchEventInDOM now.
(WebCore::WindowEventContext::handleLocalEvents): Ditto.
(WebCore::dispatchEventInDOM): Avoid calling handleLocalEvent on a load event with WindowEventContext.
(WebCore::EventDispatcher::dispatchEvent): Pass a boolean to indicate whether window, the origin, or
the event path contains any event listener to InspectorInstrumentation::willDispatchEvent to hide
EventPath from the inspector code.
* dom/EventDispatcher.h:
* dom/Node.cpp:
* dom/Node.h:
* dom/WindowEventContext.cpp: Removed.
* dom/WindowEventContext.h: Removed.
* inspector/InspectorDOMAgent.cpp:
* inspector/InspectorInstrumentation.cpp:
(WebCore::InspectorInstrumentation::willDispatchEventImpl):
* inspector/InspectorInstrumentation.h:
(WebCore::InspectorInstrumentation::willDispatchEvent):
2013-10-10 Darin Adler <darin@apple.com>
REGRESSION (r157205?): Leaks in XPath
https://bugs.webkit.org/show_bug.cgi?id=122609
Reviewed by Andreas Kling.
* xml/XPathGrammar.y: Fixed warnings by adding missing "$$ = $1" to various rules.
Added local unique_ptr for NodeTest and ArgumentList in three rules, so they
won't be leaked.
2013-10-10 Gyuyoung Kim <gyuyoung.kim@samsung.com>
Add toSVGColor|Paint() to cleanup static_cast<>, and use it
https://bugs.webkit.org/show_bug.cgi?id=122630
Reviewed by Andreas Kling.
SVGColor and SVGPaint can't use CSS_VALUE_TYPE_CASTS(), this cl adds
toSVGColor() and toSVGPaint() manually. Those functions will help to
detect bad type cast.
* css/CSSValue.cpp:
(WebCore::CSSValue::cssText):
(WebCore::CSSValue::destroy):
(WebCore::CSSValue::cloneForCSSOM):
* css/SVGCSSStyleSelector.cpp:
(WebCore::StyleResolver::applySVGProperty):
* svg/SVGColor.h:
(WebCore::toSVGColor):
* svg/SVGPaint.h:
(WebCore::toSVGPaint):
2013-10-10 Andreas Kling <akling@apple.com>
Kill WebCore::BindingState.
<https://webkit.org/b/122606>
Reviewed by Darin Adler.
Just use JSC::ExecState directly instead.
2013-10-10 Ryosuke Niwa <rniwa@webkit.org>
Remove EventRetargeter.h/cpp
https://bugs.webkit.org/show_bug.cgi?id=122625
Reviewed by Anders Carlsson.
Merged the remaining contents of EventRetargeter.h and EventRetargter.cpp into EventDispatcher.cpp.
* CMakeLists.txt:
* GNUmakefile.list.am:
* Modules/indieui/UIRequestEvent.cpp:
* WebCore.xcodeproj/project.pbxproj:
* dom/DOMAllInOne.cpp:
* dom/Event.cpp:
* dom/Event.h:
* dom/EventDispatcher.cpp:
(WebCore::eventTargetRespectingTargetRules):
(WebCore::shouldEventCrossShadowBoundary):
(WebCore::nodeOrHostIfPseudoElement):
(WebCore::EventPath::EventPath):
(WebCore::buildRelatedNodeMap):
(WebCore::addRelatedNodeForUnmapedTreeScopes):
(WebCore::calculateAdjustedNodes):
(WebCore::updateTouchListsInEventPath):
(WebCore::EventPath::updateTouchLists):
(WebCore::EventPath::setRelatedTarget):
* dom/EventRetargeter.cpp: Removed.
* dom/EventRetargeter.h: Removed.
* dom/FocusEvent.cpp:
* dom/GestureEvent.h:
* dom/KeyboardEvent.h:
* dom/MouseEvent.cpp:
* dom/MouseEvent.h:
* dom/TouchEvent.cpp:
* dom/UIEvent.cpp:
* dom/WheelEvent.cpp:
2013-10-10 Thiago de Barros Lacerda <thiago.lacerda@openbossa.org>
Making the base implementation of isAudioStreamSource, in MediaStreamSource, return the correct value
https://bugs.webkit.org/show_bug.cgi?id=122612
Reviewed by Jer Noble.
There is no reason for this implementation, in the base class, to always return false
if we already have the information about the type of the source.
No new tests needed.
* Modules/webaudio/MediaStreamAudioSource.h:
* platform/mediastream/MediaStreamSource.h:
(WebCore::MediaStreamSource::isAudioStreamSource):
2013-10-10 Timothy Hatcher <timothy@apple.com>
Web Inspector: Remove the old front-end from WebKit.
https://bugs.webkit.org/show_bug.cgi?id=122295
* inspector/front-end/AceTextEditor.js: Removed.
* inspector/front-end/AdvancedSearchController.js: Removed.
* inspector/front-end/ApplicationCacheItemsView.js: Removed.
* inspector/front-end/ApplicationCacheModel.js: Removed.
* inspector/front-end/AuditCategories.js: Removed.
* inspector/front-end/AuditController.js: Removed.
* inspector/front-end/AuditFormatters.js: Removed.
* inspector/front-end/AuditLauncherView.js: Removed.
* inspector/front-end/AuditResultView.js: Removed.
* inspector/front-end/AuditRules.js: Removed.
* inspector/front-end/AuditsPanel.js: Removed.
* inspector/front-end/BottomUpProfileDataGridTree.js: Removed.
* inspector/front-end/BreakpointManager.js: Removed.
* inspector/front-end/BreakpointsSidebarPane.js: Removed.
* inspector/front-end/CPUProfileView.js: Removed.
* inspector/front-end/CSSMetadata.js: Removed.
* inspector/front-end/CSSNamedFlowCollectionsView.js: Removed.
* inspector/front-end/CSSNamedFlowView.js: Removed.
* inspector/front-end/CSSSelectorProfileView.js: Removed.
* inspector/front-end/CSSStyleModel.js: Removed.
* inspector/front-end/CallStackSidebarPane.js: Removed.
* inspector/front-end/CanvasProfileView.js: Removed.
* inspector/front-end/Checkbox.js: Removed.
* inspector/front-end/CodeMirrorTextEditor.js: Removed.
* inspector/front-end/Color.js: Removed.
* inspector/front-end/CompilerScriptMapping.js: Removed.
* inspector/front-end/ConsoleMessage.js: Removed.
* inspector/front-end/ConsoleModel.js: Removed.
* inspector/front-end/ConsolePanel.js: Removed.
* inspector/front-end/ConsoleView.js: Removed.
* inspector/front-end/ContentProvider.js: Removed.
* inspector/front-end/ContentProviderBasedProjectDelegate.js: Removed.
* inspector/front-end/ContentProviders.js: Removed.
* inspector/front-end/ContextMenu.js: Removed.
* inspector/front-end/CookieItemsView.js: Removed.
* inspector/front-end/CookieParser.js: Removed.
* inspector/front-end/CookiesTable.js: Removed.
* inspector/front-end/DOMAgent.js: Removed.
* inspector/front-end/DOMBreakpointsSidebarPane.js: Removed.
* inspector/front-end/DOMCountersGraph.js: Removed.
* inspector/front-end/DOMExtension.js: Removed.
* inspector/front-end/DOMPresentationUtils.js: Removed.
* inspector/front-end/DOMStorage.js: Removed.
* inspector/front-end/DOMStorageItemsView.js: Removed.
* inspector/front-end/DOMSyntaxHighlighter.js: Removed.
* inspector/front-end/DataGrid.js: Removed.
* inspector/front-end/Database.js: Removed.
* inspector/front-end/DatabaseQueryView.js: Removed.
* inspector/front-end/DatabaseTableView.js: Removed.
* inspector/front-end/DebuggerModel.js: Removed.
* inspector/front-end/DebuggerScriptMapping.js: Removed.
* inspector/front-end/DefaultScriptMapping.js: Removed.
* inspector/front-end/DefaultTextEditor.js: Removed.
* inspector/front-end/Dialog.js: Removed.
* inspector/front-end/DirectoryContentView.js: Removed.
* inspector/front-end/DockController.js: Removed.
* inspector/front-end/Drawer.js: Removed.
* inspector/front-end/ElementsPanel.js: Removed.
* inspector/front-end/ElementsPanelDescriptor.js: Removed.
* inspector/front-end/ElementsTreeOutline.js: Removed.
* inspector/front-end/EmptyView.js: Removed.
* inspector/front-end/EventListenersSidebarPane.js: Removed.
* inspector/front-end/ExtensionAPI.js: Removed.
* inspector/front-end/ExtensionAuditCategory.js: Removed.
* inspector/front-end/ExtensionPanel.js: Removed.
* inspector/front-end/ExtensionRegistryStub.js: Removed.
* inspector/front-end/ExtensionServer.js: Removed.
* inspector/front-end/ExtensionView.js: Removed.
* inspector/front-end/FileContentView.js: Removed.
* inspector/front-end/FileManager.js: Removed.
* inspector/front-end/FileMapping.js: Removed.
* inspector/front-end/FileSystemMapping.js: Removed.
* inspector/front-end/FileSystemModel.js: Removed.
* inspector/front-end/FileSystemProjectDelegate.js: Removed.
* inspector/front-end/FileSystemView.js: Removed.
* inspector/front-end/FileUtils.js: Removed.
* inspector/front-end/FilteredItemSelectionDialog.js: Removed.
* inspector/front-end/FlameChart.js: Removed.
* inspector/front-end/FontView.js: Removed.
* inspector/front-end/GoToLineDialog.js: Removed.
* inspector/front-end/HAREntry.js: Removed.
* inspector/front-end/HandlerRegistry.js: Removed.
* inspector/front-end/HeapSnapshot.js: Removed.
* inspector/front-end/HeapSnapshotDataGrids.js: Removed.
* inspector/front-end/HeapSnapshotGridNodes.js: Removed.
* inspector/front-end/HeapSnapshotLoader.js: Removed.
* inspector/front-end/HeapSnapshotProxy.js: Removed.
* inspector/front-end/HeapSnapshotView.js: Removed.
* inspector/front-end/HeapSnapshotWorker.js: Removed.
* inspector/front-end/HeapSnapshotWorkerDispatcher.js: Removed.
* inspector/front-end/HelpScreen.js: Removed.
* inspector/front-end/ImageView.js: Removed.
* inspector/front-end/Images/addIcon.png: Removed.
* inspector/front-end/Images/applicationCache.png: Removed.
* inspector/front-end/Images/back.png: Removed.
* inspector/front-end/Images/breakpointBorder.png: Removed.
* inspector/front-end/Images/breakpointConditionalBorder.png: Removed.
* inspector/front-end/Images/breakpointConditionalCounterBorder.png: Removed.
* inspector/front-end/Images/breakpointCounterBorder.png: Removed.
* inspector/front-end/Images/checker.png: Removed.
* inspector/front-end/Images/closeButtons.png: Removed.
* inspector/front-end/Images/cookie.png: Removed.
* inspector/front-end/Images/database.png: Removed.
* inspector/front-end/Images/databaseTable.png: Removed.
* inspector/front-end/Images/debuggerContinue.png: Removed.
* inspector/front-end/Images/debuggerPause.png: Removed.
* inspector/front-end/Images/debuggerStepInto.png: Removed.
* inspector/front-end/Images/debuggerStepOut.png: Removed.
* inspector/front-end/Images/debuggerStepOver.png: Removed.
* inspector/front-end/Images/deleteIcon.png: Removed.
* inspector/front-end/Images/disclosureTriangleSmallDown.png: Removed.
* inspector/front-end/Images/disclosureTriangleSmallDownBlack.png: Removed.
* inspector/front-end/Images/disclosureTriangleSmallDownWhite.png: Removed.
* inspector/front-end/Images/disclosureTriangleSmallRight.png: Removed.
* inspector/front-end/Images/disclosureTriangleSmallRightBlack.png: Removed.
* inspector/front-end/Images/disclosureTriangleSmallRightDown.png: Removed.
* inspector/front-end/Images/disclosureTriangleSmallRightDownBlack.png: Removed.
* inspector/front-end/Images/disclosureTriangleSmallRightDownWhite.png: Removed.
* inspector/front-end/Images/disclosureTriangleSmallRightWhite.png: Removed.
* inspector/front-end/Images/domain.png: Removed.
* inspector/front-end/Images/errorIcon.png: Removed.
* inspector/front-end/Images/errorMediumIcon.png: Removed.
* inspector/front-end/Images/errorRedDot.png: Removed.
* inspector/front-end/Images/fileSystem.png: Removed.
* inspector/front-end/Images/forward.png: Removed.
* inspector/front-end/Images/frame.png: Removed.
* inspector/front-end/Images/glossyHeader.png: Removed.
* inspector/front-end/Images/glossyHeaderPressed.png: Removed.
* inspector/front-end/Images/glossyHeaderSelected.png: Removed.
* inspector/front-end/Images/glossyHeaderSelectedPressed.png: Removed.
* inspector/front-end/Images/goArrow.png: Removed.
* inspector/front-end/Images/graphLabelCalloutLeft.png: Removed.
* inspector/front-end/Images/graphLabelCalloutRight.png: Removed.
* inspector/front-end/Images/indexedDB.png: Removed.
* inspector/front-end/Images/indexedDBIndex.png: Removed.
* inspector/front-end/Images/indexedDBObjectStore.png: Removed.
* inspector/front-end/Images/localStorage.png: Removed.
* inspector/front-end/Images/namedFlowOverflow.png: Removed.
* inspector/front-end/Images/navigatorShowHideButton.png: Removed.
* inspector/front-end/Images/paneAddButtons.png: Removed.
* inspector/front-end/Images/paneBottomGrow.png: Removed.
* inspector/front-end/Images/paneBottomGrowActive.png: Removed.
* inspector/front-end/Images/paneElementStateButtons.png: Removed.
* inspector/front-end/Images/paneFilterButtons.png: Removed.
* inspector/front-end/Images/paneGrowHandleLine.png: Removed.
* inspector/front-end/Images/paneRefreshButtons.png: Removed.
* inspector/front-end/Images/paneSettingsButtons.png: Removed.
* inspector/front-end/Images/popoverArrows.png: Removed.
* inspector/front-end/Images/popoverBackground.png: Removed.
* inspector/front-end/Images/profileGroupIcon.png: Removed.
* inspector/front-end/Images/profileIcon.png: Removed.
* inspector/front-end/Images/profileSmallIcon.png: Removed.
* inspector/front-end/Images/profilesSilhouette.png: Removed.
* inspector/front-end/Images/programCounterBorder.png: Removed.
* inspector/front-end/Images/radioDot.png: Removed.
* inspector/front-end/Images/regionEmpty.png: Removed.
* inspector/front-end/Images/regionFit.png: Removed.
* inspector/front-end/Images/regionOverset.png: Removed.
* inspector/front-end/Images/resourceCSSIcon.png: Removed.
* inspector/front-end/Images/resourceDocumentIcon.png: Removed.
* inspector/front-end/Images/resourceDocumentIconSmall.png: Removed.
* inspector/front-end/Images/resourceJSIcon.png: Removed.
* inspector/front-end/Images/resourcePlainIcon.png: Removed.
* inspector/front-end/Images/resourcePlainIconSmall.png: Removed.
* inspector/front-end/Images/resourcesSizeGraphIcon.png: Removed.
* inspector/front-end/Images/resourcesTimeGraphIcon.png: Removed.
* inspector/front-end/Images/scriptsSilhouette.png: Removed.
* inspector/front-end/Images/searchNext.png: Removed.
* inspector/front-end/Images/searchPrev.png: Removed.
* inspector/front-end/Images/searchSmallBlue.png: Removed.
* inspector/front-end/Images/searchSmallBrightBlue.png: Removed.
* inspector/front-end/Images/searchSmallGray.png: Removed.
* inspector/front-end/Images/searchSmallWhite.png: Removed.
* inspector/front-end/Images/segment.png: Removed.
* inspector/front-end/Images/segmentEnd.png: Removed.
* inspector/front-end/Images/segmentHover.png: Removed.
* inspector/front-end/Images/segmentHoverEnd.png: Removed.
* inspector/front-end/Images/segmentSelected.png: Removed.
* inspector/front-end/Images/segmentSelectedEnd.png: Removed.
* inspector/front-end/Images/sessionStorage.png: Removed.
* inspector/front-end/Images/spinner.gif: Removed.
* inspector/front-end/Images/spinnerActive.gif: Removed.
* inspector/front-end/Images/spinnerActiveSelected.gif: Removed.
* inspector/front-end/Images/spinnerInactive.gif: Removed.
* inspector/front-end/Images/spinnerInactiveSelected.gif: Removed.
* inspector/front-end/Images/splitviewDimple.png: Removed.
* inspector/front-end/Images/splitviewDividerBackground.png: Removed.
* inspector/front-end/Images/statusbarButtonGlyphs.png: Removed.
* inspector/front-end/Images/statusbarButtonGlyphs2x.png: Removed.
* inspector/front-end/Images/statusbarResizerHorizontal.png: Removed.
* inspector/front-end/Images/statusbarResizerVertical.png: Removed.
* inspector/front-end/Images/successGreenDot.png: Removed.
* inspector/front-end/Images/thumbActiveHoriz.png: Removed.
* inspector/front-end/Images/thumbActiveVert.png: Removed.
* inspector/front-end/Images/thumbHoriz.png: Removed.
* inspector/front-end/Images/thumbHoverHoriz.png: Removed.
* inspector/front-end/Images/thumbHoverVert.png: Removed.
* inspector/front-end/Images/thumbVert.png: Removed.
* inspector/front-end/Images/tickMark.png: Removed.
* inspector/front-end/Images/timelineHollowPillBlue.png: Removed.
* inspector/front-end/Images/timelineHollowPillGray.png: Removed.
* inspector/front-end/Images/timelineHollowPillGreen.png: Removed.
* inspector/front-end/Images/timelineHollowPillOrange.png: Removed.
* inspector/front-end/Images/timelineHollowPillPurple.png: Removed.
* inspector/front-end/Images/timelineHollowPillRed.png: Removed.
* inspector/front-end/Images/timelineHollowPillYellow.png: Removed.
* inspector/front-end/Images/timelinePillBlue.png: Removed.
* inspector/front-end/Images/timelinePillGray.png: Removed.
* inspector/front-end/Images/timelinePillGreen.png: Removed.
* inspector/front-end/Images/timelinePillOrange.png: Removed.
* inspector/front-end/Images/timelinePillPurple.png: Removed.
* inspector/front-end/Images/timelinePillRed.png: Removed.
* inspector/front-end/Images/timelinePillYellow.png: Removed.
* inspector/front-end/Images/toolbarIcons.png: Removed.
* inspector/front-end/Images/toolbarIconsSmall.png: Removed.
* inspector/front-end/Images/toolbarItemSelected.png: Removed.
* inspector/front-end/Images/trackHoriz.png: Removed.
* inspector/front-end/Images/trackVert.png: Removed.
* inspector/front-end/Images/treeDownTriangleBlack.png: Removed.
* inspector/front-end/Images/treeDownTriangleWhite.png: Removed.
* inspector/front-end/Images/treeRightTriangleBlack.png: Removed.
* inspector/front-end/Images/treeRightTriangleWhite.png: Removed.
* inspector/front-end/Images/treeUpTriangleBlack.png: Removed.
* inspector/front-end/Images/treeUpTriangleWhite.png: Removed.
* inspector/front-end/Images/userInputIcon.png: Removed.
* inspector/front-end/Images/userInputPreviousIcon.png: Removed.
* inspector/front-end/Images/userInputResultIcon.png: Removed.
* inspector/front-end/Images/warningIcon.png: Removed.
* inspector/front-end/Images/warningMediumIcon.png: Removed.
* inspector/front-end/Images/warningOrangeDot.png: Removed.
* inspector/front-end/Images/warningsErrors.png: Removed.
* inspector/front-end/IndexedDBModel.js: Removed.
* inspector/front-end/IndexedDBViews.js: Removed.
* inspector/front-end/InspectElementModeController.js: Removed.
* inspector/front-end/InspectorBackend.js: Removed.
* inspector/front-end/InspectorBackendCommands.qrc: Removed.
* inspector/front-end/InspectorFrontendAPI.js: Removed.
* inspector/front-end/InspectorFrontendHostStub.js: Removed.
* inspector/front-end/InspectorView.js: Removed.
* inspector/front-end/IsolatedFileSystem.js: Removed.
* inspector/front-end/IsolatedFileSystemManager.js: Removed.
* inspector/front-end/JSHeapSnapshot.js: Removed.
* inspector/front-end/JavaScriptFormatter.js: Removed.
* inspector/front-end/JavaScriptSourceFrame.js: Removed.
* inspector/front-end/KeyboardShortcut.js: Removed.
* inspector/front-end/Linkifier.js: Removed.
* inspector/front-end/LiveEditSupport.js: Removed.
* inspector/front-end/MemoryStatistics.js: Removed.
* inspector/front-end/MetricsSidebarPane.js: Removed.
* inspector/front-end/NativeBreakpointsSidebarPane.js: Removed.
* inspector/front-end/NativeHeapSnapshot.js: Removed.
* inspector/front-end/NativeMemoryGraph.js: Removed.
* inspector/front-end/NavigatorOverlayController.js: Removed.
* inspector/front-end/NavigatorView.js: Removed.
* inspector/front-end/NetworkItemView.js: Removed.
* inspector/front-end/NetworkLog.js: Removed.
* inspector/front-end/NetworkManager.js: Removed.
* inspector/front-end/NetworkPanel.js: Removed.
* inspector/front-end/NetworkPanelDescriptor.js: Removed.
* inspector/front-end/NetworkRequest.js: Removed.
* inspector/front-end/NetworkUISourceCodeProvider.js: Removed.
* inspector/front-end/Object.js: Removed.
* inspector/front-end/ObjectPopoverHelper.js: Removed.
* inspector/front-end/ObjectPropertiesSection.js: Removed.
* inspector/front-end/OverridesView.js: Removed.
* inspector/front-end/OverviewGrid.js: Removed.
* inspector/front-end/Panel.js: Removed.
* inspector/front-end/PanelEnablerView.js: Removed.
* inspector/front-end/ParsedURL.js: Removed.
* inspector/front-end/Placard.js: Removed.
* inspector/front-end/Popover.js: Removed.
* inspector/front-end/PresentationConsoleMessageHelper.js: Removed.
* inspector/front-end/ProfileDataGridTree.js: Removed.
* inspector/front-end/ProfileLauncherView.js: Removed.
* inspector/front-end/ProfilesPanel.js: Removed.
* inspector/front-end/ProfilesPanelDescriptor.js: Removed.
* inspector/front-end/Progress.js: Removed.
* inspector/front-end/ProgressIndicator.js: Removed.
* inspector/front-end/PropertiesSection.js: Removed.
* inspector/front-end/PropertiesSidebarPane.js: Removed.
* inspector/front-end/RawSourceCode.js: Removed.
* inspector/front-end/RemoteObject.js: Removed.
* inspector/front-end/RequestCookiesView.js: Removed.
* inspector/front-end/RequestHTMLView.js: Removed.
* inspector/front-end/RequestHeadersView.js: Removed.
* inspector/front-end/RequestJSONView.js: Removed.
* inspector/front-end/RequestPreviewView.js: Removed.
* inspector/front-end/RequestResponseView.js: Removed.
* inspector/front-end/RequestTimingView.js: Removed.
* inspector/front-end/RequestView.js: Removed.
* inspector/front-end/Resource.js: Removed.
* inspector/front-end/ResourceScriptMapping.js: Removed.
* inspector/front-end/ResourceTreeModel.js: Removed.
* inspector/front-end/ResourceType.js: Removed.
* inspector/front-end/ResourceUtils.js: Removed.
* inspector/front-end/ResourceView.js: Removed.
* inspector/front-end/ResourceWebSocketFrameView.js: Removed.
* inspector/front-end/ResourcesPanel.js: Removed.
* inspector/front-end/RevisionHistoryView.js: Removed.
* inspector/front-end/RuntimeModel.js: Removed.
* inspector/front-end/SASSSourceMapping.js: Removed.
* inspector/front-end/ScopeChainSidebarPane.js: Removed.
* inspector/front-end/Script.js: Removed.
* inspector/front-end/ScriptFormatter.js: Removed.
* inspector/front-end/ScriptFormatterWorker.js: Removed.
* inspector/front-end/ScriptSnippetModel.js: Removed.
* inspector/front-end/ScriptsNavigator.js: Removed.
* inspector/front-end/ScriptsPanel.js: Removed.
* inspector/front-end/ScriptsPanelDescriptor.js: Removed.
* inspector/front-end/ScriptsSearchScope.js: Removed.
* inspector/front-end/SearchController.js: Removed.
* inspector/front-end/Section.js: Removed.
* inspector/front-end/Settings.js: Removed.
* inspector/front-end/SettingsScreen.js: Removed.
* inspector/front-end/ShortcutsScreen.js: Removed.
* inspector/front-end/ShowMoreDataGridNode.js: Removed.
* inspector/front-end/SidebarOverlay.js: Removed.
* inspector/front-end/SidebarPane.js: Removed.
* inspector/front-end/SidebarTreeElement.js: Removed.
* inspector/front-end/SidebarView.js: Removed.
* inspector/front-end/SimpleWorkspaceProvider.js: Removed.
* inspector/front-end/SnippetJavaScriptSourceFrame.js: Removed.
* inspector/front-end/SnippetStorage.js: Removed.
* inspector/front-end/SoftContextMenu.js: Removed.
* inspector/front-end/SourceCSSTokenizer.js: Removed.
* inspector/front-end/SourceCSSTokenizer.re2js: Removed.
* inspector/front-end/SourceFrame.js: Removed.
* inspector/front-end/SourceHTMLTokenizer.js: Removed.
* inspector/front-end/SourceHTMLTokenizer.re2js: Removed.
* inspector/front-end/SourceJavaScriptTokenizer.js: Removed.
* inspector/front-end/SourceJavaScriptTokenizer.re2js: Removed.
* inspector/front-end/SourceMap.js: Removed.
* inspector/front-end/SourceMapping.js: Removed.
* inspector/front-end/SourceTokenizer.js: Removed.
* inspector/front-end/Spectrum.js: Removed.
* inspector/front-end/SplitView.js: Removed.
* inspector/front-end/StatusBarButton.js: Removed.
* inspector/front-end/StyleSheetOutlineDialog.js: Removed.
* inspector/front-end/StylesSidebarPane.js: Removed.
* inspector/front-end/StylesSourceMapping.js: Removed.
* inspector/front-end/SuggestBox.js: Removed.
* inspector/front-end/TabbedEditorContainer.js: Removed.
* inspector/front-end/TabbedPane.js: Removed.
* inspector/front-end/TestController.js: Removed.
* inspector/front-end/TextEditor.js: Removed.
* inspector/front-end/TextEditorHighlighter.js: Removed.
* inspector/front-end/TextEditorModel.js: Removed.
* inspector/front-end/TextPrompt.js: Removed.
* inspector/front-end/TextUtils.js: Removed.
* inspector/front-end/TimelineFrameController.js: Removed.
* inspector/front-end/TimelineGrid.js: Removed.
* inspector/front-end/TimelineManager.js: Removed.
* inspector/front-end/TimelineModel.js: Removed.
* inspector/front-end/TimelineOverviewPane.js: Removed.
* inspector/front-end/TimelinePanel.js: Removed.
* inspector/front-end/TimelinePanelDescriptor.js: Removed.
* inspector/front-end/TimelinePresentationModel.js: Removed.
* inspector/front-end/Toolbar.js: Removed.
* inspector/front-end/TopDownProfileDataGridTree.js: Removed.
* inspector/front-end/UISourceCode.js: Removed.
* inspector/front-end/UISourceCodeFrame.js: Removed.
* inspector/front-end/UIString.js: Removed.
* inspector/front-end/UIUtils.js: Removed.
* inspector/front-end/UglifyJS/parse-js.js: Removed.
* inspector/front-end/UserAgentSupport.js: Removed.
* inspector/front-end/UserMetrics.js: Removed.
* inspector/front-end/View.js: Removed.
* inspector/front-end/ViewportControl.js: Removed.
* inspector/front-end/WatchExpressionsSidebarPane.js: Removed.
* inspector/front-end/WebKit.qrc: Removed.
* inspector/front-end/WorkerManager.js: Removed.
* inspector/front-end/WorkersSidebarPane.js: Removed.
* inspector/front-end/Workspace.js: Removed.
* inspector/front-end/ace/LICENSE.txt: Removed.
* inspector/front-end/ace/ace.js: Removed.
* inspector/front-end/ace/acedevtools.css: Removed.
* inspector/front-end/ace/mode_css.js: Removed.
* inspector/front-end/ace/mode_html.js: Removed.
* inspector/front-end/ace/mode_javascript.js: Removed.
* inspector/front-end/ace/theme_textmate.js: Removed.
* inspector/front-end/auditsPanel.css: Removed.
* inspector/front-end/breadcrumbList.css: Removed.
* inspector/front-end/breakpointsList.css: Removed.
* inspector/front-end/buildSystemOnly.js: Removed.
* inspector/front-end/canvasProfiler.css: Removed.
* inspector/front-end/cm/LICENSE: Removed.
* inspector/front-end/cm/closebrackets.js: Removed.
* inspector/front-end/cm/cmdevtools.css: Removed.
* inspector/front-end/cm/codemirror.css: Removed.
* inspector/front-end/cm/codemirror.js: Removed.
* inspector/front-end/cm/css.js: Removed.
* inspector/front-end/cm/htmlmixed.js: Removed.
* inspector/front-end/cm/javascript.js: Removed.
* inspector/front-end/cm/matchbrackets.js: Removed.
* inspector/front-end/cm/xml.js: Removed.
* inspector/front-end/cssNamedFlows.css: Removed.
* inspector/front-end/dataGrid.css: Removed.
* inspector/front-end/dialog.css: Removed.
* inspector/front-end/elementsPanel.css: Removed.
* inspector/front-end/externs.js: Removed.
* inspector/front-end/filteredItemSelectionDialog.css: Removed.
* inspector/front-end/flameChart.css: Removed.
* inspector/front-end/heapProfiler.css: Removed.
* inspector/front-end/helpScreen.css: Removed.
* inspector/front-end/indexedDBViews.css: Removed.
* inspector/front-end/inspector.css: Removed.
* inspector/front-end/inspector.html: Removed.
* inspector/front-end/inspector.js: Removed.
* inspector/front-end/inspectorCommon.css: Removed.
* inspector/front-end/inspectorSyntaxHighlight.css: Removed.
* inspector/front-end/jsdifflib.js: Removed.
* inspector/front-end/navigatorView.css: Removed.
* inspector/front-end/networkLogView.css: Removed.
* inspector/front-end/networkPanel.css: Removed.
* inspector/front-end/panelEnablerView.css: Removed.
* inspector/front-end/popover.css: Removed.
* inspector/front-end/profilesPanel.css: Removed.
* inspector/front-end/resourceView.css: Removed.
* inspector/front-end/resourcesPanel.css: Removed.
* inspector/front-end/revisionHistory.css: Removed.
* inspector/front-end/scriptsPanel.css: Removed.
* inspector/front-end/sidebarPane.css: Removed.
* inspector/front-end/spectrum.css: Removed.
* inspector/front-end/splitView.css: Removed.
* inspector/front-end/tabbedPane.css: Removed.
* inspector/front-end/test-runner.html: Removed.
* inspector/front-end/textEditor.css: Removed.
* inspector/front-end/textPrompt.css: Removed.
* inspector/front-end/timelinePanel.css: Removed.
* inspector/front-end/treeoutline.js: Removed.
* inspector/front-end/utilities.js: Removed.
2013-10-10 Marcelo Morais <m.morais@samsung.com>
Web Inspector: Remove the old front-end from WebKit
https://bugs.webkit.org/show_bug.cgi?id=122295
Reviewed by Timothy Hatcher.
Updating the project files to remove all references from the old
inspector front-end.
* WebCore.vcxproj/WebCore.vcxproj: Removed the references for the old
inspector front-end.
* WebCore.vcxproj/WebCore.vcxproj.filters: Ditto.
* WebCore.xcodeproj/project.pbxproj: Ditto.
* inspector/compile-front-end.py: Removed.
2013-10-10 Ryuan Choi <ryuan.choi@samsung.com>
Unreviewed build fix with ENABLE_DEVICE_ORIENTATION after r157215
Now, impl() return reference instead of a pointer.
* bindings/js/JSDeviceMotionEventCustom.cpp:
(WebCore::JSDeviceMotionEvent::acceleration):
(WebCore::JSDeviceMotionEvent::accelerationIncludingGravity):
(WebCore::JSDeviceMotionEvent::rotationRate):
(WebCore::JSDeviceMotionEvent::interval):
(WebCore::JSDeviceMotionEvent::initDeviceMotionEvent):
* bindings/js/JSDeviceOrientationEventCustom.cpp:
(WebCore::JSDeviceOrientationEvent::alpha):
(WebCore::JSDeviceOrientationEvent::beta):
(WebCore::JSDeviceOrientationEvent::gamma):
(WebCore::JSDeviceOrientationEvent::absolute):
(WebCore::JSDeviceOrientationEvent::initDeviceOrientationEvent):
2013-10-10 Thiago de Barros Lacerda <thiago.lacerda@openbossa.org>
[MediaStream API] update MediaStream object to match spec
https://bugs.webkit.org/show_bug.cgi?id=121939
Reviewed by Jer Noble.
Test: fast/mediastream/MediaStream-clone.html
* Modules/mediastream/MediaStream.cpp:
(WebCore::MediaStream::MediaStream):
(WebCore::MediaStream::ended):
(WebCore::MediaStream::clone):
(WebCore::MediaStream::cloneMediaStreamTrackVector):
(WebCore::MediaStream::contextDestroyed):
(WebCore::MediaStream::scheduledEventTimerFired):
* Modules/mediastream/MediaStream.h:
* Modules/mediastream/MediaStream.idl:
2013-10-10 Beth Dakin <bdakin@apple.com>
Calling setUsePresentationValue on MountainLion results in unrecognized selector
warnings
https://bugs.webkit.org/show_bug.cgi?id=122624
Reviewed by Tim Horton.
Only call setUsePresentationValue if the scrollbar supports updates on a secondary
thread.
* platform/mac/ScrollAnimatorMac.mm:
(-[WebScrollbarPainterDelegate scrollerImp:animateKnobAlphaTo:duration:]):
2013-10-10 Seokju Kwon <seokju@webkit.org>
Unreviewed build fix after r157250
* dom/EventDispatcher.cpp:
(WebCore::EventDispatcher::dispatchEvent):
2013-10-10 Thiago de Barros Lacerda <thiago.lacerda@openbossa.org>
Create MediaStream object with ended attribute set if all tracks that are being used on its creation are ended
https://bugs.webkit.org/show_bug.cgi?id=122358
Reviewed by Jer Noble.
Spec tells that if all tracks that belongs to a new MediaStream object being created are ended,
then the ended attribute of this MediaStream must be set to true.
http://www.w3.org/TR/mediacapture-streams/#widl-MediaStream-ended
Since there is no port supporting MediaStream yet, we are skipping this test for now.
Test: fast/mediastream/MediaStream-construct-with-ended-tracks.html
* Modules/mediastream/MediaStream.cpp:
(WebCore::createFromSourceVectors):
(WebCore::MediaStream::create):
* Modules/webaudio/MediaStreamAudioDestinationNode.cpp:
(WebCore::MediaStreamAudioDestinationNode::MediaStreamAudioDestinationNode):
* platform/mediastream/MediaStreamDescriptor.cpp:
(WebCore::MediaStreamDescriptor::create):
(WebCore::MediaStreamDescriptor::MediaStreamDescriptor):
* platform/mediastream/MediaStreamDescriptor.h:
* platform/mock/MockMediaStreamCenter.cpp:
(WebCore::MockMediaStreamCenter::createMediaStream):
2013-10-10 Andy Estes <aestes@apple.com>
Add SPI for telling WebKit to prefer pictograph glyphs over monochrome ones
https://bugs.webkit.org/show_bug.cgi?id=122608
Reviewed by Dan Bernstein.
Based on patches by Dan Bernstein.
Test: fonts/font-fallback-prefers-pictographs.html
Created a mechanism to append a font to the end of a font's fallback
list, before the system fallback list. This mechanism is used when
Settings::fontFallbackPrefersPictographs() is true to insert a
pictograph font ahead of a monochrome one from the system fallback list.
* WebCore.exp.in: Moved
__ZN7WebCore8Settings33setFontFallbackPrefersPictographsEb outside of
an iOS platform guard.
* css/CSSFontSelector.cpp:
(WebCore::CSSFontSelector::fallbackFontDataCount): Retuned 1 if
pictograph fonts are preferred.
(WebCore::CSSFontSelector::getFallbackFontData): Returned the
pictograph font's FontData if it is preferred.
* css/CSSFontSelector.h:
* page/Settings.cpp:
(WebCore::Settings::Settings): Initialized
m_fontFallbackPrefersPictographs to false.
(WebCore::Settings::setFontFallbackPrefersPictographs): Set
m_fontFallbackPrefersPictographs and called
Page::setNeedsRecalcStyleInAllFrames().
* page/Settings.h:
(WebCore::Settings::fontFallbackPrefersPictographs):
* platform/graphics/FontGlyphs.cpp:
(WebCore::FontGlyphs::realizeFontDataAt): Realized the selector's
fallback font if necessary.
* platform/graphics/FontSelector.h:
* style/StyleResolveTree.cpp:
(WebCore::Style::resolveTree): Removed iOS platform guards.
* testing/InternalSettings.cpp:
(WebCore::InternalSettings::setFontFallbackPrefersPictographs): Set the
corresponding WebCore::Setting.
* testing/InternalSettings.h: Defined an internal setting for the test.
* testing/InternalSettings.idl: Ditto.
2013-10-10 Sergio Correia <sergio.correia@openbossa.org>
Remove unused attribute in CoordinatedTile class
https://bugs.webkit.org/show_bug.cgi?id=122619
Reviewed by Noam Rosenthal.
No new tests, covered by existing ones.
* platform/graphics/texmap/coordinated/CoordinatedTile.h: Remove
m_localBuffer.
2013-10-10 Beth Dakin <bdakin@apple.com>
Scrollbars are updated on the main thread rather than the scrolling thread
(causing scroll bars not to appear/update quickly in some cases)
https://bugs.webkit.org/show_bug.cgi?id=122585
-and corresponding-
<rdar://problem/10710775>
Reviewed by Simon Fraser.
This patch does a few things in order to allow scrollbars to be updated on the
scrolling thread:
1. This patch adds the ability to know if the lower-level APIs necessary to get
this to work right are available, AND if the content is actually capable of taking
advantage of this feature. This is currently implemented as
Scrollbar::supportsUpdateOnSecondaryThread() which makes use of a new
ScrollableArea function called updatesScrollLayerPositionOnMainThread()
2. To update on the scrolling thread, the scrolling tree needs to know about the
ScrollbarPainters.
3. Once it knows about them, it should update the presentation value whenever the
layer position changes.
4. Presentation value is basically the same thing as double value. There is a bit
of code we maintain currently to compute that. This patch moves that code to a
static function on ScrollableArea that can be called from both the main thread and
the scrolling thread.
5. ScrollbarPainter API needs to know about the layers we have created for the
vertical and horizontal scrollbars, then they will use those layers and the
presentation value that we set on the scrolling thread to move the layers around.
This is part of #1 above.
* page/FrameView.cpp:
(WebCore::FrameView::updatesScrollLayerPositionOnMainThread):
* page/FrameView.h:
This is part of #2. ScrollingStateScrollingNodes now have vertical and horizontal
ScrollbarPainters for Mac only.
* page/scrolling/ScrollingStateScrollingNode.cpp:
(WebCore::ScrollingStateScrollingNode::ScrollingStateScrollingNode):
* page/scrolling/ScrollingStateScrollingNode.h:
(WebCore::ScrollingStateScrollingNode::verticalScrollbarPainter):
(WebCore::ScrollingStateScrollingNode::horizontalScrollbarPainter):
Also part of #2. Make sure to set the ScrollbarPainters for scrolling nodes when
appropriate.
* page/scrolling/mac/ScrollingCoordinatorMac.h:
* page/scrolling/mac/ScrollingCoordinatorMac.mm:
(WebCore::ScrollingCoordinatorMac::frameViewLayoutUpdated):
Implement this function that was just stubbed out before. This is part of #5 in
that is will allow the ScrollbarPainter API to know about any layer changes.
(WebCore::ScrollingCoordinatorMac::scrollableAreaScrollbarLayerDidChange):
Back to #2, making sure we properly set the ScrollbarPainters to send over to the
scrolling thread.
(WebCore::ScrollingCoordinatorMac::setScrollbarPaintersForNode):
* page/scrolling/mac/ScrollingStateScrollingNodeMac.mm:
(WebCore::ScrollingStateScrollingNode::setScrollbarPainters):
This code achieves #3. It uses new ScrollbarPainter API to adjust the position of
the scrollbars from the scrolling thread.
* page/scrolling/mac/ScrollingTreeScrollingNodeMac.h:
* page/scrolling/mac/ScrollingTreeScrollingNodeMac.mm:
(WebCore::ScrollingTreeScrollingNodeMac::ScrollingTreeScrollingNodeMac):
(WebCore::ScrollingTreeScrollingNodeMac::updateBeforeChildren):
(WebCore::ScrollingTreeScrollingNodeMac::setScrollLayerPosition):
This is for #5. ScrollbarPainter needs to know about our scrollbar layers.
* platform/ScrollAnimator.h:
(WebCore::ScrollAnimator::verticalScrollbarLayerDidChange):
(WebCore::ScrollAnimator::horizontalScrollbarLayerDidChange):
* platform/ScrollableArea.cpp:
(WebCore::ScrollableArea::verticalScrollbarLayerDidChange):
(WebCore::ScrollableArea::horizontalScrollbarLayerDidChange):
This is for #4. This code computes the scrollbars value and current overhang
amount.
(WebCore::ScrollableArea::computeScrollbarValueAndOverhang):
* platform/ScrollableArea.h:
(WebCore::ScrollableArea::layerForHorizontalScrollbar):
(WebCore::ScrollableArea::layerForVerticalScrollbar):
(WebCore::ScrollableArea::layerForScrolling):
This is for #1. We need to know if we have the ability to update scrollbars on a
different thread. We can do that only on certain versions of the OS, only when
threaded scrolling is enabled, and only when the current page is actually using
the scrolling thread to scroll.
* platform/Scrollbar.cpp:
(WebCore::Scrollbar::supportsUpdateOnSecondaryThread):
* platform/Scrollbar.h:
* platform/ScrollbarThemeClient.h:
New ScrollbarPainter APIs.
* platform/mac/NSScrollerImpDetails.h:
This is for #5, letting the ScrollbarPainter API know about the layers.
* platform/mac/ScrollAnimatorMac.h:
* platform/mac/ScrollAnimatorMac.mm:
(-[WebScrollbarPainterDelegate layer]):
(-[WebScrollbarPainterDelegate convertRectToLayer:]):
(-[WebScrollbarPainterDelegate shouldUseLayerPerPartForScrollerImp:]):
Before we kick off a scroll animation, set the current painting characteristics so
they are up-to-date in case we are scrolling on the scrolling thread.
(-[WebScrollbarPainterDelegate setUpAlphaAnimation:scrollerPainter:part:WebCore::animateAlphaTo:duration:]):
(-[WebScrollbarPainterDelegate scrollerImp:animateKnobAlphaTo:duration:]):
(-[WebScrollbarPainterDelegate scrollerImp:animateTrackAlphaTo:duration:]):
(WebCore::ScrollAnimatorMac::didAddVerticalScrollbar):
(WebCore::ScrollAnimatorMac::didAddHorizontalScrollbar):
(WebCore::ScrollAnimatorMac::verticalScrollbarLayerDidChange):
(WebCore::ScrollAnimatorMac::horizontalScrollbarLayerDidChange):
Only paint the scrollbars through ScrollbarThemeMac if they are NOT being updated
by the scrolling thread.
* platform/mac/ScrollbarThemeMac.h:
* platform/mac/ScrollbarThemeMac.mm:
(WebCore::ScrollbarThemeMac::setCurrentPaintCharacteristics):
(WebCore::scrollbarPainterPaint):
(WebCore::ScrollbarThemeMac::paint):
Back to #1.
* rendering/RenderLayer.cpp:
(WebCore::RenderLayer::updatesScrollLayerPositionOnMainThread):
* rendering/RenderLayer.h:
* rendering/RenderLayerCompositor.cpp:
(WebCore::RenderLayerCompositor::updateOverflowControlsLayers):
* rendering/RenderListBox.h:
2013-10-10 Brent Fulgham <bfulgham@apple.com>
[Win] Unreviewed build fix after r157228
The changes in r157228 trigger a bug in VS2010. This patch works around the compiler bug
to allow this platform to build.
* dom/Range.cpp: Move implementation to header file.
* dom/Range.h: Inline the method.
* page/DOMWindow.cpp:
(WebCore::DOMWindow::open): Add stub method (with pointer arguments) to call the real
method with references.
* page/DOMWindow.h: Declare stub method taking pointer arguments to avoid compiler bug.
* testing/Internals.cpp:
(WebCore::Internals::openDummyInspectorFrontend): Use work-around method when building under
the buggy version of Visual Studio.
2013-10-10 Ryosuke Niwa <rniwa@webkit.org>
Make all functions of EventDispatcher static
https://bugs.webkit.org/show_bug.cgi?id=122591
Reviewed by Antti Koivisto.
Now that EventDispatchMediator is gone, we don't have to have an EventDispatcher object.
Turn EventDispatcher into an empty class with a bunch of static functions.
We can convert it to a namespace or whatever later.
* dom/EventDispatcher.cpp:
(WebCore::EventDispatcher::dispatchSimulatedClick):
(WebCore::EventDispatcher::dispatchEvent):
* dom/EventDispatcher.h:
2013-10-10 Sergio Correia <sergio.correia@openbossa.org>
Convert some OwnPtr/PassOwnPtr in CoordinatedGraphics code to std::unique_ptr's
https://bugs.webkit.org/show_bug.cgi?id=122614
Reviewed by Anders Carlsson.
No new tests, covered by existing ones.
* platform/graphics/texmap/coordinated/CompositingCoordinator.cpp:
(WebCore::CompositingCoordinator::paintToSurface):
(WebCore::CompositingCoordinator::releaseInactiveAtlasesTimerFired):
* platform/graphics/texmap/coordinated/CompositingCoordinator.h:
* platform/graphics/texmap/coordinated/CoordinatedGraphicsLayer.cpp:
(WebCore::CoordinatedGraphicsLayer::adjustContentsScale):
(WebCore::CoordinatedGraphicsLayer::createBackingStore):
(WebCore::CoordinatedGraphicsLayer::updateContentBuffers):
(WebCore::CoordinatedGraphicsLayer::purgeBackingStores):
* platform/graphics/texmap/coordinated/CoordinatedGraphicsLayer.h:
* platform/graphics/texmap/coordinated/CoordinatedGraphicsScene.cpp:
(WebCore::CoordinatedGraphicsScene::createLayer):
(WebCore::CoordinatedGraphicsScene::deleteLayer):
(WebCore::CoordinatedGraphicsScene::ensureRootLayer):
(WebCore::CoordinatedGraphicsScene::purgeGLResources):
* platform/graphics/texmap/coordinated/CoordinatedGraphicsScene.h:
* platform/graphics/texmap/coordinated/ThreadSafeCoordinatedSurface.cpp:
(WebCore::ThreadSafeCoordinatedSurface::ThreadSafeCoordinatedSurface):
* platform/graphics/texmap/coordinated/ThreadSafeCoordinatedSurface.h:
* platform/graphics/texmap/coordinated/UpdateAtlas.cpp:
(WebCore::UpdateAtlas::buildLayoutIfNeeded):
(WebCore::UpdateAtlas::didSwapBuffers):
* platform/graphics/texmap/coordinated/UpdateAtlas.h:
(WebCore::UpdateAtlas::isInUse):
2013-10-10 Roger Fong <roger_fong@apple.com>
Validate uniform input when setting texture sampler uniforms.
https://bugs.webkit.org/show_bug.cgi?id=122610.
Reviewed by Dean Jackson.
Covered by Khronos Conformance Suite 1.0.2.
Specifically, conformance/uniforms/uniform-samplers-test.html.
* html/canvas/WebGLRenderingContext.cpp:
(WebCore::WebGLRenderingContext::uniform1i):
(WebCore::WebGLRenderingContext::uniform1iv):
2013-10-10 Roger Fong <roger_fong@apple.com>
Store uniform type information in WebGLUniformationLocation.
https://bugs.webkit.org/show_bug.cgi?id=122607.
Reviewed by Dean Jackson.
Covered by Khronos Conformance Suite 1.0.2.
* html/canvas/WebGLRenderingContext.cpp:
(WebCore::WebGLRenderingContext::getUniform):
(WebCore::WebGLRenderingContext::getUniformLocation):
* html/canvas/WebGLUniformLocation.cpp:
(WebCore::WebGLUniformLocation::create):
(WebCore::WebGLUniformLocation::WebGLUniformLocation):
(WebCore::WebGLUniformLocation::type):
* html/canvas/WebGLUniformLocation.h:
2013-10-10 Ryosuke Niwa <rniwa@webkit.org>
REGRESSION(r157203): WebKit crashes after dispatching gesture event
https://bugs.webkit.org/show_bug.cgi?id=122615
Reviewed by Anders Carlsson.
Don't release the event until the end of the function where we call member functions on it.
* dom/Node.cpp:
(WebCore::Node::dispatchGestureEvent):
2013-10-10 Ryosuke Niwa <rniwa@webkit.org>
Move the rest of EventRetargeter functions to EventPath
https://bugs.webkit.org/show_bug.cgi?id=122586
Reviewed by Andreas Kling.
Moved the rest of EventRetargeter functiosn either static local or EventPath member functions.
* dom/EventDispatcher.cpp:
(WebCore::EventDispatcher::dispatchScopedEvent):
(WebCore::EventDispatcher::dispatch):
(WebCore::EventDispatcher::dispatchEventPostProcess):
* dom/EventDispatcher.h:
* dom/EventRetargeter.cpp:
(WebCore::EventPath::EventPath):
(WebCore::calculateAdjustedNodes): Made static local. Also takes const EventPath and returns the size
to which EventPath should be shrunk; this allows us to remove EventPath::shrink.
(WebCore::updateTouchListsInEventPath): Moved and renamed from EventRetargeter::adjustTouchList.
(WebCore::EventPath::updateTouchLists): Moved and renamed from EventRetargeter::adjustForTouchEvent.
(WebCore::EventPath::setRelatedTarget): Moved.
* dom/EventRetargeter.h:
(WebCore::eventTargetRespectingTargetRules): Renamed from EventRetargeter::eventTargetRespectingTargetRules.
2013-10-10 Mark Rowe <mrowe@apple.com>
<rdar://problem/13341666> WebKit should always build against an SDK.
Have all projects default to building against the OS X Internal SDK for the Production
configuration. For the Debug and Release configurations, look for UseInternalSDK.xcconfig
to determine whether the OS X Internal SDK should be used. If not, use the normal OS X SDK.
Reviewed by Dan Bernstein.
* Configurations/Base.xcconfig:
* Configurations/DebugRelease.xcconfig:
2013-10-10 Hans Muller <hmuller@adobe.com>
[CSS Shapes] clampToUnsigned() should return unsigned, not int
https://bugs.webkit.org/show_bug.cgi?id=122601
Reviewed by Andreas Kling.
Corrected the return type for clampToUnsigned() in MathExtras.h. It's now unsigned.
No new tests since this is just an internal refactoring of existing code.
* rendering/shapes/RasterShape.cpp:
(WebCore::RasterShape::marginIntervals): Use the redefined clampToUnsigned method.
2013-10-10 Bem Jones-Bey <bjonesbe@adobe.com>
[CSS Shapes] New positioning model: Shape cropped to margin box
https://bugs.webkit.org/show_bug.cgi?id=118092
Reviewed by Alexandru Chiculita.
Clip the shape to the margin box when it extends out the left or right
edges. Also added a few local variables to make the code easier to
read.
Tests: csswg/contributors/adobe/submitted/shapes/shape-outside/shape-outside-floats-clipped-001-ref.html
csswg/contributors/adobe/submitted/shapes/shape-outside/shape-outside-floats-clipped-004.html
csswg/contributors/adobe/submitted/shapes/shape-outside/shape-outside-floats-clipped-005.html
csswg/contributors/adobe/submitted/shapes/shape-outside/shape-outside-floats-clipped-006.html
* rendering/shapes/ShapeOutsideInfo.cpp:
(WebCore::ShapeOutsideInfo::updateDeltasForContainingBlockLine):
2013-10-10 Daniel Bates <dabates@apple.com>
Avoid resizing the internal buffer of SharedBuffer when creating a PurgeableBuffer
https://bugs.webkit.org/show_bug.cgi?id=122516
Reviewed by Darin Adler.
Currently when we create a PurgeableBuffer from a SharedBuffer we may
resize the internal buffer of the SharedBuffer so that it can fit the
concatenated contents of all of its segments before copying this
internal buffer to the internal buffer of the PurgeableBuffer. Instead,
we can avoid resizing the internal buffer of SharedBuffer by allocating
a PurgeableBuffer and then copying the internal buffer of SharedBuffer
and its segments directly into it.
* platform/PurgeableBuffer.h:
(WebCore::PurgeableBuffer::createUninitialized): Add inline implementation
when building with ENABLE_PURGEABLE_MEMORY disabled.
* platform/SharedBuffer.cpp:
(WebCore::SharedBuffer::createPurgeableBuffer): Implemented in terms of
SharedBuffer::{copyBufferAndClear, createUninitialized}().
(WebCore::SharedBuffer::copyBufferAndClear): Added.
(WebCore::SharedBuffer::buffer): Moved logic to copy segments/data array to
SharedBuffer::copyBufferAndClear() and modified this function to use it.
* platform/SharedBuffer.h:
* platform/cf/SharedBufferCF.cpp:
(WebCore::SharedBuffer::copyBufferAndClear): Renamed; formerly called SharedBuffer::copyDataArrayAndClear.
* platform/mac/PurgeableBufferMac.cpp:
(WebCore::allocatePurgeableBuffer): Added.
(WebCore::PurgeableBuffer::createUninitialized): Added.
(WebCore::PurgeableBuffer::create): Moved logic to allocate a purgeable buffer into
PurgeableBuffer::createUninitialized() and modified this function to use it.
2013-10-09 Chris Fleizach <cfleizach@apple.com>
AX: VoiceOver speaking too much when group elements with tabindex=-1 are used
https://bugs.webkit.org/show_bug.cgi?id=122574
Reviewed by Mario Sanchez Prada.
Tests: accessibility/negative-tabindex-does-not-expose-label.html
Elements that expose tabindex=-1 are being identified as generic focusable elements for accessibility.
Which among other things, determines whether to create an accessible name for the object.
This has the negative effect of causing VoiceOver to speak way too much information when navigating inside
a <div> with this attribute.
* accessibility/AccessibilityNodeObject.cpp:
(WebCore::AccessibilityNodeObject::visibleText):
(WebCore::AccessibilityNodeObject::title):
2013-10-10 Andreas Kling <akling@apple.com>
Remove custom finalizer for Node JS wrappers.
<https://webkit.org/b/122603>
Reviewed by Geoff Garen.
Node can just use the auto-generated finalizer, the custom one was
identical to what the generator would output.
2013-10-10 Andreas Kling <akling@apple.com>
CTTE: activeDOMWindow() and firstDOMWindow() should return references.
<https://webkit.org/b/122598>
Reviewed by Anders Carlsson.
Now that wrappers vend references to their WebCore objects, follow
up and make these two return references as well.
2013-10-10 Mario Sanchez Prada <mario.prada@samsung.com>
[ATK] Missing checks in returnIfWebKitAccessibleIsInvalid
https://bugs.webkit.org/show_bug.cgi?id=122600
Reviewed by Chris Fleizach.
Check that the AccessibilityObject associated to the ATK wrapper
is not NULL and contains a valid reference to the document before
calling AccessibilityObject::updateBackingStore().
* accessibility/atk/WebKitAccessibleUtil.h: Add extra checks.
2013-10-10 Andreas Kling <akling@apple.com>
Clean up JSDOMWindowShell a little.
<https://webkit.org/b/122599>
Reviewed by Anders Carlsson.
- Have impl() return a DOMWindow& instead of a pointer.
- Store the DOMWrapperWorld in a Ref instead of a RefPtr.
- Reuse TRY_TO_UNWRAP_WITH_INTERFACE in EventTarget bindings.
2013-10-10 Sergio Correia <sergio.correia@openbossa.org>
Make XPathGrammar.y bison3-friendly again after r157205
https://bugs.webkit.org/show_bug.cgi?id=122595
Reviewed by Anders Carlsson.
No new tests, build fix.
* xml/XPathGrammar.y: Replace YYLEX_PARAM with %lex-param, as the
former was removed in bison3.
2013-10-10 Andreas Kling <akling@apple.com>
SVGUseElement: Use iterative traversal to find disallowed elements.
<https://webkit.org/b/122596>
Reviewed by Antti Koivisto.
Rewrote subtreeContainsDisallowedElement() in SVGUseElement.cpp to
use iterative traversal with descendantsOfType<Element> instead of
recursing through the tree.
2013-10-10 Andreas Kling <akling@apple.com>
Move RenderObject::layout() to RenderElement.
<https://webkit.org/b/122537>
Reviewed by Antti Koivisto.
RenderText will ASSERT_NOT_REACHED() in its layout(), so move this
to RenderElement. This allows us to use the fast firstChild()
instead of virtual dispatch.
The needsLayout() bit remains on RenderObject for now. Moving that
to RenderElement is a far more involved change.
2013-10-10 Chris Fleizach <cfleizach@apple.com>
AX: Crash at WebCore::accessibleNameForNode when visiting Facebook
https://bugs.webkit.org/show_bug.cgi?id=122572
Reviewed by Mario Sanchez Prada.
Test: accessibility/aria-labeled-with-hidden-node.html
Handle the case where aria-labelledby references a non-rendered node.
* accessibility/AccessibilityNodeObject.cpp:
(WebCore::accessibleNameForNode):
2013-10-10 Zan Dobersek <zdobersek@igalia.com>
REGRESSION(r157210): Crashes in WebCore::ScopedEventQueue::dispatchEvent for platforms using GCC
https://bugs.webkit.org/show_bug.cgi?id=122592
Reviewed by Gustavo Noronha Silva.
* dom/ScopedEventQueue.cpp:
(WebCore::ScopedEventQueue::dispatchEvent): When calling EventDispatcher::dispatchEvent(), the GCC-compiled code
first creates a copy of the PassRefPtr<Event> object that's being passed into the method call. The copy will be used
in that method while the original is left with a null pointer. Only after that is the original queried for its pointer
while trying to get the Event's target, resulting in a crash due to calling the Event::target() on a null pointer.
To avoid it, pass a naked Event pointer to the method call. This will create a new PassRefPtr object without nullifying
the original one.
2013-10-10 Andreas Kling <akling@apple.com>
Use more Element iterators in SVG code.
<http://webkit.org/b/121127>
Reviewed by Antti Koivisto.
Use childrenOfType to iterate over only SVGElement (or even more
specific) children in a bunch of places.
Also auto-generate type helpers for SVGElement and SVGStopElement.
2013-10-10 Andreas Kling <akling@apple.com>
JS DOM wrappers' impl() functions should return references.
<https://webkit.org/b/122497>
Reviewed by Antti Koivisto.
JS DOM wrappers always have a corresponding WebCore object during
their lifetime, so make impl() return a reference.
2013-10-10 Sergio Correia <sergio.correia@openbossa.org>
Fix debug build after r157210
https://bugs.webkit.org/show_bug.cgi?id=122593
Reviewed by Andreas Kling.
No new tests, build fix.
* dom/EventContext.cpp:
(WebCore::TouchEventContext::handleLocalEvents): Fix ASSERT, now that
event is a reference instead of a pointer.
2013-10-10 Andreas Kling <akling@apple.com>
Tighten some renderer access in Document.
<https://webkit.org/b/121865>
Reviewed by Antti Koivisto.
A bit of Node/Element and RenderObject/RenderElement tightening.
2013-10-08 Andreas Kling <akling@apple.com>
rangeOfContents() should take a Node&.
<https://webkit.org/b/122438>
Reviewed by Darin Adler.
All callers of rangeOfContents() either have a Node& already,
or do some kind of null-checking before calling it.
2013-10-08 Sergio Villar Senin <svillar@igalia.com>
[CSS Grid Layout] Implement support for grid-template
https://bugs.webkit.org/show_bug.cgi?id=103313
Reviewed by Dean Jackson.
Based on Blink r153427, r155199 and r155712 by <jchaffraix@chromium.org>
Test: fast/css-grid-layout/grid-template-get-set.html
Recognize, parse, store and return properly the value of
grid-template. It required some extra parsing code because the
specs mandates to check that the defined grid areas are indeed
rectangular. Named grid areas are still not fully supported, will
be done in a follow up patch.
As validating involves building the grid areas a new CSSValue was
added to hold the computed value. Note that we have to track the
explicit size of the named grid areas as the named grid areas
(".") are not tracked in our HashMap of grid areas.
This change also involves moving GridCoordinate and GridSpan to a
separate file in order to share the code that describes the grid
area coordinates.
* CMakeLists.txt: Added new files to the build.
* GNUmakefile.list.am: Ditto.
* WebCore.vcxproj/WebCore.vcxproj: Ditto.
* WebCore.vcxproj/WebCore.vcxproj.filters: Ditto.
* WebCore.xcodeproj/project.pbxproj: Ditto.
* css/CSSComputedStyleDeclaration.cpp:
(WebCore::ComputedStyleExtractor::propertyValue):
* css/CSSGridTemplateValue.cpp: Added.
(WebCore::CSSGridTemplateValue::CSSGridTemplateValue):
(WebCore::stringForPosition):
(WebCore::CSSGridTemplateValue::customCSSText):
* css/CSSGridTemplateValue.h: Added.
(WebCore::CSSGridTemplateValue::create):
(WebCore::CSSGridTemplateValue::~CSSGridTemplateValue):
(WebCore::CSSGridTemplateValue::gridAreaMap):
(WebCore::CSSGridTemplateValue::rowCount):
(WebCore::CSSGridTemplateValue::columnCount):
(WebCore::toCSSGridTemplateValue):
* css/CSSParser.cpp:
(WebCore::CSSParser::parseValue):
(WebCore::CSSParser::parseGridTemplate): create the grid areas and
validate that they define rectangular sections.
* css/CSSParser.h:
* css/CSSPropertyNames.in: Added -webkit-grid-template.
* css/CSSValue.cpp:
(WebCore::CSSValue::equals): add support for the new CSSGridTemplateValue.
(WebCore::CSSValue::cssText): Ditto.
(WebCore::CSSValue::destroy): Ditto.
* css/CSSValue.h:
(WebCore::CSSValue::isGridTemplateValue):
* css/StyleResolver.cpp:
(WebCore::StyleResolver::applyProperty):
* rendering/RenderGrid.cpp:
(WebCore::RenderGrid::cachedGridCoordinate): Replaced RenderGrid::GridSpan by WebCore::GridSpan.
(WebCore::RenderGrid::resolveGridPositionsFromAutoPlacementPosition): Ditto.
(WebCore::RenderGrid::resolveGridPositionsFromStyle): Ditto.
(WebCore::RenderGrid::resolveGridPositionAgainstOppositePosition): Ditto.
(WebCore::RenderGrid::resolveNamedGridLinePositionAgainstOppositePosition): Ditto.
(WebCore::RenderGrid::resolveRowStartColumnStartNamedGridLinePositionAgainstOppositePosition): Ditto.
(WebCore::RenderGrid::resolveRowEndColumnEndNamedGridLinePositionAgainstOppositePosition): Ditto.
* rendering/RenderGrid.h: Took GridSpan and GridCoordinate out.
* rendering/style/GridCoordinate.h: Added.
(WebCore::GridSpan::create):
(WebCore::GridSpan::GridSpan):
(WebCore::GridSpan::operator==):
(WebCore::GridCoordinate::GridCoordinate):
(WebCore::GridCoordinate::operator==):
(WebCore::GridCoordinate::operator!=):
* rendering/style/RenderStyle.h:
* rendering/style/StyleGridData.cpp:
(WebCore::StyleGridData::StyleGridData):
* rendering/style/StyleGridData.h:
(WebCore::StyleGridData::operator==):
2013-10-09 Ryosuke Niwa <rniwa@webkit.org>
Make EventDispatcher::dispatch comprehensible
https://bugs.webkit.org/show_bug.cgi?id=122588
Reviewed by Andreas Kling.
Merged EventDispatcher::dispatchEventAtCapturing, EventDispatcher::dispatchEventAtTarget,
EventDispatcher::dispatchEventAtBubbling, and EventDispatcher::dispatchEventPostProcess into EventDispatcher::dispatch,
and extracted static local callDefaultEventHandlersInTheBubblingOrder and dispatchEventInDOM out of it.
Also made handleLocalEvents of subclasses of EventContext and Node take Event& instead of Event*.
* dom/EventContext.cpp: The following functions now take Event& instead of Event*.
(WebCore::EventContext::handleLocalEvents):
(WebCore::MouseOrFocusEventContext::handleLocalEvents):
(WebCore::TouchEventContext::handleLocalEvents):
* dom/EventContext.h:
* dom/EventDispatcher.cpp:
(WebCore::callDefaultEventHandlersInTheBubblingOrder): Extracted from EventDispatcher::dispatchEventPostProcess,
which is now merged into EventDispatcher::dispatch.
(WebCore::dispatchEventInDOM): Extracted out of EventDispatcher::dispatch, EventDispatcher::dispatchEventAtCapturing,
EventDispatcher::dispatchEventAtTarget and EventDispatcher::dispatchEventAtBubbling. This function is responsible for
dispatching the event for capturing, at the target, and then bubbling through the event path chain.
(WebCore::EventDispatcher::dispatch): EventDispatcher::dispatchEventPostProcess got merged into this. The calls to
dispatchEventAtCapturing, dispatchEventAtTarget, and dispatchEventAtBubbling are replaced by a single call to
dispatchEventInDOM.
* dom/EventDispatcher.h:
* dom/FocusEvent.h:
(WebCore::toFocusEvent): Added the version that takes a reference.
* dom/MouseEvent.h:
(WebCore::toMouseEvent): Ditto.
* dom/TouchEvent.h:
(WebCore::toTouchEvent): Ditto.
* dom/Node.cpp:
(WebCore::Node::handleLocalEvents): Now takes Event& instead of Event*.
* dom/Node.h:
* dom/WindowEventContext.cpp:
(WebCore::WindowEventContext::handleLocalEvents): Ditto.
* dom/WindowEventContext.h:
* html/HTMLFormElement.cpp:
(WebCore::HTMLFormElement::handleLocalEvents): Ditto.
* html/HTMLFormElement.h:
2013-10-09 Ryosuke Niwa <rniwa@webkit.org>
Another build fix after r157204.
* dom/EventDispatcher.cpp:
(WebCore::EventDispatcher::dispatch):
2013-10-09 Ryosuke Niwa <rniwa@webkit.org>
Build fix after r157204.
* dom/EventDispatcher.cpp:
(WebCore::EventDispatcher::dispatch):
2013-10-07 Darin Adler <darin@apple.com>
Use unique_ptr instead of deleteAllValues in XPath
https://bugs.webkit.org/show_bug.cgi?id=121082
Reviewed by Anders Carlsson.
* dom/Attr.h: Made the namespaceURI function public so it can be called by
code in XPath. Since the class is FINAL, calls won't do virtual dispatch.
* xml/XPathExpression.cpp:
(WebCore::XPathExpression::XPathExpression): Added. Use std::move.
(WebCore::XPathExpression::createExpression): Use the new Parser::parseStatement
and more std::move.
(WebCore::XPathExpression::~XPathExpression): Removed now-unneeded delete.
* xml/XPathExpression.h: Removed unused create function. Use std::unique_ptr.
* xml/XPathExpressionNode.cpp:
(WebCore::XPath::Expression::evaluationContext): Use NeverDestroyed instead of
DEFINE_STATIC_LOCAL.
(WebCore::XPath::Expression::setSubexpressions): Added. Used to set all the
subexpressions at once rather than adding one at a time.
* xml/XPathExpressionNode.h: Use plain unsigned instead of unsigned long.
Eliminated the ParseNode class, used only by the parser to delete objects,
which we now do with %destructor. Made more functions protected. Fixed the
capitalization of the word "subexpression". Made m_subexpressions be a Vector
of std::unique_ptr.
* xml/XPathFunctions.cpp: Marked all the classes FINAL and all their virtual
functions OVERRIDE. Reduced some of the boilerplate.
(WebCore::XPath::Function::setArguments): Passed in the name so we don't have
to store the function names in all the function objects.
(WebCore::XPath::FunId::evaluate): Use std::move instead of Value::adopt.
(WebCore::XPath::FunLocalName::evaluate): Use emptyString instead of "".
(WebCore::XPath::FunNamespaceURI::evaluate): Ditto.
(WebCore::XPath::FunName::evaluate): Ditto.
(WebCore::XPath::FunSubstringBefore::evaluate): Ditto.
(WebCore::XPath::FunSubstringAfter::evaluate): Ditto.
(WebCore::XPath::FunSubstring::evaluate): Ditto.
(WebCore::XPath::FunLang::evaluate): Use Value(false) so we can make the
constructor that takes a boolean explicit.
(WebCore::XPath::FunFalse::evaluate): Ditto.
(WebCore::XPath::populateFunctionMap): Changed idiom slightly to match other
maps we set up.
(WebCore::XPath::Function::create): Refactored createFunction into three
member functions of this name.
* xml/XPathFunctions.h: Made all the Function members private or protected
except for Function::create.
* xml/XPathGrammar.y: Changed the parser to use a reference instead of
a pointer, and to pass the reference through to yylex as well. Break up
the union into pieces and add %destructor as needed to make sure everything
gets deallocated if parsing fails. Added a new top level rule "Top" so that
we would not try to set the parse result multiple times during parsing.
Call setParseResult instead of setting m_topExpr directly. Use std::unique_ptr
to adopt pointers from the union. Removed all the register/unregister calls
that used to be used to manage storage. Also changed the four different node
types to be separate tokens instead of using string matching at this level
for them.
* xml/XPathNodeSet.cpp:
(WebCore::XPath::NodeSet::sort): Removed const_cast since m_isSorted and
m_nodes are now both marked mutable. Also set m_isSorted after sorting; this
was an oversight that hurt performance before.
(WebCore::XPath::NodeSet::traversalSort): Ditto.
(WebCore::XPath::NodeSet::firstNode): Use nullptr.
(WebCore::XPath::NodeSet::anyNode): Ditto.
* xml/XPathNodeSet.h: Removed unneeded extra includes. Removed the
WTF_MAKE_FAST_ALLOCATED for NodeSet since we never allocate these on the heap.
Added a constructor that takes a single node. Deleted the swap function, since
we now move instead of swap. Deleted the append function that takes a raw Node*,
since calling the PassRefPtr<Node> overload does the same thing. Removed the
unused reverse function. Marked both m_isSorted and m_nodes mutable so the
sort function can be const.
* xml/XPathParser.cpp: Moved the Token struct in here instead of the header.
(WebCore::XPath::populateAxisNamesMap):Renamed to match our normal naming scheme,
and changed to use add instead of set, use WTF_ARRAY_LENGTH, and not use a typedef.
(WebCore::XPath::parseAxisName): Related style changes, including renaming to
better reflect the way this works with a boolean.
(WebCore::XPath::Parser::nextTokenInternal): Updated to call parseAxisName,
and to produce four separate tokens for the four node type functions.
(WebCore::XPath::Parser::nextToken): Renamed local variable.
(WebCore::XPath::Parser::Parser): Made this a real constructor that takes arguments
and initializes all the fields. Deleted the unneeded reset function.
(WebCore::XPath::Parser::lex): Changed to take an argument of an appropriate type
instead of casting from void*. Also changed the string code to leak a StringImpl,
which is now what the grammar code expects.
(WebCore::XPath::Parser::expandQualifiedName): Renamed from expandQName. Changed
to set m_sawNamespaceError instead of relying on code in the grammar to do it.
(WebCore::XPath::Parser::parseStatement): Removed most of the code in this function.
Changed to a much simpler model. Also made this a static member function so it
takes care of creating the parser itself and does not need to call reset. Also
changed return value to be a std::unique_ptr to make ownership more clear.
* xml/XPathParser.h: Added a declaration of YYSTYPE. Removed unneeded forward
declarations and moved Token into the cpp file. Deleted most public functions,
leaving only parseStatement, the entry point, and the three functions needed by
the grammar, lex, expandQualifiedName, and setParseResult.
* xml/XPathPath.cpp:
(WebCore::XPath::Filter::Filter): Move in the arguments instead of copying them.
(WebCore::XPath::Filter::evaluate): Updated for name and type changes.
(WebCore::XPath::LocationPath::LocationPath): Ditto.
(WebCore::XPath::LocationPath::evaluate): Ditto. Also use std::move instead of
Value::adopt and instead of swap.
(WebCore::XPath::LocationPath::appendStep): Changed to take ownership of a
unique_ptr.
(WebCore::XPath::LocationPath::prependStep): Ditto. Renamed from insertFirstStep.
(WebCore::XPath::Path::Path): Move in the arguments.
* xml/XPathPath.h: Removed unneeded includes. Changed arugument types to use
std::unique_ptr to pass ownership in. Added override to all virtual functions.
Changed data members to use std::unique_ptr.
* xml/XPathPredicate.cpp:
(WebCore::XPath::StringExpression::StringExpression): Use move.
(WebCore::XPath::Negative::Negative): Added.
(WebCore::XPath::Negative::evaluate): Updated for name changes.
(WebCore::XPath::NumericOp::NumericOp): Use move.
(WebCore::XPath::NumericOp::evaluate): Tweak formatting.
(WebCore::XPath::EqTestOp::EqTestOp): Use move.
(WebCore::XPath::EqTestOp::evaluate): Updated for name changes.
(WebCore::XPath::LogicalOp::LogicalOp): Use move.
(WebCore::XPath::LogicalOp::shortCircuitOn): Made shorter.
(WebCore::XPath::LogicalOp::evaluate): Updated for name changes.
(WebCore::XPath::Union::Union): Added.
(WebCore::XPath::Union::evaluate): Updated for name changes.
(WebCore::XPath::evaluatePredicate): Updated for name changes, to use
ASCIILiteral, and to be a free function that takes an expression.
(WebCore::XPath::predicateIsContextPositionSensitive): Added.
Replaces the Predicate::isContextPositionSensitive function.
* xml/XPathPredicate.h: Made all the classes FINAL and added a lot of OVERRIDE.
Added a constructor for Negative and Union. Got rid of the Predicate class and
instead provided two functions that operate on an Expression.
* xml/XPathStep.cpp:
(WebCore::XPath::Step::Step): Use move instea dof copying.
(WebCore::XPath::Step::~Step): Removed calls to deleteAllValues.
(WebCore::XPath::Step::optimize): Use move instead of swap and copy. Also
operate directly on the data members of the node test instead of using functions
that just return references to those data members.
(WebCore::XPath::optimizeStepPair): Use references instead of pointers, move
instead of swap, and early return instead of nested if statements.
(WebCore::XPath::Step::predicatesAreContextListInsensitive): Use references.
(WebCore::XPath::Step::evaluate): Use references instead of pointers and move
instead of swap.
(WebCore::XPath::nodeMatchesBasicTest): Use references instead of pointers and
more specific types when possible.
(WebCore::XPath::nodeMatches): Ditto.
(WebCore::XPath::Step::nodesInAxis): Use references instead of pointers. Added
braces to match style. Use words instead of letters for local variable names.
* xml/XPathStep.h: Make almost everything in NodeTest private since callers
just set these up and Step is what actually uses them. Changed the predicate
vectors to be vectors of Predicate instead of Predicate*, since a Predicate
is just a wrapper around a single std::unique_ptr<Expression>. Changed to use
move instead of copy when making a Step and to use references instead of pointers.
* xml/XPathValue.cpp: Use std::numeric_limits explicitly instead of using using.
Got rid of Value::adopt.
(WebCore::XPath::Value::toNodeSet): Use NeverDestroyed instead of DEFINE_STATE_LOCAL.
Updated for name changes.
(WebCore::XPath::Value::modifiableNodeSet): Ditto.
(WebCore::XPath::Value::toBoolean): Ditto.
(WebCore::XPath::Value::toNumber): Ditto.
(WebCore::XPath::Value::toString): Ditto. Use ASCIILiteral.
* xml/XPathValue.h: Moved ValueData class inside the Value class and renamed
it Value::Data. Removed fancy trick that avoids turning pointers into bool, and
just take the risk. Made many, but not all, of the Value constructors explicit
since we normally are explicit at call sites. Removed unneeded unsigned long
overload of the constructor. Changed the NodeSet version of the constructor to
use std::move and use that instead of AdoptTag.
2013-10-09 Ryosuke Niwa <rniwa@webkit.org>
Build fix. Add back the missing call to EventRetargeter::adjustForTouchEvent.
* dom/EventDispatcher.cpp:
(WebCore::EventDispatcher::dispatch):
2013-10-09 Ryosuke Niwa <rniwa@webkit.org>
EventDispatchMediator is goner
https://bugs.webkit.org/show_bug.cgi?id=122581
Reviewed by Antti Koivisto.
Killed the death.
* CMakeLists.txt:
* GNUmakefile.list.am:
* WebCore.vcxproj/WebCore.vcxproj:
* WebCore.vcxproj/WebCore.vcxproj.filters:
* WebCore.xcodeproj/project.pbxproj:
* dom/DOMAllInOne.cpp:
* dom/Element.cpp:
(WebCore::Element::dispatchWheelEvent):
(WebCore::Element::dispatchKeyEvent):
(WebCore::Element::dispatchFocusEvent):
(WebCore::Element::dispatchBlurEvent):
* dom/EventDispatchMediator.cpp: Removed.
* dom/EventDispatchMediator.h: Removed.
* dom/EventDispatcher.cpp:
(WebCore::EventDispatcher::dispatchEvent):
(WebCore::EventDispatcher::dispatchScopedEvent):
* dom/EventDispatcher.h:
* dom/KeyboardEvent.h:
* dom/MouseEvent.h:
* dom/Node.cpp:
(WebCore::Node::dispatchScopedEvent):
(WebCore::Node::dispatchEvent):
(WebCore::Node::dispatchGestureEvent):
(WebCore::Node::dispatchTouchEvent):
(WebCore::Node::dispatchUIRequestEvent):
* dom/Node.h:
* dom/ScopedEventQueue.cpp:
(WebCore::ScopedEventQueue::~ScopedEventQueue):
(WebCore::ScopedEventQueue::enqueueEvent):
(WebCore::ScopedEventQueue::dispatchAllEvents):
(WebCore::ScopedEventQueue::dispatchEvent):
* dom/ScopedEventQueue.h:
* dom/TouchEvent.cpp:
* dom/TouchEvent.h:
* dom/UIEvent.h:
* dom/WheelEvent.h:
2013-10-09 Andreas Kling <akling@apple.com>
Kill some RenderObject::firstChildSlow/lastChildSlow usage.
<https://webkit.org/b/122582>
Reviewed by Antti Koivisto.
Use tighter typing in some random places to flush out unnecessary use
of virtual first/last child getters on RenderObject.
There are more of these opportunities, but I left them untouched to
avoid snowballing this patch.
2013-10-09 Simon Fraser <simon.fraser@apple.com>
Fix some bad paths in the Xcode project
https://bugs.webkit.org/show_bug.cgi?id=122583
Reviewed by Mark Rowe.
Fix paths for some storage quota-related files, and remove
reference to mediaControlsQuickTime.css which was removed in r156546.
* WebCore.xcodeproj/project.pbxproj:
2013-10-09 Alexandru Chiculita <achicu@adobe.com>
Web Inspector: [CSS Regions] Display the correct fragment boxes for content inside flow threads
https://bugs.webkit.org/show_bug.cgi?id=122291
Reviewed by Timothy Hatcher.
Tests: inspector/elements/highlight-regions-flow-horiz-bt.html
inspector/elements/highlight-regions-flow-transform-horiz-bt.html
inspector/elements/highlight-regions-flow-transform-vert-lr.html
inspector/elements/highlight-regions-flow-transform-vert-rl.html
inspector/elements/highlight-regions-flow-transform.html
inspector/elements/highlight-regions-flow-vert-lr.html
inspector/elements/highlight-regions-flow-vert-rl.html
inspector/elements/highlight-regions-flow.html
Nodes inside a RenderFlowThread can be split across multiple regions. This patch adds the required
code to compute "fragments" for each region. Each fragment will display its own label.
There are a couple of changes:
1. The node highlight object now has a "scroll" property to hold the main view's scroll offset.
2. There's a "fragment" array to get a list of quads for each renderer fragment. Renderers outside
RenderFlowThreads will just have one fragment.
3. ElementInfo now has two more properties: "regionFlowInfo" (renamed from former flowInfo) and "contentFlowInfo".
If the renderer is a RenderRegion it will have a regionFlowInfo. If the renderer is inside a RenderFlowThread
then it will have a "contentFlowInfo".
* inspector/InspectorOverlay.cpp:
(WebCore::InspectorOverlay::getHighlight): It should now take a "region" parameter to customize the output for a specific
containing region.
(WebCore::buildObjectForHighlight):
(WebCore::buildObjectForCSSRegionContentClip): We need to know how to clip the fragments inside regions.
(WebCore::buildObjectForRendererFragments): Extracted code from buildObjectForHighlight and added
the new regions lookup code.
(WebCore::buildObjectForElementInfo): Extracted from buildObjectForHighlight.
(WebCore::InspectorOverlay::buildObjectForHighlightedNode):
(WebCore::InspectorOverlay::drawQuadHighlight):
* inspector/InspectorOverlayPage.css: There can be multiple labels on screen at once, so I've
created the #element-title-template element that we clone for each label. .element-title-container is now
holding all the .element-title elements, so that we can remove them all at once.
(.element-title-container):
(.element-title):
(#element-title-template):
(.tag-name):
(.node-id):
(.class-name):
* inspector/InspectorOverlayPage.html:
* inspector/InspectorOverlayPage.js:
(reset):
(_toggleOptionalValue):
(_createElementTitle): Creates an element populated with data read from elementInfo.
(_drawElementTitle): Added code to create more labels for multiple fragments.
(_drawRegionsHighlight):
(_drawFragmentHighlight):
(drawNodeHighlight): Consolidated the scroll property into a canvas.transform.
2013-10-09 Simon Fraser <simon.fraser@apple.com>
Layout assertion failure in WebCore::RenderView::paint
https://bugs.webkit.org/show_bug.cgi?id=121925
Reviewed by Tim Horton.
This fixes the assertion seen when running WK2 API tests.
If RenderLayerCompositor::flushPendingLayerChanges() was called before
the root layer was attached, it would set m_shouldFlushOnReattach
to do the flush later, after attaching (bypassing the runloop observer
that updated layout if necessary).
This could cause us to get to a CA commit without having updated
layout, hence the assertion.
Fix by having attachRootLayer() schedule a layer flush, rather than doing
one right away.
* rendering/RenderLayerCompositor.cpp:
(WebCore::RenderLayerCompositor::attachRootLayer):
2013-10-09 Bem Jones-Bey <bjonesbe@adobe.com>
Move float logical location/dimension methods to RenderBlockFlow
https://bugs.webkit.org/show_bug.cgi?id=122282
Reviewed by David Hyatt.
I recently moved the logical location and dimension methods from
RenderBlock to FloatingObject. This made it so that the methods needed
to take in the horizontal writing mode of the FloatingObject's
container in order to do their thing. When looking into how to fix
this, I came to understand why RenderBlock has methods to determine
the logical location and dimensions of its children, when the children
themselves have those methods: the methods on RenderBlock are for
determining the logical value in the writing mode of that RenderBlock,
and the method on the child is for determining the logical value in
the writing mode of the child.
Since the floating object list has moved from RenderBlock to
RenderBlockFlow, this change moves the logical dimension methods from
FloatingObject to RenderBlockFlow.
No new tests, no new behavior.
* rendering/FloatingObjects.cpp:
(WebCore::ComputeFloatOffsetAdapter::ComputeFloatOffsetAdapter):
(WebCore::FloatingObjects::FloatingObjects):
(WebCore::::updateOffsetIfNeeded):
(WebCore::::collectIfNeeded):
(WebCore::::getHeightRemaining):
* rendering/FloatingObjects.h:
* rendering/LineWidth.cpp:
(WebCore::LineWidth::shrinkAvailableWidthForNewFloatIfNeeded):
* rendering/RenderBlockFlow.cpp:
(WebCore::RenderBlockFlow::clearFloats):
(WebCore::RenderBlockFlow::repaintOverhangingFloats):
(WebCore::RenderBlockFlow::insertFloatingObject):
(WebCore::RenderBlockFlow::removeFloatingObject):
(WebCore::RenderBlockFlow::removeFloatingObjectsBelow):
(WebCore::RenderBlockFlow::computeLogicalLocationForFloat):
(WebCore::RenderBlockFlow::positionNewFloats):
(WebCore::RenderBlockFlow::nextFloatLogicalBottomBelow):
(WebCore::RenderBlockFlow::lowestFloatLogicalBottom):
(WebCore::RenderBlockFlow::addOverhangingFloats):
(WebCore::RenderBlockFlow::hasOverhangingFloat):
(WebCore::RenderBlockFlow::addIntrudingFloats):
* rendering/RenderBlockFlow.h:
(WebCore::RenderBlockFlow::logicalTopForFloat):
(WebCore::RenderBlockFlow::logicalBottomForFloat):
(WebCore::RenderBlockFlow::logicalLeftForFloat):
(WebCore::RenderBlockFlow::logicalRightForFloat):
(WebCore::RenderBlockFlow::logicalWidthForFloat):
(WebCore::RenderBlockFlow::logicalHeightForFloat):
(WebCore::RenderBlockFlow::logicalSizeForFloat):
(WebCore::RenderBlockFlow::pixelSnappedLogicalTopForFloat):
(WebCore::RenderBlockFlow::pixelSnappedLogicalBottomForFloat):
(WebCore::RenderBlockFlow::pixelSnappedLogicalLeftForFloat):
(WebCore::RenderBlockFlow::pixelSnappedLogicalRightForFloat):
(WebCore::RenderBlockFlow::setLogicalTopForFloat):
(WebCore::RenderBlockFlow::setLogicalLeftForFloat):
(WebCore::RenderBlockFlow::setLogicalHeightForFloat):
(WebCore::RenderBlockFlow::setLogicalWidthForFloat):
* rendering/RenderBlockLineLayout.cpp:
(WebCore::RenderBlockFlow::adjustLogicalLineTopAndLogicalHeightIfNeeded):
(WebCore::RenderBlockFlow::checkPaginationAndFloatsAtEndLine):
(WebCore::updateSegmentsForShapes):
(WebCore::LineBreaker::nextSegmentBreak):
(WebCore::RenderBlockFlow::positionNewFloatOnLine):
* rendering/shapes/ShapeOutsideInfo.cpp:
(WebCore::ShapeOutsideInfo::updateDeltasForContainingBlockLine):
* rendering/shapes/ShapeOutsideInfo.h:
2013-10-09 Ryosuke Niwa <rniwa@webkit.org>
Remove MouseEventDispatchMediator
https://bugs.webkit.org/show_bug.cgi?id=122580
Reviewed by Antti Koivisto.
Removed. Will remove EventDispatchMediator next.
* dom/Element.cpp:
(WebCore::Element::dispatchMouseEvent):
* dom/MouseEvent.cpp:
* dom/MouseEvent.h:
* dom/Node.cpp:
(WebCore::Node::dispatchEvent):
(WebCore::Node::dispatchTouchEvent):
2013-10-09 Ryosuke Niwa <rniwa@webkit.org>
Remove all subclasses of EventDispatchMediator except MouseEventDispatchMediator
https://bugs.webkit.org/show_bug.cgi?id=122579
Reviewed by Antti Koivisto.
Removed UIRequestEventDispatchMediator, GestureEventDispatchMediator, KeyboardEventDispatchMediator,
and WheelEventDispatchMediator. Moved the code in the respective mediateAndDispatchEvent functions
to their respective dispatch*Event functions in Node.cpp and Element.cpp.
* Modules/indieui/UIRequestEvent.cpp:
(WebCore::UIRequestEvent::eventInterface):
* Modules/indieui/UIRequestEvent.h:
* dom/Element.cpp:
(WebCore::deltaMode):
(WebCore::Element::dispatchWheelEvent):
(WebCore::Element::dispatchKeyEvent):
* dom/GestureEvent.cpp:
* dom/GestureEvent.h:
* dom/KeyboardEvent.cpp:
* dom/KeyboardEvent.h:
* dom/Node.cpp:
(WebCore::Node::dispatchGestureEvent):
(WebCore::Node::dispatchUIRequestEvent):
* dom/WheelEvent.cpp:
* dom/WheelEvent.h:
2013-10-09 Bem Jones-Bey <bjonesbe@adobe.com>
[CSS Shapes] Lines that don't intersect shape-outside should ignore both left and right margins
https://bugs.webkit.org/show_bug.cgi?id=122570
Reviewed by Alexandru Chiculita.
Due to an oversight, the left margin on left floats and the right
margin on right floats was having an effect on lines that did not
intersect the shape (but did intersect the margin box of the float).
By the spec, lines that do not intersect the shape should act as if
the float isn't there, so those margins should have no effect on
those lines. This patch fixes this.
No new tests, it is covered by the existing tests now that they have
been fixed to have the proper behavior.
* rendering/shapes/ShapeOutsideInfo.cpp:
(WebCore::ShapeOutsideInfo::updateDeltasForContainingBlockLine):
2013-10-09 Bem Jones-Bey <bjonesbe@adobe.com>
[CSS Shapes] Clip shape-outside to the bottom of the margin box
https://bugs.webkit.org/show_bug.cgi?id=122562
Reviewed by Alexandru Chiculita.
The spec says that a shape-outside shape must be clipped to the
margin box. This implements clipping the bottom of the shape to the
bottom of the margin box.
Test: csswg/contributors/adobe/submitted/shapes/shape-outside/shape-outside-floats-clipped-000.html
csswg/contributors/adobe/submitted/shapes/shape-outside/shape-outside-floats-clipped-001.html
csswg/contributors/adobe/submitted/shapes/shape-outside/shape-outside-floats-clipped-002.html
csswg/contributors/adobe/submitted/shapes/shape-outside/shape-outside-floats-clipped-003.html
* rendering/RenderBlockFlow.cpp:
(WebCore::RenderBlockFlow::nextFloatLogicalBottomBelow):
2013-10-09 Sergio Correia <sergio.correia@openbossa.org>
[CoordinatedGraphics] ASSERTION FAILED: !m_flushingLayers (after r156291)
https://bugs.webkit.org/show_bug.cgi?id=122016
Reviewed by Noam Rosenthal.
To prevent calling scheduleLayerFlush() inside flushCompositingState(),
we now only call m_client->notifyFlushRequired() - which will trigger
scheduleLayerFlush() - if we are not already flushing layer changes.
No new tests, covered by existing ones.
* platform/graphics/texmap/coordinated/CompositingCoordinator.cpp:
(WebCore::CompositingCoordinator::notifyFlushRequired): Check if we
are already flushing layer changes before calling notifyFlushRequired.
(WebCore::CompositingCoordinator::sizeDidChange): Use notifyFlushRequired()
from CompositingCoordinator instead of calling the one from m_client
directly.
(WebCore::CompositingCoordinator::createGraphicsLayer): Ditto.
(WebCore::CompositingCoordinator::detachLayer): Ditto.
* platform/graphics/texmap/coordinated/CoordinatedGraphicsLayer.cpp:
(WebCore::CoordinatedGraphicsLayer::notifyFlushRequired): Added helper
to check whether we are flushing layer changes before calling client()'s
notifyFlushRequired(). It returns a boolean indicating whether it
called the client's method.
(WebCore::CoordinatedGraphicsLayer::didChangeLayerState): Use the
notifyFlushRequired() helper.
(WebCore::CoordinatedGraphicsLayer::didChangeAnimations): Ditto.
(WebCore::CoordinatedGraphicsLayer::didChangeChildren): Ditto.
(WebCore::CoordinatedGraphicsLayer::didChangeFilters): Ditto.
(WebCore::CoordinatedGraphicsLayer::didChangeImageBacking): Ditto.
(WebCore::CoordinatedGraphicsLayer::setContentsNeedsDisplay): Ditto.
(WebCore::CoordinatedGraphicsLayer::setContentsToCanvas): Ditto.
(WebCore::CoordinatedGraphicsLayer::flushCompositingState): Ditto.
(WebCore::CoordinatedGraphicsLayer::tiledBackingStoreHasPendingTileCreation):Ditto.
* platform/graphics/texmap/coordinated/CoordinatedGraphicsLayer.h:
Declaration of the notifyFlushRequired() helper.
2013-10-09 Chris Fleizach <cfleizach@apple.com>
AX: VoiceOver double speaks all items in <li> nodes
https://bugs.webkit.org/show_bug.cgi?id=122564
Reviewed by Brent Fulgham.
Test: platform/mac/accessibility/native-list-item-should-not-expose-label.html
* accessibility/AccessibilityNodeObject.cpp:
(WebCore::AccessibilityNodeObject::visibleText):
2013-10-09 Sergio Correia <sergio.correia@openbossa.org>
CoordinatedGraphics: Fix integer rounding when computing pixel alignment
https://bugs.webkit.org/show_bug.cgi?id=122565
Reviewed by Noam Rosenthal.
Replace roundedIntRect call in computePixelAlignment() with enclosingIntRect,
so that very small rectangles (after content scaling) don't appear to be empty,
creating a crash later.
Test: transforms/3d/general/rotate-45-degrees-long-inner-text-in-dt.html
* platform/graphics/texmap/coordinated/CoordinatedGraphicsLayer.cpp:
(WebCore::CoordinatedGraphicsLayer::computePixelAlignment):
2013-10-08 Ryosuke Niwa <rniwa@webkit.org>
Rename EventRetargeter::adjustForRelatedTarget to EventPath::setRelatedTarget
https://bugs.webkit.org/show_bug.cgi?id=122539
Reviewed by Darin Adler.
Renamed EventRetargeter::adjustForRelatedTarget to EventPath::setRelatedTarget and got rid of
EventDispatchMediators for focus events. We set the related target inside EventDispatcher's
dispatch via Event::relatedTarget, which is now virtual and overridden by mouse/focus events.
* dom/Element.cpp: The following functions no longer use FocusEventDispatchMediators.
(WebCore::Element::dispatchFocusInEvent):
(WebCore::Element::dispatchFocusOutEvent):
(WebCore::Element::dispatchFocusEvent):
(WebCore::Element::dispatchBlurEvent):
* dom/Event.h:
(WebCore::Event::relatedTarget): Added as a virtual function.
* dom/EventDispatcher.cpp:
(WebCore::EventDispatcher::dispatchEvent): Cache Event*.
(WebCore::EventDispatcher::dispatch): Call setRelatedTargetToPath at the beginning to update
related targets in the path.
* dom/EventDispatcher.h:
* dom/EventRetargeter.cpp:
(WebCore::EventPath::EventPath): Initialize m_origin, used in EventPath::setRelatedTarget.
(WebCore::EventRetargeter::adjustTouchList):
(WebCore::EventPath::setRelatedTarget): Renamed from EventRetargeter::adjustForRelatedTarget.
Delegated the nullity checks to callers by taking references instead of pointers.
(WebCore::EventRetargeter::calculateAdjustedNodes):
* dom/EventRetargeter.h: Removed AdjustedNodes typedef. It's just a Vector of RefPtr<Node>.
* dom/FocusEvent.cpp: Removed FocusEventDispatchMediators for focus events.
* dom/FocusEvent.h:
* dom/MouseEvent.cpp:
(WebCore::MouseEvent::toElement): Cache the related target now that relatedTarget() is virtual.
(WebCore::MouseEvent::fromElement): Ditto.
(WebCore::MouseEventDispatchMediator::mediateAndDispatchEvent): No longer sets the related
targets since that's done in EventDispatcher::dispatch now.
* dom/MouseEvent.h:
* dom/Node.cpp: Removed obnoxious Node::dispatchScopedEventDispatchMediator.
(WebCore::Node::dispatchScopedEvent):
* dom/Node.h:
* html/shadow/MediaControlElements.cpp:
(WebCore::MediaControlVolumeSliderContainerElement::defaultEventHandler): Cache the related
target in a local variable now that relatedTarget() is virtual.
2013-10-09 Chris Fleizach <cfleizach@apple.com>
AX: VoiceOver does not speak aria-expanded state on iOS
https://bugs.webkit.org/show_bug.cgi?id=122540
Expose aria-pressed state for iOS.
Reviewed by Mario Sanchez Prada.
* accessibility/ios/WebAccessibilityObjectWrapperIOS.mm:
(-[WebAccessibilityObjectWrapper accessibilityIsExpanded]):
2013-10-09 Carlos Garcia Campos <cgarcia@igalia.com>
Unreviewed. Update GObject DOM symbols file after r157163.
* bindings/gobject/webkitdom.symbols:
2013-10-08 Anders Carlsson <andersca@apple.com>
Remove RunLoopMac.mm
https://bugs.webkit.org/show_bug.cgi?id=122527
Reviewed by Antti Koivisto.
RunLoop::setUseApplicationRunLoopOnMainRunLoop() is no longer used, so we can just use the run() and stop()
implementations from RunLoopCF.
* WebCore.exp.in:
* WebCore.xcodeproj/project.pbxproj:
* platform/RunLoop.cpp:
* platform/RunLoop.h:
* platform/cf/RunLoopCF.cpp:
(WebCore::RunLoop::stop):
* platform/mac/RunLoopMac.mm: Removed.
2013-10-09 Mario Sanchez Prada <mario.prada@samsung.com>
[ATK] Implement new API in AtkText: atk_text_get_string_at_offset()
https://bugs.webkit.org/show_bug.cgi?id=120638
Reviewed by Gustavo Noronha Silva.
Implemented new atk_text_get_string_at_offset() API, introduced in
ATK 2.9.4 to simplify how text at a given offset is retrieved.
* accessibility/atk/WebKitAccessibleInterfaceText.cpp:
(webkitAccessibleTextGetStringAtOffset): New function implementing
the new API, which basically translates calls to the new API to
calls to the old API using 'at' positions and START boundaries.
(webkitAccessibleTextInterfaceInit): Hook the new function.
2013-10-09 Carlos Garcia Campos <cgarcia@igalia.com>
[GTK] mouse wheel events are not considered to be mouse events
https://bugs.webkit.org/show_bug.cgi?id=120648
Reviewed by Gustavo Noronha Silva.
Expose WheelEvent in the GObject DOM bindings API.
* bindings/gobject/GNUmakefile.am: Add new files to compilation.
* bindings/gobject/WebKitDOMPrivate.cpp:
(WebKit::wrap): Create a WebKitDOMWheelEvent when the given Event
is a WheelEvent.
2013-10-08 Gyuyoung Kim <gyuyoung.kim@samsung.com>
Unreviewed. Fix EFL buildbreak since r157152.
* dom/EventRetargeter.cpp:
(WebCore::EventRetargeter::adjustForTouchEvent):
2013-10-08 Alex Christensen <achristensen@webkit.org>
Improved WinLauncher.
https://bugs.webkit.org/show_bug.cgi?id=122536
Reviewed by Brent Fulgham.
* platform/network/curl/ResourceHandleManager.cpp:
(WebCore::cookieJarPath):
Put cookies.dat into the AppData directory on Windows.
2013-10-08 Ryosuke Niwa <rniwa@webkit.org>
Remove the code erroneously in the previous commit.
* dom/EventDispatcher.h:
(WebCore::EventPath::contextAt):
2013-10-08 Ryosuke Niwa <rniwa@webkit.org>
Turn EventPath into a real class
https://bugs.webkit.org/show_bug.cgi?id=122533
Reviewed by Antti Koivisto.
Turned EventPath into a real class and made EventRetargeter::calculateEventPath its constructor.
We can turn a lot of functions in EventRetargeter.cpp member functions of EventPath since many
of them manipulate EventPath in one way or another.
* dom/EventContext.h:
(WebCore::toMouseOrFocusEventContext):
(WebCore::toTouchEventContext):
* dom/EventDispatcher.cpp:
(WebCore::EventDispatcher::EventDispatcher):
(WebCore::EventDispatcher::dispatchEventAtCapturing):
(WebCore::EventDispatcher::dispatchEventAtTarget):
(WebCore::EventDispatcher::dispatchEventAtBubbling):
(WebCore::EventDispatcher::dispatchEventPostProcess):
(WebCore::EventDispatcher::topEventContext):
(WebCore::EventPath::hasEventListeners):
* dom/EventDispatcher.h:
(WebCore::EventPath::isEmpty):
(WebCore::EventPath::size):
(WebCore::EventPath::item):
(WebCore::EventPath::targetRespectingTargetRules):
(WebCore::EventPath::shrink):
(WebCore::EventPath::lastContextIfExists):
* dom/EventRetargeter.cpp:
(WebCore::EventPath::EventPath):
(WebCore::EventRetargeter::adjustForTouchEvent):
(WebCore::EventRetargeter::adjustForRelatedTarget):
(WebCore::EventRetargeter::calculateAdjustedNodes):
* dom/EventRetargeter.h:
* inspector/InspectorInstrumentation.cpp:
(WebCore::eventHasListeners):
* inspector/InspectorInstrumentation.h:
2013-10-08 Alex Christensen <achristensen@webkit.org>
Enabled all necessary files for Win64 build.
https://bugs.webkit.org/show_bug.cgi?id=122530
Reviewed by Brent Fulgham.
* WebCore.vcxproj/WebCore.vcxproj:
Enabled MediaPlayerPrivateFullscreenWindow and
RenderLayerModelObject to be built in Win64 build.
2013-10-07 Sam Weinig <sam@webkit.org>
Consolidate findString functions
https://bugs.webkit.org/show_bug.cgi?id=122480
Reviewed by Darin Adler.
* editing/Editor.cpp:
* editing/Editor.h:
* editing/EditorCommand.cpp:
(WebCore::executeFindString):
* page/DOMWindow.cpp:
(WebCore::DOMWindow::find):
* page/Page.cpp:
* page/Page.h:
Fix a long standing FIXME.
2013-10-08 Bem Jones-Bey <bjonesbe@adobe.com>
Move m_floatingObjects to RenderBlockFlow from RenderBlock
https://bugs.webkit.org/show_bug.cgi?id=122512
Reviewed by David Hyatt.
Floats are part of block flow, not every RenderBlock can contain
floars. This change makes it so that RenderBlock no longer can contain
floats, only RenderBlockFlow can.
This also moves a bunch of line layout stuff over to RenderBlockFlow,
but makes no effort to move all of line layout, as all of that is
destined to move out of both RenderBlockFlow and RenderBlock into its
own class.
No new tests, no behavior change.
* rendering/InlineIterator.h:
(WebCore::InlineBidiResolver::appendRun):
* rendering/LineWidth.cpp:
(WebCore::LineWidth::LineWidth):
* rendering/LineWidth.h:
* rendering/RenderBlock.cpp:
(WebCore::RenderBlock::styleWillChange):
(WebCore::RenderBlock::styleDidChange):
(WebCore::RenderBlock::splitFlow):
(WebCore::RenderBlock::deleteLineBoxTree):
(WebCore::RenderBlock::removeChild):
(WebCore::RenderBlock::computeOverflow):
(WebCore::RenderBlock::selectionGaps):
(WebCore::RenderBlock::adjustForBorderFit):
* rendering/RenderBlock.h:
(WebCore::RenderBlock::containsFloats):
(WebCore::RenderBlock::shouldSkipCreatingRunsForObject):
(WebCore::RenderBlock::addOverflowFromFloats):
(WebCore::RenderBlock::logicalRightFloatOffsetForLine):
(WebCore::RenderBlock::logicalLeftFloatOffsetForLine):
(WebCore::RenderBlock::moveAllChildrenOnRemovalTo):
(WebCore::RenderBlock::paintFloats):
(WebCore::RenderBlock::hitTestFloats):
(WebCore::RenderBlock::clipOutFloatingObjects):
* rendering/RenderBlockFlow.cpp:
(WebCore::RenderBlockFlow::clearFloats):
(WebCore::RenderBlockFlow::layoutBlock):
(WebCore::RenderBlockFlow::layoutBlockChild):
(WebCore::RenderBlockFlow::collapseMargins):
(WebCore::RenderBlockFlow::clearFloatsIfNeeded):
(WebCore::RenderBlockFlow::adjustBlockChildForPagination):
(WebCore::RenderBlockFlow::containsFloat):
(WebCore::RenderBlockFlow::styleDidChange):
(WebCore::RenderBlockFlow::styleWillChange):
(WebCore::RenderBlockFlow::deleteLineBoxTree):
(WebCore::RenderBlockFlow::moveAllChildrenOnRemovalTo):
(WebCore::RenderBlockFlow::addOverflowFromFloats):
(WebCore::RenderBlockFlow::computeOverflow):
(WebCore::RenderBlockFlow::repaintOverhangingFloats):
(WebCore::RenderBlockFlow::paintFloats):
(WebCore::RenderBlockFlow::clipOutFloatingObjects):
(WebCore::RenderBlockFlow::createFloatingObjects):
(WebCore::RenderBlockFlow::removeFloatingObjects):
(WebCore::RenderBlockFlow::insertFloatingObject):
(WebCore::RenderBlockFlow::removeFloatingObject):
(WebCore::RenderBlockFlow::removeFloatingObjectsBelow):
(WebCore::RenderBlockFlow::computeLogicalLocationForFloat):
(WebCore::RenderBlockFlow::positionNewFloats):
(WebCore::RenderBlockFlow::newLine):
(WebCore::RenderBlockFlow::logicalLeftFloatOffsetForLine):
(WebCore::RenderBlockFlow::logicalRightFloatOffsetForLine):
(WebCore::RenderBlockFlow::nextFloatLogicalBottomBelow):
(WebCore::RenderBlockFlow::lowestFloatLogicalBottom):
(WebCore::RenderBlockFlow::addOverhangingFloats):
(WebCore::RenderBlockFlow::hasOverhangingFloat):
(WebCore::RenderBlockFlow::addIntrudingFloats):
(WebCore::RenderBlockFlow::markAllDescendantsWithFloatsForLayout):
(WebCore::RenderBlockFlow::markSiblingsWithFloatsForLayout):
(WebCore::RenderBlockFlow::getClearDelta):
(WebCore::RenderBlockFlow::hitTestFloats):
(WebCore::RenderBlockFlow::adjustForBorderFit):
* rendering/RenderBlockFlow.h:
(WebCore::RenderBlockFlow::hasOverhangingFloats):
* rendering/RenderBlockLineLayout.cpp:
(WebCore::LineBreaker::LineBreaker):
(WebCore::RenderBlockFlow::appendRunsForObject):
(WebCore::RenderBlockFlow::createLineBoxes):
(WebCore::RenderBlockFlow::constructLine):
(WebCore::RenderBlockFlow::setMarginsForRubyRun):
(WebCore::updateLogicalInlinePositions):
(WebCore::RenderBlockFlow::computeInlineDirectionPositionsForLine):
(WebCore::RenderBlockFlow::computeInlineDirectionPositionsForSegment):
(WebCore::RenderBlockFlow::computeBlockDirectionPositionsForLine):
(WebCore::setStaticPositions):
(WebCore::RenderBlockFlow::handleTrailingSpaces):
(WebCore::RenderBlockFlow::appendFloatingObjectToLastLine):
(WebCore::constructBidiRunsForLine):
(WebCore::RenderBlockFlow::createLineBoxesFromBidiRuns):
(WebCore::RenderBlockFlow::layoutRunsAndFloats):
(WebCore::RenderBlockFlow::restartLayoutRunsAndFloatsInRange):
(WebCore::pushShapeContentOverflowBelowTheContentBox):
(WebCore::RenderBlockFlow::updateShapeAndSegmentsForCurrentLine):
(WebCore::RenderBlockFlow::updateShapeAndSegmentsForCurrentLineInFlowThread):
(WebCore::RenderBlockFlow::adjustLogicalLineTopAndLogicalHeightIfNeeded):
(WebCore::RenderBlockFlow::layoutRunsAndFloatsInRange):
(WebCore::RenderBlockFlow::linkToEndLineIfNeeded):
(WebCore::RenderBlockFlow::repaintDirtyFloats):
(WebCore::RenderBlockFlow::checkFloatsInCleanLine):
(WebCore::RenderBlockFlow::determineStartPosition):
(WebCore::RenderBlockFlow::determineEndPosition):
(WebCore::RenderBlockFlow::checkPaginationAndFloatsAtEndLine):
(WebCore::RenderBlockFlow::matchedEndLine):
(WebCore::shouldSkipWhitespaceAfterStartObject):
(WebCore::updateSegmentsForShapes):
(WebCore::RenderBlockFlow::deleteEllipsisLineBoxes):
(WebCore::RenderBlockFlow::checkLinesForTextOverflow):
(WebCore::RenderBlockFlow::positionNewFloatOnLine):
* rendering/RenderBox.cpp:
(WebCore::RenderBox::outermostBlockContainingFloatingObject):
(WebCore::RenderBox::removeFloatingOrPositionedChildFromBlockLists):
* rendering/RenderBox.h:
* rendering/RenderBoxModelObject.cpp:
(WebCore::RenderBoxModelObject::moveChildrenTo):
* rendering/RenderInline.cpp:
(WebCore::RenderInline::splitFlow):
2013-10-08 Dean Jackson <dino@apple.com>
Support unprefixed WebGL context creation
https://bugs.webkit.org/show_bug.cgi?id=122523
<rdar://problem/15179463>
Reviewed by Simon Fraser.
Add support for the unprefixed "webgl" canvas context type.
Test: fast/canvas/webgl/unprefixed-context.html
* html/HTMLCanvasElement.cpp:
(WebCore::HTMLCanvasElement::is3dType):
* inspector/InjectedScriptCanvasModuleSource.js:
2013-10-08 Ryosuke Niwa <rniwa@webkit.org>
Rename EventDispatchMediator::dispatchEvent to mediateAndDispatchEvent
https://bugs.webkit.org/show_bug.cgi?id=122522
Reviewed by Darin Adler.
Renamed EventDispatchMediator::dispatchEvent to EventDispatchMediator::mediateAndDispatchEvent
to make the future refactoring easier.
* Modules/indieui/UIRequestEvent.cpp:
(WebCore::UIRequestEventDispatchMediator::mediateAndDispatchEvent):
* Modules/indieui/UIRequestEvent.h:
* dom/EventDispatchMediator.cpp:
(WebCore::EventDispatchMediator::mediateAndDispatchEvent):
* dom/EventDispatchMediator.h:
* dom/EventDispatcher.cpp:
(WebCore::EventDispatcher::dispatchEvent):
* dom/FocusEvent.cpp:
(WebCore::FocusEventDispatchMediator::mediateAndDispatchEvent):
(WebCore::BlurEventDispatchMediator::mediateAndDispatchEvent):
(WebCore::FocusInEventDispatchMediator::mediateAndDispatchEvent):
(WebCore::FocusOutEventDispatchMediator::mediateAndDispatchEvent):
* dom/FocusEvent.h:
* dom/GestureEvent.cpp:
(WebCore::GestureEventDispatchMediator::mediateAndDispatchEvent):
* dom/GestureEvent.h:
* dom/KeyboardEvent.cpp:
(WebCore::KeyboardEventDispatchMediator::mediateAndDispatchEvent):
* dom/KeyboardEvent.h:
* dom/MouseEvent.cpp:
(WebCore::MouseEventDispatchMediator::mediateAndDispatchEvent):
* dom/MouseEvent.h:
* dom/TouchEvent.cpp:
(WebCore::TouchEventDispatchMediator::mediateAndDispatchEvent):
* dom/TouchEvent.h:
* dom/WheelEvent.cpp:
(WebCore::WheelEventDispatchMediator::mediateAndDispatchEvent):
* dom/WheelEvent.h:
2013-10-08 Brent Fulgham <bfulgham@apple.com>
[MathML] Use of floating point floor/ceil on LayoutUnits seems wrong
https://bugs.webkit.org/show_bug.cgi?id=122367
Reviewed by Darin Adler.
* rendering/mathml/RenderMathMLOperator.cpp:
(WebCore::RenderMathMLOperator::paintCharacter): Use member methods to compute
correct floor/ceil values for LayoutUnits.
2013-10-07 Dean Jackson <dino@apple.com>
Video -> pixel buffer output should not manage color spaces
https://bugs.webkit.org/show_bug.cgi?id=122486
Reviewed by Tim Horton.
On Mac, when we draw a video into a canvas or WebGL, the
output of the video should not be color managed. Instead, leave it
as DeviceRGB so that it matches other colors in those elements.
We'll hopefully solve this properly soon - making everything sRGB.
Test: media/video-canvas-drawing-output.html
* platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
(WebCore::MediaPlayerPrivateAVFoundationObjC::createImageForTimeInRect): Pass on
a CGImageRef via CGImageCreateCopyWithColorSpace rather than the raw data.
(WebCore::MediaPlayerPrivateAVFoundationObjC::paintWithVideoOutput): Tell CoreImage
to allocate a pixel buffer that is unmanaged.
2013-10-08 Lauro Neto <lauro.neto@openbossa.org>
[MediaStream] Fix segfault in initializeMockSources()
https://bugs.webkit.org/show_bug.cgi?id=122517
Reviewed by Darin Adler.
Calling release() and a member function on the same RefPtr
as arguments to a function can lead to segfaults if the release
call is evaluated first.
* platform/mock/MockMediaStreamCenter.cpp:
(WebCore::initializeMockSources):
2013-10-08 Mihnea Ovidenie <mihnea@adobe.com>
[CSSRegions] Regions with overflow: hidden should paint over positioned sibling
https://bugs.webkit.org/show_bug.cgi?id=122389
Reviewed by Alexandru Chiculita.
As a follow-up from https://bugs.webkit.org/show_bug.cgi?id=122321, a region should not
be a normal flow layer when it has overflow clip. Change existing test by adding overflow:hidden
to the region element.
* rendering/RenderLayer.cpp:
(WebCore::RenderLayer::shouldBeNormalFlowOnly):
2013-10-08 Ryosuke Niwa <rniwa@webkit.org>
Simplify the loop in EventRetargeter::calculateEventPath
https://bugs.webkit.org/show_bug.cgi?id=122500
Reviewed by Antti Koivisto.
Replaced the convoluted loop by two nested loops to make semantics clear.
* dom/EventRetargeter.cpp:
(WebCore::EventRetargeter::calculateEventPath):
2013-10-08 ChangSeok Oh <changseok.oh@collabora.com>
[GTK] Leak: GdkEvent retured by gtk_get_current_event is not freed.
https://bugs.webkit.org/show_bug.cgi?id=122506
Reviewed by Gustavo Noronha Silva.
Gdk event returned by gtk_get_current_event should be freed after using it.
No functionality changed.
* platform/gtk/PopupMenuGtk.cpp:
(WebCore::PopupMenuGtk::show):
2013-10-08 Ryosuke Niwa <rniwa@webkit.org>
Use references in EventRetargeter::calculateEventPath and EventRetargeter::eventTargetRespectingTargetRules
https://bugs.webkit.org/show_bug.cgi?id=122494
Reviewed by Antti Koivisto.
Use referenecs instead of pointers in ventRetargeter's calculateEventPath and eventTargetRespectingTargetRules.
Also replace Vector<EventTarget*, 32> targetStack by a single pointer since we only append an item to
the vector when it's empty and we always use the last item.
* dom/EventDispatcher.cpp:
(WebCore::EventDispatcher::EventDispatcher):
(WebCore::EventDispatcher::dispatchScopedEvent):
(WebCore::EventDispatcher::dispatch):
(WebCore::EventDispatcher::dispatchEventPostProcess):
* dom/EventDispatcher.h:
* dom/EventRetargeter.cpp:
(WebCore::EventRetargeter::calculateEventPath):
* dom/EventRetargeter.h:
(WebCore::EventRetargeter::eventTargetRespectingTargetRules):
* dom/Node.cpp:
(WebCore::Node::dispatchScopedEventDispatchMediator):
2013-10-08 Mihnea Ovidenie <mihnea@adobe.com>
[CSSRegions] Computed z-Index should return 0 instead of auto for a region
https://bugs.webkit.org/show_bug.cgi?id=122405
Reviewed by David Hyatt.
Test: fast/regions/layers/region-zIndex-computedStyle.html
Adjust the z-index value for a region. Also, since a box with a z-Index
that is non-auto receives a layer, i removed the requiresLayer override
in RenderRegion and RenderMultiColumnSet.
* css/StyleResolver.cpp:
(WebCore::StyleResolver::adjustRenderStyle):
* rendering/RenderMultiColumnSet.cpp:
* rendering/RenderMultiColumnSet.h:
* rendering/RenderRegion.cpp:
* rendering/RenderRegion.h:
* rendering/style/RenderStyle.h:
2013-10-08 Andrei Bucur <abucur@adobe.com>
[CSS Regions] Widows don't work if the first line in a region is aligned with the top of the region
https://bugs.webkit.org/show_bug.cgi?id=122450
Reviewed by David Hyatt.
The patch adds a new function updateRegionForLine that updates the containing region for a line and the
flag used to determine if it's the first line in that region. This is necessary because the code in
adjustLinePositionForPagination is not sufficient to determine when an unforced break occurs and the line
being positioned is the first one in the fragmentation container or not.
Test: fast/regions/regions-widows-float-top-aligned.html
* rendering/RenderBlockFlow.cpp:
(WebCore::RenderBlockFlow::adjustLinePositionForPagination): Added FIXME comment.
* rendering/RenderBlockFlow.h:
* rendering/RenderBlockLineLayout.cpp:
(WebCore::RenderBlock::layoutRunsAndFloatsInRange):
(WebCore::RenderBlock::linkToEndLineIfNeeded):
(WebCore::RenderBlock::determineStartPosition):
(WebCore::RenderBlockFlow::updateRegionForLine): New function used to update the containing region and
the first line flag.
2013-10-08 Thiago de Barros Lacerda <thiago.lacerda@openbossa.org>
Get EFL and GTK compiling with media stream enabled
https://bugs.webkit.org/show_bug.cgi?id=122505
Reviewed by Philippe Normand.
After r157068
No new tests needed.
* GNUmakefile.list.am:
* UseJSC.cmake:
2013-10-08 Hurnjoo Lee <hurnjoo.lee@samsung.com>
Composited layer that painted into composited ancestor is not repainted after moving
https://bugs.webkit.org/show_bug.cgi?id=114655
Reviewed by Simon Fraser.
Test: compositing/repaint/absolute-painted-into-composited-ancestor.html
Composited layers are currently skipping repainting after layout,
if the repaint status is not NeedsFullRepaint. However, in case layers
were painted into composited ancestor, they need to repaint.
* rendering/RenderLayer.cpp:
(WebCore::RenderLayer::shouldRepaintAfterLayout):
2013-10-08 Zalan Bujtas <zalan@apple.com>
Unreviewed. Rollout of r156536. ~5% regression in inline layout performance.
* rendering/LineWidth.cpp:
* rendering/LineWidth.h:
(WebCore::LineWidth::addUncommittedWidth):
* rendering/RenderBlockLineLayout.cpp:
(WebCore::LineBreaker::nextSegmentBreak):
2013-10-08 Gyuyoung Kim <gyuyoung.kim@samsung.com>
Use toCSSFooValue() instead of using static_cast<const CSSFooValue*>
https://bugs.webkit.org/show_bug.cgi?id=122491
Reviewed by Andreas Kling.
static_cast<const CSSFooValue*> wasn't cleanup. So, we need to use toCSSFooValue() for it.
To use toCSSValue() will help to detect bad type-cast.
Besides static_cast<const WebKitCSSFooValue*> helper functions need to be added to support this use.
No new tests, no behavior change.
* css/CSSComputedStyleDeclaration.cpp:
(WebCore::ComputedStyleExtractor::propertyMatches):
* css/CSSImageGeneratorValue.cpp:
(WebCore::CSSImageGeneratorValue::isFixedSize):
(WebCore::CSSImageGeneratorValue::isPending):
(WebCore::CSSImageGeneratorValue::knownToBeOpaque):
* css/CSSValue.cpp:
(WebCore::CSSValue::isImplicitInitialValue):
(WebCore::CSSValue::addSubresourceStyleURLs):
(WebCore::CSSValue::hasFailedOrCanceledSubresources):
(WebCore::CSSValue::equals):
(WebCore::CSSValue::cssText):
(WebCore::CSSValue::serializeResolvingVariables):
(WebCore::CSSValue::cloneForCSSOM):
* css/StylePropertySet.cpp:
(WebCore::StylePropertySet::PropertyReference::cssName):
* css/WebKitCSSSVGDocumentValue.h:
(WebCore::toWebKitCSSSVGDocumentValue):
* css/WebKitCSSTransformValue.h:
(WebCore::toWebKitCSSTransformValue):
2013-10-08 Thiago de Barros Lacerda <thiago.lacerda@openbossa.org>
Get MediaStreamCenterGStreamer compiling again
https://bugs.webkit.org/show_bug.cgi?id=122482
Reviewed by Eric Carlson.
r157068 was including a nonexistent header
No new tests needed.
* platform/mediastream/gstreamer/MediaStreamCenterGStreamer.cpp:
2013-10-08 Mario Sanchez Prada <mario.prada@samsung.com>
[ATK] Expose state of aria-invalid as ATK_STATE_INVALID_ENTRY
https://bugs.webkit.org/show_bug.cgi?id=122104
Reviewed by Chris Fleizach.
Map invalid state of an AccessibilityObject to the proper AtkState.
* accessibility/atk/WebKitAccessibleWrapperAtk.cpp:
(setAtkStateSetFromCoreObject): Add the mapping.
2013-10-07 Carlos Garcia Campos <cgarcia@igalia.com>
[GTK] media/video-src-blob.html
https://bugs.webkit.org/show_bug.cgi?id=102586
Reviewed by Martin Robinson.
Add support for loading videos using blob URLs.
Fixes media/video-src-blob.html.
* platform/graphics/gstreamer/WebKitWebSourceGStreamer.cpp:
(webKitWebSrcStart): Use BufferData buffering policy for blob
URLs.
(webKitWebSrcGetProtocols): Add blob to the list of supported
protocols.
(webKitWebSrcSetUri): Consider blob URLs as valid.
2013-10-07 Ryosuke Niwa <rniwa@webkit.org>
EventDispatchBehavior is unnecessary
https://bugs.webkit.org/show_bug.cgi?id=122483
Reviewed by Andreas Kling.
Removed EventDispatchBehavior and changed the return type of determineDispatchBehavior to bool.
Also renamed it to shouldEventCrossShadowBoundary to reflect the semantics more clear.
* dom/EventRetargeter.cpp:
(WebCore::shouldEventCrossShadowBoundary):
(WebCore::EventRetargeter::calculateEventPath):
* dom/EventRetargeter.h:
2013-10-07 Ryosuke Niwa <rniwa@webkit.org>
Make buildRelatedNodeMap and findRelatedNode static to EventRetargeter.cpp
https://bugs.webkit.org/show_bug.cgi?id=122477
Reviewed by Antti Koivisto.
Make EventRetargeter::buildRelatedNodeMap and EventRetargeter::findRelatedNode static local functions
in EventRetargeter.cpp since they're only called in EventRetargeter::calculateAdjustedNodes and don't
depend on any oher member function or variable (EventRetarger doesn't have any member variables).
Also get rid of Vector local variables in both functions as they're redundant.
* dom/EventRetargeter.cpp:
(WebCore::buildRelatedNodeMap): Moved. Replaced Vector<Node*, 32> relatedNodeStack by a single pointer
since the only time we add an item to this Vector is when it's empty, and we always use or remove the
last item.
(WebCore::addRelatedNodeForUnmapedTreeScopes): Renamed from EventRetargeter::findRelatedNode. Removed
Vector<TreeScope*, 32> parentTreeScopes since it only contains the ancestor tree scopes of scope up to
a tree scope already in relatedNodeMap. We could simply remember this tree scope and re-traverse the
ancestor tree scopes in the second loop.
(WebCore::EventRetargeter::calculateAdjustedNodes):
* dom/EventRetargeter.h:
2013-10-07 Andreas Kling <akling@apple.com>
CTTE: EditCommand always has a Document.
<https://webkit.org/b/122473>
Reviewed by Anders Carlsson.
Store a Ref<Document> in EditComment since it's never null.
Since Ref enforces more const consistency than RefPtr, I had to make
document() and frame() non-const here. Only a single method depended
on the old half-const behavior.
2013-10-07 Anders Carlsson <andersca@apple.com>
Update test again.
* bindings/scripts/test/JS/JSTestCallback.cpp:
(WebCore::JSTestCallback::~JSTestCallback):
2013-10-07 Commit Queue <commit-queue@webkit.org>
Unreviewed, rolling out r157061.
http://trac.webkit.org/changeset/157061
https://bugs.webkit.org/show_bug.cgi?id=122479
Broke worker tests (Requested by andersca on #webkit).
* Modules/webdatabase/Database.cpp:
(WebCore::DerefContextTask::create):
(WebCore::DerefContextTask::DerefContextTask):
(WebCore::Database::~Database):
(WebCore::DeliverPendingCallbackTask::create):
(WebCore::DeliverPendingCallbackTask::performTask):
(WebCore::DeliverPendingCallbackTask::DeliverPendingCallbackTask):
(WebCore::Database::scheduleTransactionCallback):
* Modules/webdatabase/DatabaseManager.cpp:
(WebCore::DatabaseCreationCallbackTask::create):
(WebCore::DatabaseCreationCallbackTask::performTask):
(WebCore::DatabaseCreationCallbackTask::DatabaseCreationCallbackTask):
(WebCore::DatabaseManager::openDatabase):
* Modules/webdatabase/SQLCallbackWrapper.h:
(WebCore::SQLCallbackWrapper::clear):
(WebCore::SQLCallbackWrapper::SafeReleaseTask::create):
(WebCore::SQLCallbackWrapper::SafeReleaseTask::performTask):
(WebCore::SQLCallbackWrapper::SafeReleaseTask::isCleanupTask):
(WebCore::SQLCallbackWrapper::SafeReleaseTask::SafeReleaseTask):
* Modules/websockets/ThreadableWebSocketChannelClientWrapper.cpp:
(WebCore::ThreadableWebSocketChannelClientWrapper::processPendingTasks):
* Modules/websockets/ThreadableWebSocketChannelClientWrapper.h:
* Modules/websockets/WorkerThreadableWebSocketChannel.cpp:
(WebCore::WorkerThreadableWebSocketChannel::WorkerGlobalScopeDidInitializeTask::create):
(WebCore::WorkerThreadableWebSocketChannel::WorkerGlobalScopeDidInitializeTask::~WorkerGlobalScopeDidInitializeTask):
(WebCore::WorkerThreadableWebSocketChannel::WorkerGlobalScopeDidInitializeTask::WorkerGlobalScopeDidInitializeTask):
(WebCore::WorkerThreadableWebSocketChannel::Bridge::mainThreadInitialize):
* bindings/js/JSCallbackData.h:
(WebCore::DeleteCallbackDataTask::create):
(WebCore::DeleteCallbackDataTask::performTask):
(WebCore::DeleteCallbackDataTask::isCleanupTask):
(WebCore::DeleteCallbackDataTask::DeleteCallbackDataTask):
* bindings/js/JSDOMGlobalObjectTask.h:
* bindings/js/JSDOMWindowBase.cpp:
(WebCore::JSDOMWindowBase::queueTaskToEventLoop):
* bindings/js/JSWorkerGlobalScopeBase.cpp:
(WebCore::JSWorkerGlobalScopeBase::queueTaskToEventLoop):
* bindings/scripts/CodeGeneratorJS.pm:
(GenerateCallbackImplementation):
* dom/CrossThreadTask.h:
(WebCore::CrossThreadTask1::create):
(WebCore::CrossThreadTask1::performTask):
(WebCore::CrossThreadTask2::create):
(WebCore::CrossThreadTask2::performTask):
(WebCore::CrossThreadTask3::create):
(WebCore::CrossThreadTask3::performTask):
(WebCore::CrossThreadTask4::create):
(WebCore::CrossThreadTask4::performTask):
(WebCore::CrossThreadTask5::create):
(WebCore::CrossThreadTask5::performTask):
(WebCore::CrossThreadTask6::create):
(WebCore::CrossThreadTask6::performTask):
(WebCore::CrossThreadTask7::create):
(WebCore::CrossThreadTask7::performTask):
(WebCore::CrossThreadTask8::create):
(WebCore::CrossThreadTask8::performTask):
(WebCore::createCallbackTask):
* dom/Document.cpp:
(WebCore::Document::addConsoleMessage):
(WebCore::Document::addMessage):
(WebCore::PerformTaskContext::PerformTaskContext):
(WebCore::Document::postTask):
(WebCore::Document::pendingTasksTimerFired):
* dom/Document.h:
* dom/ScriptExecutionContext.cpp:
(WebCore::ProcessMessagesSoonTask::create):
(WebCore::ProcessMessagesSoonTask::performTask):
(WebCore::ScriptExecutionContext::processMessagePortMessagesSoon):
* dom/ScriptExecutionContext.h:
(WebCore::ScriptExecutionContext::AddConsoleMessageTask::create):
(WebCore::ScriptExecutionContext::AddConsoleMessageTask::AddConsoleMessageTask):
* dom/StringCallback.cpp:
(WebCore::StringCallback::scheduleCallback):
* loader/appcache/ApplicationCacheGroup.cpp:
(WebCore::CallCacheListenerTask::create):
(WebCore::CallCacheListenerTask::CallCacheListenerTask):
(WebCore::ApplicationCacheGroup::postListenerTask):
* workers/DefaultSharedWorkerRepository.cpp:
(WebCore::SharedWorkerProxy::postTaskToLoader):
(WebCore::SharedWorkerProxy::postTaskForModeToWorkerGlobalScope):
(WebCore::SharedWorkerConnectTask::create):
(WebCore::SharedWorkerConnectTask::performTask):
(WebCore::DefaultSharedWorkerRepository::workerScriptLoaded):
(WebCore::DefaultSharedWorkerRepository::connectToWorker):
* workers/WorkerEventQueue.cpp:
(WebCore::WorkerEventQueue::enqueueEvent):
* workers/WorkerGlobalScope.cpp:
(WebCore::WorkerGlobalScope::close):
(WebCore::WorkerGlobalScope::postTask):
(WebCore::WorkerGlobalScope::addConsoleMessage):
(WebCore::WorkerGlobalScope::addMessage):
* workers/WorkerGlobalScope.h:
* workers/WorkerLoaderProxy.h:
* workers/WorkerMessagingProxy.cpp:
(WebCore::MessageWorkerGlobalScopeTask::create):
(WebCore::MessageWorkerGlobalScopeTask::performTask):
(WebCore::MessageWorkerTask::create):
(WebCore::MessageWorkerTask::performTask):
(WebCore::WorkerExceptionTask::create):
(WebCore::WorkerExceptionTask::performTask):
(WebCore::WorkerGlobalScopeDestroyedTask::create):
(WebCore::WorkerGlobalScopeDestroyedTask::performTask):
(WebCore::WorkerTerminateTask::create):
(WebCore::WorkerTerminateTask::WorkerTerminateTask):
(WebCore::WorkerTerminateTask::performTask):
(WebCore::WorkerThreadActivityReportTask::create):
(WebCore::WorkerThreadActivityReportTask::performTask):
(WebCore::PostMessageToPageInspectorTask::create):
(WebCore::PostMessageToPageInspectorTask::performTask):
(WebCore::NotifyNetworkStateChangeTask::create):
(WebCore::NotifyNetworkStateChangeTask::NotifyNetworkStateChangeTask):
(WebCore::NotifyNetworkStateChangeTask::performTask):
(WebCore::WorkerMessagingProxy::postMessageToWorkerObject):
(WebCore::WorkerMessagingProxy::postMessageToWorkerGlobalScope):
(WebCore::WorkerMessagingProxy::postTaskForModeToWorkerGlobalScope):
(WebCore::WorkerMessagingProxy::postTaskToLoader):
(WebCore::WorkerMessagingProxy::postExceptionToWorkerObject):
(WebCore::WorkerMessagingProxy::workerThreadCreated):
(WebCore::WorkerMessagingProxy::notifyNetworkStateChange):
(WebCore::WorkerMessagingProxy::workerGlobalScopeDestroyed):
(WebCore::WorkerMessagingProxy::workerGlobalScopeClosed):
(WebCore::WorkerMessagingProxy::postMessageToPageInspector):
(WebCore::WorkerMessagingProxy::confirmMessageFromWorkerObject):
(WebCore::WorkerMessagingProxy::reportPendingActivity):
* workers/WorkerMessagingProxy.h:
* workers/WorkerRunLoop.cpp:
(WebCore::WorkerRunLoop::postTask):
(WebCore::WorkerRunLoop::postTaskAndTerminate):
(WebCore::WorkerRunLoop::postTaskForMode):
(WebCore::WorkerRunLoop::Task::create):
(WebCore::WorkerRunLoop::Task::Task):
* workers/WorkerRunLoop.h:
* workers/WorkerThread.cpp:
(WebCore::WorkerThreadShutdownFinishTask::create):
(WebCore::WorkerThreadShutdownFinishTask::performTask):
(WebCore::WorkerThreadShutdownFinishTask::isCleanupTask):
(WebCore::WorkerThreadShutdownStartTask::performTask):
(WebCore::WorkerThread::stop):
(WebCore::WorkerThread::releaseFastMallocFreeMemoryInAllThreads):
2013-10-07 Darin Adler <darin@apple.com>
Make Vector::insert work for move-only types
https://bugs.webkit.org/show_bug.cgi?id=122429
Reviewed by Anders Carlsson.
* history/HistoryItem.cpp:
(WebCore::HistoryItem::padDailyCountsForNewVisit): Call insertVector.
Also added some inline capacity, which should make this faster.
2013-10-07 Anders Carlsson <andersca@apple.com>
Update test results.
* bindings/scripts/test/JS/JSTestCallback.cpp:
(WebCore::JSTestCallback::~JSTestCallback):
2013-10-04 Ojan Vafai <ojan@chromium.org> and Martin Robinson <mrobinson@igalia.com>
[MathML] Remove RenderTree modification during layout and refactor the StretchyOp code
https://bugs.webkit.org/show_bug.cgi?id=121416
Reviewed by David Hyatt.
Tests: mathml/presentation/mo-minus.html
mathml/presentation/mo-stacked-glyphs.html
mathml/presentation/mo-stretchy-vertical-bar.html
mathml/very-large-stretchy-operators.html
MathML stretched operators by both modifying the width of the operator
and adding children to the operator node in the render tree.
Instead we make the operator width equal to the widest glyph possible that we use
to represent the operator. Additionally instead of rendering stretchy glyphs via
stacked operator pieces in separate render tree nodes, keep only one node for the
glyph, and use a custom paint method to paint the stacked representation.
With this patch, rendering seems roughly equivalent on Mac and markedly better
on Linux.
* css/mathml.css:
Not sure what this line-height:0 was here for, but it caused bugs with the new code
* mathml/MathMLTextElement.cpp:
(WebCore::MathMLTextElement::attach):
(WebCore):
(WebCore::MathMLTextElement::childrenChanged):
Need to update the anonymous render tree below <mo> elements when their
children change or when the renderer is first attached.
* mathml/MathMLTextElement.h:
(MathMLTextElement):
* rendering/mathml/RenderMathMLBlock.cpp:
(WebCore::RenderMathMLBlock::RenderMathMLBlock):
* rendering/mathml/RenderMathMLBlock.h:
Now that the preferred width doesn't depend on the height, we don't
need to override computePreferredLogicalWidths at all.
* rendering/mathml/RenderMathMLFenced.cpp:
(WebCore::RenderMathMLFenced::makeFences):
(WebCore::RenderMathMLFenced::styleDidChange):
Need to update the anonymous renderers for the anonymous RenderMathMLOperators.
* rendering/mathml/RenderMathMLOperator.cpp:
(WebCore::RenderMathMLOperator::expandedStretchHeight):
Store the non-expanded stretch height so that we can detect when the height
actually changed.
(WebCore::RenderMathMLOperator::stretchToHeight):
Only update the style on the anonymous render tree since this is called
from RenderMathMLRow::layout
(WebCore::RenderMathMLOperator::styleDidChange):
(WebCore::RenderMathMLOperator::glyphBoundsForCharacter): A helper to get glyph boundaries.
(WebCore::RenderMathMLOperator::glyphHeightForCharacter): Ditto for glyph width.
(WebCore::RenderMathMLOperator::advanceForCharacter): The advance is different from the width,
and we want the width of the operator to be the advance instead of the tight bounding width.
(WebCore::RenderMathMLOperator::computePreferredLogicalWidths): Use the max of all possible glyphs
we can use to render this operator.
(WebCore::RenderMathMLOperator::computeLogicalHeight): Return the stretched operator height, if appropriate.
(WebCore::RenderMathMLOperator::updateFromElement): We add a child for rendering the non-scaled
version of the glyph.
(WebCore::RenderMathMLOperator::firstCharacterForStretching): Helper to figure out what character
is the character used for stretching operations.
(WebCore::RenderMathMLOperator::findAcceptableStretchyCharacter): Helper to find an acceptable set
of glyph pieces for stretching characters.
(WebCore::RenderMathMLOperator::updateStyle): Resize the operator to the appropriate height and hide
the child if we are using the stretchy style.
(WebCore::RenderMathMLOperator::firstLineBoxBaseline):
(WebCore::RenderMathMLOperator::paintCharacter): Helper to paint a single character component of the
stretchy glyph.
(WebCore::RenderMathMLOperator::fillWithExtensionGlyph): Helper to paint the extender glue between
features of the stretchy glyph.
(WebCore::RenderMathMLOperator::paint): Properly paint stretchy glyphs.
* rendering/mathml/RenderMathMLOperator.h: Update method declarations.
2013-10-07 Eric Carlson <eric.carlson@apple.com>
[MediaStream API] update MediaStreamTrack object to match spec
https://bugs.webkit.org/show_bug.cgi?id=121940
Reviewed by Jer Noble.
No new tests, existing test updated.
Add new source files to the project:
* CMakeLists.txt:
* DerivedSources.make:
* GNUmakefile.list.am:
* WebCore.xcodeproj/project.pbxproj:
New capability dictionary objects:
* Modules/mediastream/AllAudioCapabilities.h: Added.
* Modules/mediastream/AllAudioCapabilities.idl: Added.
* Modules/mediastream/AllVideoCapabilities.h: Added.
* Modules/mediastream/AllVideoCapabilities.idl: Added.
* Modules/mediastream/AudioStreamTrack.cpp:
(WebCore::AudioStreamTrack::create): New version that takes a MediaStreamTrack*.
* Modules/mediastream/AudioStreamTrack.h:
New object for a capability range:
* Modules/mediastream/CapabilityRange.cpp: Added.
* Modules/mediastream/CapabilityRange.h: Added.
* Modules/mediastream/CapabilityRange.idl: Added.
* Modules/mediastream/MediaConstraintsImpl.h: Make initialize() public.
New object for the current states for a media source.
* Modules/mediastream/MediaSourceStates.cpp: Added.
* Modules/mediastream/MediaSourceStates.h: Added.
* Modules/mediastream/MediaSourceStates.idl: Added.
Don't call the media stream center to notify it when the state of other
objects change.
* Modules/mediastream/MediaStream.cpp:
(WebCore::processTrack): Remove the stream source duplication hack.
(WebCore::createFromSourceVectors):
(WebCore::MediaStream::MediaStream):
(WebCore::MediaStream::addTrack):
(WebCore::MediaStream::removeTrack):
* Modules/mediastream/MediaStream.h:
New object for the capabilities of a source.
* Modules/mediastream/MediaStreamCapabilities.cpp: Added.
* Modules/mediastream/MediaStreamCapabilities.h: Added.
* Modules/mediastream/MediaStreamCapabilities.idl: Added.
Update interface to match spec.
* Modules/mediastream/MediaStreamTrack.cpp:
(WebCore::MediaStreamTrack::MediaStreamTrack): Define a copy constructor to use in clone().
(WebCore::MediaStreamTrack::setSource): Call removeObserver if the track already has a source.
Initialize m_muted from new source's muted state.
(WebCore::MediaStreamTrack::id): Allow source to provide ID as the spec suggests.
(WebCore::MediaStreamTrack::setEnabled): Add some spec text to clarify logic. Always call
source->setEnabled, it can figure out if nothing needs to be done.
(WebCore::MediaStreamTrack::muted): Don't call the stream center when muted changes, the
source can take care of notifying interested parties.
(WebCore::MediaStreamTrack::readonly): New.
(WebCore::MediaStreamTrack::remote): New.
(WebCore::MediaStreamTrack::constraints): New.
(WebCore::MediaStreamTrack::states): New.
(WebCore::MediaStreamTrack::capabilities): New.
(WebCore::MediaStreamTrack::applyConstraints): New.
(WebCore::MediaStreamTrack::clone): New.
(WebCore::MediaStreamTrack::stopProducingData): New.
(WebCore::MediaStreamTrack::sourceStateChanged): Renamed from sourceChangedState.
(WebCore::MediaStreamTrack::sourceMutedChanged): New.
(WebCore::MediaStreamTrack::sourceEnabledChanged): New.
(WebCore::MediaStreamTrack::configureTrackRendering): New.
(WebCore::MediaStreamTrack::stopped): New.
(WebCore::MediaStreamTrack::stop): Call stopProducingData.
(WebCore::MediaStreamTrack::scheduleEventDispatch): New.
(WebCore::MediaStreamTrack::dispatchQueuedEvents): New.
* Modules/mediastream/MediaStreamTrack.h:
* Modules/mediastream/MediaStreamTrack.idl:
* Modules/mediastream/MediaTrackConstraint.cpp: Added.
* Modules/mediastream/MediaTrackConstraint.h: Added.
* Modules/mediastream/MediaTrackConstraint.idl: Added.
// Add empty classes/IDL for track constraint objects.
* Modules/mediastream/MediaTrackConstraintSet.cpp: Added.
* Modules/mediastream/MediaTrackConstraintSet.h: Added.
* Modules/mediastream/MediaTrackConstraintSet.idl: Added.
* Modules/mediastream/MediaTrackConstraints.cpp: Added.
* Modules/mediastream/MediaTrackConstraints.h: Added.
* Modules/mediastream/MediaTrackConstraints.idl: Added.
* Modules/mediastream/UserMediaRequest.cpp:
(WebCore::UserMediaRequest::callSuccessHandler): Don't call the stream center, the
stream can take care of notifying interested parties.
// Add a constructor and create() that take a MediaStreamTrack*.
* Modules/mediastream/VideoStreamTrack.cpp:
(WebCore::VideoStreamTrack::create):
(WebCore::VideoStreamTrack::VideoStreamTrack):
* Modules/mediastream/VideoStreamTrack.h:
// Create a MediaStreamSource subclass for WebAudio
* Modules/webaudio/AudioContext.cpp:
(WebCore::AudioContext::createMediaStreamSource): Call isAudioStreamSource instead
of checking deviceID.
* Modules/webaudio/MediaStreamAudioDestinationNode.cpp:
(WebCore::MediaStreamAudioDestinationNode::MediaStreamAudioDestinationNode): Create a
MediaStreamAudioSource instead of a MediaStreamSource.
* Modules/webaudio/MediaStreamAudioDestinationNode.h:
* Modules/webaudio/MediaStreamAudioSource.cpp: Added.
* Modules/webaudio/MediaStreamAudioSource.h: Added.
(WebCore::MediaStreamAudioSource::~MediaStreamAudioSource):
// Add new generated files.
* bindings/js/JSMediaSourceStatesCustom.cpp: Added.
* bindings/js/JSMediaStreamCapabilitiesCustom.cpp: Added.
* dom/EventNames.h: Defined 'overconstrained' event.
* platform/mediastream/MediaStreamCenter.h: Get rid of all of the methods nobody uses.
It isn't clear that they are necessary, and we can add them back if/when we need them.
* platform/mediastream/MediaStreamDescriptor.cpp:
(WebCore::MediaStreamDescriptor::~MediaStreamDescriptor): Clear the all source streams.
(WebCore::MediaStreamDescriptor::removeSource): Clear the source stream.
* platform/mediastream/MediaStreamDescriptor.h:
// Make MediaStreamSource an abstract base class, and remove everyting WebAudio-specific
// to MediaStreamAudioSource.
* platform/mediastream/MediaStreamSource.cpp:
(WebCore::MediaStreamSource::MediaStreamSource): Remove readyState and requiresConsumer
parameters. Create new UUID for id if non was passed.
(WebCore::MediaStreamSource::reset): Reset internal state to just-constructed. Used for testing.
(WebCore::MediaStreamSource::setReadyState): sourceChangedState -> sourceStateChanged.
(WebCore::MediaStreamSource::setStream): Remove the ASSERT that check for a source being
added to a new stream. This is still a problem, but it is required for testing and will
be fixed as a part of bug 121954.
(WebCore::MediaStreamSource::setConstraints): Added.
(WebCore::MediaStreamSource::setMuted): Notify observers when muted changes.
(WebCore::MediaStreamSource::setEnabled): Notify observers when enabled changes.
(WebCore::MediaStreamSource::readonly): New.
(WebCore::MediaStreamSource::stop): New. Set state to Ended when all of the observers has
stopped.
* platform/mediastream/MediaStreamSource.h:
// Define platform versions of the Capabilities classes.
* platform/mediastream/MediaStreamSourceCapabilities.h: Added.
// Update the non-functional platform stream centers for the API changes.
* platform/mediastream/blackberry/MediaStreamCenterBlackBerry.cpp:
* platform/mediastream/blackberry/MediaStreamCenterBlackBerry.h:
* platform/mediastream/gstreamer/MediaStreamCenterGStreamer.cpp:
* platform/mediastream/gstreamer/MediaStreamCenterGStreamer.h:
* platform/mediastream/mac/MediaStreamCenterMac.cpp:
* platform/mediastream/mac/MediaStreamCenterMac.h:
// Update the Mock stream center for the API changes. Add a concrete mock MediaStreamSource
// subclass.
* platform/mock/MockMediaStreamCenter.cpp:
(WebCore::MockSource::MockSource): New, the mock media stream source.
(WebCore::MockSource::~MockSource):
(WebCore::MockSource::capabilities):
(WebCore::MockSource::states):
(WebCore::mockSourceMap):
(WebCore::mockAudioSourceID):
(WebCore::mockVideoSourceID):
(WebCore::initializeMockSources): Create one audio and one video mock source.
(WebCore::MockMediaStreamCenter::registerMockMediaStreamCenter): Call initializeMockSources.
(WebCore::MockMediaStreamCenter::createMediaStream): Use the already allocated mock media
sources.
(WebCore::MockMediaStreamCenter::getMediaStreamTrackSources): Ditto.
* platform/mock/MockMediaStreamCenter.h:
2013-10-07 Andreas Kling <akling@apple.com>
CTTE: Live node lists always have an owner Node.
<https://webkit.org/b/122470>
Reviewed by Anders Carlsson.
Make LiveNodeListBase::m_ownerNode a Ref<Node> instead of a RefPtr
and have all constructors take Node&.
2013-10-07 Anders Carlsson <andersca@apple.com>
Clean up ScriptExecutionContext::Task and subclasses
https://bugs.webkit.org/show_bug.cgi?id=122469
Reviewed by Andreas Kling.
* Modules/webdatabase/Database.cpp:
(WebCore::DerefContextTask::DerefContextTask):
(WebCore::Database::~Database):
(WebCore::DeliverPendingCallbackTask::DeliverPendingCallbackTask):
(WebCore::Database::scheduleTransactionCallback):
* Modules/webdatabase/DatabaseManager.cpp:
(WebCore::DatabaseCreationCallbackTask::DatabaseCreationCallbackTask):
(WebCore::DatabaseManager::openDatabase):
* Modules/webdatabase/SQLCallbackWrapper.h:
(WebCore::SQLCallbackWrapper::clear):
(WebCore::SQLCallbackWrapper::SafeReleaseTask::SafeReleaseTask):
* Modules/websockets/ThreadableWebSocketChannelClientWrapper.cpp:
(WebCore::ThreadableWebSocketChannelClientWrapper::processPendingTasks):
* Modules/websockets/ThreadableWebSocketChannelClientWrapper.h:
* Modules/websockets/WorkerThreadableWebSocketChannel.cpp:
(WebCore::WorkerThreadableWebSocketChannel::WorkerGlobalScopeDidInitializeTask::WorkerGlobalScopeDidInitializeTask):
(WebCore::WorkerThreadableWebSocketChannel::Bridge::mainThreadInitialize):
* bindings/js/JSCallbackData.h:
(WebCore::DeleteCallbackDataTask::DeleteCallbackDataTask):
* bindings/js/JSDOMGlobalObjectTask.h:
* bindings/js/JSDOMWindowBase.cpp:
(WebCore::JSDOMWindowBase::queueTaskToEventLoop):
* bindings/js/JSWorkerGlobalScopeBase.cpp:
(WebCore::JSWorkerGlobalScopeBase::queueTaskToEventLoop):
* bindings/scripts/CodeGeneratorJS.pm:
(GenerateCallbackImplementation):
* dom/CrossThreadTask.h:
(WebCore::createCallbackTask):
* dom/Document.cpp:
(WebCore::Document::addConsoleMessage):
(WebCore::Document::addMessage):
(WebCore::PerformTaskContext::PerformTaskContext):
(WebCore::Document::postTask):
(WebCore::Document::pendingTasksTimerFired):
* dom/Document.h:
* dom/ScriptExecutionContext.cpp:
(WebCore::ProcessMessagesSoonTask::ProcessMessagesSoonTask):
(WebCore::ScriptExecutionContext::processMessagePortMessagesSoon):
* dom/ScriptExecutionContext.h:
* dom/StringCallback.cpp:
(WebCore::StringCallback::scheduleCallback):
* loader/appcache/ApplicationCacheGroup.cpp:
(WebCore::CallCacheListenerTask::CallCacheListenerTask):
(WebCore::ApplicationCacheGroup::postListenerTask):
* workers/DefaultSharedWorkerRepository.cpp:
(WebCore::SharedWorkerProxy::postTaskToLoader):
(WebCore::SharedWorkerProxy::postTaskForModeToWorkerGlobalScope):
(WebCore::DefaultSharedWorkerRepository::workerScriptLoaded):
(WebCore::DefaultSharedWorkerRepository::connectToWorker):
* workers/WorkerEventQueue.cpp:
(WebCore::WorkerEventQueue::enqueueEvent):
* workers/WorkerGlobalScope.cpp:
(WebCore::WorkerGlobalScope::close):
(WebCore::WorkerGlobalScope::postTask):
(WebCore::WorkerGlobalScope::addConsoleMessage):
(WebCore::WorkerGlobalScope::addMessage):
* workers/WorkerGlobalScope.h:
* workers/WorkerLoaderProxy.h:
* workers/WorkerMessagingProxy.cpp:
(WebCore::WorkerMessagingProxy::postMessageToWorkerObject):
(WebCore::WorkerMessagingProxy::postMessageToWorkerGlobalScope):
(WebCore::WorkerMessagingProxy::postTaskForModeToWorkerGlobalScope):
(WebCore::WorkerMessagingProxy::postTaskToLoader):
(WebCore::WorkerMessagingProxy::postExceptionToWorkerObject):
(WebCore::WorkerMessagingProxy::workerThreadCreated):
(WebCore::WorkerMessagingProxy::notifyNetworkStateChange):
(WebCore::WorkerMessagingProxy::workerGlobalScopeDestroyed):
(WebCore::WorkerMessagingProxy::workerGlobalScopeClosed):
(WebCore::WorkerMessagingProxy::postMessageToPageInspector):
(WebCore::WorkerMessagingProxy::confirmMessageFromWorkerObject):
(WebCore::WorkerMessagingProxy::reportPendingActivity):
* workers/WorkerMessagingProxy.h:
* workers/WorkerRunLoop.cpp:
(WebCore::WorkerRunLoop::postTask):
(WebCore::WorkerRunLoop::postTaskAndTerminate):
(WebCore::WorkerRunLoop::postTaskForMode):
(WebCore::WorkerRunLoop::Task::Task):
* workers/WorkerRunLoop.h:
* workers/WorkerThread.cpp:
(WebCore::WorkerThreadShutdownFinishTask::WorkerThreadShutdownFinishTask):
(WebCore::WorkerThreadShutdownStartTask::performTask):
(WebCore::WorkerThread::stop):
(WebCore::WorkerThread::releaseFastMallocFreeMemoryInAllThreads):
2013-10-07 Sam Weinig <sam@webkit.org>
CTTE: Use references in and around DragController
https://bugs.webkit.org/show_bug.cgi?id=122427
Reviewed by Andreas Kling.
Use references to indicate non-nullness of DragController related
objects.
2013-10-07 Tim Horton <timothy_horton@apple.com>
Animated images are not restarted when page visibility changes
https://bugs.webkit.org/show_bug.cgi?id=122464
<rdar://problem/14293474>
Reviewed by Simon Fraser.
Always kickstart animated images when the page visibility changes,
which can occur via window occlusion, and which is independent of in-window
state, which we were previously using to advance animation.
No new tests; attempts to make a test have resulted only in a flaky, timing-dependent test.
* page/Frame.cpp:
(WebCore::Frame::resumeActiveDOMObjectsAndAnimations):
Move this call to resumeAnimatingImages() up to Page.
* page/FrameView.cpp:
(WebCore::FrameView::setIsInWindow):
Move this call to resumeAnimatingImages() up to Page.
* WebCore.exp.in
* page/FrameView.h:
* page/Page.h:
Move resumeAnimatingImages() itself up to Page.
* page/Page.cpp:
(WebCore::Page::setIsInWindow):
Resume animated images when we move in-window.
(WebCore::Page::setVisibilityState):
Resume animated images when we become visible.
This is the one we were previously missing.
(WebCore::Page::resumeActiveDOMObjectsAndAnimations):
Resume animated images when we're told to.
(WebCore::Page::resumeAnimatingImages):
Kickstart any animated images in all frames.
2013-10-07 Jer Noble <jer.noble@apple.com>
[Mac] Drawing video into canvas doesn't work on the first attempt
https://bugs.webkit.org/show_bug.cgi?id=122404
Reviewed by Eric Carlson.
Test: media/video-canvas-drawing.html
If creating and painting from an AVPlayerItemVideoOutput fails, fall back
to the (much slower) AVAssetImageGenerator path. Make sure to revert to the
AVPlayerItemVideoOutput path when that object begins to have available
images, however.
To do so, remove the "__MAC_OS_X_VERSION_MIN_REQUIRED < 1080" check around
the AVAssetImageGenerator code, and allow both the image generator and video
output to exist simultaneously.
* platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.h:
* platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
(WebCore::MediaPlayerPrivateAVFoundationObjC::hasContextRenderer):
(WebCore::MediaPlayerPrivateAVFoundationObjC::destroyContextVideoRenderer):
(WebCore::MediaPlayerPrivateAVFoundationObjC::destroyImageGenerator):
(WebCore::MediaPlayerPrivateAVFoundationObjC::paintCurrentFrameInContext):
(WebCore::MediaPlayerPrivateAVFoundationObjC::videoOutputHasAvailableFrame):
(WebCore::MediaPlayerPrivateAVFoundationObjC::paintWithVideoOutput):
2013-10-07 Jer Noble <jer.noble@apple.com>
URLMediaSource.idl and URLMediaStream.idl are wrong
https://bugs.webkit.org/show_bug.cgi?id=122301
Reviewed by Philippe Normand.
Rename URLMediaSource and URLMediaStream to DOMURLMediaSource and DOMURLMediaStream,
respectively.
Update the build files:
* CMakeLists.txt: Rename URL -> DOMURL.
* DerivedSources.make: Ditto.
* GNUmakefile.list.am: Ditto.
* WebCore.xcodeproj/project.pbxproj: Ditto.
Rename the .idl and implementation files:
* Modules/mediasource/DOMURLMediaSource.cpp: Renamed from Source/WebCore/Modules/mediasource/URLMediaSource.cpp.
(WebCore::DOMURLMediaSource::createObjectURL):
* Modules/mediasource/DOMURLMediaSource.h: Renamed from Source/WebCore/Modules/mediasource/URLMediaSource.h.
* Modules/mediasource/DOMURLMediaSource.idl: Renamed from Source/WebCore/Modules/mediasource/URLMediaSource.idl.
* Modules/mediastream/DOMURLMediaStream.cpp: Renamed from Source/WebCore/Modules/mediastream/URLMediaStream.cpp.
(WebCore::DOMURLMediaStream::createObjectURL):
* Modules/mediastream/DOMURLMediaStream.h: Renamed from Source/WebCore/Modules/mediastream/URLMediaStream.h.
* Modules/mediastream/DOMURLMediaStream.idl: Renamed from Source/WebCore/Modules/mediastream/URLMediaStream.idl.
2013-10-07 Philippe Normand <pnormand@igalia.com>
Conditional support in bindings code generator for overloaded functions
https://bugs.webkit.org/show_bug.cgi?id=122443
Reviewed by Darin Adler.
* bindings/scripts/CodeGeneratorJS.pm:
(GenerateOverloadedFunction): Generate conditional for overloaded
function, if it's present in the idl.
(GenerateImplementation): Close the last overloaded function
conditional before generating the distpatch function.
* bindings/scripts/test/JS/JSTestObj.cpp:
(WebCore::jsTestObjConstructorFunctionOverloadedMethod1):
Rebaseline overloaded function tests.
2013-10-07 Tim Horton <timothy_horton@apple.com>
-webkit-cross-fade paints SVGs at full opacity during cross-fade
https://bugs.webkit.org/show_bug.cgi?id=122441
<rdar://problem/13973162>
Reviewed by Simon Fraser.
Test: css3/images/cross-fade-svg-with-opacity.html
* platform/graphics/CrossfadeGeneratedImage.cpp:
(WebCore::drawCrossfadeSubimage):
(WebCore::CrossfadeGeneratedImage::drawCrossfade):
Factor the image painting out into a function.
Conditionally use a transparency layer around painting if the image
we're drawing is an SVG (SVGImage is the only Image subclass that will
not respect the context's opacity).
2013-10-06 Anders Carlsson <andersca@apple.com>
Add OVERRIDE and virtual where appropriate
https://bugs.webkit.org/show_bug.cgi?id=122439
Reviewed by Antti Koivisto.
* Modules/encryptedmedia/MediaKeys.h:
* Modules/webaudio/AnalyserNode.h:
* Modules/webaudio/AudioBasicInspectorNode.h:
* Modules/webaudio/AudioBasicProcessorNode.h:
* Modules/webaudio/AudioBufferSourceNode.h:
* Modules/webaudio/AudioContext.h:
* Modules/webaudio/AudioDestinationNode.h:
* Modules/webaudio/AudioProcessingEvent.h:
* Modules/webaudio/BiquadDSPKernel.h:
* Modules/webaudio/BiquadProcessor.h:
* Modules/webaudio/ChannelMergerNode.h:
* Modules/webaudio/ChannelSplitterNode.h:
* Modules/webaudio/ConvolverNode.h:
* Modules/webaudio/DelayDSPKernel.h:
* Modules/webaudio/DelayProcessor.h:
* Modules/webaudio/DynamicsCompressorNode.h:
* Modules/webaudio/GainNode.h:
* Modules/webaudio/MediaElementAudioSourceNode.h:
* Modules/webaudio/OfflineAudioCompletionEvent.h:
* Modules/webaudio/OfflineAudioDestinationNode.h:
* Modules/webaudio/OscillatorNode.h:
* Modules/webaudio/PannerNode.h:
* Modules/webaudio/ScriptProcessorNode.h:
* Modules/webaudio/WaveShaperProcessor.h:
* accessibility/AccessibilityARIAGrid.h:
* accessibility/AccessibilityARIAGridCell.h:
* accessibility/AccessibilityARIAGridRow.h:
* accessibility/AccessibilityImageMapLink.h:
* accessibility/AccessibilityList.h:
* accessibility/AccessibilityListBox.h:
* accessibility/AccessibilityListBoxOption.h:
* accessibility/AccessibilityMediaControls.h:
* accessibility/AccessibilityMenuList.h:
* accessibility/AccessibilityMenuListOption.h:
* accessibility/AccessibilityMenuListPopup.h:
* accessibility/AccessibilityMockObject.h:
* accessibility/AccessibilityNodeObject.h:
* accessibility/AccessibilityProgressIndicator.h:
* accessibility/AccessibilityRenderObject.h:
* accessibility/AccessibilitySVGRoot.h:
* accessibility/AccessibilityScrollView.h:
* accessibility/AccessibilityScrollbar.h:
* accessibility/AccessibilitySlider.h:
* accessibility/AccessibilitySpinButton.h:
* accessibility/AccessibilityTable.h:
* accessibility/AccessibilityTableCell.h:
* accessibility/AccessibilityTableColumn.h:
* accessibility/AccessibilityTableHeaderContainer.h:
* accessibility/AccessibilityTableRow.h:
* bindings/js/JSEventListener.h:
* bindings/js/WebCoreTypedArrayController.h:
* bridge/c/c_class.h:
* bridge/c/c_instance.h:
* bridge/c/c_runtime.h:
* bridge/runtime_root.h:
* css/CSSBasicShapes.h:
* css/CSSComputedStyleDeclaration.h:
* css/CSSStyleSheet.h:
* dom/Attr.h:
* dom/BeforeTextInsertedEvent.h:
* dom/CDATASection.h:
* dom/ChildNodeList.h:
* dom/DatasetDOMStringMap.h:
* dom/Document.h:
* dom/DocumentEventQueue.h:
* dom/DocumentFragment.h:
* dom/Element.h:
* dom/ErrorEvent.h:
* dom/KeyboardEvent.h:
* dom/Node.h:
* dom/PageTransitionEvent.h:
* dom/ProgressEvent.h:
* dom/PseudoElement.h:
* dom/ScriptExecutionContext.h:
* dom/ShadowRoot.h:
* dom/StyledElement.h:
* dom/TagNodeList.h:
* dom/Text.h:
* dom/TextEvent.h:
* dom/TransitionEvent.h:
* dom/UIEvent.h:
* dom/WebKitAnimationEvent.h:
* dom/WebKitTransitionEvent.h:
* editing/ApplyBlockElementCommand.h:
* editing/ApplyStyleCommand.h:
* editing/BreakBlockquoteCommand.h:
* editing/CompositeEditCommand.h:
* editing/SpellingCorrectionCommand.h:
* fileapi/File.h:
* fileapi/FileThreadTask.h:
* history/BackForwardList.h:
* html/BaseCheckableInputType.h:
* html/HTMLAnchorElement.h:
* html/HTMLAreaElement.h:
* html/HTMLCanvasElement.h:
* html/HTMLCollection.h:
* html/HTMLElement.h:
* html/HTMLFieldSetElement.h:
* html/HTMLFormControlElement.h:
* html/HTMLFormControlElementWithState.h:
* html/HTMLFormElement.h:
* html/HTMLFrameElementBase.h:
* html/HTMLImageElement.h:
* html/HTMLImageLoader.h:
* html/HTMLInputElement.h:
* html/HTMLLabelElement.h:
* html/HTMLLegendElement.h:
* html/HTMLMediaElement.h:
* html/HTMLMeterElement.h:
* html/HTMLOptGroupElement.h:
* html/HTMLOptionElement.h:
* html/HTMLPlugInElement.h:
* html/HTMLPlugInImageElement.h:
* html/HTMLProgressElement.h:
* html/HTMLSelectElement.h:
* html/HTMLTableElement.h:
* html/HTMLTextAreaElement.h:
* html/HTMLTextFormControlElement.h:
* html/HTMLVideoElement.h:
* html/canvas/CanvasRenderingContext2D.cpp:
* html/shadow/MediaControlElementTypes.h:
* html/shadow/MediaControlElements.h:
* html/shadow/SpinButtonElement.h:
* html/shadow/TextControlInnerElements.h:
* html/track/AudioTrackList.h:
* html/track/TextTrackList.h:
* html/track/TrackListBase.h:
* inspector/InspectorValues.h:
* loader/EmptyClients.h:
* loader/ImageLoader.h:
* loader/ResourceLoader.h:
* loader/SubresourceLoader.h:
* loader/appcache/ApplicationCacheGroup.cpp:
* loader/appcache/ApplicationCacheGroup.h:
* loader/appcache/DOMApplicationCache.h:
* loader/archive/cf/LegacyWebArchive.h:
* loader/cache/CachedCSSStyleSheet.h:
* loader/cache/CachedFont.h:
* loader/cache/CachedFontClient.h:
* loader/cache/CachedImageClient.h:
* loader/cache/CachedSVGDocumentClient.h:
* loader/cache/CachedStyleSheetClient.h:
* loader/cache/CachedXSLStyleSheet.h:
* page/Chrome.h:
* page/DOMWindow.h:
* page/FrameView.h:
* page/animation/ImplicitAnimation.h:
* platform/PODIntervalTree.h:
* platform/PODRedBlackTree.h:
* platform/ScrollView.h:
* platform/Scrollbar.h:
* platform/Timer.h:
* platform/animation/TimingFunction.h:
(WebCore::LinearTimingFunction::~LinearTimingFunction):
(WebCore::CubicBezierTimingFunction::~CubicBezierTimingFunction):
(WebCore::StepsTimingFunction::~StepsTimingFunction):
* platform/audio/AudioDSPKernelProcessor.h:
* platform/audio/HRTFPanner.h:
* platform/audio/mac/AudioDestinationMac.h:
* platform/graphics/SimpleFontData.h:
* platform/graphics/avfoundation/InbandTextTrackPrivateAVF.h:
* platform/graphics/avfoundation/MediaPlayerPrivateAVFoundation.h:
* platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.h:
* platform/graphics/filters/FilterOperation.h:
* platform/network/ResourceHandle.h:
* rendering/AutoTableLayout.h:
* rendering/ClipPathOperation.h:
* rendering/InlineFlowBox.h:
* rendering/RenderBlock.h:
* rendering/RenderBox.h:
* rendering/RenderBoxModelObject.h:
* rendering/RenderButton.h:
* rendering/RenderFieldset.h:
* rendering/RenderFileUploadControl.h:
* rendering/RenderFlexibleBox.h:
* rendering/RenderFlowThread.h:
* rendering/RenderFullScreen.h:
* rendering/RenderImage.h:
* rendering/RenderLayer.h:
* rendering/RenderLineBreak.h:
* rendering/RenderListBox.h:
* rendering/RenderListItem.h:
* rendering/RenderListMarker.h:
* rendering/RenderMenuList.h:
* rendering/RenderMeter.h:
* rendering/RenderObject.h:
* rendering/RenderReplaced.h:
* rendering/RenderSlider.h:
* rendering/RenderTable.h:
* rendering/RenderTableCell.h:
* rendering/RenderText.h:
* rendering/RenderTextControl.h:
* rendering/RenderTextControlSingleLine.h:
* rendering/RenderTextFragment.h:
* rendering/RenderView.h:
* rendering/RootInlineBox.h:
* rendering/mathml/RenderMathMLBlock.h:
* rendering/mathml/RenderMathMLFraction.h:
* rendering/mathml/RenderMathMLOperator.h:
* rendering/style/BasicShapes.h:
* rendering/svg/RenderSVGModelObject.h:
* rendering/svg/RenderSVGShape.h:
* svg/SVGAnimatedBoolean.h:
* svg/SVGAnimatedString.h:
* svg/SVGAnimatedTransformList.h:
* svg/SVGDocument.h:
* svg/SVGElement.h:
* svg/SVGElementInstance.h:
* svg/SVGFontElement.h:
* svg/SVGGElement.h:
* svg/SVGGraphicsElement.h:
* svg/SVGTransformable.h:
* svg/properties/SVGAnimatedListPropertyTearOff.h:
* svg/properties/SVGAnimatedPropertyMacros.h:
* svg/properties/SVGAnimatedTransformListPropertyTearOff.h:
* svg/properties/SVGListPropertyTearOff.h:
* svg/properties/SVGPropertyTearOff.h:
* workers/WorkerGlobalScope.h:
2013-10-07 Philippe Normand <pnormand@igalia.com>
URLMediaStream is unguarded by ENABLE(MEDIA_STREAM)
https://bugs.webkit.org/show_bug.cgi?id=122444
Reviewed by Martin Robinson.
* Modules/mediastream/URLMediaStream.cpp: Added missing
conditional guards.
* Modules/mediastream/URLMediaStream.h: Ditto.
2013-10-07 Philippe Normand <pnormand@igalia.com>
[GTK] webkit_dom_html_style_element_{s,g}et_scoped was removed
https://bugs.webkit.org/show_bug.cgi?id=122446
Reviewed by Martin Robinson.
Added skeleton functions warning of removed functionality for
the <style scoped> GObject DOM binding.
* bindings/gobject/WebKitDOMCustom.cpp:
* bindings/gobject/WebKitDOMCustom.h:
* bindings/gobject/WebKitDOMCustom.symbols:
2013-10-07 Csaba Osztrogonác <ossy@webkit.org>
Unreviewed buildfix for GCC 4.6.
Changed override to OVERRIDE and final to FINAL.
* page/PageSerializer.cpp:
* workers/AbstractWorker.h:
* workers/SharedWorker.h:
* workers/Worker.h:
2013-10-07 Chris Fleizach <cfleizach@apple.com>
AX: Facebook wrapped a file upload button in an unfocusable ARIA button, which doesn't work with AXPress.
https://bugs.webkit.org/show_bug.cgi?id=122252
Reviewed by Mario Sanchez Prada.
When an author uses a control-type ARIA role (like button), but then hides a native control-type inside,
AXPress needs to operate on the inside node if possible.
Test: accessibility/axpress-on-aria-button.html
* accessibility/AccessibilityNodeObject.cpp:
(WebCore::isNodeActionElement):
(WebCore::nativeActionElement):
(WebCore::AccessibilityNodeObject::actionElement):
2013-10-07 Zan Dobersek <zdobersek@igalia.com>
Unreviewed debug build fix for ports enabling the <template> element support.
* html/HTMLTagNames.in: Generate type helpers for the <template> element as they're required
by the assertions in the Element type casts for HTMLTemplateElement.
2013-10-07 Ryuan Choi <ryuan.choi@samsung.com>
[EFL] Build fix after r157002
https://bugs.webkit.org/show_bug.cgi?id=122434
Reviewed by Sam Weinig.
* editing/markup.cpp: Changed override to OVERRIDE.
2013-10-04 Philippe Normand <pnormand@igalia.com>
MediaStreamTrack can't be FINAL
https://bugs.webkit.org/show_bug.cgi?id=122322
Reviewed by Darin Adler.
Marked the MediaStreamTrack subclasses as final.
* Modules/mediastream/AudioStreamTrack.h:
* Modules/mediastream/MediaStreamTrack.h:
* Modules/mediastream/VideoStreamTrack.h:
2013-10-06 Gyuyoung Kim <gyuyoung.kim@samsung.com>
Generate toCSSFooValue() for CSSCursorImageValue, CSSCubicBezierTimingFunctionValue, CSSStepsTimingFunctionValue and CSSUnicodeRangeValue
https://bugs.webkit.org/show_bug.cgi?id=122408
Reviewed by Andreas Kling.
As a step to use toCSSFooValue, this patch generates toCSSFooValue() for CSSCursorImageValue,
CSSCubicBezierTimingFunctionValue, CSSStepsTimingFunctionValue and CSSUnicodeRangeValue.
This will help to detect bad type cast.
No new tests, no behavior changes.
* css/CSSCursorImageValue.h:
* css/CSSTimingFunctionValue.h:
* css/CSSToStyleMap.cpp:
(WebCore::CSSToStyleMap::mapAnimationTimingFunction):
* css/CSSUnicodeRangeValue.h:
* css/CSSValue.cpp:
(WebCore::CSSValue::destroy):
* css/DeprecatedStyleBuilder.cpp:
(WebCore::ApplyPropertyCursor::applyValue):
* css/StyleResolver.cpp:
(WebCore::StyleResolver::styleImage):
(WebCore::StyleResolver::styleShader):
* rendering/style/StylePendingImage.h:
(WebCore::StylePendingImage::cssCursorImageValue):
2013-10-06 Andreas Kling <akling@apple.com>
Range constructors should take a Document&.
<https://webkit.org/b/122435>
Reviewed by Sam Weinig.
Make all Range constructors take Document& instead of a PassRefPtr.
This removes one null check at every call site.
Also use a Ref<Document> for storage in Range.
2013-10-06 Antti Koivisto <antti@apple.com>
Factor text paint style computation out from InlineTextBox
https://bugs.webkit.org/show_bug.cgi?id=122433
Reviewed by Andreas Kling.
Move it to TextPaintStyle.h/cpp. Other parts of the code may use it in the future.
2013-10-06 Darin Adler <darin@apple.com>
[GTK] Get rid of use of deleteAllValues in GtkDragAndDropHelper
https://bugs.webkit.org/show_bug.cgi?id=122417
Reviewed by Andreas Kling.
* platform/gtk/GtkDragAndDropHelper.cpp: Removed unneeded typedefs.
(WebCore::GtkDragAndDropHelper::~GtkDragAndDropHelper): Removed call to
deleteAllValues.
(WebCore::GtkDragAndDropHelper::handleDragEnd): Use remove directly instead
of using find then remove. I believe this fixes a storage leak.
(WebCore::GtkDragAndDropHelper::handleGetDragData): Use get instead of find.
(WebCore::GtkDragAndDropHelper::handleDragLeaveLater): Remove the explicit
delete since remove will automatically delete.
(WebCore::GtkDragAndDropHelper::handleDragLeave): Use get instead of find.
(WebCore::GtkDragAndDropHelper::handleDragMotion): Use add instead of a
combination of find and set. Also user nullptr instead of 0.
(WebCore::GtkDragAndDropHelper::handleDragDataReceived): Use get instead of find.
(WebCore::GtkDragAndDropHelper::handleDragDrop): Use get instead of find.
* platform/gtk/GtkDragAndDropHelper.h: Use nullptr instead of 0. Change value
type of m_droppingContexts to be a std::unique_ptr.
2013-10-06 Andreas Kling <akling@apple.com>
Windows build fix attempt.
* page/win/DragControllerWin.cpp:
(WebCore::DragController::declareAndWriteDragImage):
2013-10-06 Antti Koivisto <antti@apple.com>
Move paint() to RenderElement
https://bugs.webkit.org/show_bug.cgi?id=122371
Reviewed by Darin Adler.
RenderText does not paint itself (text is painted by line boxes). We can move paint() down
to RenderElement.
This also requires some type tightening elsewhere in the code.
2013-10-06 Antti Koivisto <antti@apple.com>
Don't try to dispatch resize events for SVG images
https://bugs.webkit.org/show_bug.cgi?id=122410
Reviewed by Darin Adler.
Tested by avoiding assertion in svg/custom/large-image-pattern-crash.html
* page/FrameView.cpp:
(WebCore::FrameView::sendResizeEventIfNeeded):
Bail out for SVG images. They have scripting disabled so the event wouldn't do anything anyway.
Use of FrameView mechanisms is just an implementation detail for SVG images, they are not
meant to act like real frames.
* rendering/svg/RenderSVGResourcePattern.cpp:
(WebCore::RenderSVGResourcePattern::createTileImage):
Switch to Element iterator. This will take NoEventDispatchAssertion verifying the change.
2013-10-06 Andreas Kling <akling@apple.com>
Element ancestor iterator should have a first() for convenience.
<https://webkit.org/b/122425>
Reviewed by Antti Koivisto.
Added an easy way to get the first element ancestor of a certain type
and put it to use in a few places.
2013-10-06 Andreas Kling <akling@apple.com>
CTTE: FrameLoader::notifier() should return a reference.
<https://webkit.org/b/122424>
Reviewed by Anders Carlsson.
It was just returning the address of an inline member, so we should
use a reference instead. Also made the backpointer to Frame in
ResourceLoadNotifier a reference.
2013-10-06 Andreas Kling <akling@apple.com>
Avoid layout in window.scroll{Y,X} when at topmost/leftmost position.
<https://webkit.org/b/122423>
Reviewed by Antti Koivisto.
Add a fast path for these properties to skip synchronous layout when
we are just going to return 0 anyway.
* page/DOMWindow.cpp:
(WebCore::DOMWindow::scrollX):
(WebCore::DOMWindow::scrollY):
2013-10-06 Anders Carlsson <andersca@apple.com>
Clean up ContentData
https://bugs.webkit.org/show_bug.cgi?id=122421
Reviewed by Andreas Kling.
Replace uses of OwnPtr with std::unique_ptr and get rid of the ContentData::create overloads.
* css/StyleResolver.cpp:
(WebCore::StyleResolver::applyProperty):
* rendering/style/ContentData.cpp:
(WebCore::ContentData::clone):
* rendering/style/ContentData.h:
(WebCore::ContentData::setNext):
* rendering/style/RenderStyle.cpp:
(WebCore::RenderStyle::appendContent):
(WebCore::RenderStyle::setContent):
* rendering/style/RenderStyle.h:
* rendering/style/StyleRareNonInheritedData.h:
2013-10-06 Sam Weinig <sam@webkit.org>
Be a bit shouty about final classes while we look into why the bots don't like it.
* dom/Comment.h:
* dom/ProcessingInstruction.h:
* editing/markup.cpp:
* page/PageSerializer.cpp:
* workers/SharedWorker.h:
* workers/Worker.h:
2013-10-06 Sam Weinig <sam@webkit.org>
Fix windows build.
* platform/win/ClipboardUtilitiesWin.cpp:
(WebCore::fragmentFromCFHTML):
(WebCore::fragmentFromHTML):
* platform/win/PasteboardWin.cpp:
(WebCore::Pasteboard::writeRangeToDataObject):
(WebCore::Pasteboard::writeSelection):
2013-10-05 Sam Weinig <sam@webkit.org>
CTTE: Thread references through markup.h
https://bugs.webkit.org/show_bug.cgi?id=122403
Reviewed by Darin Adler and Andreas Kling.
Highlights:
- Removed createFragmentFromMarkupWithContext(), it was unused.
- Moved createFragmentFromNodes() into its one caller (in WebKit/mac)
- Add a bunch more toFoo() overloads.
2013-10-06 Zan Dobersek <zdobersek@igalia.com>
[WebIDL] Annotate IDL interfaces under Source/WebCore/Modules/ with the OperationsNotDeletable attribute
https://bugs.webkit.org/show_bug.cgi?id=122281
Before changing the JSC bindings generator to enforce WebIDL operations to be configurable, all the
interfaces are being annotated with the OperationsNotDeletable attribute. The attribute currently
doesn't have any effect, but will keep the operations not configurable after the generator is modified
to preserve the original behavior. The attribute will be removed from each interface after checking
conformity with other browsers (in terms of configurability of operations of that interface) and the
WebKit's existing test suites.
This patch covers IDL interfaces under Source/WebCore/Modules/.
* Modules/battery/BatteryManager.idl:
* Modules/encryptedmedia/MediaKeySession.idl:
* Modules/encryptedmedia/MediaKeys.idl:
* Modules/gamepad/GamepadList.idl:
* Modules/geolocation/Geolocation.idl:
* Modules/indexeddb/IDBCursor.idl:
* Modules/indexeddb/IDBDatabase.idl:
* Modules/indexeddb/IDBFactory.idl:
* Modules/indexeddb/IDBIndex.idl:
* Modules/indexeddb/IDBKeyRange.idl:
* Modules/indexeddb/IDBObjectStore.idl:
* Modules/indexeddb/IDBTransaction.idl:
* Modules/indexeddb/IDBVersionChangeEvent.idl:
* Modules/mediacontrols/MediaControlsHost.idl:
* Modules/mediasource/MediaSource.idl:
* Modules/mediasource/SourceBuffer.idl:
* Modules/mediasource/SourceBufferList.idl:
* Modules/mediasource/WebKitMediaSource.idl:
* Modules/mediasource/WebKitSourceBuffer.idl:
* Modules/mediasource/WebKitSourceBufferList.idl:
* Modules/mediastream/MediaStream.idl:
* Modules/mediastream/MediaStreamTrack.idl:
* Modules/mediastream/RTCDTMFSender.idl:
* Modules/mediastream/RTCDataChannel.idl:
* Modules/mediastream/RTCPeerConnection.idl:
* Modules/mediastream/RTCStatsReport.idl:
* Modules/mediastream/RTCStatsResponse.idl:
* Modules/networkinfo/NetworkInfoConnection.idl:
* Modules/notifications/Notification.idl:
* Modules/notifications/NotificationCenter.idl:
* Modules/proximity/DeviceProximityEvent.idl:
* Modules/quota/StorageInfo.idl:
* Modules/quota/StorageQuota.idl:
* Modules/speech/SpeechGrammarList.idl:
* Modules/speech/SpeechRecognition.idl:
* Modules/speech/SpeechRecognitionResult.idl:
* Modules/speech/SpeechRecognitionResultList.idl:
* Modules/speech/SpeechSynthesis.idl:
* Modules/webaudio/AnalyserNode.idl:
* Modules/webaudio/AudioBuffer.idl:
* Modules/webaudio/AudioBufferSourceNode.idl:
* Modules/webaudio/AudioContext.idl:
* Modules/webaudio/AudioListener.idl:
* Modules/webaudio/AudioNode.idl:
* Modules/webaudio/AudioParam.idl:
* Modules/webaudio/BiquadFilterNode.idl:
* Modules/webaudio/OscillatorNode.idl:
* Modules/webaudio/PannerNode.idl:
* Modules/webdatabase/Database.idl:
* Modules/webdatabase/DatabaseSync.idl:
* Modules/webdatabase/SQLResultSetRowList.idl:
* Modules/webdatabase/SQLTransaction.idl:
* Modules/webdatabase/SQLTransactionSync.idl:
* Modules/websockets/WebSocket.idl:
2013-10-06 Andreas Kling <akling@apple.com>
Tighten AbstractWorker and subclasses a bit.
<https://webkit.org/b/122402>
Reviewed by Darin Adler.
- Make the Worker and SharedWorker classes final.
- Have constructors take ScriptExecutionContext by reference.
- Remove unnecessary AbstractWorker::contextDestroyed() override.
- Make eventTargetInterface() inline.
Inlining eventTargetInterface() is quite neat - since we only ever
call this on tightly typed pointers from generated code, combining
final and inline turns the virtual call into a compile-time constant.
2013-10-06 Zan Dobersek <zdobersek@igalia.com>
[WebIDL] Annotate IDL interfaces under Source/WebCore/html/ with the OperationsNotDeletable attribute
https://bugs.webkit.org/show_bug.cgi?id=122280
Reviewed by Darin Adler.
Before changing the JSC bindings generator to enforce WebIDL operations to be configurable, all the
interfaces are being annotated with the OperationsNotDeletable attribute. The attribute currently
doesn't have any effect, but will keep the operations not configurable after the generator is modified
to preserve the original behavior. The attribute will be removed from each interface after checking
conformity with other browsers (in terms of configurability of operations of that interface) and the
WebKit's existing test suites.
This patch covers IDL interfaces under Source/WebCore/html/.
* html/DOMFormData.idl:
* html/DOMSettableTokenList.idl:
* html/DOMTokenList.idl:
* html/DOMURL.idl:
* html/HTMLAllCollection.idl:
* html/HTMLAnchorElement.idl:
* html/HTMLButtonElement.idl:
* html/HTMLCanvasElement.idl:
* html/HTMLCollection.idl:
* html/HTMLDocument.idl:
* html/HTMLElement.idl:
* html/HTMLEmbedElement.idl:
* html/HTMLFieldSetElement.idl:
* html/HTMLFormControlsCollection.idl:
* html/HTMLFormElement.idl:
* html/HTMLFrameElement.idl:
* html/HTMLIFrameElement.idl:
* html/HTMLInputElement.idl:
* html/HTMLKeygenElement.idl:
* html/HTMLMarqueeElement.idl:
* html/HTMLMediaElement.idl:
* html/HTMLObjectElement.idl:
* html/HTMLOptionsCollection.idl:
* html/HTMLOutputElement.idl:
* html/HTMLSelectElement.idl:
* html/HTMLTableElement.idl:
* html/HTMLTableRowElement.idl:
* html/HTMLTableSectionElement.idl:
* html/HTMLTextAreaElement.idl:
* html/HTMLVideoElement.idl:
* html/MediaController.idl:
* html/RadioNodeList.idl:
* html/TimeRanges.idl:
* html/canvas/CanvasGradient.idl:
* html/canvas/CanvasRenderingContext2D.idl:
* html/canvas/DOMPath.idl:
* html/canvas/EXTDrawBuffers.idl:
* html/canvas/OESVertexArrayObject.idl:
* html/canvas/WebGLDebugShaders.idl:
* html/canvas/WebGLLoseContext.idl:
* html/canvas/WebGLRenderingContext.idl:
* html/track/AudioTrackList.idl:
* html/track/TextTrack.idl:
* html/track/TextTrackCue.idl:
* html/track/TextTrackCueList.idl:
* html/track/TextTrackList.idl:
* html/track/TextTrackRegionList.idl:
* html/track/VideoTrackList.idl:
2013-10-06 Zan Dobersek <zdobersek@igalia.com>
[WebIIDL] Annotate IDL interfaces under Source/WebCore/svg/ with the OperationsNotDeletable attribute
https://bugs.webkit.org/show_bug.cgi?id=122279
Reviewed by Darin Adler.
Before changing the JSC bindings generator to enforce WebIDL operations to be configurable, all the
interfaces are being annotated with the OperationsNotDeletable attribute. The attribute currently
doesn't have any effect, but will keep the operations not configurable after the generator is modified
to preserve the original behavior. The attribute will be removed from each interface after checking
conformity with other browsers (in terms of configurability of operations of that interface) and the
WebKit's existing test suites.
This patch covers IDL interfaces under Source/WebCore/svg/.
* svg/SVGAngle.idl:
* svg/SVGAnimationElement.idl:
* svg/SVGColor.idl:
* svg/SVGCursorElement.idl:
* svg/SVGDocument.idl:
* svg/SVGElement.idl:
* svg/SVGElementInstanceList.idl:
* svg/SVGException.idl:
* svg/SVGFEDropShadowElement.idl:
* svg/SVGFEGaussianBlurElement.idl:
* svg/SVGFEMorphologyElement.idl:
* svg/SVGFilterElement.idl:
* svg/SVGGraphicsElement.idl:
* svg/SVGLength.idl:
* svg/SVGLengthList.idl:
* svg/SVGMarkerElement.idl:
* svg/SVGMaskElement.idl:
* svg/SVGMatrix.idl:
* svg/SVGNumberList.idl:
* svg/SVGPaint.idl:
* svg/SVGPathElement.idl:
* svg/SVGPathSegList.idl:
* svg/SVGPatternElement.idl:
* svg/SVGPoint.idl:
* svg/SVGPointList.idl:
* svg/SVGSVGElement.idl:
* svg/SVGStringList.idl:
* svg/SVGTests.idl:
* svg/SVGTextContentElement.idl:
* svg/SVGTransform.idl:
* svg/SVGTransformList.idl:
2013-10-06 Zan Dobersek <zdobersek@igalia.com>
[WebIDL] Annotate IDL interfaces under Source/WebCore/page/ with the OperationsNotDeletable attribute
https://bugs.webkit.org/show_bug.cgi?id=122278
Before changing the JSC bindings generator to enforce WebIDL operations to be configurable, all the
interfaces are being annotated with the OperationsNotDeletable attribute. The attribute currently
doesn't have any effect, but will keep the operations not configurable after the generator is modified
to preserve the original behavior. The attribute will be removed from each interface after checking
conformity with other browsers (in terms of configurability of operations of that interface) and the
WebKit's existing test suites.
This patch covers IDL interfaces under Source/WebCore/page/.
* page/Console.idl:
* page/Crypto.idl:
* page/DOMSecurityPolicy.idl:
* page/DOMSelection.idl:
* page/DOMWindow.idl:
* page/EventSource.idl:
* page/History.idl:
* page/Location.idl:
* page/Navigator.idl:
* page/Performance.idl:
* page/PerformanceEntryList.idl:
* page/SpeechInputResultList.idl:
* page/WindowBase64.idl:
* page/WindowTimers.idl:
2013-10-06 Darin Adler <darin@apple.com>
* rendering/RenderButton.cpp:
(WebCore::RenderButton::setupInnerStyle): Added a comment possibly relevant
to current failures seen on Windows bot.
2013-10-06 Commit Queue <commit-queue@webkit.org>
Unreviewed, rolling out r156988.
http://trac.webkit.org/changeset/156988
https://bugs.webkit.org/show_bug.cgi?id=122415
Broke debug build (Requested by ap on #webkit).
* css/CSSCursorImageValue.h:
* css/CSSTimingFunctionValue.h:
* css/CSSToStyleMap.cpp:
(WebCore::CSSToStyleMap::mapAnimationTimingFunction):
* css/CSSUnicodeRangeValue.h:
* css/CSSValue.cpp:
(WebCore::CSSValue::destroy):
* css/DeprecatedStyleBuilder.cpp:
(WebCore::ApplyPropertyCursor::applyValue):
* css/StyleResolver.cpp:
(WebCore::StyleResolver::styleImage):
(WebCore::StyleResolver::styleShader):
* rendering/style/StylePendingImage.h:
(WebCore::StylePendingImage::cssCursorImageValue):
2013-10-06 Gyuyoung Kim <gyuyoung.kim@samsung.com>
Add *CSS* prefix to ShadowValue to generate toCSSShadowValue
https://bugs.webkit.org/show_bug.cgi?id=122409
Reviewed by Darin Adler.
To generate toCSSShadowValue(), we need to add *CSS* prefix to ShadowValue.
It is also to be sync with a naming rule of CSS child value.
No new tests, no behavior changes.
* CMakeLists.txt:
* GNUmakefile.list.am:
* WebCore.vcxproj/WebCore.vcxproj:
* WebCore.vcxproj/WebCore.vcxproj.filters:
* WebCore.xcodeproj/project.pbxproj:
* css/CSSComputedStyleDeclaration.cpp:
(WebCore::ComputedStyleExtractor::valueForShadow):
* css/CSSParser.cpp:
(WebCore::ShadowParseContext::commitValue):
* css/CSSShadowValue.cpp: Renamed from Source/WebCore/css/ShadowValue.cpp.
(WebCore::CSSShadowValue::CSSShadowValue):
(WebCore::CSSShadowValue::customCSSText):
(WebCore::CSSShadowValue::equals):
* css/CSSShadowValue.h: Renamed from Source/WebCore/css/ShadowValue.h.
(WebCore::CSSShadowValue::create):
* css/CSSValue.cpp:
(WebCore::CSSValue::equals):
(WebCore::CSSValue::cssText):
(WebCore::CSSValue::destroy):
* css/SVGCSSStyleSelector.cpp:
(WebCore::StyleResolver::applySVGProperty):
* css/StyleResolver.cpp:
(WebCore::StyleResolver::applyProperty):
(WebCore::StyleResolver::createFilterOperations):
2013-10-06 Darin Adler <darin@apple.com>
Remove unneeded ScriptGCEvent class
https://bugs.webkit.org/show_bug.cgi?id=122390
Reviewed by Anders Carlsson.
* GNUmakefile.list.am: Removed ScriptGCEvent files.
* Target.pri: Ditto.
* UseJSC.cmake: Ditto.
* WebCore.exp.in: Ditto.
* WebCore.vcxproj/WebCore.vcxproj: Ditto.
* WebCore.vcxproj/WebCore.vcxproj.filters: Ditto.
* WebCore.xcodeproj/project.pbxproj: Ditto.
* bindings/js/JSBindingsAllInOne.cpp: Ditto.
* bindings/js/ScriptGCEvent.cpp: Removed.
* bindings/js/ScriptGCEvent.h: Removed.
* inspector/InspectorMemoryAgent.cpp: Removed include.
* inspector/InspectorTimelineAgent.cpp:
(WebCore::InspectorTimelineAgent::start): Removed GC event listening.
Some day we might add it back, but for now it is dead code.
(WebCore::InspectorTimelineAgent::stop): Ditto.
(WebCore::usedHeapSize): Renamed from getUsedHeapSize and put the
implementation here instead of indirecting through ScriptGCEvent.
(WebCore::InspectorTimelineAgent::setDOMCounters): Updated for above changes.
(WebCore::InspectorTimelineAgent::didCompleteCurrentRecord): Ditto.
(WebCore::InspectorTimelineAgent::pushCurrentRecord): Ditto.
* inspector/InspectorTimelineAgent.h: Removed include.
* inspector/ScriptGCEventListener.h: Removed.
* testing/MemoryInfo.h: Updated to get heap capacity and size directly
instead of going through ScriptGCEvent.
2013-10-06 Gyuyoung Kim <gyuyoung.kim@samsung.com>
Generate toCSSFooValue() for CSSCursorImageValue, CSSCubicBezierTimingFunctionValue, CSSStepsTimingFunctionValue and CSSUnicodeRangeValue
https://bugs.webkit.org/show_bug.cgi?id=122408
Reviewed by Darin Adler.
As a step to use toCSSFooValue, this patch generates toCSSFooValue() for CSSCursorImageValue,
CSSCubicBezierTimingFunctionValue, CSSStepsTimingFunctionValue and CSSUnicodeRangeValue.
This will help to detect bad type cast.
No new tests, no behavior changes.
* css/CSSCursorImageValue.h:
* css/CSSTimingFunctionValue.h:
* css/CSSToStyleMap.cpp:
(WebCore::CSSToStyleMap::mapAnimationTimingFunction):
* css/CSSUnicodeRangeValue.h:
* css/CSSValue.cpp:
(WebCore::CSSValue::destroy):
* css/DeprecatedStyleBuilder.cpp:
(WebCore::ApplyPropertyCursor::applyValue):
* css/StyleResolver.cpp:
(WebCore::StyleResolver::styleImage):
(WebCore::StyleResolver::styleShader):
* rendering/style/StylePendingImage.h:
(WebCore::StylePendingImage::cssCursorImageValue):
2013-10-05 Andreas Kling <akling@apple.com>
CTTE: Teach CompositeEditCommand that link Nodes are always Elements.
<https://webkit.org/b/122400>
Reviewed by Sam Weinig.
Make pushAnchorElementDown() take an Element& instead of a Node* and
tweak the surrounding code a tiny bit.
2013-10-06 Andreas Kling <akling@apple.com>
CTTE: Node::enclosingLinkEventParentOrSelf() should return an Element.
<https://webkit.org/b/122401>
Reviewed by Sam Weinig.
Only Elements are ever linked, so make enclosingLinkEventParentOrSelf()
return an Element* instead of a Node*. The only call site was already
doing toElement() on the return value without checking, so this makes
things look a bit nicer.
2013-10-06 Gyuyoung Kim <gyuyoung.kim@samsung.com>
Add *CSS* prefix to FontFeatureValue to generate toCSSFontFeatureValue(), and use it
https://bugs.webkit.org/show_bug.cgi?id=122204
Reviewed by Darin Adler.
*CSS* prefix needs to be added to FontFeatureValue class in order to generate toCSSFontFeatureValue().
static_cast<FontFeatureValue*> is changed with toCSSFontFeatureValue() by using this change.
No new tests, no behavior changes.
* CMakeLists.txt:
* GNUmakefile.list.am:
* Target.pri:
* WebCore.vcxproj/WebCore.vcxproj:
* WebCore.vcxproj/WebCore.vcxproj.filters:
* WebCore.xcodeproj/project.pbxproj:
* css/CSSComputedStyleDeclaration.cpp:
(WebCore::ComputedStyleExtractor::propertyValue):
* css/CSSFontFeatureValue.cpp: Renamed from Source/WebCore/css/FontFeatureValue.cpp.
(WebCore::CSSFontFeatureValue::CSSFontFeatureValue):
(WebCore::CSSFontFeatureValue::customCSSText):
(WebCore::CSSFontFeatureValue::equals):
* css/CSSFontFeatureValue.h: Renamed from Source/WebCore/css/FontFeatureValue.h.
(WebCore::CSSFontFeatureValue::create):
(WebCore::CSSFontFeatureValue::tag):
(WebCore::CSSFontFeatureValue::value):
* css/CSSParser.cpp:
(WebCore::CSSParser::parseFontFeatureTag):
* css/CSSValue.cpp:
(WebCore::CSSValue::equals):
(WebCore::CSSValue::cssText):
(WebCore::CSSValue::destroy):
* css/StyleResolver.cpp:
(WebCore::StyleResolver::applyProperty):
2013-10-05 Andreas Kling <akling@apple.com>
FrameSelection: Remove two unused member functions.
Rubber-stamped by Anders Carlsson.
- rootEditableElementOrTreeScopeRootNode()
- rootEditableElementRespectingShadowTree()
2013-10-05 Andreas Kling <akling@apple.com>
CTTE: Node::treeScope() should return a reference.
<https://webkit.org/b/122399>
Reviewed by Superlative Sam.
Every Node belongs to a TreeScope. To enforce this, I've made
treeScope() return a TreeScope&, and setTreeScope() now takes a
TreeScope& so there is no way to clear it.
2013-10-05 Sam Weinig <sam@webkit.org>
CTTE: Use references more for the Document parser
https://bugs.webkit.org/show_bug.cgi?id=122398
Reviewed by Andreas Kling.
Clarify the construction semantics of Document parsers.
2013-10-05 Daniel Bates <dabates@apple.com>
[iOS] Default initialize Settings::setFixedPositionCreatesStackingContext() to true
https://bugs.webkit.org/show_bug.cgi?id=122338
<rdar://problem/14908151>
Reviewed by Darin Adler.
On iOS we always want an element with a fixed position to create a stacking context.
See <rdar://problem/9813262> for more details.
* page/Settings.cpp: Define constant defaultFixedPositionCreatesStackingContext to
be true when building for iOS and false otherwise.
* page/Settings.in: Initialize the setting fixedPositionCreatesStackingContext with
the value of the constant defaultFixedPositionCreatesStackingContext.
2013-10-05 Sam Weinig <sam@webkit.org>
CTTE: Pass DocumentWriter around as a reference
https://bugs.webkit.org/show_bug.cgi?id=122396
Reviewed by Andreas Kling.
* bindings/js/ScriptController.cpp:
(WebCore::ScriptController::executeIfJavaScriptURL):
* dom/DecodedDataDocumentParser.cpp:
(WebCore::DecodedDataDocumentParser::appendBytes):
(WebCore::DecodedDataDocumentParser::flush):
* dom/DecodedDataDocumentParser.h:
* dom/DocumentParser.h:
* dom/RawDataDocumentParser.h:
(WebCore::RawDataDocumentParser::flush):
* html/ImageDocument.cpp:
(WebCore::ImageDocumentParser::appendBytes):
* html/MediaDocument.cpp:
(WebCore::MediaDocumentParser::appendBytes):
(WebCore::MediaDocument::replaceMediaElementTimerFired):
* html/PluginDocument.cpp:
(WebCore::PluginDocumentParser::createDocumentStructure):
(WebCore::PluginDocumentParser::appendBytes):
* inspector/InspectorOverlay.cpp:
(WebCore::InspectorOverlay::overlayPage):
* loader/DocumentLoader.h:
(WebCore::DocumentLoader::writer):
* loader/DocumentWriter.cpp:
(WebCore::DocumentWriter::addData):
(WebCore::DocumentWriter::end):
* loader/FrameLoader.cpp:
(WebCore::FrameLoader::transitionToCommitted):
* loader/SinkDocument.cpp:
(WebCore::SinkDocumentParser::appendBytes):
* svg/graphics/SVGImage.cpp:
(WebCore::SVGImage::dataChanged):
2013-10-05 Andreas Kling <akling@apple.com>
FrameView: Remove code for disabling repaints.
<https://webkit.org/b/122393>
Reviewed by Sam Weinig.
Nobody uses this mode for anything so let's just remove it.
It was added back in r110469 to fix an issue with SVGImageCache
and its only user disappeard in the cache overhaul in r142765.
2013-10-05 Andreas Kling <akling@apple.com>
Remove IFrameShimSupport, it was only used by dead ports.
Rubber-stamped by Anders Carlsson.
* plugins/IFrameShimSupport.cpp: Removed.
* plugins/IFrameShimSupport.h: Removed.
2013-10-05 Anders Carlsson <andersca@apple.com>
Clean up MessageQueue.h
https://bugs.webkit.org/show_bug.cgi?id=122392
Reviewed by Andreas Kling.
Update for changes to MessageQueue, mostly changing create functions to return std::unique_ptr.
I intentionally avoided using std::make_unique in a couple of places because I didn't want to make nested classes
public, and I believe that we can change some of this code to use std::function.
* Modules/webaudio/AsyncAudioDecoder.cpp:
(WebCore::AsyncAudioDecoder::decodeAsync):
(WebCore::AsyncAudioDecoder::runLoop):
(WebCore::AsyncAudioDecoder::DecodingTask::create):
* Modules/webaudio/AsyncAudioDecoder.h:
* Modules/webdatabase/Database.cpp:
(WebCore::Database::markAsDeletedAndClose):
(WebCore::Database::tableNames):
* Modules/webdatabase/DatabaseBackend.cpp:
(WebCore::DatabaseBackend::openAndVerifyVersion):
(WebCore::DatabaseBackend::scheduleTransaction):
(WebCore::DatabaseBackend::scheduleTransactionStep):
* Modules/webdatabase/DatabaseTask.h:
(WebCore::DatabaseBackend::DatabaseOpenTask::create):
(WebCore::DatabaseBackend::DatabaseCloseTask::create):
(WebCore::DatabaseBackend::DatabaseTransactionTask::create):
(WebCore::DatabaseBackend::DatabaseTableNamesTask::create):
* Modules/webdatabase/DatabaseThread.cpp:
(WebCore::DatabaseThread::databaseThread):
(WebCore::DatabaseThread::scheduleTask):
(WebCore::DatabaseThread::scheduleImmediateTask):
(WebCore::SameDatabasePredicate::operator()):
* Modules/webdatabase/DatabaseThread.h:
* dom/default/PlatformMessagePortChannel.cpp:
(WebCore::PlatformMessagePortChannel::EventData::create):
(WebCore::MessagePortChannel::tryGetMessageFromRemote):
* dom/default/PlatformMessagePortChannel.h:
(WebCore::PlatformMessagePortChannel::MessagePortQueue::tryGetMessage):
(WebCore::PlatformMessagePortChannel::MessagePortQueue::appendAndCheckEmpty):
* fileapi/FileThread.cpp:
(WebCore::FileThread::postTask):
(WebCore::SameInstancePredicate::operator()):
(WebCore::FileThread::runLoop):
* fileapi/FileThread.h:
* fileapi/FileThreadTask.h:
(WebCore::createFileThreadTask):
* storage/StorageThread.cpp:
(WebCore::StorageThread::threadEntryPoint):
(WebCore::StorageThread::dispatch):
(WebCore::StorageThread::terminate):
* workers/WorkerRunLoop.cpp:
(WebCore::ModePredicate::operator()):
(WebCore::WorkerRunLoop::runInMode):
(WebCore::WorkerRunLoop::runCleanupTasks):
(WebCore::WorkerRunLoop::Task::create):
* workers/WorkerRunLoop.h:
2013-10-04 Dean Jackson <dino@apple.com>
[WebGL] program should not be able to link if a bad shader is attached
https://bugs.webkit.org/show_bug.cgi?id=94036
Reviewed by Darin Adler.
If you attempt to link a program when bad shaders are attached, the
link should fail. WebGL also requires that the previously linked
program should remain intact. We were doing the former, but not
the latter.
Fix this by not calling glLinkProgram if we know we have bad
shaders, and synthesize a bad link status instead.
Test: WebGL conformance test conformance/programs/program-test.html
(found in LayoutTests/webgl)
* html/canvas/WebGLRenderingContext.cpp:
(WebCore::WebGLRenderingContext::compileShader): Mark a shader as valid
if it compiled ok.
(WebCore::WebGLRenderingContext::linkProgram): Don't call into GraphicsContext3D::linkProgram
if we know that we don't have valid shaders.
* html/canvas/WebGLShader.cpp:
(WebCore::WebGLShader::WebGLShader): Initialize m_isValid.
* html/canvas/WebGLShader.h:
(WebCore::WebGLShader::isValid): New member variable getter and setter.
(WebCore::WebGLShader::setValid):
2013-10-05 Dean Jackson <dino@apple.com>
Undo texture unit code refactoring - it is ok to bind a texture to multiple locations
https://bugs.webkit.org/show_bug.cgi?id=122369
<rdar://problem/15158465>
Reviewed by Darin Adler.
The optimisation in r152351 (http://webkit.org/b/117868) incorrectly
assumes that a texture cannot be bound to more than one location.
That's true only within the same program object. It's legal to
address TEXTURE_BINDING_2D and TEXTURE_BINDING_CUBE_MAP with the
same texture in different programs.
See https://github.com/KhronosGroup/WebGL/pull/391 for more information.
This change reverts the optimisation, but also does some minor
cleanup (0 -> nullptr, class -> struct).
Covered by the following Khronos WebGL 1.0.1 tests, which
now pass:
- conformance/more/functions/texImage2DHTML.html
- conformance/more/functions/texSubImage2D.html
- conformance/more/functions/texSubImage2DHTML.html
* html/canvas/WebGLRenderingContext.cpp:
(WebCore::WebGLRenderingContext::~WebGLRenderingContext):
(WebCore::WebGLRenderingContext::reshape):
(WebCore::WebGLRenderingContext::bindTexture):
(WebCore::WebGLRenderingContext::deleteTexture):
(WebCore::WebGLRenderingContext::getParameter):
(WebCore::WebGLRenderingContext::handleNPOTTextures):
(WebCore::WebGLRenderingContext::validateTextureBinding):
(WebCore::WebGLRenderingContext::restoreCurrentTexture2D):
* html/canvas/WebGLRenderingContext.h:
2013-10-05 Anders Carlsson <andersca@apple.com>
Remove createOwned
https://bugs.webkit.org/show_bug.cgi?id=122388
Reviewed by Darin Adler.
* dom/Document.cpp:
(WebCore::Document::Document):
(WebCore::Document::~Document):
(WebCore::Document::createRenderTree):
(WebCore::Document::destroyRenderTree):
* dom/Document.h:
* page/Frame.cpp:
(WebCore::Frame::Frame):
* page/Frame.h:
* page/animation/AnimationController.cpp:
(WebCore::AnimationController::AnimationController):
* page/animation/AnimationController.h:
* platform/graphics/avfoundation/AVTrackPrivateAVFObjCImpl.h:
* platform/graphics/avfoundation/objc/AudioTrackPrivateAVFObjC.h:
* platform/graphics/avfoundation/objc/AudioTrackPrivateAVFObjC.mm:
(WebCore::AudioTrackPrivateAVFObjC::AudioTrackPrivateAVFObjC):
(WebCore::AudioTrackPrivateAVFObjC::setPlayerItemTrack):
* platform/graphics/avfoundation/objc/VideoTrackPrivateAVFObjC.cpp:
(WebCore::VideoTrackPrivateAVFObjC::VideoTrackPrivateAVFObjC):
(WebCore::VideoTrackPrivateAVFObjC::setPlayerItemTrack):
* platform/graphics/avfoundation/objc/VideoTrackPrivateAVFObjC.h:
* rendering/svg/RenderSVGResourceClipper.cpp:
(WebCore::RenderSVGResourceClipper::applyClippingToContext):
* rendering/svg/RenderSVGResourceClipper.h:
* rendering/svg/RenderSVGResourceFilter.cpp:
(WebCore::RenderSVGResourceFilter::applyResource):
* rendering/svg/RenderSVGResourceFilter.h:
* rendering/svg/RenderSVGResourceMasker.cpp:
(WebCore::RenderSVGResourceMasker::applyResource):
* rendering/svg/RenderSVGResourceMasker.h:
2013-10-05 Darin Adler <darin@apple.com>
Remove COMPILER_SUPPORTS(CXX_RVALUE_REFERENCES) since it's required now
https://bugs.webkit.org/show_bug.cgi?id=122387
Reviewed by Anders Carlsson.
* html/canvas/CanvasStyle.h: Take out conditionals.
2013-10-05 Darin Adler <darin@apple.com>
Add AtomicString::number and use it
https://bugs.webkit.org/show_bug.cgi?id=122384
Reviewed by Anders Carlsson.
* css/CSSGrammar.y.in: Use AtomicString::number instead of String::number since
we are creating an AtomicString. This can save a memory allocation if the string
happens to already be in the atomic string table.
* dom/Element.cpp:
(WebCore::Element::setIntegralAttribute): Ditto.
(WebCore::Element::setUnsignedIntegralAttribute): Ditto.
* editing/BreakBlockquoteCommand.cpp:
(WebCore::BreakBlockquoteCommand::doApply): Ditto.
* html/HTMLBodyElement.cpp:
(WebCore::HTMLBodyElement::insertedInto): Use setIntegralAttribute instead of
a local homegrown equivalent.
* html/HTMLCanvasElement.cpp:
(WebCore::HTMLCanvasElement::setHeight): Ditto.
(WebCore::HTMLCanvasElement::setWidth): Ditto.
* html/HTMLElement.cpp:
(WebCore::HTMLElement::setTabIndex): Ditto.
* html/HTMLImageElement.cpp:
(WebCore::HTMLImageElement::setHeight): Ditto.
(WebCore::HTMLImageElement::setWidth): Ditto.
* html/HTMLInputElement.cpp:
(WebCore::HTMLInputElement::setMaxLength): Ditto.
(WebCore::HTMLInputElement::setSize): Same, but setUnsignedIntegralAttribute.
(WebCore::HTMLInputElement::setHeight): Ditto.
(WebCore::HTMLInputElement::setWidth): Ditto.
* html/HTMLMediaElement.cpp:
(WebCore::HTMLMediaElement::mediaPlayerSetSize): Ditto.
* html/HTMLMeterElement.cpp:
(WebCore::HTMLMeterElement::setMin): More of the same.
(WebCore::HTMLMeterElement::setMax): Ditto.
(WebCore::HTMLMeterElement::setValue): Ditto.
(WebCore::HTMLMeterElement::setLow): Ditto.
(WebCore::HTMLMeterElement::setHigh): Ditto.
(WebCore::HTMLMeterElement::setOptimum): Ditto.
* html/HTMLOListElement.cpp:
(WebCore::HTMLOListElement::setStart): Ditto.
* html/HTMLProgressElement.cpp:
(WebCore::HTMLProgressElement::setValue): Ditto.
(WebCore::HTMLProgressElement::setMax): Ditto.
* html/HTMLSelectElement.cpp:
(WebCore::HTMLSelectElement::parseAttribute): Ditto.
(WebCore::HTMLSelectElement::setSize): Ditto.
* html/HTMLTableCellElement.cpp:
(WebCore::HTMLTableCellElement::setColSpan): Ditto.
(WebCore::HTMLTableCellElement::setRowSpan): Ditto.
* html/HTMLTableColElement.cpp:
(WebCore::HTMLTableColElement::setSpan): Ditto.
* html/HTMLTextAreaElement.cpp:
(WebCore::HTMLTextAreaElement::setMaxLength): Ditto.
(WebCore::HTMLTextAreaElement::setCols): Ditto.
(WebCore::HTMLTextAreaElement::setRows): Ditto.
* html/shadow/MediaControlElements.cpp:
(WebCore::MediaControlTimelineElement::setDuration): Ditto.
2013-10-05 Darin Adler <darin@apple.com>
Cut down on use of String::number
https://bugs.webkit.org/show_bug.cgi?id=122382
Reviewed by Anders Carlsson.
* css/CSSGradientValue.cpp:
(WebCore::CSSLinearGradientValue::customCSSText): Use StringBuilder::appendNumber,
instead of creating a string and then appending it.
(WebCore::CSSRadialGradientValue::customCSSText): Ditto.
* css/CSSParser.cpp:
(WebCore::CSSParser::createKeyframe): Ditto.
* editing/DeleteButtonController.cpp:
(WebCore::DeleteButtonController::createDeletionUI): Use ASCII literals instead of
converting numeric constants to strings at runtime with String::number.
(WebCore::DeleteButtonController::show): Ditto.
* svg/SVGNumberList.cpp:
(WebCore::SVGNumberList::valueAsString): Use StringBuilder::appendNumber.
* svg/SVGPointList.cpp:
(WebCore::SVGPointList::valueAsString): Ditto.
* svg/SVGRect.h: Ditto.
2013-10-05 Anders Carlsson <andersca@apple.com>
Test the waters and begin using lambdas
https://bugs.webkit.org/show_bug.cgi?id=121809
Reviewed by Andreas Kling.
Use lambdas instead of static functions and function objects.
* css/MediaQuery.cpp:
(WebCore::MediaQuery::MediaQuery):
* dom/MutationObserver.cpp:
(WebCore::MutationObserver::deliverAllMutations):
* page/CaptionUserPreferences.cpp:
(WebCore::CaptionUserPreferences::sortedTrackListForMenu):
2013-10-05 Gyuyoung Kim <gyuyoung.kim@samsung.com>
Add *CSS* prefix to FontValue to generate toCSSFontValue()
https://bugs.webkit.org/show_bug.cgi?id=122201
Reviewed by Darin Adler.
*CSS* prefix needs to be added to FontValue class in order to generate toCSSFontValue().
static_cast<FontValue*> is changed with toCSSFontValue() by this change.
No new tests, no behavior changes.
* CMakeLists.txt:
* GNUmakefile.list.am:
* Target.pri:
* WebCore.vcxproj/WebCore.vcxproj:
* WebCore.vcxproj/WebCore.vcxproj.filters:
* WebCore.xcodeproj/project.pbxproj:
* css/CSSComputedStyleDeclaration.cpp:
(WebCore::ComputedStyleExtractor::propertyValue):
* css/CSSFontValue.cpp: Renamed from Source/WebCore/css/FontValue.cpp.
(WebCore::CSSFontValue::customCSSText):
(WebCore::CSSFontValue::equals):
* css/CSSFontValue.h: Renamed from Source/WebCore/css/FontValue.h.
(WebCore::CSSFontValue::create):
(WebCore::CSSFontValue::CSSFontValue):
* css/CSSParser.cpp:
* css/CSSValue.cpp:
(WebCore::CSSValue::equals):
(WebCore::CSSValue::cssText):
(WebCore::CSSValue::destroy):
* css/StyleResolver.cpp:
(WebCore::StyleResolver::applyProperty):
2013-10-05 Commit Queue <commit-queue@webkit.org>
Unreviewed, rolling out r156952.
http://trac.webkit.org/changeset/156952
https://bugs.webkit.org/show_bug.cgi?id=122381
Made svg/custom/large-image-pattern-crash.html assert
(Requested by ap on #webkit).
* rendering/InlineBox.cpp:
(WebCore::InlineBox::paint):
* rendering/InlineBox.h:
* rendering/InlineFlowBox.cpp:
(WebCore::InlineFlowBox::paintBoxDecorations):
(WebCore::InlineFlowBox::paintMask):
* rendering/InlineTextBox.cpp:
(WebCore::InlineTextBox::paint):
* rendering/PaintInfo.h:
(WebCore::PaintInfo::shouldPaintWithinRoot):
* rendering/RenderBlock.cpp:
(WebCore::RenderBlock::paint):
* rendering/RenderBox.cpp:
(WebCore::RenderBox::paint):
(WebCore::RenderBox::paintBoxDecorations):
(WebCore::RenderBox::paintMask):
* rendering/RenderBox.h:
* rendering/RenderElement.h:
* rendering/RenderFieldset.cpp:
(WebCore::RenderFieldset::paintBoxDecorations):
* rendering/RenderFrameSet.cpp:
(WebCore::RenderFrameSet::paint):
* rendering/RenderLineBreak.h:
* rendering/RenderObject.cpp:
(WebCore::RenderObject::paint):
* rendering/RenderObject.h:
* rendering/RenderReplaced.cpp:
(WebCore::RenderReplaced::paint):
(WebCore::RenderReplaced::shouldPaint):
* rendering/RenderTable.cpp:
(WebCore::RenderTable::paintObject):
(WebCore::RenderTable::paintBoxDecorations):
* rendering/RenderTableCell.cpp:
(WebCore::RenderTableCell::paintCollapsedBorders):
(WebCore::RenderTableCell::paintBackgroundsBehindCell):
(WebCore::RenderTableCell::paintBoxDecorations):
* rendering/RenderTableCol.h:
* rendering/RenderText.h:
* rendering/RenderView.cpp:
(WebCore::RenderView::paint):
(WebCore::RenderView::paintBoxDecorations):
* rendering/RootInlineBox.cpp:
(WebCore::RootInlineBox::paintEllipsisBox):
(WebCore::RootInlineBox::paintCustomHighlight):
* rendering/svg/RenderSVGContainer.cpp:
(WebCore::RenderSVGContainer::paint):
* rendering/svg/RenderSVGGradientStop.h:
* rendering/svg/RenderSVGResourceClipper.cpp:
(WebCore::RenderSVGResourceClipper::drawContentIntoMaskImage):
* rendering/svg/RenderSVGResourceMasker.cpp:
(WebCore::RenderSVGResourceMasker::drawContentIntoMaskImage):
* rendering/svg/RenderSVGResourcePattern.cpp:
(WebCore::RenderSVGResourcePattern::createTileImage):
* rendering/svg/RenderSVGRoot.cpp:
(WebCore::RenderSVGRoot::paintReplaced):
* rendering/svg/SVGInlineTextBox.cpp:
(WebCore::SVGInlineTextBox::paintSelectionBackground):
(WebCore::SVGInlineTextBox::paint):
* rendering/svg/SVGRenderingContext.cpp:
(WebCore::SVGRenderingContext::renderSubtreeToImageBuffer):
* rendering/svg/SVGRenderingContext.h:
* svg/SVGUseElement.cpp:
(WebCore::SVGUseElement::rendererClipChild):
* svg/SVGUseElement.h:
* svg/graphics/filters/SVGFEImage.cpp:
(WebCore::FEImage::platformApplySoftware):
2013-10-05 Darin Adler <darin@apple.com>
Need to check if some HTML child elements are HTMLUnknownElement
https://bugs.webkit.org/show_bug.cgi?id=120297
Reviewed by Andreas Kling.
Test: fast/media/media-disable-crash.html
* dom/make_names.pl:
(printConstructorInterior): Added additional comments about the
wrapperOnlyIfMediaIsAvailable feature.
(printTypeHelpers): Added an isHTMLUnknownElement check to the check helper
functions for tags with the wrapperOnlyIfMediaIsAvailable feature.
(printWrapperFunctions): Instead of redoing the media player check and the
settings check, and possibly making a wrapper of the wrong type, call
isHTMUnknownElement, guaranteeing that the wrapper will match the element
it is wrapping.
* html/HTMLElement.h: Move HTMLElementTypeHelpers.h to the bottom of the
file so that functions from that file can be use the HTMLElement class and
other things defined in this file.
* html/HTMLMediaElement.cpp:
(WebCore::HTMLMediaElement::paused): Added an assertion that made the regression
test reliably assert, rather than intermittently (for me, non-reproducibly) crash.
2013-10-04 Antti Koivisto <antti@apple.com>
Move paint() to RenderElement
https://bugs.webkit.org/show_bug.cgi?id=122371
Reviewed by Darin Adler.
RenderText does not paint itself (text is painted by line boxes). We can move paint() down
to RenderElement.
This also requires some type tightening elsewhere in the code.
2013-10-04 Ryosuke Niwa <rniwa@webkit.org>
Fix an assertion failure introduced in r156925.
Add HTMLImageElement to the document-wide map only if it's in the document.
* html/HTMLImageElement.cpp:
(WebCore::HTMLImageElement::parseAttribute):
2013-10-04 Darin Adler <darin@apple.com>
text-transform: lowercase is not lang-dependent (Turkish languages : tr,az)
https://bugs.webkit.org/show_bug.cgi?id=21312
Reviewed by Ryosuke Niwa.
Test: fast/text/text-transform-turkish-and-azeri.html
This patch covers text-transform: uppercase and text-transform: lowercase.
More changes will be needed to cover text-transform: capitalize.
* inspector/DOMPatchSupport.cpp:
(WebCore::DOMPatchSupport::patchNode): Use String::upper instead of String::makeUpper.
* page/EventHandler.cpp:
(WebCore::findDropZone): Use String::lower instead of String::makeLower.
* platform/graphics/harfbuzz/HarfBuzzShaper.cpp:
(WebCore::HarfBuzzShaper::shapeHarfBuzzRuns): Use String::upper instead of String::makeUpper.
* platform/network/blackberry/rss/RSS10Parser.cpp: [Seriously, how is an RSS parser
part of WebKit's networking layer? Where are the tests that cover this? Seems wrong
to have this code in the project.]
(WebCore::RSS10Parser::parseXmlDoc): Use lower instead of makeLower.
(WebCore::RSS10Parser::parseItem): Ditto.
(WebCore::RSS10Parser::parseFeed): Ditto.
* platform/network/blackberry/rss/RSS20Parser.cpp:
(WebCore::RSS20Parser::parseXmlDoc): Ditto.
(WebCore::RSS20Parser::parseItem): Ditto.
(WebCore::RSS20Parser::parseFeed): Ditto.
(WebCore::RSS20Parser::parseEnclosure): Ditto.
* platform/network/blackberry/rss/RSSAtomParser.cpp:
(WebCore::RSSAtomParser::parseXmlDoc): Ditto.
(WebCore::RSSAtomParser::parseItem): Ditto.
(WebCore::RSSAtomParser::parseFeed): Ditto.
(WebCore::RSSAtomParser::parseLink): Ditto.
(WebCore::RSSAtomParser::parseContent): Ditto.
(WebCore::RSSAtomParser::parseAuthor): Ditto.
(WebCore::RSSAtomParser::parseCategory): Ditto.
* platform/text/win/LocaleWin.cpp:
(WebCore::convertLocaleNameToLCID): Use String::lower instead of String::makeLower.
* rendering/RenderText.cpp:
(WebCore::applyTextTransform): Use String::upper and String::lower instead of
String::makeUpper and String::makeLower, and also pass in the locale to each.
* xml/XMLHttpRequest.cpp:
(WebCore::XMLHttpRequest::uppercaseKnownHTTPMethod): Changed this so it doesn't call
upper just to return an already known string constant.
2013-10-04 Alexey Proskuryakov <ap@apple.com>
Roll out r156930 and r156937, they caused 34 assertion failures on bots.
* css/mathml.css:
* mathml/MathMLTextElement.cpp:
* mathml/MathMLTextElement.h:
* rendering/RenderFlexibleBox.h:
* rendering/mathml/RenderMathMLBlock.cpp:
* rendering/mathml/RenderMathMLBlock.h:
* rendering/mathml/RenderMathMLFenced.cpp:
* rendering/mathml/RenderMathMLOperator.cpp:
* rendering/mathml/RenderMathMLOperator.h:
* rendering/mathml/RenderMathMLRoot.cpp:
* rendering/mathml/RenderMathMLRoot.h:
* rendering/mathml/RenderMathMLRow.cpp:
* rendering/mathml/RenderMathMLRow.h:
2013-10-04 Anders Carlsson <andersca@apple.com>
FramePolicyFunction should be an std::function
https://bugs.webkit.org/show_bug.cgi?id=122362
Reviewed by Darin Adler.
This makes policy callback handling simpler inside WebKit.
* loader/EmptyClients.cpp:
(WebCore::EmptyFrameLoaderClient::dispatchDecidePolicyForNewWindowAction):
(WebCore::EmptyFrameLoaderClient::dispatchDecidePolicyForNavigationAction):
(WebCore::EmptyFrameLoaderClient::dispatchWillSubmitForm):
* loader/EmptyClients.h:
* loader/FrameLoader.cpp:
(WebCore::FrameLoader::continueLoadAfterNavigationPolicy):
* loader/FrameLoaderClient.h:
* loader/PolicyChecker.cpp:
(WebCore::PolicyChecker::checkNavigationPolicy):
(WebCore::PolicyChecker::checkNewWindowPolicy):
(WebCore::PolicyChecker::checkContentPolicy):
2013-10-04 Andreas Kling <akling@apple.com>
CTTE: IconController and IconLoader should have Frame& backpointer.
<https://webkit.org/b/122372>
Reviewed by Anders Carlsson.
Also slap IconLoader with FINAL glove.
2013-10-04 Andreas Kling <akling@apple.com>
CTTE: RenderScrollbar DOM owner is always an Element.
<https://webkit.org/b/122348>
Reviewed by Antti Koivisto.
When RenderScrollbar is owned by a DOM node, it's always Element.
Tighten the code a bit with this knowledge.
Also marked the class FINAL and beat it with the OVERRIDE stick.
2013-10-04 Andreas Kling <akling@apple.com>
TypingCommand helpers should take Document&.
<https://webkit.org/b/122370>
Reviewed by Anders Carlsson.
Instead of taking a Document* and immediately asserting that it's
non-null, just take Document&.
2013-10-04 Ryosuke Niwa <rniwa@webkit.org>
Use more references instead of pointers in DocumentOrderedMap
https://bugs.webkit.org/show_bug.cgi?id=122368
Reviewed by Andreas Kling.
Use AtomicStringImpl& instead of AtomicString* or AtomicString& to eliminate
assertions and nullity checks.
* bindings/js/JSDOMWindowCustom.cpp:
(WebCore::namedItemGetter):
(WebCore::JSDOMWindow::getOwnPropertySlot):
(WebCore::JSDOMWindow::getOwnPropertySlotByIndex):
* bindings/js/JSHTMLDocumentCustom.cpp:
(WebCore::JSHTMLDocument::canGetItemsForName):
(WebCore::JSHTMLDocument::nameGetter):
* dom/Document.cpp:
(WebCore::Document::addImageElementByLowercasedUsemap):
(WebCore::Document::removeImageElementByLowercasedUsemap):
(WebCore::Document::imageElementByLowercasedUsemap):
* dom/Document.h:
* dom/DocumentOrderedMap.cpp:
(WebCore::keyMatchesId):
(WebCore::keyMatchesName):
(WebCore::keyMatchesMapName):
(WebCore::keyMatchesLowercasedMapName):
(WebCore::keyMatchesLowercasedUsemap):
(WebCore::keyMatchesLabelForAttribute):
(WebCore::keyMatchesWindowNamedItem):
(WebCore::keyMatchesDocumentNamedItem):
(WebCore::DocumentOrderedMap::add):
(WebCore::DocumentOrderedMap::remove):
(WebCore::DocumentOrderedMap::get):
(WebCore::DocumentOrderedMap::getElementById):
(WebCore::DocumentOrderedMap::getElementByName):
(WebCore::DocumentOrderedMap::getElementByMapName):
(WebCore::DocumentOrderedMap::getElementByLowercasedMapName):
(WebCore::DocumentOrderedMap::getElementByLowercasedUsemap):
(WebCore::DocumentOrderedMap::getElementByLabelForAttribute):
(WebCore::DocumentOrderedMap::getElementByWindowNamedItem):
(WebCore::DocumentOrderedMap::getElementByDocumentNamedItem):
(WebCore::DocumentOrderedMap::getAllElementsById):
* dom/DocumentOrderedMap.h:
(WebCore::DocumentOrderedMap::containsSingle):
(WebCore::DocumentOrderedMap::contains):
(WebCore::DocumentOrderedMap::containsMultiple):
* dom/Element.cpp:
(WebCore::Element::updateNameForTreeScope):
(WebCore::Element::updateNameForDocument):
(WebCore::Element::updateIdForTreeScope):
(WebCore::Element::updateIdForDocument):
(WebCore::Element::updateLabel):
* dom/IdTargetObserverRegistry.cpp:
(WebCore::IdTargetObserverRegistry::notifyObserversInternal):
* dom/IdTargetObserverRegistry.h:
(WebCore::IdTargetObserverRegistry::notifyObservers):
* dom/TreeScope.cpp:
(WebCore::TreeScope::getElementById):
(WebCore::TreeScope::getAllElementsById):
(WebCore::TreeScope::addElementById):
(WebCore::TreeScope::removeElementById):
(WebCore::TreeScope::getElementByName):
(WebCore::TreeScope::addElementByName):
(WebCore::TreeScope::removeElementByName):
(WebCore::TreeScope::addImageMap):
(WebCore::TreeScope::removeImageMap):
(WebCore::TreeScope::getImageMap):
(WebCore::TreeScope::addLabel):
(WebCore::TreeScope::removeLabel):
(WebCore::TreeScope::labelElementForId):
* dom/TreeScope.h:
(WebCore::TreeScope::hasElementWithId):
(WebCore::TreeScope::containsMultipleElementsWithId):
(WebCore::TreeScope::hasElementWithName):
(WebCore::TreeScope::containsMultipleElementsWithName):
* html/HTMLCollection.cpp:
(WebCore::HTMLCollection::namedItem):
* html/HTMLDocument.cpp:
(WebCore::HTMLDocument::addDocumentNamedItem):
(WebCore::HTMLDocument::removeDocumentNamedItem):
(WebCore::HTMLDocument::addWindowNamedItem):
(WebCore::HTMLDocument::removeWindowNamedItem):
* html/HTMLDocument.h:
(WebCore::HTMLDocument::documentNamedItem):
(WebCore::HTMLDocument::hasDocumentNamedItem):
(WebCore::HTMLDocument::documentNamedItemContainsMultipleElements):
(WebCore::HTMLDocument::windowNamedItem):
(WebCore::HTMLDocument::hasWindowNamedItem):
(WebCore::HTMLDocument::windowNamedItemContainsMultipleElements):
* html/HTMLImageElement.cpp:
(WebCore::HTMLImageElement::parseAttribute):
(WebCore::HTMLImageElement::insertedInto):
(WebCore::HTMLImageElement::removedFrom):
* html/HTMLMapElement.cpp:
(WebCore::HTMLMapElement::imageElement):
(WebCore::HTMLMapElement::parseAttribute):
(WebCore::HTMLMapElement::insertedInto):
(WebCore::HTMLMapElement::removedFrom):
* html/HTMLObjectElement.cpp:
(WebCore::HTMLObjectElement::updateDocNamedItem):
2013-10-04 Andreas Kling <akling@apple.com>
CTTE: PolicyChecker backpointer to Frame should be a reference.
<https://webkit.org/b/122354>
Reviewed by Anders Carlsson.
PolicyChecker is tied to the lifetime of FrameLoader, which in turn
is tied to the lifetime of Frame.
2013-10-04 Andreas Kling <akling@apple.com>
Editor should use reference-getting document() internally.
<https://webkit.org/b/122364>
Reviewed by Darin Adler.
Instead of grabbing at Editor::m_frame.document(), use the nice
Editor::document() helper that always returns a Document&.
Calling Editor methods on a Frame's editor() while there is no
Document in the Frame is a programming error and this is covered
by an assertion in document().
This removes a bunch of null checks and enables further cleanup.
2013-10-04 Martin Robinson <mrobinson@igalia.com>
Try to fix the Windows build after r156930.
* rendering/mathml/RenderMathMLOperator.cpp:
(WebCore::RenderMathMLOperator::paintCharacter): Use ceilf and floorf to avoid issues
with overload collisions and implicit casts of LayoutUnits.
2013-10-04 Mark Lam <mark.lam@apple.com>
Change ScriptDebugServer to use DebuggerCallFrame instead of JavaScriptCallFrame.
https://bugs.webkit.org/show_bug.cgi?id=121969.
Reviewed by Geoffrey Garen.
Tests: inspector-protocol/debugger/call-frame-function-name.html
inspector-protocol/debugger/call-frame-this-host.html
inspector-protocol/debugger/call-frame-this-nonstrict.html
inspector-protocol/debugger/call-frame-this-strict.html
1. Make JavaScriptCallFrame a thin shell around the DebuggerCallFrame.
DebuggerCallFrame now tracks whether it is valid instead of needing
JavaScriptCallFrame do it.
2. ScriptDebugServer now only instantiates an DebuggerCallFrame when needed
just before it pauses and calls back to its client, and then invalidates
it immediately when the callback returns. Every subsequent callback to
the client will use a new instance of the DebuggerCallFrame.
3. Similarly, ScriptDebugServer now only creates a JavaScriptCallFrame when
it "pauses".
4. DebuggerCallFrame only creates its caller DebuggerCallFrame when
it is needed i.e. when the client calls callerFrame(). Similarly,
JavaScriptCallFrame only creates its caller when it's requested.
5. DebuggerCallFrame's line() and column() now returns a base-zero int.
6. WebScriptDebugDelegate now only caches the functionName of the frame
instead of the entire DebuggerCallFrame because that is all that is
needed.
7. Also removed evaluateInGlobalCallFrame() which is not used anywhere.
* bindings/js/JSJavaScriptCallFrameCustom.cpp:
(WebCore::JSJavaScriptCallFrame::thisObject):
* bindings/js/JavaScriptCallFrame.cpp:
(WebCore::JavaScriptCallFrame::JavaScriptCallFrame):
(WebCore::JavaScriptCallFrame::caller):
* bindings/js/JavaScriptCallFrame.h:
(WebCore::JavaScriptCallFrame::create):
(WebCore::JavaScriptCallFrame::sourceID):
(WebCore::JavaScriptCallFrame::position):
(WebCore::JavaScriptCallFrame::line):
(WebCore::JavaScriptCallFrame::column):
(WebCore::JavaScriptCallFrame::functionName):
(WebCore::JavaScriptCallFrame::type):
(WebCore::JavaScriptCallFrame::scopeChain):
(WebCore::JavaScriptCallFrame::dynamicGlobalObject):
(WebCore::JavaScriptCallFrame::thisValue):
(WebCore::JavaScriptCallFrame::evaluate):
* bindings/js/ScriptDebugServer.cpp:
(WebCore::DebuggerCallFrameScope::DebuggerCallFrameScope):
(WebCore::DebuggerCallFrameScope::~DebuggerCallFrameScope):
(WebCore::ScriptDebugServer::ScriptDebugServer):
(WebCore::ScriptDebugServer::setBreakpoint):
(WebCore::ScriptDebugServer::removeBreakpoint):
(WebCore::ScriptDebugServer::hasBreakpoint):
(WebCore::ScriptDebugServer::evaluateBreakpointAction):
(WebCore::ScriptDebugServer::breakProgram):
(WebCore::ScriptDebugServer::stepOverStatement):
(WebCore::ScriptDebugServer::stepOutOfFunction):
(WebCore::ScriptDebugServer::currentDebuggerCallFrame):
(WebCore::ScriptDebugServer::dispatchDidPause):
(WebCore::ScriptDebugServer::updateCallFrame):
(WebCore::ScriptDebugServer::updateCallFrameAndPauseIfNeeded):
(WebCore::ScriptDebugServer::pauseIfNeeded):
(WebCore::ScriptDebugServer::callEvent):
(WebCore::ScriptDebugServer::returnEvent):
(WebCore::ScriptDebugServer::willExecuteProgram):
(WebCore::ScriptDebugServer::didExecuteProgram):
* bindings/js/ScriptDebugServer.h:
* bindings/js/WorkerScriptDebugServer.cpp:
(WebCore::WorkerScriptDebugServer::willExecuteProgram):
2013-10-04 Andreas Kling <akling@apple.com>
Ref-ify more stack guards.
<https://webkit.org/b/122360>
Reviewed by Anders Carlsson.
Make another pass turning RefPtr<T> into Ref<T> where possible.
2013-10-04 Ojan Vafai <ojan@chromium.org> and Martin Robinson <mrobinson@igalia.com>
[MathML] Remove RenderTree modification during layout and refactor the StretchyOp code
https://bugs.webkit.org/show_bug.cgi?id=121416
Reviewed by David Hyatt.
Tests: mathml/presentation/mo-minus.html
mathml/presentation/mo-stacked-glyphs.html
mathml/presentation/mo-stretchy-vertical-bar.html
mathml/very-large-stretchy-operators.html
MathML stretched operators by both modifying the width of the operator
and adding children to the operator node in the render tree.
Instead we make the operator width equal to the widest glyph possible that we use
to represent the operator. Additionally instead of rendering stretchy glyphs via
stacked operator pieces in separate render tree nodes, keep only one node for the
glyph, and use a custom paint method to paint the stacked representation.
With this patch, rendering seems roughly equivalent on Mac and markedly better
on Linux.
* css/mathml.css:
Not sure what this line-height:0 was here for, but it caused bugs with the new code
* mathml/MathMLTextElement.cpp:
(WebCore::MathMLTextElement::attach):
(WebCore):
(WebCore::MathMLTextElement::childrenChanged):
Need to update the anonymous render tree below <mo> elements when their
children change or when the renderer is first attached.
* mathml/MathMLTextElement.h:
(MathMLTextElement):
* rendering/mathml/RenderMathMLBlock.cpp:
(WebCore::RenderMathMLBlock::RenderMathMLBlock):
* rendering/mathml/RenderMathMLBlock.h:
Now that the preferred width doesn't depend on the height, we don't
need to override computePreferredLogicalWidths at all.
* rendering/mathml/RenderMathMLFenced.cpp:
(WebCore::RenderMathMLFenced::makeFences):
(WebCore::RenderMathMLFenced::styleDidChange):
Need to update the anonymous renderers for the anonymous RenderMathMLOperators.
* rendering/mathml/RenderMathMLOperator.cpp:
(WebCore::RenderMathMLOperator::expandedStretchHeight):
Store the non-expanded stretch height so that we can detect when the height
actually changed.
(WebCore::RenderMathMLOperator::stretchToHeight):
Only update the style on the anonymous render tree since this is called
from RenderMathMLRow::layout
(WebCore::RenderMathMLOperator::styleDidChange):
(WebCore::RenderMathMLOperator::glyphBoundsForCharacter): A helper to get glyph boundaries.
(WebCore::RenderMathMLOperator::glyphHeightForCharacter): Ditto for glyph width.
(WebCore::RenderMathMLOperator::advanceForCharacter): The advance is different from the width,
and we want the width of the operator to be the advance instead of the tight bounding width.
(WebCore::RenderMathMLOperator::computePreferredLogicalWidths): Use the max of all possible glyphs
we can use to render this operator.
(WebCore::RenderMathMLOperator::updateFromElement): We add a child for rendering the non-scaled
version of the glyph.
(WebCore::RenderMathMLOperator::firstCharacterForStretching): Helper to figure out what character
is the character used for stretching operations.
(WebCore::RenderMathMLOperator::findAcceptableStretchyCharacter): Helper to find an acceptable set
of glyph pieces for stretching characters.
(WebCore::RenderMathMLOperator::updateStyle): Resize the operator to the appropriate height and hide
the child if we are using the stretchy style.
(WebCore::RenderMathMLOperator::firstLineBoxBaseline):
(WebCore::RenderMathMLOperator::paintCharacter): Helper to paint a single character component of the
stretchy glyph.
(WebCore::RenderMathMLOperator::fillWithExtensionGlyph): Helper to paint the extender glue between
features of the stretchy glyph.
(WebCore::RenderMathMLOperator::paint): Properly paint stretchy glyphs.
* rendering/mathml/RenderMathMLOperator.h: Update method declarations.
2013-10-04 Ryosuke Niwa <rniwa@webkit.org>
Build fix after r156925. It collided with r156903.
* html/HTMLImageElement.cpp:
(WebCore::HTMLImageElement::insertedInto):
(WebCore::HTMLImageElement::removedFrom):
2013-10-04 Andreas Kling <akling@apple.com>
Clean out some FrameLoaderClient hooks that no ports were using.
<https://webkit.org/b/122356>
Reviewed by Anders Carlsson.
Removed the following hooks that were leftovers from dead ports:
- didExhaustMemoryAvailableForScript
- didNotAllowScript
- didNotAllowPlugins
- willCheckAndDispatchMessageEvent
- didChangeName
- dispatchWillInsertBody
- dispatchDidChangeResourcePriority
2013-10-03 Ryosuke Niwa <rniwa@webkit.org>
FocusController::advanceFocus spends a lot of time in HTMLMapElement::imageElement
https://bugs.webkit.org/show_bug.cgi?id=122313
Reviewed by Andreas Kling.
The bug was caused by HTMLMapElement::imageElement traversing the entire document to look for
the image element associated with a given map element. Because HTMLCollection used to find the
image element is not cached, it traversed the entire document on every area element we visit,
resulting in O(n^2) behavior.
Fixed the bug by adding the name-to-image-element map on document to avoid the traversal in
HTMLMapElement::imageElement.
* dom/Document.cpp:
(WebCore::Document::addImageElementByLowercasedUsemap): Added.
(WebCore::Document::removeImageElementByLowercasedUsemap): Added.
(WebCore::Document::imageElementByLowercasedUsemap): Added.
* dom/Document.h: Added m_imagesByUsemap.
* dom/DocumentOrderedMap.cpp:
(WebCore::keyMatchesLowercasedUsemap): Added.
(WebCore::DocumentOrderedMap::getElementByLowercasedUsemap): Added.
* dom/DocumentOrderedMap.h:
* html/HTMLImageElement.cpp:
(WebCore::HTMLImageElement::parseAttribute): Update the name-to-usemap map. The code to parse
the usemap attribute and strip # was moved from HTMLMapElement::imageElement.
(WebCore::HTMLImageElement::insertedInto): Ditto.
(WebCore::HTMLImageElement::removedFrom): Ditto.
(WebCore::HTMLImageElement::matchesLowercasedUsemap): Added; called by DocumentOrderedMap.
* html/HTMLImageElement.h:
* html/HTMLMapElement.cpp:
(WebCore::HTMLMapElement::imageElement): Call Document::imageElementByUsemap instead of
looking through all image elements in the document.
2013-10-04 Sam Weinig <sam@webkit.org>
Unify rubberband control
https://bugs.webkit.org/show_bug.cgi?id=122341
Reviewed by Tim Horton.
- Consolidates the two ways we were passing state about whether
to rubber-band on a particular edge down to one.
* WebCore.exp.in:
* page/Page.cpp:
* page/Page.h:
* page/scrolling/ScrollingCoordinator.h:
(WebCore::ScrollingCoordinator::isRubberBandInProgress):
* page/scrolling/ScrollingTree.cpp:
(WebCore::ScrollingTree::ScrollingTree):
(WebCore::ScrollingTree::setCanRubberBandState):
(WebCore::ScrollingTree::rubberBandsAtLeft):
(WebCore::ScrollingTree::rubberBandsAtRight):
(WebCore::ScrollingTree::rubberBandsAtBottom):
(WebCore::ScrollingTree::rubberBandsAtTop):
(WebCore::ScrollingTree::willWheelEventStartSwipeGesture):
* page/scrolling/ScrollingTree.h:
* page/scrolling/mac/ScrollingCoordinatorMac.h:
* page/scrolling/mac/ScrollingCoordinatorMac.mm:
* page/scrolling/mac/ScrollingTreeScrollingNodeMac.mm:
(WebCore::ScrollingTreeScrollingNodeMac::shouldRubberBandInDirection):
2013-10-04 Andreas Kling <akling@apple.com>
CTTE: SubframeLoader backpointer to Frame should be a reference.
<https://webkit.org/b/122350>
Reviewed by Anders Carlsson.
SubframeLoader is tied to the lifetime of FrameLoader, which in turn
is tied to the lifetime of Frame.
2013-10-04 Anders Carlsson <andersca@apple.com>
Remove some unneeded code from WidgetMac
https://bugs.webkit.org/show_bug.cgi?id=122355
Reviewed by Dan Bernstein.
Remove code to manage the visible rect, it's not needed anymore.
* platform/Widget.h:
* platform/mac/WidgetMac.mm:
(WebCore::Widget::~Widget):
(WebCore::Widget::setFrameRect):
(WebCore::Widget::setPlatformWidget):
2013-10-04 Daniel Bates <dabates@apple.com>
[iOS] Upstream disk image cache
https://bugs.webkit.org/show_bug.cgi?id=121985
Reviewed by Joseph Pecoraro.
* WebCore.exp.in:
* WebCore.xcodeproj/project.pbxproj:
* loader/ResourceBuffer.cpp:
(WebCore::ResourceBuffer::isUsingDiskImageCache):
* loader/ResourceBuffer.h:
* loader/cache/CachedImage.cpp:
(WebCore::CachedImage::canUseDiskImageCache): Added.
(WebCore::CachedImage::useDiskImageCache): Added.
* loader/cache/CachedImage.h:
* loader/cache/CachedResource.cpp:
(WebCore::CachedResource::isSafeToMakePurgeable):
(WebCore::CachedResource::isUsingDiskImageCache): Added.
* loader/cache/CachedResource.h:
(WebCore::CachedResource::canUseDiskImageCache): Added.
(WebCore::CachedResource::useDiskImageCache): Added.
* loader/cache/MemoryCache.cpp:
(WebCore::MemoryCache::flushCachedImagesToDisk): Added.
(WebCore::MemoryCache::TypeStatistic::addResource):
(WebCore::MemoryCache::dumpStats):
(WebCore::MemoryCache::dumpLRULists):
* loader/cache/MemoryCache.h:
(WebCore::MemoryCache::TypeStatistic::TypeStatistic):
* loader/ios/DiskImageCacheClientIOS.h: Added.
* loader/ios/DiskImageCacheIOS.h: Added.
* loader/ios/DiskImageCacheIOS.mm: Added.
* platform/Logging.h:
* platform/SharedBuffer.cpp:
(WebCore::SharedBuffer::SharedBuffer):
(WebCore::SharedBuffer::~SharedBuffer):
(WebCore::SharedBuffer::isAllowedToBeMemoryMapped): Added.
(WebCore::SharedBuffer::allowToBeMemoryMapped): Added.
(WebCore::SharedBuffer::failedMemoryMap): Added.
(WebCore::SharedBuffer::markAsMemoryMapped): Added.
(WebCore::SharedBuffer::memoryMappedNotificationCallbackData): Added.
(WebCore::SharedBuffer::memoryMappedNotificationCallback): Added.
(WebCore::SharedBuffer::setMemoryMappedNotificationCallback): Added.
(WebCore::SharedBuffer::data):
(WebCore::SharedBuffer::append):
(WebCore::SharedBuffer::buffer):
(WebCore::SharedBuffer::getSomeData):
* platform/SharedBuffer.h:
(WebCore::SharedBuffer::isMemoryMapped): Added.
* platform/cf/SharedBufferCF.cpp:
(WebCore::SharedBuffer::SharedBuffer):
2013-10-04 Bear Travis <betravis@adobe.com>
[CSS Shapes] Basic shapes should be animatable for shape-outside
https://bugs.webkit.org/show_bug.cgi?id=122343
Reviewed by Dirk Schulze.
Test: fast/shapes/shape-outside-floats/shape-outside-animation.html
Add shape outside to the list of animatable properties. The infrastructure
is already in place for animating basic shapes on shape-inside and clipping
paths. See https://bugs.webkit.org/show_bug.cgi?id=101854.
* page/animation/CSSPropertyAnimation.cpp:
(WebCore::CSSPropertyAnimationWrapperMap::CSSPropertyAnimationWrapperMap):
2013-10-04 Andreas Kling <akling@apple.com>
Tighten typing in some RenderLayer code.
<https://webkit.org/b/122342>
Reviewed by Antti Koivisto.
Use tighter types instead of Node and RenderObject inside RenderLayer
where applicable.
2013-10-04 Ralph Thomas <ralpht@gmail.com>
Inserting a JS generated keyframe animation shouldn't trigger a whole document style recalc
https://bugs.webkit.org/show_bug.cgi?id=119479
Reviewed by Antti Koivisto.
Change CSSStyleSheet::didMutateRules to not invalidate all node's styles when inserting a
@-webkit-keyframes rule, and to instead insert the rule directly into the StyleResolver.
Test: animation/keyframes-dynamic.html: adds and removes keyframe rules using JavaScript and
validates that the correct elements are animated.
* css/CSSStyleSheet.cpp:
(WebCore::CSSStyleSheet::didMutateRules):
(WebCore::CSSStyleSheet::insertRule):
* css/CSSStyleSheet.h:
2013-10-04 Zan Dobersek <zdobersek@igalia.com>
[WebIDL] Annotate IDL interfaces under Source/WebCore/fileapi/ with the OperationsNotDeletable attribute
https://bugs.webkit.org/show_bug.cgi?id=122275
Reviewed by Darin Adler.
Before changing the JSC bindings generator to enforce WebIDL operations to be configurable, all the
interfaces are being annotated with the OperationsNotDeletable attribute. The attribute currently
doesn't have any effect, but will keep the operations not configurable after the generator is modified
to preserve the original behavior. The attribute will be removed from each interface after checking
conformity with other browsers (in terms of configurability of operations of that interface) and the
WebKit's existing test suites.
This patch covers IDL interfaces under Source/WebCore/fileapi/.
* fileapi/Blob.idl:
* fileapi/FileException.idl:
* fileapi/FileList.idl:
* fileapi/FileReader.idl:
* fileapi/FileReaderSync.idl:
2013-10-04 Zan Dobersek <zdobersek@igalia.com>
[WebIDL] Annotate IDL interfaces under Source/WebCore/dom/ with the OperationsNotDeletable attribute
https://bugs.webkit.org/show_bug.cgi?id=122271
Reviewed by Darin Adler.
Before changing the JSC bindings generator to enforce WebIDL operations to be configurable, all the
interfaces are being annotated with the OperationsNotDeletable attribute. The attribute currently
doesn't have any effect, but will keep the operations not configurable after the generator is modified
to preserve the original behavior. The attribute will be removed from each interface after checking
conformity with other browsers (in terms of configurability of operations of that interface) and the
WebKit's existing test suites.
This patch covers IDL interfaces under Source/WebCore/dom/.
* dom/CharacterData.idl:
* dom/ChildNode.idl:
* dom/ClientRectList.idl:
* dom/Clipboard.idl:
* dom/CompositionEvent.idl:
* dom/CustomEvent.idl:
* dom/DOMCoreException.idl:
* dom/DOMImplementation.idl:
* dom/DOMNamedFlowCollection.idl:
* dom/DOMStringList.idl:
* dom/DOMStringMap.idl:
* dom/DataTransferItem.idl:
* dom/DataTransferItemList.idl:
* dom/DeviceMotionEvent.idl:
* dom/DeviceOrientationEvent.idl:
* dom/Document.idl:
* dom/DocumentFragment.idl:
* dom/DocumentType.idl:
* dom/Element.idl:
* dom/Event.idl:
* dom/EventException.idl:
* dom/EventListener.idl:
* dom/EventTarget.idl:
* dom/KeyboardEvent.idl:
* dom/MessageEvent.idl:
* dom/MessagePort.idl:
* dom/MouseEvent.idl:
* dom/MutationEvent.idl:
* dom/MutationObserver.idl:
* dom/NamedNodeMap.idl:
* dom/Node.idl:
* dom/NodeFilter.idl:
* dom/NodeIterator.idl:
* dom/NodeList.idl:
* dom/Range.idl:
* dom/RangeException.idl:
* dom/ShadowRoot.idl:
* dom/Text.idl:
* dom/TextEvent.idl:
* dom/TouchEvent.idl:
* dom/TouchList.idl:
* dom/TreeWalker.idl:
* dom/UIEvent.idl:
* dom/WebKitNamedFlow.idl:
* dom/WheelEvent.idl:
2013-10-04 Zan Dobersek <zdobersek@igalia.com>
[WebIDL] Annotate IDL interfaces under Source/WebCore/xml/ with the OperationsNotDeletable attribute
https://bugs.webkit.org/show_bug.cgi?id=122269
Reviewed by Darin Adler.
Before changing the JSC bindings generator to enforce WebIDL operations to be configurable, all the
interfaces are being annotated with the OperationsNotDeletable attribute. The attribute currently
doesn't have any effect, but will keep the operations not configurable after the generator is modified
to preserve the original behavior. The attribute will be removed from each interface after checking
conformity with other browsers (in terms of configurability of operations of that interface) and the
WebKit's existing test suites.
This patch covers IDL interfaces under Source/WebCore/xml/.
* xml/DOMParser.idl:
* xml/XMLHttpRequest.idl:
* xml/XMLHttpRequestException.idl:
* xml/XMLHttpRequestUpload.idl:
* xml/XMLSerializer.idl:
* xml/XPathEvaluator.idl:
* xml/XPathException.idl:
* xml/XPathExpression.idl:
* xml/XPathNSResolver.idl:
* xml/XPathResult.idl:
* xml/XSLTProcessor.idl:
2013-10-04 Bear Travis <betravis@adobe.com>
[CSS Shapes] Shape Outside should relayout when set dynamically
https://bugs.webkit.org/show_bug.cgi?id=122197
Reviewed by Alexandru Chiculita.
Tests: fast/shapes/shape-outside-floats/shape-outside-dynamic-shape.html
fast/shapes/shape-outside-floats/shape-outside-dynamic-shape-overhang.html
When shape outside is modified, dependent content needs to relayout. This patch
removes the float from the float lists and marks dependents for layout using
RenderBox::removeFloatingOrPositionedChildFromBlockLists(). This is the same
method used when switching from float: left to float: right and vice versa
(see RenderElement::styleWillChange).
* rendering/RenderBox.cpp:
(WebCore::RenderBox::updateShapeOutsideInfoAfterStyleChange): Mark shape-outside dependents
for layout.
* rendering/RenderBox.h:
(WebCore::RenderBox::markShapeOutsideDependentsForLayout): Mark all the items that may be
affected by this shape-outside for relayout.
2013-10-04 Antti Koivisto <antti@apple.com>
Tighten markContainingBlocksForLayout
https://bugs.webkit.org/show_bug.cgi?id=122326
Reviewed by Anders Carlsson.
2013-10-04 Andreas Kling <akling@apple.com>
Node: removedFrom() and insertedInto() should use references.
<https://webkit.org/b/122315>
Reviewed by Anders Carlsson.
ContainerNode* -> ContainerNode&
2013-10-04 Romain Perier <romain.perier@gmail.com>
Optimize strings copies in srcset parser
https://bugs.webkit.org/show_bug.cgi?id=121899
Reviewed by Alexey Proskuryakov.
No new tests, covered by existing ones.
* html/parser/HTMLParserIdioms.cpp:
(WebCore::parseImagesWithScaleFromSrcsetAttribute): Don't copy
image.imageURL at each loop iteration, save indexes instead.
(WebCore::bestFitSourceForImageAttributes): Make a String for
the URL only when the corresponding candidate is chosen
by the selection algorithm. It reduces the number of copies
significantly and improves performance
(around 30% with the "Release" profile and 60% with the "Debug" one).
2013-10-04 Alexey Proskuryakov <ap@apple.com>
Add svn:ignore to *.pyc files in inspector/Scripts directory, so that they don't
show up as unversioned all the time.
* inspector/Scripts: Added property svn:ignore.
2013-10-04 peavo@outlook.com <peavo@outlook.com>
[Win][WebGL] Crash on exit
https://bugs.webkit.org/show_bug.cgi?id=120764
Reviewed by Martin Robinson.
On exit, libGLESv2.dll is detached from the process and relevant memory is released
before the atexit GL context cleanup handler is called, causing a NULL pointer crash.
The GL context cleanup code was originally written to avoid a X server crash on exit,
so it's only needed for PLATFORM(X11).
* platform/graphics/GLContext.cpp: Only clean up active GL contexts on exit for PLATFORM(X11).
(WebCore::GLContext::cleanupSharedX11Display):
(WebCore::GLContext::cleanupActiveContextsAtExit):
(WebCore::GLContext::GLContext):
(WebCore::GLContext::~GLContext):
2013-10-04 Mihnea Ovidenie <mihnea@adobe.com>
[CSSRegions] Regions as stacking contexts should paint over positioned sibling
https://bugs.webkit.org/show_bug.cgi?id=122321
Reviewed by Alexandru Chiculita.
Test: fast/regions/layers/region-normalflow-stacking-context.html
Since regions are stacking contexts, they should not be in normal flow list of layers.
More clean-up after https://bugs.webkit.org/show_bug.cgi?id=117365 and https://bugs.webkit.org/show_bug.cgi?id=121828
which enabled the layers.
* rendering/RenderLayer.cpp:
(WebCore::RenderLayer::shouldBeNormalFlowOnly):
(WebCore::RenderLayer::shouldBeSelfPaintingLayer):
2013-10-04 Krzysztof Wolanski <k.wolanski@samsung.com>
[EFL] Enable correct behaviour for deleting regional indicator symbols
https://bugs.webkit.org/show_bug.cgi?id=122209
Reviewed by Gyuyoung Kim.
Regional indicator symbols that are combined should behave as a single character when deleting.
Removed unused variable initialState.
* rendering/RenderText.cpp:
(WebCore::RenderText::previousOffsetForBackwardDeletion):
2013-10-04 Zan Dobersek <zdobersek@igalia.com>
[WebIDL] Annotate IDL interfaces under Source/WebCore/css/ with the OperationsNotDeletable attribute
https://bugs.webkit.org/show_bug.cgi?id=122276
Reviewed by Darin Adler.
Before changing the JSC bindings generator to enforce WebIDL operations to be configurable, all the
interfaces are being annotated with the OperationsNotDeletable attribute. The attribute currently
doesn't have any effect, but will keep the operations not configurable after the generator is modified
to preserve the original behavior. The attribute will be removed from each interface after checking
conformity with other browsers (in terms of configurability of operations of that interface) and the
WebKit's existing test suites.
This patch covers IDL interfaces under Source/WebCore/css/.
* css/CSSHostRule.idl:
* css/CSSMediaRule.idl:
* css/CSSPrimitiveValue.idl:
* css/CSSRuleList.idl:
* css/CSSStyleDeclaration.idl:
* css/CSSStyleSheet.idl:
* css/CSSSupportsRule.idl:
* css/CSSValueList.idl:
* css/DOMWindowCSS.idl:
* css/FontLoader.idl:
* css/MediaList.idl:
* css/MediaQueryList.idl:
* css/MediaQueryListListener.idl:
* css/StyleMedia.idl:
* css/StyleSheet.idl:
* css/StyleSheetList.idl:
* css/WebKitCSSFilterValue.idl:
* css/WebKitCSSKeyframesRule.idl:
* css/WebKitCSSMatrix.idl:
* css/WebKitCSSTransformValue.idl:
2013-10-04 Zan Dobersek <zdobersek@igalia.com>
[WebIDL] Annotate IDL interfaces under Source/WebCore/loader/appcache/ with the OperationsNotDeletable attribute
https://bugs.webkit.org/show_bug.cgi?id=122274
Reviewed by Darin Adler.
Before changing the JSC bindings generator to enforce WebIDL operations to be configurable, all the
interfaces are being annotated with the OperationsNotDeletable attribute. The attribute currently
doesn't have any effect, but will keep the operations not configurable after the generator is modified
to preserve the original behavior. The attribute will be removed from each interface after checking
conformity with other browsers (in terms of configurability of operations of that interface) and the
WebKit's existing test suites.
This patch covers IDL interfaces under Source/WebCore/loader/appcache/.
* loader/appcache/DOMApplicationCache.idl:
2013-10-04 Zan Dobersek <zdobersek@igalia.com>
[WebIDL] Annotate IDL interfaces under Source/WebCore/plugins/ with the OperationsNotDeletable attribute
https://bugs.webkit.org/show_bug.cgi?id=122273
Reviewed by Darin Adler.
Before changing the JSC bindings generator to enforce WebIDL operations to be configurable, all the
interfaces are being annotated with the OperationsNotDeletable attribute. The attribute currently
doesn't have any effect, but will keep the operations not configurable after the generator is modified
to preserve the original behavior. The attribute will be removed from each interface after checking
conformity with other browsers (in terms of configurability of operations of that interface) and the
WebKit's existing test suites.
This patch covers IDL interfaces under Source/WebCore/plugins/.
* plugins/DOMMimeTypeArray.idl:
* plugins/DOMPlugin.idl:
* plugins/DOMPluginArray.idl:
2013-10-04 Zan Dobersek <zdobersek@igalia.com>
[WebIDL] Annotate IDL interfaces under Source/WebCore/storage/ with the OperationsNotDeletable attribute
https://bugs.webkit.org/show_bug.cgi?id=122272
Reviewed by Darin Adler.
Before changing the JSC bindings generator to enforce WebIDL operations to be configurable, all the
interfaces are being annotated with the OperationsNotDeletable attribute. The attribute currently
doesn't have any effect, but will keep the operations not configurable after the generator is modified
to preserve the original behavior. The attribute will be removed from each interface after checking
conformity with other browsers (in terms of configurability of operations of that interface) and the
WebKit's existing test suites.
This patch covers IDL interfaces under Source/WebCore/storage/.
* storage/Storage.idl:
* storage/StorageEvent.idl:
2013-10-04 Zan Dobersek <zdobersek@igalia.com>
[WebIDL] Annotate IDL interfaces under Source/WebCore/workers/ with the OperationsNotDeletable attribute
https://bugs.webkit.org/show_bug.cgi?id=122270
Reviewed by Darin Adler.
Before changing the JSC bindings generator to enforce WebIDL operations to be configurable, all the
interfaces are being annotated with the OperationsNotDeletable attribute. The attribute currently
doesn't have any effect, but will keep the operations not configurable after the generator is modified
to preserve the original behavior. The attribute will be removed from each interface after checking
conformity with other browsers (in terms of configurability of operations of that interface) and the
WebKit's existing test suites.
This patch covers IDL interfaces under Source/WebCore/workers/.
* workers/DedicatedWorkerGlobalScope.idl:
* workers/Worker.idl:
* workers/WorkerGlobalScope.idl:
* workers/WorkerLocation.idl:
2013-10-04 Andrei Bucur <abucur@adobe.com>
[CSS Regions] Infinite loop when computing widows
https://bugs.webkit.org/show_bug.cgi?id=122215
Reviewed by David Hyatt.
The patch ensures it's not possible to relayout a block indefinitely because of widows contraints. You can't
break a block more than once to account for widows. This can happen if, for example, some lines are moved
to the next container and there the content breaks in another container again without respecting the widows property.
This is in line with the idea of not leaving empty fragmentation containers during layout.
Test: fast/regions/regions-widows-stack-overflow.html
* rendering/RenderBlockFlow.cpp:
(WebCore::RenderBlockFlow::adjustLinePositionForPagination):
(WebCore::RenderBlockFlow::setBreakAtLineToAvoidWidow):
(WebCore::RenderBlockFlow::setDidBreakAtLineToAvoidWidow):
(WebCore::RenderBlockFlow::clearDidBreakAtLineToAvoidWidow):
(WebCore::RenderBlockFlow::clearShouldBreakAtLineToAvoidWidow):
* rendering/RenderBlockFlow.h:
(WebCore::RenderBlockFlow::RenderBlockFlowRareData::RenderBlockFlowRareData): Rename the m_shouldBreakAtLineToAvoidWidow
flag to m_didBreakAtLineToAvoidWidow.
(WebCore::RenderBlockFlow::shouldBreakAtLineToAvoidWidow): Use the line index to determine if it should break or not.
(WebCore::RenderBlockFlow::didBreakAtLineToAvoidWidow): Use to determine if a break already happened because of widows.
* rendering/RenderBlockLineLayout.cpp:
(WebCore::RenderBlock::layoutRunsAndFloatsInRange):
2013-10-03 Anders Carlsson <andersca@apple.com>
Assert that we don't try to index past the end of the m_coreTextIndices array
https://bugs.webkit.org/show_bug.cgi?id=122308
Reviewed by Dan Bernstein.
Because an assertion failure is better than a random crash.
* platform/graphics/mac/ComplexTextController.cpp:
(WebCore::ComplexTextController::ComplexTextRun::indexAt):
2013-10-03 Antti Koivisto <antti@apple.com>
Move setting of some layout bits to RenderElement
https://bugs.webkit.org/show_bug.cgi?id=122256
Reviewed by Andreas Kling.
These bits never apply to RenderText nodes:
normalChildNeedsLayout
posChildNeedsLayout
needsSimplifiedNormalFlowLayout
normalChildNeedsLayout
positionedMovementLayout
The code for setting them can be moved to RenderElement.
Also separated the code paths for setting and clearing the bits and uninlined
everything that is not massively popular.
2013-10-03 Sam Weinig <sam@webkit.org>
Remove shouldRubberBandInDirection from the WKBundlePageUIClient
https://bugs.webkit.org/show_bug.cgi?id=122309
Reviewed by Andreas Kling.
* loader/EmptyClients.h:
* page/ChromeClient.h:
* page/FrameView.cpp:
* page/FrameView.h:
* platform/ScrollableArea.h:
* platform/mac/ScrollAnimatorMac.mm:
(WebCore::ScrollAnimatorMac::shouldRubberBandInDirection):
2013-10-03 Christophe Dumez <ch.dumez@sisa.samsung.com>
Fix the HTMLSelectElement.prototype.remove() method
https://bugs.webkit.org/show_bug.cgi?id=121586
Reviewed by Darin Adler.
Fix the HTMLSelectElement.prototype.remove() method so that it behaves like
Element.remove() if no argument is passed (from ChildNode). This behavior
is consistent with Firefox and Blink.
See https://www.w3.org/Bugs/Public/show_bug.cgi?id=20720 for more
information.
Tests: js/dom/select-options-remove.html
* bindings/js/JSHTMLOptionsCollectionCustom.cpp:
(WebCore::JSHTMLOptionsCollection::remove):
Stop calling JSHTMLSelectElement::remove() blindly as it is dangerous, especially
now that calling it without argument now detaches the element. Instead, have the
bindings call the corresponding methods on the HTMLOptionsCollection implementation
object, as it should.
* bindings/js/JSHTMLSelectElementCustom.cpp:
(WebCore::JSHTMLSelectElement::remove):
Call Element::remove() if no argument is given.
* html/HTMLOptionsCollection.cpp:
(WebCore::HTMLOptionsCollection::remove):
* html/HTMLOptionsCollection.h:
* html/HTMLSelectElement.cpp:
* html/HTMLSelectElement.h:
Rename remove(int) to removeByIndex(int) to avoid conflict with
Node::remove(ExceptionCode&).
2013-10-03 Samuel White <samuel_white@apple.com>
Regression: AX: <table><caption> no longer exposed as AXTitle.
https://bugs.webkit.org/show_bug.cgi?id=121977
Reviewed by Darin Adler.
Some cleanup of accessibilityText. Notably, subclasses were unnecessarily redeclaring this method as both private and
protected. Added OVERRIDE keyword to these subclasses as needed. Moved titleElementText to virtual so we can do subclass
overrides in cases like this bug. That is, AccessibilityTable can leverage the existing machinery for alternativeText,
visibleText, and helpText, but we do some custom work ONLY in titleElementText.
Test: accessibility/table-title.html
* accessibility/AccessibilityImageMapLink.h:
* accessibility/AccessibilityMediaControls.h:
* accessibility/AccessibilityNodeObject.cpp:
(WebCore::AccessibilityNodeObject::titleElementText):
* accessibility/AccessibilityNodeObject.h:
* accessibility/AccessibilityTable.cpp:
(WebCore::AccessibilityTable::titleElementText):
* accessibility/AccessibilityTable.h:
2013-10-03 Anders Carlsson <andersca@apple.com>
Ignore deprecation warnings
https://bugs.webkit.org/show_bug.cgi?id=122302
Reviewed by Mark Rowe.
* accessibility/mac/WebAccessibilityObjectWrapperMac.mm:
(-[WebAccessibilityObjectWrapper convertPointToScreenSpace:]):
* bindings/objc/DOMHTML.mm:
(-[DOMHTMLInputElement _rectOnScreen]):
* page/mac/EventHandlerMac.mm:
(WebCore::EventHandler::sendFakeEventsAfterWidgetTracking):
* page/mac/FrameSnapshottingMac.mm:
(WebCore::imageFromRect):
* platform/graphics/mac/IconMac.mm:
(WebCore::Icon::Icon):
* platform/mac/DragImageMac.mm:
(WebCore::scaleDragImage):
* platform/mac/PlatformEventFactoryMac.mm:
(WebCore::globalPoint):
* platform/mac/ScrollViewMac.mm:
(WebCore::ScrollView::platformContentsToScreen):
(WebCore::ScrollView::platformScreenToContents):
2013-10-03 Hans Muller <hmuller@adobe.com>
[CSS Shapes] Support the shape-image-threshold property
https://bugs.webkit.org/show_bug.cgi?id=122254
Reviewed by Andreas Kling.
Replace the hardwired 0 Shape::createShape() threshold parameter with the style's
shapeImageThreshold() value (which has been clamped to [0,1]).
Tests: fast/shapes/shape-outside-floats/shape-outside-floats-image-threshold-001.html
fast/shapes/shape-outside-floats/shape-outside-floats-image-threshold-002.html
* rendering/shapes/ShapeInfo.cpp:
(WebCore::::computedShape):
2013-10-03 Mihai Maerean <mmaerean@adobe.com>
[CSS Regions] Follow-up code style change after bug #121828 All regions have layers
https://bugs.webkit.org/show_bug.cgi?id=122265
Reviewed by Darin Adler.
Comments moved to the cpp file, as requested in the review of bug #121828 All regions have layers.
No new tests, no behavior change.
* rendering/RenderMultiColumnSet.cpp:
(WebCore::RenderMultiColumnSet::requiresLayer):
* rendering/RenderMultiColumnSet.h:
* rendering/RenderRegion.cpp:
(WebCore::RenderRegion::requiresLayer):
* rendering/RenderRegion.h:
2013-10-03 Alejandro G. Castro <alex@igalia.com>
[cairo] Initialize the m_compositorTexture in GraphicsContext3DCairo.cpp
https://bugs.webkit.org/show_bug.cgi?id=122285
Reviewed by Noam Rosenthal.
Initialize to the default texture to avoid the random texture name
and generate the texture name.
* platform/graphics/cairo/GraphicsContext3DCairo.cpp:
(WebCore::GraphicsContext3D::GraphicsContext3D): Initialize
m_compositorTexture.
(WebCore::GraphicsContext3D::~GraphicsContext3D): Delete the
generated textures names.
* platform/graphics/opengl/GraphicsContext3DOpenGLES.cpp:
(WebCore::GraphicsContext3D::reshapeFBOs): Generate the texture
names for m_compositorTexture and m_texture.
2013-10-03 Zoltan Horvath <zoltan@webkit.org>
[CSS Shapes] Support block content with inline content around floats in shape-inside
https://bugs.webkit.org/show_bug.cgi?id=121616
Reviewed by David Hyatt.
In r156022 and r156364, I added support for floats inside shape-inside with inline content. This change extends
the existing implementation to support block content with inline content (paragraphs). I added an extra text for
positioning a float inside shape-inside without text content around it.
Tests: fast/shapes/shape-inside/shape-inside-left-float-in-lower-left-triangle-block-content.html
fast/shapes/shape-inside/shape-inside-left-float-in-lower-right-triangle-block-content.html
fast/shapes/shape-inside/shape-inside-left-float-in-lower-right-triangle.html
fast/shapes/shape-inside/shape-inside-left-float-in-upper-left-triangle-block-content.html
fast/shapes/shape-inside/shape-inside-left-float-in-upper-right-triangle-block-content.html
* rendering/FloatingObjects.h:
(WebCore::FloatingObject::logicalSize): Add new function to return the FloatingObject logical size.
* rendering/LineWidth.cpp:
(WebCore::LineWidth::fitBelowFloats): When the lineBreaker code pushes down the content below the floating object,
we need to update the segments if we are in a shape-inside.
* rendering/RenderBlock.cpp:
(WebCore::RenderBlock::computeLogicalLocationForFloat): Do the positioning based on the float actual size, and use the
recent shapeInsideInfo. (Calling layoutShapeInsideInfo which deals with the layoutStates also instead of shapeInsideInfo.)
* rendering/RenderBlock.h:
* rendering/RenderBlockLineLayout.cpp:
(WebCore::RenderBlock::adjustLogicalLineTopAndLogicalHeightIfNeeded): If we don't have inline content we still need to positionize
our float content in a shape-inside.
(WebCore::updateSegmentsForShapes): Use the right coordinates for block content with inline content.
2013-10-03 Brady Eidson <beidson@apple.com>
Move IDBFactoryBackend creation to DatabaseStrategy.
https://bugs.webkit.org/show_bug.cgi?id=122284
Reviewed by Alexey Proskuryakov.
* WebCore.exp.in:
* WebCore.xcodeproj/project.pbxproj:
* Modules/indexeddb/IDBFactory.h:
* Modules/indexeddb/IDBFactoryBackendInterface.cpp:
(WebCore::IDBFactoryBackendInterface::create):
* platform/DatabaseStrategy.cpp:
(WebCore::DatabaseStrategy::createIDBFactoryBackend): Implement a default.
* platform/DatabaseStrategy.h:
2013-10-03 peavo@outlook.com <peavo@outlook.com>
[WinCairo] Compile error with VIDEO disabled.
https://bugs.webkit.org/show_bug.cgi?id=122266
Reviewed by Brent Fulgham.
* dom/Document.cpp:
(WebCore::Document::dispatchFullScreenChangeOrErrorEvent): Protect with ENABLE(VIDEO) guard.
2013-10-03 Hans Muller <hmuller@adobe.com>
[CSS Shapes] add shape-margin support for image valued shapes
https://bugs.webkit.org/show_bug.cgi?id=121619
Reviewed by Alexandru Chiculita.
Add support for computing the shape-margin boundary for a shape-outside whose
value is an image.
Tests: fast/shapes/shape-outside-floats/shape-outside-floats-image-margin-001.html
fast/shapes/shape-outside-floats/shape-outside-floats-image-margin-002.html
fast/shapes/shape-outside-floats/shape-outside-floats-image-margin-003.html
* rendering/shapes/RasterShape.cpp:
(WebCore::MarginIntervalGenerator::MarginIntervalGenerator): Internal utility that generates the margin intervals for the image interval specified with set().
(WebCore::MarginIntervalGenerator::set):
(WebCore::MarginIntervalGenerator::intervalAt):
(WebCore::findInsertionPoint): Find the insertion point index for the the specified X value, within a vector of intervals sorted by X1.
(WebCore::RasterShapeIntervals::uniteMarginInterval): Destructively unite one interval with an existing one, or append it.
(WebCore::RasterShapeIntervals::computeShapeMarginIntervals):
(WebCore::RasterShape::marginIntervals): Return the lazily computed value, or create it with computeShapeMarginIntervals().
* rendering/shapes/RasterShape.h:
(WebCore::RasterShapeIntervals::getIntervals):
(WebCore::RasterShape::RasterShape):
(WebCore::RasterShapeIntervals::uniteMarginInterval):
* WTF/wtf/MathExtras.h: Added clampToUnsigned() inline.
2013-10-03 Mihnea Ovidenie <mihnea@adobe.com>
[CSSRegions] Remove unused RenderLayerModelObject::updateLayerIfNeeded
https://bugs.webkit.org/show_bug.cgi?id=122262
Reviewed by Alexandru Chiculita.
All regions have layers by default therefore there is no need for this function.
No tests needed, just a minor cleanup.
* rendering/RenderLayerModelObject.cpp:
* rendering/RenderLayerModelObject.h:
2013-10-02 Mario Sanchez Prada <mario.prada@samsung.com>
[ATK] Expose aria-invalid as a text attribute (not object attribute)
https://bugs.webkit.org/show_bug.cgi?id=122015
Reviewed by Chris Fleizach.
Expose the aria-invalid attribute correctly through a text
attribute (through the AtkText interface) instead of using an
object, according to what the WAI-ARIA specs says.
http://www.w3.org/TR/wai-aria-implementation/#mapping_state-property
This will be tested by accesibility/aria-invalid.html, which should
keep passing after thanks to the changes done in the DRT and WKTR.
* accessibility/AccessibilityObject.cpp:
(WebCore::AccessibilityObject::invalidStatus): Update this method
to only return values recognized by the WAI-ARIA specification.
* accessibility/atk/WebKitAccessibleInterfaceText.cpp:
(getAttributeSetForAccessibilityObject): Expose aria-invalid as a
custom text attribute 'invalid', following the lead of Firefox.
Also register that custom attribute as a AtkTextAttribute.
* accessibility/atk/WebKitAccessibleWrapperAtk.cpp:
(webkitAccessibleGetAttributes): Remove exposure of aria-invalid
as an object attribute from here.
2013-10-03 Zan Dobersek <zdobersek@igalia.com>
Add the NotDeletable, OperationsNotDeletable IDL attributes
https://bugs.webkit.org/show_bug.cgi?id=122217
Reviewed by Darin Adler.
Before adjusting the JSC bindings generator to enforce configurable operations and thus conform to the
WebIDL specification in this regard, two no-op attributes are introduced that will preserve the current
behavior of operations being non-configurable.
All the relevant interfaces will be annotated with the OperationsNotDeletable attribute first. After the
generator is properly modified, this attribute will be removed from the interfaces after checking that
the operations' configurability also matches the configurability of operations in other browser engines
and that the change introduces no regressions in tests.
The NotDeletable attribute will be used as required to annotate operations that should stay
non-configurable for backwards compatibility or cross-browser compatibility.
* bindings/scripts/IDLAttributes.txt:
2013-10-03 Ryosuke Niwa <rniwa@webkit.org>
Remove preDispatchEventHandler and postDispatchEventHandler,
functions that are supposed to be removed in the previous commit (r156825).
* dom/Node.h:
2013-10-02 Ryosuke Niwa <rniwa@webkit.org>
Get rid of Node::preDispatchEventHandler and Node::postDispatchEventHandler
https://bugs.webkit.org/show_bug.cgi?id=122144
Reviewed by Darin Adler.
Get rid of pre/post event dispatch callbacks preDispatchEventHandler and postDispatchEventHandler since
the former was only called by HTMLMediaElement and HTMLInputElement and the latter was only called by
HTMLInputElement.
Explicitly call HTMLMediaElement's willDispatchFullScreenChangeEvent in fullScreenChangeDelayTimerFired
of Document since this is the only place that fires the fullscreenchange event.
Also add an explicit call to willDispatchEvent and didDispatchClickEvent in EventDispatcher::dispatch.
This also allows us to stack-allocate InputElementClickHandlingState instead of having willDispatchEvent
heap-allocate it and pass it around as void*.
* WebCore.order:
* dom/Document.cpp:
(WebCore::Document::fullScreenChangeDelayTimerFired):
(WebCore::Document::dispatchFullScreenChangeOrErrorEvent):
* dom/Document.h:
* dom/EventContext.cpp:
* dom/EventDispatcher.cpp:
(WebCore::EventDispatcher::dispatch):
(WebCore::EventDispatcher::callWillDispatchEventOnInputElement):
(WebCore::EventDispatcher::dispatchEventPostProcess):
* dom/EventDispatcher.h:
* html/CheckboxInputType.cpp:
(WebCore::CheckboxInputType::willDispatchClick):
* html/CheckboxInputType.h:
* html/HTMLInputElement.cpp:
(WebCore::HTMLInputElement::willDispatchEvent):
(WebCore::HTMLInputElement::didDispatchClickEvent):
* html/HTMLInputElement.h:
* html/HTMLMediaElement.cpp:
* html/HTMLMediaElement.h:
(WebCore::HTMLMediaElement::willDispatchFullScreenChangeEvent): Renamed from preDispatchEventHandler.
* html/HTMLTextFormControlElement.h:
* html/InputType.cpp:
(WebCore::InputType::willDispatchClick):
* html/InputType.h:
* html/RadioInputType.cpp:
(WebCore::RadioInputType::willDispatchClick):
* html/RadioInputType.h:
2013-10-02 Ryosuke Niwa <rniwa@webkit.org>
Update binding test results after r156808 for r156769.
* bindings/scripts/test/JS/JSattribute.cpp:
(WebCore::JSattributeOwner::finalize):
* bindings/scripts/test/JS/JSattribute.h:
(WebCore::wrapperOwner):
(WebCore::wrapperContext):
* bindings/scripts/test/JS/JSreadonly.cpp:
(WebCore::JSreadonlyOwner::finalize):
* bindings/scripts/test/JS/JSreadonly.h:
(WebCore::wrapperOwner):
(WebCore::wrapperContext):
2013-10-02 Commit Queue <commit-queue@webkit.org>
Unreviewed, rolling out r156816.
http://trac.webkit.org/changeset/156816
https://bugs.webkit.org/show_bug.cgi?id=122259
broke 8 tests (Requested by kling on #webkit).
* html/HTMLFrameSetElement.cpp:
(WebCore::HTMLFrameSetElement::willRecalcStyle):
* html/RangeInputType.cpp:
(WebCore::RangeInputType::listAttributeTargetChanged):
* html/shadow/SliderThumbElement.cpp:
(WebCore::RenderSliderContainer::layout):
(WebCore::SliderThumbElement::setPositionFromValue):
(WebCore::SliderThumbElement::setPositionFromPoint):
(WebCore::SliderThumbElement::stopDragging):
* page/FrameView.cpp:
(WebCore::FrameView::setHeaderHeight):
(WebCore::FrameView::setFooterHeight):
(WebCore::FrameView::layout):
(WebCore::FrameView::setViewportConstrainedObjectsNeedLayout):
(WebCore::FrameView::scheduleRelayout):
(WebCore::FrameView::setNeedsLayout):
* page/Page.cpp:
(WebCore::Page::setPageScaleFactor):
* rendering/FlowThreadController.h:
(WebCore::FlowThreadController::setIsRenderNamedFlowThreadOrderDirty):
* rendering/RenderBlock.cpp:
(WebCore::RenderBlock::relayoutShapeDescendantIfMoved):
(WebCore::RenderBlock::markShapeInsideDescendantsForLayout):
(WebCore::RenderBlock::layoutBlock):
(WebCore::RenderBlock::updateBlockChildDirtyBitsBeforeLayout):
(WebCore::RenderBlock::dirtyForLayoutFromPercentageHeightDescendants):
(WebCore::RenderBlock::simplifiedNormalFlowLayout):
(WebCore::RenderBlock::simplifiedLayout):
(WebCore::RenderBlock::markFixedPositionObjectForLayoutIfNeeded):
(WebCore::RenderBlock::layoutPositionedObjects):
(WebCore::RenderBlock::markPositionedObjectsForLayout):
(WebCore::RenderBlock::markForPaginationRelayoutIfNeeded):
(WebCore::RenderBlock::removePositionedObjects):
(WebCore::RenderBlock::insertFloatingObject):
(WebCore::RenderBlock::positionNewFloats):
(WebCore::RenderBlock::markAllDescendantsWithFloatsForLayout):
(WebCore::RenderBlock::getClearDelta):
* rendering/RenderBlockFlow.cpp:
(WebCore::RenderBlockFlow::layoutBlock):
(WebCore::RenderBlockFlow::layoutBlockChild):
(WebCore::RenderBlockFlow::adjustPositionedBlock):
(WebCore::RenderBlockFlow::adjustBlockChildForPagination):
* rendering/RenderBlockLineLayout.cpp:
(WebCore::RenderBlock::layoutRunsAndFloats):
(WebCore::RenderBlockFlow::layoutInlineChildren):
(WebCore::RenderBlock::positionNewFloatOnLine):
* rendering/RenderBox.cpp:
(WebCore::RenderBox::styleWillChange):
(WebCore::RenderBox::styleDidChange):
(WebCore::RenderBox::layout):
(WebCore::RenderBox::positionLineBox):
* rendering/RenderDeprecatedFlexibleBox.cpp:
(WebCore::RenderDeprecatedFlexibleBox::layoutBlock):
(WebCore::gatherFlexChildrenInfo):
(WebCore::RenderDeprecatedFlexibleBox::layoutHorizontalBox):
(WebCore::RenderDeprecatedFlexibleBox::layoutVerticalBox):
(WebCore::RenderDeprecatedFlexibleBox::applyLineClamp):
(WebCore::RenderDeprecatedFlexibleBox::clearLineClamp):
* rendering/RenderElement.cpp:
(WebCore::RenderElement::insertChildInternal):
* rendering/RenderElement.h:
(WebCore::RenderElement::setAncestorLineBoxDirty):
(WebCore::RenderObject::setNeedsLayout):
* rendering/RenderEmbeddedObject.cpp:
(WebCore::RenderEmbeddedObject::layout):
* rendering/RenderFieldset.cpp:
(WebCore::RenderFieldset::layoutSpecialExcludedChild):
* rendering/RenderFlexibleBox.cpp:
(WebCore::RenderFlexibleBox::styleDidChange):
(WebCore::RenderFlexibleBox::layoutBlock):
(WebCore::RenderFlexibleBox::preferredMainAxisContentExtentForChild):
(WebCore::RenderFlexibleBox::prepareChildForPositionedLayout):
(WebCore::RenderFlexibleBox::layoutAndPlaceChildren):
(WebCore::RenderFlexibleBox::applyStretchAlignmentToChild):
* rendering/RenderFlowThread.cpp:
(WebCore::RenderFlowThread::invalidateRegions):
(WebCore::RenderFlowThread::markAutoLogicalHeightRegionsForLayout):
* rendering/RenderFrameBase.cpp:
(WebCore::RenderFrameBase::layoutWithFlattening):
* rendering/RenderFrameSet.cpp:
(WebCore::RenderFrameSet::layout):
(WebCore::RenderFrameSet::positionFrames):
(WebCore::RenderFrameSet::positionFramesWithFlattening):
(WebCore::RenderFrameSet::continueResizing):
* rendering/RenderGrid.cpp:
(WebCore::RenderGrid::layoutBlock):
(WebCore::RenderGrid::logicalContentHeightForChild):
(WebCore::RenderGrid::layoutGridItems):
* rendering/RenderHTMLCanvas.cpp:
(WebCore::RenderHTMLCanvas::canvasSizeChanged):
* rendering/RenderIFrame.cpp:
(WebCore::RenderIFrame::layout):
* rendering/RenderImage.cpp:
(WebCore::RenderImage::imageDimensionsChanged):
* rendering/RenderInline.cpp:
(WebCore::RenderInline::styleDidChange):
* rendering/RenderLayer.cpp:
(WebCore::RenderLayer::updateScrollbarsAfterLayout):
* rendering/RenderLayerModelObject.cpp:
(WebCore::RenderLayerModelObject::styleDidChange):
* rendering/RenderListMarker.cpp:
(WebCore::RenderListMarker::layout):
* rendering/RenderMarquee.cpp:
(WebCore::RenderMarquee::updateMarqueeStyle):
* rendering/RenderMedia.cpp:
(WebCore::RenderMedia::layout):
* rendering/RenderMultiColumnBlock.cpp:
(WebCore::RenderMultiColumnBlock::relayoutForPagination):
(WebCore::RenderMultiColumnBlock::layoutSpecialExcludedChild):
* rendering/RenderObject.cpp:
(WebCore::RenderObject::markContainingBlocksForLayout):
(WebCore::RenderObject::layout):
* rendering/RenderObject.h:
(WebCore::RenderObject::setNeedsLayoutAndPrefWidthsRecalc):
(WebCore::RenderObject::setNeedsPositionedMovementLayout):
(WebCore::RenderObject::setNormalChildNeedsLayout):
(WebCore::RenderObject::setPosChildNeedsLayout):
(WebCore::RenderObject::setNeedsSimplifiedNormalFlowLayout):
(WebCore::RenderObject::setChildNeedsLayout):
* rendering/RenderReplaced.cpp:
(WebCore::RenderReplaced::layout):
* rendering/RenderReplica.cpp:
(WebCore::RenderReplica::layout):
* rendering/RenderRubyRun.cpp:
(WebCore::RenderRubyRun::layoutSpecialExcludedChild):
* rendering/RenderScrollbar.cpp:
(WebCore::RenderScrollbar::updateScrollbarParts):
* rendering/RenderScrollbarPart.cpp:
(WebCore::RenderScrollbarPart::layout):
* rendering/RenderTable.cpp:
(WebCore::RenderTable::layout):
* rendering/RenderTable.h:
(WebCore::RenderTable::setNeedsSectionRecalc):
* rendering/RenderTableCell.cpp:
(WebCore::RenderTableCell::computeIntrinsicPadding):
(WebCore::RenderTableCell::setCellLogicalWidth):
(WebCore::RenderTableCell::layout):
* rendering/RenderTableRow.cpp:
(WebCore::RenderTableRow::styleDidChange):
(WebCore::RenderTableRow::layout):
* rendering/RenderTableSection.cpp:
(WebCore::RenderTableSection::calcRowLogicalHeight):
(WebCore::RenderTableSection::layout):
(WebCore::RenderTableSection::layoutRows):
(WebCore::RenderTableSection::recalcCells):
* rendering/RenderTextControl.cpp:
(WebCore::RenderTextControl::layoutSpecialExcludedChild):
* rendering/RenderTextControlSingleLine.cpp:
(WebCore::setNeedsLayoutOnAncestors):
(WebCore::RenderTextControlSingleLine::layout):
(WebCore::RenderTextControlSingleLine::styleDidChange):
* rendering/RenderVideo.cpp:
(WebCore::RenderVideo::updateIntrinsicSize):
* rendering/RenderView.cpp:
(WebCore::RenderView::layout):
* rendering/RenderWidget.cpp:
(WebCore::RenderWidget::layout):
* rendering/mathml/RenderMathMLBlock.cpp:
(WebCore::RenderMathMLBlock::computeChildrenPreferredLogicalHeights):
* rendering/mathml/RenderMathMLScripts.cpp:
(WebCore::RenderMathMLScripts::layout):
* rendering/svg/RenderSVGContainer.cpp:
(WebCore::RenderSVGContainer::layout):
* rendering/svg/RenderSVGGradientStop.cpp:
(WebCore::RenderSVGGradientStop::layout):
* rendering/svg/RenderSVGHiddenContainer.cpp:
(WebCore::RenderSVGHiddenContainer::layout):
* rendering/svg/RenderSVGImage.cpp:
(WebCore::RenderSVGImage::layout):
* rendering/svg/RenderSVGResource.cpp:
(WebCore::RenderSVGResource::markForLayoutAndParentResourceInvalidation):
* rendering/svg/RenderSVGResourceContainer.cpp:
(WebCore::RenderSVGResourceContainer::registerResource):
* rendering/svg/RenderSVGRoot.cpp:
(WebCore::RenderSVGRoot::layout):
* rendering/svg/RenderSVGShape.cpp:
(WebCore::RenderSVGShape::layout):
* rendering/svg/RenderSVGText.cpp:
(WebCore::RenderSVGText::layout):
* rendering/svg/SVGRenderSupport.cpp:
(WebCore::SVGRenderSupport::layoutChildren):
* svg/SVGClipPathElement.cpp:
(WebCore::SVGClipPathElement::svgAttributeChanged):
(WebCore::SVGClipPathElement::childrenChanged):
* svg/SVGFilterElement.cpp:
(WebCore::SVGFilterElement::setFilterRes):
(WebCore::SVGFilterElement::svgAttributeChanged):
(WebCore::SVGFilterElement::childrenChanged):
* svg/SVGGradientElement.cpp:
(WebCore::SVGGradientElement::svgAttributeChanged):
(WebCore::SVGGradientElement::childrenChanged):
* svg/SVGLinearGradientElement.cpp:
(WebCore::SVGLinearGradientElement::svgAttributeChanged):
* svg/SVGMarkerElement.cpp:
(WebCore::SVGMarkerElement::svgAttributeChanged):
(WebCore::SVGMarkerElement::childrenChanged):
* svg/SVGMaskElement.cpp:
(WebCore::SVGMaskElement::svgAttributeChanged):
(WebCore::SVGMaskElement::childrenChanged):
* svg/SVGPatternElement.cpp:
(WebCore::SVGPatternElement::svgAttributeChanged):
(WebCore::SVGPatternElement::childrenChanged):
* svg/SVGRadialGradientElement.cpp:
(WebCore::SVGRadialGradientElement::svgAttributeChanged):
* svg/SVGSVGElement.cpp:
(WebCore::SVGSVGElement::updateCurrentTranslate):
2013-10-02 Andreas Kling <akling@apple.com>
Keep SVGElementRareData in an SVGElement member instead of a hashmap.
<https://webkit.org/b/122253>
Reviewed by Antti Koivisto.
Free up another Node flag by moving SVGElement's SVG-specific rare data
to a member variable instead of tracking them in a hashmap on the side.
This grows SVGElement by one pointer, but I will make up for this in
subsequent patches.
2013-10-02 Antti Koivisto <antti@apple.com>
Move setting of some layout bits to RenderElement
https://bugs.webkit.org/show_bug.cgi?id=122256
Reviewed by Andreas Kling.
These bits never apply to RenderText nodes:
normalChildNeedsLayout
posChildNeedsLayout
needsSimplifiedNormalFlowLayout
normalChildNeedsLayout
positionedMovementLayout
The code for setting them can be moved to RenderElement.
Also separated the code paths for setting and clearing the bits and uninlined
everything that is not massively popular.
2013-10-02 Andreas Kling <akling@apple.com>
CTTE: Drag events are only dispatched on Elements.
<https://webkit.org/b/122250>
Reviewed by Antti Koivisto.
We never dispatch drag events on non-Element nodes so tighten up the
code to operate on Elements instead.
2013-10-02 Hans Muller <hmuller@adobe.com>
[CSS Shapes] Implement the shape-image-threshold property
https://bugs.webkit.org/show_bug.cgi?id=122216
Reviewed by Andreas Kling.
Added support for the CSS shape-image-threshold property. This change
just enables parsing the property, it's not connected to the
Shapes code yet.
The number valued shape-image-threshold property is defined here:
http://dev.w3.org/csswg/css-shapes-1/#shape-image-threshold-property
Its computed value is clamped to the range [0, 1].
Test: fast/shapes/parsing/parsing-shape-image-threshold.html
* css/CSSComputedStyleDeclaration.cpp:
(WebCore::ComputedStyleExtractor::propertyValue):
* css/CSSParser.cpp:
(WebCore::CSSParser::parseValue):
* css/CSSPropertyNames.in:
* css/DeprecatedStyleBuilder.cpp:
(WebCore::DeprecatedStyleBuilder::DeprecatedStyleBuilder):
* css/StyleResolver.cpp:
(WebCore::StyleResolver::applyProperty):
* rendering/style/RenderStyle.h:
* rendering/style/StyleRareNonInheritedData.cpp:
(WebCore::StyleRareNonInheritedData::StyleRareNonInheritedData):
(WebCore::StyleRareNonInheritedData::operator==):
* rendering/style/StyleRareNonInheritedData.h:
2013-10-02 Andreas Kling <akling@apple.com>
Remove Qt-specific code in WebCore/plugins.
<https://webkit.org/b/122247>
Reviewed by Anders Carlsson.
Purge PLATFORM(QT) blocks and Qt-specific files.
2013-10-02 Eric Carlson <eric.carlson@apple.com>
IDL parser should remove a leading "_" from identifier names
https://bugs.webkit.org/show_bug.cgi?id=122239
Reviewed by Jer Noble.
No new tests, updated bindings tests and results.
* bindings/scripts/IDLParser.pm:
(identifierRemoveNullablePrefix): Remove leading "_".
(parseInterface): Call identifierRemoveNullablePrefix.
(parseException): Ditto.
(parseEnum): Ditto.
(parseConst): Ditto.
(parseAttributeRest): Ditto.
(parseOperationRest): Ditto.
(parseOptionalOrRequiredArgument): Ditto.
(parseExceptionField): Ditto.
(parseNonAnyType): Ditto.
Update tests and results.
* bindings/scripts/test/CPP/WebDOMTestObj.cpp:
* bindings/scripts/test/CPP/WebDOMTestObj.h:
* bindings/scripts/test/CPP/WebDOMattribute.cpp: Added.
* bindings/scripts/test/CPP/WebDOMattribute.h: Added.
* bindings/scripts/test/CPP/WebDOMreadonly.cpp: Added.
* bindings/scripts/test/CPP/WebDOMreadonly.h: Added.
* bindings/scripts/test/GObject/WebKitDOMTestObj.cpp:
* bindings/scripts/test/GObject/WebKitDOMTestObj.h:
* bindings/scripts/test/GObject/WebKitDOMTestObj.symbols:
* bindings/scripts/test/GObject/WebKitDOMattribute.cpp: Added.
* bindings/scripts/test/GObject/WebKitDOMattribute.h: Added.
* bindings/scripts/test/GObject/WebKitDOMattribute.symbols: Added.
* bindings/scripts/test/GObject/WebKitDOMattributePrivate.h: Added.
* bindings/scripts/test/GObject/WebKitDOMreadonly.cpp: Added.
* bindings/scripts/test/GObject/WebKitDOMreadonly.h: Added.
* bindings/scripts/test/GObject/WebKitDOMreadonly.symbols: Added.
* bindings/scripts/test/GObject/WebKitDOMreadonlyPrivate.h: Added.
* bindings/scripts/test/JS/JSTestObj.cpp:
* bindings/scripts/test/JS/JSTestObj.h:
* bindings/scripts/test/JS/JSattribute.cpp: Added.
* bindings/scripts/test/JS/JSattribute.h: Added.
* bindings/scripts/test/JS/JSreadonly.cpp: Added.
* bindings/scripts/test/JS/JSreadonly.h: Added.
* bindings/scripts/test/ObjC/DOMTestObj.h:
* bindings/scripts/test/ObjC/DOMTestObj.mm:
* bindings/scripts/test/ObjC/DOMattribute.h: Added.
* bindings/scripts/test/ObjC/DOMattribute.mm: Added.
* bindings/scripts/test/ObjC/DOMattributeInternal.h: Added.
* bindings/scripts/test/ObjC/DOMreadonly.h: Added.
* bindings/scripts/test/ObjC/DOMreadonly.mm: Added.
* bindings/scripts/test/ObjC/DOMreadonlyInternal.h: Added.
* bindings/scripts/test/TestException.idl:
* bindings/scripts/test/TestInterface.idl:
* bindings/scripts/test/TestObj.idl:
2013-10-02 Andreas Kling <akling@apple.com>
Remove Qt-specific code in WebCore/{bindings,bridge,loader,icon,testing}.
<https://webkit.org/b/122242>
Reviewed by Anders Carlsson.
Purge PLATFORM(QT) blocks and Qt-specific files.
2013-10-02 Andreas Kling <akling@apple.com>
Remove Qt-specific code in WebCore/{page,accessibility}.
<https://webkit.org/b/122222>
Reviewed by Anders Carlsson.
Purge PLATFORM(QT) blocks and FooBarQt.* files.
2013-10-02 Zoltan Horvath <zoltan@webkit.org>
[CSS Shapes] Move ShapeInsideInfo::updateSegmentsForLine implementations into the cpp
https://bugs.webkit.org/show_bug.cgi?id=122236
Reviewed by Oliver Hunt.
There is no reason for updateSegmentsForLine methods to be inline. I moved them to the cpp.
No new tests, no behavior change.
* rendering/shapes/ShapeInsideInfo.cpp:
(WebCore::ShapeInsideInfo::updateSegmentsForLine):
* rendering/shapes/ShapeInsideInfo.h:
2013-10-02 Andreas Kling <akling@apple.com>
Remove Qt from WebCore/platform.
<https://webkit.org/b/122228>
Reviewed by Anders Carlsson.
Purge PLATFORM(QT) blocks and FooBarQt.* files.
2013-10-02 Tim Horton <timothy_horton@apple.com>
[mac] Stop using DrawingAreaImpl on PLATFORM(MAC)
https://bugs.webkit.org/show_bug.cgi?id=121859
<rdar://problem/15069359>
Reviewed by Anders Carlsson.
Test: platform/mac-wk2/tiled-drawing/window-server-snapshots-work.html
* page/FrameView.cpp:
(WebCore::FrameView::addTrackedRepaintRect):
(WebCore::FrameView::repaintContentRectangle):
* page/FrameView.h:
Factor out the coordinate conversion and appending of new repaint rects on FrameView.
* platform/graphics/GraphicsLayer.cpp:
(WebCore::GraphicsLayer::dumpProperties):
* rendering/RenderLayerBacking.cpp:
(WebCore::RenderLayerBacking::shouldDumpPropertyForLayer):
Don't dump repaint rects on the root tile cache, they'll be included at the top,
where FrameView's repaints are normally included.
* rendering/RenderLayerBacking.cpp:
(WebCore::RenderLayerBacking::setContentsNeedDisplay):
(WebCore::RenderLayerBacking::setContentsNeedDisplayInRect):
Push the root tile cache's tracked repaint rects to FrameView instead.
2013-10-02 Benjamin Poulain <benjamin@webkit.org>
Clean up more <style scoped> from style resolution
https://bugs.webkit.org/show_bug.cgi?id=122188
Reviewed by Darin Adler.
* css/ElementRuleCollector.cpp:
(WebCore::MatchRequest::MatchRequest):
(WebCore::ElementRuleCollector::collectMatchingRules):
(WebCore::ElementRuleCollector::collectMatchingRulesForRegion):
(WebCore::ElementRuleCollector::matchAuthorRules):
(WebCore::ElementRuleCollector::ruleMatches):
(WebCore::ElementRuleCollector::doCollectMatchingRulesForList):
* css/ElementRuleCollector.h:
* css/SelectorChecker.cpp:
(WebCore::SelectorChecker::matchRecursively):
* css/SelectorChecker.h:
(WebCore::SelectorChecker::SelectorCheckingContext::SelectorCheckingContext):
* dom/SelectorQuery.cpp:
(WebCore::SelectorDataList::selectorMatches):
2013-10-02 Anders Carlsson <andersca@apple.com>
Update bindings test results.
* bindings/scripts/test/JS/JSTestActiveDOMObject.cpp:
(WebCore::JSTestActiveDOMObjectOwner::finalize):
* bindings/scripts/test/JS/JSTestActiveDOMObject.h:
(WebCore::wrapperOwner):
(WebCore::wrapperContext):
* bindings/scripts/test/JS/JSTestCustomNamedGetter.cpp:
(WebCore::JSTestCustomNamedGetterOwner::finalize):
* bindings/scripts/test/JS/JSTestCustomNamedGetter.h:
(WebCore::wrapperOwner):
(WebCore::wrapperContext):
* bindings/scripts/test/JS/JSTestEventConstructor.cpp:
(WebCore::JSTestEventConstructorOwner::finalize):
* bindings/scripts/test/JS/JSTestEventConstructor.h:
(WebCore::wrapperOwner):
(WebCore::wrapperContext):
* bindings/scripts/test/JS/JSTestEventTarget.cpp:
(WebCore::JSTestEventTargetOwner::finalize):
* bindings/scripts/test/JS/JSTestEventTarget.h:
(WebCore::wrapperOwner):
(WebCore::wrapperContext):
* bindings/scripts/test/JS/JSTestException.cpp:
(WebCore::JSTestExceptionOwner::finalize):
* bindings/scripts/test/JS/JSTestException.h:
(WebCore::wrapperOwner):
(WebCore::wrapperContext):
* bindings/scripts/test/JS/JSTestInterface.cpp:
(WebCore::JSTestInterfaceOwner::finalize):
* bindings/scripts/test/JS/JSTestInterface.h:
(WebCore::wrapperOwner):
(WebCore::wrapperContext):
* bindings/scripts/test/JS/JSTestMediaQueryListListener.cpp:
(WebCore::JSTestMediaQueryListListenerOwner::finalize):
* bindings/scripts/test/JS/JSTestMediaQueryListListener.h:
(WebCore::wrapperOwner):
(WebCore::wrapperContext):
* bindings/scripts/test/JS/JSTestNamedConstructor.cpp:
(WebCore::JSTestNamedConstructorOwner::finalize):
* bindings/scripts/test/JS/JSTestNamedConstructor.h:
(WebCore::wrapperOwner):
(WebCore::wrapperContext):
* bindings/scripts/test/JS/JSTestObj.cpp:
(WebCore::JSTestObjOwner::finalize):
* bindings/scripts/test/JS/JSTestObj.h:
(WebCore::wrapperOwner):
(WebCore::wrapperContext):
* bindings/scripts/test/JS/JSTestOverloadedConstructors.cpp:
(WebCore::JSTestOverloadedConstructorsOwner::finalize):
* bindings/scripts/test/JS/JSTestOverloadedConstructors.h:
(WebCore::wrapperOwner):
(WebCore::wrapperContext):
* bindings/scripts/test/JS/JSTestSerializedScriptValueInterface.cpp:
(WebCore::JSTestSerializedScriptValueInterfaceOwner::finalize):
* bindings/scripts/test/JS/JSTestSerializedScriptValueInterface.h:
(WebCore::wrapperOwner):
(WebCore::wrapperContext):
* bindings/scripts/test/JS/JSTestTypedefs.cpp:
(WebCore::JSTestTypedefsOwner::finalize):
* bindings/scripts/test/JS/JSTestTypedefs.h:
(WebCore::wrapperOwner):
(WebCore::wrapperContext):
2013-10-02 Andreas Kling <akling@apple.com>
Remove Qt-specific code in WebCore/{rendering,editing,history}.
<https://webkit.org/b/122220>
Reviewed by Anders Carlsson.
Purge PLATFORM(QT) blocks and FooBarQt.* files.
2013-10-02 Andreas Kling <akling@apple.com>
Remove Qt-specific code in common WebCore/{html,dom} files.
<https://webkit.org/b/122219>
Reviewed by Anders Carlsson.
Purge PLATFORM(QT) blocks.
2013-10-01 Sam Weinig <sam@webkit.org>
CTTE: DOMWrapperWorlds should be passed around by reference
https://bugs.webkit.org/show_bug.cgi?id=122206
Reviewed by Andreas Kling.
* bindings/js/DOMWrapperWorld.cpp:
(WebCore::DOMWrapperWorld::DOMWrapperWorld):
(WebCore::DOMWrapperWorld::~DOMWrapperWorld):
(WebCore::DOMWrapperWorld::clearWrappers):
(WebCore::normalWorld):
(WebCore::mainThreadNormalWorld):
* bindings/js/DOMWrapperWorld.h:
(WebCore::debuggerWorld):
(WebCore::pluginWorld):
(WebCore::currentWorld):
* bindings/js/JSCSSStyleDeclarationCustom.cpp:
(WebCore::JSCSSStyleDeclaration::getPropertyCSSValue):
* bindings/js/JSCSSValueCustom.cpp:
(WebCore::JSCSSValueOwner::finalize):
* bindings/js/JSDOMBinding.h:
(WebCore::wrapperOwner):
(WebCore::wrapperContext):
(WebCore::getInlineCachedWrapper):
(WebCore::setInlineCachedWrapper):
(WebCore::clearInlineCachedWrapper):
(WebCore::getCachedWrapper):
(WebCore::cacheWrapper):
(WebCore::uncacheWrapper):
(WebCore::jsStringWithCache):
* bindings/js/JSDOMGlobalObject.cpp:
(WebCore::JSDOMGlobalObject::JSDOMGlobalObject):
(WebCore::toJSDOMGlobalObject):
* bindings/js/JSDOMGlobalObject.h:
(WebCore::JSDOMGlobalObject::world):
* bindings/js/JSDOMWindowBase.cpp:
(WebCore::JSDOMWindowBase::JSDOMWindowBase):
(WebCore::toJSDOMWindow):
* bindings/js/JSDOMWindowBase.h:
* bindings/js/JSDOMWindowShell.cpp:
(WebCore::JSDOMWindowShell::JSDOMWindowShell):
(WebCore::JSDOMWindowShell::setWindow):
(WebCore::toJSDOMWindowShell):
* bindings/js/JSDOMWindowShell.h:
(WebCore::JSDOMWindowShell::create):
(WebCore::JSDOMWindowShell::world):
* bindings/js/JSErrorHandler.cpp:
(WebCore::JSErrorHandler::JSErrorHandler):
* bindings/js/JSErrorHandler.h:
(WebCore::JSErrorHandler::create):
* bindings/js/JSEventListener.cpp:
(WebCore::JSEventListener::JSEventListener):
(WebCore::JSEventListener::handleEvent):
* bindings/js/JSEventListener.h:
(WebCore::JSEventListener::create):
(WebCore::JSEventListener::isolatedWorld):
* bindings/js/JSInjectedScriptHostCustom.cpp:
(WebCore::getJSListenerFunctions):
* bindings/js/JSLazyEventListener.cpp:
(WebCore::JSLazyEventListener::JSLazyEventListener):
* bindings/js/JSLazyEventListener.h:
* bindings/js/JSMutationCallback.cpp:
(WebCore::JSMutationCallback::JSMutationCallback):
(WebCore::JSMutationCallback::call):
* bindings/js/JSNodeCustom.cpp:
(WebCore::JSNodeOwner::finalize):
* bindings/js/JSPluginElementFunctions.h:
(WebCore::pluginElementCustomGetOwnPropertySlot):
* bindings/js/JSWorkerGlobalScopeBase.cpp:
(WebCore::JSWorkerGlobalScopeBase::JSWorkerGlobalScopeBase):
* bindings/js/ScheduledAction.cpp:
(WebCore::ScheduledAction::create):
(WebCore::ScheduledAction::ScheduledAction):
(WebCore::ScheduledAction::execute):
* bindings/js/ScheduledAction.h:
(WebCore::ScheduledAction::ScheduledAction):
* bindings/js/ScriptCachedFrameData.cpp:
(WebCore::ScriptCachedFrameData::restore):
* bindings/js/ScriptCachedFrameData.h:
* bindings/js/ScriptController.cpp:
(WebCore::ScriptController::~ScriptController):
(WebCore::ScriptController::destroyWindowShell):
(WebCore::ScriptController::createWindowShell):
(WebCore::ScriptController::evaluateInWorld):
(WebCore::ScriptController::getAllWorlds):
(WebCore::ScriptController::initScript):
(WebCore::ScriptController::executeScriptInWorld):
(WebCore::ScriptController::shouldBypassMainWorldContentSecurityPolicy):
* bindings/js/ScriptController.h:
(WebCore::ScriptController::windowShell):
(WebCore::ScriptController::existingWindowShell):
(WebCore::ScriptController::globalObject):
* bindings/js/ScriptDebugServer.cpp:
(WebCore::ScriptDebugServer::isContentScript):
* bindings/js/ScriptState.cpp:
(WebCore::execStateFromNode):
(WebCore::execStateFromPage):
* bindings/js/ScriptState.h:
* bindings/js/SerializedScriptValue.cpp:
(WebCore::SerializedScriptValue::transferArrayBuffers):
* bindings/js/WebCoreJSClientData.h:
(WebCore::WebCoreJSClientData::WebCoreJSClientData):
(WebCore::WebCoreJSClientData::normalWorld):
(WebCore::WebCoreJSClientData::getAllWorlds):
(WebCore::WebCoreJSClientData::rememberWorld):
(WebCore::WebCoreJSClientData::forgetWorld):
* bindings/js/WebCoreTypedArrayController.cpp:
(WebCore::WebCoreTypedArrayController::JSArrayBufferOwner::finalize):
* bindings/scripts/CodeGeneratorJS.pm:
(GenerateHeader):
(GenerateImplementation):
* dom/Document.cpp:
(WebCore::Document::ensurePlugInsInjectedScript):
* dom/Document.h:
* dom/DocumentStyleSheetCollection.cpp:
* html/HTMLMediaElement.cpp:
(WebCore::HTMLMediaElement::ensureIsolatedWorld):
(WebCore::HTMLMediaElement::ensureMediaControlsInjectedScript):
(WebCore::HTMLMediaElement::didAddUserAgentShadowRoot):
* html/HTMLMediaElement.h:
* html/HTMLPlugInImageElement.cpp:
(WebCore::plugInImageElementIsolatedWorld):
(WebCore::HTMLPlugInImageElement::didAddUserAgentShadowRoot):
* inspector/InspectorAgent.cpp:
(WebCore::InspectorAgent::didClearWindowObjectInWorld):
* inspector/InspectorAgent.h:
* inspector/InspectorController.cpp:
(WebCore::InspectorController::didClearWindowObjectInWorld):
* inspector/InspectorController.h:
* inspector/InspectorDOMAgent.cpp:
(WebCore::InspectorDOMAgent::buildObjectForEventListener):
* inspector/InspectorInstrumentation.cpp:
(WebCore::InspectorInstrumentation::didClearWindowObjectInWorldImpl):
* inspector/InspectorInstrumentation.h:
(WebCore::InspectorInstrumentation::didClearWindowObjectInWorld):
* inspector/InspectorPageAgent.cpp:
(WebCore::InspectorPageAgent::didClearWindowObjectInWorld):
* inspector/InspectorPageAgent.h:
* loader/EmptyClients.h:
(WebCore::EmptyFrameLoaderClient::dispatchDidClearWindowObjectInWorld):
* loader/FrameLoader.cpp:
(WebCore::FrameLoader::dispatchDidClearWindowObjectsInAllWorlds):
(WebCore::FrameLoader::dispatchDidClearWindowObjectInWorld):
(WebCore::FrameLoader::dispatchGlobalObjectAvailableInAllWorlds):
* loader/FrameLoader.h:
* loader/FrameLoaderClient.h:
(WebCore::FrameLoaderClient::dispatchGlobalObjectAvailable):
* page/CaptionUserPreferencesMediaAF.cpp:
* page/DOMWindowExtension.cpp:
(WebCore::DOMWindowExtension::DOMWindowExtension):
* page/DOMWindowExtension.h:
(WebCore::DOMWindowExtension::create):
(WebCore::DOMWindowExtension::world):
* page/Frame.cpp:
(WebCore::Frame::injectUserScripts):
(WebCore::Frame::injectUserScriptsForWorld):
* page/Frame.h:
* page/PageGroup.cpp:
(WebCore::PageGroup::addUserScriptToWorld):
(WebCore::PageGroup::addUserStyleSheetToWorld):
(WebCore::PageGroup::removeUserScriptFromWorld):
(WebCore::PageGroup::removeUserStyleSheetFromWorld):
(WebCore::PageGroup::removeUserScriptsFromWorld):
(WebCore::PageGroup::removeUserStyleSheetsFromWorld):
* page/PageGroup.h:
2013-10-02 Zan Dobersek <zdobersek@igalia.com>
Unreviewed, removing references to the recently removed Modules/filesystem directory.
* GNUmakefile.am:
2013-10-02 Mihai Maerean <mmaerean@adobe.com>
[CSS Regions] Activate all regions to have layers, as CSS Regions create a new stacking context
https://bugs.webkit.org/show_bug.cgi?id=121828
Reviewed by Darin Adler.
The CSS Regions specification says "CSS Regions create a new stacking context." (http://dev.w3.org/csswg/css-regions/).
Divs that create stacking contexts are painted after the divs that don't create stacking contexts.
Test: fast/regions/layers/stacking-context-paint-order.html: While the existing region-sibling-paint-order.html
test verifies that regions paint correctly when the next sibling also creates a stacking context, this new test
verifies that regions paint correctly when the next sibling doesn't create a stacking context.
* rendering/RenderBlock.cpp: Remove code that is not needed now that all regions have layers.
* rendering/RenderBlock.h: Remove code that is not needed now that all regions have layers.
* rendering/RenderBox.cpp: Remove code that is not needed now that all regions have layers.
* rendering/RenderBox.h: Remove code that is not needed now that all regions have layers.
* rendering/RenderFlowThread.cpp:
(WebCore::RenderFlowThread::updateLayerToRegionMappings): Remove code that is not needed now that all regions have layers.
* rendering/RenderRegion.cpp:
(WebCore::RenderRegion::RenderRegion):
* rendering/RenderRegion.h:
(WebCore::RenderRegion::requiresLayer): Always. CSS Regions create Stacking Contexts. RenderMultiColumnSet
implements its own behaviour so the behaviour of each class is contained within its own files.
* rendering/RenderMultiColumnSet.h:
(WebCore::RenderMultiColumnSet::requiresLayer): RenderMultiColumnSet derives from RenderRegion, but unlike the
CSS Regions specification, the Multi-Columns CSS specification states that the column boxes do not establish new
Stacking Contexts.
* rendering/RenderTreeAsText.cpp:
(WebCore::writeRenderRegionList): There's no need to output " hasLayer" since all regions now have layers.
2013-10-02 Renata Hodovan <reni@webkit.org>
HTML listbox is not resized horizontally when zooming
https://bugs.webkit.org/show_bug.cgi?id=20445
Reviewed by Darin Adler.
If any style changes happens on a HTMLSelectElement, we need to set the m_optionsChanged property
of its renderer (RenderListBox) otherwise its size won't follow the changed content.
Test: fast/transforms/listbox-zoom.html
* html/HTMLSelectElement.cpp:
(WebCore::HTMLSelectElement::didRecalcStyle):
* html/HTMLSelectElement.h:
2013-10-01 Santosh Mahto <santosh.ma@samsung.com>
contenteditable justify commands applied to next paragraph as well
https://bugs.webkit.org/show_bug.cgi?id=90611
Reviewed by Ryosuke Niwa.
When the selection extends from first paragraph to start of next
paragraph then Justify command is applied to both the paragraph,
Instead it should be applied only to first paragraph.
Co-author: Sudarshan C P <sudarshan.cp@samsung.com>
Test: editing/execCommand/contenteditable-justify-next-paragraph.html
* editing/ApplyStyleCommand.cpp:
(WebCore::ApplyStyleCommand::applyBlockStyle):
Adjusted visibleEnd to previous position.
2013-10-01 Andreas Kling <akling@apple.com>
Move mouse event dispatch from Node to Element.
<https://webkit.org/b/122203>
Reviewed by Anders Carlsson.
We never dispatch mouse events on text or other non-element nodes,
so move the related logic to using Element.
Node::dispatchMouseEvent() moves to Element. I also changed the
relatedTarget argument to be an Element* since the related target
is never a Node either.
Most of this patch is *Node -> *Element renames in EventHandler.
2013-10-01 Gyuyoung Kim <gyuyoung.kim@samsung.com>
Generate toCSSFooValue for CSS child values
https://bugs.webkit.org/show_bug.cgi?id=122157
Reviewed by Darin Adler.
As a step to cleanup static_cast<> for CSSFooValue, this patch adds toCSSFooValue()
for "CSSAspectRatioValue, CSSBorderImageSliceValue, CSSFunctionValue, CSSInheritedValue,
CSSValueList, CSSVariableValue, and CSSFontFaceSrcValue".
To use CSS_VALUE_TYPE_CASTS, isFunctionValue(), isFontFaceSrcValue() are added to
generate toCSSFunctionValue, toCSSFontFaceSrcValue().
No new tests, no behavior changes.
* css/CSSAspectRatioValue.h:
* css/CSSBorderImageSliceValue.h:
* css/CSSFontFaceSrcValue.h:
* css/CSSFontSelector.cpp:
(WebCore::CSSFontSelector::addFontFaceRule):
* css/CSSFunctionValue.h:
* css/CSSInheritedValue.h:
* css/CSSParser.cpp:
(WebCore::filterProperties):
(WebCore::CSSParser::addFillValue):
(WebCore::CSSParser::addAnimationValue):
(WebCore::CSSParser::createFontFaceRule):
* css/CSSProperty.cpp:
(WebCore::CSSProperty::wrapValueInCommaSeparatedList):
* css/CSSToStyleMap.cpp:
(WebCore::CSSToStyleMap::mapNinePieceImage):
(WebCore::CSSToStyleMap::mapNinePieceImageSlice):
* css/CSSValue.cpp:
(WebCore::CSSValue::destroy):
* css/CSSValue.h:
(WebCore::CSSValue::isFunctionValue):
(WebCore::CSSValue::isFontFaceSrcValue):
* css/CSSValueList.h:
(WebCore::CSSValueListInspector::CSSValueListInspector):
* css/CSSVariableValue.h:
* css/DeprecatedStyleBuilder.cpp:
(WebCore::ApplyPropertyFillLayer::applyValue):
(WebCore::ApplyPropertyFontVariantLigatures::applyValue):
(WebCore::ApplyPropertyCounter::applyValue):
(WebCore::ApplyPropertyCursor::applyValue):
(WebCore::ApplyPropertyTextEmphasisStyle::applyValue):
(WebCore::ApplyPropertyAspectRatio::applyValue):
(WebCore::ApplyPropertyImageResolution::applyValue):
(WebCore::ApplyPropertyTextIndent::applyValue):
* css/MediaQueryEvaluator.cpp:
(WebCore::compareAspectRatioValue):
* css/SVGCSSStyleSelector.cpp:
(WebCore::StyleResolver::applySVGProperty):
* css/StylePropertySet.cpp:
(WebCore::StylePropertySet::getLayeredShorthandValue):
* css/StyleResolver.cpp:
(WebCore::createGridPosition):
(WebCore::StyleResolver::applyProperty):
(WebCore::StyleResolver::parseCustomFilterParameter):
(WebCore::StyleResolver::createCustomFilterOperationWithInlineSyntax):
* editing/EditingStyle.cpp:
(WebCore::HTMLTextDecorationEquivalent::valueIsPresentInStyle):
(WebCore::EditingStyle::mergeStyle):
(WebCore::StyleChange::extractTextStyles):
(WebCore::diffTextDecorations):
* editing/EditorCommand.cpp:
(WebCore::executeToggleStyleInList):
* svg/SVGFontFaceElement.cpp:
(WebCore::SVGFontFaceElement::rebuildFontFace):
2013-10-01 Sam Weinig <sam@webkit.org>
Convert PageGroup to using std::unique_ptr
https://bugs.webkit.org/show_bug.cgi?id=122184
Reviewed by Anders Carlsson.
* page/CaptionUserPreferences.cpp:
* page/CaptionUserPreferences.h:
* page/CaptionUserPreferencesMediaAF.cpp:
* page/CaptionUserPreferencesMediaAF.h:
* page/Frame.cpp:
* page/GroupSettings.h:
* page/Page.cpp:
* page/PageGroup.cpp:
* page/PageGroup.h:
* page/UserScriptTypes.h:
* page/UserStyleSheetTypes.h:
* workers/DedicatedWorkerGlobalScope.h:
* workers/DedicatedWorkerThread.cpp:
* workers/DedicatedWorkerThread.h:
* workers/SharedWorkerGlobalScope.cpp:
* workers/SharedWorkerGlobalScope.h:
* workers/SharedWorkerThread.cpp:
* workers/SharedWorkerThread.h:
* workers/WorkerGlobalScope.cpp:
* workers/WorkerGlobalScope.h:
* workers/WorkerThread.cpp:
* workers/WorkerThread.h:
2013-10-01 Tim Horton <timothy_horton@apple.com>
Tiled drawing GraphicsLayer tree dumps should match non-tiled more closely
https://bugs.webkit.org/show_bug.cgi?id=122172
Reviewed by Anders Carlsson.
No new tests, but will be tested by all of the compositing tests after bug 121859 lands.
* platform/graphics/GraphicsLayer.cpp:
(WebCore::GraphicsLayer::dumpProperties):
Only dump drawsContent and backgroundColor if the client says we should.
Provide the ability to skip over a layer in the dump, making it appear as if that layer's
children are direct decendents of that layer's parent.
* platform/graphics/GraphicsLayerClient.h:
(WebCore::GraphicsLayerClient::shouldSkipLayerInDump): Added.
(WebCore::GraphicsLayerClient::shouldDumpPropertyForLayer): Added.
* rendering/RenderLayerBacking.cpp:
(WebCore::RenderLayerBacking::shouldSkipLayerInDump):
Added. Always skip the root tile cache's flattening layer, as it is
uninteresting and does not exist in the non-tiled-drawing compositing case.
(WebCore::RenderLayerBacking::shouldDumpPropertyForLayer):
Don't dump drawsContent on the root tile cache.
Don't dump backgroundcolor on the root tile cache, unless it is non-white.
This may require some WebKit2-specific rebaselines, but they will occur later.
* rendering/RenderLayerBacking.h:
* rendering/RenderLayerCompositor.cpp:
(WebCore::RenderLayerCompositor::updateBacking):
(WebCore::RenderLayerCompositor::layerTreeAsText):
If the root tile cache has no composited children, don't dump anything,
to match the traditional case where we drop out of compositing when
we have no reason to be compositing. Except, do dump the root tile cache's
layers if we're specifically being asked to dump tile caches.
2013-10-01 Joone Hur <joone.hur@intel.com>
Quirksmode: CSS1: WebKit fails dynamic :first-letter test
https://bugs.webkit.org/show_bug.cgi?id=15602
Reviewed by David Hyatt.
CSS first-letter property does not work properly when the first letter is changed
by DOM scripting.
This patch allows to check if the existing first-letter is no longer the
first-letter. In this case, it deletes the old first-letter object and creates
a new one. For the remaining text, the oldRemainingText object is used
again for containing the full text(first letter + remaining text).
Test: fast/css/first-letter-block-change.html
* rendering/RenderBlock.cpp:
(WebCore::RenderBlock::updateFirstLetter):
2013-10-01 Antti Koivisto <antti@apple.com>
Make tests for renderer base types non-virtual
https://bugs.webkit.org/show_bug.cgi?id=122185
Reviewed by Dave Hyatt.
Make isRenderFoo() functions for commonly tested base types use bit flags instead of virtual calls.
This is faster and we have space in RenderElement.
These bits are not mutully exclusive. For testing leaf types we can add an enum.
2013-10-01 Ryosuke Niwa <rniwa@webkit.org>
Cleanup Document::dispatchFullScreenChangeOrErrorEvent
https://bugs.webkit.org/show_bug.cgi?id=122143
Reviewed by Antti Koivisto.
Reduce the code duplication by extracting dispatchFullScreenChangeOrErrorEvent.
* dom/Document.cpp:
(WebCore::Document::fullScreenChangeDelayTimerFired):
(WebCore::Document::dispatchFullScreenChangeOrErrorEvent): Extracted.
* dom/Document.h:
2013-10-01 Brent Fulgham <bfulgham@apple.com>
[Win] Implement the media controls in JavaScript
https://bugs.webkit.org/show_bug.cgi?id=122166
Reviewed by Jer Noble.
* DerivedSources.make: Uncomment feature flag test.
* WebCore.vcxproj/WebCore.vcxproj: Add new media control implementation files.
Also cleaned up some misplaced files in the project tree.
* WebCore.vcxproj/WebCore.vcxproj.filters: Ditto.
* WebCore.vcxproj/WebCoreCommon.props: Add missing include path for the
mediacontrols path.
* WebCore.vcxproj/copyForwardingHeaders.cmd: Add Modules/mediacontrols to copied headers.
* rendering/RenderThemeWin.cpp: Add missing include for UserAgentScripts.
2013-10-01 Alex Christensen <achristensen@webkit.org>
Added adoptCOM to COMPtr on Windows.
https://bugs.webkit.org/show_bug.cgi?id=122069
Reviewed by Brent Fulgham.
* platform/win/COMPtr.h:
(adoptCOM): Added.
2013-10-01 Jer Noble <jer.noble@apple.com>
Unreviewed build fix; The addedFunction and removedFunction arguments to determineChangedTracksFromNewTracksAndOldItems
were reversed, exposing an underlying, existing bug in AudioTrackPrivate and VideoTrack private. Give a default (null)
value to AudioTrackPrivate::m_client and VideoTrackPrivate::m_client and fix the ordering of arguments in
determineChangedTracksFromNewTracksAndOldItems.
* platform/graphics/AudioTrackPrivate.h:
(WebCore::AudioTrackPrivate::AudioTrackPrivate):
* platform/graphics/VideoTrackPrivate.h:
(WebCore::VideoTrackPrivate::VideoTrackPrivate):
* platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
(WebCore::determineChangedTracksFromNewTracksAndOldItems):
2013-09-30 Jer Noble <jer.noble@apple.com>
[Mac] Add support for VideoTrack to MediaPlayerPrivateAVFObjC
https://bugs.webkit.org/show_bug.cgi?id=122122
Reviewed by Eric Carlson.
Test: media/track/video-track.html
Refactor the methods which query AVAssetTrack and AVPlayerItemTrack into an Impl class, and
use that class to reset the properties of both AudioTrackAVFObjC and the new VideoTrackAVFObjC.
Add new files to project:
* WebCore.xcodeproj/project.pbxproj:
Add the new implementation class, shared by AudioTrackAVFObjC and VideoTrackAVFObjC:
* platform/graphics/avfoundation/AVTrackPrivateAVFObjCImpl.h: Added.
(WebCore::AVTrackPrivateAVFObjCImpl::create): Simple factory.
(WebCore::AVTrackPrivateAVFObjCImpl::playerItemTrack): Simple getter.
* platform/graphics/avfoundation/AVTrackPrivateAVFObjCImpl.mm: Added.
(WebCore::AVTrackPrivateAVFObjCImpl::AVTrackPrivateAVFObjCImpl): Simple constructor.
(WebCore::AVTrackPrivateAVFObjCImpl::enabled): Pass to AVPlayerItemTrack.
(WebCore::AVTrackPrivateAVFObjCImpl::setEnabled): Ditto.
(WebCore::AVTrackPrivateAVFObjCImpl::audioKind): Distinguish between Alternative and Main content.
(WebCore::AVTrackPrivateAVFObjCImpl::videoKind): Distinguish between Alternative, Main, Caption,
and Description content.
(WebCore::AVTrackPrivateAVFObjCImpl::id): Pass to AVAssetTrack.
(WebCore::AVTrackPrivateAVFObjCImpl::label): Retrieve the Title metadata in the user's preferred
language.
(WebCore::AVTrackPrivateAVFObjCImpl::language): Pass to languageForAVAssetTrack.
(WebCore::AVTrackPrivateAVFObjCImpl::languageForAVAssetTrack): Moved from AudioTrackPrivateAVFObjC.
* platform/graphics/avfoundation/VideoTrackPrivateAVF.h: Copied from Source/WebCore/platform/graphics/avfoundation/AudioTrackPrivateAVF.h.
(WebCore::VideoTrackPrivateAVF::kind): Simple getter.
(WebCore::VideoTrackPrivateAVF::id): Ditto.
(WebCore::VideoTrackPrivateAVF::label): Ditto.
(WebCore::VideoTrackPrivateAVF::language): Ditto.
(WebCore::VideoTrackPrivateAVF::setKind): Simple setter.
(WebCore::VideoTrackPrivateAVF::setId): Ditto.
(WebCore::VideoTrackPrivateAVF::setLabel): Ditto.
(WebCore::VideoTrackPrivateAVF::setLanguage): Ditto.
(WebCore::VideoTrackPrivateAVF::VideoTrackPrivateAVF): Simple constructor.
* platform/graphics/avfoundation/objc/AudioTrackPrivateAVFObjC.h:
* platform/graphics/avfoundation/objc/AudioTrackPrivateAVFObjC.mm:
(WebCore::AudioTrackPrivateAVFObjC::AudioTrackPrivateAVFObjC): Create a AVTrackPrivateAVFObjCImpl.
(WebCore::AudioTrackPrivateAVFObjC::resetPropertiesFromTrack): Retrieve properties from m_impl.
(WebCore::AudioTrackPrivateAVFObjC::setPlayerItemTrack): Create a new AVTrackPrivateAVFObjCImpl.
(WebCore::AudioTrackPrivateAVFObjC::playerItemTrack): Pass to m_impl.
(WebCore::AudioTrackPrivateAVFObjC::setEnabled): Ditto.
* platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.h:
* platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
(WebCore::MediaPlayerPrivateAVFoundationObjC::tracksChanged): Refactor implementation into
template method determineChangedTracksFromNewTracksAndOldItems().
(WebCore::determineChangedTracksFromNewTracksAndOldItems): Refactored.
(WebCore::MediaPlayerPrivateAVFoundationObjC::updateAudioTracks): Pass to determineChangedTracksFromNewTracksAndOldItems.
(WebCore::MediaPlayerPrivateAVFoundationObjC::updateVideoTracks): Ditto.
(WebCore::MediaPlayerPrivateAVFoundationObjC::languageOfPrimaryAudioTrack): Changed class hosting
languageForAVAssetTrack.
* platform/graphics/avfoundation/objc/VideoTrackPrivateAVFObjC.cpp: Added.
(WebCore::VideoTrackPrivateAVFObjC::VideoTrackPrivateAVFObjC): Create a AVTrackPrivateAVFObjCImpl.
(WebCore::VideoTrackPrivateAVFObjC::resetPropertiesFromTrack): Retrieve properties from m_impl.
(WebCore::VideoTrackPrivateAVFObjC::setPlayerItemTrack): Create a new AVTrackPrivateAVFObjCImpl.
(WebCore::VideoTrackPrivateAVFObjC::playerItemTrack): Pass to m_impl.
(WebCore::VideoTrackPrivateAVFObjC::setSelected): Ditto.
* platform/graphics/avfoundation/objc/VideoTrackPrivateAVFObjC.h: Added.
(WebCore::VideoTrackPrivateAVFObjC::create): Simple factory.
2013-10-01 Andreas Kling <akling@apple.com>
Leaf EventTarget subclasses should be FINAL.
<https://webkit.org/b/122141>
Reviewed by Darin Adler.
Clear out a slew of FIXMEs now that HasMemoryCostMemberFunction
works on classes marked FINAL (fixed in bug 121747.)
2013-10-01 Szabolcs Dávid <davidsz@inf.u-szeged.hu>
Rename URL type variables in Curl network backend.
https://bugs.webkit.org/show_bug.cgi?id=122158
Reviewed by Darin Adler.
I changed the name of the URL objects to match with the new class name.
* platform/network/curl/ResourceHandleManager.cpp:
(WebCore::getProtectionSpace):
(WebCore::ResourceHandleManager::initializeHandle):
2013-10-01 Myles C. Maxfield <mmaxfield@apple.com>
Center misspelling dots across width of word
https://bugs.webkit.org/show_bug.cgi?id=122046
Reviewed by Darin Adler.
Test: editing/spelling/spelling.html
* platform/graphics/GraphicsContext.h:
* platform/graphics/mac/GraphicsContextMac.mm:
(WebCore::GraphicsContext::drawLineForDocumentMarker):
2013-10-01 Daniel Bates <dabates@apple.com>
[iOS] WebCore fails to build with newer versions of clang
https://bugs.webkit.org/show_bug.cgi?id=122161
Reviewed by Darin Adler.
* editing/FrameSelection.cpp: Add ENABLE(TEXT_CARET)-guard around shouldStopBlinkingDueToTypingCommand().
* page/EventHandler.cpp: Add !PLATFORM(IOS)-guard around constants cursorUpdateInterval and maximumCursorSize;
also add touch event/gesture event guard around shouldGesturesTriggerActive().
* platform/network/cf/ResourceResponseCFNet.cpp: Remove unused function filenameHasSaneExtension.
* platform/network/mac/ResourceResponseMac.mm: Only define static variables commonHeaderFields when building
without CFNetwork; also remove variable numCommonHeaderFields, instead use WTF_ARRAY_LENGTH(commonHeaderFields)
to compute the size of the fixed-sized array commonHeaderFields.
2013-10-01 Brendan Long <b.long@cablelabs.com>
[GStreamer] Support "chapter" text tracks
https://bugs.webkit.org/show_bug.cgi?id=122000
Reviewed by Eric Carlson.
Test: media/track/in-band/track-in-band-mkv-chapters.html
* platform/graphics/gstreamer/InbandMetadataTextTrackPrivateGStreamer.h: New class, needed for cues that aren't associated with GstPads.
* platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:
(WebCore::MediaPlayerPrivateGStreamer::handleMessage): Check for table of contents messages.
(WebCore::MediaPlayerPrivateGStreamer::processTableOfContents): Parse table of contents messages into text tracks.
(WebCore::MediaPlayerPrivateGStreamer::processTableOfContentsEntry): Recursive method for parsing all of the TOC entries.
* platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.h: Add the processTableOfContents functions.
2013-10-01 Allan Sandfeld Jensen <allan.jensen@digia.com>
[Texmap] CSS filter not working on software composited layers
https://bugs.webkit.org/show_bug.cgi?id=122159
Reviewed by Noam Rosenthal.
Tell the rendering layer we do not support CSS filters when we do not. This
will make RenderLayer fall back to using its own software implementation.
* platform/graphics/texmap/GraphicsLayerTextureMapper.cpp:
(WebCore::GraphicsLayerTextureMapper::setFilters):
* platform/graphics/texmap/TextureMapperImageBuffer.cpp:
(WebCore::BitmapTextureImageBuffer::applyFilters):
2013-10-01 Darin Adler <darin@apple.com>
Try to fix assertion failures seem on bots.
* css/StyleResolver.cpp:
(WebCore::StyleResolver::createFilterOperations): Rearrange code so this
won't try ot call toCSSPrimitiveValue on a non-primitive-value in the
DROP_SHADOW case.
2013-10-01 Gyuyoung Kim <gyuyoung.kim@samsung.com>
Generate toCSSFooValue for CSSPrimitiveValue
https://bugs.webkit.org/show_bug.cgi?id=122101
Reviewed by Antti Koivisto.
As a step of clean-up static_cast<> in CSSValues, this patch generates
toCSSFooPrimitiveValue() in order to detect bad casts as well as improves
code readability.
No new tests, no behavior changes.
* css/CSSFontSelector.cpp:
(WebCore::CSSFontSelector::addFontFaceRule):
* css/CSSImageGeneratorValue.cpp:
(WebCore::CSSImageGeneratorValue::subimageIsPending):
(WebCore::CSSImageGeneratorValue::cachedImageForCSSValue):
* css/CSSImageSetValue.cpp:
(WebCore::CSSImageSetValue::fillImageSet):
* css/CSSParser.cpp:
(WebCore::CSSParser::parseColor):
(WebCore::CSSParser::addProperty):
(WebCore::CSSParser::parse3ValuesFillPosition):
(WebCore::CSSParser::parseFillPosition):
(WebCore::CSSParser::parseFillRepeat):
(WebCore::CSSParser::parseDeprecatedRadialGradient):
(WebCore::CSSParser::parseRadialGradient):
* css/CSSPrimitiveValue.h:
* css/CSSToStyleMap.cpp:
(WebCore::CSSToStyleMap::mapFillAttachment):
(WebCore::CSSToStyleMap::mapFillClip):
(WebCore::CSSToStyleMap::mapFillComposite):
(WebCore::CSSToStyleMap::mapFillBlendMode):
(WebCore::CSSToStyleMap::mapFillOrigin):
(WebCore::CSSToStyleMap::mapFillRepeatX):
(WebCore::CSSToStyleMap::mapFillRepeatY):
(WebCore::CSSToStyleMap::mapFillSize):
(WebCore::CSSToStyleMap::mapFillXPosition):
(WebCore::CSSToStyleMap::mapFillYPosition):
(WebCore::CSSToStyleMap::mapFillMaskSourceType):
(WebCore::CSSToStyleMap::mapAnimationDelay):
(WebCore::CSSToStyleMap::mapAnimationDirection):
(WebCore::CSSToStyleMap::mapAnimationDuration):
(WebCore::CSSToStyleMap::mapAnimationFillMode):
(WebCore::CSSToStyleMap::mapAnimationIterationCount):
(WebCore::CSSToStyleMap::mapAnimationName):
(WebCore::CSSToStyleMap::mapAnimationPlayState):
(WebCore::CSSToStyleMap::mapAnimationProperty):
(WebCore::CSSToStyleMap::mapAnimationTimingFunction):
(WebCore::CSSToStyleMap::mapNinePieceImageQuad):
(WebCore::CSSToStyleMap::mapNinePieceImageRepeat):
* css/CSSValue.cpp:
(WebCore::CSSValue::destroy):
* css/DeprecatedStyleBuilder.cpp:
(WebCore::ApplyPropertyDefault::applyValue):
(WebCore::ApplyPropertyNumber::applyValue):
(WebCore::ApplyPropertyAuto::applyValue):
(WebCore::ApplyPropertyClip::applyValue):
(WebCore::ApplyPropertyColor::applyValue):
(WebCore::ApplyPropertyLength::applyValue):
(WebCore::ApplyPropertyString::applyValue):
(WebCore::ApplyPropertyBorderRadius::applyValue):
(WebCore::ApplyPropertyComputeLength::applyValue):
(WebCore::ApplyPropertyFont::applyValue):
(WebCore::ApplyPropertyFontFamily::applyValue):
(WebCore::ApplyPropertyFontSize::applyValue):
(WebCore::ApplyPropertyFontWeight::applyValue):
(WebCore::ApplyPropertyFontVariantLigatures::applyValue):
(WebCore::ApplyPropertyCounter::applyValue):
(WebCore::ApplyPropertyCursor::applyValue):
(WebCore::ApplyPropertyTextAlign::applyValue):
(WebCore::ApplyPropertyTextDecoration::applyValue):
(WebCore::ApplyPropertyMarqueeIncrement::applyValue):
(WebCore::ApplyPropertyMarqueeRepetition::applyValue):
(WebCore::ApplyPropertyMarqueeSpeed::applyValue):
(WebCore::ApplyPropertyTextUnderlinePosition::applyValue):
(WebCore::ApplyPropertyLineHeight::applyValue):
(WebCore::ApplyPropertyLineHeightForIOSTextAutosizing::applyValue):
(WebCore::ApplyPropertyPageSize::applyValue):
(WebCore::ApplyPropertyTextEmphasisStyle::applyValue):
(WebCore::ApplyPropertyResize::applyValue):
(WebCore::ApplyPropertyVerticalAlign::applyValue):
(WebCore::ApplyPropertyZoom::applyValue):
(WebCore::ApplyPropertyDisplay::applyValue):
(WebCore::ApplyPropertyClipPath::applyValue):
(WebCore::ApplyPropertyShape::applyValue):
(WebCore::ApplyPropertyImageResolution::applyValue):
(WebCore::ApplyPropertyTextIndent::applyValue):
* css/MediaList.cpp:
(WebCore::reportMediaQueryWarningIfNeeded):
* css/MediaQueryEvaluator.cpp:
(WebCore::numberValue):
(WebCore::orientationMediaFeatureEval):
(WebCore::evalResolution):
(WebCore::device_pixel_ratioMediaFeatureEval):
(WebCore::resolutionMediaFeatureEval):
(WebCore::computeLength):
(WebCore::view_modeMediaFeatureEval):
(WebCore::pointerMediaFeatureEval):
* css/SVGCSSStyleSelector.cpp:
(WebCore::StyleResolver::applySVGProperty):
* css/StylePropertySet.cpp:
(WebCore::StylePropertySet::getLayeredShorthandValue):
* css/StyleResolver.cpp:
(WebCore::createGridTrackSize):
(WebCore::createGridTrackList):
(WebCore::createGridPosition):
(WebCore::hasVariableReference):
(WebCore::StyleResolver::applyProperty):
(WebCore::StyleResolver::parseCustomFilterArrayParameter):
(WebCore::StyleResolver::parseCustomFilterColorParameter):
(WebCore::StyleResolver::parseCustomFilterNumberParameter):
(WebCore::StyleResolver::parseCustomFilterParameter):
(WebCore::StyleResolver::parseCustomFilterParameterList):
(WebCore::StyleResolver::createCustomFilterOperationWithInlineSyntax):
(WebCore::StyleResolver::createFilterOperations):
* css/TransformFunctions.cpp:
(WebCore::transformsForValue):
* css/ViewportStyleResolver.cpp:
(WebCore::ViewportStyleResolver::getViewportArgumentValue):
* css/WebKitCSSMatrix.cpp:
(WebCore::WebKitCSSMatrix::setMatrixValue):
* editing/ApplyStyleCommand.cpp:
(WebCore::ApplyStyleCommand::computedFontSize):
* editing/EditingStyle.cpp:
(WebCore::identifierForStyleProperty):
(WebCore::HTMLElementEquivalent::valueIsPresentInStyle):
(WebCore::cssValueToRGBA):
(WebCore::EditingStyle::extractFontSizeDelta):
(WebCore::EditingStyle::textDirection):
(WebCore::EditingStyle::prepareToApplyAt):
(WebCore::EditingStyle::mergeStyleFromRulesForSerialization):
(WebCore::EditingStyle::legacyFontSize):
(WebCore::EditingStyle::textDirectionForSelection):
(WebCore::StyleChange::extractTextStyles):
(WebCore::fontWeightIsBold):
(WebCore::isTransparentColorValue):
* editing/markup.cpp:
(WebCore::propertyMissingOrEqualToNone):
2013-10-01 Darin Adler <darin@apple.com>
Try to fix AVFoundation crashes seen on Lion bot.
* platform/graphics/avfoundation/objc/AudioTrackPrivateAVFObjC.mm:
Four AVFoundation string constants used in this file were new to 10.8.
For older versions of OS X, use hard-coded string constants instead.
2013-10-01 Zan Dobersek <zdobersek@igalia.com>
[IndexedDB] Interfaces inheriting from EventTarget should generate JSC (un)wrapping functions
https://bugs.webkit.org/show_bug.cgi?id=122114
Reviewed by Darin Adler.
After r156590, four IndexedDB interfaces are inheriting from the EventTarget interface. Because of that,
they're now required to have interface-specific JSC wrapping and unwrapping functions generated since the
JSC wrapping and unwrapping functions for the EventTarget interface delegate these operations to these
interface-specific functions. If the functions are not generated and accessible, the EventTarget functions
end up recursively calling themselves.
* Modules/indexeddb/IDBDatabase.idl:
* Modules/indexeddb/IDBOpenDBRequest.idl:
* Modules/indexeddb/IDBRequest.idl:
* Modules/indexeddb/IDBTransaction.idl:
2013-09-30 Ryuan Choi <ryuan.choi@samsung.com>
Build fix for EFL, Qt, Gtk port after r156688
https://bugs.webkit.org/show_bug.cgi?id=122139
Reviewed by Anders Carlsson.
Get rid of more uses of OwnPtr and PassOwnPtr.
* platform/graphics/surfaces/GraphicsSurface.cpp:
(WebCore::GraphicsSurface::beginPaint):
* platform/graphics/surfaces/GraphicsSurface.h:
* platform/graphics/surfaces/efl/GraphicsSurfaceCommon.cpp:
(WebCore::GraphicsSurface::platformBeginPaint):
* platform/graphics/surfaces/glx/GraphicsSurfaceGLX.cpp:
(WebCore::GraphicsSurface::platformBeginPaint):
* platform/graphics/surfaces/qt/GraphicsSurfaceQt.cpp:
(WebCore::GraphicsSurface::platformBeginPaint):
2013-09-30 Sam White <samuel_white@apple.com>
AX: Expose ARIA Busy Notifications
https://bugs.webkit.org/show_bug.cgi?id=121451
Reviewed by Chris Fleizach.
Added AXElementBusyChanged notification that posts when aria-busy is toggled. This
enables screen readers to detect busy states without polling the focused element.
Test: platform/mac/accessibility/element-busy-changed.html
* accessibility/AXObjectCache.cpp:
(WebCore::AXObjectCache::handleAttributeChanged):
* accessibility/AXObjectCache.h:
* accessibility/mac/AXObjectCacheMac.mm:
(WebCore::AXObjectCache::postPlatformNotification):
2013-09-30 Sam Weinig <sam@webkit.org>
Fixing the build.
* GNUmakefile.list.am:
2013-09-30 Sam Weinig <sam@webkit.org>
More build fixing.
* GNUmakefile.list.am:
* WebCore.vcxproj/WebCore.vcxproj.filters:
* inspector/InspectorAllInOne.cpp:
* inspector/InstrumentingAgents.h:
2013-09-30 Sam Weinig <sam@webkit.org>
Fix the Efl and Gtk builds.
* GNUmakefile.list.am:
* PlatformEfl.cmake:
* PlatformGTK.cmake:
2013-09-30 Sam Weinig <sam@webkit.org>
Remove support for DOMFileSystem
https://bugs.webkit.org/show_bug.cgi?id=122137
Reviewed by Anders Carlsson.
* Files elided *
2013-09-30 Brent Fulgham <bfulgham@apple.com>
[Windows] Build fix afer r156688.
* fileapi/ThreadableBlobRegistry.cpp:
(WebCore::ThreadableBlobRegistry::registerBlobURL): Switch to std::unique_ptr in
method implementation.
2013-09-30 Anders Carlsson <andersca@apple.com>
Get rid of more uses of OwnPtr and PassOwnPtr
https://bugs.webkit.org/show_bug.cgi?id=122136
Reviewed by Antti Koivisto.
* Modules/websockets/WebSocket.cpp:
(WebCore::WebSocket::didReceiveBinaryData):
* WebCore.exp.in:
* fileapi/Blob.cpp:
(WebCore::Blob::Blob):
(WebCore::Blob::slice):
* fileapi/Blob.h:
(WebCore::Blob::create):
* fileapi/File.cpp:
(WebCore::createBlobDataForFileWithType):
(WebCore::createBlobDataForFile):
(WebCore::createBlobDataForFileWithName):
* fileapi/ThreadableBlobRegistry.cpp:
(WebCore::BlobRegistryContext::BlobRegistryContext):
(WebCore::registerBlobURLTask):
(WebCore::ThreadableBlobRegistry::registerBlobURL):
* fileapi/ThreadableBlobRegistry.h:
* fileapi/WebKitBlobBuilder.cpp:
(WebCore::BlobBuilder::getBlob):
* platform/network/BlobData.cpp:
(WebCore::BlobDataHandle::BlobDataHandle):
* platform/network/BlobData.h:
(WebCore::BlobData::BlobData):
(WebCore::BlobDataHandle::create):
* platform/network/BlobRegistry.h:
* platform/network/BlobRegistryImpl.cpp:
(WebCore::BlobRegistryImpl::registerBlobURL):
* platform/network/BlobRegistryImpl.h:
* xml/XMLHttpRequest.cpp:
(WebCore::XMLHttpRequest::responseBlob):
2013-09-30 Benjamin Poulain <benjamin@webkit.org>
Remove the code guarded by STYLE_SCOPED
https://bugs.webkit.org/show_bug.cgi?id=122123
Reviewed by Anders Carlsson.
Start cleaning the code related to <style scoped>. This patch
only removes the code with #ifdef guards.
* Configurations/FeatureDefines.xcconfig:
* WebCore.exp.in:
* bindings/generic/RuntimeEnabledFeatures.cpp:
(WebCore::RuntimeEnabledFeatures::RuntimeEnabledFeatures):
* bindings/generic/RuntimeEnabledFeatures.h:
* css/DocumentRuleSets.cpp:
(WebCore::DocumentRuleSets::appendAuthorStyleSheets):
* css/ElementRuleCollector.cpp:
(WebCore::ElementRuleCollector::matchScopedAuthorRules):
* css/StyleResolver.cpp:
(WebCore::StyleResolver::locateCousinList):
(WebCore::StyleResolver::canShareStyleWithElement):
(WebCore::StyleResolver::locateSharedStyle):
* css/StyleResolver.h:
(WebCore::StyleResolver::ensureScopeResolver):
* css/StyleScopeResolver.cpp:
* css/StyleScopeResolver.h:
* dom/Node.cpp:
* dom/Node.h:
* dom/ShadowRoot.cpp:
(WebCore::ShadowRoot::ShadowRoot):
* dom/ShadowRoot.h:
* html/HTMLStyleElement.cpp:
(WebCore::HTMLStyleElement::HTMLStyleElement):
(WebCore::HTMLStyleElement::parseAttribute):
(WebCore::HTMLStyleElement::insertedInto):
(WebCore::HTMLStyleElement::removedFrom):
* html/HTMLStyleElement.h:
* html/HTMLStyleElement.idl:
* testing/InternalSettings.cpp:
(WebCore::InternalSettings::Backup::Backup):
(WebCore::InternalSettings::Backup::restoreTo):
* testing/InternalSettings.h:
* testing/InternalSettings.idl:
* testing/Internals.cpp:
* testing/Internals.h:
* testing/Internals.idl:
2013-09-30 Drew Yao <ayao@apple.com>
ASSERT(!m_hasBadParent) in InlineBox::parent() should be ASSERT_WITH_SECURITY_IMPLICATION
https://bugs.webkit.org/show_bug.cgi?id=122032
Reviewed by Andreas Kling.
Convert assertion to ASSERT_WITH_SECURITY_IMPLICATION to help catch use after free bugs.
No new tests needed.
* rendering/InlineBox.h:
(WebCore::InlineBox::parent):
2013-09-30 Yongjun Zhang <yongjun_zhang@apple.com>
Don't attempt to destroy decoded frame if a BitmapImage doesn't have encoded raw data.
https://bugs.webkit.org/show_bug.cgi?id=122115
Reviewed by Daniel Bates.
With BitmapImage::create(PassNativeImagePtr, ImageObserver*), a BitmapImage could be created by
passing a native image. If this image is added to memory cache, we shouldn't attempt to destroy
its decoded frames since there is no encoded raw data and we won't be able to reconstruct the image again.
No new tests for now. Currently there isn't a code path to add to the memory cache a BitmapImage
that was created by adopting a native image. We'll add such a code path in a subsequent patch.
* platform/graphics/BitmapImage.cpp:
(WebCore::BitmapImage::destroyDecodedDataIfNecessary):
2013-09-30 Brady Eidson <beidson@apple.com>
Remove IDBTracing.h.
https://bugs.webkit.org/show_bug.cgi?id=122118
Reviewed by Alexey Proskuryakov.
Global replace of "IDB_TRACE" with "LOG(StorageAPI)", and remove all notions of this header.
* GNUmakefile.list.am:
* Modules/indexeddb/IDBCursor.cpp:
* Modules/indexeddb/IDBDatabase.cpp:
* Modules/indexeddb/IDBDatabaseBackendInterface.h:
* Modules/indexeddb/IDBFactory.cpp:
* Modules/indexeddb/IDBIndex.cpp:
* Modules/indexeddb/IDBObjectStore.cpp:
* Modules/indexeddb/IDBOpenDBRequest.cpp:
* Modules/indexeddb/IDBRequest.cpp:
* Modules/indexeddb/IDBTracing.h: Removed.
* Modules/indexeddb/IDBTransaction.cpp:
* Modules/indexeddb/leveldb/IDBBackingStoreLevelDB.cpp:
* Modules/indexeddb/leveldb/IDBCursorBackendLevelDB.cpp:
* Modules/indexeddb/leveldb/IDBDatabaseBackendLevelDB.cpp:
* Modules/indexeddb/leveldb/IDBFactoryBackendLevelDB.cpp:
* Modules/indexeddb/leveldb/IDBObjectStoreBackendLevelDB.cpp:
* Modules/indexeddb/leveldb/IDBTransactionBackendLevelDB.cpp:
* WebCore.xcodeproj/project.pbxproj:
* bindings/js/IDBBindingUtilities.cpp:
2013-09-30 Brent Fulgham <bfulgham@apple.com>
[Windows] Build fix after r156622. Build RenderLayerModelObject.cpp in a separate compilation unit
from the RenderLayerAllnOne file so that the scalar and vector destructors are visible to other
elements of WebCore during the build.
* WebCore.vcxproj/WebCore.vcxproj: Compile RenderLayerModelObject outside of the all-in-one file.
* WebCore.vcxproj/WebCore.vcxproj.filters: Ditto.
* rendering/RenderingAllInOne.cpp: Remove RenderLayerModelObject.cpp.
2013-09-30 Mark Rowe <mrowe@apple.com>
Fix the build when building against an SDK.
Xcode helpfully prepends $(SDKROOT) to the paths in FRAMEWORK_SEARCH_PATHS when generating
the compiler command lines. It can't know to do this for the system framework search paths
we add manually via OTHER_CFLAGS though, so we need to prefix them with $(SDKROOT) ourself.
* Configurations/WebCore.xcconfig:
2013-09-30 Brent Fulgham <bfulgham@apple.com>
[Windows] Unreviewed build fix.
* WebCore.vcxproj/WebCore.vcxproj.filters: Correct malformed XML in project files.
2013-09-30 Jer Noble <jer.noble@apple.com>
Unreviewed, roll back in r156546 with rebaselined tests.
https://bugs.webkit.org/show_bug.cgi?id=122111
* Modules/mediacontrols/mediaControlsApple.js:
(Controller):
(Controller.prototype.addVideoListeners):
(Controller.prototype.removeVideoListeners):
(Controller.prototype.updateHasAudio):
2013-09-30 Commit Queue <commit-queue@webkit.org>
Unreviewed, rolling out r156656.
http://trac.webkit.org/changeset/156656
https://bugs.webkit.org/show_bug.cgi?id=122111
Broke several media tests (Requested by ap on #webkit).
* Modules/mediacontrols/mediaControlsApple.js:
(Controller):
(Controller.prototype.addVideoListeners):
(Controller.prototype.removeVideoListeners):
2013-09-29 Sam Weinig <sam@webkit.org>
Convert a bunch of OwnPtrs on Page to std::unique_ptrs
https://bugs.webkit.org/show_bug.cgi?id=122086
Reviewed by Darin Adler.
* loader/ProgressTracker.cpp:
* loader/ProgressTracker.h:
* page/Page.cpp:
(WebCore::Page::Page):
(WebCore::Page::setGroupName):
(WebCore::Page::initGroup):
* page/Page.h:
* page/PageGroup.cpp:
(WebCore::PageGroup::PageGroup):
* page/PageGroup.h:
2013-09-30 Antti Koivisto <antti@apple.com>
Remove FontTranscoder
https://bugs.webkit.org/show_bug.cgi?id=122088
Reviewed by Andreas Kling.
This overly generic class just implements mapping of backslash to yen symbol for some legacy Japanese fonts.
* CMakeLists.txt:
* GNUmakefile.am:
* GNUmakefile.list.am:
* Target.pri:
* WebCore.pri:
* WebCore.vcxproj/WebCore.vcxproj:
* WebCore.xcodeproj/project.pbxproj:
* platform/graphics/Font.cpp:
(WebCore::useBackslashAsYenSignForFamily):
Move the family set to Font.cpp.
(WebCore::Font::Font):
(WebCore::Font::operator=):
(WebCore::Font::update):
Keep the cached boolean up to date.
* platform/graphics/Font.h:
(WebCore::Font::useBackslashAsYenSymbol):
Use descriptive name instead of talking about "transcoding".
* platform/text/transcoder: Removed.
* platform/text/transcoder/FontTranscoder.cpp: Removed.
* platform/text/transcoder/FontTranscoder.h: Removed.
* rendering/RenderText.cpp:
(WebCore::RenderText::RenderText):
(WebCore::RenderText::computeUseBackslashAsYenSymbol):
Rename for clarity.
Avoid unnecessary hash lookup, just check the cached bit in Font.
(WebCore::RenderText::styleDidChange):
(WebCore::RenderText::setTextInternal):
"Transcoding" here was just a simple character replacement.
(WebCore::RenderText::textWithoutConvertingBackslashToYenSymbol):
Renamed.
* rendering/RenderText.h:
2013-09-27 Jer Noble <jer.noble@apple.com>
REGRESSION(r156546): media/video-no-audio.html broken
https://bugs.webkit.org/show_bug.cgi?id=122049
Reviewed by Eric Carlson.
Now that our video elements have audio tracks, use their presence or
absense to show or hide the volume controls.
* Modules/mediacontrols/mediaControlsApple.js:
(Controller):
(Controller.prototype.addVideoListeners): Listen for audioTrack changes.
(Controller.prototype.removeVideoListeners): Stop listening to same.
(Controller.prototype.handleAudioTrackChange): Call this.updateHasAudio()
(Controller.prototype.handleAudioTrackAdd): Ditto.
(Controller.prototype.handleAudioTrackRemove): Ditto.
(Controller.prototype.updateHasAudio): Hide the volume controls if no
audioTracks are present, and vice versa.
2013-09-30 Jer Noble <jer.noble@apple.com>
Unreviewed Mac-Lion build fix.
Use metadataItemsFromArray:withLocale: instead of
metadataItemsFromArray:filteredAndSortedAccordingToPreferredLanguages:
on Lion and earlier.
* platform/graphics/avfoundation/objc/AudioTrackPrivateAVFObjC.mm:
(WebCore::AudioTrackPrivateAVFObjC::resetPropertiesFromTrack):
2013-09-27 Jer Noble <jer.noble@apple.com>
[Mac] Add AudioTrack support to MediaPlayerPrivateAVFObC.
https://bugs.webkit.org/show_bug.cgi?id=122043
Reviewed by Eric Carlson.
Test: media/track/audio-track.html
Add a new class AudioTrackPrivateAVF and subclass AudioTrackPrivateAVFObjC
which are backed by a AVPlayerItemTrack. Create one of these tracks when
we are notified that the list of available tracks has changed.
* WebCore.xcodeproj/project.pbxproj:
* html/track/AudioTrack.cpp:
(WebCore::AudioTrack::setEnabled): Pass through to the AudioTrackPrivate
so that the underlying media track can be (dis|en)abled.
* platform/graphics/avfoundation/AudioTrackPrivateAVF.h: Added.
(WebCore::AudioTrackPrivateAVF::kind): Simple getter.
(WebCore::AudioTrackPrivateAVF::id): Ditto.
(WebCore::AudioTrackPrivateAVF::label): Ditto.
(WebCore::AudioTrackPrivateAVF::language): Ditto.
(WebCore::AudioTrackPrivateAVF::setKind): Simple Setter.
(WebCore::AudioTrackPrivateAVF::setId): Ditto.
(WebCore::AudioTrackPrivateAVF::setLabel): Ditto.
(WebCore::AudioTrackPrivateAVF::setLanguage): Ditto.
(WebCore::AudioTrackPrivateAVF::AudioTrackPrivateAVF): Simple constructor.
* platform/graphics/avfoundation/objc/AudioTrackPrivateAVFObjC.h: Added.
(WebCore::AudioTrackPrivateAVFObjC::create): Simple factory.
(WebCore::AudioTrackPrivateAVFObjC::playerItemTrack): Simple getter.
* platform/graphics/avfoundation/objc/AudioTrackPrivateAVFObjC.mm: Added.
(WebCore::AudioTrackPrivateAVFObjC::AudioTrackPrivateAVFObjC): Call resetPropertiesFromTrack.
(WebCore::AudioTrackPrivateAVFObjC::resetPropertiesFromTrack): Fill out the values from
the associated AVPlayerItemTrack and its AVAssetTrack.
(WebCore::AudioTrackPrivateAVFObjC::setPlayerItemTrack): Call resetPropertiesFromTrack.
(WebCore::AudioTrackPrivateAVFObjC::setEnabled): (En|Dis)able the AVPlayerItemTrack.
(WebCore::AudioTrackPrivateAVFObjC::languageForAVAssetTrack): Refactored from
MediaPlayerPrivateAVFoundationObjC::languageOfPrimaryAudioTrack.
* platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.h:
* platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
(WebCore::MediaPlayerPrivateAVFoundationObjC::tracksChanged): Determine which tracks
have been added or removed and notify the clients accordingly.
(WebCore::MediaPlayerPrivateAVFoundationObjC::languageOfPrimaryAudioTrack): Refactor into
AudioTrackPrivateAVFObjC::languageForAVAssetTrack.
2013-09-30 Gyuyoung Kim <gyuyoung.kim@samsung.com>
Generate toCSSCalcValue instead of using manual cast function
https://bugs.webkit.org/show_bug.cgi?id=122055
Reviewed by Antti Koivisto.
Generated type cast function supports more plenty functions rather than manual functions.
To use CSS_VALUE_TYPE_CAST, isCalculationValue() needs to be changed with isCalcValue().
No new tests, no behavior changes.
* css/CSSCalculationValue.h:
* css/CSSValue.cpp:
(WebCore::CSSValue::destroy):
* css/CSSValue.h:
(WebCore::CSSValue::isCalcValue):
* css/StyleResolver.cpp:
(WebCore::hasVariableReference):
2013-09-30 Antti Koivisto <antti@apple.com>
Get rid of static map for marking ancestor line boxes dirty
https://bugs.webkit.org/show_bug.cgi?id=122080
Reviewed by Andreas Kling.
This is ugly and shows up in profiles too. Use a bit in RenderElement instead.
* rendering/RenderBlock.h:
* rendering/RenderBlockFlow.h:
Move dirtyLinesFromChangedChild down to RenderBlockFlow. It wouldn't do anything on other RenderBlocks.
* rendering/RenderElement.cpp:
(WebCore::RenderElement::RenderElement):
* rendering/RenderElement.h:
Add m_ancestorLineBoxDirty bit. We have 32 unused bits here on 64bit systems.
(WebCore::RenderElement::dirtyLinesFromChangedChild):
(WebCore::RenderElement::ancestorLineBoxDirty):
(WebCore::RenderElement::setAncestorLineBoxDirty):
(WebCore::RenderObject::setNeedsLayout):
* rendering/RenderInline.h:
* rendering/RenderLineBoxList.cpp:
(WebCore::RenderLineBoxList::dirtyLinesFromChangedChild):
Tighten the interface.
* rendering/RenderLineBoxList.h:
* rendering/RenderObject.cpp:
(WebCore::RenderObject::willBeDestroyed):
* rendering/RenderObject.h:
Remove the static map.
2013-09-18 Sergio Villar Senin <svillar@igalia.com>
[CSS Grid Layout] Implement the grid-area shorthand
https://bugs.webkit.org/show_bug.cgi?id=103334
Reviewed by Andreas Kling.
Based on Blink r151684 by <jchaffraix@chromium.org>
Test: fast/css-grid-layout/grid-item-area-get-set.html
Added support to specify grid positions using the
'-webkit-grid-area' shorthand. Named grid areas are still not
allowed, to be done in a follow up patch as it likely requires
'-webkit-grid-template' support.
* css/CSSComputedStyleDeclaration.cpp:
(WebCore::ComputedStyleExtractor::propertyValue):
* css/CSSParser.cpp:
(WebCore::CSSParser::parseValue):
(WebCore::CSSParser::parseGridItemPositionShorthand):
* css/CSSPropertyNames.in:
* css/StylePropertySet.cpp:
(WebCore::StylePropertySet::getPropertyValue):
* css/StylePropertyShorthand.cpp:
(WebCore::webkitGridAreaShorthand):
(WebCore::shorthandForProperty):
* css/StylePropertyShorthand.h:
* css/StyleResolver.cpp:
(WebCore::StyleResolver::applyProperty):
2013-09-30 Gyuyoung Kim <gyuyoung.kim@samsung.com>
Generate toCSSFooValue for CSSGradientValue, CSSLinearGradientValue and CSSRadialGradient
https://bugs.webkit.org/show_bug.cgi?id=122060
Reviewed by Antti Koivisto.
As a step to generate toCSSFooValue, toCSSGradientValuem toCSSLinearGradientValue and
toCSSRadialGradient are generated. isLinearGradient() and isRadialGradient() are moved
from each class to CSSValue in order to generate toCSSFooValue.
No new tests, no behavior change.
* css/CSSGradientValue.cpp:
(WebCore::CSSGradientValue::image):
(WebCore::CSSGradientValue::gradientWithStylesResolved):
* css/CSSGradientValue.h:
* css/CSSImageGeneratorValue.cpp:
(WebCore::CSSImageGeneratorValue::image):
(WebCore::CSSImageGeneratorValue::fixedSize):
(WebCore::CSSImageGeneratorValue::loadSubimages):
* css/CSSParser.cpp:
(WebCore::CSSParser::parseDeprecatedGradient):
* css/CSSValue.cpp:
(WebCore::CSSValue::destroy):
* css/CSSValue.h:
(WebCore::CSSValue::isLinearGradient):
(WebCore::CSSValue::isRadialGradient):
* css/StyleResolver.cpp:
(WebCore::StyleResolver::applyProperty):
(WebCore::StyleResolver::styleImage):
2013-09-30 Vani Hegde <vani.hegde@samsung.com>
user-select: none cursor turns to I-beam on mouse dragging
https://bugs.webkit.org/show_bug.cgi?id=90159
Reviewed by Ryosuke Niwa.
When tried to select some text in an area that has style
cursor:default set, cursor type changes to text cursor ignoring
the cursor style that is explicitly set.
When the cursor style is explicitly set as default (or something else),
we should not change it to text cursor no matter what we are over
or what operation we are performing (be it hovering over the text
or selecting the text).
During text selection, changing the cursor type to text only when
there is no explicit cursor type set fixes the issue.
Test: editing/caret/selection-with-caret-type-progress.html
* page/EventHandler.cpp:
(WebCore::EventHandler::selectCursor):
During selection, set the cursor style to text only if there is no
explicit cursor style set.
2013-09-29 Gyuyoung Kim <gyuyoung.kim@samsung.com>
Generate toCSSFooValue() for CSSCanvasValue
https://bugs.webkit.org/show_bug.cgi?id=122058
Reviewed by Antti Koivisto.
Generate toCSSFooValue() for CSSCanvasValue, and use it.
This type cast function will help to detect bad-casts.
isCanvasValue() is added in order to generate toCSSCanvasValue.
No new tests, no behavior change.
* css/CSSCanvasValue.h:
* css/CSSImageGeneratorValue.cpp:
(WebCore::CSSImageGeneratorValue::image):
(WebCore::CSSImageGeneratorValue::fixedSize):
(WebCore::CSSImageGeneratorValue::loadSubimages):
* css/CSSValue.cpp:
(WebCore::CSSValue::destroy):
* css/CSSValue.h:
(WebCore::CSSValue::isCanvasValue):
2013-09-29 Mark Rowe <mrowe@apple.com>
Fix the Lion build.
Ensure that C++ and Objective-C++ files build with the right compiler flags.
* Configurations/WebCore.xcconfig:
2013-09-29 Gyuyoung Kim <gyuyoung.kim@samsung.com>
Generate toCSSFooValue() for CSSLineBoxContainValue
https://bugs.webkit.org/show_bug.cgi?id=122054
Reviewed by Darin Adler.
As a step to use toCSSFooValue, toCSSLineBoxContainValue is generated by using
CSS_VALUE_TYPE_CASTS. To use it, isCSSLineBoxContainValue() is changed to
isLineBoxContatinValue(). Unnecessary local variable is removed by this patch.
No new tests, no behavior changes.
* css/CSSLineBoxContainValue.h:
* css/CSSValue.cpp:
(WebCore::CSSValue::destroy):
* css/CSSValue.h:
(WebCore::CSSValue::isLineBoxContainValue):
* css/StyleResolver.cpp:
(WebCore::StyleResolver::applyProperty):
2013-09-29 Gyuyoung Kim <gyuyoung.kim@samsung.com>
Generate toCSSCrossfadeValue() instead of using manual function
https://bugs.webkit.org/show_bug.cgi?id=122057
Reviewed by Antti Koivisto.
Generated toCSSFooValue() supports more plenty functions rather than
to use manual cast function.
No new tests, no behavior changes.
* css/CSSCrossfadeValue.h:
* css/CSSImageGeneratorValue.cpp:
(WebCore::CSSImageGeneratorValue::image):
(WebCore::CSSImageGeneratorValue::fixedSize):
(WebCore::CSSImageGeneratorValue::loadSubimages):
* css/CSSValue.cpp:
(WebCore::CSSValue::destroy):
2013-09-29 Gyuyoung Kim <gyuyoung.kim@samsung.com>
Generate toCSSFooValue() for CSSFilterImageValue and CSSInitialValue
https://bugs.webkit.org/show_bug.cgi?id=122056
Reviewed by Antti Koivisto.
Generate toCSSFooValue() for CSSFilterImageValue and CSSInitialValue, and use it.
This type cast function will help to detect bad-casts.
No new tests, no behavior changes.
* css/CSSFilterImageValue.h:
* css/CSSImageGeneratorValue.cpp:
(WebCore::CSSImageGeneratorValue::image):
(WebCore::CSSImageGeneratorValue::fixedSize):
(WebCore::CSSImageGeneratorValue::loadSubimages):
* css/CSSInitialValue.h:
* css/CSSValue.cpp:
(WebCore::CSSValue::destroy):
* css/StyleResolver.cpp:
(WebCore::StyleResolver::generatedOrPendingFromValue):
2013-09-29 Darin Adler <darin@apple.com>
Fix crashes caused by my recent attempt at a Windows build fix.
* bindings/js/WebCoreTypedArrayController.cpp:
(WebCore::WebCoreTypedArrayController::toJS): Added back the prefix for the call to
WebCore::toJS, otherwise this function just calls itself infinitely recursively.
2013-09-29 Sam Weinig <sam@webkit.org>
Cleanup PageThrottler and PageConsole a bit
https://bugs.webkit.org/show_bug.cgi?id=122085
Reviewed by Anders Carlsson.
* html/HTMLMediaElement.h:
* loader/FrameLoader.cpp:
(WebCore::FrameLoader::completed):
* loader/FrameLoader.h:
* loader/SubresourceLoader.cpp:
(WebCore::SubresourceLoader::checkForHTTPStatusCodeError):
(WebCore::SubresourceLoader::didFinishLoading):
(WebCore::SubresourceLoader::didFail):
(WebCore::SubresourceLoader::willCancel):
* loader/SubresourceLoader.h:
Store the PageActivityAssertionToken as a std::unique_ptr.
* page/Page.cpp:
(WebCore::Page::Page):
Use createOwned and pass this by reference for the PageThrottler and PageConsole.
(WebCore::Page::~Page):
Remove unnecessary clearing of an OwnPtr that is about to be destroyed.
* page/Page.h:
Make m_pageThrottler const and return it as a reference.
* page/PageActivityAssertionToken.cpp:
(WebCore::PageActivityAssertionToken::PageActivityAssertionToken):
(WebCore::PageActivityAssertionToken::~PageActivityAssertionToken):
* page/PageActivityAssertionToken.h:
Take the PageThrottler by reference in the constructor. It is never null.
* page/PageConsole.cpp:
(WebCore::PageConsole::PageConsole):
(WebCore::PageConsole::~PageConsole):
(WebCore::PageConsole::addMessage):
* page/PageConsole.h:
Pass and store the Page as a reference and remove an extraneous null check. Remove
the create function.
* page/PageThrottler.cpp:
(WebCore::PageThrottler::PageThrottler):
(WebCore::PageThrottler::~PageThrottler):
(WebCore::PageThrottler::createActivityToken):
(WebCore::PageThrottler::throttlePage):
(WebCore::PageThrottler::unthrottlePage):
(WebCore::PageThrottler::addActivityToken):
(WebCore::PageThrottler::removeActivityToken):
* page/PageThrottler.h:
Pass and store the Page as a reference. Move the creation of PageActivityAssertionToken here
to aid encapsulation.
2013-09-29 Darin Adler <darin@apple.com>
Try to fix Windows build.
* bindings/js/WebCoreTypedArrayController.cpp: Windows has a symbol named Handle, so we need
to call JSC::Handle out by name. To fix that, I removed "using namespace JSC" entirely. And
just for fun, sort of "rewrote" this file.
(WebCore::WebCoreTypedArrayController::WebCoreTypedArrayController): Removed unneeded explicit
initialization of m_owner.
(WebCore::WebCoreTypedArrayController::~WebCoreTypedArrayController): Fixed formatting.
(WebCore::WebCoreTypedArrayController::toJS): Added lots of explicit JSC and got rid of local.
(WebCore::WebCoreTypedArrayController::JSArrayBufferOwner::isReachableFromOpaqueRoots): Cut
down on locals, used auto& for type, and called it "wrapper" since that's what JSArrayBuffer is.
(WebCore::WebCoreTypedArrayController::JSArrayBufferOwner::finalize): More of the same.
2013-09-29 Darin Adler <darin@apple.com>
Use RenderElement instead of RenderObject in many places
https://bugs.webkit.org/show_bug.cgi?id=122078
Reviewed by Andreas Kling.
* WebCore.exp.in: Updated for name changes.
* dom/ContainerNode.h: Moved renderer() here from Element.
* dom/Element.h: Moved renderer() from here to ContainerNode.
* render/RenderElement.h: Moved renderer() from Element to ContainerNode.
* accessibility/AccessibilityImageMapLink.cpp:
(WebCore::AccessibilityImageMapLink::imageMapLinkRenderer):
(WebCore::AccessibilityImageMapLink::detachFromParent):
(WebCore::AccessibilityImageMapLink::elementPath):
(WebCore::AccessibilityImageMapLink::elementRect):
* accessibility/AccessibilityImageMapLink.h:
* accessibility/AccessibilityRenderObject.cpp:
(WebCore::AccessibilityRenderObject::computeAccessibilityIsIgnored):
* bindings/objc/DOM.mm:
(-[DOMElement image]):
(-[DOMElement _font]):
(-[DOMElement _imageTIFFRepresentation]):
* css/CSSCanvasValue.cpp:
(WebCore::CSSCanvasValue::canvasChanged):
(WebCore::CSSCanvasValue::canvasResized):
(WebCore::CSSCanvasValue::canvasDestroyed):
(WebCore::CSSCanvasValue::fixedSize):
(WebCore::CSSCanvasValue::image):
* css/CSSCanvasValue.h:
* css/CSSComputedStyleDeclaration.cpp:
(WebCore::computeRenderStyleForProperty):
* css/CSSCrossfadeValue.cpp:
(WebCore::subimageKnownToBeOpaque):
(WebCore::CSSCrossfadeValue::fixedSize):
(WebCore::CSSCrossfadeValue::knownToBeOpaque):
(WebCore::CSSCrossfadeValue::image):
(WebCore::CSSCrossfadeValue::crossfadeChanged):
* css/CSSCrossfadeValue.h:
* css/CSSFilterImageValue.cpp:
(WebCore::CSSFilterImageValue::fixedSize):
(WebCore::CSSFilterImageValue::knownToBeOpaque):
(WebCore::CSSFilterImageValue::image):
(WebCore::CSSFilterImageValue::filterImageChanged):
* css/CSSFilterImageValue.h:
* css/CSSFontSelector.cpp:
* css/CSSGradientValue.cpp:
(WebCore::CSSGradientValue::image):
(WebCore::CSSGradientValue::addStops):
(WebCore::CSSGradientValue::knownToBeOpaque):
(WebCore::CSSLinearGradientValue::createGradient):
(WebCore::CSSRadialGradientValue::createGradient):
* css/CSSGradientValue.h:
(WebCore::CSSGradientValue::fixedSize):
* css/CSSImageGeneratorValue.cpp:
(WebCore::CSSImageGeneratorValue::addClient):
(WebCore::CSSImageGeneratorValue::removeClient):
(WebCore::CSSImageGeneratorValue::image):
(WebCore::CSSImageGeneratorValue::fixedSize):
(WebCore::CSSImageGeneratorValue::knownToBeOpaque):
* css/CSSImageGeneratorValue.h:
(WebCore::CSSImageGeneratorValue::clients):
* css/CSSImageValue.cpp:
(WebCore::CSSImageValue::knownToBeOpaque):
* css/CSSImageValue.h:
* css/DeprecatedStyleBuilder.cpp:
* dom/DocumentMarkerController.cpp:
(WebCore::DocumentMarkerController::removeMarkersFromList):
(WebCore::DocumentMarkerController::repaintMarkers):
* dom/Element.cpp:
(WebCore::localZoomForRenderer):
(WebCore::adjustForLocalZoom):
(WebCore::Element::offsetParent):
(WebCore::Element::updateExistingPseudoElement):
* dom/ElementRareData.h:
(WebCore::ElementRareData::create):
(WebCore::ElementRareData::ElementRareData):
* dom/Node.cpp:
(WebCore::Node::ensureRareData):
* editing/DeleteButtonController.cpp:
(WebCore::isDeletableElement):
* editing/Editor.cpp:
(WebCore::Editor::hasBidiSelection):
(WebCore::Editor::baseWritingDirectionForSelectionStart):
* editing/EditorCommand.cpp:
(WebCore::verticalScrollDistance):
* editing/htmlediting.cpp:
(WebCore::directionOfEnclosingBlock):
* editing/ios/EditorIOS.mm:
(WebCore::Editor::fontForSelection):
(WebCore::getImage):
* editing/mac/EditorMac.mm:
(WebCore::Editor::fontForSelection):
(WebCore::getImage):
* editing/markup.cpp:
* html/HTMLAreaElement.cpp:
(WebCore::HTMLAreaElement::computePath):
(WebCore::HTMLAreaElement::computeRect):
(WebCore::HTMLAreaElement::setFocus):
* html/HTMLAreaElement.h:
* html/HTMLCanvasElement.cpp:
(WebCore::HTMLCanvasElement::reset):
* html/HTMLElement.cpp:
(WebCore::HTMLElement::setInnerText):
* html/HTMLFormControlElement.cpp:
(WebCore::updateFromElementCallback):
* html/HTMLFormElement.cpp:
(WebCore::HTMLFormElement::rendererIsNeeded):
* html/HTMLFrameOwnerElement.h:
* html/HTMLImageElement.cpp:
(WebCore::HTMLImageElement::x):
(WebCore::HTMLImageElement::y):
(WebCore::HTMLImageElement::willRespondToMouseClickEvents):
* html/HTMLMapElement.cpp:
* html/HTMLMediaElement.cpp:
(WebCore::HTMLMediaElement::defaultEventHandler):
* html/HTMLMeterElement.cpp:
(WebCore::HTMLMeterElement::renderMeter):
* html/HTMLOptionElement.cpp:
(WebCore::HTMLOptionElement::didRecalcStyle):
* html/HTMLPlugInElement.cpp:
(WebCore::HTMLPlugInElement::willRespondToMouseClickEvents):
(WebCore::HTMLPlugInElement::defaultEventHandler):
(WebCore::HTMLPlugInElement::isKeyboardFocusable):
* html/HTMLPlugInImageElement.cpp:
(WebCore::HTMLPlugInImageElement::defaultEventHandler):
* html/HTMLProgressElement.cpp:
(WebCore::HTMLProgressElement::renderProgress):
* html/HTMLSelectElement.cpp:
(WebCore::HTMLSelectElement::scrollToSelection):
(WebCore::HTMLSelectElement::setOptionsChangedOnRenderer):
(WebCore::HTMLSelectElement::selectOption):
* html/HTMLTableCellElement.cpp:
(WebCore::HTMLTableCellElement::cellAbove):
* html/HTMLTextFormControlElement.cpp:
(WebCore::hasVisibleTextArea):
(WebCore::HTMLTextFormControlElement::setSelectionRange):
* html/InputType.h:
* html/parser/HTMLResourcePreloader.cpp:
* html/shadow/MediaControlElementTypes.cpp:
(WebCore::MediaControlElement::setDisplayType):
* html/shadow/MediaControlElements.cpp:
(WebCore::MediaControlPanelElement::startDrag):
(WebCore::MediaControlTextTrackContainerElement::createTextTrackRepresentationImage):
* html/shadow/MeterShadowElement.cpp:
(WebCore::MeterShadowElement::rendererIsNeeded):
(WebCore::MeterInnerElement::rendererIsNeeded):
* inspector/InspectorOverlay.cpp:
* inspector/InspectorTimelineAgent.cpp:
* inspector/InspectorTimelineAgent.h:
* loader/ImageLoader.cpp:
(WebCore::ImageLoader::renderImageResource):
* loader/cache/CachedImage.cpp:
(WebCore::CachedImage::currentFrameKnownToBeOpaque):
* loader/cache/CachedImage.h:
* mathml/MathMLElement.cpp:
* page/ContextMenuController.cpp:
* page/DragController.cpp:
(WebCore::DragController::draggableElement):
* page/EventHandler.cpp:
(WebCore::EventHandler::EventHandler):
(WebCore::EventHandler::clear):
(WebCore::EventHandler::startPanScrolling):
(WebCore::EventHandler::autoscrollRenderer):
(WebCore::EventHandler::scrollOverflow):
(WebCore::EventHandler::logicalScrollOverflow):
(WebCore::EventHandler::subframeForTargetNode):
(WebCore::EventHandler::selectCursor):
(WebCore::layerForNode):
(WebCore::EventHandler::handleWheelEvent):
(WebCore::EventHandler::clearGestureScrollNodes):
* page/EventHandler.h:
* page/FocusController.cpp:
* page/Frame.cpp:
(WebCore::Frame::ownerRenderer):
(WebCore::Frame::visiblePositionForPoint):
(WebCore::Frame::nodeImage):
* page/FrameView.cpp:
(WebCore::FrameView::applyOverflowToViewport):
(WebCore::FrameView::applyPaginationToViewport):
(WebCore::FrameView::calculateScrollbarModesForLayout):
(WebCore::FrameView::isEnclosedInCompositingLayer):
(WebCore::FrameView::embeddedContentBox):
(WebCore::FrameView::addSlowRepaintObject):
(WebCore::FrameView::removeSlowRepaintObject):
(WebCore::FrameView::addViewportConstrainedObject):
(WebCore::FrameView::removeViewportConstrainedObject):
(WebCore::FrameView::scrollContentsFastPath):
(WebCore::FrameView::repaintSlowRepaintObjects):
(WebCore::FrameView::setViewportConstrainedObjectsNeedLayout):
(WebCore::FrameView::updateOverflowStatus):
(WebCore::FrameView::updateScrollCorner):
(WebCore::FrameView::paintContents):
(WebCore::FrameView::convertFromRenderer):
(WebCore::FrameView::convertToRenderer):
* page/FrameView.h:
* page/PageSerializer.cpp:
(WebCore::PageSerializer::addImageToResources):
* page/PageSerializer.h:
* page/animation/AnimationBase.cpp:
(WebCore::AnimationBase::AnimationBase):
(WebCore::AnimationBase::updateStateMachine):
* page/animation/AnimationBase.h:
(WebCore::AnimationBase::renderer):
* page/animation/AnimationController.cpp:
(WebCore::AnimationControllerPrivate::ensureCompositeAnimation):
(WebCore::AnimationControllerPrivate::clear):
(WebCore::AnimationControllerPrivate::updateAnimations):
(WebCore::AnimationControllerPrivate::updateAnimationTimerForRenderer):
(WebCore::AnimationControllerPrivate::isRunningAnimationOnRenderer):
(WebCore::AnimationControllerPrivate::isRunningAcceleratedAnimationOnRenderer):
(WebCore::AnimationControllerPrivate::suspendAnimationsForDocument):
(WebCore::AnimationControllerPrivate::resumeAnimationsForDocument):
(WebCore::AnimationControllerPrivate::pauseAnimationAtTime):
(WebCore::AnimationControllerPrivate::pauseTransitionAtTime):
(WebCore::AnimationControllerPrivate::getAnimatedStyleForRenderer):
(WebCore::AnimationControllerPrivate::numberOfActiveAnimations):
(WebCore::AnimationController::cancelAnimations):
(WebCore::AnimationController::updateAnimations):
(WebCore::AnimationController::getAnimatedStyleForRenderer):
(WebCore::AnimationController::notifyAnimationStarted):
(WebCore::AnimationController::pauseAnimationAtTime):
(WebCore::AnimationController::pauseTransitionAtTime):
(WebCore::AnimationController::isRunningAnimationOnRenderer):
(WebCore::AnimationController::isRunningAcceleratedAnimationOnRenderer):
* page/animation/AnimationController.h:
* page/animation/AnimationControllerPrivate.h:
* page/animation/CSSPropertyAnimation.cpp:
(WebCore::crossfadeBlend):
* page/animation/CompositeAnimation.cpp:
(WebCore::CompositeAnimation::updateTransitions):
(WebCore::CompositeAnimation::updateKeyframeAnimations):
(WebCore::CompositeAnimation::animate):
* page/animation/CompositeAnimation.h:
* page/animation/ImplicitAnimation.cpp:
(WebCore::ImplicitAnimation::ImplicitAnimation):
(WebCore::ImplicitAnimation::animate):
(WebCore::ImplicitAnimation::pauseAnimation):
(WebCore::ImplicitAnimation::sendTransitionEvent):
* page/animation/ImplicitAnimation.h:
(WebCore::ImplicitAnimation::create):
* page/animation/KeyframeAnimation.cpp:
(WebCore::KeyframeAnimation::KeyframeAnimation):
(WebCore::KeyframeAnimation::animate):
(WebCore::KeyframeAnimation::pauseAnimation):
(WebCore::KeyframeAnimation::endAnimation):
(WebCore::KeyframeAnimation::sendAnimationEvent):
* page/animation/KeyframeAnimation.h:
* page/mac/EventHandlerMac.mm:
(WebCore::EventHandler::passWidgetMouseDownEventToWidget):
(WebCore::EventHandler::passSubframeEventToSubframe):
* page/mac/FrameSnapshottingMac.mm:
(WebCore::snapshotDragImage):
* platform/graphics/mac/MediaPlayerPrivateQTKit.mm:
(WebCore::MediaPlayerPrivateQTKit::paint):
* rendering/CounterNode.cpp:
(WebCore::CounterNode::CounterNode):
(WebCore::CounterNode::create):
* rendering/CounterNode.h:
(WebCore::CounterNode::owner):
* rendering/FilterEffectRenderer.cpp:
(WebCore::FilterEffectRenderer::buildReferenceFilter):
(WebCore::FilterEffectRenderer::build):
* rendering/FilterEffectRenderer.h:
* rendering/HitTestResult.cpp:
(WebCore::HitTestResult::spellingToolTip):
(WebCore::HitTestResult::title):
(WebCore::HitTestResult::innerTextIfTruncated):
(WebCore::HitTestResult::image):
* rendering/LayoutRepainter.cpp:
(WebCore::LayoutRepainter::LayoutRepainter):
* rendering/LayoutRepainter.h:
* rendering/LayoutState.h:
(WebCore::LayoutState::LayoutState):
* rendering/LineWidth.h:
* rendering/LogicalSelectionOffsetCaches.h:
(WebCore::isContainingBlockCandidateForAbsolutelyPositionedObject):
(WebCore::isNonRenderBlockInline):
(WebCore::containingBlockForFixedPosition):
(WebCore::containingBlockForAbsolutePosition):
(WebCore::containingBlockForObjectInFlow):
(WebCore::LogicalSelectionOffsetCaches::LogicalSelectionOffsetCaches):
* rendering/PaintInfo.h:
(WebCore::PaintInfo::PaintInfo):
(WebCore::PaintInfo::updateSubtreePaintRootForChildren):
* rendering/RenderBox.cpp:
(WebCore::RenderBox::paintFillLayers):
(WebCore::RenderBox::paintFillLayer):
* rendering/RenderBox.h:
* rendering/RenderBoxModelObject.cpp:
(WebCore::RenderBoxModelObject::paintFillLayerExtended):
(WebCore::RenderBoxModelObject::calculateBackgroundImageGeometry):
* rendering/RenderBoxModelObject.h:
* rendering/RenderCounter.cpp:
(WebCore::nextInPreOrder):
(WebCore::planCounter):
(WebCore::makeCounterNode):
(WebCore::RenderCounter::originalText):
* rendering/RenderElement.cpp:
(WebCore::RenderElement::~RenderElement):
(WebCore::RenderElement::insertChildInternal):
(WebCore::RenderElement::removeChildInternal):
(WebCore::RenderElement::willBeDestroyed):
(WebCore::RenderElement::rendererForRootBackground):
* rendering/RenderImageResource.cpp:
(WebCore::RenderImageResource::initialize):
* rendering/RenderImageResource.h:
* rendering/RenderImageResourceStyleImage.cpp:
(WebCore::RenderImageResourceStyleImage::initialize):
* rendering/RenderImageResourceStyleImage.h:
(WebCore::RenderImageResourceStyleImage::create):
* rendering/RenderLayerCompositor.cpp:
(WebCore::RenderLayerCompositor::shouldPropagateCompositingToEnclosingFrame):
(WebCore::RenderLayerCompositor::requiresCompositingLayer):
(WebCore::RenderLayerCompositor::canBeComposited):
(WebCore::RenderLayerCompositor::requiresOwnBackingStore):
(WebCore::RenderLayerCompositor::reasonsForCompositing):
(WebCore::RenderLayerCompositor::requiresCompositingForTransform):
(WebCore::RenderLayerCompositor::requiresCompositingForVideo):
(WebCore::RenderLayerCompositor::requiresCompositingForCanvas):
(WebCore::RenderLayerCompositor::requiresCompositingForPlugin):
(WebCore::RenderLayerCompositor::requiresCompositingForFrame):
(WebCore::RenderLayerCompositor::requiresCompositingForAnimation):
(WebCore::RenderLayerCompositor::requiresCompositingForIndirectReason):
(WebCore::RenderLayerCompositor::requiresCompositingForFilters):
(WebCore::RenderLayerCompositor::requiresCompositingForBlending):
(WebCore::RenderLayerCompositor::requiresCompositingForPosition):
(WebCore::RenderLayerCompositor::isRunningAcceleratedTransformAnimation):
* rendering/RenderLayerCompositor.h:
* rendering/RenderObject.cpp:
(WebCore::RenderObject::containingBlock):
(WebCore::mustRepaintFillLayers):
(WebCore::RenderObject::borderImageIsLoadedAndCanBeRendered):
(WebCore::RenderObject::willBeDestroyed):
* rendering/RenderScrollbarPart.cpp:
(WebCore::RenderScrollbarPart::rendererOwningScrollbar):
* rendering/RenderScrollbarPart.h:
* rendering/RenderTableCell.cpp:
(WebCore::RenderTableCell::paintBackgroundsBehindCell):
* rendering/RenderTableCell.h:
* rendering/RenderView.cpp:
(WebCore::RenderView::RenderView):
* rendering/style/FillLayer.cpp:
(WebCore::FillLayer::hasOpaqueImage):
* rendering/style/FillLayer.h:
* rendering/style/KeyframeList.h:
(WebCore::KeyframeList::KeyframeList):
* rendering/style/StyleCachedImage.cpp:
(WebCore::StyleCachedImage::imageSize):
(WebCore::StyleCachedImage::computeIntrinsicDimensions):
(WebCore::StyleCachedImage::setContainerSizeForRenderer):
(WebCore::StyleCachedImage::addClient):
(WebCore::StyleCachedImage::removeClient):
(WebCore::StyleCachedImage::image):
(WebCore::StyleCachedImage::knownToBeOpaque):
* rendering/style/StyleCachedImage.h:
* rendering/style/StyleCachedImageSet.cpp:
(WebCore::StyleCachedImageSet::imageSize):
(WebCore::StyleCachedImageSet::computeIntrinsicDimensions):
(WebCore::StyleCachedImageSet::setContainerSizeForRenderer):
(WebCore::StyleCachedImageSet::addClient):
(WebCore::StyleCachedImageSet::removeClient):
(WebCore::StyleCachedImageSet::image):
(WebCore::StyleCachedImageSet::knownToBeOpaque):
* rendering/style/StyleCachedImageSet.h:
* rendering/style/StyleGeneratedImage.cpp:
(WebCore::StyleGeneratedImage::imageSize):
(WebCore::StyleGeneratedImage::computeIntrinsicDimensions):
(WebCore::StyleGeneratedImage::addClient):
(WebCore::StyleGeneratedImage::removeClient):
(WebCore::StyleGeneratedImage::image):
(WebCore::StyleGeneratedImage::knownToBeOpaque):
* rendering/style/StyleGeneratedImage.h:
* rendering/style/StyleImage.h:
(WebCore::StyleImage::imagesEquivalent):
* rendering/style/StylePendingImage.h:
(WebCore::StylePendingImage::cssImageValue):
(WebCore::StylePendingImage::cssImageGeneratorValue):
(WebCore::StylePendingImage::cssCursorImageValue):
(WebCore::StylePendingImage::cssImageSetValue):
(WebCore::StylePendingImage::computeIntrinsicDimensions):
* testing/Internals.cpp:
(WebCore::Internals::boundingBox):
(WebCore::Internals::isSelectPopupVisible):
(WebCore::Internals::isPluginUnavailabilityIndicatorObscured):
Use RenderElement instead of RenderObject where it was easy to do so.
For local variables holding the return value of renderer() functions,
use auto instead, so the most-specific possible type will be used,
without having to figure out what that is in each case. Also use some
more OVERRIDE and FINAL and use nullptr instead of 0. And replace some
cryptic short local variable names with words.
2013-09-29 Philip Rogers <pdr@google.com>
Repaint borders and outlines on pseudo content changes
https://bugs.webkit.org/show_bug.cgi?id=122070
Reviewed by Andreas Kling.
This patch fixes a regression from wkrev.com/150259 where pseudo content with
borders or outlines would fail to repaint if the color property changed.
The root bug is that border-color and outline-color properties use 'color' if
no explicit border-color or outline-color are given, and changing color should
repaint borders and outlines even if the text content is empty.
Relevant spec sections:
border: http://www.w3.org/TR/CSS1/#border-color
outline: http://www.w3.org/TR/CSS2/ui.html#propdef-outline-color
This patch also renames StyleDifferenceRepaintIfText to
StyleDifferenceRepaintIfTextOrBorderOrOutline and updates the relevant functions.
Test: fast/repaint/hover-pseudo-borders.html
* rendering/RenderElement.cpp:
(WebCore::RenderElement::hasImmediateNonWhitespaceTextChildOrBorderOrOutline):
This function has been renamed to reflect that it returns true for borders
or outlines as well.
(WebCore::RenderElement::shouldRepaintForStyleDifference):
* rendering/RenderElement.h:
* rendering/style/RenderStyle.cpp:
(WebCore::RenderStyle::changeRequiresRepaintIfTextOrBorderOrOutline):
(WebCore::RenderStyle::diff):
* rendering/style/RenderStyle.h:
* rendering/style/RenderStyleConstants.h:
* rendering/svg/SVGResourcesCache.cpp:
(WebCore::SVGResourcesCache::clientStyleChanged):
These have also been renamed to reflect the new borders and outlines check.
2013-09-29 Antti Koivisto <antti@apple.com>
Tighten typing in inline rendering
https://bugs.webkit.org/show_bug.cgi?id=122076
Reviewed by Andreas Kling.
More RenderElement, const, &, etc.
* dom/Position.cpp:
(WebCore::Position::hasRenderedNonAnonymousDescendantsWithHeight):
* rendering/InlineFlowBox.cpp:
(WebCore::isLastChildForRenderer):
(WebCore::isAncestorAndWithinBlock):
(WebCore::InlineFlowBox::determineSpacingForFlowBoxes):
(WebCore::InlineFlowBox::nodeAtPoint):
* rendering/InlineIterator.h:
(WebCore::InlineIterator::InlineIterator):
(WebCore::InlineIterator::root):
(WebCore::isEmptyInline):
(WebCore::bidiNextShared):
(WebCore::bidiNextSkippingEmptyInlines):
(WebCore::bidiNextIncludingEmptyInlines):
(WebCore::bidiFirstSkippingEmptyInlines):
* rendering/RenderBlockLineLayout.cpp:
(WebCore::inlineLogicalWidth):
(WebCore::alwaysRequiresLineBox):
(WebCore::requiresLineBox):
(WebCore::canBreakAtThisPosition):
(WebCore::LineBreaker::nextSegmentBreak):
* rendering/shapes/ShapeInsideInfo.h:
(WebCore::LineSegmentIterator::LineSegmentIterator):
2013-09-28 Sam Weinig <sam@webkit.org>
Merge ScriptControllerBase into ScriptController
https://bugs.webkit.org/show_bug.cgi?id=122071
Reviewed by Antti Koivisto.
There is no need for ScriptControllerBase. Remove it.
* CMakeLists.txt:
* GNUmakefile.list.am:
* Target.pri:
* WebCore.vcxproj/WebCore.vcxproj:
* WebCore.vcxproj/WebCore.vcxproj.filters:
* WebCore.xcodeproj/project.pbxproj:
* bindings/ScriptControllerBase.cpp: Removed.
* bindings/ScriptControllerBase.h: Removed.
* bindings/js/ScriptController.cpp:
(WebCore::ScriptController::canExecuteScripts):
(WebCore::ScriptController::executeScript):
(WebCore::ScriptController::executeIfJavaScriptURL):
* bindings/js/ScriptController.h:
2013-09-28 Zan Dobersek <zdobersek@igalia.com>
Unreviewed build fix after r156613 for ports enabling CSS3_TEXT.
* rendering/RenderBlockLineLayout.cpp:
(WebCore::requiresIndent): Use the RenderStyle reference.
2013-09-28 Antti Koivisto <antti@apple.com>
Switch inline boxes to use const RenderStyle&
https://bugs.webkit.org/show_bug.cgi?id=122068
Reviewed by Sam Weinig.
2013-09-28 Antti Koivisto <antti@apple.com>
Add first()/last() to ElementIteratorAdapters
https://bugs.webkit.org/show_bug.cgi?id=122067
Reviewed by Darin Adler.
Add a convenient way for getting the first and last element if it exists.
Use it in some places.
* accessibility/AccessibilityNodeObject.cpp:
(WebCore::AccessibilityNodeObject::canvasHasFallbackContent):
* css/CSSFontFaceSource.cpp:
(WebCore::CSSFontFaceSource::getFontData):
* dom/Document.cpp:
(WebCore::Document::childrenChanged):
(WebCore::Document::removeTitle):
* dom/ElementChildIterator.h:
(WebCore::::first):
(WebCore::::last):
* dom/ElementDescendantIterator.h:
(WebCore::::first):
(WebCore::::last):
* html/HTMLFieldSetElement.cpp:
(WebCore::HTMLFieldSetElement::legend):
* html/HTMLLegendElement.cpp:
(WebCore::HTMLLegendElement::associatedControl):
* html/HTMLMediaElement.cpp:
(WebCore::HTMLMediaElement::finishParsingChildren):
(WebCore::HTMLMediaElement::selectMediaResource):
* svg/SVGElement.cpp:
(WebCore::SVGElement::title):
* svg/SVGFontFaceElement.cpp:
(WebCore::SVGFontFaceElement::rebuildFontFace):
* svg/graphics/SVGImage.cpp:
(WebCore::SVGImage::hasSingleSecurityOrigin):
2013-09-28 Mark Rowe <mrowe@apple.com>
Fix some failures with newer versions of clang.
Some CoreGraphics headers generate warnings under newer versions of clang. Since they're system headers the warnings would
usually be suppressed, but we're adding the frameworks to the non-system framework search path so they're no longer treated
as system headers. We address this by removing the system paths from FRAMEWORK_SEARCH_PATHS and using the -iframework compiler
flag in OTHER_CFLAGS to add the paths to the system framework search path. We have to set OTHER_CFLAGS at the target level
in order for it to coexist with the ASAN-related OTHER_CFLAGS that's set in DebugRelease.xcconfig.
Reviewed by Dan Bernstein.
* Configurations/WebCore.xcconfig:
2013-09-28 Mark Rowe <mrowe@apple.com>
Take Xcode's advice and enable some extra warnings.
Reviewed by Sam Weinig.
* Configurations/Base.xcconfig:
* WebCore.xcodeproj/project.pbxproj:
* dom/NamedNodeMap.cpp:
(WebCore::NamedNodeMap::removeNamedItemNS): Use the correct constant.
2013-09-28 Sam Weinig <sam@webkit.org>
CTTE: VisitedLinkState should hold a Document&
https://bugs.webkit.org/show_bug.cgi?id=122066
Reviewed by Antti Koivisto.
The Document can never be null, so use a reference.
2013-09-27 Antti Koivisto <antti@apple.com>
Clean up code for getting first line style
https://bugs.webkit.org/show_bug.cgi?id=122037
Reviewed by Andreas Kling.
We have confusing RenderObject::style(bool firstLine). Get rid of it in favour of
just using RenderObject::firstLineStyle() where appropriate.
Also switch to RenderStyle references in many places and move first line style caching
code down to RenderElement.
2013-09-28 Darin Adler <darin@apple.com>
Add Frame::mainFrame and Frame::isMainFrame
https://bugs.webkit.org/show_bug.cgi?id=122064
Reviewed by Andreas Kling.
* WebCore.exp.in: Removed exports of FrameView::isMainFrameView and
Page::frameIsMainFrame. Since the new isMainFrame function is inline, it
does not need to be exported.
* history/PageCache.cpp:
(WebCore::PageCache::markPagesForFullStyleRecalc):
(WebCore::PageCache::markPagesForDeviceScaleChanged):
These two were the only functions I found that really wanted the equivalent
of Page::frameIsMainFrame, so wrote it out here instead of using a function
call.
* inspector/InspectorAgent.cpp: Removed the unused isMainResourceLoader function.
* inspector/InspectorAgent.h: Removed declarations of a few nonexistent or
unused private member functions. Also removed the InjectedScriptForOriginMap
typedef: It's mor readable to use the type directly
* loader/FrameLoader.h: Removed isLoadingMainFrame. It's not better than
calling frame().isMainFrame() directly.
* page/Frame.cpp:
(WebCore::Frame::Frame): Initialize m_mainFrame and call selfOnlyRef, keeping
the MainFrame alive as long as any of its subframes is alive.
(WebCore::Frame::~Frame): Call selfOnlyDeref.
(WebCore::Frame::createView): Use isMainFrame.
(WebCore::Frame::setPageAndTextZoomFactors): Ditto.
* page/Frame.h: Added Frame::mainFrame, Frame::isMainFrame, and Frame::m_mainFrame.
* page/FrameView.h: Removed the isMainFrameView function. It's not better than
calling frame().isMainFrame() directly.
* page/MainFrame.cpp:
(WebCore::MainFrame::MainFrame): Initialize m_selfOnlyRefCount to 0.
(WebCore::MainFrame::selfOnlyRef): Added.
(WebCore::MainFrame::selfOnlyDeref): Added.
(WebCore::MainFrame::dropChildren): Added. Called when the self-only reference
count reaches 0 to avoid a reference cycle with subframes.
* page/MainFrame.h: Added new data members as mentioned above. Also, the
definition of the Frame::isMainFrame inline function goes here, since it can't
compile without the MainFrame class definition. This means that callers of
isMainFrame need to include MainFrame.h, which seems reasonable and is easy
to do.
* page/Page.cpp:
* page/Page.h: Added assertion to Page::mainFrame since it returns a reference.
Removed Page::frameIsMainFrame since it's not better than calling isMainFrame
on the frame.
* dom/Document.cpp:
(WebCore::Document::setVisualUpdatesAllowed):
(WebCore::Document::didBecomeCurrentDocumentInFrame):
(WebCore::Document::updateViewportArguments):
(WebCore::Document::setInPageCache):
(WebCore::Document::ensurePlugInsInjectedScript):
* history/CachedFrame.cpp:
(WebCore::CachedFrame::CachedFrame):
* history/CachedPage.cpp:
(WebCore::CachedPage::restore):
* html/HTMLPlugInImageElement.cpp:
(WebCore::HTMLPlugInImageElement::subframeLoaderWillCreatePlugIn):
* html/ImageDocument.cpp:
(WebCore::ImageDocument::shouldShrinkToFit):
* inspector/InspectorController.cpp:
(WebCore::InspectorController::didClearWindowObjectInWorld):
* inspector/InspectorInstrumentation.cpp:
(WebCore::InspectorInstrumentation::didCommitLoadImpl):
* inspector/InspectorPageAgent.cpp:
(WebCore::InspectorPageAgent::didClearWindowObjectInWorld):
(WebCore::InspectorPageAgent::frameNavigated):
* loader/DocumentLoader.cpp:
(WebCore::DocumentLoader::willSendRequest):
* loader/FrameLoader.cpp:
(WebCore::FrameLoader::transitionToCommitted):
(WebCore::FrameLoader::prepareForCachedPageRestore):
(WebCore::FrameLoader::checkLoadCompleteForThisFrame):
(WebCore::FrameLoader::didLayout):
(WebCore::FrameLoader::checkLoadComplete):
(WebCore::FrameLoader::addExtraFieldsToRequest):
(WebCore::FrameLoader::loadResourceSynchronously):
(WebCore::FrameLoader::continueLoadAfterNavigationPolicy):
(WebCore::FrameLoader::dispatchDidCommitLoad):
(WebCore::FrameLoader::loadProgressingStatusChanged):
* loader/HistoryController.cpp:
(WebCore::HistoryController::saveScrollPositionAndViewStateToItem):
(WebCore::HistoryController::restoreScrollPositionAndViewState):
(WebCore::HistoryController::updateForCommit):
(WebCore::HistoryController::updateForSameDocumentNavigation):
(WebCore::HistoryController::updateBackForwardListClippedAtTarget):
(WebCore::HistoryController::pushState):
* loader/icon/IconController.cpp:
(WebCore::IconController::startLoader):
* page/AutoscrollController.cpp:
(WebCore::AutoscrollController::stopAutoscrollTimer):
* page/ContextMenuController.cpp:
(WebCore::ContextMenuController::populate):
* page/DOMWindow.cpp:
(WebCore::allowsBeforeUnloadListeners):
(WebCore::DOMWindow::focus):
(WebCore::DOMWindow::blur):
(WebCore::DOMWindow::close):
(WebCore::DOMWindow::allowedToChangeWindowGeometry):
* page/EventHandler.cpp:
(WebCore::EventHandler::hitTestResultAtPoint):
(WebCore::EventHandler::selectCursor):
(WebCore::EventHandler::handleMousePressEvent):
(WebCore::EventHandler::keyEvent):
* page/FrameTree.cpp:
(WebCore::FrameTree::find):
(WebCore::FrameTree::traverseNextWithWrap):
* page/FrameView.cpp:
(WebCore::FrameView::FrameView):
(WebCore::FrameView::setFrameRect):
(WebCore::FrameView::createScrollbar):
(WebCore::FrameView::applyOverflowToViewport):
(WebCore::FrameView::setHeaderHeight):
(WebCore::FrameView::setFooterHeight):
(WebCore::FrameView::minimumScrollPosition):
(WebCore::FrameView::maximumScrollPosition):
(WebCore::FrameView::shouldUpdateFixedElementsAfterScrolling):
(WebCore::FrameView::beginDeferredRepaints):
(WebCore::FrameView::endDeferredRepaints):
(WebCore::FrameView::performPostLayoutTasks):
(WebCore::FrameView::sendResizeEventIfNeeded):
(WebCore::FrameView::pagination):
(WebCore::FrameView::visibleContentScaleFactor):
(WebCore::FrameView::setVisibleScrollerThumbRect):
(WebCore::FrameView::scrollbarStyleChanged):
(WebCore::FrameView::paintScrollCorner):
(WebCore::FrameView::paintScrollbar):
(WebCore::FrameView::paintOverhangAreas):
* page/scrolling/ScrollingCoordinator.cpp:
(WebCore::ScrollingCoordinator::coordinatesScrollingForFrameView):
* rendering/RenderLayerBacking.cpp:
(WebCore::RenderLayerBacking::RenderLayerBacking):
Use the new functions where possible instead of Page::frameIsMainFrame,
Page::mainFrame, FrameLoader::isLoadingMainFrame, and FrameView::isMainFrameView.
2013-09-28 Gurpreet Kaur <k.gurpreet@samsung.com>
filter: drop-shadow doesnot support viewport units
https://bugs.webkit.org/show_bug.cgi?id=122053
Reviewed by Darin Adler.
drop-shadow properties were not applied incase its values
were given in vh, vw, vmax, vmin units.
Tests: fast/css/drop-shadow-viewport-height.html
fast/css/drop-shadow-viewport-vmax.html
fast/css/drop-shadow-viewport-vmin.html
fast/css/drop-shadow-viewport-width.html
* css/StyleResolver.cpp:
(WebCore::StyleResolver::createFilterOperations):
Calculating the drop-shadow values which has been specified in viewport
units.The vh/vw units are calcultated as percent of viewport height and
viewport width respectively. 1vmax: 1vw or 1vh, whatever is largest.
1vmin: 1vw or 1vh, whatever is smallest.
2013-09-28 Gurpreet Kaur <k.gurpreet@samsung.com>
REGRESSION (r154614): Setting the document scroll position isn't symmetric; can successfully set document.body.scrollTop, but can only read from document.documentElement.scrollTop
https://bugs.webkit.org/show_bug.cgi?id=121876
Reviewed by Darin Adler.
Non-Quirks mode should set/get scrolltop/scrollleft through
document.documentElement.scrollTop/document.documentElement.scrollLeft
Quirks mode should set/get scrolltop/scrollleft through
document.body.scrollTop/document.body.scrollLeft.
Tests: fast/dom/Element/body-scrollLeft-Quirks.html
fast/dom/Element/body-scrollLeft.html
fast/dom/Element/body-scrollTop-Quirks.html
fast/dom/Element/body-scrollTop.html
fast/dom/Element/documentElement-scrollLeft-Quirks.html
fast/dom/Element/documentElement-scrollLeft.html
fast/dom/Element/documentElement-scrollTop-Quirks.html
fast/dom/Element/documentElement-scrollTop.html
* dom/Element.cpp:
(WebCore::Element::setScrollLeft):
(WebCore::Element::setScrollTop):
* html/HTMLBodyElement.cpp:
(WebCore::HTMLBodyElement::setScrollLeft):
(WebCore::HTMLBodyElement::setScrollTop):
Need to set the scrollTop and scrollLeft after checking if document
is in quirks or non-quirks mode. Incase it is body.scrollLeft/
body.scrollTop set only if document is in quirks mode. If document is
non-quirks mode set documentElement.scrollLeft/documentElement.scrollTop.
2013-09-28 Andreas Kling <akling@apple.com>
Pass VM instead of ExecState to JSFunction constructors.
<https://webkit.org/b/122014>
Reviewed by Geoffrey Garen.
Updated for new JSFunction::create() signature.
2013-09-28 Gyuyoung Kim <gyuyoung.kim@samsung.com>
Generate toCSSFooValue() for CSSImageValue
https://bugs.webkit.org/show_bug.cgi?id=122051
Reviewed by Andreas Kling.
Clean up static_cast<CSSImageValue*> type casts. It will help to
detect bad cast as well as improve code readability.
Removed unnecessary local variables as well.
No new tests, no behavior changes.
* css/CSSCrossfadeValue.cpp:
(WebCore::subimageKnownToBeOpaque):
* css/CSSCursorImageValue.cpp:
(WebCore::CSSCursorImageValue::~CSSCursorImageValue):
(WebCore::CSSCursorImageValue::updateIfSVGCursorIsUsed):
(WebCore::CSSCursorImageValue::cachedImage):
(WebCore::CSSCursorImageValue::isSVGCursor):
* css/CSSImageGeneratorValue.cpp:
(WebCore::CSSImageGeneratorValue::subimageIsPending):
(WebCore::CSSImageGeneratorValue::cachedImageForCSSValue):
* css/CSSImageSetValue.cpp:
(WebCore::CSSImageSetValue::fillImageSet):
* css/CSSImageValue.h:
* css/CSSValue.cpp:
(WebCore::CSSValue::destroy):
* css/StyleResolver.cpp:
(WebCore::StyleResolver::applyProperty):
(WebCore::StyleResolver::styleImage):
* page/PageSerializer.cpp:
(WebCore::PageSerializer::retrieveResourcesForProperties):
* rendering/style/StylePendingImage.h:
(WebCore::StylePendingImage::data):
(WebCore::StylePendingImage::cssImageValue):
2013-09-28 Mark Rowe <mrowe@apple.com>
WebCore fails to build with newer versions of clang.
Reviewed by Sam Weinig.
* Modules/indexeddb/IDBIndex.cpp: Remove an unused constant.
* Modules/indexeddb/IDBObjectStore.cpp: Ditto.
* Modules/webaudio/AudioContext.cpp: Ditto.
* Modules/webaudio/ScriptProcessorNode.cpp: Ditto.
* Modules/webdatabase/SQLResultSet.cpp: Ditto.
* Modules/webdatabase/SQLTransactionBackend.cpp: Ditto.
* Modules/websockets/WebSocketHandshake.cpp: Ditto.
* bindings/objc/DOM.mm: Disable a warning about overriding a protocol method in a cateogry around the one
place we do it. I don't understand why this generates a warning, nor can I see a different approach that
would not result in the warning being emitted.
* css/CSSGrammar.y.in: #if a function that's only used inside an #if.
* html/track/TextTrackCue.cpp: Remove an unused constant.
* loader/TextResourceDecoder.cpp: Remove two unused functions.
* page/ContentSecurityPolicy.cpp: Add #if's around constants and functions that are only used when CSP_NEXT is enabled.
(WebCore::CSPDirectiveList::checkSourceAndReportViolation): Reorder the ifs slightly to make the #if'ing easier.
* page/ContentSecurityPolicy.h: Add #if's around functions that are only used when CSP_NEXT is enabled.
* page/DOMSecurityPolicy.cpp: Ditto.
* page/DOMSecurityPolicy.h: Ditto.
* page/animation/CSSPropertyAnimation.cpp: Remove an unused function.
* platform/mac/DisplaySleepDisabler.cpp: Add an #if around a constant that's only used on iOS.
* platform/mac/WebCoreFullScreenWarningView.mm: Remove three unused constants.
* rendering/RenderLayer.cpp: Remove two unused constants.
* rendering/RenderLayerCompositor.cpp:
(WebCore::compositingLogEnabled): Move the #if around the function definition.
* svg/SVGAnimatedAngle.cpp: Remove an unused function.
* svg/SVGUseElement.cpp: #if a function that's only used inside an ASSERT.
* xml/XPathStep.cpp: Ditto.
2013-09-27 Brady Eidson <beidson@apple.com>
IndexedDB IDL Refactoring.
https://bugs.webkit.org/show_bug.cgi?id=121996
Reviewed by Alexey Proskuryakov.
This includes:
1 - Leveraging EventTarget.idl inheritance
2 - Removing comments
3 - Reordering to match the spec's IDLs
4 - Removing nonstandard, WebKit-specific methods
5 - Updating interfaces to match the spec (versions are only uint64_t's now...)
6 - Updating implementation code as needed (versions are only uint64_t's now...)
IDL changes:
* Modules/indexeddb/IDBCursor.idl:
* Modules/indexeddb/IDBDatabase.idl:
* Modules/indexeddb/IDBFactory.idl:
* Modules/indexeddb/IDBIndex.idl:
* Modules/indexeddb/IDBKeyRange.idl:
* Modules/indexeddb/IDBObjectStore.idl:
* Modules/indexeddb/IDBRequest.idl:
* Modules/indexeddb/IDBTransaction.idl:
* Modules/indexeddb/IDBVersionChangeEvent.idl:
* Modules/indexeddb/IndexedDB.h: Add new enum to represent version nullness.
Adapt to new IDLs, and also refactor representation of initial, null versioning:
* Modules/indexeddb/IDBCallbacks.h:
(WebCore::IDBCallbacks::onBlocked):
(WebCore::IDBCallbacks::onUpgradeNeeded):
* Modules/indexeddb/IDBDatabase.cpp:
(WebCore::IDBDatabase::version):
(WebCore::IDBDatabase::onVersionChange):
* Modules/indexeddb/IDBDatabase.h:
* Modules/indexeddb/IDBDatabaseCallbacks.h:
* Modules/indexeddb/IDBDatabaseCallbacksImpl.cpp:
(WebCore::IDBDatabaseCallbacksImpl::onVersionChange):
* Modules/indexeddb/IDBDatabaseCallbacksImpl.h:
* Modules/indexeddb/IDBFactory.cpp:
(WebCore::IDBFactory::open):
(WebCore::IDBFactory::openInternal):
(WebCore::IDBFactory::deleteDatabase):
* Modules/indexeddb/IDBFactory.h:
* Modules/indexeddb/IDBMetadata.h:
(WebCore::IDBDatabaseMetadata::IDBDatabaseMetadata):
* Modules/indexeddb/IDBOpenDBRequest.cpp:
(WebCore::IDBOpenDBRequest::create):
(WebCore::IDBOpenDBRequest::IDBOpenDBRequest):
(WebCore::IDBOpenDBRequest::onBlocked):
(WebCore::IDBOpenDBRequest::onUpgradeNeeded):
* Modules/indexeddb/IDBOpenDBRequest.h:
* Modules/indexeddb/IDBRequest.cpp:
* Modules/indexeddb/IDBRequest.h:
* Modules/indexeddb/IDBTransaction.cpp:
* Modules/indexeddb/IDBTransaction.h:
* Modules/indexeddb/IDBVersionChangeEvent.cpp:
(WebCore::IDBVersionChangeEvent::IDBVersionChangeEvent):
* Modules/indexeddb/IDBVersionChangeEvent.h:
(WebCore::IDBVersionChangeEvent::create):
(WebCore::IDBVersionChangeEvent::oldVersion):
(WebCore::IDBVersionChangeEvent::newVersion):
Keep leveldb building with minimal adaptations to the new IDLs,
but note that the LevelDB implementation is now incompatible with the spec:
* Modules/indexeddb/leveldb/IDBBackingStoreLevelDB.cpp:
(WebCore::IDBBackingStore::getIDBDatabaseMetaData):
(WebCore::objectStoreCursorOptions):
(WebCore::indexCursorOptions):
* Modules/indexeddb/leveldb/IDBDatabaseBackendLevelDB.cpp:
(WebCore::IDBDatabaseBackendLevelDB::IDBDatabaseBackendLevelDB):
(WebCore::IDBDatabaseBackendLevelDB::openInternal):
(WebCore::IDBDatabaseBackendLevelDB::VersionChangeOperation::perform):
(WebCore::IDBDatabaseBackendLevelDB::processPendingCalls):
(WebCore::IDBDatabaseBackendLevelDB::openConnection):
(WebCore::IDBDatabaseBackendLevelDB::runIntVersionChangeTransaction):
(WebCore::IDBDatabaseBackendLevelDB::deleteDatabase):
(WebCore::IDBDatabaseBackendLevelDB::deleteDatabaseFinal):
(WebCore::IDBDatabaseBackendLevelDB::VersionChangeAbortOperation::perform):
* Modules/indexeddb/leveldb/IDBLevelDBCoding.cpp:
(WebCore::IDBLevelDBCoding::compareEncodedIDBKeys):
* inspector/InspectorIndexedDBAgent.cpp: Update for metadata change.
2013-09-27 Enrica Casucci <enrica@apple.com>
Upstream changes to Pasteboard implementation for iOS.
https://bugs.webkit.org/show_bug.cgi?id=121818
Reviewed by Benjamin Poulain.
* WebCore.exp.in:
* editing/Editor.cpp:
(WebCore::Editor::dispatchCPPEvent):
* editing/ios/EditorIOS.mm:
(WebCore::Editor::WebContentReader::addFragment):
(WebCore::Editor::WebContentReader::readWebArchive):
(WebCore::Editor::WebContentReader::readFilenames):
(WebCore::Editor::WebContentReader::readHTML):
(WebCore::Editor::WebContentReader::readRTFD):
(WebCore::Editor::WebContentReader::readRTF):
(WebCore::uniqueURLWithRelativePart):
(WebCore::Editor::WebContentReader::readImage):
(WebCore::Editor::WebContentReader::readURL):
(WebCore::Editor::WebContentReader::readPlainText):
(WebCore::Editor::webContentFromPasteboard):
(WebCore::Editor::pasteWithPasteboard):
(WebCore::Editor::createFragmentAndAddResources):
(WebCore::Editor::createFragmentForImageResourceAndAddResource):
* platform/Pasteboard.h:
* platform/PasteboardStrategy.h:
* platform/PlatformPasteboard.h:
* platform/ios/PasteboardIOS.mm:
(WebCore::PasteboardWebContent::PasteboardWebContent):
(WebCore::PasteboardWebContent::~PasteboardWebContent):
(WebCore::PasteboardImage::PasteboardImage):
(WebCore::PasteboardImage::~PasteboardImage):
(WebCore::Pasteboard::Pasteboard):
(WebCore::Pasteboard::clear):
(WebCore::Pasteboard::readString):
(WebCore::Pasteboard::writeString):
(WebCore::Pasteboard::types):
* platform/ios/PlatformPasteboardIOS.mm:
(WebCore::PlatformPasteboard::changeCount):
(WebCore::PlatformPasteboard::write):
(WebCore::PlatformPasteboard::count):
(WebCore::PlatformPasteboard::readBuffer):
(WebCore::PlatformPasteboard::readString):
(WebCore::PlatformPasteboard::readURL):
* platform/mac/PasteboardMac.mm:
(WebCore::PasteboardWebContent::PasteboardWebContent):
(WebCore::PasteboardWebContent::~PasteboardWebContent):
(WebCore::PasteboardImage::PasteboardImage):
(WebCore::PasteboardImage::~PasteboardImage):
* platform/mac/PlatformPasteboardMac.mm:
2013-09-27 Hans Muller <hmuller@adobe.com>
Crash on shape-outside when using calc()
https://bugs.webkit.org/show_bug.cgi?id=121020
Reviewed by Dirk Schulze.
This change prevents a crash caused by specifying a CSS Shape geometry
Length attribute with a calc() expression. It adds support for converting
Lengths to CSSPrimitive Values, in large part by migrating Blink changes
made to the calc classes since the split. Doing so required a few supporting
changes in some related classes, notably CSSPrimitiveValue.
Tests: fast/shapes/shape-inside/shape-inside-calc-crash.html
css3/calc/simplification.html
* css/BasicShapeFunctions.cpp:
(WebCore::convertToCSSPrimitiveValue): Effectively use the new CSSPrimtiveValue(length,style) constructor to convert Lengths to CSSValues.
(WebCore::valueForBasicShape): Use the convertToCSSPrimitiveValue() function.
(WebCore::convertToLength): Added the CalculatedConversion convertToLength() flag to enable support for calc() valued Length Shape attributes.
* css/BasicShapeFunctions.h:
* css/CSSCalculationValue.cpp:
(WebCore::hasDoubleValue):
(WebCore::buildCssText):
(WebCore::CSSCalcValue::clampToPermittedRange):
(WebCore::CSSCalcValue::doubleValue):
(WebCore::CSSCalcExpressionNode::~CSSCalcExpressionNode):
(WebCore::CSSCalcPrimitiveValue::create):
(WebCore::CSSCalcPrimitiveValue::toCalcValue):
(WebCore::CSSCalcPrimitiveValue::doubleValue):
(WebCore::CSSCalcPrimitiveValue::computeLengthPx):
(WebCore::CSSCalcPrimitiveValue::primitiveType):
(WebCore::CSSCalcPrimitiveValue::CSSCalcPrimitiveValue):
(WebCore::determineCategory):
(WebCore::isIntegerResult):
(WebCore::CSSCalcBinaryOperation::create):
(WebCore::CSSCalcBinaryOperation::createSimplified):
(WebCore::CSSCalcBinaryOperation::doubleValue):
(WebCore::CSSCalcBinaryOperation::buildCssText):
(WebCore::CSSCalcBinaryOperation::primitiveType):
(WebCore::CSSCalcBinaryOperation::CSSCalcBinaryOperation):
(WebCore::CSSCalcBinaryOperation::getNumberSide):
(WebCore::CSSCalcBinaryOperation::evaluate):
(WebCore::CSSCalcBinaryOperation::evaluateOperator):
(WebCore::CSSCalcExpressionNodeParser::parseValue):
(WebCore::CSSCalcExpressionNodeParser::parseValueTerm):
(WebCore::CSSCalcExpressionNodeParser::parseValueMultiplicativeExpression):
(WebCore::CSSCalcExpressionNodeParser::parseAdditiveValueExpression):
(WebCore::CSSCalcValue::createExpressionNode):
(WebCore::CSSCalcValue::create):
* css/CSSCalculationValue.h:
(WebCore::CSSCalcExpressionNode::category):
(WebCore::CSSCalcValue::create):
(WebCore::CSSCalcValue::isInt):
(WebCore::CSSCalcValue::permittedValueRange):
(WebCore::CSSCalcValue::expressionNode):
(WebCore::CSSCalcValue::CSSCalcValue):
(WebCore::toCSSCalcValue):
* css/CSSComputedStyleDeclaration.cpp:
(WebCore::ComputedStyleExtractor::propertyValue): Pass the style along to the new valueForBasicShape() function.
* css/CSSPrimitiveValue.cpp:
(WebCore::CSSPrimitiveValue::unitCategory): Made this function public so that CSSCalculationValue could use it.
(WebCore::CSSPrimitiveValue::conversionToCanonicalUnitsScaleFactor): Ditto.
(WebCore::CSSPrimitiveValue::primitiveType): Cleared trailing whitespace.
(WebCore::CSSPrimitiveValue::CSSPrimitiveValue): Construct a CSSPrimitiveValue from a Length and a RenderStyle*.
(WebCore::CSSPrimitiveValue::init): The common part of the two Length CSSPrimitiveValue constructors.
(WebCore::CSSPrimitiveValue::computeLengthDouble): Moved the case labels to the left per check-webkit-style.
(WebCore::CSSPrimitiveValue::getStringValue): Ditto.
(WebCore::CSSPrimitiveValue::getDoubleValue): Removed trailing whitespace.
* css/CSSPrimitiveValue.h:
(WebCore::CSSPrimitiveValue::create): Construct a CSSPrimitiveValue from a Length and a RenderStyle*.
(WebCore::toCSSPrimitiveValue): Check the CSSValue*'s validity with ASSERT_WITH_SECURITY_IMPLICATION before casting to CSSPrimitiveValue*.
* css/CSSValuePool.h:
(WebCore::CSSValuePool::createValue): A new overload that delegates to the new CSSPrimitiveValue(length,style) constructor.
* platform/CalculationValue.h:
(WebCore::CalculationValue::operator==):
(WebCore::CalculationValue::isNonNegative):
(WebCore::CalculationValue::expression):
(WebCore::CalcExpressionNumber::value):
(WebCore::toCalcExpressionNumber):
(WebCore::CalcExpressionLength::CalcExpressionLength):
(WebCore::CalcExpressionLength::length):
(WebCore::toCalcExpressionLength):
(WebCore::CalcExpressionBinaryOperation::leftSide):
(WebCore::CalcExpressionBinaryOperation::rightSide):
(WebCore::CalcExpressionBinaryOperation::getOperator):
(WebCore::toCalcExpressionBinaryOperation):
(WebCore::CalcExpressionBlendLength::CalcExpressionBlendLength):
(WebCore::CalcExpressionBlendLength::from):
(WebCore::CalcExpressionBlendLength::to):
(WebCore::CalcExpressionBlendLength::progress):
(WebCore::toCalcExpressionBlendLength):
2013-09-27 Andreas Kling <akling@apple.com>
REGRESSION(r154219): 30% more malloc memory used on html5-full-render.
<https://webkit.org/b/122034>
Reviewed by Antti Koivisto.
canExecuteScripts() used to rely on Frame::settings() returning null
when the Frame was disconnected from its Page, and giving Frame its
own handle on the Settings broke this mechanism.
This caused us to hold on for some objects for a bit longer than we
needed to in the run-perf-tests harness, showing up as a massive 30%
regression in malloc memory use.
Fixed it by added an explicit null check of Frame::page().
2013-09-27 Alexey Proskuryakov <ap@apple.com>
Updating bindings test results after KURL->URL rename.
Includes were now in the wrong order.
* bindings/scripts/test/CPP/WebDOMTestActiveDOMObject.cpp:
* bindings/scripts/test/CPP/WebDOMTestCustomNamedGetter.cpp:
* bindings/scripts/test/CPP/WebDOMTestEventConstructor.cpp:
* bindings/scripts/test/CPP/WebDOMTestEventTarget.cpp:
* bindings/scripts/test/CPP/WebDOMTestException.cpp:
* bindings/scripts/test/CPP/WebDOMTestInterface.cpp:
* bindings/scripts/test/CPP/WebDOMTestObj.cpp:
* bindings/scripts/test/CPP/WebDOMTestTypedefs.cpp:
* bindings/scripts/test/JS/JSTestEventConstructor.cpp:
* bindings/scripts/test/JS/JSTestException.cpp:
* bindings/scripts/test/JS/JSTestObj.cpp:
* bindings/scripts/test/JS/JSTestTypedefs.cpp:
* bindings/scripts/test/ObjC/DOMTestActiveDOMObject.mm:
* bindings/scripts/test/ObjC/DOMTestCallback.mm:
* bindings/scripts/test/ObjC/DOMTestCustomNamedGetter.mm:
* bindings/scripts/test/ObjC/DOMTestEventConstructor.mm:
* bindings/scripts/test/ObjC/DOMTestEventTarget.mm:
* bindings/scripts/test/ObjC/DOMTestException.mm:
* bindings/scripts/test/ObjC/DOMTestInterface.mm:
* bindings/scripts/test/ObjC/DOMTestObj.mm:
* bindings/scripts/test/ObjC/DOMTestTypedefs.mm:
2013-09-27 Thiago de Barros Lacerda <thiago.lacerda@openbossa.org>
Get MediaStreamCenterGStreamer compiling again
https://bugs.webkit.org/show_bug.cgi?id=122029
After MediaStream cleanup commit, it was not building anymore.
Reviewed by Eric Carlson.
No new tests needed.
* platform/mediastream/gstreamer/MediaStreamCenterGStreamer.cpp:
2013-09-27 Thiago de Barros Lacerda <thiago.lacerda@openbossa.org>
Storing a reference to MediaStreamTrack in RTCStatsRequest
https://bugs.webkit.org/show_bug.cgi?id=122030
Reviewed by Eric Carlson.
The spec[1] says that the stats is related to a MediaStreamTrack object.
It also says: "Evaluate the need for other selectors than MediaStreamTrack".
So a MediaStreamTrack object is more suitable in this case.
[1]http://dev.w3.org/2011/webrtc/editor/webrtc.html#stats-selector
No new tests needed.
* Modules/mediastream/RTCStatsRequestImpl.cpp:
(WebCore::RTCStatsRequestImpl::RTCStatsRequestImpl):
(WebCore::RTCStatsRequestImpl::hasSelector):
(WebCore::RTCStatsRequestImpl::track):
* Modules/mediastream/RTCStatsRequestImpl.h:
* platform/mediastream/RTCStatsRequest.h:
2013-09-27 Thiago de Barros Lacerda <thiago.lacerda@openbossa.org>
[Nix] Updating Nix trunk files
https://bugs.webkit.org/show_bug.cgi?id=121752
Reviewed by Benjamin Poulain.
No new tests needed.
* page/nix/EventHandlerNix.cpp:
(WebCore::EventHandler::focusDocumentView):
(WebCore::EventHandler::passWheelEventToWidget):
(WebCore::EventHandler::passMousePressEventToSubframe):
(WebCore::EventHandler::passMouseMoveEventToSubframe):
(WebCore::EventHandler::passMouseReleaseEventToSubframe):
* platform/DragImage.h:
* platform/graphics/GraphicsContext3D.h:
* platform/nix/DragImageNix.cpp:
(WebCore::createDragImageFromImage):
* platform/nix/GamepadsNix.cpp:
(WebCore::sampleGamepads):
* platform/nix/LanguageNix.cpp:
(WebCore::platformLanguage):
* platform/nix/LocalizedStringsNix.cpp:
(WebCore::unacceptableTLSCertificate):
* platform/nix/PasteboardNix.cpp:
(WebCore::Pasteboard::types):
* platform/nix/RenderThemeNix.cpp:
(WebCore::toColor):
(WebCore::themeEngine):
(WebCore::webCanvas):
(WebCore::getWebThemeState):
(WebCore::RenderThemeNix::paintButton):
(WebCore::RenderThemeNix::paintTextField):
(WebCore::RenderThemeNix::paintCheckbox):
(WebCore::RenderThemeNix::paintRadio):
(WebCore::RenderThemeNix::paintMenuList):
(WebCore::RenderThemeNix::paintProgressBar):
(WebCore::RenderThemeNix::paintInnerSpinButton):
(WebCore::RenderThemeNix::paintMeter):
2013-09-27 Anders Carlsson <andersca@apple.com>
Use std::unique_ptr for GraphicsLayer creation
https://bugs.webkit.org/show_bug.cgi?id=122020
Reviewed by Antti Koivisto.
* platform/graphics/GraphicsLayer.h:
* platform/graphics/GraphicsLayerFactory.h:
* platform/graphics/ca/GraphicsLayerCA.cpp:
(WebCore::GraphicsLayer::create):
* platform/graphics/ca/GraphicsLayerCA.h:
* platform/graphics/texmap/coordinated/CompositingCoordinator.cpp:
(WebCore::CompositingCoordinator::createGraphicsLayer):
* platform/graphics/texmap/coordinated/CompositingCoordinator.h:
* rendering/RenderLayerBacking.cpp:
(WebCore::RenderLayerBacking::createGraphicsLayer):
(WebCore::RenderLayerBacking::updateGraphicsLayerConfiguration):
(WebCore::RenderLayerBacking::paintIntoLayer):
* rendering/RenderLayerBacking.h:
(WebCore::RenderLayerBacking::hasScrollingLayer):
* rendering/RenderLayerCompositor.cpp:
(WebCore::RenderLayerCompositor::updateRootLayerPosition):
* rendering/RenderLayerCompositor.h:
2013-09-27 Beth Dakin <bdakin@apple.com>
ScrollbarPainterController should adopt the api to lock overlay scrollbar state
https://bugs.webkit.org/show_bug.cgi?id=121928
Reviewed by Sam Weinig.
ScrollbarPainterController should adopt the api to lock overlay scrollbar state.
This will allow the ScrollbarPainterController and ScrollAnimatorMac to have
control over knowing whether or not the scrollbars are currently active, which
will allow us to remove a bunch of functions previously implemented in
ScrollableArea subclasses to answer that question.
ScrollableArea::scrollbarsCanBeActive() is not longer virtual. It used to
implemented on ScrollableArea subclasses, but now ScrollableArea can just get the
information from the ScrollAnimator.
* WebCore.exp.in:
When ScrollableArea subclasses implemented scrollbarsCanBeActive(), they would
check to see if the document was in the page cache. Instead of that model, this
patch adopts a model where ScrollbarPainterController is told directly whether or
not it is active via shouldLockOverlayScrollbarsToHidden(bool).
* dom/Document.cpp:
(WebCore::Document::setInPageCache):
setAnimatorsAreActive() is no longer necessary. The functionality can be bundled
into shouldLockOverlayScrollbarsToHidden(bool).
(WebCore::Document::documentDidResumeFromPageCache):
Remove implementations of scrollbarsCanBeActive(), setAnimatorsAreActive(), and
scrollbarAnimationsAreSuppressed().
* page/FrameView.cpp:
(WebCore::FrameView::notifyPageThatContentAreaWillPaint):
* page/FrameView.h:
setShouldSuppressScrollbarAnimations(bool) now calls
setShouldLockOverlayScrollbars(bool).
* page/Page.cpp:
(WebCore::Page::setShouldSuppressScrollbarAnimations):
(WebCore::Page::setShouldLockOverlayScrollbars):
* page/Page.h:
setIsActive() is now implemented in the ScrollAnimator instead of ScrollableArea
subclasses. finishCurrentScrollAnimations() is replaced by
lockOverlayScrollbarStateToHidden(bool).
* platform/ScrollAnimator.h:
(WebCore::ScrollAnimator::lockOverlayScrollbarStateToHidden):
(WebCore::ScrollAnimator::scrollbarsCanBeActive):
New enum ScrollbarOverlayState.
* platform/ScrollTypes.h:
Go to the animator for both of these functions.
* platform/ScrollableArea.cpp:
(WebCore::ScrollableArea::lockOverlayScrollbarStateToHidden):
(WebCore::ScrollableArea::scrollbarsCanBeActive):
* platform/ScrollableArea.h:
(WebCore::ScrollableArea::setVisibleScrollerThumbRect):
Three new pieces of ScrollbarPainterController api.
* platform/mac/NSScrollerImpDetails.h:
Instead of asking the ScrollableArea if scrollbars can be active, just find out if
the ScrollbarPaintController has been locked.
* platform/mac/ScrollAnimatorMac.h:
* platform/mac/ScrollAnimatorMac.mm:
(-[WebScrollbarPainterControllerDelegate scrollerImpPair:setContentAreaNeedsDisplayInRect:]):
(-[WebScrollbarPainterDelegate scrollerImp:animateKnobAlphaTo:duration:]):
(WebCore::ScrollAnimatorMac::contentAreaWillPaint):
(WebCore::ScrollAnimatorMac::mouseEnteredContentArea):
(WebCore::ScrollAnimatorMac::mouseExitedContentArea):
(WebCore::ScrollAnimatorMac::mouseMovedInContentArea):
(WebCore::ScrollAnimatorMac::mouseEnteredScrollbar):
(WebCore::ScrollAnimatorMac::mouseExitedScrollbar):
(WebCore::ScrollAnimatorMac::willStartLiveResize):
(WebCore::ScrollAnimatorMac::contentsResized):
(WebCore::ScrollAnimatorMac::willEndLiveResize):
(WebCore::ScrollAnimatorMac::contentAreaDidShow):
(WebCore::ScrollAnimatorMac::contentAreaDidHide):
(WebCore::ScrollAnimatorMac::didBeginScrollGesture):
(WebCore::ScrollAnimatorMac::didEndScrollGesture):
(WebCore::ScrollAnimatorMac::mayBeginScrollGesture):
(WebCore::ScrollAnimatorMac::lockOverlayScrollbarStateToHidden):
(WebCore::ScrollAnimatorMac::scrollbarsCanBeActive):
(WebCore::ScrollAnimatorMac::notifyContentAreaScrolled):
(WebCore::ScrollAnimatorMac::updateScrollerStyle):
Remove implementations of scrollbarsCanBeActive() and
scrollbarAnimationsAreSuppressed().
* rendering/RenderLayer.cpp:
* rendering/RenderLayer.h:
* rendering/RenderListBox.cpp:
* rendering/RenderListBox.h:
2013-09-27 David Hyatt <hyatt@apple.com>
Move line grid functionality from RenderBlock into RenderBlockFlow.
https://bugs.webkit.org/show_bug.cgi?id=121502
Reviewed by Dean Jackson.
* rendering/LayoutState.cpp:
(WebCore::LayoutState::LayoutState):
(WebCore::LayoutState::establishLineGrid):
* rendering/LayoutState.h:
(WebCore::LayoutState::lineGrid):
* rendering/RenderBlock.cpp:
(WebCore::RenderBlock::willBeDestroyed):
* rendering/RenderBlock.h:
(WebCore::RenderBlock::RenderBlockRareData::RenderBlockRareData):
* rendering/RenderBlockFlow.cpp:
(WebCore::RenderBlockFlow::willBeDestroyed):
(WebCore::RenderBlockFlow::layoutLineGridBox):
* rendering/RenderBlockFlow.h:
(WebCore::RenderBlockFlow::RenderBlockFlowRareData::RenderBlockFlowRareData):
(WebCore::RenderBlockFlow::lineGridBox):
(WebCore::RenderBlockFlow::setLineGridBox):
* rendering/RenderBlockLineLayout.cpp:
* rendering/RootInlineBox.cpp:
(WebCore::RootInlineBox::lineSnapAdjustment):
2013-09-27 Andreas Kling <akling@apple.com>
Re-indent Settings.h
Rubber-stamped by Anders Carlsson.
2013-09-27 Eric Carlson <eric.carlson@apple.com>
[MediaStream API] update SourceInfo object to match spec
https://bugs.webkit.org/show_bug.cgi?id=121941
Reviewed by Dean Jackson.
No new tests, existing test updated.
* Modules/mediastream/SourceInfo.cpp:
(WebCore::SourceInfo::kind): Get rid of "none".
* Modules/mediastream/SourceInfo.h:
(WebCore::SourceInfo::sourceId): Renamed from "id".
* Modules/mediastream/SourceInfo.idl:
* platform/mediastream/MediaStreamTrackSourcesRequestClient.h:
(WebCore::TrackSourceInfo::create):
(WebCore::TrackSourceInfo::kind):
(WebCore::TrackSourceInfo::TrackSourceInfo):
* platform/mock/MockMediaStreamCenter.cpp:
(WebCore::MockMediaStreamCenter::getMediaStreamTrackSources): "facing" isn't a part of sourceInfo.
Return a non-NULL ID because a source must always have one.
2013-09-26 Dean Jackson <dino@apple.com>
Provide 2D Matrix decomposition for animation
https://bugs.webkit.org/show_bug.cgi?id=112824
<rdar://problem/15091882>
Reviewed by Eric Carlson (and Ian Henderson offline).
Implement a new 2d matrix blend, which is triggered
when animating between two affine 3d matrices. This
is intended to be the official algorithm that gets
put into the W3C Transforms specification.
The old code is renamed with a 4 prefix (indicating
it is a blend between 3d matrices using quaternions),
and new methods and structures for 2d blending were added.
I also took the opportunity to clean up a lot of
bad WebKit style.
* platform/graphics/ca/GraphicsLayerCA.cpp:
(WebCore::maxScaleFromTransform): Use 3d decomposition.
* platform/graphics/transforms/PerspectiveTransformOperation.cpp:
(WebCore::PerspectiveTransformOperation::blend): Ditto.
* platform/graphics/transforms/RotateTransformOperation.cpp:
(WebCore::RotateTransformOperation::blend): Ditto.
* platform/graphics/transforms/TransformationMatrix.cpp:
(WebCore::decompose2): New method to decompose an affine 3d matrix
into X/Y scale + translate, a rotation angle, plus some extracted
a,b,c,d fields from the affine section.
(WebCore::decompose4): New name for the old function.
(WebCore::TransformationMatrix::blend2): Perform linear interpolation
between two 2d decompositions.
(WebCore::TransformationMatrix::blend4): New name for the old function.
(WebCore::TransformationMatrix::blend): Call blend2 or blend4 depending
on the type of matrix.
(WebCore::TransformationMatrix::decompose2): Calls into the decompose2
method above.
(WebCore::TransformationMatrix::decompose4): New name.
(WebCore::TransformationMatrix::recompose2): Recomposes a 3d matrix from
a 2d decomposition.
(WebCore::TransformationMatrix::recompose4): New name.
* platform/graphics/transforms/TransformationMatrix.h: All the changes
for the new methods above.
2013-09-26 Darin Adler <darin@apple.com>
rename KURL to URL
https://bugs.webkit.org/show_bug.cgi?id=16214
Reviewed by Andreas Kling.
* many files: Renamed, using script.
2013-09-06 Jer Noble <jer.noble@apple.com>
[Mac] Implement the media controls in JavaScript.
https://bugs.webkit.org/show_bug.cgi?id=120895
Reviewed by Dean Jackson.
Re-implement the existing MediaControls constellation of classes in JavaScript
and CSS. This will allow different ports to configure their controls without
dependencies on the layout requirements of any other port's controls.
Define and turn on ENABLE_MEDIA_CONTROLS_SCRIPT:
* Configurations/FeatureDefines.xcconfig:
Add new source files to the project:
* DerivedSources.cpp:
* DerivedSources.make:
* WebCore.vcxproj/WebCore.vcxproj:
* WebCore.vcxproj/WebCore.vcxproj.filters:
* WebCore.xcodeproj/project.pbxproj:
Add a new class MediaControlsHost which the script controls can use to
communicate with the HTMLMediaElement without exposing private interfaces
to web facing scripts:
* Modules/mediacontrols/MediaControlsHost.cpp: Added.
(WebCore::MediaControlsHost::automaticKeyword): Static method.
(WebCore::MediaControlsHost::forcedOnlyKeyword): Ditto.
(WebCore::MediaControlsHost::alwaysOnKeyword): Ditto.
(WebCore::MediaControlsHost::create): Simple factory.
(WebCore::MediaControlsHost::MediaControlsHost): Simple constructor.
(WebCore::MediaControlsHost::~MediaControlsHost): Simple destructor.
(WebCore::MediaControlsHost::sortedTrackListForMenu): Pass through to CaptionUserPreferences.
(WebCore::MediaControlsHost::displayNameForTrack): Ditto.
(WebCore::MediaControlsHost::captionMenuOffItem): Pass through to TextTrack.
(WebCore::MediaControlsHost::captionMenuAutomaticItem): Ditto.
(WebCore::MediaControlsHost::captionDisplayMode): Pass through to CaptionUserPreferences.
(WebCore::MediaControlsHost::setSelectedTextTrack): Pass through to HTMLMediaElement.
(WebCore::MediaControlsHost::textTrackContainer): Lazily create a MediaControlTextTrackContainerElement.
(WebCore::MediaControlsHost::updateTextTrackContainer): Pass through to MediaControlTextTrackContainerElement.
* Modules/mediacontrols/MediaControlsHost.h: Added.
* Modules/mediacontrols/MediaControlsHost.idl: Added.
* Modules/mediacontrols/mediaControlsApple.css: Added.
Add convenience methods for adding a MediaControlsHost to a VM.
* bindings/js/ScriptObject.cpp:
(WebCore::ScriptGlobalObject::set):
* bindings/js/ScriptObject.h:
Add the new controller .js implementation:
* Modules/mediacontrols/mediaControlsApple.js: Added.
(createControls): Global method to create a new Controller object.
(Controller): Constructor. Create and configure the default set of controls.
(Controller.prototype.addListeners): Adds event listeners to the this.video object.
(Controller.prototype.removeListeners): Removes listeners from same.
(Controller.prototype.handleEvent): Makes Controller an EventHandler, making registration and
deregistration simpler.
(Controller.prototype.createBase): Creates the base controls object and the text track container.
(Controller.prototype.createControls): Creates the controls panel object and controller UI.
(Controller.prototype.setControlsType): Switches between Full Screen and Inline style of controller.
(Controller.prototype.disconnectControls): Disconnects all UI elements from the DOM.
(Controller.prototype.configureInlineControls): Configures existing controls for Inline mode.
(Controller.prototype.configureFullScreenControls): Ditto, for Full Screen Mode.
Add listeners for HTMLMediaElement events:
(Controller.prototype.onloadstart): Update the status display.
(Controller.prototype.onerror): Ditto.
(Controller.prototype.onabort): Ditto.
(Controller.prototype.onsuspend): Ditto.
(Controller.prototype.onprogress): Ditto.
(Controller.prototype.onstalled): Ditto.
(Controller.prototype.onwaiting): Ditto.
(Controller.prototype.onreadystatechange): Ditto.
(Controller.prototype.ontimeupdate): Update the timeline and time displays.
(Controller.prototype.ondurationchange): Ditto.
(Controller.prototype.onplaying): Update the play button.
(Controller.prototype.onplay): Ditto.
(Controller.prototype.onpause): Ditto.
(Controller.prototype.onratechange): Ditto.
(Controller.prototype.onvolumechange): Update the volume and mute UI.
(Controller.prototype.ontexttrackchange): Update the text track container and captions button.
(Controller.prototype.ontexttrackadd): Ditto.
(Controller.prototype.ontexttrackremove): Ditto.
(Controller.prototype.ontexttrackcuechange): Ditto.
(Controller.prototype.onfullscreenchange): Reconfigure the controls.
Add listeners for UI element events:
(Controller.prototype.onwrappermousemove): Show the controls and start the hide timer.
(Controller.prototype.onwrappermouseout): Hide the controls and stop the hide timer.
(Controller.prototype.onrewindbuttonclicked): Rewind.
(Controller.prototype.onplaybuttonclicked): Toggle pause.
(Controller.prototype.ontimelinechange): Update the currentTime.
(Controller.prototype.ontimelinedown):
(Controller.prototype.ontimelineup):
(Controller.prototype.ontimelinemouseover): Show the thumbnail view if available.
(Controller.prototype.ontimelinemouseout): Hide same.
(Controller.prototype.ontimelinemousemove): Move the thumbnail view.
(Controller.prototype.onmutebuttonclicked): Mute audio.
(Controller.prototype.onminbuttonclicked): Increase volume to max.
(Controller.prototype.onmaxbuttonclicked): Decrease volume to min.
(Controller.prototype.onvolumesliderchange): Update the current volume.
(Controller.prototype.oncaptionbuttonclicked): Show or hide the track menu.
(Controller.prototype.onfullscreenbuttonclicked): Enter or exit fullscreen.
(Controller.prototype.oncontrolschange): Show or hide the controls panel.
(Controller.prototype.onseekbackmousedown): Start seeking and enable the seek timer.
(Controller.prototype.onseekbackmouseup): Stop seeking and disable the seek timer.
(Controller.prototype.onseekforwardmousedown): Start seekind and enable the seek timer.
(Controller.prototype.onseekforwardmouseup): Stop seekind and disable the seek timer.
Add action methods (which are mostly self explanatory):
(Controller.prototype.updateDuration):
(Controller.prototype.updatePlaying):
(Controller.prototype.showControls):
(Controller.prototype.hideControls):
(Controller.prototype.removeControls):
(Controller.prototype.addControls):
(Controller.prototype.updateTime):
(Controller.prototype.updateReadyState):
(Controller.prototype.setStatusHidden):
(Controller.prototype.updateThumbnailTrack):
(Controller.prototype.updateCaptionButton):
(Controller.prototype.updateCaptionContainer):
(Controller.prototype.buildCaptionMenu):
(Controller.prototype.captionItemSelected):
(Controller.prototype.destroyCaptionMenu):
(Controller.prototype.updateVolume):
Add utility methods:
(Controller.prototype.isFullScreen):
(Controller.prototype.canPlay):
(Controller.prototype.nextRate):
(Controller.prototype.seekBackFaster):
(Controller.prototype.seekForwardFaster):
(Controller.prototype.formatTime):
(Controller.prototype.trackHasThumbnails):
Add the stylesheet for the javascript controls (which are mostly) copied from
the (deleted) mediaControlsQuickTime.css and fullscreenQuickTime.css files:
* Modules/mediacontrols/mediaControlsApple.css: Added.
* css/fullscreenQuickTime.css: Removed.
* css/mediaControlsQuickTime.css: Removed.
Inject new stylesheets into UA sheets:
* css/CSSDefaultStyleSheets.cpp:
(WebCore::CSSDefaultStyleSheets::ensureDefaultStyleSheetsForElement):
Use the new javascript controls rather than MediaControls:
* html/HTMLMediaElement.cpp:
(WebCore::HTMLMediaElement::childShouldCreateRenderer): Use the javascript controls if available.
(WebCore::HTMLMediaElement::updateTextTrackDisplay): Ditto.
(WebCore::HTMLMediaElement::mediaControls): Ditto.
(WebCore::HTMLMediaElement::hasMediaControls): Ditto.
(WebCore::HTMLMediaElement::createMediaControls): Ditto.
(WebCore::HTMLMediaElement::configureMediaControls): Ditto.
(WebCore::HTMLMediaElement::configureTextTrackDisplay): Ditto.
(WebCore::HTMLMediaElement::ensureIsolatedWorld): Create a new VM for the controls script.
(WebCore::HTMLMediaElement::ensureMediaControlsInjectedScript): Inject the media controls script into the VM.
(WebCore::HTMLMediaElement::didAddUserAgentShadowRoot): Inject the MediaControlsHost into the VM and call
the scripts global factory function.
* html/HTMLMediaElement.h:
Remove most of the drawing code from RenderThemeMac and RenderThemeWin and
add accessors for the new .js and .css file data:
* rendering/RenderTheme.h:
(WebCore::RenderTheme::mediaControlsStyleSheet): Empty virtual method.
(WebCore::RenderTheme::mediaControlsScript): Ditto.
* rendering/RenderThemeMac.h:
* rendering/RenderThemeMac.mm:
(WebCore::RenderThemeMac::mediaControlsStyleSheet): Add accessor for mediaControlsApple.css.
(WebCore::RenderThemeMac::mediaControlsScript): Add accessor for mediaControlsApple.js.
(WebCore::RenderThemeMac::adjustSliderThumbSize): Remove the call to adjustMediaSliderThumbSize.
* rendering/RenderThemeWin.cpp:
(WebCore::RenderThemeWin::mediaControlsStyleSheet):
(WebCore::RenderThemeWin::mediaControlsScript):
* rendering/RenderThemeWin.h:
2013-09-27 Bem Jones-Bey <bjonesbe@adobe.com>
[css-shapes] Shapes are not resolved the same way in shape-inside and clip-path
https://bugs.webkit.org/show_bug.cgi?id=121922
Reviewed by Andreas Kling.
Fix computation of a percentage radius for circle shape-outside to
match the CSS Shapes spec.
Test: csswg/contributors/adobe/submitted/shapes/shape-outside/shape-outside-floats-circle-001.html
* rendering/shapes/Shape.cpp:
(WebCore::Shape::createShape):
2013-09-27 Darin Adler <darin@apple.com>
Add empty MainFrame class
https://bugs.webkit.org/show_bug.cgi?id=121770
Reviewed by Andreas Kling.
For now, MainFrame simply derives from Frame and adds nothing.
Next, we will make each Frame point back to its MainFrame.
* CMakeLists.txt: Added MainFrame.cpp/h.
* GNUmakefile.list.am: Ditto.
* Target.pri: Ditto.
* WebCore.exp.in: Ditto.
* WebCore.vcxproj/WebCore.vcxproj: Ditto.
* WebCore.vcxproj/WebCore.vcxproj.filters: Ditto.
* WebCore.xcodeproj/project.pbxproj: Ditto.
* page/Frame.cpp:
(WebCore::Frame::Frame): Use references instead of pointers for constructor.
(WebCore::Frame::create): Pass references instead of pointers to constructor.
* page/Frame.h: Made constructor protected instead of private, and marked
destructor virtual explicitly. Also marked virtual functions OVERRIDE and FINAL.
* page/MainFrame.cpp: Added.
* page/MainFrame.h: Added.
* page/Page.cpp:
(WebCore::Page::Page): Use MainFrame::create instead of Frame::create.
(WebCore::Page::frameIsMainFrame): Moved here, no longer inline.
(WebCore::Page::renderTreeSize): Use const Frame* instead of Frame*.
(WebCore::Page::checkSubframeCountConsistency): Ditto.
* page/Page.h: Changed mainFrame() to return MainFrame& and m_mainFrame to
be a RefPtr<MainFrame>.
* accessibility/mac/WebAccessibilityObjectWrapperMac.mm:
* bindings/js/PageScriptDebugServer.cpp:
* bindings/js/ScriptProfiler.cpp:
* bindings/js/ScriptState.cpp:
* css/MediaQueryEvaluator.cpp:
* dom/Document.cpp:
* history/CachedFrame.cpp:
* history/CachedPage.cpp:
* history/PageCache.cpp:
* html/HTMLPlugInImageElement.cpp:
* inspector/InspectorAgent.cpp:
* inspector/InspectorCanvasAgent.cpp:
* inspector/InspectorClient.cpp:
* inspector/InspectorDOMAgent.cpp:
* inspector/InspectorFrontendClientLocal.cpp:
* inspector/InspectorFrontendHost.cpp:
* inspector/InspectorInputAgent.cpp:
* inspector/InspectorInstrumentation.cpp:
* inspector/InspectorOverlay.cpp:
* inspector/InspectorPageAgent.cpp:
* inspector/PageRuntimeAgent.cpp:
* loader/FrameLoader.cpp:
* loader/HistoryController.cpp:
* loader/archive/mhtml/MHTMLArchive.cpp:
* page/AutoscrollController.cpp:
* page/Chrome.cpp:
* page/ContextMenuController.cpp:
* page/DOMWindow.cpp:
* page/DragController.cpp:
* page/EventHandler.cpp:
* page/FocusController.cpp:
* page/FrameTree.cpp:
* page/FrameView.cpp:
* page/GestureTapHighlighter.cpp:
* page/PageGroup.cpp:
* page/PageGroupLoadDeferrer.cpp:
* page/PageSerializer.cpp:
* page/PageThrottler.cpp:
* page/Settings.cpp:
* page/SpatialNavigation.cpp:
* page/mac/DragControllerMac.mm:
* page/mac/PageMac.cpp:
* page/scrolling/ScrollingCoordinator.cpp:
* page/scrolling/mac/ScrollingCoordinatorMac.mm:
* platform/graphics/texmap/coordinated/CompositingCoordinator.cpp:
* plugins/DOMMimeType.cpp:
* storage/StorageEventDispatcher.cpp:
* svg/graphics/SVGImage.cpp:
* testing/InternalSettings.cpp:
* testing/Internals.cpp:
Include MainFrame.h instead of Frame.h as needed.
2013-09-27 Gyuyoung Kim <gyuyoung.kim@samsung.com>
Add toWebKitCSS*Value functions to cast from CSSValue
https://bugs.webkit.org/show_bug.cgi?id=121776
Reviewed by Andreas Kling.
CSS_VALUE_TYPE_CASTS can't cover WebKitCSS*Value classes. So, this patch adds toWebKitCSS*Value manually.
No new tests, no behavior change.
* css/CSSValue.cpp:
(WebCore::CSSValue::destroy):
* css/StyleResolver.cpp:
(WebCore::StyleResolver::createCustomFilterOperationWithInlineSyntax):
(WebCore::StyleResolver::createFilterOperations):
* css/TransformFunctions.cpp:
(WebCore::transformsForValue):
* css/WebKitCSSArrayFunctionValue.h:
(WebCore::toWebKitCSSArrayFunctionValue):
* css/WebKitCSSFilterValue.h:
(WebCore::toWebKitCSSFilterValue):
* css/WebKitCSSMatFunctionValue.h:
(WebCore::toWebKitCSSMatFunctionValue):
* css/WebKitCSSMixFunctionValue.h:
(WebCore::toWebKitCSSMixFunctionValue):
* css/WebKitCSSSVGDocumentValue.h:
(WebCore::toWebKitCSSSVGDocumentValue):
* css/WebKitCSSShaderValue.h:
(WebCore::toWebKitCSSShaderValue):
* css/WebKitCSSTransformValue.h:
(WebCore::toWebKitCSSTransformValue):
2013-09-27 Zalan Bujtas <zalan@apple.com>
Unexpected word wrapping for wrapped content then raw content.
https://bugs.webkit.org/show_bug.cgi?id=121130
Reviewed by Darin Adler.
When deciding whether a line is considered empty, we need to check if the current
object is fully responsible for the currently uncommitted width. It helps differentiating
<span></span><span>abcd</span> from <span>a</span><span>bcd</span>, where in the first
case when we hit the second <span> the line is still considered empty, as opposed to the
second example.
This patch introduces a map to keep track of the uncommitted widths.
Test: fast/css/unexpected-word-wrapping-with-non-empty-spans.html
* rendering/LineWidth.cpp:
(WebCore::LineWidth::uncommittedWidthForObject):
(WebCore::LineWidth::addUncommittedWidth):
* rendering/LineWidth.h:
* rendering/RenderBlockLineLayout.cpp:
(WebCore::LineBreaker::nextSegmentBreak):
2013-09-27 Mario Sanchez Prada <mario.prada@samsung.com>
[ATK] Protect entry points in the ATK wrapper against outdated render trees
https://bugs.webkit.org/show_bug.cgi?id=121558
Reviewed by Chris Fleizach.
Make sure that we protect every entry point in the ATK wrapper
against outdated render trees, before using the WebCore's
accessibility API, since that might lead to problems (and crashes)
if the render and accessibility trees are not stable.
Thus, call AccessibilityObject::updateBackingStore() in those
entry points and check whether the ATK wrapper is detached or not
after that, to decide whether to continue or not.
Besides providing a new test to check that it WebKit does not
crash in a given scenario (which actually triggered the
investigation here), solving this situation also fixes other tests
that were previously failing (aria-used-on-image-maps.html) or
that were printing wrong results, not detected until now due to
wrong platform specific expectations (file-upload-button-stringvalue
and deleting-iframe-destroys-axcache).
Test: accessibility/heading-crash-after-hidden.html
* accessibility/atk/WebKitAccessibleUtil.h: Added two new macros
to inject the needed code at the beginning of each entry point to
allow gracefully exit those functions when the render tree is
unstable. Inspired by g_return_if_fail and g_return_val_if_fail, we
called them returnIfWebKitAccessibleIsInvalid and returnValIfWebKitAccessibleIsInvalid.
* accessibility/atk/WebKitAccessibleHyperlink.cpp:
(webkitAccessibleHyperlinkActionDoAction): Protect entry point.
(webkitAccessibleHyperlinkActionGetNActions): Ditto.
(webkitAccessibleHyperlinkActionGetDescription): Ditto.
(webkitAccessibleHyperlinkActionGetKeybinding): Ditto.
(webkitAccessibleHyperlinkActionGetName): Ditto.
(webkitAccessibleHyperlinkGetURI): Ditto.
(webkitAccessibleHyperlinkGetObject): Ditto.
(webkitAccessibleHyperlinkGetStartIndex): Ditto.
(webkitAccessibleHyperlinkGetEndIndex): Ditto.
(webkitAccessibleHyperlinkIsValid): Ditto.
(webkitAccessibleHyperlinkGetNAnchors): Ditto.
(webkitAccessibleHyperlinkIsSelectedLink): Ditto.
* accessibility/atk/WebKitAccessibleInterfaceAction.cpp:
(webkitAccessibleActionDoAction): Ditto.
(webkitAccessibleActionGetNActions): Ditto.
(webkitAccessibleActionGetDescription): Ditto.
(webkitAccessibleActionGetKeybinding): Ditto.
(webkitAccessibleActionGetName): Ditto.
* accessibility/atk/WebKitAccessibleInterfaceComponent.cpp:
(webkitAccessibleComponentRefAccessibleAtPoint): Ditto.
(webkitAccessibleComponentGetExtents): Ditto.
(webkitAccessibleComponentGrabFocus): Ditto.
* accessibility/atk/WebKitAccessibleInterfaceDocument.cpp:
(webkitAccessibleDocumentGetAttributeValue): Ditto.
(webkitAccessibleDocumentGetAttributes): Ditto.
(webkitAccessibleDocumentGetLocale): Ditto.
* accessibility/atk/WebKitAccessibleInterfaceEditableText.cpp:
(webkitAccessibleEditableTextSetRunAttributes): Ditto.
(webkitAccessibleEditableTextSetTextContents): Ditto.
(webkitAccessibleEditableTextInsertText): Ditto.
(webkitAccessibleEditableTextCopyText): Ditto.
(webkitAccessibleEditableTextCutText): Ditto.
(webkitAccessibleEditableTextDeleteText): Ditto.
(webkitAccessibleEditableTextPasteText): Ditto.
* accessibility/atk/WebKitAccessibleInterfaceHypertext.cpp:
(webkitAccessibleHypertextGetLink): Ditto.
(webkitAccessibleHypertextGetNLinks): Ditto.
(webkitAccessibleHypertextGetLinkIndex): Ditto.
* accessibility/atk/WebKitAccessibleInterfaceImage.cpp:
(webkitAccessibleImageGetImagePosition): Ditto.
(webkitAccessibleImageGetImageDescription): Ditto.
(webkitAccessibleImageGetImageSize): Ditto.
* accessibility/atk/WebKitAccessibleInterfaceSelection.cpp:
(webkitAccessibleSelectionAddSelection): Ditto.
(webkitAccessibleSelectionClearSelection): Ditto.
(webkitAccessibleSelectionRefSelection): Ditto.
(webkitAccessibleSelectionGetSelectionCount): Ditto.
(webkitAccessibleSelectionIsChildSelected): Ditto.
(webkitAccessibleSelectionRemoveSelection): Ditto.
(webkitAccessibleSelectionSelectAllSelection): Ditto.
* accessibility/atk/WebKitAccessibleInterfaceTable.cpp:
(webkitAccessibleTableRefAt): Ditto.
(webkitAccessibleTableGetIndexAt): Ditto.
(webkitAccessibleTableGetColumnAtIndex): Ditto.
(webkitAccessibleTableGetRowAtIndex): Ditto.
(webkitAccessibleTableGetNColumns): Ditto.
(webkitAccessibleTableGetNRows): Ditto.
(webkitAccessibleTableGetColumnExtentAt): Ditto.
(webkitAccessibleTableGetRowExtentAt): Ditto.
(webkitAccessibleTableGetColumnHeader): Ditto.
(webkitAccessibleTableGetRowHeader): Ditto.
(webkitAccessibleTableGetCaption): Ditto.
(webkitAccessibleTableGetColumnDescription): Ditto.
(webkitAccessibleTableGetRowDescription): Ditto.
* accessibility/atk/WebKitAccessibleInterfaceText.cpp:
(webkitAccessibleTextGetText): Ditto.
(webkitAccessibleTextGetTextAfterOffset): Ditto.
(webkitAccessibleTextGetTextAtOffset): Ditto.
(webkitAccessibleTextGetTextBeforeOffset): Ditto.
(webkitAccessibleTextGetCharacterAtOffset): Ditto.
(webkitAccessibleTextGetCaretOffset): Ditto.
(webkitAccessibleTextGetRunAttributes): Ditto.
(webkitAccessibleTextGetDefaultAttributes): Ditto.
(webkitAccessibleTextGetCharacterExtents): Ditto.
(webkitAccessibleTextGetRangeExtents): Ditto.
(webkitAccessibleTextGetCharacterCount): Ditto.
(webkitAccessibleTextGetOffsetAtPoint): Ditto.
(webkitAccessibleTextGetNSelections): Ditto.
(webkitAccessibleTextGetSelection): Ditto.
(webkitAccessibleTextAddSelection): Ditto.
(webkitAccessibleTextSetSelection): Ditto.
(webkitAccessibleTextRemoveSelection): Ditto.
(webkitAccessibleTextSetCaretOffset): Ditto.
* accessibility/atk/WebKitAccessibleInterfaceValue.cpp:
(webkitAccessibleValueGetCurrentValue): Ditto.
(webkitAccessibleValueGetMaximumValue): Ditto.
(webkitAccessibleValueGetMinimumValue): Ditto.
(webkitAccessibleValueSetCurrentValue): Ditto.
(webkitAccessibleValueGetMinimumIncrement): Ditto.
* accessibility/atk/WebKitAccessibleWrapperAtk.cpp:
(core): Removed, as it's not actually needed.
(webkitAccessibleGetName): Protect entry point.
(webkitAccessibleGetDescription): Ditto.
(webkitAccessibleGetParent): Ditto.
(webkitAccessibleGetNChildren): Ditto.
(webkitAccessibleRefChild): Ditto.
(webkitAccessibleGetIndexInParent): Ditto.
(webkitAccessibleGetAttributes): Ditto.
(webkitAccessibleGetRole): Ditto.
(webkitAccessibleRefStateSet): Ditto.
(webkitAccessibleRefRelationSet): Ditto.
(webkitAccessibleGetObjectLocale): Ditto.
(webkitAccessibleDetach): Ditto.
(webkitAccessibleIsDetached): New helper function, to be used from
the newly added macros. We need to check whether the wrapper is
detached and not just the wrapper AccessibilityObject since once
the detachment happens we can't trust anything but the AtkObject
from the wrapper (the AccessibilityObject might be invalid).
* accessibility/atk/WebKitAccessibleWrapperAtk.h:
Assert that the render tree is neither being updated nor in need
of being updated before trying to compute the text under a given
element, since that might lead to crashes due to the constructor
of TextIterator calling updateLayoutIgnorePendingStylesheets().
* accessibility/AccessibilityNodeObject.cpp:
(WebCore::AccessibilityNodeObject::textUnderElement): Assert that
the render tree is neither being updated nor needing updating.
2013-09-27 Mario Sanchez Prada <mario.prada@samsung.com>
[ATK] accessibility/aria-sort.html is failing after r156409
https://bugs.webkit.org/show_bug.cgi?id=121947
Reviewed by Chris Fleizach.
The WAI-ARIA spec says to translate the value as is from the
attribute, so do just that instead of mapping values from the
AccessibilitySortDirection enumeration into strings.
http://www.w3.org/TR/wai-aria-implementation/#mapping_state-property
* accessibility/atk/WebKitAccessibleWrapperAtk.cpp:
(webkitAccessibleGetAttributes): Do the right mapping for aria-sort.
2013-09-26 Gyuyoung Kim <gyuyoung.kim@samsung.com>
Sync toWebKitCSSShaderValue() behavior with other toCSSFooValue()
https://bugs.webkit.org/show_bug.cgi?id=121886
Reviewed by Darin Adler.
toWebKitCSSShaderValue() behavior is different from other to CSSFooValue().
It shouldn't return null. The type checking should be done before doing type cast.
* css/StyleResolver.cpp:
(WebCore::StyleResolver::createCustomFilterOperationWithInlineSyntax):
* css/WebKitCSSShaderValue.h:
(WebCore::toWebKitCSSShaderValue):
2013-09-26 Antti Koivisto <antti@apple.com>
Move m_style to RenderElement
https://bugs.webkit.org/show_bug.cgi?id=121936
Reviewed by Andreas Kling.
Text renderers always have the same style as their parent. They can get their style via the parent pointer
rather than having a member of their own.
This shrinks RenderText by a pointer.
* dom/PseudoElement.cpp:
(WebCore::PseudoElement::didRecalcStyle):
Text renderers have no independent style. No need to set it.
* editing/ApplyBlockElementCommand.cpp:
* rendering/RenderBlock.cpp:
(WebCore::RenderBlock::addChildToAnonymousColumnBlocks):
Avoid getting style from text child before it is added to tree.
(WebCore::RenderBlock::updateFirstLetterStyle):
(WebCore::RenderBlock::createFirstLetterRenderer):
* rendering/RenderButton.cpp:
(WebCore::RenderButton::styleDidChange):
(WebCore::RenderButton::setText):
* rendering/RenderCombineText.cpp:
(WebCore::RenderCombineText::styleDidChange):
Don't set text style anymore.
* rendering/RenderElement.cpp:
(WebCore::RenderElement::RenderElement):
(WebCore::RenderElement::setStyle):
Notify child text renderers of style change.
(WebCore::RenderElement::setAnimatableStyle):
(WebCore::RenderElement::setPseudoStyle):
Push down to RenderElement, remove text branches.
(WebCore::RenderElement::addChild):
Notify text renderers of style change when added to tree.
(WebCore::RenderElement::propagateStyleToAnonymousChildren):
* rendering/RenderElement.h:
(WebCore::RenderElement::style):
(WebCore::RenderElement::setStyleInternal):
Move m_style from RenderObject.
(WebCore::RenderObject::style):
Inline this in RenderElement.h instead of making it virtual.
* rendering/RenderInline.cpp:
(WebCore::updateStyleOfAnonymousBlockContinuations):
(WebCore::RenderInline::styleDidChange):
Tighten typing to call RenderElement::setStyle.
(WebCore::RenderInline::clippedOverflowRectForRepaint):
Change assert. This can get legitimately called during layout for the first letter renderers.
This was previously avoided by luck.
* rendering/RenderMenuList.cpp:
(WebCore::RenderMenuList::styleDidChange):
(WebCore::RenderMenuList::setText):
Don't set text style anymore.
* rendering/RenderObject.cpp:
(WebCore::RenderObject::RenderObject):
(WebCore::RenderObject::containingBlock):
(WebCore::RenderObject::drawLineForBoxSide):
(WebCore::RenderObject::hasEntirelyFixedBackground):
(WebCore::RenderObject::container):
(WebCore::RenderObject::cachedFirstLineStyle):
Switch to style(), avoid unnecessary repetition.
Move code out.
* rendering/RenderObject.h:
Move functions to RenderElement.
(WebCore::RenderObject::isBeforeContent):
(WebCore::RenderObject::isAfterContent):
Avoid accessing style for text renderers as these are called before the renderer
is added to tree.
(WebCore::RenderObject::setNeedsPositionedMovementLayout):
* rendering/RenderRegion.cpp:
(WebCore::RenderRegion::restoreRegionObjectsOriginalStyle):
(WebCore::RenderRegion::setObjectStyleInRegion):
* rendering/RenderSearchField.cpp:
(WebCore::RenderSearchField::updateCancelButtonVisibility):
* rendering/RenderText.cpp:
* rendering/RenderText.h:
Remove setStyle.
(WebCore::RenderText::style):
Get style from parent.
* rendering/mathml/RenderMathMLOperator.cpp:
(WebCore::RenderMathMLOperator::updateFromElement):
(WebCore::RenderMathMLOperator::createGlyph):
* rendering/style/ContentData.cpp:
(WebCore::TextContentData::createRenderer):
(WebCore::CounterContentData::createRenderer):
(WebCore::QuoteContentData::createRenderer):
Pseudo style for RenderText subclasses comes from parent without any explicit setting.
* style/StyleResolveTree.cpp:
(WebCore::Style::createTextRendererIfNeeded):
(WebCore::Style::resolveLocal):
(WebCore::Style::updateTextStyle):
(WebCore::Style::resolveShadowTree):
(WebCore::Style::resolveTree):
No need to set or update text renderer style separately.
2013-09-26 Eric Carlson <eric.carlson@apple.com>
[MediaStream] make MediaStream testable
https://bugs.webkit.org/show_bug.cgi?id=121967
Reviewed by Dean Jackson.
No new tests, existing tests updated.
* CMakeLists.txt: Add MockMediaStreamCenter.
* GNUmakefile.list.am: Ditto.
* Modules/mediastream/MediaStreamTrack.idl: Add SkipVTableValidation.
* Modules/mediastream/NavigatorUserMediaError.idl: Add JSGenerateToJSObject.
* WebCore.exp.in: Export MockMediaStreamCenter::registerMockMediaStreamCenter.
* WebCore.xcodeproj/project.pbxproj: Add MockMediaStreamCenter.
* dom/DOMError.h: Make the destructor virtual because it has a derived class.
* dom/DOMError.idl:
* platform/mock/MockMediaStreamCenter.cpp: Added.
* platform/mock/MockMediaStreamCenter.h: Added.
* testing/Internals.cpp: Register the mock stream center.
2013-09-26 Benjamin Poulain <benjamin@webkit.org>
Move CSS MatchRequest from StyleResolver to a private definition in ElementRuleCollector
https://bugs.webkit.org/show_bug.cgi?id=121986
Reviewed by Andreas Kling.
MatchRequest is an internal type of ElementRuleCollector now, move the definition
to ElementRuleCollector.
* css/DocumentRuleSets.h:
* css/ElementRuleCollector.h:
(WebCore::ElementRuleCollector::MatchRequest::MatchRequest):
* css/StyleResolver.h:
2013-09-26 Brent Fulgham <bfulgham@apple.com>
[Windows] Unreviewed build fix after r156487.
Add explicit casting needed by MSVC to compile this code. Much
of this could probably be removed when we move to VS2012 or newer.
* bindings/js/JSEventListener.cpp:
(WebCore::JSEventListener::JSEventListener):
* bindings/js/JSEventListener.h:
(WebCore::JSEventListener::jsFunction):
* bridge/jsc/BridgeJSC.cpp:
(JSC::Bindings::Instance::createRuntimeObject):
2013-09-26 Commit Queue <commit-queue@webkit.org>
Unreviewed, rolling out r156510.
http://trac.webkit.org/changeset/156510
https://bugs.webkit.org/show_bug.cgi?id=121989
Landed in-progress code along with build fix. (Requested by
bfulgham on #webkit).
* bindings/js/JSEventListener.cpp:
(WebCore::JSEventListener::JSEventListener):
* bindings/js/JSEventListener.h:
(WebCore::JSEventListener::jsFunction):
* bridge/jsc/BridgeJSC.cpp:
(JSC::Bindings::Instance::createRuntimeObject):
* platform/graphics/filters/FEGaussianBlur.cpp:
(WebCore::FEGaussianBlur::platformApplyGeneric):
(WebCore::FEGaussianBlur::platformApply):
* platform/graphics/win/DIBPixelData.cpp:
(WebCore::DIBPixelData::writeToFile):
* platform/graphics/win/DIBPixelData.h:
2013-09-26 Brent Fulgham <bfulgham@apple.com>
[Windows] Unreviewed build fix after r156487.
Add explicit casting needed by MSVC to compile this code. Much
of this could probably be removed when we move to VS2012 or newer.
* bindings/js/JSEventListener.cpp:
(WebCore::JSEventListener::JSEventListener):
* bindings/js/JSEventListener.h:
(WebCore::JSEventListener::jsFunction):
* bridge/jsc/BridgeJSC.cpp:
(JSC::Bindings::Instance::createRuntimeObject):
* platform/graphics/filters/FEGaussianBlur.cpp:
(WebCore::FEGaussianBlur::platformApplyGeneric):
(WebCore::FEGaussianBlur::platformApply):
* platform/graphics/win/DIBPixelData.cpp:
(WebCore::DIBPixelData::DIBPixelData):
(WebCore::DIBPixelData::writeToFile):
* platform/graphics/win/DIBPixelData.h:
2013-09-26 Dean Jackson <dino@apple.com>
Expose a setting to disable hardware accelerated animations
https://bugs.webkit.org/show_bug.cgi?id=121978
<rdar://problem/15091284>
Reviewed by Eric Carlson.
Expose acceleratedCompositedAnimationsEnabled
to disable CoreAnimation animations.
Test: LayoutTests/animations/transform-non-accelerated.html
* WebCore.exp.in: Export new method.
* page/Settings.in: Add new setting.
* rendering/RenderLayerBacking.cpp:
(WebCore::RenderLayerBacking::startAnimation): Don't go
to GraphicsLayer if the setting is false.
2013-09-26 Julien Brianceau <jbriance@cisco.com>
[Qt] Fix build after r156487.
https://bugs.webkit.org/show_bug.cgi?id=121984
Reviewed by Anders Carlsson.
* bridge/qt/qt_runtime.cpp:
(JSC::Bindings::QtRuntimeMethod::jsObjectRef):
2013-09-26 Antti Koivisto <antti@apple.com>
Don't mutate style in RenderCombineText
https://bugs.webkit.org/show_bug.cgi?id=121979
Reviewed by Andreas Kling.
Text renderers should always have the same style as the parent.
* rendering/InlineTextBox.cpp:
(WebCore::fontToUse):
(WebCore::InlineTextBox::localSelectionRect):
(WebCore::InlineTextBox::paint):
(WebCore::InlineTextBox::offsetForPosition):
(WebCore::InlineTextBox::positionForOffset):
Select the modified font for text-combine.
* rendering/RenderCombineText.cpp:
(WebCore::RenderCombineText::styleDidChange):
(WebCore::RenderCombineText::combineText):
* rendering/RenderCombineText.h:
Move the text-combine specific font style to a member of its own.
2013-09-26 Anders Carlsson <andersca@apple.com>
Remove PassWeak.h
https://bugs.webkit.org/show_bug.cgi?id=121971
Reviewed by Geoffrey Garen.
* ForwardingHeaders/heap/PassWeak.h: Removed.
2013-09-26 Eric Carlson <eric.carlson@apple.com>
[MediaStream API] implement VideoStreamTrack and AudioStreamTrack
https://bugs.webkit.org/show_bug.cgi?id=121950
Reviewed by Dean Jackson.
No new tests, blocked by https://bugs.webkit.org/show_bug.cgi?id=121967
* CMakeLists.txt: Add new files.
* DerivedSources.make: Ditto.
* GNUmakefile.list.am: Ditto.
* Modules/mediastream/AudioStreamTrack.cpp: Added.
* Modules/mediastream/AudioStreamTrack.h: Added.
* Modules/mediastream/AudioStreamTrack.idl: Added.
* Modules/mediastream/MediaStream.cpp:
(WebCore::MediaStream::MediaStream): Create an AudioStreamTrack or a VideoStreamTrack.
(WebCore::MediaStream::addRemoteSource): Ditto.
* Modules/mediastream/MediaStreamTrack.cpp:
(WebCore::MediaStreamTrack::create): Removed.
* Modules/mediastream/MediaStreamTrack.h:
* Modules/mediastream/VideoStreamTrack.cpp: Added.
* Modules/mediastream/VideoStreamTrack.h: Added.
* Modules/mediastream/VideoStreamTrack.idl: Added.
* WebCore.xcodeproj/project.pbxproj: Add new files.
2013-09-26 Anders Carlsson <andersca@apple.com>
Stop using PassWeak
https://bugs.webkit.org/show_bug.cgi?id=121968
Reviewed by Sam Weinig.
Update for JavaScriptCore changes.
* bindings/js/JSDOMBinding.h:
(WebCore::setInlineCachedWrapper):
(WebCore::cacheWrapper):
* bindings/js/JSEventListener.cpp:
(WebCore::JSEventListener::JSEventListener):
* bindings/js/JSEventListener.h:
(WebCore::JSEventListener::setWrapper):
(WebCore::JSEventListener::jsFunction):
* bindings/js/JSMutationCallback.cpp:
(WebCore::JSMutationCallback::JSMutationCallback):
* bindings/js/JSNodeFilterCondition.cpp:
(WebCore::JSNodeFilterCondition::JSNodeFilterCondition):
* bindings/js/ScriptWrappableInlines.h:
(WebCore::ScriptWrappable::setWrapper):
* bindings/js/WebCoreTypedArrayController.cpp:
* bridge/jsc/BridgeJSC.cpp:
(JSC::Bindings::Instance::createRuntimeObject):
* bridge/runtime_root.cpp:
(JSC::Bindings::RootObject::addRuntimeObject):
2013-09-25 Sam Weinig <sam@webkit.org>
Pass a JSC::VM& to JS bindings object creation functions, rather than a JSC::ExecState*
https://bugs.webkit.org/show_bug.cgi?id=121934
Reviewed by Geoffrey Garen.
Reduce unnecessary loads by passing the JSC::VM to object creation/access functions
that don't need the ExecState.
* WebCore.exp.in:
* bindings/js/JSDOMBinding.h:
(WebCore::getDOMStructure):
(WebCore::deprecatedGetDOMStructure):
(WebCore::getDOMPrototype):
(WebCore::setInlineCachedWrapper):
(WebCore::createWrapper):
* bindings/js/JSDOMGlobalObject.h:
(WebCore::getDOMConstructor):
* bindings/js/JSDOMWindowCustom.cpp:
(WebCore::JSDOMWindow::image):
* bindings/js/JSDocumentCustom.cpp:
(WebCore::JSDocument::location):
* bindings/js/JSImageConstructor.cpp:
(WebCore::JSImageConstructor::finishCreation):
* bindings/js/JSImageConstructor.h:
(WebCore::JSImageConstructor::create):
* bindings/js/ScriptWrappable.h:
* bindings/js/ScriptWrappableInlines.h:
(WebCore::ScriptWrappable::setWrapper):
* bindings/scripts/CodeGeneratorJS.pm:
(GenerateHeader):
(GenerateImplementation):
(GenerateConstructorDeclaration):
(GenerateConstructorHelperMethods):
* bridge/c/CRuntimeObject.cpp:
(JSC::Bindings::CRuntimeObject::CRuntimeObject):
(JSC::Bindings::CRuntimeObject::finishCreation):
* bridge/c/CRuntimeObject.h:
(JSC::Bindings::CRuntimeObject::create):
* bridge/c/c_instance.cpp:
(JSC::Bindings::CInstance::newRuntimeObject):
* bridge/jsc/BridgeJSC.cpp:
(JSC::Bindings::Instance::newRuntimeObject):
* bridge/objc/ObjCRuntimeObject.h:
(JSC::Bindings::ObjCRuntimeObject::create):
* bridge/objc/ObjCRuntimeObject.mm:
(JSC::Bindings::ObjCRuntimeObject::ObjCRuntimeObject):
(JSC::Bindings::ObjCRuntimeObject::finishCreation):
* bridge/objc/objc_instance.mm:
(ObjcInstance::newRuntimeObject):
* bridge/objc/objc_runtime.h:
(JSC::Bindings::ObjcFallbackObjectImp::createPrototype):
* bridge/runtime_array.h:
(JSC::RuntimeArray::createPrototype):
* bridge/runtime_method.h:
(JSC::RuntimeMethod::createPrototype):
* bridge/runtime_object.cpp:
(JSC::Bindings::RuntimeObject::RuntimeObject):
(JSC::Bindings::RuntimeObject::finishCreation):
* bridge/runtime_object.h:
(JSC::Bindings::RuntimeObject::create):
(JSC::Bindings::RuntimeObject::createPrototype):
2013-09-26 Commit Queue <commit-queue@webkit.org>
Unreviewed, rolling out r156451.
http://trac.webkit.org/changeset/156451
https://bugs.webkit.org/show_bug.cgi?id=121965
Broke two fast/multicol tests. (Requested by kling on
#webkit).
* rendering/FlowThreadController.cpp:
(WebCore::FlowThreadController::updateRenderFlowThreadLayersIfNeeded):
* rendering/RenderElement.cpp:
(WebCore::RenderElement::propagateStyleToAnonymousChildren):
* rendering/RenderFlowThread.cpp:
(WebCore::RenderFlowThread::layout):
(WebCore::RenderFlowThread::regionForCompositedLayer):
(WebCore::RenderFlowThread::updateRegionForRenderLayer):
(WebCore::RenderFlowThread::updateLayerToRegionMappings):
* rendering/RenderFlowThread.h:
* rendering/RenderGeometryMap.cpp:
* rendering/RenderGeometryMap.h:
* rendering/RenderLayer.cpp:
(WebCore::RenderLayer::calculateLayerBounds):
* rendering/RenderLayer.h:
* rendering/RenderLayerBacking.cpp:
(WebCore::RenderLayerBacking::shouldClipCompositedBounds):
(WebCore::RenderLayerBacking::updateGraphicsLayerGeometry):
* rendering/RenderLayerBacking.h:
* rendering/RenderLayerCompositor.cpp:
(WebCore::RenderLayerCompositor::computeCompositingRequirements):
(WebCore::RenderLayerCompositor::rebuildCompositingLayerTree):
(WebCore::RenderLayerCompositor::canBeComposited):
(WebCore::RenderLayerCompositor::requiresCompositingForIndirectReason):
* rendering/RenderLayerCompositor.h:
* rendering/RenderMultiColumnSet.cpp:
* rendering/RenderMultiColumnSet.h:
* rendering/RenderRegion.cpp:
(WebCore::RenderRegion::setRequiresLayerForCompositing):
* rendering/RenderRegion.h:
* rendering/RenderRegionSet.h:
* rendering/RenderTreeAsText.cpp:
(WebCore::writeLayers):
2013-09-26 Eric Carlson <eric.carlson@apple.com>
[MediaStream] Cleanup platform interface
https://bugs.webkit.org/show_bug.cgi?id=121935
Reviewed by Jer Noble.
No new tests, tests will be updated in the next patch.
* CMakeLists.txt: Remove MediaStreamComponent.cpp.
* GNUmakefile.list.am: Remove MediaStreamComponent.h|cpp and MediaStreamSourcesQueryClient.h.
Add MediaStreamConstraintsValidationClient.h and MediaStreamCreationClient.h.
* Modules/mediastream/MediaStream.cpp:
(WebCore::processTrack): Duplicate MediaStreamSource when necessary to work around bug 121954.
(WebCore::createFromSourceVectors): MediaStreamCenter::instance -> MediaStream::sharedStreamCenter.
(WebCore::MediaStream::MediaStream): *Components -> *Streams.
(WebCore::MediaStream::setEnded): New.
(WebCore::MediaStream::stop): MediaStreamCenter::instance -> MediaStream::sharedStreamCenter.
(WebCore::MediaStream::addTrack): Append the track parameter rather than duplicating it, as per spec.
(WebCore::MediaStream::removeTrack): *Components -> *Streams.
(WebCore::MediaStream::trackDidEnd): Renamed from trackEnded.
(WebCore::MediaStream::streamDidEnd): Renamed from streamEnded.
(WebCore::MediaStream::addRemoteSource): Renamed from addRemoteTrack. *Components -> *Streams.
(WebCore::MediaStream::removeRemoteSource): Renamed from removeRemoteTrack. *Components -> *Streams.
* Modules/mediastream/MediaStream.h:
* Modules/mediastream/MediaStreamTrack.cpp:
(WebCore::MediaStreamTrack::create): *Component -> *Stream.
(WebCore::MediaStreamTrack::MediaStreamTrack): Don't assume source is valid.
(WebCore::MediaStreamTrack::~MediaStreamTrack): Ditto.
(WebCore::MediaStreamTrack::kind): Ditto. AtomicString -> const AtomicString&.
(WebCore::MediaStreamTrack::setSource): Moved from .h file.
(WebCore::MediaStreamTrack::id): Don't assume source is valid. Create ID when the source doesn't have one.
(WebCore::MediaStreamTrack::label): Don't assume source is valid.
(WebCore::MediaStreamTrack::enabled):
(WebCore::MediaStreamTrack::setEnabled): *Component -> *Stream. MediaStreamCenter::instance -> MediaStreamCenter::shared.
(WebCore::MediaStreamTrack::readyState): "muted" is not a readyState, but "new" is.
(WebCore::MediaStreamTrack::getSources): MediaStreamCenter::instance -> MediaStreamCenter::shared.
(WebCore::MediaStreamTrack::ended): *Component -> *Stream.
(WebCore::MediaStreamTrack::sourceChangedState): Dispatch "started" and "unmuted" events.
(WebCore::MediaStreamTrack::trackDidEnd): Renamed from didEndTrack. m_component -> m_source.
* Modules/mediastream/MediaStreamTrack.h:
* Modules/mediastream/RTCDTMFSender.cpp:
(WebCore::RTCDTMFSender::create): track->component() -> track->source();
* Modules/mediastream/RTCPeerConnection.cpp:
(WebCore::RTCPeerConnection::didRemoveRemoteStream): Ditto.
* Modules/mediastream/RTCStatsRequestImpl.cpp:
(WebCore::RTCStatsRequestImpl::RTCStatsRequestImpl): Ditto.
(WebCore::RTCStatsRequestImpl::component): Removed, it was unused.
* Modules/mediastream/RTCStatsRequestImpl.h:
* Modules/mediastream/UserMediaClient.h:
* Modules/mediastream/UserMediaController.h:
(WebCore::UserMediaController::requestPermission): Renamed from requestUserMedia, get rid of source
vector parameters.
(WebCore::UserMediaController::cancelRequest): Renamed from cancelUserMediaRequest.
* Modules/mediastream/UserMediaRequest.cpp:
(WebCore::parseOptions): MediaConstraintsImpl -> MediaConstraints.
(WebCore::UserMediaRequest::create): Ditto.
(WebCore::UserMediaRequest::UserMediaRequest): Ditto.
(WebCore::UserMediaRequest::securityOrigin): New.
(WebCore::UserMediaRequest::start): Request constraint validation.
(WebCore::UserMediaRequest::constraintsValidated): New. Callback from media engine when constraints
can be supported.
(WebCore::UserMediaRequest::requestPermission): New. Ask user media client for permission to access media.
(WebCore::UserMediaRequest::userMediaAccessGranted): New. Access has been granted.
(WebCore::UserMediaRequest::createMediaStream): New. Allowed to access media, ask media engine
to create stream sources.
(WebCore::UserMediaRequest::userMediaAccessDenied): New. User media client has denied access request.
(WebCore::UserMediaRequest::constraintsInvalid): New. Media engine can not support constraints.
(WebCore::UserMediaRequest::didCreateStream): New. Media engine has created stream sources.
(WebCore::UserMediaRequest::callSuccessHandler): New. Create stream from sources and call success handler.
(WebCore::UserMediaRequest::failedToCreateStreamWithConstraintsError): Renamed from constraintFailure.
(WebCore::UserMediaRequest::failedToCreateStreamWithPermissionError): Renamed from permissionFailure.
(WebCore::UserMediaRequest::callErrorHandler):
(WebCore::UserMediaRequest::contextDestroyed): cancelUserMediaRequest -> cancelRequest.
* Modules/mediastream/UserMediaRequest.h:
* Modules/webaudio/AudioContext.cpp:
(WebCore::AudioContext::createMediaStreamSource): localAudio->component()->source() -> localAudio->source().
* Modules/webaudio/MediaStreamAudioDestinationNode.cpp:
(WebCore::MediaStreamAudioDestinationNode::MediaStreamAudioDestinationNode): MediaStreamSource::TypeAudio ->
MediaStreamSource::Audio, MediaStreamSource::ReadyStateLive -> MediaStreamSource::Live.
MediaStreamCenter::instance -> MediaStreamCenter::shared.
* WebCore.exp.in: Export new symbols.
* WebCore.xcodeproj/project.pbxproj: Add new files and remove deleted files.
* dom/EventNames.h: Define "started" event.
* platform/mediastream/MediaStreamCenter.cpp:
(WebCore::mediaStreamCenterOverride): Make it possible to override the shared stream center. Will
be used for testing in a later patch.
(WebCore::MediaStreamCenter::shared): Renamed from instance. Return current stream center.
(WebCore::MediaStreamCenter::setSharedStreamCenter): Override current stream center.
(WebCore::MediaStreamCenter::endLocalMediaStream): Never call the descriptor client, always call
the descriptor and let it deal with the client.
* platform/mediastream/MediaStreamCenter.h:
* platform/mediastream/MediaStreamComponent.cpp: Removed.
* platform/mediastream/MediaStreamComponent.h: Removed.
* platform/mediastream/MediaStreamConstraintsValidationClient.h: Added.
* platform/mediastream/MediaStreamCreationClient.h: Added.
* platform/mediastream/MediaStreamDescriptor.cpp:
(WebCore::MediaStreamDescriptor::addSource): *Component -> *Source.
(WebCore::MediaStreamDescriptor::removeSource): Ditto.
(WebCore::MediaStreamDescriptor::addRemoteSource): Ditto.
(WebCore::MediaStreamDescriptor::removeRemoteSource): Ditto.
(WebCore::MediaStreamDescriptor::MediaStreamDescriptor): Ditto.
(WebCore::MediaStreamDescriptor::setEnded): Ditto. Set source readyStates to Ended.
* platform/mediastream/MediaStreamDescriptor.h:
* platform/mediastream/MediaStreamSource.cpp:
(WebCore::MediaStreamSource::MediaStreamSource): Initialize new member variables.
(WebCore::MediaStreamSource::setReadyState): Early return when the state hasn't changed.
(WebCore::MediaStreamSource::setStream): New.
(WebCore::MediaStreamSource::setMuted): New.
* platform/mediastream/MediaStreamSource.h:
* platform/mediastream/MediaStreamSourcesQueryClient.h: Removed.
* platform/mediastream/RTCPeerConnectionHandler.h:
* platform/mediastream/RTCStatsRequest.h:
* platform/mediastream/blackberry/MediaStreamCenterBlackBerry.cpp: Update for new MediaStreamCenter API.
* platform/mediastream/blackberry/MediaStreamCenterBlackBerry.h:
* platform/mediastream/gstreamer/MediaStreamCenterGStreamer.cpp: Ditto.
* platform/mediastream/gstreamer/MediaStreamCenterGStreamer.h:
* platform/mediastream/mac/MediaStreamCenterMac.cpp: Ditto.
* platform/mediastream/mac/MediaStreamCenterMac.h:
2013-09-26 Gurpreet Kaur <k.gurpreet@samsung.com>
Inset box-shadows fail to round around corners when border-radius is set in vh/vw units.
https://bugs.webkit.org/show_bug.cgi?id=119187
Reviewed by Darin Adler.
Border-radius properties were not applied incase its values
were given in vh, vw, vmax, vmin units.
Tests: fast/css/border-radius-inset-box-shadow-viewportlength.html
fast/css/border-radius-viewport-height.html
fast/css/border-radius-viewport-vmax.html
fast/css/border-radius-viewport-vmin.html
* css/DeprecatedStyleBuilder.cpp:
(WebCore::ApplyPropertyBorderRadius::applyValue):
(WebCore::ApplyPropertyComputeLength::applyValue):
* css/StyleResolver.h:
Calculating the border-radius values which has been specified
in viewport units.The vh/vw units are calcultated as percent of
viewport height and viewport width respectively. 1vmax: 1vw or 1vh,
whatever is largest.1vmin: 1vw or 1vh, whatever is smallest.
2013-09-26 Seokju Kwon <seokju@webkit.org>
Fix ordered comparison warnings in BitmapImage::drawPattern
https://bugs.webkit.org/show_bug.cgi?id=121945
Reviewed by Darin Adler.
No new tests, no behavior change.
* platform/graphics/BitmapImage.cpp:
(WebCore::BitmapImage::drawPattern):
2013-09-26 Andreas Kling <akling@apple.com>
Remove empty JSFooCustom.cpp files.
<https://webkit.org/b/121955>
Reviewed by Anders Carlsson.
There's no sense in slowing down build times with empty files that
still include a bunch of headers.
* bindings/js/JSAudioBufferCustom.cpp: Removed.
* bindings/js/JSCSSFontFaceRuleCustom.cpp: Removed.
* bindings/js/JSCSSImportRuleCustom.cpp: Removed.
* bindings/js/JSCSSMediaRuleCustom.cpp: Removed.
* bindings/js/JSCSSPageRuleCustom.cpp: Removed.
* bindings/js/JSCSSStyleRuleCustom.cpp: Removed.
* bindings/js/JSDOMImplementationCustom.cpp: Removed.
* bindings/js/JSDOMTokenListCustom.cpp: Removed.
* bindings/js/JSHTMLStyleElementCustom.cpp: Removed.
* bindings/js/JSMediaListCustom.cpp: Removed.
* bindings/js/JSProcessingInstructionCustom.cpp: Removed.
* bindings/js/JSWebKitCSSKeyframeRuleCustom.cpp: Removed.
* bindings/js/JSWebKitCSSKeyframesRuleCustom.cpp: Removed.
* bindings/js/JSXMLHttpRequestUploadCustom.cpp: Removed.
2013-09-26 Mihai Maerean <mmaerean@adobe.com>
[CSS Regions] The layers from the flow thread should be collected under the regions' layers.
https://bugs.webkit.org/show_bug.cgi?id=120457
Reviewed by David Hyatt.
This patch is based on the work of Alexandru Chiculita at https://bugs.webkit.org/attachment.cgi?id=203872&action=review
The composited layers inside the named flow threads are collected as part of the regions.
When a region displays a layer that needs accelerated compositing we activate the accelerated compositing for
that region too (inside RenderFlowThread::updateAllLayerToRegionMappings).
Tests: fast/regions/layers/accelerated-compositing/crash-transform-inside-region.html
fast/regions/layers/accelerated-compositing/floated-region-with-transformed-child.html
fast/regions/layers/accelerated-compositing/move-layer-from-one-region-to-another.html
fast/regions/layers/accelerated-compositing/propagate-region-box-shadow-border-padding.html
fast/regions/layers/accelerated-compositing/propagate-region-box-shadow-border-padding-for-video.html
fast/regions/layers/accelerated-compositing/region-as-layer-in-another-flowthread.html
fast/regions/layers/accelerated-compositing/transform-transparent-positioned-video-inside-region.html
fast/regions/layers/accelerated-compositing/transformed-layer-inside-transformed-layer.html
fast/regions/layers/accelerated-compositing/z-index.html: Added.
fast/regions/layers/accelerated-compositing/z-index-update.html: Added.
* rendering/FlowThreadController.cpp:
(WebCore::FlowThreadController::updateRenderFlowThreadLayersIfNeeded):
* rendering/RenderFlowThread.cpp:
(WebCore::RenderFlowThread::layout): When the layout of the flow thread is over (including the 2 phase layout),
we update all the mappings between the layers inside the flow thread and the regions where those layers will be
painted.
(WebCore::RenderFlowThread::hasCompositingRegionDescendant): Whether any of the regions has a compositing descendant.
(WebCore::RenderFlowThread::getLayerListForRegion):
(WebCore::RenderFlowThread::regionForCompositedLayer):
(WebCore::RenderFlowThread::cachedRegionForCompositedLayer):
(WebCore::RenderFlowThread::updateLayerToRegionMappings): Triggers an update of the layers if a layer has moved
from a region to another since the last update.
(WebCore::RenderFlowThread::updateAllLayerToRegionMappings):
* rendering/RenderFlowThread.h:
* rendering/RenderGeometryMap.cpp:
(WebCore::RenderGeometryMap::pushRenderFlowThread):
* rendering/RenderGeometryMap.h:
* rendering/RenderLayer.cpp:
(WebCore::RenderLayer::calculateLayerBounds): The RenderNamedFlowThread is ignored when we calculate the bounds
of the RenderView.
* rendering/RenderLayer.h:
* rendering/RenderLayerBacking.cpp:
(WebCore::RenderLayerBacking::shouldClipCompositedBounds): Not if it's inside an out of flow Flow Thread.
(WebCore::RenderLayerBacking::updateGraphicsLayerGeometry): Now adjusts the ancestorCompositingBounds for the FlowThread.
(WebCore::enclosingFlowThreadAncestor):
(WebCore::RenderLayerBacking::adjustAncestorCompositingBoundsForFlowThread): Make sure that the region propagates
its borders, paddings, outlines or box-shadows to layers inside it.
* rendering/RenderLayerBacking.h:
* rendering/RenderLayerCompositor.cpp:
(WebCore::RenderLayerCompositor::computeCompositingRequirements): Now calls computeRegionCompositingRequirements.
(WebCore::RenderLayerCompositor::computeRegionCompositingRequirements):
(WebCore::RenderLayerCompositor::rebuildCompositingLayerTree): Do not iterate the RenderFlowThread directly. We
are going to collect composited layers as part of regions.
(WebCore::RenderLayerCompositor::rebuildRegionCompositingLayerTree):
(WebCore::RenderLayerCompositor::canBeComposited): CSS Regions flow threads do not need to be composited as we
use composited RenderRegions to render the background of the RenderFlowThread.
(WebCore::RenderLayerCompositor::requiresCompositingForIndirectReason): If it's a region.
* rendering/RenderLayerCompositor.h:
* rendering/RenderMultiColumnSet.cpp:
(WebCore::RenderMultiColumnSet::adjustRegionBoundsFromFlowThreadPortionRect):
* rendering/RenderMultiColumnSet.h:
* rendering/RenderElement.cpp:
(WebCore::RenderObject::propagateStyleToAnonymousChildren): Not for RenderFlowThreads, as they are updated
through the RenderView::styleDidChange function.
* rendering/RenderRegion.cpp:
(WebCore::RenderRegion::setRequiresLayerForCompositing):
(WebCore::RenderRegion::adjustRegionBoundsFromFlowThreadPortionRect):
* rendering/RenderRegion.h:
(WebCore::toRenderRegion):
* rendering/RenderRegionSet.h:
(WebCore::RenderRegionSet::requiresLayer): Never.
* rendering/RenderTreeAsText.cpp:
(WebCore::writeLayers):
2013-09-26 Mihnea Ovidenie <mihnea@adobe.com>
[CSSRegions] Unable to collect html element in a named flow
https://bugs.webkit.org/show_bug.cgi?id=121878
Reviewed by Antti Koivisto.
Tests: fast/regions/collect-html-in-named-flow.html
fast/regions/iframe-html-collected.html
It should be possible to collect the html element in a named flow.
However, before we check whether adding a child is not restricted
by its original parent, we have to make sure that the original parent
is an element to safely perform the check.
* rendering/RenderNamedFlowThread.cpp:
(WebCore::RenderNamedFlowThread::isChildAllowed):
2013-09-25 Brady Eidson <beidson@apple.com>
Unreviewed, blind attempt at a build fix.
* inspector/InspectorIndexedDBAgent.cpp: Dont include the keyPathFromIDBKeyPath method for
PLATFORM(MAC) as it is unused.
2013-09-25 Brady Eidson <beidson@apple.com>
Enable the IndexedDB build on Mac, but leave the feature non-functional
https://bugs.webkit.org/show_bug.cgi?id=121918
Reviewed by Alexey Proskuryakov.
* Configurations/FeatureDefines.xcconfig:
(WebCore::IDBFactory::create): If the IDBFactoryBackend is null (which it is for on-levelDB platforms),
don't create an IDBFactory. This hides the feature from javascript even though upport code is in the build.
* inspector/InspectorIndexedDBAgent.cpp: Empty out DatabaseLoader::execute on Mac until the inspector
build gurus can figure out a 32bit-vs-64bit issue that there is no obvious solution for.
* WebCore.xcodeproj/project.pbxproj: Remove the Modules/indexedDB/leveldb directory now that Mac has no
further use for it.
2013-09-25 Ryuan Choi <ryuan.choi@samsung.com>
Unreviewed build fix for EFL port.
IDBCursorBackendImpl and IDBDatabaseBackendImpl are renamed after r156406.
* Modules/indexeddb/leveldb/IDBCursorBackendLevelDB.h:
* Modules/indexeddb/leveldb/IDBTransactionBackendLevelDB.cpp:
(WebCore::IDBTransactionBackendLevelDB::create):
(WebCore::IDBTransactionBackendLevelDB::IDBTransactionBackendLevelDB):
(WebCore::IDBTransactionBackendLevelDB::registerOpenCursor):
(WebCore::IDBTransactionBackendLevelDB::unregisterOpenCursor):
(WebCore::IDBTransactionBackendLevelDB::closeOpenCursors):
* Modules/indexeddb/leveldb/IDBTransactionBackendLevelDB.h:
(WebCore::IDBTransactionBackendLevelDB::database):
2013-09-25 Benjamin Poulain <benjamin@webkit.org>
Do not reenter Document from its destructor
https://bugs.webkit.org/show_bug.cgi?id=121933
Reviewed by Darin Adler.
Following r156422, there are cases where we would reenter Document
during its destruction.
The flow was the following:
-Document's destructor is executed.
-DocumentStyleSheetCollection being part of Document, its destructor
is executed.
-DocumentStyleSheetCollection's destructor detach the owner node of all
its stylesheets avoid keeping stale references to a dead Document.
-CSSStyleSheet::clearOwnerNode() would fetch the dying document
and invoke Document::styleResolverChanged().
This would not fail because the document is detached and Document::styleResolverChanged()
would fail early. This is complicated and error prone so this patch attempt to clear
the process a bit.
With the patch, Document detach all the stylesheets early in the destruction.
Clearing the stylesheet is also changed to avoid re-entering the document.
* css/CSSStyleSheet.h:
* dom/Document.cpp:
(WebCore::Document::~Document):
* dom/DocumentStyleSheetCollection.cpp:
(WebCore::DocumentStyleSheetCollection::detachFromDocument):
* dom/DocumentStyleSheetCollection.h:
2013-09-25 Santosh Mahto <santosh.ma@samsung.com>
htmlediting.cpp: unnecessary local variable cleanup
https://bugs.webkit.org/show_bug.cgi?id=121903
Reviewed by Darin Adler.
Code cleanup.
* editing/htmlediting.cpp:
(WebCore::lowestEditableAncestor):
2013-09-25 Commit Queue <commit-queue@webkit.org>
Unreviewed, rolling out r156432.
http://trac.webkit.org/changeset/156432
https://bugs.webkit.org/show_bug.cgi?id=121932
some integer conversion things that need brady to fix
(Requested by thorton on #webkit).
* Configurations/FeatureDefines.xcconfig:
* Modules/indexeddb/IDBFactory.h:
(WebCore::IDBFactory::create):
* WebCore.xcodeproj/project.pbxproj:
2013-09-25 Alex Christensen <alex.christensen@flexsim.com>
Win64 compile fix after r155226.
https://bugs.webkit.org/show_bug.cgi?id=120969
Reviewed by Brent Fulgham.
* WebCore.vcxproj/WebCore.vcxproj:
Disable building StructuredExceptionHandlerSuppressor.cpp and makesafeseh.asm on Win64.
2013-09-25 Alexey Proskuryakov <ap@apple.com>
Flaky Test: platform/mac/fonts/han-disunification.html
https://bugs.webkit.org/show_bug.cgi?id=114207
Reviewed by Anders Carlsson.
This test was affected by preceding tests changing font settings.
Save original font if it's changed, and restore it in Backup::restoreTo().
* WebCore.exp.in:
* testing/InternalSettings.cpp:
(WebCore::InternalSettings::Backup::restoreTo):
(WebCore::InternalSettings::setStandardFontFamily):
(WebCore::InternalSettings::setSerifFontFamily):
(WebCore::InternalSettings::setSansSerifFontFamily):
(WebCore::InternalSettings::setFixedFontFamily):
(WebCore::InternalSettings::setCursiveFontFamily):
(WebCore::InternalSettings::setFantasyFontFamily):
(WebCore::InternalSettings::setPictographFontFamily):
* testing/InternalSettings.h:
2013-09-25 Brady Eidson <beidson@apple.com>
Enable the IndexedDB build on Mac, but leave the feature non-functional
https://bugs.webkit.org/show_bug.cgi?id=121918
Reviewed by Alexey Proskuryakov.
* Configurations/FeatureDefines.xcconfig: Enable the feature.
* Modules/indexeddb/IDBFactory.h:
(WebCore::IDBFactory::create): If the IDBFactoryBackend is null (which it is for on-levelDB platforms),
don't create an IDBFactory. This hides the feature from javascript even though upport code is in the build.
* WebCore.xcodeproj/project.pbxproj: Remove the Modules/indexedDB/leveldb directory now that Mac has no
further use for it.
2013-09-25 Andreas Kling <akling@apple.com>
Make EventTarget::hasEventListeners() a const method.
This class needs a lot of love in the const correctness department
but for now let's limit ourselves to fixing the IndexedDB build.
* dom/EventTarget.h:
(WebCore::EventTarget::hasEventListeners):
2013-09-25 Brent Fulgham <bfulgham@apple.com>
[Windows] Refactor RuntimeEnabledFeatures as a Singleton
https://bugs.webkit.org/show_bug.cgi?id=121883
Windows is experiencing crashes when client programs (such as
DumpRenderTree) attemp to change settings on the RuntimeEnabledFeatures
object. The inlined static accessor methods are not accessing
memory safely (when compiled by Visual Studio) resulting in
crashes.
Reviewed by Jer Noble.
* WebCore.exp.in: Remove static accessors for RuntimeEnabledFeatures.
* bindings/generic/RuntimeEnabledFeatures.cpp: Switch methods to
conform to a singleton pattern.
(WebCore::RuntimeEnabledFeatures::RuntimeEnabledFeatures):
(WebCore::RuntimeEnabledFeatures::sharedRuntimeEnabledFeatures):
(WebCore::RuntimeEnabledFeatures::fileSystemEnabled):
(WebCore::RuntimeEnabledFeatures::javaScriptI18NAPIEnabled):
(WebCore::RuntimeEnabledFeatures::audioEnabled):
(WebCore::RuntimeEnabledFeatures::htmlMediaElementEnabled):
(WebCore::RuntimeEnabledFeatures::htmlAudioElementEnabled):
(WebCore::RuntimeEnabledFeatures::htmlVideoElementEnabled):
(WebCore::RuntimeEnabledFeatures::htmlSourceElementEnabled):
(WebCore::RuntimeEnabledFeatures::mediaControllerEnabled):
(WebCore::RuntimeEnabledFeatures::mediaErrorEnabled):
(WebCore::RuntimeEnabledFeatures::timeRangesEnabled):
(WebCore::RuntimeEnabledFeatures::sharedWorkerEnabled):
(WebCore::RuntimeEnabledFeatures::webSocketEnabled):
(WebCore::RuntimeEnabledFeatures::openDatabaseEnabled):
(WebCore::RuntimeEnabledFeatures::openDatabaseSyncEnabled):
* bindings/generic/RuntimeEnabledFeatures.h: Ditto.
(WebCore::RuntimeEnabledFeatures::setLocalStorageEnabled):
(WebCore::RuntimeEnabledFeatures::localStorageEnabled):
(WebCore::RuntimeEnabledFeatures::setSessionStorageEnabled):
(WebCore::RuntimeEnabledFeatures::sessionStorageEnabled):
(WebCore::RuntimeEnabledFeatures::setWebkitNotificationsEnabled):
(WebCore::RuntimeEnabledFeatures::webkitNotificationsEnabled):
(WebCore::RuntimeEnabledFeatures::setApplicationCacheEnabled):
(WebCore::RuntimeEnabledFeatures::applicationCacheEnabled):
(WebCore::RuntimeEnabledFeatures::setDataTransferItemsEnabled):
(WebCore::RuntimeEnabledFeatures::dataTransferItemsEnabled):
(WebCore::RuntimeEnabledFeatures::setGeolocationEnabled):
(WebCore::RuntimeEnabledFeatures::geolocationEnabled):
(WebCore::RuntimeEnabledFeatures::setWebkitIndexedDBEnabled):
(WebCore::RuntimeEnabledFeatures::webkitIndexedDBEnabled):
(WebCore::RuntimeEnabledFeatures::indexedDBEnabled):
(WebCore::RuntimeEnabledFeatures::setCanvasPathEnabled):
(WebCore::RuntimeEnabledFeatures::canvasPathEnabled):
(WebCore::RuntimeEnabledFeatures::setCSSExclusionsEnabled):
(WebCore::RuntimeEnabledFeatures::cssExclusionsEnabled):
(WebCore::RuntimeEnabledFeatures::setCSSShapesEnabled):
(WebCore::RuntimeEnabledFeatures::cssShapesEnabled):
(WebCore::RuntimeEnabledFeatures::setCSSRegionsEnabled):
(WebCore::RuntimeEnabledFeatures::cssRegionsEnabled):
(WebCore::RuntimeEnabledFeatures::setCSSCompositingEnabled):
(WebCore::RuntimeEnabledFeatures::cssCompositingEnabled):
(WebCore::RuntimeEnabledFeatures::setFontLoadEventsEnabled):
(WebCore::RuntimeEnabledFeatures::fontLoadEventsEnabled):
(WebCore::RuntimeEnabledFeatures::webkitFullScreenAPIEnabled):
(WebCore::RuntimeEnabledFeatures::setWebkitFullScreenAPIEnabled):
(WebCore::RuntimeEnabledFeatures::webkitRequestFullScreenEnabled):
(WebCore::RuntimeEnabledFeatures::webkitIsFullScreenEnabled):
(WebCore::RuntimeEnabledFeatures::webkitFullScreenKeyboardInputAllowedEnabled):
(WebCore::RuntimeEnabledFeatures::webkitCurrentFullScreenElementEnabled):
(WebCore::RuntimeEnabledFeatures::webkitCancelFullScreenEnabled):
(WebCore::RuntimeEnabledFeatures::webkitFullscreenEnabledEnabled):
(WebCore::RuntimeEnabledFeatures::webkitFullscreenElementEnabled):
(WebCore::RuntimeEnabledFeatures::webkitExitFullscreenEnabled):
(WebCore::RuntimeEnabledFeatures::webkitRequestFullscreenEnabled):
(WebCore::RuntimeEnabledFeatures::touchEnabled):
(WebCore::RuntimeEnabledFeatures::setTouchEnabled):
(WebCore::RuntimeEnabledFeatures::setDeviceMotionEnabled):
(WebCore::RuntimeEnabledFeatures::deviceMotionEnabled):
(WebCore::RuntimeEnabledFeatures::deviceMotionEventEnabled):
(WebCore::RuntimeEnabledFeatures::ondevicemotionEnabled):
(WebCore::RuntimeEnabledFeatures::setDeviceOrientationEnabled):
(WebCore::RuntimeEnabledFeatures::deviceOrientationEnabled):
(WebCore::RuntimeEnabledFeatures::deviceOrientationEventEnabled):
(WebCore::RuntimeEnabledFeatures::ondeviceorientationEnabled):
(WebCore::RuntimeEnabledFeatures::setSpeechInputEnabled):
(WebCore::RuntimeEnabledFeatures::speechInputEnabled):
(WebCore::RuntimeEnabledFeatures::webkitSpeechEnabled):
(WebCore::RuntimeEnabledFeatures::webkitGrammarEnabled):
(WebCore::RuntimeEnabledFeatures::setScriptedSpeechEnabled):
(WebCore::RuntimeEnabledFeatures::scriptedSpeechEnabled):
(WebCore::RuntimeEnabledFeatures::webkitSpeechRecognitionEnabled):
(WebCore::RuntimeEnabledFeatures::webkitSpeechRecognitionErrorEnabled):
(WebCore::RuntimeEnabledFeatures::webkitSpeechRecognitionEventEnabled):
(WebCore::RuntimeEnabledFeatures::webkitSpeechGrammarEnabled):
(WebCore::RuntimeEnabledFeatures::webkitSpeechGrammarListEnabled):
(WebCore::RuntimeEnabledFeatures::setFileSystemEnabled):
(WebCore::RuntimeEnabledFeatures::setJavaScriptI18NAPIEnabled):
(WebCore::RuntimeEnabledFeatures::mediaStreamEnabled):
(WebCore::RuntimeEnabledFeatures::setMediaStreamEnabled):
(WebCore::RuntimeEnabledFeatures::webkitGetUserMediaEnabled):
(WebCore::RuntimeEnabledFeatures::webkitMediaStreamEnabled):
(WebCore::RuntimeEnabledFeatures::peerConnectionEnabled):
(WebCore::RuntimeEnabledFeatures::setPeerConnectionEnabled):
(WebCore::RuntimeEnabledFeatures::webkitRTCPeerConnectionEnabled):
(WebCore::RuntimeEnabledFeatures::setLegacyCSSVendorPrefixesEnabled):
(WebCore::RuntimeEnabledFeatures::legacyCSSVendorPrefixesEnabled):
(WebCore::RuntimeEnabledFeatures::setWebkitGetGamepadsEnabled):
(WebCore::RuntimeEnabledFeatures::webkitGetGamepadsEnabled):
(WebCore::RuntimeEnabledFeatures::quotaEnabled):
(WebCore::RuntimeEnabledFeatures::setQuotaEnabled):
(WebCore::RuntimeEnabledFeatures::mediaSourceEnabled):
(WebCore::RuntimeEnabledFeatures::setMediaSourceEnabled):
(WebCore::RuntimeEnabledFeatures::encryptedMediaEnabled):
(WebCore::RuntimeEnabledFeatures::setEncryptedMediaEnabled):
(WebCore::RuntimeEnabledFeatures::webkitVideoTrackEnabled):
(WebCore::RuntimeEnabledFeatures::setWebkitVideoTrackEnabled):
(WebCore::RuntimeEnabledFeatures::shadowDOMEnabled):
(WebCore::RuntimeEnabledFeatures::setShadowDOMEnabled):
(WebCore::RuntimeEnabledFeatures::authorShadowDOMForAnyElementEnabled):
(WebCore::RuntimeEnabledFeatures::setAuthorShadowDOMForAnyElementEnabled):
(WebCore::RuntimeEnabledFeatures::customDOMElementsEnabled):
(WebCore::RuntimeEnabledFeatures::setCustomDOMElements):
(WebCore::RuntimeEnabledFeatures::styleScopedEnabled):
(WebCore::RuntimeEnabledFeatures::setStyleScopedEnabled):
(WebCore::RuntimeEnabledFeatures::inputTypeDateEnabled):
(WebCore::RuntimeEnabledFeatures::setInputTypeDateEnabled):
(WebCore::RuntimeEnabledFeatures::inputTypeDateTimeEnabled):
(WebCore::RuntimeEnabledFeatures::setInputTypeDateTimeEnabled):
(WebCore::RuntimeEnabledFeatures::inputTypeDateTimeLocalEnabled):
(WebCore::RuntimeEnabledFeatures::setInputTypeDateTimeLocalEnabled):
(WebCore::RuntimeEnabledFeatures::inputTypeMonthEnabled):
(WebCore::RuntimeEnabledFeatures::setInputTypeMonthEnabled):
(WebCore::RuntimeEnabledFeatures::inputTypeTimeEnabled):
(WebCore::RuntimeEnabledFeatures::setInputTypeTimeEnabled):
(WebCore::RuntimeEnabledFeatures::inputTypeWeekEnabled):
(WebCore::RuntimeEnabledFeatures::setInputTypeWeekEnabled):
(WebCore::RuntimeEnabledFeatures::experimentalContentSecurityPolicyFeaturesEnabled):
(WebCore::RuntimeEnabledFeatures::setExperimentalContentSecurityPolicyFeaturesEnabled):
(WebCore::RuntimeEnabledFeatures::seamlessIFramesEnabled):
(WebCore::RuntimeEnabledFeatures::setSeamlessIFramesEnabled):
(WebCore::RuntimeEnabledFeatures::langAttributeAwareFormControlUIEnabled):
(WebCore::RuntimeEnabledFeatures::setLangAttributeAwareFormControlUIEnabled):
* bindings/js/JSCSSStyleDeclarationCustom.cpp:
(WebCore::getCSSPropertyNamePrefix): Use singleton accessors.
(WebCore::cssPropertyIDForJSCSSPropertyName): Ditto.
* bindings/scripts/CodeGeneratorJS.pm:
(GetRuntimeEnableFunctionName): Generate singleton version of
accessors.
* css/CSSFontFace.cpp:
(WebCore::CSSFontFace::fontLoaded): Use singleton accessors.
(WebCore::CSSFontFace::getFontData): Ditto.
* css/CSSFontSelector.cpp:
(WebCore::CSSFontSelector::addFontFaceRule): Ditto.
* css/CSSParser.cpp:
(WebCore::isSimpleLengthPropertyID): Ditto.
(WebCore::isValidKeywordPropertyAndValue):
(WebCore::CSSParser::parseValue):
(WebCore::CSSParser::rewriteSpecifiers):
* css/CSSSegmentedFontFace.cpp:
(WebCore::CSSSegmentedFontFace::fontLoaded): Ditto.
* css/StyleResolver.h:
(WebCore::StyleResolver::ensureScopeResolver): Ditto.
* dom/Document.cpp:
(WebCore::Document::cssRegionsEnabled): Ditto.
(WebCore::Document::cssCompositingEnabled):
(WebCore::Document::shouldDisplaySeamlesslyWithParent):
(WebCore::Document::getCachedLocale):
* dom/Element.cpp:
(WebCore::Element::createShadowRoot): Ditto.
* dom/Position.cpp:
(WebCore::Position::Position): Ditto.
(WebCore::Position::findParent):
* dom/TreeScope.cpp:
(WebCore::TreeScope::getSelection): Ditto.
* dom/make_names.pl:
(printConstructorInterior): Generate singleton version of accessors.
(printWrapperFunctions): Ditto.
* html/HTMLInputElement.cpp:
(WebCore::HTMLInputElement::isSpeechEnabled): Use singleton accessors.
(WebCore::HTMLInputElement::setupDateTimeChooserParameters): Ditto.
* html/HTMLMediaElement.cpp:
(WebCore::HTMLMediaElement::finishParsingChildren): Ditto.
(WebCore::HTMLMediaElement::scheduleDelayedAction):
(WebCore::HTMLMediaElement::loadTimerFired):
(WebCore::HTMLMediaElement::prepareForLoad):
(WebCore::HTMLMediaElement::loadInternal):
(WebCore::HTMLMediaElement::setReadyState):
(WebCore::HTMLMediaElement::playbackProgressTimerFired):
(WebCore::HTMLMediaElement::mediaPlayerDidAddAudioTrack):
(WebCore::HTMLMediaElement::mediaPlayerDidAddTextTrack):
(WebCore::HTMLMediaElement::mediaPlayerDidAddVideoTrack):
(WebCore::HTMLMediaElement::addAudioTrack):
(WebCore::HTMLMediaElement::addTextTrack):
(WebCore::HTMLMediaElement::addVideoTrack):
(WebCore::HTMLMediaElement::removeAudioTrack):
(WebCore::HTMLMediaElement::removeTextTrack):
(WebCore::HTMLMediaElement::removeVideoTrack):
(WebCore::HTMLMediaElement::audioTracks):
(WebCore::HTMLMediaElement::textTracks):
(WebCore::HTMLMediaElement::videoTracks):
(WebCore::HTMLMediaElement::didAddTextTrack):
(WebCore::HTMLMediaElement::didRemoveTextTrack):
(WebCore::HTMLMediaElement::mediaPlayerTimeChanged):
(WebCore::HTMLMediaElement::userCancelledLoad):
(WebCore::HTMLMediaElement::hasClosedCaptions):
(WebCore::HTMLMediaElement::setClosedCaptionsVisible):
(WebCore::HTMLMediaElement::configureTextTrackDisplay):
* html/HTMLStyleElement.cpp:
(WebCore::HTMLStyleElement::parseAttribute): Ditto.
(WebCore::HTMLStyleElement::scopedAttributeChanged):
(WebCore::HTMLStyleElement::unregisterWithScopingNode):
(WebCore::HTMLStyleElement::scoped):
* html/HTMLTrackElement.cpp:
(WebCore::HTMLTrackElement::parseAttribute): Ditto.
(WebCore::HTMLTrackElement::scheduleLoad):
(WebCore::HTMLTrackElement::canLoadUrl):
* html/InputType.cpp:
(WebCore::createInputTypeFactoryMap): Ditto.
* page/ContentSecurityPolicy.cpp:
(WebCore::ContentSecurityPolicy::experimentalFeaturesEnabled): Ditto.
* page/DOMWindow.cpp:
(WebCore::DOMWindow::addEventListener): Ditto.
* page/FrameView.cpp:
(WebCore::FrameView::performPostLayoutTasks): Ditto.
* testing/InternalSettings.cpp:
(WebCore::InternalSettings::Backup::Backup): Ditto.
(WebCore::InternalSettings::Backup::restoreTo):
(WebCore::InternalSettings::setShadowDOMEnabled):
(WebCore::InternalSettings::setAuthorShadowDOMForAnyElementEnabled):
(WebCore::InternalSettings::setStyleScopedEnabled):
(WebCore::InternalSettings::setCSSExclusionsEnabled):
(WebCore::InternalSettings::setCSSShapesEnabled):
(WebCore::InternalSettings::setLangAttributeAwareFormControlUIEnabled):
2013-09-25 Andreas Kling <akling@apple.com>
Unreviewed build fix for IDBDatabase.
Turns out there was a much cleaner way to express this.
2013-09-25 Benjamin Poulain <benjamin@webkit.org>
Tie the life of DocumentStyleSheetCollection and Document together
https://bugs.webkit.org/show_bug.cgi?id=121892
Reviewed by Andreas Kling.
DocumentStyleSheetCollection had an odd destruction pattern for no apparent reason.
The two objects strictly depend on eachother, this patch make that explicit by making
DocumentStyleSheetCollection a plain object in Document's memory space.
* css/CSSStyleSheet.cpp:
(WebCore::CSSStyleSheet::didMutateRules):
* css/DocumentRuleSets.cpp:
(WebCore::DocumentRuleSets::initUserStyle):
* css/DocumentRuleSets.h:
* css/InspectorCSSOMWrappers.cpp:
(WebCore::InspectorCSSOMWrappers::collectFromDocumentStyleSheetCollection):
(WebCore::InspectorCSSOMWrappers::getWrapperForRuleInSheets):
* css/InspectorCSSOMWrappers.h:
* css/SelectorChecker.cpp:
(WebCore::SelectorChecker::matchRecursively):
(WebCore::SelectorChecker::checkOne):
* css/StyleResolver.cpp:
(WebCore::StyleResolver::StyleResolver):
* css/StyleSheetList.cpp:
(WebCore::StyleSheetList::styleSheets):
(WebCore::StyleSheetList::detachFromDocument):
* dom/Document.cpp:
(WebCore::Document::Document):
(WebCore::Document::~Document):
(WebCore::Document::setCompatibilityMode):
(WebCore::Document::recalcStyle):
(WebCore::Document::createStyleResolver):
(WebCore::Document::processHttpEquiv):
(WebCore::Document::preferredStylesheetSet):
(WebCore::Document::selectedStylesheetSet):
(WebCore::Document::setSelectedStylesheetSet):
(WebCore::Document::scheduleOptimizedStyleSheetUpdate):
(WebCore::Document::styleResolverChanged):
(WebCore::Document::haveStylesheetsLoaded):
* dom/Document.h:
(WebCore::Document::styleSheetCollection):
* dom/DocumentStyleSheetCollection.cpp:
(WebCore::DocumentStyleSheetCollection::DocumentStyleSheetCollection):
(WebCore::DocumentStyleSheetCollection::combineCSSFeatureFlags):
(WebCore::DocumentStyleSheetCollection::resetCSSFeatureFlags):
(WebCore::DocumentStyleSheetCollection::pageUserSheet):
(WebCore::DocumentStyleSheetCollection::clearPageUserSheet):
(WebCore::DocumentStyleSheetCollection::updatePageUserSheet):
(WebCore::DocumentStyleSheetCollection::updateInjectedStyleSheetCache):
(WebCore::DocumentStyleSheetCollection::invalidateInjectedStyleSheetCache):
(WebCore::DocumentStyleSheetCollection::addAuthorSheet):
(WebCore::DocumentStyleSheetCollection::addUserSheet):
(WebCore::DocumentStyleSheetCollection::removePendingSheet):
(WebCore::DocumentStyleSheetCollection::addStyleSheetCandidateNode):
(WebCore::DocumentStyleSheetCollection::collectActiveStyleSheets):
(WebCore::DocumentStyleSheetCollection::analyzeStyleSheetChange):
(WebCore::collectActiveCSSStyleSheetsFromSeamlessParents):
(WebCore::DocumentStyleSheetCollection::updateActiveStyleSheets):
* dom/DocumentStyleSheetCollection.h:
* dom/Element.cpp:
(WebCore::Element::createPseudoElementIfNeeded):
* dom/InlineStyleSheetOwner.cpp:
(WebCore::InlineStyleSheetOwner::insertedIntoDocument):
(WebCore::InlineStyleSheetOwner::removedFromDocument):
(WebCore::InlineStyleSheetOwner::clearDocumentData):
(WebCore::InlineStyleSheetOwner::createSheet):
(WebCore::InlineStyleSheetOwner::sheetLoaded):
(WebCore::InlineStyleSheetOwner::startLoadingDynamicSheet):
* dom/ProcessingInstruction.cpp:
(WebCore::ProcessingInstruction::~ProcessingInstruction):
(WebCore::ProcessingInstruction::checkStyleSheet):
(WebCore::ProcessingInstruction::sheetLoaded):
(WebCore::ProcessingInstruction::insertedInto):
(WebCore::ProcessingInstruction::removedFrom):
* html/HTMLLinkElement.cpp:
(WebCore::HTMLLinkElement::~HTMLLinkElement):
(WebCore::HTMLLinkElement::insertedInto):
(WebCore::HTMLLinkElement::removedFrom):
(WebCore::HTMLLinkElement::addPendingSheet):
(WebCore::HTMLLinkElement::removePendingSheet):
* html/HTMLQuoteElement.cpp:
(WebCore::HTMLQuoteElement::insertedInto):
* html/HTMLViewSourceDocument.cpp:
(WebCore::HTMLViewSourceDocument::HTMLViewSourceDocument):
* inspector/InspectorCSSAgent.cpp:
(WebCore::InspectorCSSAgent::willMatchRule):
* inspector/InspectorCSSAgent.h:
* inspector/InspectorInstrumentation.cpp:
(WebCore::InspectorInstrumentation::willMatchRuleImpl):
* inspector/InspectorInstrumentation.h:
(WebCore::InspectorInstrumentation::willMatchRule):
* mathml/MathMLMathElement.cpp:
(WebCore::MathMLMathElement::insertedInto):
* page/Page.cpp:
(WebCore::Page::userStyleSheetLocationChanged):
* page/PageGroup.cpp:
(WebCore::PageGroup::invalidateInjectedStyleSheetCacheInAllFrames):
* rendering/RenderBlock.cpp:
(WebCore::RenderBlock::lineHeight):
(WebCore::RenderBlock::updateFirstLetter):
* rendering/RenderInline.cpp:
(WebCore::RenderInline::updateAlwaysCreateLineBoxes):
(WebCore::RenderInline::lineHeight):
* rendering/RenderLineBreak.cpp:
(WebCore::RenderLineBreak::lineHeight):
* rendering/RenderObject.cpp:
(WebCore::RenderObject::uncachedFirstLineStyle):
(WebCore::RenderObject::cachedFirstLineStyle):
* rendering/RenderObject.h:
(WebCore::RenderObject::firstLineStyle):
* rendering/RootInlineBox.cpp:
(WebCore::RootInlineBox::verticalPositionForBox):
* style/StyleResolveTree.cpp:
(WebCore::Style::resolveLocal):
* testing/Internals.cpp:
(WebCore::Internals::insertAuthorCSS):
(WebCore::Internals::insertUserCSS):
2013-09-25 Brady Eidson <beidson@apple.com>
FeatureDefine.xcconfig cleanup (They should all be identical).
https://bugs.webkit.org/show_bug.cgi?id=121921
Reviewed by Mark Rowe.
* Configurations/FeatureDefines.xcconfig:
2013-09-25 Andreas Kling <akling@apple.com>
JS wrappers should have strongly typed impl() functions.
<https://webkit.org/b/121919>
Reviewed by Geoffrey Garen.
Generate strongly typed JSFoo::impl() functions for all wrappers,
not just those marked with JSGenerateToNativeObject.
Removed 8.8 million static_casts that are no longer needed.
2013-09-24 Roger Fong <roger_fong@apple.com>
[Windows] Overpanning occurs even when what is being panned isn't the main document.
https://bugs.webkit.org/show_bug.cgi?id=121885.
<rdar://problem/15072332>.
Reviewed by Brent Fulgham.
No new functionality added.
* rendering/RenderLayer.cpp:
(WebCore::RenderLayer::scrollByRecursively):
* rendering/RenderLayer.h:
2013-09-25 Andreas Kling <akling@apple.com>
Reduce repetitive EventTarget subclassing.
<https://webkit.org/b/121915>
Reviewed by Antti Koivisto.
Add a EventTargetWithInlineData helper class to EventTarget.h.
It's a simple subclass with an EventTargetData member and FINAL
eventTargetData()/ensureEventTargetData() overrides.
Turns out that this fits almost every use case except Node and
SVGElementInstance.
Inlined most of the FINAL EventTarget overrides since they will
be called on tight pointers by generated bindings code and this
removes the need for virtual dispatch.
Spammed OVERRIDE FINAL as appropriate, we can't make the whole
classes FINAL until bug 121747 is fixed, so added FIXMEs.
2013-09-25 Sam White <samuel_white@apple.com>
AX: WebKit doesn't map aria-sort=other on OS X
https://bugs.webkit.org/show_bug.cgi?id=118511
Reviewed by Chris Fleizach.
No new tests, updated existing aria-sort test to validate addition of "other"
sort order per http://www.w3.org/TR/wai-aria/complete#aria-sort.
* accessibility/AccessibilityObject.cpp:
(WebCore::AccessibilityObject::sortDirection):
* accessibility/AccessibilityObject.h:
2013-09-24 Sam Weinig <sam@webkit.org>
CTTE: More Document references please
https://bugs.webkit.org/show_bug.cgi?id=121893
Reviewed by Anders Carlsson.
* Thread even more Document&s around. *
2013-09-25 Anders Carlsson <andersca@apple.com>
HasMemoryCostMemberFunction should work for final classes
https://bugs.webkit.org/show_bug.cgi?id=121747
Reviewed by Sam Weinig.
Use decltype to check for the memoryCost() member function. This doesn't check that the return type is size_t, but
the build will fail anyway if that's the case (or if the return type is not convertible to size_t).
* bindings/js/JSDOMBinding.h:
2013-09-25 Brady Eidson <beidson@apple.com>
More refactoring to make the LevelDB dependencies of IDB more obvious.
https://bugs.webkit.org/show_bug.cgi?id=121880
Reviewed by Alexey Proskuryakov.
This patch does three things:
1 - Moves some files to the indexeddb/leveldb subdirectory, renaming them in the process.
2 - Renames some classes.
3 - Adds "USE(LEVELDB)" guards in addition to the ENABLE(INDEXED_DATABASE) guard for those files.
Project file updates:
* GNUmakefile.am:
* GNUmakefile.list.am:
* Target.pri:
* WebCore.xcodeproj/project.pbxproj:
* WebCore.vcxproj/WebCore.vcxproj:
File renames, class renames, and USE(LEVELDB) guards:
* Modules/indexeddb/IDBBackingStore.cpp: Removed.
* Modules/indexeddb/IDBFactoryBackendInterface.cpp:
(WebCore::IDBFactoryBackendInterface::create): Add a null return if USE(LEVELDB) is disabled as a stop gap measure until
there is a non-LevelDB impl.
* Modules/indexeddb/leveldb/IDBBackingStoreLevelDB.cpp:
* Modules/indexeddb/leveldb/IDBBackingStoreLevelDB.h: Renamed from Source/WebCore/Modules/indexeddb/IDBBackingStore.h.
* Modules/indexeddb/leveldb/IDBCursorBackendLevelDB.cpp: Renamed from Source/WebCore/Modules/indexeddb/IDBCursorBackendImpl.cpp.
* Modules/indexeddb/leveldb/IDBCursorBackendLevelDB.h: Renamed from Source/WebCore/Modules/indexeddb/IDBCursorBackendImpl.h.
* Modules/indexeddb/leveldb/IDBDatabaseBackendLevelDB.cpp: Renamed from Source/WebCore/Modules/indexeddb/IDBDatabaseBackendImpl.cpp.
* Modules/indexeddb/leveldb/IDBDatabaseBackendLevelDB.h: Renamed from Source/WebCore/Modules/indexeddb/IDBDatabaseBackendImpl.h.
* Modules/indexeddb/leveldb/IDBFactoryBackendLevelDB.cpp: Renamed from Source/WebCore/Modules/indexeddb/IDBFactoryBackendImpl.cpp.
* Modules/indexeddb/leveldb/IDBFactoryBackendLevelDB.h: Renamed from Source/WebCore/Modules/indexeddb/IDBFactoryBackendImpl.h.
* Modules/indexeddb/leveldb/IDBLevelDBCoding.cpp:
* Modules/indexeddb/leveldb/IDBLevelDBCoding.h:
* Modules/indexeddb/leveldb/IDBObjectStoreBackendLevelDB.cpp: Renamed from Source/WebCore/Modules/indexeddb/IDBObjectStoreBackendImpl.cpp.
* Modules/indexeddb/leveldb/IDBObjectStoreBackendLevelDB.h: Renamed from Source/WebCore/Modules/indexeddb/IDBObjectStoreBackendImpl.h.
* Modules/indexeddb/leveldb/IDBTransactionBackendLevelDB.cpp: Renamed from Source/WebCore/Modules/indexeddb/IDBTransactionBackendImpl.cpp.
* Modules/indexeddb/leveldb/IDBTransactionBackendLevelDB.h: Renamed from Source/WebCore/Modules/indexeddb/IDBTransactionBackendImpl.h.
* Modules/indexeddb/leveldb/IDBTransactionCoordinatorLevelDB.cpp: Renamed from Source/WebCore/Modules/indexeddb/IDBTransactionCoordinator.cpp.
* Modules/indexeddb/leveldb/IDBTransactionCoordinatorLevelDB.h: Renamed from Source/WebCore/Modules/indexeddb/IDBTransactionCoordinator.h.
2013-09-25 Antti Koivisto <antti@apple.com>
REGRESSION (r156355) Links / interactive elements inside nested tables are unclickable
https://bugs.webkit.org/show_bug.cgi?id=121904
Reviewed by Andreas Kling.
Test: fast/table/hittest-self-painting.html
Original reduction by Philippe Wittenbergh.
* rendering/RenderTableRow.cpp:
(WebCore::RenderTableRow::styleDidChange):
Tighten a bit.
(WebCore::RenderTableRow::nodeAtPoint):
* rendering/RenderTableSection.cpp:
(WebCore::RenderTableSection::nodeAtPoint):
These flipped accidentally in r156355.
2013-09-25 Alberto Garcia <berto@igalia.com>
Fix warning in makeprop.pl
https://bugs.webkit.org/show_bug.cgi?id=121900
Reviewed by Ryosuke Niwa.
%nameIsInherited and %nameToId were incorrectly initialized using
references instead of lists.
Anyway there's no need to initialize those variables explicitly,
they're already empty by default.
* css/makeprop.pl:
2013-09-25 Allan Sandfeld Jensen <allan.jensen@digia.com>
REGRESSION(r156393): Build with !ENABLE(SVG_FONTS) broken
Unreviewed build-fix.
Protect SVG font code with #ifdef ENABLE(SVG_FONTS).
* platform/graphics/WidthIterator.cpp:
(WebCore::applyFontTransforms):
2013-09-25 Commit Queue <commit-queue@webkit.org>
Unreviewed, rolling out r156272.
http://trac.webkit.org/changeset/156272
https://bugs.webkit.org/show_bug.cgi?id=121909
Has no real effect (Requested by carewolf on #webkit).
* platform/graphics/qt/TileQt.cpp:
(WebCore::TileQt::updateBackBuffer):
2013-09-25 Andreas Kling <akling@apple.com>
Move wheel event dispatch from Node to Element.
<https://webkit.org/b/121908>
Reviewed by Anders Carlsson.
Wheel events are only ever dispatched on Elements, so move the logic out of Node.
Had to make RenderBox::scroll() and friends return a stopElement instead of a
stopNode (out argument) to make this work, though it was only ever returning
Elements there anyway.
2013-09-25 Allan Sandfeld Jensen <allan.jensen@digia.com>
[Qt] Fix build with !ENABLE(BLOB) after r156330
Unreviewed build-fix.
* platform/network/qt/ResourceRequestQt.cpp:
(WebCore::ResourceRequest::toNetworkRequest):
2013-09-25 Allan Sandfeld Jensen <allan.jensen@digia.com>
Support kerning with SVG web fonts
https://bugs.webkit.org/show_bug.cgi?id=117540
Reviewed by Stephen Chenney.
Adds the glue to WidthIterator to take advantage of kerning in SVG web fonts.
To supply SVG font kerning with its required text input, the signature of
applyFontTransforms has been extended.
Since SVG font kerning was extremely slow, it has been sped up by replacing
the iteration over all possible kerning definitions with a hash-map based
lookup of the leading symbol to be kerned. The new algorithm provides a
roughly 100x speed-up in SVG font kerning.
Test: fast/text/svg-font-face-with-kerning.html
* platform/graphics/TextRun.h:
(WebCore::TextRun::string):
* platform/graphics/WidthIterator.cpp:
(WebCore::applyFontTransforms):
(WebCore::WidthIterator::advanceInternal):
* rendering/svg/SVGTextRunRenderingContext.cpp:
(WebCore::SVGTextRunRenderingContext::applySVGKerning):
* rendering/svg/SVGTextRunRenderingContext.h:
* svg/SVGFontElement.cpp:
(WebCore::SVGFontElement::invalidateGlyphCache):
(WebCore::SVGFontElement::ensureGlyphCache):
(WebCore::SVGKerningMap::clear):
(WebCore::SVGKerningMap::insert):
(WebCore::stringMatchesUnicodeRange):
(WebCore::stringMatchesGlyphName):
(WebCore::stringMatchesUnicodeName):
(WebCore::matches):
(WebCore::kerningForPairOfStringsAndGlyphs):
(WebCore::SVGFontElement::horizontalKerningForPairOfStringsAndGlyphs):
(WebCore::SVGFontElement::verticalKerningForPairOfStringsAndGlyphs):
* svg/SVGFontElement.h:
(WebCore::SVGKerning::SVGKerning):
(WebCore::SVGKerningMap::isEmpty):
* svg/SVGHKernElement.cpp:
(WebCore::SVGHKernElement::buildHorizontalKerningPair):
* svg/SVGHKernElement.h:
* svg/SVGVKernElement.cpp:
(WebCore::SVGVKernElement::buildVerticalKerningPair):
* svg/SVGVKernElement.h:
2013-09-25 Andrei Parvu <parvu@adobe.com>
<https://webkit.org/b/120476> [CSS Masking] Implement luminance masking
Added implementation for luminance masking. A luminance mask is applied by transforming its RGB values into
an alpha value, using luminance-to-alpha coefficients. Because this conversion is already implemented in
the ImageBuffer class, we used it in our implementation.
Reviewed by Dirk Schulze.
Tests: css3/masking/mask-luminance-gradient.html
css3/masking/mask-luminance-png.html
css3/masking/mask-luminance-svg.html
* platform/graphics/BitmapImage.cpp: Add a drawPattern method, in which an ImageBuffer is created and converted from alpha to luminance, if there is a luminance mask.
(WebCore::BitmapImage::BitmapImage):
(WebCore::BitmapImage::drawPattern):
* platform/graphics/BitmapImage.h:
* platform/graphics/GeneratorGeneratedImage.cpp: Convert the ImageBuffer to luminance, if necessary.
(WebCore::GeneratorGeneratedImage::drawPattern):
* platform/graphics/GraphicsContext.cpp: Add methods which set and check if a luminance mask is drawn.
(WebCore::GraphicsContext::setDrawLuminanceMask):
(WebCore::GraphicsContext::drawLuminanceMask):
* platform/graphics/GraphicsContext.h: Add property to ContextState for luminance drawing.
(WebCore::GraphicsContextState::GraphicsContextState):
* rendering/RenderBoxModelObject.cpp: Set the luminance property of the mask, if the layer has a mask source type of luminance.
(WebCore::RenderBoxModelObject::paintFillLayerExtended):
* svg/graphics/SVGImage.cpp: Convert the ImageBuffer to luminance, if necessary.
(WebCore::SVGImage::drawPatternForContainer):
* svg/graphics/SVGImageForContainer.cpp: Pass the luminance property to the SVG image.
(WebCore::SVGImageForContainer::drawPattern):
2013-09-25 Andreas Kling <akling@apple.com>
Remove EventPathWalker.
<https://webkit.org/b/121890>
Reviewed by Antti Koivisto.
Purge some more leftover Shadow DOM code.
* dom/EventPathWalker.cpp:
* dom/EventPathWalker.h:
Removed.
* dom/EventRetargeter.cpp:
(WebCore::nodeOrHostIfPseudoElement):
(WebCore::EventRetargeter::calculateEventPath):
(WebCore::EventRetargeter::buildRelatedNodeMap):
If starting at a pseudo element, e.g for events originating from
a transition on :before/:after, retarget to the pseudo element's
host as appropriate. This was the only real "feature" we were
using in EventPathWalker.
* page/EventHandler.cpp:
(WebCore::EventHandler::handleMouseDraggedEvent):
(WebCore::EventHandler::updateDragAndDrop):
(WebCore::EventHandler::updateMouseEventTargetNode):
(WebCore::EventHandler::handleWheelEvent):
(WebCore::EventHandler::handleTouchEvent):
Replace use of EventPathWalker with parentOrShadowHostElement()
parent chain climbing.
2013-09-25 Gurpreet Kaur <k.gurpreet@samsung.com>
:read-write pseudo-class should not be applied on <input type="text" disabled>
https://bugs.webkit.org/show_bug.cgi?id=118236
Reviewed by Darin Adler.
The :read-write pseudo-class must match any element falling into one
of the following categories i.e
input elements to which the readonly attribute applies, and that are mutable
(i.e. that do not have the readonly attribute specified and that are not disabled)
textarea elements that do not have a readonly attribute, and that are not disabled
elements that are editing hosts or editable and are neither input elements nor
textarea elements.
Test: fast/css/readwrite-pseudoclass-input.html
* html/HTMLInputElement.cpp:
(WebCore::HTMLInputElement::matchesReadWritePseudoClass):
* html/HTMLTextAreaElement.cpp:
(WebCore::HTMLTextAreaElement::matchesReadWritePseudoClass):
Checking for both readonly and disabled attribute on input ane textarea element.
2013-09-25 Krzysztof Czech <k.czech@samsung.com>
[EFL] accessibility/loading-iframe-sends-notification.html is failing
https://bugs.webkit.org/show_bug.cgi?id=112003
Reviewed by Mario Sanchez Prada.
Enabled AXLayoutComplete on EFL platform.
* dom/Document.cpp:
(WebCore::Document::implicitClose):
* page/FrameView.cpp:
(WebCore::FrameView::layout):
2013-09-24 Commit Queue <commit-queue@webkit.org>
Unreviewed, rolling out r156379.
http://trac.webkit.org/changeset/156379
https://bugs.webkit.org/show_bug.cgi?id=121894
Caused many assertion failures (Requested by ap on #webkit).
* css/CSSValue.cpp:
(WebCore::CSSValue::destroy):
* css/StyleResolver.cpp:
(WebCore::StyleResolver::createCustomFilterOperationWithInlineSyntax):
(WebCore::StyleResolver::createFilterOperations):
* css/TransformFunctions.cpp:
(WebCore::transformsForValue):
* css/WebKitCSSArrayFunctionValue.h:
* css/WebKitCSSFilterValue.h:
* css/WebKitCSSMatFunctionValue.h:
* css/WebKitCSSMixFunctionValue.h:
* css/WebKitCSSSVGDocumentValue.h:
* css/WebKitCSSShaderValue.h:
(WebCore::toWebKitCSSShaderValue):
* css/WebKitCSSTransformValue.h:
2013-09-24 Ryosuke Niwa <rniwa@webkit.org>
Crash in Document::setFocusedElement
https://bugs.webkit.org/show_bug.cgi?id=121888
Reviewed by Andreas Kling.
Merge https://chromium.googlesource.com/chromium/blink/+/4a594a3de7d9761462b55fb27a6850d767419af2
The crash was caused by attempting to call Chrome:focusedNodeChanged() after m_page had already
been cleared. This could happen when blur's event handler removes the iframe from which
the focus had been moved. Fixed the bug by adding a null pointer check.
Test: fast/events/blur-remove-parent-crash.html
* dom/Document.cpp:
(WebCore::Document::setFocusedElement):
2013-09-24 Antti Koivisto <antti@apple.com>
Remove HTMLContentElement
https://bugs.webkit.org/show_bug.cgi?id=121891
Reviewed by Andreas Kling.
Remove an unsused Shadow DOM type.
* DerivedSources.make:
* WebCore.exp.in:
* WebCore.xcodeproj/project.pbxproj:
* html/HTMLDetailsElement.cpp:
* html/HTMLSummaryElement.cpp:
* html/HTMLTagNames.in:
* html/shadow/ContentDistributor.cpp:
* html/shadow/HTMLContentElement.cpp: Removed.
* html/shadow/HTMLContentElement.h: Removed.
* html/shadow/HTMLContentElement.idl: Removed.
* html/shadow/InsertionPoint.h:
(WebCore::InsertionPoint::matchTypeFor):
* testing/Internals.cpp:
* testing/Internals.h:
* testing/Internals.idl:
2013-09-24 Benjamin Poulain <benjamin@webkit.org>
Remove a contradiction from SelectorChecker
https://bugs.webkit.org/show_bug.cgi?id=121881
Reviewed by Andreas Kling.
The matching code for PseudoHover and PseudoActive is done on the current
selector pseudo type. The current selector match type must be CSSSelector::PseudoClass
in order to reach this code. Consequently, selector->m_match == CSSSelector::Tag can
never be true.
* css/SelectorChecker.cpp:
(WebCore::SelectorChecker::checkOne):
2013-09-24 Gyuyoung Kim <gyuyoung.kim@samsung.com>
Add toWebKitCSS*Value functions to cast from CSSValue
https://bugs.webkit.org/show_bug.cgi?id=121776
Reviewed by Darin Adler.
CSS_VALUE_TYPE_CASTS can't cover WebKitCSS*Value classes. So, this patch adds toWebKitCSS*Value manually.
No new tests, no behavior change.
* css/CSSValue.cpp:
(WebCore::CSSValue::destroy):
* css/StyleResolver.cpp:
(WebCore::StyleResolver::createCustomFilterOperationWithInlineSyntax):
(WebCore::StyleResolver::createFilterOperations):
* css/TransformFunctions.cpp:
(WebCore::transformsForValue):
* css/WebKitCSSArrayFunctionValue.h:
(WebCore::toWebKitCSSArrayFunctionValue):
* css/WebKitCSSFilterValue.h:
(WebCore::toWebKitCSSFilterValue):
* css/WebKitCSSMatFunctionValue.h:
(WebCore::toWebKitCSSMatFunctionValue):
* css/WebKitCSSMixFunctionValue.h:
(WebCore::toWebKitCSSMixFunctionValue):
* css/WebKitCSSSVGDocumentValue.h:
(WebCore::toWebKitCSSSVGDocumentValue):
* css/WebKitCSSShaderValue.h:
(WebCore::toWebKitCSSShaderValue):
* css/WebKitCSSTransformValue.h:
(WebCore::toWebKitCSSTransformValue):
2013-09-24 Antti Koivisto <antti@apple.com>
Clean up some uses of first/lastChildSlow
https://bugs.webkit.org/show_bug.cgi?id=121882
Reviewed by Andreas Kling.
Tighten typing and use first/lastChild instead.
* dom/Position.cpp:
(WebCore::Position::hasRenderedNonAnonymousDescendantsWithHeight):
(WebCore::Position::isCandidate):
(WebCore::Position::getInlineBoxAndOffset):
* dom/Position.h:
* dom/PositionIterator.cpp:
(WebCore::PositionIterator::isCandidate):
* editing/CompositeEditCommand.cpp:
(WebCore::CompositeEditCommand::moveParagraphContentsToNewBlockIfNecessary):
* rendering/RenderBlock.cpp:
(WebCore::canMergeAnonymousBlock):
(WebCore::canMergeContiguousAnonymousBlocks):
(WebCore::RenderBlock::firstLineBlock):
(WebCore::RenderBlock::updateFirstLetter):
* rendering/RenderRegion.cpp:
(WebCore::RenderRegion::setRegionObjectsRegionStyle):
(WebCore::RenderRegion::computeChildrenStyleInRegion):
* rendering/RenderRegion.h:
* rendering/RenderRuby.cpp:
(WebCore::rubyBeforeBlock):
(WebCore::rubyAfterBlock):
(WebCore::lastRubyRun):
* rendering/RenderTreeAsText.cpp:
(WebCore::write):
(WebCore::writeCounterValuesFromChildren):
* rendering/svg/RenderSVGText.cpp:
(WebCore::findPreviousAndNextAttributes):
* style/StyleResolveTree.cpp:
(WebCore::Style::textRendererIsNeeded):
2013-09-24 Mark Lam <mark.lam@apple.com>
Change JSC debug hooks to pass a CallFrame* instead of a DebuggerCallFrame.
https://bugs.webkit.org/show_bug.cgi?id=121867.
Reviewed by Geoffrey Garen.
No new tests.
* bindings/js/ScriptDebugServer.cpp:
(WebCore::ScriptDebugServer::createCallFrame):
(WebCore::ScriptDebugServer::updateCallFrameAndPauseIfNeeded):
(WebCore::ScriptDebugServer::callEvent):
(WebCore::ScriptDebugServer::atStatement):
(WebCore::ScriptDebugServer::returnEvent):
(WebCore::ScriptDebugServer::exception):
(WebCore::ScriptDebugServer::willExecuteProgram):
(WebCore::ScriptDebugServer::didExecuteProgram):
(WebCore::ScriptDebugServer::didReachBreakpoint):
* bindings/js/ScriptDebugServer.h:
* bindings/js/WorkerScriptDebugServer.cpp:
(WebCore::WorkerScriptDebugServer::willExecuteProgram):
* bindings/js/WorkerScriptDebugServer.h:
2013-09-24 Andreas Kling <akling@apple.com>
Move keyboard event dispatch from Node to Element.
<https://webkit.org/b/121873>
Reviewed by Antti Koivisto.
We only dispatch keyboard events on Elements so that logic shouldn't be in Node.
* dom/Document.cpp:
(WebCore::eventTargetElementForDocument):
Reworked to return Element instead of Node.
* dom/Document.h:
* dom/Element.h:
* dom/Element.cpp:
(WebCore::Element::dispatchKeyEvent):
Moved from Node to Element.
* editing/AlternativeTextController.cpp:
(WebCore::AlternativeTextController::insertDictatedText):
* page/EventHandler.cpp:
(WebCore::EventHandler::keyEvent):
(WebCore::EventHandler::handleTextInputEvent):
Adjusted for above changes.
2013-09-24 Zoltan Horvath <zoltan@webkit.org>
[CSS Shapes] Modify updateSegmentsForShapes function to use logical coordinates
https://bugs.webkit.org/show_bug.cgi?id=121864
Reviewed by David Hyatt.
When I landed updateSegmentsForShapes in r156022, I didn't use logical coordinates. This change modifies the
code to use coordinates for positioning the float and the content around the float in a shape-inside. Now I
added only one writing mode tests, but I will add more later in bug #121866.
Test: fast/shapes/shape-inside/shape-inside-left-float-in-upper-left-triangle-vertical-lr-inline-content.html
* rendering/FloatingObjects.h:
(WebCore::FloatingObject::logicalHeight):
* rendering/RenderBlock.cpp:
(WebCore::RenderBlock::computeLogicalLocationForFloat):
* rendering/RenderBlockLineLayout.cpp:
(WebCore::updateSegmentsForShapes):
2013-09-24 Brady Eidson <beidson@apple.com>
Remove IDBTransactionCallbacks.h from the .xcodeproj, as it's gone from the repository.
Rubberstamped by Anders Carlsson and Alexey Proskuryakov.
* WebCore.xcodeproj/project.pbxproj:
2013-09-24 Antti Koivisto <antti@apple.com>
Tighten table rendering code
https://bugs.webkit.org/show_bug.cgi?id=121860
Reviewed by Andreas Kling.
Hide firstChild/lastChild/nextSibling/previousSibling in table renderers,
expose correctly typed firstRow/nextCell etc instead.
2013-09-24 Dean Jackson <dino@apple.com>
Implement symbol name hashing for WebGL shaders
https://bugs.webkit.org/show_bug.cgi?id=121849
Reviewed by Anders Carlsson.
Turn on ANGLE's symbol name mapping for shader programs.
This avoids compilation failures (or worse, crashers)
on some hardware that doesn't like it when shaders redefine
symbols like "sin", even though that is valid.
The way ANGLE exposes this is via setting a pointer
to a char* -> uint64_t hash function. Since we only have
a 32-bit hash in WebKit, I combine the 32-bit value with
a counter value that exists over the lifetime of a GC3D context.
Before calling ANGLE, I point the global hash map to the local
hash map, and then clean up after we're done. This introduces
a memory hit, in that the symbol table will build up until
the context is released.
Covered by Khronos WebGL tests, including
conformance/glsl/misc/shader-with-non-reserved-words.html
* platform/graphics/GraphicsContext3D.h: Define a ShaderNameHash type,
and add an OwnPtr to one as a member variable.
* platform/graphics/opengl/GraphicsContext3DOpenGLCommon.cpp:
(WebCore::nameHashForShader): Global function used for ANGLE hashing.
(WebCore::GraphicsContext3D::compileShader): Set up the ANGLE properties,
point to the local hash map, and call compile/translate.
2013-09-24 Dean Jackson <dino@apple.com>
Use mapped name in attribute location binding
https://bugs.webkit.org/show_bug.cgi?id=121847
<rdar://problem/15067526>
Reviewed by Eric Carlson.
The shader that we send down to OpenGL to compile
may have been translated by ANGLE, so we keep a
table around that maps input symbols to output symbols.
We used the table when binding to and looking up
uniforms, and when looking up attributes, but not
when actually binding to attribute locations.
Test: fast/canvas/webgl/gl-bind-attrib-mapped-names.html
* platform/graphics/ANGLEWebKitBridge.cpp:
(WebCore::getSymbolInfo): Add logging of symbol mapping.
* platform/graphics/opengl/GraphicsContext3DOpenGLCommon.cpp:
(WebCore::GraphicsContext3D::bindAttribLocation): Used the mapped name.
(WebCore::GraphicsContext3D::getAttribLocation): Remove comment since
we do the lookup everywhere.
(WebCore::GraphicsContext3D::getUniformLocation): Ditto.
2013-09-24 Enrica Casucci <enrica@apple.com>
Upstream changes to Pasteboard implementation for iOS.
https://bugs.webkit.org/show_bug.cgi?id=121818
Reviewed by Darin Adler.
* WebCore.xcodeproj/project.pbxproj:
* editing/Editor.cpp:
(WebCore::Editor::cut):
(WebCore::Editor::copyImage):
* editing/ios/EditorIOS.mm:
(WebCore::attributedStringForRange):
(WebCore::dataInRTFDFormat):
(WebCore::dataInRTFFormat):
(WebCore::Editor::stringSelectionForPasteboardWithImageAltText):
(WebCore::Editor::selectionInWebArchiveFormat):
(WebCore::Editor::writeSelectionToPasteboard):
(WebCore::getImage):
(WebCore::Editor::writeImageToPasteboard):
* platform/Pasteboard.h:
* platform/PasteboardStrategy.h:
* platform/PlatformPasteboard.h:
* platform/ios/PasteboardIOS.mm:
* platform/ios/PlatformPasteboardIOS.mm: Added.
(WebCore::PlatformPasteboard::PlatformPasteboard):
(WebCore::PlatformPasteboard::getTypes):
(WebCore::PlatformPasteboard::bufferForType):
(WebCore::PlatformPasteboard::getPathnamesForType):
(WebCore::PlatformPasteboard::stringForType):
(WebCore::PlatformPasteboard::color):
(WebCore::PlatformPasteboard::url):
(WebCore::PlatformPasteboard::copy):
(WebCore::PlatformPasteboard::addTypes):
(WebCore::PlatformPasteboard::setTypes):
(WebCore::PlatformPasteboard::setBufferForType):
(WebCore::PlatformPasteboard::setPathnamesForType):
(WebCore::PlatformPasteboard::setStringForType):
(WebCore::PlatformPasteboard::changeCount):
(WebCore::PlatformPasteboard::uniqueName):
(WebCore::PlatformPasteboard::write):
2013-09-24 Mark Rowe <mrowe@apple.com>
<rdar://problem/14971518> WebKit should build against the Xcode default toolchain when targeting OS X 10.8
Reviewed by Dan Bernstein.
* Configurations/Base.xcconfig:
2013-09-24 Daniel Bates <dabates@apple.com>
[iOS] Upstream -webkit-touch-callout
https://bugs.webkit.org/show_bug.cgi?id=121507
Reviewed by Antti Koivisto.
* css/CSSComputedStyleDeclaration.cpp:
(WebCore::ComputedStyleExtractor::propertyValue):
* css/CSSParser.cpp:
(WebCore::CSSParser::parseValue):
* css/CSSPropertyNames.in: Added -webkit-touch-callout.
* css/StyleResolver.cpp:
(WebCore::StyleResolver::applyProperty):
* html/HTMLImageElement.cpp:
(WebCore::HTMLImageElement::willRespondToMouseClickEvents): Added.
* html/HTMLImageElement.h:
* rendering/style/RenderStyle.h:
* rendering/style/StyleRareInheritedData.cpp:
(WebCore::StyleRareInheritedData::StyleRareInheritedData):
(WebCore::StyleRareInheritedData::operator==):
* rendering/style/StyleRareInheritedData.h:
2013-09-24 Bem Jones-Bey <bjonesbe@adobe.com>
Properly handle bottom margin on float with shape-outside
https://bugs.webkit.org/show_bug.cgi?id=121808
Reviewed by David Hyatt.
When a float has a shape-outside, inline content must conform to the
shape, not to the margin box. Thus, if a float with shape-outside has
a bottom margin and the shape does not intrude into that margin, then
the inline content should ignore the margin. Before this patch, inline
content would drop below the margin box instead of obeying the shape.
Note that content that should clear the float still clears the margin
box, not the shape's contour.
Tests: csswg/contributors/adobe/submitted/shapes/shape-outside/shape-outside-floats-margin-002.html
csswg/contributors/adobe/submitted/shapes/shape-outside/shape-outside-floats-margin-003.html
csswg/contributors/adobe/submitted/shapes/shape-outside/shape-outside-floats-margin-004.html
* rendering/LineWidth.cpp:
(WebCore::LineWidth::fitBelowFloats): Compute the logical bottom based
on the shape.
* rendering/RenderBlock.cpp:
(WebCore::RenderBlock::nextFloatLogicalBottomBelow): Add option to
compute the logical bottom based on the shape instead of on the margin
box.
* rendering/RenderBlock.h:
2013-09-24 Lorenzo Tilve <ltilve@igalia.com>
[GTK] Fix compilation problems when setting ENABLE_DRAG_SUPPORT = FALSE
https://bugs.webkit.org/show_bug.cgi?id=121782
Reviewed by Martin Robinson.
Disabled drag functions.
* page/gtk/EventHandlerGtk.cpp:
* platform/gtk/PasteboardGtk.cpp:
2013-09-24 Samuel White <samuel_white@apple.com>
AX: Replace AXObjectCache postNotification method boolean arguments with enum values.
https://bugs.webkit.org/show_bug.cgi?id=121504
Reviewed by Chris Fleizach.
No new tests, no functional changes. Changed argument type from bool
to enum per "Names" rule #10 in the WebKit coding style guidelines.
* accessibility/AXObjectCache.cpp:
(WebCore::AXObjectCache::textChanged):
(WebCore::AXObjectCache::postNotification):
(WebCore::AXObjectCache::checkedStateChanged):
(WebCore::AXObjectCache::selectedChildrenChanged):
(WebCore::AXObjectCache::handleAttributeChanged):
* accessibility/AXObjectCache.h:
(WebCore::AXObjectCache::postNotification):
* accessibility/AccessibilityMenuList.cpp:
(WebCore::AccessibilityMenuList::didUpdateActiveOption):
* accessibility/AccessibilityMenuListPopup.cpp:
(WebCore::AccessibilityMenuListPopup::didUpdateActiveOption):
* accessibility/AccessibilityNodeObject.cpp:
(WebCore::AccessibilityNodeObject::childrenChanged):
(WebCore::AccessibilityNodeObject::changeValueByStep):
(WebCore::AccessibilityNodeObject::changeValueByPercent):
* accessibility/AccessibilityRenderObject.cpp:
(WebCore::AccessibilityRenderObject::handleAriaExpandedChanged):
(WebCore::AccessibilityRenderObject::handleActiveDescendantChanged):
(WebCore::AccessibilityRenderObject::textChanged):
* dom/Document.cpp:
(WebCore::Document::implicitClose):
* editing/Editor.cpp:
(WebCore::Editor::respondToChangedContents):
(WebCore::Editor::markAndReplaceFor):
* editing/mac/FrameSelectionMac.mm:
(WebCore::FrameSelection::notifyAccessibilityForSelectionChange):
* html/HTMLTextFormControlElement.cpp:
(WebCore::HTMLTextFormControlElement::setInnerTextValue):
* html/InputType.cpp:
(WebCore::InputType::applyStep):
* html/RangeInputType.cpp:
(WebCore::RangeInputType::handleKeydownEvent):
* page/FocusController.cpp:
(WebCore::FocusController::setInitialFocus):
* page/FrameView.cpp:
(WebCore::FrameView::layout):
2013-09-24 Andreas Kling <akling@apple.com>
Make hoverAncestor() a RenderElement concept.
<https://webkit.org/b/121845>
Reviewed by Antti Koivisto.
The hover ancestor renderer is always a RenderElement, we only ever
ask RenderElements for their hover ancestors.
Updated Document::updateHoverActiveState() to take advantage of the
tighter typing, removing a few isElementNode() checks.
2013-09-24 Daniel Bates <dabates@apple.com>
[iOS] Initialize settings mediaPlayback{AllowsInline, RequiresUserGesture} and
shouldRespectImageOrientation as appropriate
https://bugs.webkit.org/show_bug.cgi?id=121792
Reviewed by Darin Adler.
On iOS we explicitly want to disable mediaPlaybackAllowsInline, and enable
mediaPlaybackRequiresUserGesture and shouldRespectImageOrientation by default.
This differs from other platforms. We need to extract the initialization logic
for these settings into constants whose definition is conditioned on the platform.
* page/Settings.cpp:
* page/Settings.in:
2013-09-24 peavo@outlook.com <peavo@outlook.com>
[WinCairo] Compile error.
https://bugs.webkit.org/show_bug.cgi?id=121839
Reviewed by Brent Fulgham.
* platform/graphics/GraphicsContext3DPrivate.cpp:
(WebCore::GraphicsContext3DPrivate::~GraphicsContext3DPrivate): Added missing guard.
2013-09-24 Andreas Kling <akling@apple.com>
Cache continuation() in a local to avoid repeat hash lookups.
<https://webkit.org/b/121840>
Reviewed by Geoffrey Garen.
RenderBoxModelObject::continuation() does a hash lookup every time.
Cache the result in a local instead of calling it repeatedly.
* rendering/RenderBlock.h:
(WebCore::RenderBlock::isAnonymousBlockContinuation):
Reorder to check bitfield before hash map.
* rendering/RenderBlock.cpp:
(WebCore::RenderBlock::updateDragState):
* rendering/RenderInline.cpp:
(WebCore::RenderInline::absoluteRects):
(WebCore::RenderInline::absoluteQuads):
(WebCore::RenderInline::clippedOverflowRectForRepaint):
(WebCore::RenderInline::updateDragState):
(WebCore::RenderInline::addFocusRingRects):
Cache continuation() in locals where it's used more than once.
2013-09-24 Allan Sandfeld Jensen <allan.jensen@digia.com>
[Qt] Crash when trying to download blob url
https://bugs.webkit.org/show_bug.cgi?id=121681
Reviewed by Simon Hausmann.
Resolve any blob URLs before creating a QUrl.
* platform/network/qt/ResourceRequestQt.cpp:
(WebCore::appendBlobResolved):
(WebCore::resolveBlobUrl):
(WebCore::ResourceRequest::toNetworkRequest):
2013-09-23 Antti Koivisto <antti@apple.com>
Move more style change code from RenderObject to RenderElement
https://bugs.webkit.org/show_bug.cgi?id=121822
Reviewed by Darin Adler.
* rendering/RenderElement.cpp:
(WebCore::RenderElement::~RenderElement):
RenderTexts are no longer registered as image clients. They don't need be unregistered either.
(WebCore::RenderElement::adjustStyleDifference):
(WebCore::RenderElement::hasImmediateNonWhitespaceTextChild):
(WebCore::RenderElement::shouldRepaintForStyleDifference):
(WebCore::RenderElement::updateFillImages):
(WebCore::RenderElement::updateImage):
(WebCore::RenderElement::updateShapeImage):
(WebCore::RenderElement::setStyle):
Move from RenderObject and remove the text specific bits.
* rendering/RenderElement.h:
* rendering/RenderObject.cpp:
(WebCore::RenderObject::setStyle):
(WebCore::RenderObject::arenaDelete):
* rendering/RenderObject.h:
Remove styleWill/DidChange which move to subclasses.
* rendering/RenderText.cpp:
(WebCore::RenderText::setStyle):
Add simple text specific setStyle.
* rendering/RenderText.h:
2013-09-24 Andrei Parvu <parvu@adobe.com>
[CSS Background] repeat: round should round the number of tiles to the nearest natural number
https://bugs.webkit.org/show_bug.cgi?id=120668
Reviewed by Darin Adler.
Tests already available in css3/masking and css3/background
* rendering/RenderBoxModelObject.cpp: Rounded the number of tiles to the nearest natural number.
(WebCore::RenderBoxModelObject::calculateBackgroundImageGeometry):
2013-09-24 Ryuan Choi <ryuan.choi@samsung.com>
Remove ScrollView::platformInit() and ScrollView::platformDestroy()
https://bugs.webkit.org/show_bug.cgi?id=121824
Reviewed by Darin Adler.
ScrollView::platformInit() and ScrollView::platformDestroy() are just
empty functions for all ports after removed WX port at r149186.
* PlatformEfl.cmake: Removed ScrollViewEfl.cpp from source list.
* platform/ScrollView.cpp: Removed platformInit and PlatformDestroy.
(WebCore::ScrollView::ScrollView):
(WebCore::ScrollView::~ScrollView):
* platform/ScrollView.h: Ditto.
* platform/efl/ScrollViewEfl.cpp: Removed.
2013-09-23 Darin Adler <darin@apple.com>
Use unique_ptr instead of deleteAllValues in FloatingObject code
https://bugs.webkit.org/show_bug.cgi?id=121823
Reviewed by Sam Weinig.
* rendering/FloatingObjects.cpp:
(WebCore::FloatingObject::create): Return a unique_ptr instead of PassOwnPtr.
Use auto and a word for the local variable instead of an abbreviation. Also
changed to take a reference instead of a pointer.
(WebCore::FloatingObject::copyToNewContainer): Ditto.
(WebCore::FloatingObject::unsafeClone): Ditto.
(WebCore::FloatingObjects::~FloatingObjects): Removed call to deleteAllValues.
(WebCore::FloatingObjects::clearLineBoxTreePointers): Use auto to make this
read clearly.
(WebCore::FloatingObjects::clear): Removed call to deleteAllValues.
(WebCore::FloatingObjects::moveAllToFloatInfoMap): Use std::move to move values
out of the set, into the map. Removed code to clear the set, since it was a
trick to prevent the values from being deleted when they were not moved.
(WebCore::FloatingObjects::add): Changed to take a unique_ptr and to move the
pointer into the set instead of using leakPtr.
(WebCore::FloatingObjects::remove): Rearranged code so that the remove is at
the end of the function rather than the beginning. Also had to use a hash
translator and a find/remove combo since we don't have hash translator version
of the remove function.
(WebCore::FloatingObjects::computePlacedFloatsTree): Updated for changes to
the types.
(WebCore::FloatingObjects::placedFloatsTree): Moved this function here instead
of having it in the header, since it's only used within the file.
* rendering/FloatingObjects.h: Changed functions to take references instead
of pointers and return unique_ptr instead of PassOwnPtr. Also made
constructors public so we can use them with make_unique. Changed types to
use unique_ptr instead of raw pointers, and made the FloatingObjectHashTranslator
work for both RenderBox& and FloatingObject&.
* rendering/LineWidth.cpp:
(WebCore::LineWidth::shrinkAvailableWidthForNewFloatIfNeeded):
Updated for changes to types.
* rendering/RenderBlock.cpp:
(WebCore::RenderBlock::styleDidChange):
(WebCore::RenderBlock::moveAllChildrenIncludingFloatsTo):
(WebCore::RenderBlock::addOverflowFromFloats):
(WebCore::RenderBlock::repaintOverhangingFloats):
(WebCore::RenderBlock::paintFloats):
(WebCore::RenderBlock::selectionGaps):
(WebCore::RenderBlock::insertFloatingObject):
(WebCore::RenderBlock::removeFloatingObject):
(WebCore::RenderBlock::removeFloatingObjectsBelow):
(WebCore::RenderBlock::positionNewFloats):
(WebCore::RenderBlock::nextFloatLogicalBottomBelow):
(WebCore::RenderBlock::lowestFloatLogicalBottom):
(WebCore::RenderBlock::addOverhangingFloats):
(WebCore::RenderBlock::hasOverhangingFloat):
(WebCore::RenderBlock::addIntrudingFloats):
(WebCore::RenderBlock::containsFloat):
(WebCore::RenderBlock::markSiblingsWithFloatsForLayout):
(WebCore::RenderBlock::updateLocalFloatingObjectsForPaintingContainer):
(WebCore::RenderBlock::hitTestFloats):
(WebCore::RenderBlock::adjustForBorderFit):
Updated for changes to types.
* rendering/RenderBlockFlow.cpp:
(WebCore::RenderBlockFlow::clearFloats): Updated to use take instead of
a combination of remove and delete.
* rendering/RenderBlockLineLayout.cpp:
(WebCore::RenderBlock::layoutRunsAndFloats):
(WebCore::RenderBlock::layoutRunsAndFloatsInRange):
(WebCore::RenderBlock::linkToEndLineIfNeeded):
(WebCore::RenderBlock::checkPaginationAndFloatsAtEndLine):
(WebCore::RenderBlock::positionNewFloatOnLine):
Updated for changes to types.
2013-09-23 Gurpreet Kaur <k.gurpreet@samsung.com>
CSS Unit vh, vw, vmin and vmax in box-shadow are not applied.
https://bugs.webkit.org/show_bug.cgi?id=121422
Reviewed by Darin Adler.
Box-shadow properties were not applied incase its values
were given in vh, vw, vmax, vmin unit.
Tests: fast/css/box-shadow-negative-viewportlength.html
fast/css/box-shadow-viewport-height.html
fast/css/box-shadow-viewport-vmax.html
fast/css/box-shadow-viewport-vmin.html
fast/css/box-shadow-viewport-width.html
* css/CSSParser.cpp:
(WebCore::CSSParser::parseShadow):
* css/StyleResolver.cpp:
(WebCore::StyleResolver::applyProperty):
(WebCore::StyleResolver::MatchedProperties::~MatchedProperties):
(WebCore::StyleResolver::viewportPercentageHeight):
(WebCore::StyleResolver::viewportPercentageWidth):
(WebCore::StyleResolver::viewportPercentageMax):
(WebCore::StyleResolver::viewportPercentageMin):
* css/StyleResolver.h:
Parsing and calculating the shadow values which has been specified
in viewport units.The vh/vw units are calcultated as percent of
viewport height and viewport width respectively. 1vmax: 1vw or 1vh,
whatever is largest.1vmin: 1vw or 1vh, whatever is smallest.
2013-09-23 Ryuan Choi <ryuan.choi@samsung.com>
Unreviewed build fix for CMake ports with INDEXED_DATABASE after r156296
* CMakeLists.txt: Removed IDBBackingStore.cpp from source list.
2013-09-23 Anders Carlsson <andersca@apple.com>
Remove WTF_USE_SCROLLBAR_PAINTER #define
https://bugs.webkit.org/show_bug.cgi?id=121819
Reviewed by Sam Weinig.
Remove unnecessary if checks and dead code.
* platform/mac/NSScrollerImpDetails.h:
* platform/mac/ScrollAnimatorMac.mm:
(WebCore::ScrollAnimatorMac::ScrollAnimatorMac):
(WebCore::ScrollAnimatorMac::~ScrollAnimatorMac):
(WebCore::ScrollAnimatorMac::contentAreaWillPaint):
(WebCore::ScrollAnimatorMac::mouseEnteredContentArea):
(WebCore::ScrollAnimatorMac::mouseExitedContentArea):
(WebCore::ScrollAnimatorMac::mouseMovedInContentArea):
(WebCore::ScrollAnimatorMac::mouseEnteredScrollbar):
(WebCore::ScrollAnimatorMac::mouseExitedScrollbar):
(WebCore::ScrollAnimatorMac::willStartLiveResize):
(WebCore::ScrollAnimatorMac::contentsResized):
(WebCore::ScrollAnimatorMac::willEndLiveResize):
(WebCore::ScrollAnimatorMac::contentAreaDidShow):
(WebCore::ScrollAnimatorMac::contentAreaDidHide):
(WebCore::ScrollAnimatorMac::didBeginScrollGesture):
(WebCore::ScrollAnimatorMac::didEndScrollGesture):
(WebCore::ScrollAnimatorMac::mayBeginScrollGesture):
(WebCore::ScrollAnimatorMac::finishCurrentScrollAnimations):
(WebCore::ScrollAnimatorMac::didAddVerticalScrollbar):
(WebCore::ScrollAnimatorMac::willRemoveVerticalScrollbar):
(WebCore::ScrollAnimatorMac::didAddHorizontalScrollbar):
(WebCore::ScrollAnimatorMac::willRemoveHorizontalScrollbar):
(WebCore::ScrollAnimatorMac::shouldScrollbarParticipateInHitTesting):
(WebCore::ScrollAnimatorMac::notifyContentAreaScrolled):
(WebCore::ScrollAnimatorMac::cancelAnimations):
(WebCore::ScrollAnimatorMac::setIsActive):
(WebCore::ScrollAnimatorMac::updateScrollerStyle):
(WebCore::ScrollAnimatorMac::initialScrollbarPaintTimerFired):
* platform/mac/ScrollViewMac.mm:
(WebCore::toNSScrollerKnobStyle):
(WebCore::ScrollView::platformSetScrollbarOverlayStyle):
* platform/mac/ScrollbarThemeMac.mm:
(WebCore::updateArrowPlacement):
(WebCore::ScrollbarThemeMac::registerScrollbar):
(WebCore::ScrollbarThemeMac::ScrollbarThemeMac):
(WebCore::ScrollbarThemeMac::scrollbarThickness):
(WebCore::ScrollbarThemeMac::usesOverlayScrollbarsChanged):
(WebCore::ScrollbarThemeMac::hasThumb):
(WebCore::ScrollbarThemeMac::minimumThumbLength):
(WebCore::ScrollbarThemeMac::updateEnabledState):
(WebCore::ScrollbarThemeMac::paint):
2013-09-23 Brent Fulgham <bfulgham@apple.com>
[Windows] Moving back in history from a page with <video>, then moving forward causes crash.
https://bugs.webkit.org/show_bug.cgi?id=120475
Reviewed by Anders Carlsson.
* platform/graphics/avfoundation/cf/MediaPlayerPrivateAVFoundationCF.cpp:
(WebCore::AVFWrapper::AVFWrapper): Add assertion that creation is on main thread.
(WebCore::AVFWrapper::~AVFWrapper): Add assertion that destruction is on main thread.
(WebCore::destroyAVFWrapper): Helper function to dispatch on main queue.
(WebCore::AVFWrapper::disconnectAndDeleteAVFWrapper): Spawn AVFoundationCF destruction to
main queue.
2013-09-23 Andreas Kling <akling@apple.com>
RenderTextControlSingleLine::updateFromElement() override not needed.
<https://webkit.org/b/121815>
Reviewed by Anders Carlsson.
* rendering/RenderTextControlSingleLine.cpp:
* rendering/RenderTextControlSingleLine.h:
2013-09-23 Gyuyoung Kim <gyuyoung.kim@samsung.com>
Introduce CSS_VALUE_TYPE_CASTS macro in order to cast CSSValue type
https://bugs.webkit.org/show_bug.cgi?id=121462
Reviewed by Darin Adler.
As r155429 introduced ELEMENT_TYPE_CASTS, CSS_VALUE_TYPE_CASTS can be used
by css value type casting as well. This type cast macros will help to detect
bad-cast bugs as well as improve a code readibility.
This patch adds the following methods,
- CSSFooValue* toCSSFooValue(CSSValue*)
- const CSSFooValue* toCSSFooValue(const CSSValue*)
This patch support CSSImageSetValue and CSSReflectValue first. Other CSS*Values
will use this macro step by step.
Besides this patch will remove unnecessary local variables.
No new tests, no behavior change.
* css/CSSCursorImageValue.cpp:
(WebCore::CSSCursorImageValue::cachedImage):
(WebCore::CSSCursorImageValue::cachedOrPendingImage):
* css/CSSImageSetValue.h:
* css/CSSReflectValue.h:
* css/CSSValue.cpp:
(WebCore::CSSValue::destroy):
* css/CSSValue.h:
* css/StyleResolver.cpp:
(WebCore::hasVariableReference):
(WebCore::StyleResolver::applyProperty):
(WebCore::StyleResolver::styleImage):
* rendering/style/StylePendingImage.h:
(WebCore::StylePendingImage::cssImageSetValue):
2013-09-23 Antti Koivisto <antti@apple.com>
Move style change analysis code to RenderElement
https://bugs.webkit.org/show_bug.cgi?id=121812
Reviewed by Andreas Kling.
Text renderers don't need this. There is no text renderer specific invalidation and text
style never changes independent from the containing RenderElement.
2013-09-23 Commit Queue <commit-queue@webkit.org>
Unreviewed, rolling out r156307.
http://trac.webkit.org/changeset/156307
https://bugs.webkit.org/show_bug.cgi?id=121817
Broke the build, and crashes the compiler (Requested by ap on
#webkit).
* css/MediaQuery.cpp:
(WebCore::expressionCompare):
(WebCore::MediaQuery::MediaQuery):
* dom/MutationObserver.cpp:
(WebCore::MutationObserver::ObserverLessThan::operator()):
(WebCore::MutationObserver::deliverAllMutations):
* page/CaptionUserPreferences.cpp:
(WebCore::textTrackCompare):
(WebCore::CaptionUserPreferences::sortedTrackListForMenu):
2013-09-23 Andreas Kling <akling@apple.com>
Move rendererForRootBackground() to RenderElement.
<http://webkit.org/b/121813>
Reviewed by Antti Koivisto.
Move this to RenderElement (and make it return one, too) since the
document element renderer will always be a RenderElement.
2013-09-23 Brady Eidson <beidson@apple.com>
Make the Mac build work with IndexedDB enabled.
https://bugs.webkit.org/show_bug.cgi?id=121814
Reviewed by Alexey Proskuryakov.
This patch makes the Mac build work if one were to enable the IndexedDB feature flag.
This patch does not actually enable the flag for everyone.
* DerivedSources.make:
* WebCore.xcodeproj/project.pbxproj:
* Modules/indexeddb/IDBBackingStore.cpp: Added.
(WebCore::IDBBackingStore::open):
(WebCore::IDBBackingStore::openInMemory):
(WebCore::IDBBackingStore::getObjectStores):
(WebCore::IDBBackingStore::Cursor::advance):
(WebCore::IDBBackingStore::Cursor::continueFunction):
(WebCore::IDBBackingStore::Transaction::Transaction):
(WebCore::IDBBackingStore::Transaction::begin):
(WebCore::IDBBackingStore::Transaction::commit):
(WebCore::IDBBackingStore::Transaction::rollback):
* Modules/indexeddb/IDBBackingStore.h:
(WebCore::LevelDBFactory::~LevelDBFactory):
(WebCore::IDBBackingStore::Transaction::reset):
(WebCore::IDBBackingStore::Transaction::levelDBTransactionFrom):
* Modules/indexeddb/IDBKeyPath.cpp:
(WebCore::IDBIsValidKeyPath):
* bindings/js/IDBBindingUtilities.cpp:
(WebCore::createIDBKeyFromValue):
* bindings/js/JSIDBAnyCustom.cpp:
(WebCore::toJS):
2013-09-23 Andreas Kling <akling@apple.com>
CTTE: RenderObject::container() should return a RenderElement*.
<https://webkit.org/b/121811>
Reviewed by Antti Koivisto.
The containing renderer is always a RenderElement.
2013-09-23 Anders Carlsson <andersca@apple.com>
Test the waters and begin using lambdas
https://bugs.webkit.org/show_bug.cgi?id=121809
Reviewed by Andreas Kling.
Use lambdas instead of static functions and function objects.
* css/MediaQuery.cpp:
(WebCore::MediaQuery::MediaQuery):
* dom/MutationObserver.cpp:
(WebCore::MutationObserver::deliverAllMutations):
* page/CaptionUserPreferences.cpp:
(WebCore::CaptionUserPreferences::sortedTrackListForMenu):
2013-09-23 Patrick Gansterer <paroga@webkit.org>
[WIN] Add implementation for WebCore::readFromFile()
https://bugs.webkit.org/show_bug.cgi?id=119210
Reviewed by Brent Fulgham.
* platform/win/FileSystemWin.cpp:
(WebCore::readFromFile):
2013-09-23 Patrick Gansterer <paroga@webkit.org>
[WIN] Implement WebMutableURLRequest::setHTTPBody()
https://bugs.webkit.org/show_bug.cgi?id=91920
Reviewed by Brent Fulgham.
Add a method to FormData for growing the internal buffer with a given size.
* platform/network/FormData.cpp:
(WebCore::FormData::appendData):
(WebCore::FormData::expandDataStore):
* platform/network/FormData.h:
2013-09-23 Patrick Gansterer <paroga@webkit.org>
use NOMINMAX instead of #define min min
https://bugs.webkit.org/show_bug.cgi?id=73563
Reviewed by Brent Fulgham.
Use NOMINMAX instead of #define min/max as a cleaner
way of ensuring that Windows system header files don't
define min/max as macro in the first place.
* WebCorePrefix.h:
* config.h:
2013-09-23 Simon Fraser <simon.fraser@apple.com>
REGRESSION (r155998): when zooming in, tiles are too small
https://bugs.webkit.org/show_bug.cgi?id=121765
Reviewed by Dean Jackson.
In r155998 I made GraphicsLayerCA take root-relative transforms
into account when computing contentsScale, and landed a bunch of
new results which should actually have told me that I broke page
scaling.
We don't want to take page scale into account when computing contentsScale,
because we already do so, so ignore the transform on the layer that
applies page scale (the only transform it should ever has is the page scale).
* platform/graphics/ca/GraphicsLayerCA.cpp:
(WebCore::GraphicsLayerCA::updateRootRelativeScale):
2013-09-23 Antonio Gomes <a1.gomes@sisa.samsung.com>
iframe and scrollbar with "overflow:auto" should support autoscroll with mousedrag
https://bugs.webkit.org/show_bug.cgi?id=40981
Reviewed by Darin Adler.
RenderBox::calculateAutoscrollDirection does not properly translate
inner frames' coordinates in order to determine its auto-scrollability.
By coincidence, if the inner frame box it placed near to page's 0, 0 position
(upper left corner), it might work.
Patch fixes it by changing ::calculateAutoscrollDirection algorithm to operate
with window coordinates, taking inner frames offset and scroll position into account.
The behavior of auto-scrollable non-frame overflow boxes, including divs, still works
as it is used to.
Test: fast/events/drag-and-drop-autoscroll-inner-frame.html
* rendering/RenderBox.cpp:
(WebCore::RenderBox::calculateAutoscrollDirection):
2013-09-23 Brady Eidson <beidson@apple.com>
Move LevelDB specific IDB files into their own subdirectory.
https://bugs.webkit.org/show_bug.cgi?id=121804
Rubberstamped by Alexey Proskuryakov.
* CMakeLists.txt:
* GNUmakefile.list.am:
* WebCore.xcodeproj/project.pbxproj:
* Modules/indexeddb/leveldb/IDBBackingStoreLevelDB.cpp: Renamed from Source/WebCore/Modules/indexeddb/IDBBackingStore.cpp.
(WebCore::recordInternalError):
(WebCore::putBool):
(WebCore::getInt):
(WebCore::putInt):
(WebCore::getVarInt):
(WebCore::putVarInt):
(WebCore::getString):
(WebCore::putString):
(WebCore::putIDBKeyPath):
(WebCore::compareKeys):
(WebCore::compareIndexKeys):
(WebCore::Comparator::compare):
(WebCore::Comparator::name):
(WebCore::isSchemaKnown):
(WebCore::setUpMetadata):
(WebCore::getMaxObjectStoreId):
(WebCore::DefaultLevelDBFactory::openLevelDB):
(WebCore::DefaultLevelDBFactory::destroyLevelDB):
(WebCore::IDBBackingStore::IDBBackingStore):
(WebCore::IDBBackingStore::~IDBBackingStore):
(WebCore::IDBBackingStore::open):
(WebCore::IDBBackingStore::openInMemory):
(WebCore::IDBBackingStore::create):
(WebCore::IDBBackingStore::getDatabaseNames):
(WebCore::IDBBackingStore::getIDBDatabaseMetaData):
(WebCore::getNewDatabaseId):
(WebCore::IDBBackingStore::createIDBDatabaseMetaData):
(WebCore::IDBBackingStore::updateIDBDatabaseIntVersion):
(WebCore::IDBBackingStore::updateIDBDatabaseMetaData):
(WebCore::deleteRange):
(WebCore::IDBBackingStore::deleteDatabase):
(WebCore::checkObjectStoreAndMetaDataType):
(WebCore::IDBBackingStore::getObjectStores):
(WebCore::setMaxObjectStoreId):
(WebCore::IDBBackingStore::createObjectStore):
(WebCore::IDBBackingStore::deleteObjectStore):
(WebCore::IDBBackingStore::getRecord):
(WebCore::getNewVersionNumber):
(WebCore::IDBBackingStore::putRecord):
(WebCore::IDBBackingStore::clearObjectStore):
(WebCore::IDBBackingStore::deleteRecord):
(WebCore::IDBBackingStore::getKeyGeneratorCurrentNumber):
(WebCore::IDBBackingStore::maybeUpdateKeyGeneratorCurrentNumber):
(WebCore::IDBBackingStore::keyExistsInObjectStore):
(WebCore::checkIndexAndMetaDataKey):
(WebCore::IDBBackingStore::getIndexes):
(WebCore::setMaxIndexId):
(WebCore::IDBBackingStore::createIndex):
(WebCore::IDBBackingStore::deleteIndex):
(WebCore::IDBBackingStore::putIndexDataForRecord):
(WebCore::findGreatestKeyLessThanOrEqual):
(WebCore::versionExists):
(WebCore::IDBBackingStore::findKeyInIndex):
(WebCore::IDBBackingStore::getPrimaryKeyViaIndex):
(WebCore::IDBBackingStore::keyExistsInIndex):
(WebCore::IDBBackingStore::Cursor::Cursor):
(WebCore::IDBBackingStore::Cursor::firstSeek):
(WebCore::IDBBackingStore::Cursor::advance):
(WebCore::IDBBackingStore::Cursor::continueFunction):
(WebCore::IDBBackingStore::Cursor::haveEnteredRange):
(WebCore::IDBBackingStore::Cursor::isPastBounds):
(WebCore::ObjectStoreKeyCursorImpl::create):
(WebCore::ObjectStoreKeyCursorImpl::clone):
(WebCore::ObjectStoreKeyCursorImpl::value):
(WebCore::ObjectStoreKeyCursorImpl::encodeKey):
(WebCore::ObjectStoreKeyCursorImpl::ObjectStoreKeyCursorImpl):
(WebCore::ObjectStoreKeyCursorImpl::loadCurrentRow):
(WebCore::ObjectStoreCursorImpl::create):
(WebCore::ObjectStoreCursorImpl::clone):
(WebCore::ObjectStoreCursorImpl::value):
(WebCore::ObjectStoreCursorImpl::encodeKey):
(WebCore::ObjectStoreCursorImpl::ObjectStoreCursorImpl):
(WebCore::ObjectStoreCursorImpl::loadCurrentRow):
(WebCore::IndexKeyCursorImpl::create):
(WebCore::IndexKeyCursorImpl::clone):
(WebCore::IndexKeyCursorImpl::value):
(WebCore::IndexKeyCursorImpl::primaryKey):
(WebCore::IndexKeyCursorImpl::recordIdentifier):
(WebCore::IndexKeyCursorImpl::encodeKey):
(WebCore::IndexKeyCursorImpl::IndexKeyCursorImpl):
(WebCore::IndexKeyCursorImpl::loadCurrentRow):
(WebCore::IndexCursorImpl::create):
(WebCore::IndexCursorImpl::clone):
(WebCore::IndexCursorImpl::value):
(WebCore::IndexCursorImpl::primaryKey):
(WebCore::IndexCursorImpl::recordIdentifier):
(WebCore::IndexCursorImpl::encodeKey):
(WebCore::IndexCursorImpl::IndexCursorImpl):
(WebCore::IndexCursorImpl::loadCurrentRow):
(WebCore::objectStoreCursorOptions):
(WebCore::indexCursorOptions):
(WebCore::IDBBackingStore::openObjectStoreCursor):
(WebCore::IDBBackingStore::openObjectStoreKeyCursor):
(WebCore::IDBBackingStore::openIndexKeyCursor):
(WebCore::IDBBackingStore::openIndexCursor):
(WebCore::IDBBackingStore::Transaction::Transaction):
(WebCore::IDBBackingStore::Transaction::begin):
(WebCore::IDBBackingStore::Transaction::commit):
(WebCore::IDBBackingStore::Transaction::rollback):
* Modules/indexeddb/leveldb/IDBLevelDBCoding.cpp: Renamed from Source/WebCore/Modules/indexeddb/IDBLevelDBCoding.cpp.
(WebCore::IDBLevelDBCoding::encodeByte):
(WebCore::IDBLevelDBCoding::decodeByte):
(WebCore::IDBLevelDBCoding::maxIDBKey):
(WebCore::IDBLevelDBCoding::minIDBKey):
(WebCore::IDBLevelDBCoding::encodeBool):
(WebCore::IDBLevelDBCoding::decodeBool):
(WebCore::IDBLevelDBCoding::encodeInt):
(WebCore::IDBLevelDBCoding::decodeInt):
(WebCore::IDBLevelDBCoding::compareInts):
(WebCore::IDBLevelDBCoding::encodeVarInt):
(WebCore::IDBLevelDBCoding::decodeVarInt):
(WebCore::IDBLevelDBCoding::encodeString):
(WebCore::IDBLevelDBCoding::decodeString):
(WebCore::IDBLevelDBCoding::encodeStringWithLength):
(WebCore::IDBLevelDBCoding::decodeStringWithLength):
(WebCore::IDBLevelDBCoding::compareEncodedStringsWithLength):
(WebCore::IDBLevelDBCoding::encodeDouble):
(WebCore::IDBLevelDBCoding::decodeDouble):
(WebCore::IDBLevelDBCoding::encodeIDBKey):
(WebCore::IDBLevelDBCoding::decodeIDBKey):
(WebCore::IDBLevelDBCoding::extractEncodedIDBKey):
(WebCore::IDBLevelDBCoding::keyTypeByteToKeyType):
(WebCore::IDBLevelDBCoding::compareEncodedIDBKeys):
(WebCore::IDBLevelDBCoding::encodeIDBKeyPath):
(WebCore::IDBLevelDBCoding::decodeIDBKeyPath):
(WebCore::IDBLevelDBCoding::compare):
(WebCore::IDBLevelDBCoding::KeyPrefix::KeyPrefix):
(WebCore::IDBLevelDBCoding::KeyPrefix::createWithSpecialIndex):
(WebCore::IDBLevelDBCoding::KeyPrefix::isValidDatabaseId):
(WebCore::IDBLevelDBCoding::KeyPrefix::isValidObjectStoreId):
(WebCore::IDBLevelDBCoding::KeyPrefix::isValidIndexId):
(WebCore::IDBLevelDBCoding::KeyPrefix::decode):
(WebCore::IDBLevelDBCoding::KeyPrefix::encodeEmpty):
(WebCore::IDBLevelDBCoding::KeyPrefix::encode):
(WebCore::IDBLevelDBCoding::KeyPrefix::encodeInternal):
(WebCore::IDBLevelDBCoding::KeyPrefix::compare):
(WebCore::IDBLevelDBCoding::KeyPrefix::type):
(WebCore::IDBLevelDBCoding::SchemaVersionKey::encode):
(WebCore::IDBLevelDBCoding::MaxDatabaseIdKey::encode):
(WebCore::IDBLevelDBCoding::DataVersionKey::encode):
(WebCore::IDBLevelDBCoding::DatabaseFreeListKey::DatabaseFreeListKey):
(WebCore::IDBLevelDBCoding::DatabaseFreeListKey::decode):
(WebCore::IDBLevelDBCoding::DatabaseFreeListKey::encode):
(WebCore::IDBLevelDBCoding::DatabaseFreeListKey::encodeMaxKey):
(WebCore::IDBLevelDBCoding::DatabaseFreeListKey::databaseId):
(WebCore::IDBLevelDBCoding::DatabaseFreeListKey::compare):
(WebCore::IDBLevelDBCoding::DatabaseNameKey::decode):
(WebCore::IDBLevelDBCoding::DatabaseNameKey::encode):
(WebCore::IDBLevelDBCoding::DatabaseNameKey::encodeMinKeyForOrigin):
(WebCore::IDBLevelDBCoding::DatabaseNameKey::encodeStopKeyForOrigin):
(WebCore::IDBLevelDBCoding::DatabaseNameKey::compare):
(WebCore::IDBLevelDBCoding::DatabaseMetaDataKey::encode):
(WebCore::IDBLevelDBCoding::ObjectStoreMetaDataKey::ObjectStoreMetaDataKey):
(WebCore::IDBLevelDBCoding::ObjectStoreMetaDataKey::decode):
(WebCore::IDBLevelDBCoding::ObjectStoreMetaDataKey::encode):
(WebCore::IDBLevelDBCoding::ObjectStoreMetaDataKey::encodeMaxKey):
(WebCore::IDBLevelDBCoding::ObjectStoreMetaDataKey::objectStoreId):
(WebCore::IDBLevelDBCoding::ObjectStoreMetaDataKey::metaDataType):
(WebCore::IDBLevelDBCoding::ObjectStoreMetaDataKey::compare):
(WebCore::IDBLevelDBCoding::IndexMetaDataKey::IndexMetaDataKey):
(WebCore::IDBLevelDBCoding::IndexMetaDataKey::decode):
(WebCore::IDBLevelDBCoding::IndexMetaDataKey::encode):
(WebCore::IDBLevelDBCoding::IndexMetaDataKey::encodeMaxKey):
(WebCore::IDBLevelDBCoding::IndexMetaDataKey::compare):
(WebCore::IDBLevelDBCoding::IndexMetaDataKey::indexId):
(WebCore::IDBLevelDBCoding::ObjectStoreFreeListKey::ObjectStoreFreeListKey):
(WebCore::IDBLevelDBCoding::ObjectStoreFreeListKey::decode):
(WebCore::IDBLevelDBCoding::ObjectStoreFreeListKey::encode):
(WebCore::IDBLevelDBCoding::ObjectStoreFreeListKey::encodeMaxKey):
(WebCore::IDBLevelDBCoding::ObjectStoreFreeListKey::objectStoreId):
(WebCore::IDBLevelDBCoding::ObjectStoreFreeListKey::compare):
(WebCore::IDBLevelDBCoding::IndexFreeListKey::IndexFreeListKey):
(WebCore::IDBLevelDBCoding::IndexFreeListKey::decode):
(WebCore::IDBLevelDBCoding::IndexFreeListKey::encode):
(WebCore::IDBLevelDBCoding::IndexFreeListKey::encodeMaxKey):
(WebCore::IDBLevelDBCoding::IndexFreeListKey::compare):
(WebCore::IDBLevelDBCoding::IndexFreeListKey::objectStoreId):
(WebCore::IDBLevelDBCoding::IndexFreeListKey::indexId):
(WebCore::IDBLevelDBCoding::ObjectStoreNamesKey::decode):
(WebCore::IDBLevelDBCoding::ObjectStoreNamesKey::encode):
(WebCore::IDBLevelDBCoding::ObjectStoreNamesKey::compare):
(WebCore::IDBLevelDBCoding::IndexNamesKey::IndexNamesKey):
(WebCore::IDBLevelDBCoding::IndexNamesKey::decode):
(WebCore::IDBLevelDBCoding::IndexNamesKey::encode):
(WebCore::IDBLevelDBCoding::IndexNamesKey::compare):
(WebCore::IDBLevelDBCoding::ObjectStoreDataKey::decode):
(WebCore::IDBLevelDBCoding::ObjectStoreDataKey::encode):
(WebCore::IDBLevelDBCoding::ObjectStoreDataKey::compare):
(WebCore::IDBLevelDBCoding::ObjectStoreDataKey::userKey):
(WebCore::IDBLevelDBCoding::ExistsEntryKey::decode):
(WebCore::IDBLevelDBCoding::ExistsEntryKey::encode):
(WebCore::IDBLevelDBCoding::ExistsEntryKey::compare):
(WebCore::IDBLevelDBCoding::ExistsEntryKey::userKey):
(WebCore::IDBLevelDBCoding::IndexDataKey::IndexDataKey):
(WebCore::IDBLevelDBCoding::IndexDataKey::decode):
(WebCore::IDBLevelDBCoding::IndexDataKey::encode):
(WebCore::IDBLevelDBCoding::IndexDataKey::encodeMinKey):
(WebCore::IDBLevelDBCoding::IndexDataKey::encodeMaxKey):
(WebCore::IDBLevelDBCoding::IndexDataKey::compare):
(WebCore::IDBLevelDBCoding::IndexDataKey::databaseId):
(WebCore::IDBLevelDBCoding::IndexDataKey::objectStoreId):
(WebCore::IDBLevelDBCoding::IndexDataKey::indexId):
(WebCore::IDBLevelDBCoding::IndexDataKey::userKey):
(WebCore::IDBLevelDBCoding::IndexDataKey::primaryKey):
* Modules/indexeddb/leveldb/IDBLevelDBCoding.h: Renamed from Source/WebCore/Modules/indexeddb/IDBLevelDBCoding.h.
(WebCore::IDBLevelDBCoding::encodeIntSafely):
(WebCore::IDBLevelDBCoding::KeyPrefix::validIds):
(WebCore::IDBLevelDBCoding::DatabaseNameKey::origin):
(WebCore::IDBLevelDBCoding::DatabaseNameKey::databaseName):
(WebCore::IDBLevelDBCoding::IndexMetaDataKey::metaDataType):
(WebCore::IDBLevelDBCoding::ObjectStoreNamesKey::objectStoreName):
(WebCore::IDBLevelDBCoding::IndexNamesKey::indexName):
2013-09-23 Antti Koivisto <antti@apple.com>
Try to fix GTK build.
Not reviewed.
* accessibility/atk/AccessibilityObjectAtk.cpp:
(WebCore::AccessibilityObject::accessibilityPlatformIncludesObject):
* accessibility/atk/WebKitAccessibleInterfaceText.cpp:
(textForRenderer):
2013-09-23 Alexandru Chiculita <achicu@adobe.com>
Web Inspector: [CSS Regions] Display CSS Regions flow name in the inspector overlay
https://bugs.webkit.org/show_bug.cgi?id=121794
Reviewed by Joseph Pecoraro.
No new tests, the previous test for CSS Regions highlighting covers the flow name.
This patch adds the "Flow" property in the inspector overlay. The region
chain is already displayed with numbers, so it makes sense to have the flow
name around when a CSS region is highlighted.
I've consolidated the flow information into "elementInfo.flowInfo".
Flow info has two properties: "name" and "regions".
* inspector/InspectorOverlay.cpp:
(WebCore::buildObjectForCSSRegionsHighlight):
(WebCore::InspectorOverlay::buildObjectForHighlightedNode):
* inspector/InspectorOverlayPage.css:
(.css-property): Added the CSS property font color that the Inspector uses.
* inspector/InspectorOverlayPage.html: Added a new element to be used to display the flow-from property.
* inspector/InspectorOverlayPage.js:
(_drawElementTitle):
(drawNodeHighlight):
2013-09-23 Simon Fraser <simon.fraser@apple.com>
Rapidly loading pages can result in !needsLayout() assertions in FrameView::paintContents() and RenderView::paint()
https://bugs.webkit.org/show_bug.cgi?id=121725
<rdar://problem/13982161> ASSERT(!needsLayout()) in WebCore::RenderView::paint (121196)
Reviewed by Dean Jackson.
Layout has to be up-to-date before we paint, and when composited we rely on a
CFRunLoopObserver owned by LayerFlushScheduler to enforce this. The contract is
that changes to GraphicsLayers accumulate in those layers, and are all pushed to
CALayers only inside of flushCompositingState(). CALayers must not be touched
directly outside of flushCompositingState(), since this may trigger a CA commit
and resultant painting without us having updated layout.
In addition, we rely on the CA commits only happening after our runloop observer
has fired in order for LayerFlushScheduler's suspend/resume to work (these are used
for freezing the layer tree during page transitions).
However, TileController was violating this contract. It called revalidateTiles()
at random times, and on a timer. This would result in CA commits happening when
layer flushing was suspended at the LayerFlushScheduler level, and thus before
we'd had a chance to do layout.
Fix by only ever revalidatingTiles inside of flushCompositingState(). Calls
that used to result in revalidateTiles() at other times now just set a bit
on GraphicsLayerCA to indicate that revalidation is required, and this triggers
a later flush like any other GraphicsLayerCA change.
There is one exception to the revalidate-inside-flush rule: when purging
files for background tabs on a timer, we are only dealing with an unparented
layer tree, so CALayer manipulation is safe at any time.
Very timing dependent, so hard to test.
* platform/graphics/TiledBacking.h: Expose revalidateTiles()
* platform/graphics/avfoundation/cf/MediaPlayerPrivateAVFoundationCF.cpp: Remove
platformCALayerDidCreateTiles() override.
* platform/graphics/ca/GraphicsLayerCA.h: Keep track of m_isCommittingChanges
so we can assert. Add TilingAreaChanged flag.
* platform/graphics/ca/GraphicsLayerCA.cpp:
(WebCore::GraphicsLayerCA::GraphicsLayerCA):
(WebCore::GraphicsLayerCA::recursiveCommitChanges): noteSublayersChanged() is
used inside of a commit in some cases to trigger a parent layer to update
children after the children have been processed. To avoid trying to pointlessly
schedule the flusher inside a flush, and for strong assertions, use a new flag
that indicates that flushing is not required in this situation.
Set the m_isCommittingChanges flag around committing state.
(WebCore::GraphicsLayerCA::platformCALayerSetNeedsToRevalidateTiles): We used
to use platformCALayerDidCreateTiles() to ensure that we would flush after adding
new tiles to avoid garbage flashes. Now that we only ever create tiles inside
a flush, this is no longer necessary.
The new platformCALayerSetNeedsToRevalidateTiles() function just sets the
TilingAreaChanged flag and triggers a flush.
(WebCore::GraphicsLayerCA::commitLayerChangesBeforeSublayers): After updating
visible rect, we look for the TilingAreaChanged flag to tell us whether to
revalidate TiledBacking tiles.
(WebCore::GraphicsLayerCA::ensureStructuralLayer): Use DontScheduleFlush when
telling a parent layer that it needs to reconsider sublayers.
(WebCore::GraphicsLayerCA::updateTiles): The caller of revalidateTiles().
(WebCore::GraphicsLayerCA::updateContentsRects): DontScheduleFlush again.
(WebCore::GraphicsLayerCA::noteSublayersChanged): Pass scheduleFlush along.
(WebCore::GraphicsLayerCA::noteLayerPropertyChanged): Handle scheduleFlush.
* platform/graphics/ca/PlatformCALayerClient.h:
(WebCore::PlatformCALayerClient::platformCALayerSetNeedsToRevalidateTiles): Added
so that TileController can call back out to GraphicsLayerCA.
(WebCore::PlatformCALayerClient::isCommittingChanges):
* platform/graphics/ca/mac/TileController.h: Need to keep track of secondary
coverage rects in m_secondaryTileCoverageRects.
* platform/graphics/ca/mac/TileController.mm:
(WebCore::TileController::tileCacheLayerBoundsChanged): Just trigger a tile revalidate,
which will happen later in this same commit.
(WebCore::TileController::setScale): This is called inside the commit. Does an extra
revalidate, which is needed to prune tiles. This could be optimized in future.
(WebCore::TileController::setVisibleRect): Assert that we're inside a commit,
and trigger a revalidate.
(WebCore::TileController::setExposedRect): Trigger a revalidate.
(WebCore::TileController::setClipsToExposedRect): Ditto.
(WebCore::TileController::prepopulateRect): Save the rect and trigger a revalidate.
(WebCore::TileController::setIsInWindow): If we're in the window, trigger a revalidate
otherwise schedule the timer.
(WebCore::TileController::revalidateTiles): Wrapper for the real revalidateTiles().
(WebCore::TileController::tileRevalidationTimerFired): If we're in the window,
schedule a revalidate. Otherwise our layer tree is disconnected, and it's OK to call revalidateTiles().
(WebCore::TileController::setNeedsRevalidateTiles): Call through the client to GraphicsLayerCA
which will schedule a layer tree flush.
(WebCore::TileController::revalidateTiles):
(WebCore::TileController::ensureTilesForRect): Move code from prepopulateRect
into here; ensureTilesForRect() for each secondary rect, then clear the rects.
No need to call platformCALayerDidCreateTiles() at the end.
* platform/graphics/win/MediaPlayerPrivateQuickTimeVisualContext.cpp: Remove
platformCALayerDidCreateTiles() override.
* rendering/RenderLayerCompositor.cpp:
(WebCore::RenderLayerCompositor::scheduleLayerFlush): This should only be
called when we're not inside a flush, otherwise it will fail to schedule
another one.
2013-09-23 Sam Weinig <sam@webkit.org>
CTTE: htmlediting.h Element creation function should take a Document&
https://bugs.webkit.org/show_bug.cgi?id=121800
Reviewed by Antti Koivisto.
Thread the Document&!
2013-09-23 Jacky Jiang <zhajiang@blackberry.com>
[BlackBerry] Poor rendering opening a Google map short link
https://bugs.webkit.org/show_bug.cgi?id=121687
Reviewed by Yong Li.
Internally reviewed by Liam Quinn and Joe Mason.
Fix a regression. It turns out that LayerCompositingThread already has
an API named isVisible() which by default returns false. So rename the
one in the LayerData to isLayerVisible().
* platform/graphics/blackberry/LayerData.h:
(WebCore::LayerData::isLayerVisible):
* platform/graphics/blackberry/LayerRenderer.cpp:
(WebCore::LayerRenderer::compositeLayersRecursive):
2013-09-23 Antti Koivisto <antti@apple.com>
Rename RenderObject::first/lastChild to RenderObject::first/lastChildSlow
https://bugs.webkit.org/show_bug.cgi?id=121784
Reviewed by Andreas Kling.
This will make it obvious in code where typing should be tightened.
Handled some simple cases by tightening the code instead of renaming.
2013-09-23 ChangSeok Oh <changseok.oh@collabora.com>
[Texmap] Reloading a webgl page doesn't work
https://bugs.webkit.org/show_bug.cgi?id=120593
Reviewed by Noam Rosenthal.
Let GraphicsLayerTextureMapper know it needs to detach the platform layer when a GraphicsContext3D is destroyed.
Test: fast/canvas/webgl/webgl-reload-crash.html
* platform/graphics/GraphicsContext3DPrivate.cpp:
(WebCore::GraphicsContext3DPrivate::~GraphicsContext3DPrivate):
* platform/graphics/texmap/GraphicsLayerTextureMapper.h:
* platform/graphics/texmap/TextureMapperPlatformLayer.h:
2013-09-23 Antti Koivisto <antti@apple.com>
Remove RenderObjectChildList
https://bugs.webkit.org/show_bug.cgi?id=121771
Reviewed by Darin Adler.
Most RenderElement subclasses have m_children member (>90% of instances on typical page). It is not worth optimising
for memory for the few cases that don't (RenderImage, RenderLineBreak mostly) in expense of performance.
This patch moves child handling to RenderElement. This gets rid of virtual children() calls and simplifies the code.
2013-09-23 Andreas Kling <akling@apple.com>
Document::destroyRenderTree() shouldn't do anything but.
<https://webkit.org/b/121786>
Reviewed by Anders Carlsson.
Move everything in destroyRenderTree() that doesn't actually destroy
render trees to prepareForDestruction() instead.
Destroying the render tree is now a reparable operation.
2013-09-23 Allan Sandfeld Jensen <allan.jensen@digia.com>
[Qt] Tiled backing-store causes wrong translation
https://bugs.webkit.org/show_bug.cgi?id=121789
Reviewed by Noam Rosenthal.
Move the translation inside save/restore of the GraphicsContext.
* platform/graphics/qt/TileQt.cpp:
(WebCore::TileQt::updateBackBuffer):
2013-09-23 Andreas Kling <akling@apple.com>
Unify code paths leading to render tree teardown.
<https://webkit.org/b/121785>
Reviewed by Antti Koivisto.
Make Document::prepareForDestruction() fit all the call sites that were
doing destroyRenderTree() + disconnectFromFrame().
- disconnectDescendantFrames() is already a no-op if there are no frames.
- willDetachDocumentFromFrame() will only run if there is a frame.
This is another step towards making tree rebuild possible.
Removed some age-old FIXMEs about why we aren't calling willRemove(),
a long-gone function.
2013-09-23 Patrick Gansterer <paroga@webkit.org>
Cleanup CMake files in WebCore
https://bugs.webkit.org/show_bug.cgi?id=119262
Reviewed by Gyuyoung Kim.
Sort files and unify style.
* CMakeLists.txt:
* PlatformBlackBerry.cmake:
* PlatformEfl.cmake:
* PlatformGTK.cmake:
* PlatformWin.cmake:
* PlatformWinCE.cmake:
2013-09-22 Commit Queue <commit-queue@webkit.org>
Unreviewed, rolling out r156254.
http://trac.webkit.org/changeset/156254
https://bugs.webkit.org/show_bug.cgi?id=121779
Caused assertions in fast/regions tests (Requested by ap on
#webkit).
* CMakeLists.txt:
* GNUmakefile.list.am:
* Target.pri:
* WebCore.vcxproj/WebCore.vcxproj:
* WebCore.xcodeproj/project.pbxproj:
* rendering/AutoTableLayout.cpp:
(WebCore::AutoTableLayout::recalcColumn):
* rendering/RenderBlock.cpp:
(WebCore::RenderBlock::willBeDestroyed):
(WebCore::RenderBlock::addChildToAnonymousColumnBlocks):
(WebCore::RenderBlock::splitBlocks):
(WebCore::RenderBlock::splitFlow):
(WebCore::RenderBlock::makeChildrenAnonymousColumnBlocks):
(WebCore::RenderBlock::makeChildrenNonInline):
(WebCore::RenderBlock::removeLeftoverAnonymousBlock):
(WebCore::RenderBlock::collapseAnonymousBoxChild):
(WebCore::RenderBlock::removeChild):
(WebCore::RenderBlock::updateFirstLetterStyle):
* rendering/RenderBlock.h:
(WebCore::RenderBlock::firstChild):
(WebCore::RenderBlock::lastChild):
* rendering/RenderBox.cpp:
(WebCore::RenderBox::splitAnonymousBoxesAroundChild):
* rendering/RenderBoxModelObject.cpp:
(WebCore::RenderBoxModelObject::moveChildTo):
* rendering/RenderElement.cpp:
(WebCore::RenderElement::RenderElement):
(WebCore::RenderElement::addChild):
(WebCore::RenderElement::removeChild):
* rendering/RenderElement.h:
* rendering/RenderEmbeddedObject.cpp:
(WebCore::RenderEmbeddedObject::layout):
* rendering/RenderEmbeddedObject.h:
* rendering/RenderFrameSet.h:
* rendering/RenderInline.cpp:
(WebCore::RenderInline::willBeDestroyed):
(WebCore::RenderInline::splitInlines):
(WebCore::RenderInline::splitFlow):
(WebCore::RenderInline::childBecameNonInline):
* rendering/RenderInline.h:
(WebCore::RenderInline::firstChild):
(WebCore::RenderInline::lastChild):
* rendering/RenderLayerModelObject.cpp:
(WebCore::RenderLayerModelObject::willBeDestroyed):
* rendering/RenderLineBreak.h:
* rendering/RenderListMarker.h:
* rendering/RenderMedia.cpp:
(WebCore::RenderMedia::layout):
* rendering/RenderMedia.h:
(WebCore::RenderMedia::firstChild):
(WebCore::RenderMedia::lastChild):
* rendering/RenderObject.cpp:
(WebCore::RenderObject::handleDynamicFloatPositionChange):
(WebCore::RenderObject::willBeDestroyed):
(WebCore::RenderObject::removeFromRenderFlowThreadRecursive):
* rendering/RenderObject.h:
(WebCore::RenderObject::firstChild):
(WebCore::RenderObject::lastChild):
(WebCore::RenderObject::children):
(WebCore::RenderObject::canHaveChildren):
* rendering/RenderObjectChildList.cpp: Added.
(WebCore::RenderObjectChildList::destroyLeftoverChildren):
(WebCore::RenderObjectChildList::removeChildNode):
(WebCore::RenderObjectChildList::insertChildNode):
* rendering/RenderObjectChildList.h: Copied from Source/WebCore/rendering/RenderMedia.h.
(WebCore::RenderObjectChildList::RenderObjectChildList):
(WebCore::RenderObjectChildList::firstChild):
(WebCore::RenderObjectChildList::lastChild):
(WebCore::RenderObjectChildList::setFirstChild):
(WebCore::RenderObjectChildList::setLastChild):
(WebCore::RenderObjectChildList::appendChildNode):
* rendering/RenderReplaced.h:
(WebCore::RenderReplaced::canHaveChildren):
* rendering/RenderReplica.h:
* rendering/RenderRubyBase.cpp:
(WebCore::RenderRubyBase::moveInlineChildren):
(WebCore::RenderRubyBase::moveBlockChildren):
* rendering/RenderTableCol.h:
* rendering/RenderTableRow.h:
* rendering/RenderTableSection.h:
* rendering/RenderText.h:
* rendering/RenderingAllInOne.cpp:
* rendering/mathml/RenderMathMLOperator.cpp:
(WebCore::RenderMathMLOperator::updateFromElement):
* rendering/svg/RenderSVGContainer.h:
(WebCore::RenderSVGContainer::firstChild):
(WebCore::RenderSVGContainer::lastChild):
* rendering/svg/RenderSVGGradientStop.h:
* rendering/svg/RenderSVGImage.h:
* rendering/svg/RenderSVGModelObject.cpp:
(WebCore::RenderSVGModelObject::willBeDestroyed):
* rendering/svg/RenderSVGRoot.h:
* rendering/svg/RenderSVGShape.h:
2013-09-22 Commit Queue <commit-queue@webkit.org>
Unreviewed, rolling out r156253.
http://trac.webkit.org/changeset/156253
https://bugs.webkit.org/show_bug.cgi?id=121778
Caused >20 tests to crash with assertion failures (Requested
by ap on #webkit).
* css/CSSAspectRatioValue.h:
* css/CSSBorderImageSliceValue.h:
* css/CSSCalculationValue.cpp:
(WebCore::CSSCalcExpressionNodeParser::parseValue):
* css/CSSCalculationValue.h:
* css/CSSCrossfadeValue.cpp:
(WebCore::subimageKnownToBeOpaque):
* css/CSSCrossfadeValue.h:
(WebCore::toCSSCrossfadeValue):
* css/CSSCursorImageValue.cpp:
(WebCore::CSSCursorImageValue::~CSSCursorImageValue):
(WebCore::CSSCursorImageValue::updateIfSVGCursorIsUsed):
(WebCore::CSSCursorImageValue::cachedImage):
(WebCore::CSSCursorImageValue::cachedOrPendingImage):
(WebCore::CSSCursorImageValue::isSVGCursor):
* css/CSSCursorImageValue.h:
* css/CSSFilterImageValue.h:
(WebCore::toCSSFilterImageValue):
* css/CSSFontSelector.cpp:
(WebCore::CSSFontSelector::addFontFaceRule):
* css/CSSGradientValue.h:
* css/CSSImageGeneratorValue.cpp:
(WebCore::CSSImageGeneratorValue::image):
(WebCore::CSSImageGeneratorValue::fixedSize):
(WebCore::CSSImageGeneratorValue::loadSubimages):
(WebCore::CSSImageGeneratorValue::subimageIsPending):
(WebCore::CSSImageGeneratorValue::cachedImageForCSSValue):
* css/CSSImageGeneratorValue.h:
* css/CSSImageSetValue.cpp:
(WebCore::CSSImageSetValue::fillImageSet):
* css/CSSImageSetValue.h:
* css/CSSImageValue.h:
* css/CSSInheritedValue.h:
* css/CSSInitialValue.h:
* css/CSSLineBoxContainValue.h:
* css/CSSParser.cpp:
(WebCore::CSSParser::parseColor):
(WebCore::CSSParser::addProperty):
(WebCore::CSSParser::parse3ValuesFillPosition):
(WebCore::CSSParser::parseFillPosition):
(WebCore::CSSParser::parseFillRepeat):
(WebCore::CSSParser::parseDeprecatedRadialGradient):
(WebCore::CSSParser::parseRadialGradient):
* css/CSSPrimitiveValue.h:
* css/CSSReflectValue.h:
* css/CSSToStyleMap.cpp:
(WebCore::CSSToStyleMap::mapFillAttachment):
(WebCore::CSSToStyleMap::mapFillClip):
(WebCore::CSSToStyleMap::mapFillComposite):
(WebCore::CSSToStyleMap::mapFillBlendMode):
(WebCore::CSSToStyleMap::mapFillOrigin):
(WebCore::CSSToStyleMap::mapFillRepeatX):
(WebCore::CSSToStyleMap::mapFillRepeatY):
(WebCore::CSSToStyleMap::mapFillSize):
(WebCore::CSSToStyleMap::mapFillXPosition):
(WebCore::CSSToStyleMap::mapFillYPosition):
(WebCore::CSSToStyleMap::mapFillMaskSourceType):
(WebCore::CSSToStyleMap::mapAnimationDelay):
(WebCore::CSSToStyleMap::mapAnimationDirection):
(WebCore::CSSToStyleMap::mapAnimationDuration):
(WebCore::CSSToStyleMap::mapAnimationFillMode):
(WebCore::CSSToStyleMap::mapAnimationIterationCount):
(WebCore::CSSToStyleMap::mapAnimationName):
(WebCore::CSSToStyleMap::mapAnimationPlayState):
(WebCore::CSSToStyleMap::mapAnimationProperty):
(WebCore::CSSToStyleMap::mapAnimationTimingFunction):
(WebCore::CSSToStyleMap::mapNinePieceImageSlice):
(WebCore::CSSToStyleMap::mapNinePieceImageQuad):
(WebCore::CSSToStyleMap::mapNinePieceImageRepeat):
* css/CSSValue.cpp:
(WebCore::CSSValue::destroy):
* css/CSSValue.h:
(WebCore::CSSValue::isCSSLineBoxContainValue):
(WebCore::CSSValue::isCalculationValue):
* css/CSSValueList.h:
* css/CSSVariableValue.h:
* css/DeprecatedStyleBuilder.cpp:
(WebCore::ApplyPropertyDefault::applyValue):
(WebCore::ApplyPropertyNumber::applyValue):
(WebCore::ApplyPropertyAuto::applyValue):
(WebCore::ApplyPropertyClip::applyValue):
(WebCore::ApplyPropertyColor::applyValue):
(WebCore::ApplyPropertyLength::applyValue):
(WebCore::ApplyPropertyString::applyValue):
(WebCore::ApplyPropertyBorderRadius::applyValue):
(WebCore::ApplyPropertyComputeLength::applyValue):
(WebCore::ApplyPropertyFont::applyValue):
(WebCore::ApplyPropertyFontFamily::applyValue):
(WebCore::ApplyPropertyFontSize::applyValue):
(WebCore::ApplyPropertyFontWeight::applyValue):
(WebCore::ApplyPropertyFontVariantLigatures::applyValue):
(WebCore::ApplyPropertyCounter::applyValue):
(WebCore::ApplyPropertyCursor::applyValue):
(WebCore::ApplyPropertyTextAlign::applyValue):
(WebCore::ApplyPropertyTextDecoration::applyValue):
(WebCore::ApplyPropertyMarqueeIncrement::applyValue):
(WebCore::ApplyPropertyMarqueeRepetition::applyValue):
(WebCore::ApplyPropertyMarqueeSpeed::applyValue):
(WebCore::ApplyPropertyTextUnderlinePosition::applyValue):
(WebCore::ApplyPropertyLineHeight::applyValue):
(WebCore::ApplyPropertyLineHeightForIOSTextAutosizing::applyValue):
(WebCore::ApplyPropertyPageSize::applyValue):
(WebCore::ApplyPropertyTextEmphasisStyle::applyValue):
(WebCore::ApplyPropertyResize::applyValue):
(WebCore::ApplyPropertyVerticalAlign::applyValue):
(WebCore::ApplyPropertyAspectRatio::applyValue):
(WebCore::ApplyPropertyZoom::applyValue):
(WebCore::ApplyPropertyDisplay::applyValue):
(WebCore::ApplyPropertyClipPath::applyValue):
(WebCore::ApplyPropertyShape::applyValue):
(WebCore::ApplyPropertyImageResolution::applyValue):
(WebCore::ApplyPropertyTextIndent::applyValue):
* css/FontFeatureValue.h:
* css/FontValue.h:
* css/MediaList.cpp:
(WebCore::reportMediaQueryWarningIfNeeded):
* css/MediaQueryEvaluator.cpp:
(WebCore::compareAspectRatioValue):
(WebCore::numberValue):
(WebCore::orientationMediaFeatureEval):
(WebCore::evalResolution):
(WebCore::device_pixel_ratioMediaFeatureEval):
(WebCore::resolutionMediaFeatureEval):
(WebCore::computeLength):
(WebCore::view_modeMediaFeatureEval):
(WebCore::pointerMediaFeatureEval):
* css/SVGCSSStyleSelector.cpp:
(WebCore::StyleResolver::applySVGProperty):
* css/ShadowValue.h:
* css/StylePropertySet.cpp:
(WebCore::StylePropertySet::getLayeredShorthandValue):
* css/StyleResolver.cpp:
(WebCore::createGridTrackSize):
(WebCore::createGridTrackList):
(WebCore::createGridPosition):
(WebCore::hasVariableReference):
(WebCore::StyleResolver::applyProperty):
(WebCore::StyleResolver::styleImage):
(WebCore::StyleResolver::generatedOrPendingFromValue):
(WebCore::StyleResolver::styleShader):
(WebCore::StyleResolver::parseCustomFilterArrayParameter):
(WebCore::StyleResolver::parseCustomFilterColorParameter):
(WebCore::StyleResolver::parseCustomFilterNumberParameter):
(WebCore::StyleResolver::parseCustomFilterParameter):
(WebCore::StyleResolver::parseCustomFilterParameterList):
(WebCore::StyleResolver::createCustomFilterOperationWithInlineSyntax):
(WebCore::StyleResolver::createFilterOperations):
* css/TransformFunctions.cpp:
(WebCore::transformsForValue):
* css/ViewportStyleResolver.cpp:
(WebCore::ViewportStyleResolver::getViewportArgumentValue):
* css/WebKitCSSMatrix.cpp:
(WebCore::WebKitCSSMatrix::setMatrixValue):
* editing/ApplyStyleCommand.cpp:
(WebCore::ApplyStyleCommand::computedFontSize):
* editing/EditingStyle.cpp:
(WebCore::identifierForStyleProperty):
(WebCore::HTMLElementEquivalent::valueIsPresentInStyle):
(WebCore::cssValueToRGBA):
(WebCore::EditingStyle::extractFontSizeDelta):
(WebCore::EditingStyle::textDirection):
(WebCore::EditingStyle::prepareToApplyAt):
(WebCore::EditingStyle::mergeStyleFromRulesForSerialization):
(WebCore::EditingStyle::legacyFontSize):
(WebCore::EditingStyle::textDirectionForSelection):
(WebCore::StyleChange::extractTextStyles):
(WebCore::fontWeightIsBold):
(WebCore::isTransparentColorValue):
* editing/markup.cpp:
(WebCore::propertyMissingOrEqualToNone):
* page/PageSerializer.cpp:
(WebCore::PageSerializer::retrieveResourcesForProperties):
* rendering/style/StylePendingImage.h:
(WebCore::StylePendingImage::data):
(WebCore::StylePendingImage::cssImageValue):
(WebCore::StylePendingImage::cssImageGeneratorValue):
(WebCore::StylePendingImage::cssCursorImageValue):
(WebCore::StylePendingImage::cssImageSetValue):
2013-09-22 Commit Queue <commit-queue@webkit.org>
Unreviewed, rolling out r156257.
http://trac.webkit.org/changeset/156257
https://bugs.webkit.org/show_bug.cgi?id=121777
The test from this patch fails (Requested by ap on #webkit).
* rendering/RenderBox.cpp:
(WebCore::RenderBox::calculateAutoscrollDirection):
2013-09-22 Antonio Gomes <a1.gomes@sisa.samsung.com>
iframe and scrollbar with "overflow:auto" should support autoscroll with mousedrag
https://bugs.webkit.org/show_bug.cgi?id=40981
Reviewed by Darin Adler.
RenderBox::calculateAutoscrollDirection does not properly translate
inner frames' coordinates in order to determine its auto-scrollability.
By coincidence, if the inner frame box it placed near to page's 0, 0 position
(upper left corner), it might work.
Patch fixes it by changing ::calculateAutoscrollDirection algorithm to operate
with window coordinates, taking inner frames offset and scroll position into account.
The behavior of auto-scrollable non-frame overflow boxes, including divs, still works
as it is used to.
Test: fast/events/drag-and-drop-autoscroll-inner-frame.html
* rendering/RenderBox.cpp:
(WebCore::RenderBox::calculateAutoscrollDirection):
2013-09-22 Sam Weinig <sam@webkit.org>
CTTE: Use references more in ContainerNode, ContainerNodeAlgorithms and related classes
https://bugs.webkit.org/show_bug.cgi?id=121772
Reviewed by Andreas Kling.
Use references for never null Nodes in ContainerNode and related classes.
2013-09-22 Antti Koivisto <antti@apple.com>
Fix functions calling to RenderObject superclass to call RenderElement instead
https://bugs.webkit.org/show_bug.cgi?id=121773
Reviewed by Andreas Kling.
The class hierarchy has a new class. Superclass calls should be pointed there instead to
avoid future bugs.
* rendering/RenderBoxModelObject.cpp:
(WebCore::RenderBoxModelObject::setSelectionState):
* rendering/RenderLayerModelObject.cpp:
(WebCore::RenderLayerModelObject::styleWillChange):
(WebCore::RenderLayerModelObject::styleDidChange):
* rendering/svg/RenderSVGGradientStop.cpp:
(WebCore::RenderSVGGradientStop::styleDidChange):
* rendering/svg/RenderSVGModelObject.cpp:
(WebCore::RenderSVGModelObject::styleWillChange):
(WebCore::RenderSVGModelObject::styleDidChange):
2013-09-22 Antti Koivisto <antti@apple.com>
Remove RenderObjectChildList
https://bugs.webkit.org/show_bug.cgi?id=121771
Reviewed by Darin Adler.
Most RenderElement subclasses have m_children member (>90% of instances on typical page). It is not worth optimising
for memory for the few cases that don't (RenderImage, RenderLineBreak mostly) in expense of performance.
This patch moves child handling to RenderElement. This gets rid of virtual children() calls and simplifies the code.
2013-09-22 Gyuyoung Kim <gyuyoung.kim@samsung.com>
Introduce CSS_VALUE_TYPE_CASTS macro in order to cast CSSValue type
https://bugs.webkit.org/show_bug.cgi?id=121462
Reviewed by Andreas Kling.
As r155429 introduced ELEMENT_TYPE_CASTS, CSS_VALUE_TYPE_CASTS can be used
by css value type casting as well. This type cast macros will help to detect
bad-cast bugs as well as improve a code readibility.
This patch adds the following methods,
- CSSFooValue* toCSSFooValue(CSSValue*)
- const CSSFooValue* toCSSFooValue(const CSSValue*)
To be consistent with other is*Value() naming style, isCSSLineBoxContainValue() and isCalculationValue()
are changed with isLineBoxContainValue() and isCalcValue().
FontValue, FontFeatureValue, ShadowValue have a manual type case function because of different
class naming style. So, toFontValue(), toFontFeatureValue() and toShadowValue() are added manually.
This patch removes unnecessary local variables.
No new tests, no behavior change.
* css/CSSAspectRatioValue.h:
* css/CSSBorderImageSliceValue.h:
* css/CSSCalculationValue.cpp:
(WebCore::CSSCalcExpressionNodeParser::parseValue):
* css/CSSCalculationValue.h:
* css/CSSCrossfadeValue.cpp:
(WebCore::subimageKnownToBeOpaque):
* css/CSSCrossfadeValue.h:
* css/CSSCursorImageValue.cpp:
(WebCore::CSSCursorImageValue::~CSSCursorImageValue):
(WebCore::CSSCursorImageValue::updateIfSVGCursorIsUsed):
(WebCore::CSSCursorImageValue::cachedImage):
(WebCore::CSSCursorImageValue::cachedOrPendingImage):
(WebCore::CSSCursorImageValue::isSVGCursor):
* css/CSSCursorImageValue.h:
* css/CSSFilterImageValue.h:
* css/CSSFontSelector.cpp:
(WebCore::CSSFontSelector::addFontFaceRule):
* css/CSSGradientValue.h:
* css/CSSImageGeneratorValue.cpp:
(WebCore::CSSImageGeneratorValue::image):
(WebCore::CSSImageGeneratorValue::fixedSize):
(WebCore::CSSImageGeneratorValue::loadSubimages):
(WebCore::CSSImageGeneratorValue::subimageIsPending):
(WebCore::CSSImageGeneratorValue::cachedImageForCSSValue):
* css/CSSImageGeneratorValue.h:
* css/CSSImageSetValue.cpp:
(WebCore::CSSImageSetValue::fillImageSet):
* css/CSSImageSetValue.h:
* css/CSSImageValue.h:
* css/CSSInheritedValue.h:
* css/CSSInitialValue.h:
* css/CSSLineBoxContainValue.h:
* css/CSSParser.cpp:
(WebCore::CSSParser::parseColor):
(WebCore::CSSParser::addProperty):
(WebCore::CSSParser::parse3ValuesFillPosition):
(WebCore::CSSParser::parseFillPosition):
(WebCore::CSSParser::parseFillRepeat):
(WebCore::CSSParser::parseDeprecatedRadialGradient):
(WebCore::CSSParser::parseRadialGradient):
* css/CSSPrimitiveValue.h:
* css/CSSReflectValue.h:
* css/CSSToStyleMap.cpp:
(WebCore::CSSToStyleMap::mapFillAttachment):
(WebCore::CSSToStyleMap::mapFillClip):
(WebCore::CSSToStyleMap::mapFillComposite):
(WebCore::CSSToStyleMap::mapFillBlendMode):
(WebCore::CSSToStyleMap::mapFillOrigin):
(WebCore::CSSToStyleMap::mapFillRepeatX):
(WebCore::CSSToStyleMap::mapFillRepeatY):
(WebCore::CSSToStyleMap::mapFillSize):
(WebCore::CSSToStyleMap::mapFillXPosition):
(WebCore::CSSToStyleMap::mapFillYPosition):
(WebCore::CSSToStyleMap::mapFillMaskSourceType):
(WebCore::CSSToStyleMap::mapAnimationDelay):
(WebCore::CSSToStyleMap::mapAnimationDirection):
(WebCore::CSSToStyleMap::mapAnimationDuration):
(WebCore::CSSToStyleMap::mapAnimationFillMode):
(WebCore::CSSToStyleMap::mapAnimationIterationCount):
(WebCore::CSSToStyleMap::mapAnimationName):
(WebCore::CSSToStyleMap::mapAnimationPlayState):
(WebCore::CSSToStyleMap::mapAnimationProperty):
(WebCore::CSSToStyleMap::mapAnimationTimingFunction):
(WebCore::CSSToStyleMap::mapNinePieceImageSlice):
(WebCore::CSSToStyleMap::mapNinePieceImageQuad):
(WebCore::CSSToStyleMap::mapNinePieceImageRepeat):
* css/CSSValue.cpp:
(WebCore::CSSValue::destroy):
* css/CSSValue.h:
(WebCore::CSSValue::isLineBoxContainValue):
(WebCore::CSSValue::isCalcValue):
* css/CSSValueList.h:
* css/CSSVariableValue.h:
* css/DeprecatedStyleBuilder.cpp:
(WebCore::ApplyPropertyDefault::applyValue):
(WebCore::ApplyPropertyNumber::applyValue):
(WebCore::ApplyPropertyAuto::applyValue):
(WebCore::ApplyPropertyClip::applyValue):
(WebCore::ApplyPropertyColor::applyValue):
(WebCore::ApplyPropertyLength::applyValue):
(WebCore::ApplyPropertyString::applyValue):
(WebCore::ApplyPropertyBorderRadius::applyValue):
(WebCore::ApplyPropertyComputeLength::applyValue):
(WebCore::ApplyPropertyFont::applyValue):
(WebCore::ApplyPropertyFontFamily::applyValue):
(WebCore::ApplyPropertyFontSize::applyValue):
(WebCore::ApplyPropertyFontWeight::applyValue):
(WebCore::ApplyPropertyFontVariantLigatures::applyValue):
(WebCore::ApplyPropertyCounter::applyValue):
(WebCore::ApplyPropertyCursor::applyValue):
(WebCore::ApplyPropertyTextAlign::applyValue):
(WebCore::ApplyPropertyTextDecoration::applyValue):
(WebCore::ApplyPropertyMarqueeIncrement::applyValue):
(WebCore::ApplyPropertyMarqueeRepetition::applyValue):
(WebCore::ApplyPropertyMarqueeSpeed::applyValue):
(WebCore::ApplyPropertyTextUnderlinePosition::applyValue):
(WebCore::ApplyPropertyLineHeight::applyValue):
(WebCore::ApplyPropertyLineHeightForIOSTextAutosizing::applyValue):
(WebCore::ApplyPropertyPageSize::applyValue):
(WebCore::ApplyPropertyTextEmphasisStyle::applyValue):
(WebCore::ApplyPropertyResize::applyValue):
(WebCore::ApplyPropertyVerticalAlign::applyValue):
(WebCore::ApplyPropertyAspectRatio::applyValue):
(WebCore::ApplyPropertyZoom::applyValue):
(WebCore::ApplyPropertyDisplay::applyValue):
(WebCore::ApplyPropertyClipPath::applyValue):
(WebCore::ApplyPropertyShape::applyValue):
(WebCore::ApplyPropertyImageResolution::applyValue):
(WebCore::ApplyPropertyTextIndent::applyValue):
* css/FontFeatureValue.h:
(WebCore::toFontFeatureValue):
* css/FontValue.h:
(WebCore::toFontValue):
* css/MediaList.cpp:
(WebCore::reportMediaQueryWarningIfNeeded):
* css/MediaQueryEvaluator.cpp:
(WebCore::compareAspectRatioValue):
(WebCore::numberValue):
(WebCore::orientationMediaFeatureEval):
(WebCore::evalResolution):
(WebCore::device_pixel_ratioMediaFeatureEval):
(WebCore::resolutionMediaFeatureEval):
(WebCore::computeLength):
(WebCore::view_modeMediaFeatureEval):
(WebCore::pointerMediaFeatureEval):
* css/SVGCSSStyleSelector.cpp:
(WebCore::StyleResolver::applySVGProperty):
* css/ShadowValue.h:
(WebCore::toShadowValue):
* css/StylePropertySet.cpp:
(WebCore::StylePropertySet::getLayeredShorthandValue):
* css/StyleResolver.cpp:
(WebCore::createGridTrackSize):
(WebCore::createGridTrackList):
(WebCore::createGridPosition):
(WebCore::hasVariableReference):
(WebCore::StyleResolver::applyProperty):
(WebCore::StyleResolver::styleImage):
(WebCore::StyleResolver::generatedOrPendingFromValue):
(WebCore::StyleResolver::styleShader):
(WebCore::StyleResolver::parseCustomFilterArrayParameter):
(WebCore::StyleResolver::parseCustomFilterColorParameter):
(WebCore::StyleResolver::parseCustomFilterNumberParameter):
(WebCore::StyleResolver::parseCustomFilterParameter):
(WebCore::StyleResolver::parseCustomFilterParameterList):
(WebCore::StyleResolver::createCustomFilterOperationWithInlineSyntax):
(WebCore::StyleResolver::createFilterOperations):
* css/TransformFunctions.cpp:
(WebCore::transformsForValue):
* css/ViewportStyleResolver.cpp:
(WebCore::ViewportStyleResolver::getViewportArgumentValue):
* css/WebKitCSSMatrix.cpp:
(WebCore::WebKitCSSMatrix::setMatrixValue):
* css/WebKitCSSShaderValue.h:
(WebCore::toWebKitCSSShaderValue):
* editing/ApplyStyleCommand.cpp:
(WebCore::ApplyStyleCommand::computedFontSize):
* editing/EditingStyle.cpp:
(WebCore::identifierForStyleProperty):
(WebCore::HTMLElementEquivalent::valueIsPresentInStyle):
(WebCore::cssValueToRGBA):
(WebCore::EditingStyle::extractFontSizeDelta):
(WebCore::EditingStyle::textDirection):
(WebCore::EditingStyle::prepareToApplyAt):
(WebCore::EditingStyle::mergeStyleFromRulesForSerialization):
(WebCore::EditingStyle::legacyFontSize):
(WebCore::EditingStyle::textDirectionForSelection):
(WebCore::StyleChange::extractTextStyles):
(WebCore::fontWeightIsBold):
(WebCore::isTransparentColorValue):
* editing/markup.cpp:
(WebCore::propertyMissingOrEqualToNone):
* page/PageSerializer.cpp:
(WebCore::PageSerializer::retrieveResourcesForProperties):
* rendering/style/StylePendingImage.h:
(WebCore::StylePendingImage::data):
(WebCore::StylePendingImage::cssImageValue):
(WebCore::StylePendingImage::cssImageGeneratorValue):
(WebCore::StylePendingImage::cssCursorImageValue):
(WebCore::StylePendingImage::cssImageSetValue):
2013-09-22 Arunprasad Rajkumar <ararunprasad@gmail.com>
Hiding a focused element should unfocus it and fire a blur event
https://bugs.webkit.org/show_bug.cgi?id=29241
Reviewed by Darin Adler.
Test: fast/dom/HTMLDocument/active-element-gets-unfocusable.html
We check whether the current focus element is really focusable after
the style recalculation and layout change. If it is not focusable then schedule a
timer to reset it asynchronously.
* dom/Document.cpp:
(WebCore::Document::Document):
(WebCore::Document::recalcStyle): Check isFocusable() on the focus element after
style recalculation.
(WebCore::Document::updateLayout): Check isFocusable() on the focus element after
layout.
(WebCore::Document::resetHiddenFocusElementSoon):
(WebCore::Document::resetHiddenFocusElementTimer):
* dom/Document.h:
2013-09-22 Sam Weinig <sam@webkit.org>
CTTE: StaticNodeLists often contain only Elements, we shouldn't store them as Vector<RefPtr<Node>> in those cases
https://bugs.webkit.org/show_bug.cgi?id=121769
Reviewed by Andreas Kling.
Introduces StaticElementList and uses it.
* accessibility/AccessibilityRenderObject.cpp:
(WebCore::AccessibilityRenderObject::addRadioButtonGroupMembers):
* bindings/js/JSHTMLAllCollectionCustom.cpp:
(WebCore::getNamedItems):
* bindings/js/JSHTMLCollectionCustom.cpp:
* bindings/js/JSHTMLFormControlsCollectionCustom.cpp:
(WebCore::getNamedItems):
* bindings/js/JSHTMLFormElementCustom.cpp:
(WebCore::JSHTMLFormElement::nameGetter):
* dom/SelectorQuery.cpp:
(WebCore::AllElementExtractorSelectorQueryTrait::appendOutputForElement):
(WebCore::SelectorDataList::queryAll):
* dom/StaticNodeList.cpp:
(WebCore::StaticElementList::length):
(WebCore::StaticElementList::item):
(WebCore::StaticElementList::namedItem):
* dom/StaticNodeList.h:
* dom/WebKitNamedFlow.cpp:
(WebCore::WebKitNamedFlow::getRegionsByContent):
(WebCore::WebKitNamedFlow::getRegions):
(WebCore::WebKitNamedFlow::getContent):
(WebCore::WebKitNamedFlow::dispatchRegionLayoutUpdateEvent):
(WebCore::WebKitNamedFlow::dispatchRegionOversetChangeEvent):
* html/HTMLCollection.cpp:
(WebCore::HTMLCollection::namedItems):
* html/HTMLCollection.h:
* html/HTMLFormElement.cpp:
(WebCore::HTMLFormElement::getNamedElements):
* html/HTMLFormElement.h:
* svg/SVGSVGElement.cpp:
(WebCore::SVGSVGElement::collectIntersectionOrEnclosureList):
2013-09-22 Sam Weinig <sam@webkit.org>
CTTE: RenderNamedFlowThread and FlowThreadController should operate on Elements, not Nodes
https://bugs.webkit.org/show_bug.cgi?id=121768
Reviewed by Andreas Kling.
* dom/Element.cpp:
(WebCore::Element::unregisterNamedFlowContentElement):
(WebCore::Element::shouldMoveToFlowThread):
(WebCore::Element::clearStyleDerivedDataBeforeDetachingRenderer):
* dom/Element.h:
Update to new names and to pass this as a reference to the FlowThreadController.
* dom/Node.cpp:
* dom/Node.h:
Move isRegisteredWithNamedFlow() to Element.
* dom/WebKitNamedFlow.cpp:
(WebCore::WebKitNamedFlow::getRegionsByContent):
(WebCore::WebKitNamedFlow::getRegions):
(WebCore::WebKitNamedFlow::getContent):
Update for contentNodes() -> contentElements() name change. Modernize the code a bit
as well.
* rendering/FlowThreadController.cpp:
(WebCore::FlowThreadController::registerNamedFlowContentElement):
(WebCore::FlowThreadController::unregisterNamedFlowContentElement):
(WebCore::FlowThreadController::isContentElementRegisteredWithAnyNamedFlow):
* rendering/FlowThreadController.h:
Change the Node* -> RenderNamedFlowThread* map to a Element* -> RenderNamedFlowThread*. Update
functions taking Node*s to take Element&s.
* rendering/RenderNamedFlowThread.cpp:
(WebCore::RenderNamedFlowThread::~RenderNamedFlowThread):
(WebCore::RenderNamedFlowThread::clearContentElements):
(WebCore::RenderNamedFlowThread::registerNamedFlowContentElement):
(WebCore::RenderNamedFlowThread::unregisterNamedFlowContentElement):
(WebCore::RenderNamedFlowThread::hasContentElement):
(WebCore::isContainedInElements):
(WebCore::nextNodeInsideContentElement):
(WebCore::RenderNamedFlowThread::getRanges):
* rendering/RenderNamedFlowThread.h:
Change the NamedFlowContent set to store Elements rather than Nodes. Like with FlowThreadController,
update registration functions to take Element&s instead of Node*s, removing asserts.
* rendering/RenderRegion.cpp:
(WebCore::RenderRegion::setRegionObjectsRegionStyle):
Update for new names.
* style/StyleResolveTree.cpp:
(WebCore::Style::moveToFlowThreadIfNeeded):
Pass the Element and RenderNamedFlowThread as references.
2013-09-22 Andreas Kling <akling@apple.com>
Give purity hints to compiler to avoid penalizing repeated calls to some functions.
<https://webkit.org/b/121744>
Reviewed by Darin Adler.
Mark the following functions pure:
- gcController()
- cssValuePool()
- threadGlobalData()
I had this idea when I saw Darin's patch to cache cssValuePool() in a local.
We know that this function will always return the same value, so we should just
share this knowledge with the compiler and let it do the cleverness instead.
2013-09-21 Darin Adler <darin@apple.com>
Fix too-strict type error exceptions introduced in WebGL bindings
https://bugs.webkit.org/show_bug.cgi?id=121759
Reviewed by Alexey Proskuryakov.
* bindings/js/JSWebGLRenderingContextCustom.cpp:
(WebCore::JSWebGLRenderingContext::getAttachedShaders): Allow undefined
or null without throwing type error.
(WebCore::JSWebGLRenderingContext::getProgramParameter): Ditto.
(WebCore::JSWebGLRenderingContext::getUniform): Ditto.
(WebCore::dataFunctionf): Ditto.
(WebCore::dataFunctioni): Ditto.
(WebCore::dataFunctionMatrix): Ditto.
2013-09-21 Sam Weinig <sam@webkit.org>
Event and EventTarget interfaces don't need to be store as AtomicStrings
https://bugs.webkit.org/show_bug.cgi?id=121751
Reviewed by Andreas Kling.
Convert the Event and EventTarget interface identifiers from AtomicStrings to enums. They
are not extensible and not exposed as Strings anywhere.
* Files elided *
2013-09-21 Darin Adler <darin@apple.com>
Add ExecState::uncheckedArgument and use where possible to shrink a bit
https://bugs.webkit.org/show_bug.cgi?id=121750
Reviewed by Andreas Kling.
* bindings/js/JSHTMLCanvasElementCustom.cpp:
(WebCore::JSHTMLCanvasElement::probablySupportsContext): Already checked count.
(WebCore::JSHTMLCanvasElement::toDataURL): Ditto.
* bindings/js/JSHTMLDocumentCustom.cpp:
(WebCore::documentWrite): In a loop.
* bindings/js/JSInjectedScriptHostCustom.cpp:
(WebCore::JSInjectedScriptHost::inspectedObject): Already checked count.
(WebCore::JSInjectedScriptHost::internalConstructorName): Ditto.
(WebCore::JSInjectedScriptHost::isHTMLAllCollection): Ditto.
(WebCore::JSInjectedScriptHost::type): Ditto.
(WebCore::JSInjectedScriptHost::functionDetails): Ditto.
(WebCore::JSInjectedScriptHost::getEventListeners): Ditto.
(WebCore::JSInjectedScriptHost::inspect): Ditto.
(WebCore::JSInjectedScriptHost::databaseId): Ditto.
(WebCore::JSInjectedScriptHost::storageId): Ditto.
* bindings/js/JSSQLTransactionSyncCustom.cpp:
(WebCore::JSSQLTransactionSync::executeSql): Ditto.
* bindings/js/JSSVGLengthCustom.cpp:
(WebCore::JSSVGLength::convertToSpecifiedUnits): Ditto.
* bindings/js/JSSharedWorkerCustom.cpp:
(WebCore::JSSharedWorkerConstructor::constructJSSharedWorker): Ditto.
* bindings/js/JSWebGLRenderingContextCustom.cpp:
(WebCore::getObjectParameter): Already checked count.
(WebCore::JSWebGLRenderingContext::getAttachedShaders): Removed tortured code
to triply do the checking that the toWebGLProgram function already does, including
spurious exception checking in code that can't create an exception. Also count is
already checked.
(WebCore::JSWebGLRenderingContext::getExtension): More of the same.
(WebCore::JSWebGLRenderingContext::getFramebufferAttachmentParameter): Ditto.
(WebCore::JSWebGLRenderingContext::getParameter): Ditto.
(WebCore::JSWebGLRenderingContext::getProgramParameter): Ditto.
(WebCore::JSWebGLRenderingContext::getShaderParameter): Ditto.
(WebCore::JSWebGLRenderingContext::getUniform): Ditto.
(WebCore::dataFunctionf): Ditto.
(WebCore::dataFunctioni): Ditto.
(WebCore::dataFunctionMatrix): Ditto.
* bindings/js/JSWorkerGlobalScopeCustom.cpp:
(WebCore::JSWorkerGlobalScope::importScripts): In a loop.
* bindings/js/JSXMLHttpRequestCustom.cpp:
(WebCore::JSXMLHttpRequest::open): Already checked. Also removed some unneeded
argument count checks.
(WebCore::JSXMLHttpRequest::send): Removed unneeded special case for 0 argument
count that does the same thing as the undefined case, since asking for an
argument past the count yields undefined.
* bindings/js/JSXSLTProcessorCustom.cpp:
(WebCore::JSXSLTProcessor::setParameter): Already checked.
(WebCore::JSXSLTProcessor::getParameter): Already checked.
(WebCore::JSXSLTProcessor::removeParameter): Already checked.
* bindings/js/ScheduledAction.cpp:
(WebCore::ScheduledAction::ScheduledAction): In a loop.
* bindings/js/ScriptCallStackFactory.cpp:
(WebCore::createScriptArguments): Ditto.
* bindings/scripts/CodeGeneratorJS.pm:
(GenerateParametersCheck): Removed some excess argumentCount checks.
Used uncheckedArgument in a few places. More needs to be done, especially for
overloaded functions.
* bridge/c/c_instance.cpp:
(JSC::Bindings::CInstance::invokeMethod): In a loop.
(JSC::Bindings::CInstance::invokeDefaultMethod): Ditto.
* bridge/objc/objc_instance.mm:
(ObjcInstance::invokeObjcMethod): Ditto.
(ObjcInstance::invokeDefaultMethod): Ditto.
* bindings/scripts/test/JS/JSTestMediaQueryListListener.cpp:
* bindings/scripts/test/JS/JSTestObj.cpp:
* bindings/scripts/test/JS/JSTestTypedefs.cpp:
Updated.
2013-09-21 Jon Lee <jonlee@apple.com>
Fix Obj-C bindings test expectations.
Unreviewed.
Bindings tests failed with r156232, from https://bugs.webkit.org/show_bug.cgi?id=121745.
* bindings/scripts/test/ObjC/DOMTestObj.mm:
(-[DOMTestObj reflectedStringAttr]): Update test expectations.
2013-09-21 Andreas Kling <akling@apple.com>
Node: FINAL-ize EventTarget overrides.
<https://webkit.org/b/121748>
Reviewed by Darin Adler.
Mark the following Node functions FINAL:
- scriptExecutionContext()
- eventTargetData()
- ensureEventTargetData()
This devirtualizes a myriad of generated calls in the JSC bindings.
2013-09-21 Andreas Kling <akling@apple.com>
Don't bloat Obj-C bindings with inlined attribute retrieval.
<https://webkit.org/b/121745>
Reviewed by Anders Carlsson.
Hack bindings generator to always use getAttribute() for Objective-C.
Reduces WebCore binary size by 25120 bytes.
2013-09-20 Darin Adler <darin@apple.com>
Shink attribute event listener code
https://bugs.webkit.org/show_bug.cgi?id=121735
Reviewed by Antti Koivisto.
* GNUmakefile.list.am: Eliminate ScriptEventListener source files.
* Target.pri: Ditto.
* UseJSC.cmake: Ditto.
* WebCore.vcxproj/WebCore.vcxproj: Ditto.
* WebCore.vcxproj/WebCore.vcxproj.filters: Ditto.
* WebCore.xcodeproj/project.pbxproj: Ditto.
* bindings/js/JSBindingsAllInOne.cpp: Ditto.
* bindings/js/JSDOMGlobalObject.h: Removed unneeded forward declarations
of JSEventListener and JSLazyEventListener.
* bindings/js/JSLazyEventListener.cpp:
(WebCore::JSLazyEventListener::JSLazyEventListener): Changed type to
ContainerNode because the node pointer is only ever used for elements
and documents.
(WebCore::eventParameterName): Moved this function here from
ScriptEventListener.cpp, but also rewrote to use NeverDestroyed.
(WebCore::JSLazyEventListener::createForNode): Moved this function
here from ScriptEventListener.cpp, cleaned up a bit.
(WebCore::JSLazyEventListener::createForDOMWindow): Ditto.
* bindings/js/JSLazyEventListener.h: Replaced the old create function
with two new create functions we can use directly. Also used some
OVERRIDE, some FINAL, and a bit of WTF_DELETED_FUNCTION so we don't
accidentally call create and create a non-lazy listener.
* bindings/js/ScriptEventListener.cpp: Removed.
* bindings/js/ScriptEventListener.h: Removed.
* dom/ContainerNode.cpp:
(WebCore::ContainerNode::setAttributeEventListener): Added.
Calls JSLazyEventListener::createForNode and then calls the other
overload of setAttributeEventListener, to obviate having more code
at the call site.
* dom/ContainerNode.h: Added overload of setAttributeEventListener
for convenient use in Document and Element implementations.
* dom/Document.cpp:
(WebCore::Document::prepareForDestruction): Use m_domWindow instead
of the domWindow() function.
(WebCore::Document::removeAllEventListeners): Ditto.
(WebCore::Document::errorEventTarget): Ditto.
(WebCore::Document::takeDOMWindowFrom): Ditto.
(WebCore::Document::setWindowAttributeEventListener): Ditto. Also
added an overload that calls JSLazyEventListener::createForDOMWindow.
(WebCore::Document::getWindowAttributeEventListener): Use m_domWindow.
(WebCore::Document::dispatchWindowEvent): Ditto.
(WebCore::Document::dispatchWindowLoadEvent): Ditto.
(WebCore::Document::enqueueWindowEvent): Ditto.
(WebCore::Document::enqueuePopstateEvent): Ditto.
* dom/Document.h: Added overload of setWindowAttributeEventListener.
* html/HTMLBodyElement.cpp: Removed unnneded include.
(WebCore::HTMLBodyElement::parseAttribute): Removed all the calls to
createAttributeEventListener, and use the setAttributeEventListener
overloads instead.
* html/HTMLButtonElement.cpp: Ditto.
* html/HTMLElement.cpp:
(WebCore::HTMLElement::parseAttribute): Ditto.
* html/HTMLFormControlElement.cpp: Ditto.
* html/HTMLFormElement.cpp: Ditto.
* html/HTMLFrameElementBase.cpp:
(WebCore::HTMLFrameElementBase::parseAttribute): Ditto.
* html/HTMLFrameSetElement.cpp:
(WebCore::HTMLFrameSetElement::parseAttribute): Ditto.
* html/HTMLImageElement.cpp:
(WebCore::HTMLImageElement::parseAttribute): Ditto.
* html/HTMLInputElement.cpp:
(WebCore::HTMLInputElement::parseAttribute): Ditto.
* html/HTMLLinkElement.cpp:
(WebCore::HTMLLinkElement::parseAttribute): Ditto.
* html/HTMLMediaElement.cpp:
(WebCore::HTMLMediaElement::parseAttribute): Ditto.
* html/HTMLObjectElement.cpp:
(WebCore::HTMLObjectElement::parseAttribute): Ditto.
* html/HTMLScriptElement.cpp:
(WebCore::HTMLScriptElement::parseAttribute): Ditto.
* html/HTMLSelectElement.cpp: Ditto.
* html/HTMLStyleElement.cpp: Ditto.
* html/HTMLTextFormControlElement.cpp: Ditto.
* html/HTMLTrackElement.cpp: Ditto.
* html/track/LoadableTextTrack.cpp: Ditto.
* svg/SVGElement.cpp:
(WebCore::SVGElement::parseAttribute): Ditto.
* svg/SVGSVGElement.cpp:
(WebCore::SVGSVGElement::parseAttribute): Ditto.
* svg/SVGScriptElement.cpp:
(WebCore::SVGScriptElement::parseAttribute): Ditto.
* inspector/InspectorDOMAgent.cpp:
(WebCore::InspectorDOMAgent::buildObjectForEventListener):
Moved the code here to dig inside a JSEventListener for things like
the source location. This used to be spread across multiple function
calls in ScriptEventListener.h, which were doing and redoing the same
things, so better to just get it all at once.
* html/parser/XSSAuditor.cpp:
(WebCore::XSSAuditor::init): Fixed "minium" typo.
2013-09-21 Anders Carlsson <andersca@apple.com>
Don't store the "processing-instruction" string for PI tokens in the XPath parser
https://bugs.webkit.org/show_bug.cgi?id=121746
Reviewed by Antti Koivisto.
For PI tokens, the string is always going to be "processing-instruction", and it's never used so we don't need to save it.
* xml/XPathGrammar.y:
* xml/XPathParser.cpp:
(Parser::nextTokenInternal):
(Parser::lex):
2013-09-21 Patrick Gansterer <paroga@webkit.org>
Handle windows lineendings in makeprop.pl after r155511
https://bugs.webkit.org/show_bug.cgi?id=121740
Reviewed by Ryosuke Niwa.
Check for an optinal \r at the end of a line in regular expressions
to make it work again on native windows machines which use CRLF.
* css/makeprop.pl:
2013-09-21 Andreas Kling <akling@apple.com>
Re-inline some hot ElementData functions.
<https://webkit.org/b/121743>
Reviewed by Antti Koivisto.
Make the following functions inline again:
- deref()
- addAttribute()
- removeAttribute()
- attributeAt()
They were out-of-lined in r154249 and perf.webkit.org reports a 1.4%
regression on the html5 spec for that revision. This'll hopefully steer
the graph back in the right direction.
2013-09-21 Tim Horton <timothy_horton@apple.com>
GeneratorGeneratedImage should be called GradientImage
https://bugs.webkit.org/show_bug.cgi?id=121085
Reviewed by Simon Fraser.
No new tests, just a refactor.
r150053 removed the concept of a Generator, making GeneratorGeneratedImage
take a Gradient. This leaves GeneratorGeneratedImage's name not making a
whole lot of sense, so let's rename it to GradientImage.
* CMakeLists.txt:
* GNUmakefile.list.am:
* Target.pri:
* WebCore.vcxproj/WebCore.vcxproj:
* WebCore.vcxproj/WebCore.vcxproj.filters:
* WebCore.xcodeproj/project.pbxproj:
* css/CSSGradientValue.cpp:
(WebCore::CSSGradientValue::image):
* platform/graphics/BitmapImage.h:
* platform/graphics/GradientImage.cpp: Renamed from Source/WebCore/platform/graphics/GeneratorGeneratedImage.cpp.
(WebCore::GradientImage::draw):
(WebCore::GradientImage::drawPattern):
* platform/graphics/GradientImage.h: Renamed from Source/WebCore/platform/graphics/GeneratorGeneratedImage.h.
* platform/graphics/Image.h:
* platform/graphics/ImageBuffer.h:
Rename.
* css/CSSImageGeneratorValue.cpp:
(WebCore::CSSImageGeneratorValue::cachedImageForSize):
(WebCore::CSSImageGeneratorValue::saveCachedImageForSize):
(WebCore::CSSImageGeneratorValue::CachedGeneratedImage::CachedGeneratedImage):
* css/CSSImageGeneratorValue.h:
(WebCore::CSSImageGeneratorValue::CachedGeneratedImage::image):
Drive-by, the CSSImageGeneratorValue generated image cache should be
in terms of GeneratedImage, not a random subclass, regardless
of the fact that it's only used for GradientImage as of yet.
2013-09-21 Darin Adler <darin@apple.com>
Shrink valueForBasicShape by removing repeated calls to cssValuePool()
https://bugs.webkit.org/show_bug.cgi?id=121736
Reviewed by Sam Weinig.
* css/BasicShapeFunctions.cpp:
(WebCore::valueForBasicShape): Put the pool into a local variable and use that.
2013-09-20 Darin Adler <darin@apple.com>
Another CSS parser leak fix
https://bugs.webkit.org/show_bug.cgi?id=121730
Reviewed by Alexey Proskuryakov.
* css/CSSGrammar.y.in: Added a missing adoptPtr.
2013-09-20 Alexey Proskuryakov <ap@apple.com>
Handle panning gestures messages properly on Windows
https://bugs.webkit.org/show_bug.cgi?id=121711
Follow-up fix: five regression tests started to crash on Mac.
Reviewed by Anders Carlsson.
* rendering/RenderLayer.cpp: (WebCore::RenderLayer::scrollByRecursively):
Added null checks, not all callers are interested in scrolled view pointer.
2013-09-20 Ryosuke Niwa <rniwa@webkit.org>
Bad cast from CSSInitialValue to CSSValueList
https://bugs.webkit.org/show_bug.cgi?id=121729
Reviewed by Beth Dakin.
Merge https://chromium.googlesource.com/chromium/blink/+/fcfaa51f9207b32cffe751c1a1380a921e464cbb
The issue was that we would cast to CSSValueList without checking
the type of the CSSValue. After this change, we use the ASSERT'ing
cast and explicitly check the type of the CSSValue before the cast.
Test: fast/css/crash-inherit-value-font-family.html
* css/CSSParser.cpp:
(WebCore::CSSParser::parseFontFaceValue):
2013-09-20 Zoltan Horvath <zoltan@webkit.org>
Remove includes from LineWidth.h
https://bugs.webkit.org/show_bug.cgi?id=121716
Reviewed by Darin Adler.
In r156197 I removed logicalLineHeight from LineWidth.h, so we don't need to include RenderBlock.h
and RenderRubyRun.h anymore in LineWidth.h.
No new tests, no behavior change.
* rendering/LineWidth.cpp:
* rendering/LineWidth.h:
2013-09-20 Roger Fong <roger_fong@apple.com>
Handle panning gestures messages properly on Windows.
https://bugs.webkit.org/show_bug.cgi?id=121711.
Reviewed by Brent Fulgham.
This is needed by the Windows port to keep track to determine whether or not
we need to overpan.
No new functionality added.
* rendering/RenderLayer.cpp:
(WebCore::RenderLayer::scrollByRecursively):
* rendering/RenderLayer.h:
Added an argument to keep track of which scrollview was actually scrolled
2013-09-20 Alexandru Chiculita <achicu@adobe.com>
Web Inspector: [CSS Regions] Display CSS Regions chain when highlighting a CSS Region node
https://bugs.webkit.org/show_bug.cgi?id=121719
Reviewed by Joseph Pecoraro.
Test: inspector/elements/highlight-node-regions.html
When a CSS Region node is highlighted through the WebInspector, it will also lookup all the regions
that are part of the same flow and inject enough information into InspectorOverlayPage.js to get the other
CSS Regions highlighted as well. A chain will also link the regions and a number will display the ordering
of the content.
* WebCore.exp.in:
* inspector/InspectorController.cpp:
(WebCore::InspectorController::buildObjectForHighlightedNode):
* inspector/InspectorController.h:
* inspector/InspectorOverlay.cpp:
(WebCore::buildObjectForRegionHighlight):
(WebCore::buildObjectForCSSRegionsHighlight):
(WebCore::InspectorOverlay::buildObjectForHighlightedNode):
(WebCore::InspectorOverlay::drawNodeHighlight): Separated the InspectorObject building part out of this function,
so that we can call buildObjectForHighlightedNode from the Internals APIs for testing.
* inspector/InspectorOverlay.h:
* inspector/InspectorOverlayPage.js:
(_drawRegionNumber):
(_quadMidPoint):
(_drawRegionLink):
(_fixQuadScrollPosition):
(_drawRegionsHighlight):
(drawNodeHighlight):
* testing/Internals.cpp: Exposed the generated InspectorObject to the layout test.
(WebCore::Internals::inspectorHighlightObject):
* testing/Internals.h:
* testing/Internals.idl:
2013-09-20 Commit Queue <commit-queue@webkit.org>
Unreviewed, rolling out r156185.
http://trac.webkit.org/changeset/156185
https://bugs.webkit.org/show_bug.cgi?id=121727
Caused a lot of crashes in tests (Requested by ap on #webkit).
* dom/Document.cpp:
(WebCore::Document::Document):
(WebCore::Document::recalcStyle):
(WebCore::Document::updateLayout):
* dom/Document.h:
2013-09-20 Dean Jackson <dino@apple.com>
Shaders that fail to compile should be marked as such
https://bugs.webkit.org/show_bug.cgi?id=121721
Reviewed by Simon Fraser.
1. Add a new logging channel for WebGL.
2. If a translated shader fails to compile (technically
this should never happen), mark it as invalid.
Test: https://www.khronos.org/registry/webgl/sdk/tests/conformance/glsl/misc/shader-with-non-reserved-words.html
* platform/Logging.h: New WebGL channel.
* platform/graphics/opengl/GraphicsContext3DOpenGLCommon.cpp:
(WebCore::GraphicsContext3D::compileShader): Log the raw and translated
input to glCompileShader, but mark the entry as invalid.
2013-09-20 Mario Sanchez Prada <mario.prada@samsung.com>
[ATK] Do not expose aria-help in ATK based platforms
https://bugs.webkit.org/show_bug.cgi?id=121675
Reviewed by Chris Fleizach.
Stop exposing the value for the 'aria-help' attribute as an
AtkObject attribute, based in AccessibilityObject::helpText().
* accessibility/atk/WebKitAccessibleWrapperAtk.cpp:
(webkitAccessibleGetAttributes): Remove the mapping.
2013-09-20 Simon Fraser <simon.fraser@apple.com>
Scrollbars don't appear on long pages after r155660
https://bugs.webkit.org/show_bug.cgi?id=121714
<rdar://problem/15042478>
Reviewed by Beth Dakin.
After r155660, we don't do any additional layouts when scrollbars are
added or removed. That caused us to not enter the code that creates or
destroys composting layers for scrollbars in RenderLayerCompositor, resulting
in missing scrollbars.
Fix by having ScrollView::updateScrollbars() call addedOrRemovedScrollbar()
when a scrollbar was added or removed, which is overridden in FrameView
to call through to RenderLayerCompositor::frameViewDidAddOrRemoveScrollbars().
Not testable since scrollbar layers aren't contained in layer tree dumps
(to reduce diffs between platforms).
* page/FrameView.cpp:
(WebCore::FrameView::addedOrRemovedScrollbar): New function to tell the compositor
that scrollbars changed.
* page/FrameView.h:
* platform/ScrollView.cpp:
(WebCore::ScrollView::setHasHorizontalScrollbar): Change the meaning of the return
value to say if the scrollbar was added or removed. Add an out param that indicates
whether the scrollbar change affects content size (not true for overlay scrollbars).
(WebCore::ScrollView::setHasVerticalScrollbar): Ditto.
(WebCore::ScrollView::updateScrollbars): Keep track of whether scrollbars were
added or removed, and call addedOrRemovedScrollbar() if true.
* platform/ScrollView.h:
* rendering/RenderLayerCompositor.cpp:
(WebCore::RenderLayerCompositor::frameViewDidAddOrRemoveScrollbars): Call updateOverflowControlsLayers().
(WebCore::RenderLayerCompositor::updateOverflowControlsLayers):
* rendering/RenderLayerCompositor.h:
2013-09-20 Simon Fraser <simon.fraser@apple.com>
Ensure that TileController tile coverage is updated on scrolling even when we don't have scrollbars
https://bugs.webkit.org/show_bug.cgi?id=121700
<rdar://problem/15030589>
Reviewed by Dean Jackson.
r155660 introduced a bug where we wouldn't make scrollbars on long pages. However,
that revealed a fundamental flaw in the TiledBacking update logic; it relied on the
GraphicsLayer flushes triggered by scrollbars updates in order to update the main
TileController's tile coverage. No scrollbars meant no tile coverage updates.
Fix by explicitly triggering a flush when the FrameView is scrolled (we get
notified about this on the main thread after the scrolling thread has moved
layers around).
No test since this will only be exposed for a short time while scrollbars are
broken.
* rendering/RenderLayerCompositor.cpp:
(WebCore::RenderLayerCompositor::frameViewDidScroll):
2013-09-20 Zoltan Horvath <zoltan@webkit.org>
Refactoring LineBreaker and RenderTextInfo out of RenderBlock.h
https://bugs.webkit.org/show_bug.cgi?id=121707
Reviewed by David Hyatt.
LineBreaker and RenderTextInfo are defined in RenderBlock.h, but only used in RenderBlockLineLayout.cpp.
Moving them there (LineBreaker needs to be a friend class of RenderBlock) in the first step in the process
of refactoring LineBreaker::NextSegmentBreak into more manageable chunks.
This change was reviewed and landed in Blink:
https://src.chromium.org/viewvc/blink?revision=157402&view=revision
No new tests.
* rendering/RenderBlock.h:
* rendering/RenderBlockLineLayout.cpp:
(WebCore::LineBreaker::LineBreaker):
(WebCore::LineBreaker::lineWasHyphenated):
(WebCore::LineBreaker::positionedObjects):
(WebCore::LineBreaker::clear):
(WebCore::RenderTextInfo::RenderTextInfo):
(WebCore::RenderTextInfo::~RenderTextInfo):
(WebCore::LineBreaker::skipTrailingWhitespace):
(WebCore::LineBreaker::skipLeadingWhitespace):
(WebCore::LineBreaker::reset):
(WebCore::LineBreaker::nextLineBreak):
(WebCore::LineBreaker::nextSegmentBreak):
2013-09-20 Zoltan Horvath <zoltan@webkit.org>
Move logicalHeightForLine out of LineWidth.h
https://bugs.webkit.org/show_bug.cgi?id=121575
Reviewed by David Hyatt.
In bug #121107 (r155565), I moved logicalHeightForLine into LineWidth.h as part of LineWidth
refactoring. LogicalHeightForLine without passing the second parameter uses RenderBlock::lineHeight
anyway, except it doesn't take -line-box-contain CSS property into account. For Shapes we don't
have implementation for variable-height lines (https://bugs.webkit.org/show_bug.cgi?id=95361) yet, so
so I modified the affected functions to call lineHeight directly. I renamed logicalHeightForLine
to minLineHeightForReplacedRenderer, and I made the second parameter a mandatory for that function.
No new tests, no behavior change.
* rendering/LineWidth.cpp:
(WebCore::LineWidth::updateAvailableWidth):
(WebCore::LineWidth::shrinkAvailableWidthForNewFloatIfNeeded):
* rendering/LineWidth.h:
* rendering/RenderBlock.cpp: Move the definition here.
(WebCore::RenderBlock::minLineHeightForReplacedRenderer):
* rendering/RenderBlock.h: Move the function here and rename it.
* rendering/RenderBlockLineLayout.cpp:
(WebCore::RenderBlock::layoutShapeInsideInfo):
(WebCore::updateLogicalInlinePositions):
(WebCore::updateSegmentsForShapes):
2013-09-20 Alexey Proskuryakov <ap@apple.com>
-[WebHTMLConveter _getFloat:forNode:property:] leaks
https://bugs.webkit.org/show_bug.cgi?id=121709
Reviewed by Enrica Casucci.
* platform/mac/HTMLConverter.mm:
(-[WebHTMLConverter _getFloat:forNode:property:]): Don't leak.
2013-09-20 Yongjun Zhang <yongjun_zhang@apple.com>
Add an argument to ImageSource::createFrameAtIndex to hint a decoder that we expect a scaled image.
https://bugs.webkit.org/show_bug.cgi?id=121696
Reviewed by Antti Koivisto.
Add an argument to ImageSource::createFrameAtIndex. A platform image decoder can decide the optimal
scale based on the hint and pass the real scale it used for decoding.
No new tests, no behavior change.
* platform/graphics/ImageSource.cpp:
(WebCore::ImageSource::createFrameAtIndex):
* platform/graphics/ImageSource.h:
* platform/graphics/cg/ImageSourceCG.cpp:
(WebCore::ImageSource::createFrameAtIndex):
2013-09-20 Andreas Kling <akling@apple.com>
Make JSMainThreadNullState noncopyable.
Blindly rubber-stamped by Antti Koivisto.
* bindings/js/JSMainThreadExecState.h:
2013-09-20 Dan Bernstein <mitz@apple.com>
Make extract-localizable-strings available to WebCore clients
https://bugs.webkit.org/show_bug.cgi?id=121699
Reviewed by Darin Adler.
* WebCore.xcodeproj/project.pbxproj: Added a Scripts group with a reference to
extract-localizable-strings.pl. Added a Copy Scripts build phase to the WebCore target that
copies the script into PrivateHeaders/Scripts in the framework.
* extract-localizable-strings.pl: Copied from Tools/Scripts/extract-localizable-strings.
2013-09-20 Antti Koivisto <antti@apple.com>
Move layer hierarchy functions from RenderObject to RenderElement
https://bugs.webkit.org/show_bug.cgi?id=121692
Reviewed by Andreas Kling.
* rendering/RenderElement.cpp:
(WebCore::RenderElement::addLayers):
(WebCore::RenderElement::removeLayers):
(WebCore::RenderElement::moveLayers):
(WebCore::RenderElement::findNextLayer):
(WebCore::RenderElement::layerCreationAllowedForSubtree):
Move these from RenderObject.
(WebCore::RenderElement::insertedIntoTree):
(WebCore::RenderElement::willBeRemovedFromTree):
Factor the layer related portion of these virtuals here.
2013-09-20 Benjamin Poulain <benjamin@webkit.org>
Start cleaning the API of SelectorChecker
https://bugs.webkit.org/show_bug.cgi?id=121654
Reviewed by Antti Koivisto.
Make the matching mode internal.
Remove unused accessors.
Make isFrameFocused() internal.
* css/ElementRuleCollector.cpp:
(WebCore::ElementRuleCollector::ruleMatches):
* css/SelectorChecker.cpp:
(WebCore::SelectorChecker::matchRecursively):
(WebCore::SelectorChecker::checkOne):
(WebCore::isFrameFocused):
* css/SelectorChecker.h:
(WebCore::SelectorChecker::match):
* css/StyleResolver.h:
(WebCore::checkRegionSelector):
* dom/SelectorQuery.cpp:
(WebCore::SelectorDataList::selectorMatches):
2013-09-20 Benjamin Poulain <benjamin@webkit.org>
Remove SelectorChecker's CrossesBoundary boundary mode
https://bugs.webkit.org/show_bug.cgi?id=121653
Reviewed by Antti Koivisto.
This mode is an ancient vestige of shadow dom.
* css/SelectorChecker.cpp:
(WebCore::SelectorChecker::match):
(WebCore::SelectorChecker::checkOne):
* css/SelectorChecker.h:
2013-09-20 Benjamin Poulain <benjamin@webkit.org>
Move the SharingRules mode outside of SelectorChecker
https://bugs.webkit.org/show_bug.cgi?id=121652
Reviewed by Antti Koivisto.
The SharingRules handling inside SelectorChecker is a weird hack
to hit a specific branch of ElementRuleCollector.
This patch moves the exception to ElementRuleCollector, where it is easier
to understand what it is for.
* css/ElementRuleCollector.cpp:
(WebCore::ElementRuleCollector::doCollectMatchingRulesForList):
* css/SelectorChecker.cpp:
(WebCore::SelectorChecker::match):
2013-09-20 Yoav Weiss <yoav@yoav.ws>
Fixed img src URLS with multiple spaces
https://bugs.webkit.org/show_bug.cgi?id=121592
Reviewed by Darin Adler.
Test: fast/loader/image-src-multiple-space.html
I've removed the simplifyWhiteSpace step from HTMLImageElement's src attribute during the srcset selection algorithm.
That step prevented URLs with multiple spaces from being loaded as images, minimizing the multiple spaces into a single one.
* html/parser/HTMLParserIdioms.cpp:
(WebCore::bestFitSourceForImageAttributes):
2013-09-20 Arunprasad Rajkumar <ararunprasad@gmail.com>
Hiding a focused element should unfocus it and fire a blur event
https://bugs.webkit.org/show_bug.cgi?id=29241
Reviewed by Darin Adler.
Test: fast/dom/HTMLDocument/active-element-gets-unfocusable.html
We check whether the current focus element is really focusable after
the style recalculation and layout change. If it is not focusable then schedule a
timer to reset it asynchronously.
* dom/Document.cpp:
(WebCore::Document::Document):
(WebCore::Document::recalcStyle): Check isFocusable() on the focus element after
style recalculation.
(WebCore::Document::updateLayout): Check isFocusable() on the focus element after
layout.
(WebCore::Document::resetHiddenFocusElementSoon):
(WebCore::Document::resetHiddenFocusElementTimer):
* dom/Document.h:
2013-09-20 Alexey Proskuryakov <ap@apple.com>
REGRESSION (r156140): Srcset tests are frequently crashing
https://bugs.webkit.org/show_bug.cgi?id=121695
Reviewed by Dean Jackson.
Returning a string created without copying bytes is not safe. It used to be OK
because a new string was immediately created by decodeURLEscapeSequences().
But even that was not great, because decodeURLEscapeSequences() could potentially
return the same string, not a deep copy, if we decided to optimize it like that.
Also made a number of drive-by style fixes.
- It's URL, not Url.
- It's srcset, not srcSet.
- We don't add ".0" in floating point value initializers. It's particularly misleading
to initialize a float with 1.0, which is a double value.
- Renamed srcSetLength to srcsetAttributeLength to match srcsetAttribute variable
whose length it caches.
* html/parser/HTMLParserIdioms.cpp:
(WebCore::parseImagesWithScaleFromSrcsetAttribute):
(WebCore::bestFitSourceForImageAttributes):
2013-09-19 Martin Robinson <mrobinson@igalia.com>
[GTK] Clean up the Skip* functions in the GObject DOM bindings code generator
https://bugs.webkit.org/show_bug.cgi?id=121633
Reviewed by Gustavo Noronha Silva.
* bindings/scripts/CodeGeneratorGObject.pm:
(SkipAttribute): Fold in some skipping checks that are used by all callers.
(SkipFunction): Ditto.
(GenerateProperties): Rely on SkipAttribute more thoroughly.
(GenerateFunction): Rely on SkipFunction more thoroughly.
(GenerateFunctions): Rely on SkipAttribute more thoroughly.
2013-09-20 Patrick Gansterer <paroga@webkit.org>
Fix the build after r156144
* html/canvas/CanvasRenderingContext2D.cpp: Added missing include.
2013-09-20 Ryosuke Niwa <rniwa@webkit.org>
renderStyleOfEnclosingTextNode should update style before using a renderer
https://bugs.webkit.org/show_bug.cgi?id=121690
Reviewed by Enrica Casucci.
Merge https://chromium.googlesource.com/chromium/blink/+/65f089545e8c18cb268dfcbe56cba1cd8045527a
When accessing a renderer editing should always make sure that the style has been updated for the node.
Editing calls splitTextNode in a number of places and then accesses the renderer later. This patch is
the first of many to make sure editing always updates the style before attempting to access the renderer
(or style) of a node after calling a mutation method.
* editing/ApplyBlockElementCommand.cpp:
(WebCore::ApplyBlockElementCommand::renderStyleOfEnclosingTextNode):
* editing/ApplyBlockElementCommand.h:
2013-09-20 Darin Adler <darin@apple.com>
Fix a couple more CSS leaks
https://bugs.webkit.org/show_bug.cgi?id=121683
Reviewed by Alexey Proskuryakov.
* css/CSSDefaultStyleSheets.cpp:
(WebCore::CSSDefaultStyleSheets::viewSourceStyle): Put the result of the
parseUASheet into a global variable so it doesn't show up as a storage leak.
* css/CSSGrammar.y.in: Added a missing adoptRef. This was leaking any rule
we parsed individually.
2013-09-20 Bem Jones-Bey <bjonesbe@adobe.com>
Simplify the ShapeOutsideInfo and ShapeInfo interfaces
https://bugs.webkit.org/show_bug.cgi?id=121685
Reviewed by Darin Adler.
With the creation ShapeInfo::computeSegmentsForLine, it became possible to
simplify the ShapeInfo classes. ShapeOutsideInfo has no need to save the
segments, and now that segment creation is in its own method, it doesn't have
to save the segments anymore. This also simplifies the public interface of
ShapeOutsideInfo, as it only has one method to do the computation.
Also, the methods in ShapeOutsideInfo have been renamed to reflect the fact
that ShapeOutsideInfo isn't really interested in segments.
No new tests, no new behavior.
* rendering/FloatingObjects.cpp:
(WebCore::FloatingObjects::logicalLeftOffset):
(WebCore::FloatingObjects::logicalRightOffset):
* rendering/LineWidth.cpp:
(WebCore::LineWidth::shrinkAvailableWidthForNewFloatIfNeeded):
* rendering/shapes/ShapeInfo.cpp:
* rendering/shapes/ShapeInfo.h:
* rendering/shapes/ShapeInsideInfo.h:
* rendering/shapes/ShapeOutsideInfo.cpp:
(WebCore::ShapeOutsideInfo::updateDeltasForContainingBlockLine):
* rendering/shapes/ShapeOutsideInfo.h:
2013-09-20 Antonio Gomes <a1.gomes@sisa.samsung.com>
Making tests added in r156157 JS-only, given that other
code generators are still broken.
Original bug 121305 (StrictTypeChecking extended attribute fails for methods with sequence<T>).
https://bugs.webkit.org/show_bug.cgi?id=121305
Rubber stamped by Alexey Proskuryakov.
* bindings/scripts/test/TestObj.idl:
2013-09-20 Jacky Jiang <zhajiang@blackberry.com>
[BlackBerry] Poor rendering opening a Google map short link
https://bugs.webkit.org/show_bug.cgi?id=121687
Reviewed by Yong Li.
Internally reviewed by Arvid Nilsson.
JIRA 495023
Route lines on google map were shown even they were on a hidden canvas.
Include visibility on LayerWebKitThread if it's a canvas layer and respect
the visibility when compositing layers in LayerRenderer.
* platform/graphics/blackberry/LayerData.h:
(WebCore::LayerData::isCanvasLayer):
(WebCore::LayerData::isVisible):
(WebCore::LayerData::includeVisibility):
* platform/graphics/blackberry/LayerRenderer.cpp:
(WebCore::LayerRenderer::compositeLayersRecursive):
2013-09-20 Sam White <samuel_white@apple.com>
AX: WebArea claims to have a subrole, but always returns nil.
https://bugs.webkit.org/show_bug.cgi?id=121658
Reviewed by Chris Fleizach.
No new tests, updated existing AXWebArea related test to reflect unused attribute removal.
* accessibility/mac/WebAccessibilityObjectWrapperMac.mm:
(-[WebAccessibilityObjectWrapper accessibilityAttributeNames]):
2013-09-20 Andreas Kling <akling@apple.com>
Add valueForLength/minimumValueForLength wrappers to RenderElement.
<https://webkit.org/b/121676>
Reviewed by Antti Koivisto.
Add two inline wrappers for these functions so we don't have to pass
the RenderView everywhere.
2013-09-20 Martin Robinson <mrobinson@igalia.com>
[GTK] Fix some small style issues in the bindings
https://bugs.webkit.org/show_bug.cgi?id=121613
Reviewed by Carlos Garcia Campos.
* bindings/scripts/CodeGeneratorGObject.pm: When printing the license
header use the more common comment style within the WebKit project.
(GenerateProperty): Indent property definitions according to WebKit style, improve
the nick and blurb properties, and improve the various parameter spec argument layout.
(GenerateFunction): Remove the newline from function signatures to match WebKit style.
* bindings/scripts/test/GObject: Update bindings test results.
2013-09-20 Patrick Gansterer <paroga@webkit.org>
[CMake] Use COMPILE_DEFINITIONS target property for setting BUILDING_* defines
https://bugs.webkit.org/show_bug.cgi?id=121672
Reviewed by Gyuyoung Kim.
Since the scope of add_definitions() is always a whole file, we need to use
target properties instead to set definitions only for specific targets.
* CMakeLists.txt:
2013-09-18 Antonio Gomes <a1.gomes@sisa.samsung.com>
Make "autoscroll for drag'n drop" a setting
https://bugs.webkit.org/show_bug.cgi?id=121559
Reviewed by Ryosuke Niwa.
Currently, there is a ChromeClient hook to make the
feature opt'ed-in or out. That makes it harder to test the
feature on ports that do not enable it, e.g. Mac/WebKit2 port.
However, Mac/WebKit2 is the port that has the best drag'n drop
WTR implementation.
Patch changes the toggle on/off mechanism to be a setting,
and exposes it through InternalSetting interface for testing.
* page/AutoscrollController.cpp:
(WebCore::AutoscrollController::updateDragAndDrop):
* page/ChromeClient.h:
* page/Settings.in:
* testing/InternalSettings.cpp:
(WebCore::InternalSettings::Backup::Backup):
(WebCore::InternalSettings::Backup::restoreTo):
(WebCore::InternalSettings::setAutoscrollForDragAndDropEnabled):
* testing/InternalSettings.h:
* testing/InternalSettings.idl:
2013-09-16 Antonio Gomes <a1.gomes@sisa.samsung.com>
StrictTypeChecking extended attribute fails for methods with sequence<T>
https://bugs.webkit.org/show_bug.cgi?id=121305
Reviewed by Darin Adler.
The extended attribute StrictTypeChecking can not be set to methods if
one of the parameters is a "sequence".
Basically, since "sequence" is not considered a native type
(see function IsNativeType) the Perl code generator tries to
include its supposedly associated header, in this case "JSsequence.h"
Compilation then fails.
It is a problem for bindings including WebGL, where all methods
are supposed to be set as StrictTypeChecking (see bug 44202 [1]). Due to this restriction,
it relaxed, but I would like to bring it back.
Patch fixes the issue by hardening the way includes are auto-added
for methods where StrictTypeChecking extended attribute is present.
Now, only wrapper types (see IsWrapperType) trigger header inclusion,
excluding arrays, sequences, basic types, etc.
[1] https://bugs.webkit.org/show_bug.cgi?id=44202
* bindings/scripts/CodeGeneratorJS.pm:
(GenerateParametersCheck):
* bindings/scripts/test/JS/JSTestObj.cpp:
(WebCore::jsTestObjPrototypeFunctionStrictFunctionWithSequence):
* bindings/scripts/test/JS/JSTestObj.h:
* bindings/scripts/test/TestObj.idl:
2013-09-20 Andreas Kling <akling@apple.com>
Optimize fetching the Node for never-anonymous renderers.
<https://webkit.org/b/121627>
Reviewed by Antti Koivisto.
Add a RenderObject::nodeForNonAnonymous() that can be used instead
of node() when a renderer is guaranteed non-anonymous.
Use this to implement reference element getters for the various
renderers that are known at compile-time to correspond to a DOM node.
Also renamed existingElement() => element() since using an alternate
name for a reference overload isn't actually necessary.
2013-09-20 Patrick Gansterer <paroga@webkit.org>
Remove duplicated secondsPerDay variables
https://bugs.webkit.org/show_bug.cgi?id=121601
Reviewed by Andreas Kling.
Use secondsPerDay from DateMath.h instead of defining it again.
* history/HistoryItem.cpp:
(WebCore::timeToDay):
2013-09-20 Patrick Gansterer <paroga@webkit.org>
Fix duplicated loop variable names after r155743
https://bugs.webkit.org/show_bug.cgi?id=121667
Reviewed by Andreas Kling.
Do not use the same name for variables in nested loops to fix a compiler warning.
* page/animation/CSSPropertyAnimation.cpp:
(WebCore::CSSPropertyAnimationWrapperMap::CSSPropertyAnimationWrapperMap):
2013-09-20 Antti Koivisto <antti@apple.com>
Make RenderObject::parent() return RenderElement
https://bugs.webkit.org/show_bug.cgi?id=121671
Reviewed by Andreas Kling.
Make RenderObject::parent() return RenderElement and adopt everywhere.
Moved addChild/removeChild from RenderObject to RenderElement.
Uninlined a few big RenderObject functions.
Renamed RenderObject::remove() -> RenderObject::removeFromParent()
2013-09-20 Csaba Osztrogonác <ossy@webkit.org>
Buildfix after r156133 for !ENABLE(WORKERS) platforms
https://bugs.webkit.org/show_bug.cgi?id=121669
Reviewed by Antti Koivisto.
* platform/ThreadGlobalData.cpp:
* platform/ThreadGlobalData.h:
2013-09-20 Antti Koivisto <antti@apple.com>
Make createRenderer() return RenderElement
https://bugs.webkit.org/show_bug.cgi?id=121666
Rubber-stamped by Andreas Kling.
Tighter typing.
2013-09-20 Patrick Gansterer <paroga@webkit.org>
Buildfix for ENABLE(CSS_FILTERS) && !ENABLE(ACCELERATED_COMPOSITING) after r155131.
* rendering/RenderLayer.cpp:
(WebCore::RenderLayer::enclosingFilterRepaintLayer):
2013-09-20 Patrick Gansterer <paroga@webkit.org>
[WIN] Fix build without precompiled header after r154146.
* platform/win/WebCoreBundleWin.cpp:
2013-09-20 Antti Koivisto <antti@apple.com>
Add covariant RenderElement* Element::renderer()
https://bugs.webkit.org/show_bug.cgi?id=121638
Reviewed by Andreas Kling.
Also add isRenderElement() test and casting functions.
2013-09-19 Anders Carlsson <andersca@apple.com>
Handle null font families.
Reviewed by Darin Adler.
* platform/graphics/Font.cpp:
(WebCore::computeFontGlyphsCacheHash):
Don't crash when trying to hash null strings.
2013-09-19 Darin Adler <darin@apple.com>
Fix a couple mistakes in my recent CSS grammar leak patch
https://bugs.webkit.org/show_bug.cgi?id=121659
Reviewed by Alexey Proskuryakov.
* css/CSSGrammar.y.in: Added initialization to nullptr for some error cases
that were otherwise leaving a bad value for the result of the production.
Also fixed a reversed logical expression.
2013-09-19 Yoav Weiss <yoav@yoav.ws>
Remove URL decoding in srcset handling
https://bugs.webkit.org/show_bug.cgi?id=121609
Reviewed by Benjamin Poulain.
Tests: fast/hidpi/image-srcset-question-mark.html
fast/loader/image-src-question-mark.html
Removed URL decoding from src and srcset's handling algorithm, since they break encoded URLS.
* html/parser/HTMLParserIdioms.cpp:
(WebCore::parseImagesWithScaleFromSrcSetAttribute):
(WebCore::bestFitSourceForImageAttributes):
2013-09-19 Anders Carlsson <andersca@apple.com>
Avoid calling AtomicString::lower() in makeFontGlyphsCacheKey
https://bugs.webkit.org/show_bug.cgi?id=121656
Reviewed by Darin Adler.
Instead of lower casing AtomicStrings, store the strings as is and use the case folding
hash and case insensitive compare to determine equality.
* platform/graphics/Font.cpp:
(WebCore::operator==):
(WebCore::makeFontGlyphsCacheKey):
(WebCore::computeFontGlyphsCacheHash):
2013-09-19 Darin Adler <darin@apple.com>
Fix leaks in CSS parser caused by overwriting owned raw pointers with 0
https://bugs.webkit.org/show_bug.cgi?id=121655
Reviewed by Anders Carlsson.
* css/CSSGrammar.y.in: Use nullptr instead of 0. Use unique_ptr instead
of a raw pointer in cases where we might or might not actually keep
the allocated memory. This can still be cleaned up further, but this
should fix the memory leaks we have been seeing.
2013-09-19 Eric Carlson <eric.carlson@apple.com>
MediaStream API: update MediaStreamTrackEvent object to match spec
https://bugs.webkit.org/show_bug.cgi?id=121624
Reviewed by Dean Jackson.
Test: fast/mediastream/MediaStreamTrackEvent-constructor.html
* Modules/mediastream/MediaStreamTrack.idl: Remove NoInterfaceObject.
* Modules/mediastream/MediaStreamTrackEvent.cpp:
(WebCore::MediaStreamTrackEventInit::MediaStreamTrackEventInit): New.
(WebCore::MediaStreamTrackEvent::create): New form that takes an initialize.
(WebCore::MediaStreamTrackEvent::MediaStreamTrackEvent): Ditto.
* Modules/mediastream/MediaStreamTrackEvent.h:
* Modules/mediastream/MediaStreamTrackEvent.idl:
* bindings/js/JSDictionary.cpp:
(WebCore::JSDictionary::convertValue): New.
* bindings/js/JSDictionary.h:
2013-09-19 Anders Carlsson <andersca@apple.com>
Remove #if !ENABLE(WORKERS) code in ThreadGlobalData
https://bugs.webkit.org/show_bug.cgi?id=121649
Reviewed by Sam Weinig.
This lets us remove a FIXME. Also, move threadGlobalData out of line; there's no need for it to be inline.
* WebCore.exp.in:
* platform/ThreadGlobalData.cpp:
(WebCore::threadGlobalData):
* platform/ThreadGlobalData.h:
2013-09-19 Anders Carlsson <andersca@apple.com>
Modernize Length setters/getters
https://bugs.webkit.org/show_bug.cgi?id=121647
Reviewed by Andreas Kling.
Add a move constructor and move assignment operator to Length and fixup some of the getters and setters.
* css/CSSComputedStyleDeclaration.cpp:
(WebCore::getBorderRadiusCornerValues):
(WebCore::getBorderRadiusCornerValue):
* css/DeprecatedStyleBuilder.cpp:
(WebCore::ApplyPropertyLength::setValue):
(WebCore::ApplyPropertyLength::createHandler):
(WebCore::ApplyPropertyBorderRadius::setValue):
(WebCore::ApplyPropertyBorderRadius::createHandler):
(WebCore::ApplyPropertyLineHeight::createHandler):
* page/animation/CSSPropertyAnimation.cpp:
(WebCore::LengthPropertyWrapper::LengthPropertyWrapper):
(WebCore::LengthPropertyWrapper::blend):
(WebCore::FillLayerPropertyWrapper::FillLayerPropertyWrapper):
(WebCore::FillLayerPropertyWrapper::blend):
(WebCore::CSSPropertyAnimationWrapperMap::CSSPropertyAnimationWrapperMap):
* platform/CalculationValue.h:
(WebCore::CalcExpressionLength::CalcExpressionLength):
(WebCore::CalcExpressionBlendLength::CalcExpressionBlendLength):
* platform/Length.cpp:
(WebCore::CalculationValueHandleMap::remove):
(WebCore::CalculationValueHandleMap::find):
(WebCore::Length::decrementCalculatedRef):
* platform/Length.h:
(WebCore::Length::Length):
(WebCore::Length::operator=):
(WebCore::Length::moveFromLength):
* platform/LengthBox.cpp:
(WebCore::LengthBox::logicalLeft):
(WebCore::LengthBox::logicalRight):
(WebCore::LengthBox::before):
(WebCore::LengthBox::after):
(WebCore::LengthBox::start):
(WebCore::LengthBox::end):
* platform/LengthBox.h:
(WebCore::LengthBox::LengthBox):
(WebCore::LengthBox::left):
(WebCore::LengthBox::right):
(WebCore::LengthBox::top):
(WebCore::LengthBox::bottom):
* platform/LengthSize.h:
(WebCore::LengthSize::LengthSize):
(WebCore::LengthSize::setWidth):
(WebCore::LengthSize::width):
(WebCore::LengthSize::setHeight):
(WebCore::LengthSize::height):
* platform/graphics/filters/FilterOperation.h:
(WebCore::FilterOperation::BlurFilterOperation::create):
(WebCore::FilterOperation::BlurFilterOperation::stdDeviation):
(WebCore::FilterOperation::BlurFilterOperation::BlurFilterOperation):
* rendering/style/BasicShapes.h:
(WebCore::BasicShapeRectangle::x):
(WebCore::BasicShapeRectangle::y):
(WebCore::BasicShapeRectangle::width):
(WebCore::BasicShapeRectangle::height):
(WebCore::BasicShapeRectangle::cornerRadiusX):
(WebCore::BasicShapeRectangle::cornerRadiusY):
(WebCore::BasicShapeRectangle::setX):
(WebCore::BasicShapeRectangle::setY):
(WebCore::BasicShapeRectangle::setWidth):
(WebCore::BasicShapeRectangle::setHeight):
(WebCore::BasicShapeRectangle::setCornerRadiusX):
(WebCore::BasicShapeRectangle::setCornerRadiusY):
(WebCore::BasicShapeCircle::centerX):
(WebCore::BasicShapeCircle::centerY):
(WebCore::BasicShapeCircle::radius):
(WebCore::BasicShapeCircle::setCenterX):
(WebCore::BasicShapeCircle::setCenterY):
(WebCore::BasicShapeCircle::setRadius):
(WebCore::BasicShapeEllipse::centerX):
(WebCore::BasicShapeEllipse::centerY):
(WebCore::BasicShapeEllipse::radiusX):
(WebCore::BasicShapeEllipse::radiusY):
(WebCore::BasicShapeEllipse::setCenterX):
(WebCore::BasicShapeEllipse::setCenterY):
(WebCore::BasicShapeEllipse::setRadiusX):
(WebCore::BasicShapeEllipse::setRadiusY):
(WebCore::BasicShapePolygon::getXAt):
(WebCore::BasicShapePolygon::getYAt):
(WebCore::BasicShapePolygon::appendPoint):
(WebCore::BasicShapeInsetRectangle::top):
(WebCore::BasicShapeInsetRectangle::right):
(WebCore::BasicShapeInsetRectangle::bottom):
(WebCore::BasicShapeInsetRectangle::left):
(WebCore::BasicShapeInsetRectangle::cornerRadiusX):
(WebCore::BasicShapeInsetRectangle::cornerRadiusY):
(WebCore::BasicShapeInsetRectangle::setTop):
(WebCore::BasicShapeInsetRectangle::setRight):
(WebCore::BasicShapeInsetRectangle::setBottom):
(WebCore::BasicShapeInsetRectangle::setLeft):
(WebCore::BasicShapeInsetRectangle::setCornerRadiusX):
(WebCore::BasicShapeInsetRectangle::setCornerRadiusY):
* rendering/style/FillLayer.h:
(WebCore::FillSize::FillSize):
(WebCore::FillLayer::xPosition):
(WebCore::FillLayer::yPosition):
(WebCore::FillLayer::sizeLength):
(WebCore::FillLayer::setXPosition):
(WebCore::FillLayer::setYPosition):
* rendering/style/NinePieceImage.cpp:
(WebCore::NinePieceImage::NinePieceImage):
* rendering/style/NinePieceImage.h:
(WebCore::NinePieceImage::setImageSlices):
(WebCore::NinePieceImage::setBorderSlices):
(WebCore::NinePieceImage::setOutset):
(WebCore::NinePieceImage::computeOutset):
* rendering/style/RenderStyle.cpp:
(WebCore::RenderStyle::specifiedLineHeight):
* rendering/style/RenderStyle.h:
* rendering/style/StyleBoxData.h:
(WebCore::StyleBoxData::width):
(WebCore::StyleBoxData::height):
(WebCore::StyleBoxData::minWidth):
(WebCore::StyleBoxData::minHeight):
(WebCore::StyleBoxData::maxWidth):
(WebCore::StyleBoxData::maxHeight):
(WebCore::StyleBoxData::verticalAlign):
* rendering/style/StyleReflection.h:
(WebCore::StyleReflection::offset):
(WebCore::StyleReflection::setOffset):
2013-09-19 Andreas Kling <akling@apple.com>
Out-of-line InspectorValues create() methods.
<https://webkit.org/b/121639>
Reviewed by Joseph Pecoraro.
These functions are hardly performance-critical and are taking up
quite a lot of space.
Shrinks the WebCore binary by 70500 bytes.
2013-09-19 Alexey Proskuryakov <ap@apple.com>
Layout Test http/tests/security/canvas-remote-read-remote-image-redirect.html is flaky
https://bugs.webkit.org/show_bug.cgi?id=121458
Reviewed by Sam Weinig.
The code to automagically produce line numbers is quite fragile. Added some FIXMEs,
and added an issue that was making reporting flaky for code is JS event handlers
executed while parsing was paused.
* page/PageConsole.cpp: (WebCore::PageConsole::addMessage): Use actual "script is
running" check instead of "parsing a script element" one.
2013-09-18 Ryosuke Niwa <rniwa@webkit.org>
Remove superfluous CSSLinearTimingFunctionValue and use switch on TimingFunction::type() in more places
https://bugs.webkit.org/show_bug.cgi?id=121589
Reviewed by Dean Jackson.
Replaced CSSLinearTimingFunctionValue by the identifier "linear" and used switch statements on
TimingFunction::type() in more places where we were branching on every type.
Merge https://chromium.googlesource.com/chromium/blink/+/5454f20c71090c35bdd1053e5cc572d5c0bdede7
Merge https://chromium.googlesource.com/chromium/blink/+/104ad42c523d32b67d108c6e59f4f27488fe38a5
* css/CSSComputedStyleDeclaration.cpp:
(WebCore::createTimingFunctionValue):
* css/CSSTimingFunctionValue.cpp:
* css/CSSTimingFunctionValue.h:
* css/CSSToStyleMap.cpp:
(WebCore::CSSToStyleMap::mapAnimationTimingFunction):
* css/CSSValue.cpp:
(WebCore::CSSValue::equals):
(WebCore::CSSValue::cssText):
(WebCore::CSSValue::destroy):
* css/CSSValue.h:
(WebCore::CSSValue::isCubicBezierTimingFunctionValue):
* page/animation/AnimationBase.cpp:
(WebCore::AnimationBase::progress):
2013-09-19 Commit Queue <commit-queue@webkit.org>
Unreviewed, rolling out r156119.
http://trac.webkit.org/changeset/156119
https://bugs.webkit.org/show_bug.cgi?id=121640
broke builds in various ways (Requested by anttik on #webkit).
* accessibility/AccessibilitySpinButton.cpp:
* bindings/scripts/CodeGeneratorObjC.pm:
(GenerateImplementation):
* css/SelectorChecker.cpp:
* dom/ContainerNode.h:
* dom/Element.h:
* dom/PseudoElement.cpp:
(WebCore::PseudoElement::didAttachRenderers):
* editing/SplitTextNodeContainingElementCommand.cpp:
(WebCore::SplitTextNodeContainingElementCommand::doApply):
* editing/TypingCommand.cpp:
* html/ImageDocument.cpp:
* page/PageSerializer.cpp:
* rendering/RenderElement.h:
* rendering/RenderObject.h:
* svg/SVGAnimatedColor.cpp:
(WebCore::adjustForCurrentColor):
* svg/SVGLocatable.cpp:
* svg/graphics/filters/SVGFEImage.cpp:
(WebCore::FEImage::determineAbsolutePaintRect):
(WebCore::FEImage::referencedRenderer):
* svg/graphics/filters/SVGFEImage.h:
2013-09-19 Antti Koivisto <antti@apple.com>
Add covariant RenderElement* Element::renderer()
https://bugs.webkit.org/show_bug.cgi?id=121638
Reviewed by Andreas Kling.
Also add isRenderElement() test and casting functions.
2013-09-19 Andreas Kling <akling@apple.com>
Streamline JSMainThreadNullState.
<https://webkit.org/b/121636>
Reviewed by Anders Carlsson.
JSMainThreadNullState is only used by non-JavaScript bindings and
thus won't ever call didLeaveScriptContext() on destruction.
Specialize the class for its use-case instead of sharing code
with JSMainThreadExecState.
Shrinks the WebCore binary by 82848 bytes.
2013-09-19 Bear Travis <betravis@adobe.com>
CSS_SHAPES not supported on AppleWin port
https://bugs.webkit.org/show_bug.cgi?id=118810
Reviewed by Brent Fulgham.
Enabling fast/shapes on windows.
* WebCore.vcxproj/WebCore.vcxproj: Add missing shape includes.
* WebCore.vcxproj/WebCoreCommon.props: Include shapes source folder.
* WebCore.vcxproj/copyForwardingHeaders.cmd: Copy shapes headers.
* css/CSSPropertyNames.in: Tweak to ensure shapes properties are regenerated.
2013-09-19 Andreas Kling <akling@apple.com>
Add SVGPropertyInfo.cpp
<https://webkit.org/b/121622>
Reviewed by Anders Carlsson.
Add a cpp file for this class to make it more hackable.
* CMakeLists.txt:
* GNUmakefile.list.am:
* Target.pri:
* WebCore.vcxproj/WebCore.vcxproj:
* WebCore.vcxproj/WebCore.vcxproj.filters:
* WebCore.xcodeproj/project.pbxproj:
* svg/properties/SVGPropertyInfo.cpp: Added.
(WebCore::SVGPropertyInfo::SVGPropertyInfo):
* svg/properties/SVGPropertyInfo.h:
2013-09-19 Eric Carlson <eric.carlson@apple.com>
MediaStream API: update NavigatorUserMediaError object to match spec
https://bugs.webkit.org/show_bug.cgi?id=121584
Reviewed by Dean Jackson.
No new tests, updated getusermedia.html.
* CMakeLists.txt: Add NavigatorUserMediaError.cpp.
* GNUmakefile.list.am: Ditto.
* Modules/mediastream/NavigatorUserMediaError.cpp: Added.
* Modules/mediastream/NavigatorUserMediaError.h: Derive from DOMError, get rid of "message" attribute.
* Modules/mediastream/NavigatorUserMediaError.idl: Ditto.
* Modules/mediastream/UserMediaRequest.cpp:
(WebCore::UserMediaRequest::create): ASCIILiteral -> AtomicString. Rename constraint parameters.
(WebCore::UserMediaRequest::UserMediaRequest): Rename constraint parameters.
(WebCore::UserMediaRequest::audioConstraints): Return PassRefPtr<> instead of raw ptr.
(WebCore::UserMediaRequest::videoConstraints): Ditto.
(WebCore::UserMediaRequest::ownerDocument): Clean up style.
(WebCore::UserMediaRequest::succeed):
(WebCore::UserMediaRequest::permissionFailure): Renamed from fail.
(WebCore::UserMediaRequest::constraintFailure): Renamed from failConstraint.
(WebCore::UserMediaRequest::callSuccessHandler): New.
(WebCore::UserMediaRequest::callErrorHandler): New.
* Modules/mediastream/UserMediaRequest.h:
* WebCore.xcodeproj/project.pbxproj: Add NavigatorUserMediaError.cpp
* dom/DOMError.h: Make constructor protected.
* platform/mediastream/MediaStreamSourcesQueryClient.h: Make constraints available.
2013-09-19 Bem Jones-Bey <bjonesbe@adobe.com>
Fix handling of top margin on float with shape-outside
https://bugs.webkit.org/show_bug.cgi?id=121614
Reviewed by Alexandru Chiculita.
When a float has shape outside, the top margin should be treated as if
there is no shape there, so inline content should be allowed to flow
into that space. This patch fixes two issues:
1) If the top margin is the same as the line height, a line should be
able to fit into the margin. Before this patch, that line was being
treated as if it intersected with the shape.
2) The shape should be positioned (x, y) relative to the box sizing
box of the float. While the x coordinate was being treated properly,
the y coordinate was relative to the top of the margin box. This patch
fixes this behavior.
This patch also includes a simple test for right and left margins, as
I wrote that test and then discovered the problems listed above.
This patch also removes an unused override of the
lineOverlapsShapeBounds method.
Tests: csswg/submitted/shapes/shape-outside/shape-outside-floats-margin-000.html
csswg/submitted/shapes/shape-outside/shape-outside-floats-margin-001.html
* rendering/FloatingObjects.cpp:
(WebCore::FloatingObjects::logicalLeftOffset):
(WebCore::FloatingObjects::logicalRightOffset):
* rendering/LineWidth.cpp:
(WebCore::LineWidth::shrinkAvailableWidthForNewFloatIfNeeded):
* rendering/shapes/ShapeInfo.h:
* rendering/shapes/ShapeInsideInfo.h:
* rendering/shapes/ShapeOutsideInfo.cpp:
(WebCore::ShapeOutsideInfo::computeSegmentsForContainingBlockLine):
* rendering/shapes/ShapeOutsideInfo.h:
2013-09-19 Antti Koivisto <antti@apple.com>
Add RenderElement
https://bugs.webkit.org/show_bug.cgi?id=121608
Reviewed by Dave Hyatt.
Add a common base class for all Element renderers. The class hierarchy will now look like this
RenderObject
RenderText
RenderElement
RenderLayerModelObject
...
RenderSVGModelObject
...
RenderSVGGradientStop
This will allow tighter typing in both render and DOM trees.
The patch also moves renderer factory function to RenderElement::createFor().
2013-09-19 Alexey Proskuryakov <ap@apple.com>
REGRESSION (r149928): CanvasStyle::operator= leaks everything
https://bugs.webkit.org/show_bug.cgi?id=121591
Reviewed by Andreas Kling.
* html/canvas/CanvasStyle.cpp: (WebCore::CanvasStyle::operator=): Don't leak.
2013-09-19 Andrei Parvu <parvu@adobe.com>
[CSS Masking/Background] Position property should be ignored when using repeat: space
https://bugs.webkit.org/show_bug.cgi?id=120623
The background/mask-position should be ignored when using repeat: space,
unless there is not enough space for two copies of the image. In that case,
only one image is placed and background/mask-position determines its position.
Reviewed by Dirk Schulze.
Test: css3/masking/mask-repeat-one-copy.html
* rendering/RenderBoxModelObject.cpp: Ignored position property if space value is positive, set no-repeat otherwise.
(WebCore::RenderBoxModelObject::calculateBackgroundImageGeometry):
2013-09-19 Andreas Kling <akling@apple.com>
CTTE: EllipsisBox::renderer() should return RenderBlock&.
<https://webkit.org/b/121604>
Reviewed by Antti Koivisto.
I missed adding a renderer() overload when fixing up EllipsisBox.
Flushed out one unnecessary type check.
2013-09-19 Andreas Kling <akling@apple.com>
CTTE: Tighten renderer types for InlineTextBox and SVGInlineTextBox.
<https://webkit.org/b/121605>
Reviewed by Antti Koivisto.
Codify the following:
- InlineTextBox always has a RenderText.
- SVGInlineTextBox always has a RenderSVGInlineText.
Removed InlineTextBox::textRenderer() and make renderer() simply
return a RenderText&/RenderSVGInlineText& instead.
This turns some node() accessors into textNode() and removes a host
of casts and assertions.
2013-09-19 Antti Koivisto <antti@apple.com>
[CTTE] Hide nonPseudoNode and generatingNode, replace with Element versions
https://bugs.webkit.org/show_bug.cgi?id=121606
Reviewed by Andreas Kling.
2013-09-19 Andreas Kling <akling@apple.com>
CTTE: Tighten renderer types for InlineFlowBox and SVGInlineFlowBox.
<https://webkit.org/b/121603>
Reviewed by Antti Koivisto.
Codify the following:
- InlineFlowBox always has a RenderBoxModelObject.
- SVGInlineFlowBox always has a RenderSVGInline.
This turns some node() accessors into element(). Neato!
2013-09-19 Gurpreet Kaur <k.gurpreet@samsung.com>
CSS Unit vmax and vmin in border-width not handled.
https://bugs.webkit.org/show_bug.cgi?id=121421
Reviewed by Darin Adler.
Border properties were not applied incase its values
were given in vmax/vmin units.
Tests: fast/css/viewport-vmax-border.html
fast/css/viewport-vmin-border.html
* css/CSSPrimitiveValue.cpp:
(WebCore::CSSPrimitiveValue::computeLengthDouble):
* css/CSSPrimitiveValue.h:
(WebCore::CSSPrimitiveValue::isViewportPercentageMax):
(WebCore::CSSPrimitiveValue::isViewportPercentageMin):
* css/DeprecatedStyleBuilder.cpp:
(WebCore::ApplyPropertyComputeLength::applyValue):
Calculating the border values which has been specified in
vmax/vmin units. 1vmax: 1vw or 1vh, whatever is largest.
1vmin: 1vw or 1vh, whatever is smallest. The vh/vw units are
calcultated as percent of viewport height and viewport width respectively.
2013-09-19 Antti Koivisto <antti@apple.com>
[CTTE] RenderText is always anonymous or associated with Text node
https://bugs.webkit.org/show_bug.cgi?id=121596
Reviewed by Andreas Kling.
Tighten the node type of RenderText and its subclasses to Text.
Switch to createAnonymous pattern.
Switch a bunch of unnecessary StringImpl* use to Strings.
2013-09-18 Mihnea Ovidenie <mihnea@adobe.com>
Unreviewed build fix after 156082. Guard SVG code with defines.
* rendering/RenderNamedFlowThread.cpp:
(WebCore::nextNodeInsideContentNode):
2013-09-18 Mihnea Ovidenie <mihnea@adobe.com>
[CSSRegions] Failed to retrieve named flow ranges for content with inline svg
https://bugs.webkit.org/show_bug.cgi?id=121489
Reviewed by David Hyatt.
The inline SVG element behaves like a replaced element in HTML context. When computing the ranges
that are displayed inside a region for a named flow that contains an inline SVG element, we have
to treat the SVG as a replaced and run the checks only for the SVG root element, skipping the
other SVG elements inside.
Test: fast/regions/get-region-flow-ranges-inline-svg.html
* rendering/RenderNamedFlowThread.cpp:
(WebCore::nextNodeInsideContentNode): Add function to retrieve the next node in traversal
under the contentNode subtree that should be used for getRanges inspection.
(WebCore::RenderNamedFlowThread::getRanges): Replace NodeTravesal::next with nextNodeInsideContentNode.
2013-09-18 Bem Jones-Bey <bjonesbe@adobe.com>
REGRESSION (r155854 - r155967) block with margin-left adjacent to floated block causes text of subsequent blocks to overlap the floated block.
https://bugs.webkit.org/show_bug.cgi?id=121532
Reviewed by Andreas Kling.
When refactoring the code, I ended up adding the margin in instead of
subtracting it in the case of an intruding float. This patch fixes
that so that the margin is properly handled.
Test: fast/block/float/intruding-float-sibling-with-margin.html
* rendering/RenderBlock.cpp:
(WebCore::RenderBlock::addIntrudingFloats):
2013-09-18 Ryosuke Niwa <rniwa@webkit.org>
Merge HTMLBodyElement::didNotifySubtreeInsertions into HTMLBodyElement::insertedInto
https://bugs.webkit.org/show_bug.cgi?id=121576
Reviewed by Andreas Kling.
Merge https://chromium.googlesource.com/chromium/blink/+/2a9cac908f4eceadfcf9d21bdf5b3e598075aa1f
The logic in didNotifySubtreeInsertions to set the marginwidth and marginheight attributes
on the <body> of elements inside <iframe> and <frame> doesn't need to run after inserting
all the children of the frame. In fact this means that when you have those attributes
and then the script in the iframe touches offsetLeft or any layout dependent property
we'll layout with the wrong values and then have to do another layout after these margin
attributes are set.
I also remove the scheduleRelayout() call that was inside didNotifySubtreeInsertions. This
call doesn't make any sense, inserting a <body> will always trigger a style recalc and
a subsequent layout. The code is 9 years old: https://trac.webkit.org/changeset/8122
and all tests run fine without it.
* html/HTMLBodyElement.cpp:
(WebCore::HTMLBodyElement::insertedInto):
* html/HTMLBodyElement.h:
* html/HTMLFrameElementBase.h:
(WebCore::isHTMLFrameElementBase):
(WebCore::toHTMLFrameElementBase):
2013-09-18 Jer Noble <jer.noble@apple.com>
[MSE] Throw exception when setting timestampOffset while 'updating' state is set.
https://bugs.webkit.org/show_bug.cgi?id=121561
Reviewed by Eric Carlson.
Tests: Updated http/tests/media/media-source/mediasource-append-buffer.html.
Merge https://chromium.googlesource.com/chromium/blink/+/25285998be3d0edcd951d12d445a7375e50e512c
by Changbin Shao.
The Media Source Extensions spec requires that an exception be thrown if the 'updating' attribute
equals true while setting the timestampOffset of a SourceBuffer.
* Modules/mediasource/SourceBuffer.cpp:
(WebCore::SourceBuffer::setTimestampOffset):
2013-09-18 Anders Carlsson <andersca@apple.com>
RefPtrHashMap should work with move only types
https://bugs.webkit.org/show_bug.cgi?id=121564
Reviewed by Andreas Kling.
* bridge/IdentifierRep.cpp:
(WebCore::IdentifierRep::get):
* page/PageGroup.cpp:
(WebCore::PageGroup::transientLocalStorage):
2013-09-18 Enrica Casucci <enrica@apple.com>
Upstream changes to WebHTMLConverter to support HTML
to NSAttributedString conversion on both iOS and OS X.
Reviewed by Benjamin Poulain.
This is a new submission of r156001 with the fix for the
failing TestWebKitAPI test. The additional change has been
reviewed by Tim Horton.
* platform/mac/HTMLConverter.h:
* platform/mac/HTMLConverter.mm:
(WebDefaultFont):
(_fontForNameAndSize):
(+[WebHTMLConverter defaultParagraphStyle]):
(-[WebHTMLConverter _computedStyleForElement:]):
(-[WebHTMLConverter _specifiedStyleForElement:]):
(-[WebHTMLConverter _computedStringForNode:property:]):
(-[WebHTMLConverter _stringForNode:property:]):
(-[WebHTMLConverter _getComputedFloat:forNode:property:]):
(-[WebHTMLConverter _getFloat:forNode:property:]):
(_NSFirstPathForDirectoriesInDomains):
(_NSSystemLibraryPath):
(-[WebHTMLConverter _webKitBundle]):
(_colorForRGBColor):
(_shadowForShadowStyle):
(-[WebHTMLConverter _elementIsBlockLevel:]):
(-[WebHTMLConverter _elementHasOwnBackgroundColor:]):
(-[WebHTMLConverter _computedColorForNode:property:]):
(-[WebHTMLConverter _colorForNode:property:]):
(-[WebHTMLConverter _computedAttributesForElement:]):
(-[WebHTMLConverter _attributesForElement:]):
(-[WebHTMLConverter _newParagraphForElement:tag:allowEmpty:suppressTrailingSpace:]):
(-[WebHTMLConverter _newLineForElement:]):
(-[WebHTMLConverter _newTabForElement:]):
(-[WebHTMLConverter _WebMessageDocumentClass]):
(-[WebHTMLConverter _addAttachmentForElement:URL:needsParagraph:usePlaceholder:]):
(-[WebHTMLConverter _addQuoteForElement:opening:level:]):
(-[WebHTMLConverter _addValue:forElement:]):
(-[WebHTMLConverter _fillInBlock:forElement:backgroundColor:extraMargin:extraPadding:isTable:]):
(_dateForString):
(_colCompare):
(-[WebHTMLConverter _processMetaElementWithName:content:]):
(-[WebHTMLConverter _processHeadElement:]):
(-[WebHTMLConverter _enterElement:tag:display:embedded:]):
(-[WebHTMLConverter _addTableForElement:]):
(-[WebHTMLConverter _addTableCellForElement:]):
(-[WebHTMLConverter _processElement:tag:display:depth:]):
(-[WebHTMLConverter _addMarkersToList:range:]):
(-[WebHTMLConverter _exitElement:tag:display:depth:startIndex:]):
(-[WebHTMLConverter _processText:]):
(-[WebHTMLConverter _traverseNode:depth:embedded:]):
(-[WebHTMLConverter _traverseFooterNode:depth:]):
(-[WebHTMLConverter _loadFromDOMRange]):
(-[WebHTMLConverter dealloc]):
(-[WebHTMLConverter init]):
(-[WebHTMLConverter initWithDOMRange:]):
(-[WebHTMLConverter attributedString]):
(+[WebHTMLConverter editingAttributedStringFromRange:]):
2013-09-18 Antti Koivisto <antti@apple.com>
Rename RenderBR to RenderLineBreak
https://bugs.webkit.org/show_bug.cgi?id=121560
Reviewed by Sam Weinig.
It now represents both hard (br) and soft (wbr) line breaks.
2013-09-18 Robert Hogan <robert@webkit.org>
Quirksmode: Break Tag Extra Space Bug
https://bugs.webkit.org/show_bug.cgi?id=11943
Reviewed by David Hyatt.
Collapse away all space between text and a hard line-break when in a right-aligned
container so that the trailing space doesn't push the text away from the container edge.
Test: fast/text/whitespace/trailing-space-before-br-in-right-aligned-text.html
* rendering/RenderBlockLineLayout.cpp:
(WebCore::RenderBlock::LineBreaker::nextSegmentBreak):
2013-09-18 Jer Noble <jer.noble@apple.com>
Unreviewed build fix for Qt (and other) ports after 156049.
Wrap implementation of PublicURLManager in ENABLE(BLOB) check.
* html/PublicURLManager.cpp:
2013-09-18 Jer Noble <jer.noble@apple.com>
Merge blink MediaSource changes since fork.
https://bugs.webkit.org/show_bug.cgi?id=118752
Rubber-stamped by Eric Carlson.
Tests: http/tests/media/media-source/mediasource-addsourcebuffer.html
http/tests/media/media-source/mediasource-append-buffer.html
http/tests/media/media-source/mediasource-buffered.html
http/tests/media/media-source/mediasource-closed.html
http/tests/media/media-source/mediasource-config-change-mp4-a-bitrate.html
http/tests/media/media-source/mediasource-config-change-mp4-av-audio-bitrate.html
http/tests/media/media-source/mediasource-config-change-mp4-av-framesize.html
http/tests/media/media-source/mediasource-config-change-mp4-av-video-bitrate.html
http/tests/media/media-source/mediasource-config-change-mp4-v-bitrate.html
http/tests/media/media-source/mediasource-config-change-mp4-v-framerate.html
http/tests/media/media-source/mediasource-config-change-mp4-v-framesize.html
http/tests/media/media-source/mediasource-config-change-webm-a-bitrate.html
http/tests/media/media-source/mediasource-config-change-webm-av-audio-bitrate.html
http/tests/media/media-source/mediasource-config-change-webm-av-framesize.html
http/tests/media/media-source/mediasource-config-change-webm-av-video-bitrate.html
http/tests/media/media-source/mediasource-config-change-webm-v-bitrate.html
http/tests/media/media-source/mediasource-config-change-webm-v-framerate.html
http/tests/media/media-source/mediasource-config-change-webm-v-framesize.html
http/tests/media/media-source/mediasource-is-type-supported.html
http/tests/media/media-source/mediasource-multiple-attach.html
http/tests/media/media-source/mediasource-play.html
http/tests/media/media-source/mediasource-sourcebufferlist.html
Add files to project. Fix compile errors exposed by enabling.
* WebCore.xcodeproj/project.pbxproj:
* Modules/mediasource/MediaSourceRegistry.cpp:
(WebCore::MediaSourceRegistry::lookupMediaSource):
* platform/graphics/avfoundation/MediaPlayerPrivateAVFoundation.h:
(WebCore::MediaPlayerPrivateAVFoundation::load):
* platform/graphics/mac/MediaPlayerPrivateQTKit.h:
(WebCore::MediaPlayerPrivateQTKit::load):
* platform/mac/MIMETypeRegistryMac.mm:
(WebCore::MIMETypeRegistry::isSupportedMediaSourceMIMEType):
* CMakeLists.txt:
* DerivedSources.make:
* DerivedSources.pri:
* GNUmakefile.list.am:
Merge
https://chromium.googlesource.com/chromium/blink/+/c38e2955db98a300a535b692869fea0e41501497
https://chromium.googlesource.com/chromium/blink/+/8568015e9bee1de7fccee28163f9e4a4b51f9baf
https://chromium.googlesource.com/chromium/blink/+/14417e8fa6294f4e7dbc1e0fac549398522b2f97
https://chromium.googlesource.com/chromium/blink/+/f43a5496f233102f8861a067a9cf8053c010d401
https://chromium.googlesource.com/chromium/blink/+/57771439806f7c6e6a272efb1ea72900f5f6a015
https://chromium.googlesource.com/chromium/blink/+/8c77a790a9d225194db0a8832399d0f9e1fa54ec
https://chromium.googlesource.com/chromium/blink/+/d33ae3fa7a8592e946503ed17f862a27c6d9dde1
https://chromium.googlesource.com/chromium/blink/+/1caaa9c51f06e1b9341d58c994f77fd59fcd236d
https://chromium.googlesource.com/chromium/blink/+/e95720393b0ebe67f19de39bb77cdf2926165512
https://chromium.googlesource.com/chromium/blink/+/bad2c1b4b70faec731b2ad3cc8a4ccf28de6cc38
https://chromium.googlesource.com/chromium/blink/+/a7873430c3d5c9373336c6f3993db3cb4228e9cd
https://chromium.googlesource.com/chromium/blink/+/508966d5e32360b3cec058f9fbae0014542fbc52
https://chromium.googlesource.com/chromium/blink/+/371dfe72f61ce6f73e6c242324da73c415d38be3
2013-09-18 Andreas Kling <akling@apple.com>
CTTE: RenderBR always has an HTMLElement.
<https://webkit.org/b/121557>
Reviewed by Antti Koivisto.
This renderer is never anonymous and always has a corresponding HTMLElement.
Tighten this up by making the constructor take a HTMLElement& and remove
RenderBR::createAnonymous().
2013-09-18 Andreas Kling <akling@apple.com>
Avoid using RenderBR internally in RenderMenuList.
<https://webkit.org/b/121550>
Reviewed by Antti Koivisto.
RenderMenuLists with an empty caption text were previously using a
RenderBR as placeholder.
Switch to using a \n RenderText instead so we can tighten RenderBR.
This will change DRT dumps but actual metrics should not change.
2013-09-18 Antti Koivisto <antti@apple.com>
Change one accidental "object->isText() || object->isLineBreak()" from previous patch back to "object->isTextOrLineBreak()"
Not reviewed.
* rendering/InlineIterator.h:
(WebCore::isIteratorTarget):
2013-09-18 Antti Koivisto <antti@apple.com>
Remove RenderWordBreak
https://bugs.webkit.org/show_bug.cgi?id=121549
Reviewed by Andreas Kling.
Remove RenderWordBreak and make it a bit in RenderBR instead.
* CMakeLists.txt:
* GNUmakefile.list.am:
* Target.pri:
* WebCore.vcxproj/WebCore.vcxproj:
* WebCore.xcodeproj/project.pbxproj:
* dom/Document.cpp:
(WebCore::Document::updateHoverActiveState):
* dom/Position.cpp:
(WebCore::hasInlineBoxWrapper):
(WebCore::Position::hasRenderedNonAnonymousDescendantsWithHeight):
* editing/Editor.cpp:
(WebCore::findFirstMarkable):
* editing/TextIterator.cpp:
(WebCore::ignoresContainerClip):
* html/HTMLElement.cpp:
(WebCore::HTMLElement::createRenderer):
* rendering/InlineBox.cpp:
(WebCore::InlineBox::logicalHeight):
(WebCore::InlineBox::baselinePosition):
(WebCore::InlineBox::lineHeight):
(WebCore::InlineBox::deleteLine):
(WebCore::InlineBox::extractLine):
(WebCore::InlineBox::attachLine):
(WebCore::InlineBox::nodeAtPoint):
* rendering/InlineBox.h:
(WebCore::InlineBox::isLineBreak):
* rendering/InlineFlowBox.cpp:
(WebCore::InlineFlowBox::addToLine):
(WebCore::InlineFlowBox::computeOverflow):
* rendering/InlineIterator.h:
(WebCore::InlineIterator::atTextParagraphSeparator):
(WebCore::isIteratorTarget):
* rendering/RenderBR.cpp:
(WebCore::RenderBR::RenderBR):
* rendering/RenderBR.h:
(WebCore::toRenderBR):
RenderBR now represents both hard and soft line breaks. It will be renamed to RenderLineBreak later.
* rendering/RenderBlock.cpp:
(WebCore::InlineMinMaxIterator::next):
(WebCore::RenderBlock::computeInlinePreferredLogicalWidths):
* rendering/RenderBlockLineLayout.cpp:
(WebCore::createInlineBoxForRenderer):
(WebCore::dirtyLineBoxesForRenderer):
(WebCore::RenderBlock::computeBlockDirectionPositionsForLine):
(WebCore::RenderBlockFlow::layoutInlineChildren):
(WebCore::textBeginsWithBreakablePosition):
(WebCore::canBreakAtThisPosition):
(WebCore::RenderBlock::LineBreaker::nextSegmentBreak):
* rendering/RenderInline.cpp:
(WebCore::RenderInline::generateCulledLineBoxRects):
(WebCore::RenderInline::culledInlineFirstLineBox):
(WebCore::RenderInline::culledInlineLastLineBox):
(WebCore::RenderInline::dirtyLineBoxes):
* rendering/RenderLineBoxList.cpp:
(WebCore::RenderLineBoxList::dirtyLinesFromChangedChild):
* rendering/RenderObject.h:
(WebCore::RenderObject::isLineBreak):
This bit covers both BR and WBR.
(WebCore::RenderObject::isBR):
(WebCore::RenderObject::isLineBreakOpportunity):
Rename isWordBreak to isLineBreakOpportunity. This matches HTML5 spec terminology.
(WebCore::RenderObject::isTextOrLineBreak):
Since WBR used to be Text we want this check to still cover it too. Renamed from isTextOrBR.
(WebCore::RenderObject::setIsLineBreak):
(WebCore::RenderObject::isWBR):
(WebCore::RenderObject::RenderObjectBitfields::RenderObjectBitfields):
* rendering/RenderObjectChildList.cpp:
(WebCore::RenderObjectChildList::removeChildNode):
* rendering/RenderText.cpp:
* rendering/RenderText.h:
* rendering/RenderTreeAsText.cpp:
(WebCore::RenderTreeAsText::writeRenderObject):
* rendering/RenderWordBreak.cpp: Removed.
* rendering/RenderWordBreak.h: Removed.
* rendering/RenderingAllInOne.cpp:
* rendering/RootInlineBox.cpp:
(WebCore::RootInlineBox::ascentAndDescentForBox):
(WebCore::RootInlineBox::verticalPositionForBox):
(WebCore::RootInlineBox::includeLeadingForBox):
(WebCore::RootInlineBox::includeFontForBox):
(WebCore::RootInlineBox::includeGlyphsForBox):
(WebCore::RootInlineBox::includeMarginForBox):
2013-09-18 Csaba Osztrogonác <ossy@webkit.org>
ASSERT_NOT_REACHED is touched in WebCore::CSSPrimitiveValue::computeLengthDouble
https://bugs.webkit.org/show_bug.cgi?id=120469
Tests: fast/css/outline-offset-parsing-assert.html
fast/css/outline-offset-parsing.html
Reviewed by Dirk Schulze.
* css/CSSParser.cpp:
(WebCore::CSSParser::parseValue): Fixed a typo after r66615, outline-offset can't be percentage.
2013-09-18 Gurpreet Kaur <k.gurpreet@samsung.com>
[MathML] Implement the subscriptshift and superscriptshift attributes
https://bugs.webkit.org/show_bug.cgi?id=120069
Reviewed by Darin Adler.
Added support for subscriptshift and superscriptshift attributes. The
subscriptshift attribute is for msup element and superscriptshift for
msup. msubsup can have both subscriptshift and superscriptshift. The
subscriptshift attribute specifies the minimum amount to shift the
baseline of subscript down. The superscriptshift attribute specifies
the minimum amount to shift the baseline of superscript up.
Tests: mathml/presentation/msub-subscriptshift.html
mathml/presentation/msubsup-subscriptshift.html
mathml/presentation/msubsup-superscriptshift.html
mathml/presentation/msup-superscriptshift.html
mathml/presentation/multiscript-subscriptshift.html
mathml/presentation/multiscript-superscriptshift.html
* mathml/mathattrs.in:
* rendering/mathml/RenderMathMLScripts.cpp:
(WebCore::RenderMathMLScripts::layout):
For aligning the subscript and superscript padding is added to the base.
So subscriptshift and superscriptshift attributes is set as padding bottom
and padding top of base respectively.
2013-09-18 Mario Sanchez Prada <mario.prada@samsung.com>
[ATK] Expose aria-haspopup and aria-sort without the 'aria-' prefix
https://bugs.webkit.org/show_bug.cgi?id=121495
Reviewed by Chris Fleizach.
Removed the 'aria-' prefix from the exposed ATK object attributes
for WAI-ARIA attributes 'aria-haspopup' and 'aria-sort'.
* accessibility/atk/WebKitAccessibleWrapperAtk.cpp:
(webkitAccessibleGetAttributes): Removed the prefix.
2013-09-17 Antti Koivisto <antti@apple.com>
Rename InlineBox::isText()
<https://webkit.org/b/121525>
Reviewed by Andreas Kling.
The flag sounds like RenderObject::isText() yet it can be set for some inline boxes generated
for non-text renderers too (br, list markers). This is pretty confusing.
Rename to InlineBox::behavesLikeText().
* rendering/InlineBox.cpp:
(WebCore::InlineBox::logicalHeight):
(WebCore::InlineBox::baselinePosition):
(WebCore::InlineBox::lineHeight):
* rendering/InlineBox.h:
(WebCore::InlineBox::behavesLikeText):
(WebCore::InlineBox::setBehavesLikeText):
(WebCore::InlineBox::InlineBoxBitfields::InlineBoxBitfields):
* rendering/InlineFlowBox.cpp:
(WebCore::InlineFlowBox::addToLine):
(WebCore::InlineFlowBox::placeBoxesInBlockDirection):
* rendering/InlineTextBox.cpp:
(WebCore::InlineTextBox::baselinePosition):
(WebCore::InlineTextBox::lineHeight):
* rendering/RenderBlockLineLayout.cpp:
(WebCore::createInlineBoxForRenderer):
(WebCore::setLogicalWidthForTextRun):
* rendering/RenderListMarker.cpp:
(WebCore::RenderListMarker::createInlineBox):
* rendering/RenderText.cpp:
(WebCore::RenderText::createInlineTextBox):
* rendering/RootInlineBox.cpp:
(WebCore::RootInlineBox::includeLeadingForBox):
(WebCore::RootInlineBox::includeFontForBox):
(WebCore::RootInlineBox::includeGlyphsForBox):
(WebCore::RootInlineBox::includeMarginForBox):
Switch tests from isText() to isTextOrBR(). This matches the behavior before r155957.
I don't know if there is a case where this actually makes any difference in behavior.
2013-09-17 Sam Weinig <sam@webkit.org>
Shrink SVGPathStringBuilder
https://bugs.webkit.org/show_bug.cgi?id=121536
Reviewed by Anders Carlsson.
- Use StringBuilder everywhere to avoid unnecessary temporary
String objects and code size bloat.
- Also did a drive by FINAL / OVERRIDE pass.
As an example of the win, the function SVGPathStringBuilder::arcTo
went from being 6120 bytes down to just 378 bytes.
* svg/SVGPathStringBuilder.cpp:
(WebCore::SVGPathStringBuilder::SVGPathStringBuilder):
(WebCore::SVGPathStringBuilder::~SVGPathStringBuilder):
(WebCore::SVGPathStringBuilder::cleanup):
(WebCore::SVGPathStringBuilder::incrementPathSegmentCount):
(WebCore::SVGPathStringBuilder::continueConsuming):
It wasn't helpful for these to be inlined, so move them to
the implementation file.
(WebCore::appendFlag):
(WebCore::appendNumber):
(WebCore::appendPoint):
Added helpers.
(WebCore::SVGPathStringBuilder::moveTo):
(WebCore::SVGPathStringBuilder::lineTo):
(WebCore::SVGPathStringBuilder::lineToHorizontal):
(WebCore::SVGPathStringBuilder::lineToVertical):
(WebCore::SVGPathStringBuilder::curveToCubic):
(WebCore::SVGPathStringBuilder::curveToCubicSmooth):
(WebCore::SVGPathStringBuilder::curveToQuadratic):
(WebCore::SVGPathStringBuilder::curveToQuadraticSmooth):
(WebCore::SVGPathStringBuilder::arcTo):
(WebCore::SVGPathStringBuilder::closePath):
* svg/SVGPathStringBuilder.h:
Stopped using operator+ and removed duplicate string building logic in each build
type (e.g. both sides of the PathCoordinateMode condition were doing almost identical
work).
2013-09-17 Sam Weinig <sam@webkit.org>
CTTE: Convert some straggling Element subclasses constructors to take a Document&
https://bugs.webkit.org/show_bug.cgi?id=121533
Reviewed by Anders Carlsson.
* html/HTMLMeterElement.cpp:
(WebCore::HTMLMeterElement::didAddUserAgentShadowRoot):
* html/HTMLProgressElement.cpp:
(WebCore::HTMLProgressElement::didAddUserAgentShadowRoot):
* html/HTMLTextAreaElement.cpp:
(WebCore::HTMLTextAreaElement::didAddUserAgentShadowRoot):
* html/SearchInputType.cpp:
(WebCore::SearchInputType::createShadowSubtree):
* html/TextFieldInputType.cpp:
(WebCore::TextFieldInputType::createShadowSubtree):
* html/shadow/MeterShadowElement.cpp:
(WebCore::MeterShadowElement::MeterShadowElement):
(WebCore::MeterInnerElement::MeterInnerElement):
* html/shadow/MeterShadowElement.h:
(WebCore::MeterInnerElement::create):
(WebCore::MeterBarElement::create):
(WebCore::MeterValueElement::create):
* html/shadow/ProgressShadowElement.cpp:
(WebCore::ProgressShadowElement::ProgressShadowElement):
(WebCore::ProgressInnerElement::ProgressInnerElement):
(WebCore::ProgressBarElement::ProgressBarElement):
(WebCore::ProgressValueElement::ProgressValueElement):
* html/shadow/ProgressShadowElement.h:
(WebCore::ProgressInnerElement::create):
(WebCore::ProgressBarElement::create):
(WebCore::ProgressValueElement::create):
* html/shadow/SpinButtonElement.cpp:
(WebCore::SpinButtonElement::SpinButtonElement):
(WebCore::SpinButtonElement::create):
* html/shadow/SpinButtonElement.h:
* html/shadow/TextControlInnerElements.cpp:
(WebCore::TextControlInnerContainer::TextControlInnerContainer):
(WebCore::TextControlInnerContainer::create):
(WebCore::TextControlInnerElement::TextControlInnerElement):
(WebCore::TextControlInnerElement::create):
(WebCore::TextControlInnerTextElement::TextControlInnerTextElement):
(WebCore::TextControlInnerTextElement::create):
(WebCore::SearchFieldResultsButtonElement::SearchFieldResultsButtonElement):
(WebCore::SearchFieldResultsButtonElement::create):
(WebCore::SearchFieldCancelButtonElement::SearchFieldCancelButtonElement):
(WebCore::SearchFieldCancelButtonElement::create):
(WebCore::InputFieldSpeechButtonElement::InputFieldSpeechButtonElement):
(WebCore::InputFieldSpeechButtonElement::create):
* html/shadow/TextControlInnerElements.h:
2013-09-17 Zoltan Horvath <zoltan@webkit.org>
[CSS Shapes] Use the float height to determine position in shape-inside
https://bugs.webkit.org/show_bug.cgi?id=102846
Reviewed by Darin Adler.
Float positioning inside shape-inside has been working only for simple cases when the float boundaries didn't overlap with the shape.
This patch fixes the behavior for left floats and shapes with inline content. I want to add this work step by step, therefore the next
step would be to add support for block content with inline content (e.g. paragraphs) then cover cases with right floats.
Tests: fast/shapes/shape-inside/shape-inside-left-float-in-lower-left-triangle-inline-content.html
fast/shapes/shape-inside/shape-inside-left-float-in-lower-right-triangle-inline-content.html
fast/shapes/shape-inside/shape-inside-left-float-in-upper-left-triangle-inline-content.html
fast/shapes/shape-inside/shape-inside-left-float-in-upper-right-triangle-inline-content.html
* rendering/LineWidth.cpp:
(WebCore::LineWidth::LineWidth): Use the new updateCurrentShapeSegment member function.
(WebCore::LineWidth::updateCurrentShapeSegment): We need a function to update the current line segment's reference, since we use it multiple places.
* rendering/LineWidth.h: Add new member function.
* rendering/RenderBlock.cpp:
(WebCore::RenderBlock::computeLogicalLocationForFloat): Fix positioning of a floating element.
* rendering/RenderBlockLineLayout.cpp:
(WebCore::RenderBlock::updateShapeAndSegmentsForCurrentLine): Use updateSegmentsForLine instead of computeSegmentsForLine.
(WebCore::RenderBlock::updateShapeAndSegmentsForCurrentLineInFlowThread): Use updateSegmentsForLine instead of computeSegmentsForLine.
(WebCore::RenderBlock::adjustLogicalLineTopAndLogicalHeightIfNeeded):
(WebCore::updateSegmentsForShapes): After our float is positioned, we need to adjust the current lineTop and update the logical height to be able to wrap around the float.
(WebCore::RenderBlock::LineBreaker::nextSegmentBreak): If we have a float in our line we might need to adjust our lineTop and logicalHeight.
* rendering/shapes/ShapeInfo.cpp:
(WebCore::::computeSegmentsForLine): Add new const function to compute the segments. I'd like make this function static later if possible.
(WebCore::::updateSegmentsForLine): Old computeSegmentsForLine, change name to indicate that it is actually changing things.
* rendering/shapes/ShapeInfo.h: Update function names, add declaration.
(WebCore::ShapeInfo::clearSegments):
(WebCore::ShapeInfo::logicalLineBottom):
(WebCore::ShapeInfo::lineOverlapsShapeBounds):
* rendering/shapes/ShapeInsideInfo.cpp:
(WebCore::ShapeInsideInfo::computeFirstFitPositionForFloat): Compute the first fit position below the current line position inside shapes. I called this function
this way, because currently we use it only for shapes.
* rendering/shapes/ShapeInsideInfo.h: Update function names.
* rendering/shapes/ShapeOutsideInfo.cpp: Update function names.
(WebCore::ShapeOutsideInfo::computeSegmentsForContainingBlockLine):
(WebCore::ShapeOutsideInfo::updateSegmentsForLine):
* rendering/shapes/ShapeOutsideInfo.h: Update function names.
2013-09-17 Sam Weinig <sam@webkit.org>
Replace use of OwnArrayPtr<Foo> with std::unique_ptr<Foo[]> in WebCore
https://bugs.webkit.org/show_bug.cgi?id=121527
Reviewed by Anders Carlsson.
* Modules/webaudio/AudioBufferSourceNode.cpp:
(WebCore::AudioBufferSourceNode::setBuffer):
* Modules/webaudio/AudioBufferSourceNode.h:
* Modules/webaudio/OscillatorNode.h:
* css/CSSParser.cpp:
(WebCore::CSSParser::setupParser):
(WebCore::CSSParser::currentCharacter16):
* css/CSSParser.h:
* html/HTMLAreaElement.h:
* html/HTMLFrameSetElement.h:
* html/canvas/WebGLRenderingContext.cpp:
(WebCore::WebGLRenderingContext::copyTexSubImage2D):
(WebCore::WebGLRenderingContext::simulateVertexAttrib0):
(WebCore::WebGLRenderingContext::LRUImageBufferCache::LRUImageBufferCache):
* html/canvas/WebGLRenderingContext.h:
* platform/ScrollAnimatorNone.cpp:
* platform/audio/DynamicsCompressor.cpp:
(WebCore::DynamicsCompressor::setNumberOfChannels):
* platform/audio/DynamicsCompressor.h:
* platform/audio/FFTFrame.h:
* platform/audio/gstreamer/FFTFrameGStreamer.cpp:
(WebCore::FFTFrame::FFTFrame):
* platform/efl/ScrollbarEfl.cpp:
(ScrollbarEfl::updateThumbPositionAndProportion):
* platform/graphics/ANGLEWebKitBridge.cpp:
(WebCore::ANGLEWebKitBridge::compileShaderSource):
* platform/graphics/GraphicsContext3D.cpp:
(WebCore::GraphicsContext3D::texImage2DResourceSafe):
* platform/graphics/GraphicsContext3D.h:
* platform/graphics/GraphicsContext3DPrivate.cpp:
(WebCore::GraphicsContext3DPrivate::paintToTextureMapper):
* platform/graphics/blackberry/LayerTexture.cpp:
* platform/graphics/ca/win/CACFLayerTreeHost.cpp:
(WebCore::getDirtyRects):
* platform/graphics/cg/GraphicsContext3DCG.cpp:
(WebCore::GraphicsContext3D::ImageExtractor::extractImage):
* platform/graphics/cg/GraphicsContextCG.cpp:
* platform/graphics/cg/ImageBufferCG.cpp:
* platform/graphics/gpu/Texture.cpp:
(WebCore::Texture::updateSubRect):
* platform/graphics/harfbuzz/HarfBuzzShaper.cpp:
(WebCore::HarfBuzzShaper::HarfBuzzShaper):
(WebCore::HarfBuzzShaper::setNormalizedBuffer):
* platform/graphics/harfbuzz/HarfBuzzShaper.h:
* platform/graphics/opengl/GraphicsContext3DOpenGLCommon.cpp:
(WebCore::GraphicsContext3D::paintRenderingResultsToCanvas):
(WebCore::GraphicsContext3D::compileShader):
(WebCore::GraphicsContext3D::getActiveAttrib):
(WebCore::GraphicsContext3D::getActiveUniform):
(WebCore::GraphicsContext3D::getProgramInfoLog):
(WebCore::GraphicsContext3D::getShaderInfoLog):
* platform/graphics/opentype/OpenTypeSanitizer.cpp:
* platform/graphics/texmap/TextureMapperGL.cpp:
* platform/graphics/wince/SharedBitmap.cpp:
(WebCore::SharedBitmap::SharedBitmap):
(WebCore::SharedBitmap::to16bit):
* platform/graphics/wince/SharedBitmap.h:
* platform/image-decoders/blackberry/JPEGImageDecoder.cpp:
(WebCore::ImageReader::decode):
* platform/image-decoders/png/PNGImageDecoder.cpp:
(WebCore::PNGImageReader::createRowBuffer):
* platform/win/ContextMenuWin.cpp:
(WebCore::ContextMenu::getContextMenuItems):
* platform/win/LoggingWin.cpp:
(WebCore::logLevelString):
* plugins/PluginPackage.cpp:
* plugins/blackberry/PluginViewBlackBerry.cpp:
(WebCore::PluginView::handleTouchEvent):
* plugins/win/PluginPackageWin.cpp:
(WebCore::PluginPackage::fetchInfo):
2013-09-17 Commit Queue <commit-queue@webkit.org>
Unreviewed, rolling out r156001.
http://trac.webkit.org/changeset/156001
https://bugs.webkit.org/show_bug.cgi?id=121529
Broke API tests (Requested by ap on #webkit).
* platform/mac/HTMLConverter.h:
* platform/mac/HTMLConverter.mm:
(WebDefaultFont):
(_fontForNameAndSize):
(+[WebHTMLConverter defaultParagraphStyle]):
(-[WebHTMLConverter _computedStyleForElement:]):
(-[WebHTMLConverter _specifiedStyleForElement:]):
(-[WebHTMLConverter _computedStringForNode:property:]):
(-[WebHTMLConverter _stringForNode:property:]):
(-[WebHTMLConverter _getComputedFloat:forNode:property:]):
(-[WebHTMLConverter _getFloat:forNode:property:]):
(_colorForRGBColor):
(_shadowForShadowStyle):
(-[WebHTMLConverter _elementIsBlockLevel:]):
(-[WebHTMLConverter _elementHasOwnBackgroundColor:]):
(-[WebHTMLConverter _computedColorForNode:property:]):
(-[WebHTMLConverter _colorForNode:property:]):
(-[WebHTMLConverter _computedAttributesForElement:]):
(-[WebHTMLConverter _attributesForElement:]):
(-[WebHTMLConverter _newParagraphForElement:tag:allowEmpty:suppressTrailingSpace:]):
(-[WebHTMLConverter _newLineForElement:]):
(-[WebHTMLConverter _newTabForElement:]):
(-[WebHTMLConverter _addAttachmentForElement:URL:needsParagraph:usePlaceholder:]):
(-[WebHTMLConverter _addQuoteForElement:opening:level:]):
(-[WebHTMLConverter _addValue:forElement:]):
(-[WebHTMLConverter _fillInBlock:forElement:backgroundColor:extraMargin:extraPadding:isTable:]):
(_dateForString):
(_colCompare):
(-[WebHTMLConverter _enterElement:tag:display:]):
(-[WebHTMLConverter _addTableForElement:]):
(-[WebHTMLConverter _addTableCellForElement:]):
(-[WebHTMLConverter _processElement:tag:display:depth:]):
(-[WebHTMLConverter _addMarkersToList:range:]):
(-[WebHTMLConverter _exitElement:tag:display:depth:startIndex:]):
(-[WebHTMLConverter _processText:]):
(-[WebHTMLConverter _traverseNode:depth:embedded:]):
(-[WebHTMLConverter _traverseFooterNode:depth:]):
(-[WebHTMLConverter _loadFromDOMRange]):
(-[WebHTMLConverter dealloc]):
(-[WebHTMLConverter init]):
(-[WebHTMLConverter initWithDOMRange:]):
(-[WebHTMLConverter attributedString]):
(+[WebHTMLConverter editingAttributedStringFromRange:]):
(fileWrapperForElement):
2013-09-17 Samuel White <samuel_white@apple.com>
AX: Mac AXARIABusy should be AXElementBusy (not ARIA specific)
https://bugs.webkit.org/show_bug.cgi?id=121442
Reviewed by Chris Fleizach.
No new tests, changed AXARIABusy attribute to AXElementBusy to uncouple the concept of busy with
the aria-busy attribute. This will allow us to expand on the definition of busy moving forward.
* accessibility/mac/WebAccessibilityObjectWrapperMac.mm:
(-[WebAccessibilityObjectWrapper additionalAccessibilityAttributeNames]):
(-[WebAccessibilityObjectWrapper accessibilityAttributeValue:]):
2013-09-17 Andreas Kling <akling@apple.com>
Pack create_hash_table tables better.
<https://webkit.org/b/121517>
Reviewed by Sam Weinig.
Reduces WebCore binary size by 72744 bytes.
* bindings/scripts/CodeGeneratorJS.pm:
(GenerateHashTable):
Updated for new HashTableValue member order.
* bindings/scripts/test/JS/*:
Rebaselined bindings tests.
2013-09-17 Zoltan Horvath <zoltan@webkit.org>
[Qt] Add FlowThreadController.h to Target.pri
https://bugs.webkit.org/show_bug.cgi?id=121516
Reviewed by Dirk Schulze.
No new tests, no behavior change.
* Target.pri:
2013-09-17 Anders Carlsson <andersca@apple.com>
Stop explicitly using PassOwnPtr in WebCore/html
https://bugs.webkit.org/show_bug.cgi?id=121511
Reviewed by Andreas Kling.
* dom/ElementRareData.h:
(WebCore::ElementRareData::setClassList):
* html/ButtonInputType.cpp:
(WebCore::ButtonInputType::create):
* html/ButtonInputType.h:
* html/CheckboxInputType.cpp:
(WebCore::CheckboxInputType::create):
(WebCore::CheckboxInputType::willDispatchClick):
* html/CheckboxInputType.h:
* html/ClassList.cpp:
(WebCore::ClassList::create):
* html/ClassList.h:
* html/ColorInputType.cpp:
(WebCore::ColorInputType::create):
* html/ColorInputType.h:
* html/DateInputType.cpp:
(WebCore::DateInputType::create):
* html/DateInputType.h:
* html/DateTimeInputType.cpp:
(WebCore::DateTimeInputType::create):
* html/DateTimeInputType.h:
* html/DateTimeLocalInputType.cpp:
(WebCore::DateTimeLocalInputType::create):
* html/DateTimeLocalInputType.h:
* html/EmailInputType.cpp:
(WebCore::EmailInputType::create):
* html/EmailInputType.h:
* html/FileInputType.cpp:
(WebCore::FileInputType::create):
* html/FileInputType.h:
* html/FormAssociatedElement.cpp:
(WebCore::FormAttributeTargetObserver::create):
* html/FormController.cpp:
(WebCore::SavedFormState::create):
(WebCore::SavedFormState::deserialize):
(WebCore::FormKeyGenerator::create):
(WebCore::FormController::createSavedFormStateMap):
* html/FormController.h:
(WebCore::FormController::create):
* html/HTMLInputElement.cpp:
(WebCore::ListAttributeTargetObserver::create):
* html/HiddenInputType.cpp:
(WebCore::HiddenInputType::create):
* html/HiddenInputType.h:
* html/ImageInputType.cpp:
(WebCore::ImageInputType::create):
* html/ImageInputType.h:
* html/InputType.cpp:
(WebCore::InputType::create):
(WebCore::InputType::createText):
(WebCore::InputType::willDispatchClick):
* html/InputType.h:
* html/MonthInputType.cpp:
(WebCore::MonthInputType::create):
* html/MonthInputType.h:
* html/NumberInputType.cpp:
(WebCore::NumberInputType::create):
* html/NumberInputType.h:
* html/PasswordInputType.cpp:
(WebCore::PasswordInputType::create):
* html/PasswordInputType.h:
* html/PublicURLManager.h:
(WebCore::PublicURLManager::create):
* html/RadioInputType.cpp:
(WebCore::RadioInputType::create):
(WebCore::RadioInputType::willDispatchClick):
* html/RadioInputType.h:
* html/RangeInputType.cpp:
(WebCore::RangeInputType::create):
* html/RangeInputType.h:
* html/ResetInputType.cpp:
(WebCore::ResetInputType::create):
* html/ResetInputType.h:
* html/SearchInputType.cpp:
(WebCore::SearchInputType::create):
* html/SearchInputType.h:
* html/SubmitInputType.cpp:
(WebCore::SubmitInputType::create):
* html/SubmitInputType.h:
* html/TelephoneInputType.cpp:
(WebCore::TelephoneInputType::create):
* html/TelephoneInputType.h:
* html/TextInputType.cpp:
(WebCore::TextInputType::create):
* html/TextInputType.h:
* html/TimeInputType.cpp:
(WebCore::TimeInputType::create):
* html/TimeInputType.h:
* html/URLInputType.cpp:
(WebCore::URLInputType::create):
* html/URLInputType.h:
* html/ValidationMessage.cpp:
(WebCore::ValidationMessage::create):
* html/ValidationMessage.h:
* html/ValidityState.h:
(WebCore::ValidityState::create):
* html/WeekInputType.cpp:
(WebCore::WeekInputType::create):
* html/WeekInputType.h:
* html/canvas/CanvasRenderingContext2D.cpp:
(WebCore::CanvasRenderingContext2D::createCompositingBuffer):
* html/canvas/CanvasRenderingContext2D.h:
(WebCore::CanvasRenderingContext2D::create):
* html/canvas/EXTDrawBuffers.cpp:
(WebCore::EXTDrawBuffers::create):
* html/canvas/EXTDrawBuffers.h:
* html/canvas/EXTTextureFilterAnisotropic.cpp:
(WebCore::EXTTextureFilterAnisotropic::create):
* html/canvas/EXTTextureFilterAnisotropic.h:
* html/canvas/OESElementIndexUint.cpp:
(WebCore::OESElementIndexUint::create):
* html/canvas/OESElementIndexUint.h:
* html/canvas/OESStandardDerivatives.cpp:
(WebCore::OESStandardDerivatives::create):
* html/canvas/OESStandardDerivatives.h:
* html/canvas/OESTextureFloat.cpp:
(WebCore::OESTextureFloat::create):
* html/canvas/OESTextureFloat.h:
* html/canvas/OESTextureHalfFloat.cpp:
(WebCore::OESTextureHalfFloat::create):
* html/canvas/OESTextureHalfFloat.h:
* html/canvas/OESVertexArrayObject.cpp:
(WebCore::OESVertexArrayObject::create):
* html/canvas/OESVertexArrayObject.h:
* html/canvas/WebGLCompressedTextureATC.cpp:
(WebCore::WebGLCompressedTextureATC::create):
* html/canvas/WebGLCompressedTextureATC.h:
* html/canvas/WebGLCompressedTexturePVRTC.cpp:
(WebCore::WebGLCompressedTexturePVRTC::create):
* html/canvas/WebGLCompressedTexturePVRTC.h:
* html/canvas/WebGLCompressedTextureS3TC.cpp:
(WebCore::WebGLCompressedTextureS3TC::create):
* html/canvas/WebGLCompressedTextureS3TC.h:
* html/canvas/WebGLDebugRendererInfo.cpp:
(WebCore::WebGLDebugRendererInfo::create):
* html/canvas/WebGLDebugRendererInfo.h:
* html/canvas/WebGLDebugShaders.cpp:
(WebCore::WebGLDebugShaders::create):
* html/canvas/WebGLDebugShaders.h:
* html/canvas/WebGLDepthTexture.cpp:
(WebCore::WebGLDepthTexture::create):
* html/canvas/WebGLDepthTexture.h:
* html/canvas/WebGLLoseContext.cpp:
(WebCore::WebGLLoseContext::create):
* html/canvas/WebGLLoseContext.h:
* html/canvas/WebGLRenderingContext.cpp:
(WebCore::WebGLRenderingContext::create):
* html/canvas/WebGLRenderingContext.h:
* html/parser/BackgroundHTMLParser.cpp:
(WebCore::BackgroundHTMLParser::BackgroundHTMLParser):
(WebCore::BackgroundHTMLParser::resumeFrom):
* html/parser/BackgroundHTMLParser.h:
(WebCore::BackgroundHTMLParser::create):
* html/parser/HTMLDocumentParser.cpp:
(WebCore::HTMLDocumentParser::didReceiveParsedChunkFromBackgroundParser):
(WebCore::HTMLDocumentParser::validateSpeculations):
(WebCore::HTMLDocumentParser::discardSpeculationsAndResumeFrom):
(WebCore::HTMLDocumentParser::processParsedChunkFromBackgroundParser):
* html/parser/HTMLDocumentParser.h:
* html/parser/HTMLElementStack.cpp:
(WebCore::HTMLElementStack::ElementRecord::ElementRecord):
* html/parser/HTMLElementStack.h:
(WebCore::HTMLElementStack::ElementRecord::releaseNext):
(WebCore::HTMLElementStack::ElementRecord::setNext):
* html/parser/HTMLMetaCharsetParser.h:
(WebCore::HTMLMetaCharsetParser::create):
* html/parser/HTMLParserScheduler.h:
(WebCore::HTMLParserScheduler::create):
* html/parser/HTMLParserThread.h:
(WebCore::HTMLParserThread::create):
* html/parser/HTMLPreloadScanner.cpp:
(WebCore::TokenPreloadScanner::StartTagScanner::createPreloadRequest):
* html/parser/HTMLResourcePreloader.cpp:
(WebCore::HTMLResourcePreloader::preload):
* html/parser/HTMLResourcePreloader.h:
(WebCore::PreloadRequest::create):
* html/parser/HTMLScriptRunner.h:
(WebCore::HTMLScriptRunner::create):
* html/parser/HTMLToken.h:
(WebCore::HTMLToken::releaseDoctypeData):
* html/parser/HTMLTokenizer.h:
(WebCore::HTMLTokenizer::create):
* html/parser/HTMLTreeBuilder.h:
(WebCore::HTMLTreeBuilder::create):
* html/parser/XSSAuditor.cpp:
(WebCore::XSSAuditor::filterToken):
* html/parser/XSSAuditor.h:
* html/parser/XSSAuditorDelegate.h:
(WebCore::XSSInfo::create):
* html/track/WebVTTParser.h:
(WebCore::WebVTTParser::create):
* html/track/WebVTTTokenizer.h:
(WebCore::WebVTTTokenizer::create):
2013-09-17 Enrica Casucci <enrica@apple.com>
Upstream changes to WebHTMLConverter to support HTML
to NSAttributedString conversion on both iOS and OS X.
Reviewed by Benjamin Poulain.
* platform/mac/HTMLConverter.h:
* platform/mac/HTMLConverter.mm:
(WebDefaultFont):
(_fontForNameAndSize):
(+[WebHTMLConverter defaultParagraphStyle]):
(-[WebHTMLConverter _computedStyleForElement:]):
(-[WebHTMLConverter _specifiedStyleForElement:]):
(-[WebHTMLConverter _computedStringForNode:property:]):
(-[WebHTMLConverter _stringForNode:property:]):
(-[WebHTMLConverter _getComputedFloat:forNode:property:]):
(-[WebHTMLConverter _getFloat:forNode:property:]):
(_NSFirstPathForDirectoriesInDomains):
(_NSSystemLibraryPath):
(-[WebHTMLConverter _webKitBundle]):
(_colorForRGBColor):
(_shadowForShadowStyle):
(-[WebHTMLConverter _elementIsBlockLevel:]):
(-[WebHTMLConverter _elementHasOwnBackgroundColor:]):
(-[WebHTMLConverter _computedColorForNode:property:]):
(-[WebHTMLConverter _colorForNode:property:]):
(-[WebHTMLConverter _computedAttributesForElement:]):
(-[WebHTMLConverter _attributesForElement:]):
(-[WebHTMLConverter _newParagraphForElement:tag:allowEmpty:suppressTrailingSpace:]):
(-[WebHTMLConverter _newLineForElement:]):
(-[WebHTMLConverter _newTabForElement:]):
(-[WebHTMLConverter _WebMessageDocumentClass]):
(-[WebHTMLConverter _addAttachmentForElement:URL:needsParagraph:usePlaceholder:]):
(-[WebHTMLConverter _addQuoteForElement:opening:level:]):
(-[WebHTMLConverter _addValue:forElement:]):
(-[WebHTMLConverter _fillInBlock:forElement:backgroundColor:extraMargin:extraPadding:isTable:]):
(_dateForString):
(_colCompare):
(-[WebHTMLConverter _processMetaElementWithName:content:]):
(-[WebHTMLConverter _processHeadElement:]):
(-[WebHTMLConverter _enterElement:tag:display:embedded:]):
(-[WebHTMLConverter _addTableForElement:]):
(-[WebHTMLConverter _addTableCellForElement:]):
(-[WebHTMLConverter _processElement:tag:display:depth:]):
(-[WebHTMLConverter _addMarkersToList:range:]):
(-[WebHTMLConverter _exitElement:tag:display:depth:startIndex:]):
(-[WebHTMLConverter _processText:]):
(-[WebHTMLConverter _traverseNode:depth:embedded:]):
(-[WebHTMLConverter _traverseFooterNode:depth:]):
(-[WebHTMLConverter _loadFromDOMRange]):
(-[WebHTMLConverter dealloc]):
(-[WebHTMLConverter init]):
(-[WebHTMLConverter initWithDOMRange:]):
(-[WebHTMLConverter attributedString]):
(+[WebHTMLConverter editingAttributedStringFromRange:]):
2013-09-17 Sam Weinig <sam@webkit.org>
Add make_unique and start using it
https://bugs.webkit.org/show_bug.cgi?id=121523
Reviewed by Anders Carlsson.
* html/HTMLAreaElement.h:
* html/HTMLFrameSetElement.h:
* platform/Length.cpp:
(WebCore::newCoordsArray):
(WebCore::newLengthArray):
* platform/Length.h:
Switch off OwnArrayPtr to std::unique_ptr<T[]> and make use of make_unique.
2013-09-17 Simon Fraser <simon.fraser@apple.com>
Hardware accelerated CSS transitions appear pixelated when scaled up using transform
https://bugs.webkit.org/show_bug.cgi?id=27684
<rdar://problem/6134606>
Reviewed by Dean Jackson.
Take transforms and animations into account when computing the contentsScale
for a layer, so that scaled-up layers remain sharp most of the time.
In its recursiveCommitChanges() tree walk, GraphicsLayerCA now tracks
a root-relative transform, and extracts from that transform the X and Y
scales which it uses to scale the backing store.
If the layer has transform animations on it, we keep around
a transformation matrix for the animation endpoints (or keyframes),
pick up the state that has the larger impact on the root-relative scale,
and use that as the layer's transform, and the transform when recursing
over descendants.
Tests: compositing/contents-scale/animating.html
compositing/contents-scale/scaled-ancestor.html
compositing/contents-scale/simple-scale.html
compositing/contents-scale/z-translate.html
* platform/graphics/ca/GraphicsLayerCA.cpp:
(WebCore::maxScaleFromTransform): Decompose the transform if necesssary
to extract the X and Y scale components.
(WebCore::GraphicsLayerCA::GraphicsLayerCA): Initialize m_rootRelativeScaleFactor.
(WebCore::GraphicsLayerCA::flushCompositingState): Supply a TransformationMatrix
for the root of the recursion.
(WebCore::GraphicsLayerCA::layerTransform): This code was factored out of
computeVisibleRect(), and optionally takes a custom transform.
(WebCore::GraphicsLayerCA::computeVisibleRect): Use the layerTransform() function.
(WebCore::GraphicsLayerCA::updateRootRelativeScale): Given a transform from the root,
find the max scale factor by multiplying the various animation endpoint matrices and picking
the one with the biggest impact on scale. Use this to set m_rootRelativeScaleFactor, and
set the flag to say that we need to update contentsScale.
(WebCore::GraphicsLayerCA::recursiveCommitChanges):
(WebCore::GraphicsLayerCA::commitLayerChangesBeforeSublayers): After updating
animations, call updateRootRelativeScale() to update m_rootRelativeScaleFactor.
(WebCore::GraphicsLayerCA::updateAnimations): We have a side table of animation name to
TransformationMatrix, so figure out which entries can be removed from that side table,
and remove them.
(WebCore::GraphicsLayerCA::setAnimationOnLayer):
(WebCore::GraphicsLayerCA::appendToUncommittedAnimations): Store the matrices for
animation endpoints/keyframes in the m_animationTransforms side table. We don't store
them directly in LayerPropertyAnimation because we just want the final matrix for
a transform list, and using a side table makes ownership easier to manage.
(WebCore::GraphicsLayerCA::getTransformFromAnimationsWithMaxScaleImpact):
goes through the matrices for the running animation endpoints/keyframes, and
multiplies each with the transform up to this layer to find the matrix with the
larger impact on scale.
(WebCore::GraphicsLayerCA::setTransformAnimationEndpoints): Returns a vector
of TransformationMatrix for the from and to states.
(WebCore::GraphicsLayerCA::setTransformAnimationKeyframes): Returns a vector
of TransformationMatrix for the keyframes.
(WebCore::GraphicsLayerCA::updateContentsScale): Include m_rootRelativeScaleFactor in the
scale factor computation.
(WebCore::GraphicsLayerCA::dumpAdditionalProperties): If we're dumping visible rects,
also dump the contentsScale. Convenient at these are useful to look at together, and I didn't
want to pollute Internals with yet more flags.
* platform/graphics/ca/GraphicsLayerCA.h:
(WebCore::GraphicsLayerCA::LayerPropertyAnimation::LayerPropertyAnimation): Formatting.
2013-09-17 Commit Queue <commit-queue@webkit.org>
Unreviewed, rolling out r155977.
http://trac.webkit.org/changeset/155977
https://bugs.webkit.org/show_bug.cgi?id=121515
Broke over a dozen tests on Mac WK2 (Requested by ap on
#webkit).
* platform/graphics/ca/GraphicsLayerCA.cpp:
(WebCore::GraphicsLayerCA::GraphicsLayerCA):
(WebCore::GraphicsLayerCA::flushCompositingState):
(WebCore::GraphicsLayerCA::computeVisibleRect):
(WebCore::GraphicsLayerCA::recursiveCommitChanges):
(WebCore::GraphicsLayerCA::commitLayerChangesBeforeSublayers):
(WebCore::GraphicsLayerCA::updateAnimations):
(WebCore::GraphicsLayerCA::setAnimationOnLayer):
(WebCore::GraphicsLayerCA::appendToUncommittedAnimations):
(WebCore::GraphicsLayerCA::setTransformAnimationEndpoints):
(WebCore::GraphicsLayerCA::setTransformAnimationKeyframes):
(WebCore::GraphicsLayerCA::updateContentsScale):
(WebCore::GraphicsLayerCA::dumpAdditionalProperties):
* platform/graphics/ca/GraphicsLayerCA.h:
(WebCore::GraphicsLayerCA::LayerPropertyAnimation::LayerPropertyAnimation):
2013-09-17 Eric Carlson <eric.carlson@apple.com>
MediaStream API: Changing the device enumeration to be async
https://bugs.webkit.org/show_bug.cgi?id=120883
Reviewed by Darin Adler.
Parts merged from https://chromium.googlesource.com/chromium/blink/+/40a96080a1531e50de4eb84571c7dc9fb321ece5
and https://chromium.googlesource.com/chromium/blink/+/ff783a23bb1add588971a8187048a305cf485121
by Tommy Widenflycht.
Test: fast/mediastream/MediaStreamTrack-getSources.html
* CMakeLists.txt: Added new files.
* DerivedSources.make: Ditto.
* GNUmakefile.list.am: Ditto.
* Modules/mediastream/MediaStreamTrack.cpp:
(WebCore::MediaStreamTrack::kind): ASCIILiteral -> NeverDestroyed<AtomicString>.
(WebCore::MediaStreamTrack::readyState): Ditto.
(WebCore::MediaStreamTrack::getSources): New.
* Modules/mediastream/MediaStreamTrack.h:
* Modules/mediastream/MediaStreamTrack.idl:
* Modules/mediastream/MediaStreamTrackSourcesCallback.h: Added.
* Modules/mediastream/MediaStreamTrackSourcesCallback.idl: Added.
* Modules/mediastream/MediaStreamTrackSourcesRequest.cpp: Added.
* Modules/mediastream/MediaStreamTrackSourcesRequest.h: Added.
* Modules/mediastream/SourceInfo.cpp: Added.
* Modules/mediastream/SourceInfo.h: Added.
* Modules/mediastream/SourceInfo.idl: Added.
* WebCore.xcodeproj/project.pbxproj: Add new files.
* bindings/js/JSDOMBinding.h: Add toJS templates for Vector<T> and Vector<RefPtr<T>>.
* platform/mediastream/MediaStreamCenter.h: Add prototype for getMediaStreamTrackSources.
* platform/mediastream/MediaStreamTrackSourcesRequestClient.h: Added.
* platform/mediastream/blackberry/MediaStreamCenterBlackBerry.cpp:
(WebCore::MediaStreamCenterMac::getMediaStreamTrackSources): Added.
* platform/mediastream/blackberry/MediaStreamCenterBlackBerry.h:
* platform/mediastream/gstreamer/MediaStreamCenterGStreamer.cpp:
(WebCore::MediaStreamCenterMac::getMediaStreamTrackSources): Added
* platform/mediastream/gstreamer/MediaStreamCenterGStreamer.h:
* platform/mediastream/mac/MediaStreamCenterMac.cpp:
(WebCore::MediaStreamCenterMac::getMediaStreamTrackSources): Added.
* platform/mediastream/mac/MediaStreamCenterMac.h:
2013-09-17 Commit Queue <commit-queue@webkit.org>
Unreviewed, rolling out r155976.
http://trac.webkit.org/changeset/155976
https://bugs.webkit.org/show_bug.cgi?id=121512
Broke a test, needs cleanup (Requested by ap_ on #webkit).
* accessibility/AXObjectCache.cpp:
(WebCore::AXObjectCache::handleAttributeChanged):
* accessibility/AXObjectCache.h:
* accessibility/mac/AXObjectCacheMac.mm:
(WebCore::AXObjectCache::postPlatformNotification):
2013-09-17 Romain Perier <romain.perier@gmail.com>
Improve srcset parser
https://bugs.webkit.org/show_bug.cgi?id=119423
Reviewed by Benjamin Poulain.
Added new tests and covered by existing ones.
* html/parser/HTMLParserIdioms.cpp:
(WebCore::isHTMLSpaceOrComma): Add a new predicate function used by String::find()
to get the first space or comma character from the input string.
(WebCore::parseImagesWithScaleFromSrcSetAttribute): Add a new static function to parse
and extract images with scale from the srcset attribute. All valid candidates are
returned to the caller through a list. This parsing function also adds support
for data URI schemes as described by the specification.
(WebCore::bestFitSourceForImageAttributes): Remove intermediate arrays of string
when parsing. That is more efficient and avoids trashing the data cache
(varying between 20 and 65% faster depending of the amount of data)
The parser now walks along the attribute value and extracts the candidates directly.
2013-09-17 Gustavo Noronha Silva <gns@gnome.org>
Unreviewed build fix after 155963.
* platform/gtk/RenderThemeGtk3.cpp:
(WebCore::getStyleContext): use nullptr instead of 0.
2013-09-17 Alexey Proskuryakov <ap@apple.com>
Make SVGTransform::valueAsString use StringBuilder
https://bugs.webkit.org/show_bug.cgi?id=121498
Unreviewed typo fix, should address a regression on svg/dom/SVGViewSpec.html.
* svg/SVGTransform.cpp: (WebCore::SVGTransform::valueAsString): "e" is totally
not the same as "f".
2013-09-16 Simon Fraser <simon.fraser@apple.com>
Hardware accelerated CSS transitions appear pixelated when scaled up using transform
https://bugs.webkit.org/show_bug.cgi?id=27684
<rdar://problem/6134606>
Reviewed by Dean Jackson.
Take transforms and animations into account when computing the contentsScale
for a layer, so that scaled-up layers remain sharp most of the time.
In its recursiveCommitChanges() tree walk, GraphicsLayerCA now tracks
a root-relative transform, and extracts from that transform the X and Y
scales which it uses to scale the backing store.
If the layer has transform animations on it, we keep around
a transformation matrix for the animation endpoints (or keyframes),
pick up the state that has the larger impact on the root-relative scale,
and use that as the layer's transform, and the transform when recursing
over descendants.
Tests: compositing/contents-scale/animating.html
compositing/contents-scale/scaled-ancestor.html
compositing/contents-scale/simple-scale.html
compositing/contents-scale/z-translate.html
* platform/graphics/ca/GraphicsLayerCA.cpp:
(WebCore::maxScaleFromTransform): Decompose the transform if necesssary
to extract the X and Y scale components.
(WebCore::GraphicsLayerCA::GraphicsLayerCA): Initialize m_rootRelativeScaleFactor.
(WebCore::GraphicsLayerCA::flushCompositingState): Supply a TransformationMatrix
for the root of the recursion.
(WebCore::GraphicsLayerCA::layerTransform): This code was factored out of
computeVisibleRect(), and optionally takes a custom transform.
(WebCore::GraphicsLayerCA::computeVisibleRect): Use the layerTransform() function.
(WebCore::GraphicsLayerCA::updateRootRelativeScale): Given a transform from the root,
find the max scale factor by multiplying the various animation endpoint matrices and picking
the one with the biggest impact on scale. Use this to set m_rootRelativeScaleFactor, and
set the flag to say that we need to update contentsScale.
(WebCore::GraphicsLayerCA::recursiveCommitChanges):
(WebCore::GraphicsLayerCA::commitLayerChangesBeforeSublayers): After updating
animations, call updateRootRelativeScale() to update m_rootRelativeScaleFactor.
(WebCore::GraphicsLayerCA::updateAnimations): We have a side table of animation name to
TransformationMatrix, so figure out which entries can be removed from that side table,
and remove them.
(WebCore::GraphicsLayerCA::setAnimationOnLayer):
(WebCore::GraphicsLayerCA::appendToUncommittedAnimations): Store the matrices for
animation endpoints/keyframes in the m_animationTransforms side table. We don't store
them directly in LayerPropertyAnimation because we just want the final matrix for
a transform list, and using a side table makes ownership easier to manage.
(WebCore::GraphicsLayerCA::getTransformFromAnimationsWithMaxScaleImpact):
goes through the matrices for the running animation endpoints/keyframes, and
multiplies each with the transform up to this layer to find the matrix with the
larger impact on scale.
(WebCore::GraphicsLayerCA::setTransformAnimationEndpoints): Returns a vector
of TransformationMatrix for the from and to states.
(WebCore::GraphicsLayerCA::setTransformAnimationKeyframes): Returns a vector
of TransformationMatrix for the keyframes.
(WebCore::GraphicsLayerCA::updateContentsScale): Include m_rootRelativeScaleFactor in the
scale factor computation.
(WebCore::GraphicsLayerCA::dumpAdditionalProperties): If we're dumping visible rects,
also dump the contentsScale. Convenient at these are useful to look at together, and I didn't
want to pollute Internals with yet more flags.
* platform/graphics/ca/GraphicsLayerCA.h:
(WebCore::GraphicsLayerCA::LayerPropertyAnimation::LayerPropertyAnimation): Formatting.
2013-09-17 Samuel White <samuel_white@apple.com>
AX: Expose ARIA Busy Notifications
https://bugs.webkit.org/show_bug.cgi?id=121451
Reviewed by Darin Adler.
Added AXElementBusyChanged notification that posts when aria-busy is toggled. This
enables screen readers to detect busy states without polling the focused element.
Test: platform/mac/accessibility/element-busy-changed.html
* accessibility/AXObjectCache.cpp:
(WebCore::AXObjectCache::handleAttributeChanged):
* accessibility/AXObjectCache.h:
* accessibility/mac/AXObjectCacheMac.mm:
(WebCore::AXObjectCache::postPlatformNotification):
2013-09-17 Antti Koivisto <antti@apple.com>
Add isTextOrBR() and use it
https://bugs.webkit.org/show_bug.cgi?id=121506
Reviewed by Darin Adler.
It is a popular test.
* dom/Document.cpp:
(WebCore::Document::updateHoverActiveState):
* editing/Editor.cpp:
(WebCore::findFirstMarkable):
* editing/TextIterator.cpp:
(WebCore::ignoresContainerClip):
* rendering/InlineBox.cpp:
(WebCore::InlineBox::logicalHeight):
* rendering/InlineIterator.h:
(WebCore::isIteratorTarget):
* rendering/RenderBlock.cpp:
(WebCore::InlineMinMaxIterator::next):
* rendering/RenderBlockLineLayout.cpp:
(WebCore::RenderBlockFlow::layoutInlineChildren):
* rendering/RenderCounter.cpp:
(WebCore::planCounter):
* rendering/RenderObject.h:
(WebCore::RenderObject::isTextOrBR):
* rendering/RenderTreeAsText.cpp:
(WebCore::write):
* rendering/RootInlineBox.cpp:
(WebCore::RootInlineBox::ascentAndDescentForBox):
(WebCore::RootInlineBox::verticalPositionForBox):
2013-09-17 Antti Koivisto <antti@apple.com>
RenderBR should not be RenderText
https://bugs.webkit.org/show_bug.cgi?id=121221
Rubber-stamped by Andreas Kling.
Fix assertion in these tests:
fast/repaint/selection-rl.html
fast/writing-mode/horizontal-bt-replaced-selection.html
fast/writing-mode/vertical-rl-replaced-selection.html
* rendering/InlineBox.cpp:
(WebCore::InlineBox::nodeAtPoint):
2013-09-16 Enrica Casucci <enrica@apple.com>
Remove unused function didSetSelectionTypesForPasteboard from EditorClient.
https://bugs.webkit.org/show_bug.cgi?id=121464
Reviewed by Darin Adler.
This method was only implemented in WebEditorClient.mm for Mac where it was
calling a private delegate that is no longer in use.
This patch removes it for all the platforms.
I've also removed setTypes and writeAfterSettingTypes from the implementation
of the Pasteboard class for Mac.
* editing/mac/EditorMac.mm:
(WebCore::Editor::writeSelectionToPasteboard): Now calls write instead of
setTypes and writeAfterSettingTypes.
* loader/EmptyClients.h: Removed didSetSelectionTypesForPasteboard.
* page/EditorClient.h: Ditto.
* platform/Pasteboard.h: Removed setTypes and writeAfterSettingTypes.
* platform/ios/PasteboardIOS.mm:
(WebCore::Pasteboard::writeSelection): Removed call to didSetSelectionTypesForPasteboard.
* platform/mac/PasteboardMac.mm:
(WebCore::Pasteboard::write): Added to replace setTypes and writeAfterSettingTypes.
2013-09-17 Darin Adler <darin@apple.com>
Further shrink table-populating code by making the tables read-only data and preventing inlining
https://bugs.webkit.org/show_bug.cgi?id=121468
Reviewed by Sam Weinig.
* bindings/scripts/StaticString.pm:
(GenerateStrings): Eliminated the xxxImpl globals. We definitely did not need
globals for these, much less read-write data. Instead, write the expression at
each site where we need them.
(GenerateStringAsserts): This is one such site (see above).
* css/CSSSelector.cpp:
(WebCore::populatePseudoTypeByNameMap): Mark this function NEVER_INLINE and
add static to make sure the table ends up in read-only data.
* dom/make_names.pl:
(printDefinitions): Write the xxxImpl expression (see above).
(printFactoryCppFile): Ditto. Also mark the populate function NEVER_INLINE and
add static to make sure the table ends up in read-only data.
(printWrapperFactoryCppFile): Ditto.
* html/HTMLElement.cpp:
(WebCore::populateEventNameForAttributeLocalNameMap): Mark this function
NEVER_INLINE and add static to makes sure the table ends up in read-only data.
* platform/text/UnicodeRange.cpp: Added a const to make this read-only data.
2013-09-17 Darin Adler <darin@apple.com>
Shrink SVGElement::cssPropertyIdForSVGAttributeName and cssPropertyToTypeMap
https://bugs.webkit.org/show_bug.cgi?id=121499
Reviewed by Andreas Kling.
* svg/SVGElement.cpp:
(WebCore::populateAttributeNameToCSSPropertyIDMap): Added. Code that used to
be in SVGElement::cssPropertyIdForSVGAttributeName to build a map that maps
attribute names to CSS property IDs, but without the multiple unrolled calls
to HashMap functions.
(WebCore::populateAttributeNameToAnimatedPropertyTypeMap): Added. Code that
used to be in cssPropertyToTypeMap, but without the multiple unrolled calls
to HashMap functions.
(WebCore::attributeNameToAnimatedPropertyTypeMap): Renamed from
cssPropertyToTypeMap, a confusingly inaccurate and imprecise name, and
reimplemented using the populate function.
(WebCore::SVGElement::animatedPropertyTypeForAttribute): Updated to call
attributeNameToAnimatedPropertyTypeMap, and also removed the double hashing
that was done by calling contains followed by get.
(WebCore::SVGElement::cssPropertyIdForSVGAttributeName): Rewrote to use
populateAttributeNameToCSSPropertyIDMap.
(WebCore::SVGElement::isAnimatableCSSProperty): Updated to call the new
attributeNameToAnimatedPropertyTypeMap.
2013-09-17 Darin Adler <darin@apple.com>
Make SVGTransform::valueAsString use StringBuilder
https://bugs.webkit.org/show_bug.cgi?id=121498
Reviewed by Andreas Kling.
* svg/SVGTransform.cpp:
(WebCore::SVGTransform::valueAsString): Use StringBuilder constently to
avoid creating temporary String objects that cause additional, slow
memory allocation.
2013-09-17 Darin Adler <darin@apple.com>
Get rid of a couple unneeded NeverDestroyed::get() calls
https://bugs.webkit.org/show_bug.cgi?id=121500
Reviewed by Andreas Kling.
* css/CSSSelector.cpp:
(WebCore::CSSSelector::parsePseudoType): No need to call get() here.
* dom/make_names.pl:
(printFactoryCppFile): Ditto.
(printWrapperFactoryCppFile): Ditto.
2013-09-17 Hans Muller <hmuller@adobe.com>
Bad ASSERT() in RasterShapeIntervals::firstIncludedIntervalY()
https://bugs.webkit.org/show_bug.cgi?id=121455
Reviewed by Darin Adler.
Corrected a bad ASSERT() introduced in https://bugs.webkit.org/show_bug.cgi?id=120211.
Test: fast/shapes/shape-inside/shape-inside-first-fit-crash.html
* rendering/shapes/RasterShape.cpp:
(WebCore::RasterShapeIntervals::firstIncludedIntervalY):
2013-09-16 David Hyatt <hyatt@apple.com>
Move the line widow functions out of RenderBlock and into RenderBlockFlow.
https://bugs.webkit.org/show_bug.cgi?id=121456
Reviewed by Dean Jackson.
* rendering/RenderBlock.cpp:
* rendering/RenderBlock.h:
(WebCore::RenderBlock::RenderBlockRareData::RenderBlockRareData):
* rendering/RenderBlockFlow.cpp:
(WebCore::RenderBlockFlow::layoutBlockChild):
(WebCore::calculateMinimumPageHeight):
(WebCore::RenderBlockFlow::adjustLinePositionForPagination):
(WebCore::RenderBlockFlow::setBreakAtLineToAvoidWidow):
(WebCore::RenderBlockFlow::clearShouldBreakAtLineToAvoidWidow):
(WebCore::RenderBlockFlow::relayoutToAvoidWidows):
* rendering/RenderBlockFlow.h:
(WebCore::RenderBlockFlow::RenderBlockFlowRareData::RenderBlockFlowRareData):
(WebCore::RenderBlockFlow::shouldBreakAtLineToAvoidWidow):
(WebCore::RenderBlockFlow::lineBreakToAvoidWidow):
* rendering/RenderBlockLineLayout.cpp:
(WebCore::RenderBlock::layoutRunsAndFloatsInRange):
(WebCore::RenderBlock::linkToEndLineIfNeeded):
(WebCore::RenderBlock::determineStartPosition):
(WebCore::RenderBlock::checkPaginationAndFloatsAtEndLine):
* rendering/RenderObject.h:
2013-09-16 Anders Carlsson <andersca@apple.com>
HashMap should work with move-only keys
https://bugs.webkit.org/show_bug.cgi?id=121310
Reviewed by Darin Adler.
Update the call sites now that HashMap::take doesn't return a PassOwnPtr.
* rendering/RenderRegion.cpp:
(WebCore::RenderRegion::takeRenderBoxRegionInfo):
* rendering/RenderRegion.h:
* rendering/svg/RenderSVGResourceContainer.cpp:
(WebCore::RenderSVGResourceContainer::registerResource):
* svg/SVGDocumentExtensions.cpp:
(WebCore::SVGDocumentExtensions::removePendingResource):
(WebCore::SVGDocumentExtensions::removePendingResourceForRemoval):
* svg/SVGDocumentExtensions.h:
2013-09-17 Antti Koivisto <antti@apple.com>
Add RenderObject bit for isBR().
https://bugs.webkit.org/show_bug.cgi?id=121494
Reviewed by Andreas Kling.
It is no longer piggybacking on isText() flag and is now hot in inline layout.
* rendering/RenderBR.cpp:
(WebCore::RenderBR::RenderBR):
* rendering/RenderBR.h:
* rendering/RenderObject.h:
(WebCore::RenderObject::isBR):
(WebCore::RenderObject::setIsBR):
(WebCore::RenderObject::RenderObjectBitfields::RenderObjectBitfields):
2013-09-17 Andreas Kling <akling@apple.com>
Export some missing symbols for Internals after RenderArena& change.
* WebCore.exp.in:
2013-09-17 Christophe Dumez <ch.dumez@sisa.samsung.com>
Set MessageEvent.source to the newly created port for shared workers' connect events
https://bugs.webkit.org/show_bug.cgi?id=121390
Reviewed by Darin Adler.
Set MessageEvent.source to the newly created port for shared workers' connect events
instead of previously null, as per the latest specification:
http://www.whatwg.org/specs/web-apps/current-work/multipage/comms.html#dom-messageevent-source
http://www.whatwg.org/specs/web-apps/current-work/multipage/workers.html#dom-sharedworker
This behavior is consisent with Blink.
Test: fast/workers/shared-worker-messageevent-source.html
* dom/EventTarget.cpp:
(WebCore::EventTarget::isMessagePort):
* dom/EventTarget.h:
* dom/MessageEvent.cpp:
(WebCore::isValidSource):
(WebCore::MessageEvent::MessageEvent):
* dom/MessageEvent.h:
Use null String instead of an empty String as default value for origin and lastEventId.
This is more efficient and has no impact on the behavior on the JavaScript since a
null String is exposed as an empty one on JS side.
This change is covered by fast/events/constructors/message-event-constructor.html
* dom/MessageEvent.idl:
* dom/MessagePort.h:
* page/DOMWindow.cpp:
(WebCore::PostMessageTimer::event):
* workers/SharedWorkerGlobalScope.cpp:
(WebCore::createConnectEvent):
2013-09-17 Antti Koivisto <antti@apple.com>
RenderBR should not be RenderText
https://bugs.webkit.org/show_bug.cgi?id=121221
Reviewed by Darin Adler.
Stop inheriting RenderBR from RenderText and make it be a RenderBoxModelObject instead. RenderBR was one
of the few cases where Element renderer was a RenderText. This will enable future cleanups.
RenderBR used little of RenderText mechanisms and was already heavily specialized everywhere. Layout code
didn't care about its text content at all. The new RenderText is also significatly more lightweight
than the old. As a line box it uses plain InlineBox instead of InlineTextBox.
The patch tries to avoid changing test results though there are a few changed render tree dumps without
visual effect. There are also two rendering progressions.
* accessibility/AccessibilityRenderObject.cpp:
(WebCore::AccessibilityRenderObject::textUnderElement):
(WebCore::AccessibilityRenderObject::computeAccessibilityIsIgnored):
* dom/ContainerNode.cpp:
(WebCore::ContainerNode::getUpperLeftCorner):
* dom/Document.cpp:
(WebCore::Document::updateHoverActiveState):
* dom/Position.cpp:
(WebCore::hasInlineBoxWrapper):
(WebCore::nextRenderedEditable):
(WebCore::previousRenderedEditable):
(WebCore::Position::hasRenderedNonAnonymousDescendantsWithHeight):
(WebCore::Position::getInlineBoxAndOffset):
* dom/Range.cpp:
(WebCore::Range::textRects):
(WebCore::Range::textQuads):
* editing/ApplyStyleCommand.cpp:
(WebCore::ApplyStyleCommand::applyInlineStyleToPushDown):
* editing/Editor.cpp:
(WebCore::findFirstMarkable):
* editing/TextIterator.cpp:
(WebCore::ignoresContainerClip):
* editing/VisibleUnits.cpp:
(WebCore::CachedLogicallyOrderedLeafBoxes::previousTextOrLineBreakBox):
(WebCore::CachedLogicallyOrderedLeafBoxes::nextTextOrLineBreakBox):
(WebCore::logicallyPreviousBox):
(WebCore::logicallyNextBox):
(WebCore::wordBreakIteratorForMinOffsetBoundary):
(WebCore::wordBreakIteratorForMaxOffsetBoundary):
* rendering/InlineBox.cpp:
(WebCore::InlineBox::logicalHeight):
(WebCore::InlineBox::baselinePosition):
(WebCore::InlineBox::lineHeight):
(WebCore::InlineBox::deleteLine):
(WebCore::InlineBox::extractLine):
(WebCore::InlineBox::attachLine):
(WebCore::InlineBox::paint):
* rendering/InlineBox.h:
(WebCore::InlineBox::isLineBreak):
* rendering/InlineFlowBox.cpp:
(WebCore::InlineFlowBox::computeOverflow):
* rendering/InlineIterator.h:
(WebCore::isIteratorTarget):
* rendering/InlineTextBox.cpp:
(WebCore::InlineTextBox::lineHeight):
(WebCore::InlineTextBox::isLineBreak):
* rendering/RenderBR.cpp:
(WebCore::RenderBR::RenderBR):
(WebCore::RenderBR::~RenderBR):
(WebCore::RenderBR::createAnonymous):
(WebCore::RenderBR::lineHeight):
(WebCore::RenderBR::baselinePosition):
(WebCore::RenderBR::createInlineBox):
(WebCore::RenderBR::setInlineBoxWrapper):
(WebCore::RenderBR::replaceInlineBoxWrapper):
(WebCore::RenderBR::deleteInlineBoxWrapper):
(WebCore::RenderBR::dirtyLineBoxes):
(WebCore::RenderBR::caretMinOffset):
(WebCore::RenderBR::caretMaxOffset):
(WebCore::RenderBR::canBeSelectionLeaf):
(WebCore::RenderBR::setSelectionState):
(WebCore::RenderBR::localCaretRect):
(WebCore::RenderBR::linesBoundingBox):
(WebCore::RenderBR::absoluteRects):
(WebCore::RenderBR::absoluteQuads):
(WebCore::RenderBR::updateFromStyle):
(WebCore::RenderBR::borderBoundingBox):
* rendering/RenderBR.h:
(WebCore::toRenderBR):
* rendering/RenderBlock.cpp:
(WebCore::InlineMinMaxIterator::next):
(WebCore::RenderBlock::updateFirstLetter):
* rendering/RenderBlockLineLayout.cpp:
(WebCore::createInlineBoxForRenderer):
(WebCore::dirtyLineBoxesForRenderer):
(WebCore::reachedEndOfTextRenderer):
(WebCore::RenderBlock::computeBlockDirectionPositionsForLine):
(WebCore::RenderBlockFlow::layoutInlineChildren):
(WebCore::requiresLineBox):
(WebCore::shouldSkipWhitespaceAfterStartObject):
(WebCore::canBreakAtThisPosition):
* rendering/RenderInline.cpp:
(WebCore::RenderInline::generateCulledLineBoxRects):
(WebCore::RenderInline::culledInlineFirstLineBox):
(WebCore::RenderInline::culledInlineLastLineBox):
(WebCore::RenderInline::dirtyLineBoxes):
* rendering/RenderLineBoxList.cpp:
(WebCore::RenderLineBoxList::dirtyLinesFromChangedChild):
* rendering/RenderMenuList.cpp:
(WebCore::RenderMenuList::RenderMenuList):
(WebCore::RenderMenuList::styleDidChange):
(WebCore::RenderMenuList::setText):
(WebCore::RenderMenuList::text):
* rendering/RenderMenuList.h:
* rendering/RenderObject.h:
(WebCore::RenderObject::isBeforeContent):
(WebCore::RenderObject::isAfterContent):
* rendering/RenderObjectChildList.cpp:
(WebCore::RenderObjectChildList::removeChildNode):
* rendering/RenderText.cpp:
(WebCore::RenderText::removeAndDestroyTextBoxes):
(WebCore::RenderText::computePreferredLogicalWidths):
(WebCore::RenderText::setTextInternal):
* rendering/RenderTreeAsText.cpp:
(WebCore::RenderTreeAsText::writeRenderObject):
* rendering/RootInlineBox.cpp:
(WebCore::RootInlineBox::ascentAndDescentForBox):
(WebCore::RootInlineBox::verticalPositionForBox):
2013-09-17 Andreas Kling <akling@apple.com>
Dodge more work during render tree teardown.
<https://webkit.org/b/121487>
Reviewed by Antti Koivisto.
Add a Document::hasLivingRenderTree() method that returns true if
there's a render tree attached to the document and it's not in the
process of being torn down.
Deploy this check in a number of places that were only checking
for the presence of a RenderView.
2013-09-17 Eric Carlson <eric.carlson@apple.com>
MediaStream API: Adding an async RTCPeerConnection::addIceCandidate
https://bugs.webkit.org/show_bug.cgi?id=121403
Merged from https://chromium.googlesource.com/chromium/blink/+/5bd81fda88d48dd2780832246e7d1ab973ee7a1d
Reviewed by Darin Adler.
No new tests, updated RTCPeerConnection-ice.html.
* Modules/mediastream/RTCPeerConnection.cpp:
(WebCore::RTCPeerConnection::addIceCandidate): Add success and error callbacks.
* Modules/mediastream/RTCPeerConnection.h:
* Modules/mediastream/RTCPeerConnection.idl:
* platform/mediastream/RTCPeerConnectionHandler.h: Changed addIceCandidate signature.
* platform/mediastream/RTCVoidRequest.h: Removed ExtraData, it is unnecessary.
2013-09-17 Carlos Garcia Campos <cgarcia@igalia.com>
[GTK] Do not include Returns tag in api doc for methods returning void
https://bugs.webkit.org/show_bug.cgi?id=121488
Reviewed by Philippe Normand.
* bindings/gobject/WebKitDOMCustom.h:
* bindings/scripts/CodeGeneratorGObject.pm:
(GenerateFunction): Only add Returns tag for methods not returning
void.
* bindings/scripts/test/GObject/WebKitDOMTestActiveDOMObject.h:
* bindings/scripts/test/GObject/WebKitDOMTestCustomNamedGetter.h:
* bindings/scripts/test/GObject/WebKitDOMTestInterface.h:
* bindings/scripts/test/GObject/WebKitDOMTestObj.h:
* bindings/scripts/test/GObject/WebKitDOMTestTypedefs.h:
2013-09-17 Michael Brüning <michael.bruning@digia.com>
Correct range used for Emoji checks.
https://bugs.webkit.org/show_bug.cgi?id=121486
Reviewed by Allan Sandfeld Jensen.
Found and reported by David Binderman via Qt bug tracker.
The check if a character was in the Emoji range always evaluated to
false due to the upper range limit being lower than the lower limit.
Changed the upper limit to the highest assigned character from the
"Transport and Map Symbols" (0x1F6C5) as that seems to have been the
intended upper range limit of this check.
* platform/graphics/Font.cpp:
(WebCore::Font::isCJKIdeographOrSymbol):
2013-09-17 Antti Koivisto <antti@apple.com>
Move text caret rect computation to root inline box
https://bugs.webkit.org/show_bug.cgi?id=121479
Reviewed by Andreas Kling.
For future code sharing.
* rendering/RenderText.cpp:
(WebCore::RenderText::localCaretRect):
* rendering/RootInlineBox.cpp:
(WebCore::RootInlineBox::computeCaretRect):
* rendering/RootInlineBox.h:
2013-09-17 Alberto Garcia <berto@igalia.com>
[GTK] Don't make the GObject DOM bindings API break test fatal
https://bugs.webkit.org/show_bug.cgi?id=121484
Reviewed by Carlos Garcia Campos.
The API varies depending on the compilation options, so this can
easily produce false positives.
Until we figure out a way to handle this situation we shouldn't
make this test fatal.
* bindings/scripts/gobject-run-api-break-test:
(check_api):
2013-09-17 Mihnea Ovidenie <mihnea@adobe.com>
[CSSRegions] Replace generatingNode() with generatingElement() for RenderRegion
https://bugs.webkit.org/show_bug.cgi?id=121469
Reviewed by Antti Koivisto.
The fix for https://bugs.webkit.org/show_bug.cgi?id=120397 replaced node() with generatingElement() for regions, but i forgot about replacing generatingNode() with generatingElement() in RenderNamedFlowThread::compareRenderRegions. This is needed in preparation for regions as anonymous blocks refactoring in https://bugs.webkit.org/show_bug.cgi?id=119135.
No new functionality introduced, therefore no new tests.
* rendering/RenderNamedFlowThread.cpp:
(WebCore::compareRenderRegions):
2013-09-17 Andreas Kling <akling@apple.com>
CTTE: Pass RenderArena around by reference.
<https://webkit.org/b/121470>
Reviewed by Antti Koivisto.
Pass the RenderArena around by reference in all render tree code.
This code will never be running without an arena.
2013-09-17 Carlos Garcia Campos <cgarcia@igalia.com>
[GTK] GObject DOM symbols file is not generated for video related classes
https://bugs.webkit.org/show_bug.cgi?id=121476
Reviewed by Philippe Normand.
The problem is that we are using a different path for video
related header files in the Makefile, it's the same path in
practice, because we are just prepending ./ to the path, but the
rules that parse those paths don't expect the ./ at the beginning.
* bindings/gobject/GNUmakefile.am: Use the same path for video
related header files as the other paths in
webkitgtk_gdom_built_h_api.
* bindings/gobject/webkitdom.symbols: Updated to include the
symbols of the video related clases.
2013-09-17 Andreas Kling <akling@apple.com>
Remove ContextFeatures.
<https://webkit.org/b/121473>
Reviewed by Antti Koivisto.
This was only used by the chromium port, nobody implements ContextFeaturesClient.
2013-09-17 Andreas Kling <akling@apple.com>
Un-dork the build. :|
2013-09-17 Andreas Kling <akling@apple.com>
Unreviewed, fix clang warning when building without ENABLE(STYLE_SCOPED).
2013-09-08 Andreas Kling <akling@apple.com>
Move <style scoped> code behind ENABLE(STYLE_SCOPED)
<https://webkit.org/b/121018>
Reviewed by Darin Adler.
Move all the code for <style scoped> behind ENABLE(STYLE_SCOPED) guards.
It's not nice to clutter common codepaths with code that always executes
even though the feature is disabled at compile-time.
2013-09-16 Sam Weinig <sam@webkit.org>
CTTE: InputType should store its HTMLInputElement back pointer as a reference
https://bugs.webkit.org/show_bug.cgi?id=121466
Reviewed by Anders Carlsson.
- Converts InputType::create() and InputType::createText() to take a HTMLInputElement&
(as well as all the subclasses).
- Change InputType::element() to return an HTMLInputElement& and update all the callers.
2013-09-16 Timothy Hatcher <timothy@apple.com>
Make InspectorTimelineAgent use an enum for the record type instead of a string.
https://bugs.webkit.org/show_bug.cgi?id=121461
Reviewed by Joseph Pecoraro.
* inspector/Inspector.json:
* inspector/InspectorTimelineAgent.cpp:
(WebCore::InspectorTimelineAgent::addRecordToTimeline):
(WebCore::toProtocol):
(WebCore::InspectorTimelineAgent::innerAddRecordToTimeline):
(WebCore::InspectorTimelineAgent::didCompleteCurrentRecord):
(WebCore::InspectorTimelineAgent::appendRecord):
(WebCore::InspectorTimelineAgent::pushCurrentRecord):
* inspector/InspectorTimelineAgent.h:
(WebCore::InspectorTimelineAgent::TimelineRecordEntry::TimelineRecordEntry):
2013-09-16 Joseph Pecoraro <pecoraro@apple.com>
Add RunLoop::isMain and use it in WebKit2
https://bugs.webkit.org/show_bug.cgi?id=121459
Reviewed by Anders Carlsson.
* WebCore.exp.in:
* platform/RunLoop.cpp:
(WebCore::RunLoop::isMain):
* platform/RunLoop.h:
2013-09-16 Chris Fleizach <cfleizach@apple.com>
AX: ARIA tablist is disabled, but VoiceOver does not speak the tabs as dimmed
https://bugs.webkit.org/show_bug.cgi?id=121408
Reviewed by Darin Adler.
ARIA says that aria-disabled should propagate to children nodes.
Test: accessibility/aria-disabled-propagated-to-children.html
* accessibility/AccessibilityNodeObject.cpp:
(WebCore::AccessibilityNodeObject::isEnabled):
2013-09-16 Sam Weinig <sam@webkit.org>
CTTE: Element::createRenderer() should take references
https://bugs.webkit.org/show_bug.cgi?id=121449
Reviewed by Anders Carlsson.
*Many file elided*
2013-09-16 Enrica Casucci <enrica@apple.com>
iOS build fix after r155638.
Unreviewed.
* editing/Editor.cpp:
2013-09-16 Bem Jones-Bey <bjonesbe@adobe.com>
Make FloatingObjects own it's FloatingObject instances
https://bugs.webkit.org/show_bug.cgi?id=121323
Reviewed by Alexandru Chiculita.
As part of decoupling FloatingObjects from RenderBlock, change
FloatingObjects to properly manage the FloatingObject instances it
contains.
No new tests, no behavior change.
* rendering/FloatingObjects.cpp:
(WebCore::FloatingObject::FloatingObject): Make the constructors
private so that FloatingObjects can only be created with an OwnPtr.
Also make a RenderBox required to create a FloatingObject.
(WebCore::FloatingObject::create): Factory method to create a vanilla
FloatingObject.
(WebCore::FloatingObject::copyToNewContainer): Factory method to copy
an existing FloatingObject in the case it is overhanging or intruding
and needs to be copied to the block that it overhangs or intrudes
into.
(WebCore::FloatingObject::unsafeClone): Rename this method so it is
more obvious that it really shouldn't be used, and to make it more
obvious that one should use the copyToNewContainer method for all
normal FloatingObject copies.
(WebCore::FloatingObjects::clear): Delete all the FloatingObjects in
the set before clearing it.
(WebCore::FloatingObjects::moveAllToFloatInfoMap): Move all of the
FloatingObjects in the set to a RendererToFloatInfoMap. This is used
in RenderBlockFlow::clearFloats to when it is readding floats after
clearing the set.
(WebCore::FloatingObjects::add): Take an OwnPtr.
(WebCore::FloatingObjects::remove): Delete the removed FloatingObject.
* rendering/FloatingObjects.h: Remove FloatingObject::setRenderer(),
since the RenderBox must be set in the constructor.
* rendering/RenderBlock.cpp:
(WebCore::RenderBlock::moveAllChildrenIncludingFloatsTo): Rename clone
to unsafeClone.
(WebCore::RenderBlock::removeFloatingObjects): Don't delete anymore,
since clear does it.
(WebCore::RenderBlock::insertFloatingObject): Handle OwnPtr properly.
(WebCore::RenderBlock::removeFloatingObject): Don't delete anymore,
since remove does it.
(WebCore::RenderBlock::removeFloatingObjectsBelow): Ditto.
(WebCore::RenderBlock::addOverhangingFloats): Use copyToNewContainer
and OwnPtr.
(WebCore::RenderBlock::addIntrudingFloats): Ditto.
* rendering/RenderBlockFlow.cpp:
(WebCore::RenderBlockFlow::clearFloats): Use exportToFloatInfoMap.
2013-09-16 Hugo Parente Lima <hugo.lima@openbossa.org>
Fix creation of embedded JS and CSS files on cmake based ports.
https://bugs.webkit.org/show_bug.cgi?id=121448
Reviewed by Joseph Pecoraro.
Just a build fix, layout tests already test this issue.
* CMakeLists.txt:
2013-09-16 Anders Carlsson <andersca@apple.com>
MessageQueue should use a Deque of OwnPtrs
https://bugs.webkit.org/show_bug.cgi?id=121450
Reviewed by Andreas Kling.
* Modules/webdatabase/DatabaseThread.cpp:
(WebCore::SameDatabasePredicate::operator()):
* dom/default/PlatformMessagePortChannel.h:
(WebCore::PlatformMessagePortChannel::MessagePortQueue::tryGetMessage):
* fileapi/FileThread.cpp:
(WebCore::SameInstancePredicate::operator()):
* workers/WorkerRunLoop.cpp:
(WebCore::ModePredicate::operator()):
2013-09-16 Andreas Kling <akling@apple.com>
CTTE: FrameTree::top() should return a reference.
<https://webkit.org/b/121445>
Reviewed by Anders Carlsson.
There's always a top frame in the tree.
2013-09-16 Zan Dobersek <zdobersek@igalia.com>
Unreviewed, fixing GObject bindings tests after r155850 by adding the *.symbols files that are now also generated.
* bindings/scripts/test/GObject/WebKitDOMTestActiveDOMObject.symbols: Added.
* bindings/scripts/test/GObject/WebKitDOMTestCallback.symbols: Added.
* bindings/scripts/test/GObject/WebKitDOMTestCustomNamedGetter.symbols: Added.
* bindings/scripts/test/GObject/WebKitDOMTestEventConstructor.symbols: Added.
* bindings/scripts/test/GObject/WebKitDOMTestEventTarget.symbols: Added.
* bindings/scripts/test/GObject/WebKitDOMTestException.symbols: Added.
* bindings/scripts/test/GObject/WebKitDOMTestInterface.symbols: Added.
* bindings/scripts/test/GObject/WebKitDOMTestMediaQueryListListener.symbols: Added.
* bindings/scripts/test/GObject/WebKitDOMTestNamedConstructor.symbols: Added.
* bindings/scripts/test/GObject/WebKitDOMTestNode.symbols: Added.
* bindings/scripts/test/GObject/WebKitDOMTestObj.symbols: Added.
* bindings/scripts/test/GObject/WebKitDOMTestOverloadedConstructors.symbols: Added.
* bindings/scripts/test/GObject/WebKitDOMTestSerializedScriptValueInterface.symbols: Added.
* bindings/scripts/test/GObject/WebKitDOMTestTypedefs.symbols: Added.
2013-09-16 Daniel Bates <dabates@apple.com>
Fix the build following <http://trac.webkit.org/changeset/155591>
(https://bugs.webkit.org/show_bug.cgi?id=121200)
Fix the build for ports that enable PLUGIN_PROXY_FOR_VIDEO, such as iOS WebKit.
* html/shadow/MediaControlElements.cpp:
(WebCore::MediaControlTextTrackContainerElement::updateSizes): Substitute isWidget() for isRenderWidget()
as the latter is undefined.
* rendering/RenderLayerCompositor.cpp:
(WebCore::RenderLayerCompositor::requiresCompositingForVideo): Ditto.
2013-09-16 Daniel Bates <dabates@apple.com>
Build fix following <https://trac.webkit.org/r154358>
(https://bugs.webkit.org/show_bug.cgi?id=120078)
Fix the build for ports that enable PLUGIN_PROXY_FOR_VIDEO, such as iOS WebKit.
* html/HTMLMediaElement.cpp:
(WebCore::HTMLMediaElement::rendererIsNeeded): Substitute "style" for "context".
2013-09-16 Timothy Hatcher <timothy@apple.com>
Make InspectorTypeBuilder generate better enums in C++.
https://bugs.webkit.org/show_bug.cgi?id=121440
Reviewed by Joseph Pecoraro.
* inspector/CodeGeneratorInspector.py:
(fix_camel_case): Add more abbrivations.
(TypeBindings.create_type_declaration_.EnumBinding.get_code_generator.CodeGenerator.generate_type_builder): Use fix_camel_case
* inspector/ConsoleMessage.cpp:
(WebCore::messageSourceValue):
(WebCore::messageTypeValue):
* inspector/InspectorCSSAgent.cpp:
(WebCore::InspectorCSSAgent::detectOrigin):
* inspector/InspectorRuntimeAgent.cpp:
(WebCore::InspectorRuntimeAgent::parse):
* inspector/InspectorStyleSheet.cpp:
(WebCore::InspectorStyleSheet::resourceStyleSheetText):
* inspector/InspectorStyleSheet.h:
(WebCore::InspectorStyleSheet::canBind):
2013-09-16 Thiago de Barros Lacerda <thiago.lacerda@openbossa.org>
MediaStream API: Storing the constraints in MediaStreamSource
https://bugs.webkit.org/show_bug.cgi?id=120882
based on: https://chromium.googlesource.com/chromium/blink/+/04ac7655b54ae98f55774afde3f8e92b6c6302e6
Reviewed by Eric Carlson.
No new tests needed.
* Modules/mediastream/UserMediaRequest.cpp:
(WebCore::UserMediaRequest::succeed):
* platform/mediastream/MediaStreamSource.h:
(WebCore::MediaStreamSource::setConstraints):
(WebCore::MediaStreamSource::constraints):
2013-09-16 Andreas Kling <akling@apple.com>
Rebaseline bindings tests after Sam's Document& changes.
2013-09-16 Andreas Kling <akling@apple.com>
Destroying a Document's render tree shouldn't make it impossible to recreate.
<https://webkit.org/b/121437>
Reviewed by Antti Koivisto.
Rename Document::detach() to destroyRenderTree() and stop automatically
disconnecting Document from its Frame after the deforestation.
Added Document::disconnectFromFrame() and do that after every call to
destroyRenderTree() that we currently have.
This change doesn't alter any behavior on its own, but is a step towards
being able to destroy and rebuild the render tree.
2013-09-16 Brent Fulgham <bfulgham@apple.com>
Unreviewed warning correction. Avoid uninitialized renderer.
* css/CSSComputedStyleDeclaration.cpp:
(WebCore::ComputedStyleExtractor::propertyValue): Renderer can be uninitialized.
2013-09-16 Brent Fulgham <bfulgham@apple.com>
Unreviewed warning correction.
* css/CSSParser.cpp:
(WebCore::CSSParser::parseFilter): Don't use 'value' as the input argument
to the method, and the internal loop variable for the parser.
2013-09-16 peavo@outlook.com <peavo@outlook.com>
[Win] Compile errors in WebCore derived sources.
https://bugs.webkit.org/show_bug.cgi?id=121420
Reviewed by Brent Fulgham.
* dom/make_names.pl:
(printNamesCppFile): Added const modifier.
(printDefinitions): Use C style cast.
2013-09-16 Hans Muller <hmuller@adobe.com>
[CSS Shapes] Winding rule polygon issues
https://bugs.webkit.org/show_bug.cgi?id=120236
Reviewed by Dirk Schulze.
This patch corrects some of the problems with shape-inside and
self-intersecting polygons and eliminates the layout flashing behavior
that prompted the original bug report. The FloatPolygon::contains()
method now respoects the polygon's fillRule and the PolygonShape code
used to find shape-inside intervals for the top and bottom of a line
now also handles fillRule correctly.
Tests: fast/shapes/shape-inside/shape-inside-complex-polygon-001.html
fast/shapes/shape-inside/shape-inside-complex-polygon-002.html
fast/shapes/shape-inside/shape-inside-complex-polygon-003.html
fast/shapes/shape-inside/shape-inside-complex-polygon-004.html
* platform/graphics/FloatPolygon.cpp:
(WebCore::FloatPolygon::containsEvenOdd):
(WebCore::FloatPolygon::containsNonZero):
(WebCore::FloatPolygon::contains):
* platform/graphics/FloatPolygon.h:
* rendering/shapes/PolygonShape.cpp:
(WebCore::computeXIntersections):
2013-09-16 Andreas Kling <akling@apple.com>
AXObjectCache::m_document should be a reference.
<https://webkit.org/b/121425>
Reviewed by Antti Koivisto.
AXObjectCache is always owned by a Document so remove the uncertainty
by turning its m_document into a Document&.
2013-09-16 Commit Queue <commit-queue@webkit.org>
Unreviewed, rolling out r155851.
http://trac.webkit.org/changeset/155851
https://bugs.webkit.org/show_bug.cgi?id=121429
checkbox states should be exposed through AtkState, not
AtkValue (Requested by msanchez on #webkit).
* accessibility/atk/WebKitAccessibleInterfaceValue.cpp:
(webkitAccessibleValueGetCurrentValue):
* accessibility/atk/WebKitAccessibleWrapperAtk.cpp:
(getInterfaceMaskFromObject):
2013-09-16 Krzysztof Czech <k.czech@samsung.com>
[ATK] Extends atk value interface to return proper checkbox states
https://bugs.webkit.org/show_bug.cgi?id=121413
Reviewed by Mario Sanchez Prada.
Tests: accessibility/mixed-checkbox.html
accessibility/native-vs-nonnative-checkboxes.html
* accessibility/atk/WebKitAccessibleInterfaceValue.cpp:
(webkitAccessibleValueValueForAccessibilityObject):
(webkitAccessibleValueGetCurrentValue):
* accessibility/atk/WebKitAccessibleWrapperAtk.cpp:
(getInterfaceMaskFromObject):
2013-09-16 Carlos Garcia Campos <cgarcia@igalia.com>
[GTK] Check DOM bindings API compatibility while building
https://bugs.webkit.org/show_bug.cgi?id=101224
Reviewed by Gustavo Noronha Silva.
A .symbols file is now generated for every DOM binding public API
object. It contains the signature of all public methods. We keep a
single file with the signature of all public methods in the source
tree. When DOM bindings are generated, a new symbols file is
created concatenating all .symbols files generated and it's
compared with the symbols file in the source tree using a script
that checks if the changes are API compatible or not. In case of
API break the build finishes showing the differences found in the
symbol files. If API compatible changes are found, the diff is
shown in stdout, suggesting to run the gobject-run-api-break-test
with the --reset-results option to update the symbols file, and
the build continues. If there aren't API changes the build
continues silently.
* GNUmakefile.am:
* bindings/gobject/GNUmakefile.am:
* bindings/gobject/WebKitDOMCustom.symbols: Added.
* bindings/gobject/WebKitDOMEventTarget.symbols: Added.
* bindings/gobject/WebKitDOMObject.symbols: Added.
* bindings/gobject/webkitdom.symbols: Added.
* bindings/scripts/CodeGeneratorGObject.pm:
(GenerateFunction):
(WriteData):
* bindings/scripts/gobject-run-api-break-test: Added.
(check_api):
2013-09-16 Andreas Kling <akling@apple.com>
Devirtualize Document::detach().
<https://webkit.org/b/121418>
Reviewed by Antti Koivisto.
The only override was in PluginDocument which needs to decouple itself
from the plugin element at the start of detach.
Added PluginDocument::detachFromPluginElement() and call it from detach().
2013-09-15 Andreas Kling <akling@apple.com>
CTTE: RenderCombineText always has a Text node.
<https://webkit.org/b/121411>
Reviewed by Antti Koivisto.
This renderer is never anonymous and always has a corresponding Text node.
Replaced node() with a textNode() reference getter.
2013-09-15 Andreas Kling <akling@apple.com>
CTTE: RenderSVGInlineText always has a Text node.
<https://webkit.org/b/121409>
Reviewed by Antti Koivisto.
This renderer is never anonymous and always has a corresponding Text node.
Replaced node() with a textNode() reference getter.
Only one null check was harmed in the making of this patch.
2013-09-15 Darin Adler <darin@apple.com>
Try to fix the Windows build.
* dom/make_names.pl: The static_cast here was running into const-correctness
issues, so for now change it back to a C-style cast.
2013-09-15 Santosh Mahto <santosh.ma@samsung.com>
Adding "explicit" keyword in rendering related constructors
https://bugs.webkit.org/show_bug.cgi?id=121398
Reviewed by Andreas Kling.
Adding explicit in below constructor.
All files belong to Source/WebCore/rendering/ path.
* rendering/AutoTableLayout.h:
* rendering/ClipPathOperation.h:
(WebCore::ClipPathOperation::ClipPathOperation):
(WebCore::ShapeClipPathOperation::ShapeClipPathOperation):
* rendering/FixedTableLayout.h:
* rendering/FloatingObjects.h:
(WebCore::FloatingObject::FloatingObject):
* rendering/FlowThreadController.h:
* rendering/HitTestResult.h:
* rendering/ImageQualityController.h:
* rendering/InlineBox.h:
(WebCore::InlineBox::InlineBox):
(WebCore::InlineBox::InlineBoxBitfields::InlineBoxBitfields):
* rendering/InlineFlowBox.h:
(WebCore::InlineFlowBox::InlineFlowBox):
* rendering/InlineTextBox.h:
(WebCore::InlineTextBox::InlineTextBox):
* rendering/LayoutState.h:
* rendering/LogicalSelectionOffsetCaches.h:
(WebCore::LogicalSelectionOffsetCaches::LogicalSelectionOffsetCaches):
* rendering/RenderBoxModelObject.h:
* rendering/RenderFlexibleBox.h:
* rendering/RenderFrameSet.h:
(WebCore::FrameEdgeInfo::FrameEdgeInfo):
* rendering/RenderGeometryMap.h:
* rendering/RenderImage.h:
* rendering/RenderImageResourceStyleImage.h:
* rendering/RenderLayerFilterInfo.h:
* rendering/RenderMultiColumnSet.h:
* rendering/RenderNamedFlowThread.h:
* rendering/RenderReplaced.h:
* rendering/RenderSearchField.h:
* rendering/RenderSelectionInfo.h:
(WebCore::RenderSelectionInfoBase::RenderSelectionInfoBase):
(WebCore::RenderBlockSelectionInfo::RenderBlockSelectionInfo):
* rendering/RenderTableSection.h:
* rendering/RenderTextControl.h:
* rendering/RenderTextControlSingleLine.h:
* rendering/TrailingFloatsRootInlineBox.h:
2013-09-15 Gustavo Noronha Silva <gns@gnome.org>
Unreviewed make distcheck fix.
* GNUmakefile.am:
* GNUmakefile.list.am:
2013-09-15 Patrick Gansterer <paroga@webkit.org>
[WIN] Fix build without precompiled header after r154146.
* platform/win/WebCoreBundleWin.h:
2013-09-15 Andreas Kling <akling@apple.com>
CTTE: EllipsisBox owner renderer is always a RenderBlock.
<https://webkit.org/b/121402>
Reviewed by Antti Koivisto.
Let the constructor reflect this. Also out-of-line it because reasons.
2013-09-15 Sam Weinig <sam@webkit.org>
CTTE: RenderObject's createAnonymous() and setDocumentForAnonymous() should take Document references
https://bugs.webkit.org/show_bug.cgi?id=121400
Reviewed by Andreas Kling.
The Document used for anonymous renderers is never null.
* dom/Document.cpp:
* page/FrameView.cpp:
* rendering/FlowThreadController.cpp:
* rendering/RenderBlock.cpp:
* rendering/RenderBlock.h:
* rendering/RenderFlexibleBox.cpp:
* rendering/RenderFlexibleBox.h:
* rendering/RenderFullScreen.cpp:
* rendering/RenderFullScreen.h:
* rendering/RenderImage.cpp:
* rendering/RenderInline.cpp:
* rendering/RenderInline.h:
* rendering/RenderLayer.cpp:
* rendering/RenderListMarker.cpp:
* rendering/RenderMultiColumnBlock.cpp:
* rendering/RenderMultiColumnFlowThread.cpp:
* rendering/RenderMultiColumnFlowThread.h:
* rendering/RenderMultiColumnSet.cpp:
* rendering/RenderMultiColumnSet.h:
* rendering/RenderNamedFlowThread.cpp:
* rendering/RenderNamedFlowThread.h:
* rendering/RenderObject.h:
* rendering/RenderReplica.cpp:
* rendering/RenderReplica.h:
* rendering/RenderRuby.cpp:
* rendering/RenderRubyBase.cpp:
* rendering/RenderRubyBase.h:
* rendering/RenderRubyRun.cpp:
* rendering/RenderScrollbar.cpp:
* rendering/RenderScrollbarPart.cpp:
* rendering/RenderScrollbarPart.h:
* rendering/RenderTable.cpp:
* rendering/RenderTableCell.cpp:
* rendering/RenderTableCell.h:
* rendering/RenderTableRow.cpp:
* rendering/RenderTableRow.h:
* rendering/RenderTableSection.cpp:
* rendering/RenderText.cpp:
* rendering/RenderView.cpp:
* rendering/RenderView.h:
* rendering/mathml/RenderMathMLBlock.cpp:
* rendering/mathml/RenderMathMLRow.cpp:
* rendering/mathml/RenderMathMLScripts.cpp:
2013-09-15 Sam Weinig <sam@webkit.org>
CTTE: ContentData::createRenderer() should take references
https://bugs.webkit.org/show_bug.cgi?id=121399
Reviewed by Andreas Kling.
- Convert createRenderer(Document*, RenderStyle*) to createRenderer(Document&, RenderStyle&)
- Do a drive by final-ing of ContentData derived classes.
* dom/PseudoElement.cpp:
(WebCore::PseudoElement::didAttachRenderers):
* rendering/RenderImage.cpp:
(WebCore::RenderImage::createAnonymous):
* rendering/RenderImage.h:
* rendering/style/ContentData.cpp:
(WebCore::ImageContentData::createRenderer):
(WebCore::TextContentData::createRenderer):
(WebCore::CounterContentData::createRenderer):
(WebCore::QuoteContentData::createRenderer):
* rendering/style/ContentData.h:
2013-09-15 Andreas Kling <akling@apple.com>
CTTE: RenderFrameSet is never anonymous.
<https://webkit.org/b/121396>
Reviewed by Antti Koivisto.
This renderer is never anonymous, and always has a corresponding HTMLFrameSetElement.
Replaced element() with a frameSetElement().
2013-09-15 Sam Weinig <sam@webkit.org>
CTTE: Node subclasses should take a Document by reference in their constructor (Part 10)
https://bugs.webkit.org/show_bug.cgi?id=121397
Reviewed by Andreas Kling.
Convert the bindings code to pass a Document reference for named constructors.
* bindings/js/JSImageConstructor.cpp:
(WebCore::constructImage):
* bindings/scripts/CodeGeneratorJS.pm:
(GenerateConstructorDefinition):
* html/HTMLAudioElement.cpp:
(WebCore::HTMLAudioElement::createForJSConstructor):
* html/HTMLAudioElement.h:
* html/HTMLImageElement.cpp:
(WebCore::HTMLImageElement::createForJSConstructor):
* html/HTMLImageElement.h:
* html/HTMLOptionElement.cpp:
(WebCore::HTMLOptionElement::createForJSConstructor):
* html/HTMLOptionElement.h:
2013-09-15 Sam Weinig <sam@webkit.org>
CTTE: Node subclasses should take a Document by reference in their constructor (Part 9)
https://bugs.webkit.org/show_bug.cgi?id=121394
Reviewed by Andreas Kling.
Remove the 'constructorTakesDocumentReference' property. It is the default now.
* dom/make_names.pl:
Always use a Document reference.
* html/HTMLTagNames.in:
* mathml/mathtags.in:
* svg/svgtags.in:
Remove the 'constructorTakesDocumentReference' property.
2013-09-15 Andreas Kling <akling@apple.com>
RenderWidget doesn't need to cache a FrameView pointer.
<https://webkit.org/b/121158>
Reviewed by Antti Koivisto.
The FrameView can be found through RenderObject::view().frameView().
This way also gets you a reference, so no need for null-checking.
2013-09-15 Sam Weinig <sam@webkit.org>
CTTE: Node subclasses should take a Document by reference in their constructor (Part 8)
https://bugs.webkit.org/show_bug.cgi?id=121393
Reviewed by Andreas Kling.
Converts the following to take a Document reference:
- All of SVG
2013-09-15 Sam Weinig <sam@webkit.org>
[CTTE] Node subclasses should take a Document by reference in their constructor (Part 7)
https://bugs.webkit.org/show_bug.cgi?id=121389
Reviewed by Andreas Kling.
Converts the following to take a Document reference:
- Element
- MathMLElement
- MathMLInlineContainerElement
- MathMLMathElement
- MathMLTextElement
2013-09-15 Andreas Kling <akling@apple.com>
CTTE: RenderMedia and RenderVideo are never anonymous.
<https://webkit.org/b/121388>
Reviewed by Sam Weinig.
Codify the following:
- RenderMedia always has an HTMLMediaElement.
- RenderVideo always has an HTMLVideoElement.
None of these renderers are ever anonymous, so delete element() and provide
strongly typed reference getters instead.
2013-09-15 Andreas Kling <akling@apple.com>
Unreviewed, rolling out r155809.
http://trac.webkit.org/changeset/155809
https://bugs.webkit.org/show_bug.cgi?id=121388
Accidentally removed files, let's redo this.
2013-09-15 Andreas Kling <akling@apple.com>
CTTE: RenderMedia and RenderVideo are never anonymous.
<https://webkit.org/b/121388>
Reviewed by Sam Weinig.
Codify the following:
- RenderMedia always has an HTMLMediaElement.
- RenderVideo always has an HTMLVideoElement.
None of these renderers are ever anonymous, so delete element() and provide
strongly typed reference getters instead.
2013-09-15 Sam Weinig <sam@webkit.org>
[CTTE] Node subclasses should take a Document by reference in their constructor (Part 6)
https://bugs.webkit.org/show_bug.cgi?id=121387
Reviewed by Andreas Kling.
Converts the following to take a Document reference:
- Attr
- CDATASection
- CharacterData
- Comment
- DOMImplementation
- DocumentFragment
- DocumentType
- EntityReference
- Notation
- ProcessingInstruction
- ShadowRoot
- TemplateContentDocumentFragment
- Text
2013-09-15 Andreas Kling <akling@apple.com>
Remove RenderObject::clearNode().
<https://webkit.org/b/121386>
Reviewed by Anders Carlsson.
This was used by ref-counted RenderWidgets after getting removed from their
parent renderer but kept alive by an external ref. We have no need for this
awkward state anymore, so remove clearNode().
2013-09-15 Andreas Kling <akling@apple.com>
CTTE: RenderWidgets are never anonymous.
<https://webkit.org/b/121385>
Reviewed by Anders Carlsson.
Codify the following:
- RenderWidget always has an HTMLFrameOwnerElement.
- RenderEmbeddedObject always has an HTMLFrameOwnerElement.
- RenderSnapshottedPlugIn always has an HTMLPlugInImageElement.
- RenderFrame always has an HTMLFrameElement.
- RenderIFrame always has an HTMLIFrameElement.
None of these renderers are ever anonymous, so delete element() and provide
strongly typed reference getters instead.
2013-09-14 Darin Adler <darin@apple.com>
Use FINAL instead of virtualChildren trick in render tree classes
https://bugs.webkit.org/show_bug.cgi?id=121373
Reviewed by Andreas Kling.
* rendering/RenderBlock.cpp:
(WebCore::RenderBlock::updateFirstLetterStyle): Use children instead of
virtualChildren.
* rendering/RenderBox.cpp:
(WebCore::RenderBox::splitAnonymousBoxesAroundChild): Ditto.
* rendering/RenderBoxModelObject.cpp:
(WebCore::RenderBoxModelObject::moveChildTo): Ditto.
* rendering/RenderObject.cpp:
(WebCore::RenderObject::addChild): Ditto.
(WebCore::RenderObject::removeChild): Ditto.
(WebCore::RenderObject::handleDynamicFloatPositionChange): Ditto.
(WebCore::RenderObject::willBeDestroyed): Ditto.
(WebCore::RenderObject::removeFromRenderFlowThreadRecursive): Ditto.
* rendering/RenderBlock.h: Changed firstChild and lastChild to use
m_children directly instead of a function. Made the children function
a final virtual override. Deleted the virtualChildren override. Added
override keywords to other virtual functions.
* rendering/RenderEmbeddedObject.h: Ditto.
* rendering/RenderFrameSet.h: Ditto.
* rendering/RenderInline.h: Ditto.
* rendering/RenderMedia.h: Ditto.
* rendering/RenderTableCol.h: Ditto.
* rendering/RenderTableRow.h: Ditto.
* rendering/RenderTableSection.h: Ditto.
* rendering/svg/RenderSVGContainer.h: Ditto.
* rendering/svg/RenderSVGRoot.h: Ditto.
* rendering/RenderObject.h:
(WebCore::RenderObject::firstChild): Use children instead of virtualChildren.
(WebCore::RenderObject::lastChild): Ditto.
(WebCore::RenderObject::children): Renamed from virtualChildren.
(WebCore::RenderObject::canHaveChildren): Use children instead of virtualChildren.
2013-09-15 Darin Adler <darin@apple.com>
Shrink factory functions
https://bugs.webkit.org/show_bug.cgi?id=121378
Reviewed by Andreas Kling.
This makes the functions that builds four different types of per-element tables
all have smaller code size.
* DerivedSources.make: Tweaked how HTML and SVG wrapper factories are made a bit.
It was OK, but a little sloppy.
* dom/Document.cpp:
(WebCore::Document::createElement): Changed to call the createElement functions
in the factories. Also did some style improvement.
* dom/make_names.pl:
(printConstructorSignature): Make constructors take a Document& instead of
a Document*.
(printConstructorInterior): Updated for Document& instead of Document*.
(printFunctionTable): Renamed from printFunctionInits, because this now
creates table entries. The actual code to add each function is now done
in a loop instead.
(printNamesHeaderFile): Made the table const.
(printNamesCppFile): Made the table const.
(printDefinitions): Generate a table, table entries, and a loop that calls
createQualifiedName, rather than an "unrolled loop".
(printFactoryCppFile): Tweaked indentation. Updated to take Document& instead
of Document*. Generate a table, table entries, and a loop that builds a map,
rather than an "unrolled" loop.
(printFactoryHeaderFile): Eliminated the unused createElement member function
that was part of a dream of factory objects in a namespace registry, giving
the name createElement to the static member function so it would be less
redundant. Also made the function takes a Document& instead of Document*.
Also made the default "not created by parser", since the parser is the simpler
use case, outnumbered by the non-parser uses, at least at the moment. Also,
use nullptr instead of 0.
(printWrapperFactoryCppFile): Generate a table, table entries, and a loop
that builds a map rather than an "unrolled" loop.
* editing/htmlediting.cpp:
(WebCore::createHTMLElement): Put the null check here that used to be in
HTMLElementFactory::createElement, and call with a reference instead of a
pointer. Also don't need to pass "0, false" since "not created by the parser"
is now the default.
* html/HTMLDocument.cpp:
(WebCore::HTMLDocument::createElement): Ditto.
* html/HTMLElement.cpp:
(WebCore::populateEventNameForAttributeLocalNameMap): Changed to use an
AtomicStringImpl* as the key instead of AtomicString, since all the strings
come from the local names of tags, and so don't need to be ref'd. This saves
a bit of reference count churn when building the map and is the same pattern
used in some maps in the make_names.pl script above.
(WebCore::HTMLElement::parseAttribute): Updated for change above.
* html/HTMLObjectElement.cpp:
(WebCore::isRecognizedTagName): More const.
* html/parser/HTMLConstructionSite.cpp:
(WebCore::HTMLConstructionSite::createHTMLElement): Changed to call the
HTMLElementFactory::createElement function under its new name with a reference
rather than a pointer.
* html/parser/HTMLIdentifier.cpp:
(WebCore::nameForIndex): More const.
(WebCore::HTMLIdentifier::addNames): More const.
* html/parser/HTMLTreeBuilder.cpp:
(WebCore::mapLoweredLocalNameToName): More const.
(WebCore::adjustSVGTagNameCase): Eliminated local variable so we would not have
to utter type with more const.
(WebCore::adjustAttributes): Ditto.
(WebCore::addNamesWithPrefix): More const. Also tweaked to use a bit more reference,
and a bit less pointer. Also used array instead of pointer for argument since they
are synonyms and this use is more array-like and const array is slightly easier to
understand than the double const pointer.
(WebCore::adjustForeignAttributes): Eliminated local variable so we would not have
to utter type with more const.
* html/track/TextTrackCue.cpp:
(WebCore::TextTrackCue::copyWebVTTNodeToDOMTree): Pass a reference to
WebVTTElement::createEquivalentHTMLElement.
* html/track/WebVTTElement.cpp:
(WebCore::WebVTTElement::WebVTTElement): Take a reference instead of a pointer.
(WebCore::WebVTTElement::create): Ditto.
(WebCore::WebVTTElement::cloneElementWithoutAttributesAndChildren): Pass a
reference instead of a pointer to create.
(WebCore::WebVTTElement::createEquivalentHTMLElement): Take a reference instead
of a pointer, and update uses of HTMLElementFactory::createElement. Also made
this return null when a bad node type is passed in, which should never happen.
* html/track/WebVTTElement.h: Use Document& instead of Document*. Removed unused
and undefined create/constructor overloads.
* html/track/WebVTTParser.cpp:
(WebCore::WebVTTParser::constructTreeFromToken): Pass document reference rather than
pointer to WebVTTElement::create.
2013-09-15 Andreas Kling <akling@apple.com>
Get rid of ref-counting on RenderArena.
<https://webkit.org/b/121379>
Reviewed by Darin Adler.
This was used to guard the arena during ref-counted RenderWidget teardown.
2013-09-15 Darin Adler <darin@apple.com>
Fix Qt build.
* css/CSSSelector.cpp:
(WebCore::populatePseudoTypeByNameMap): Removed stray line that was breaking
the build for any platform with !ENABLE(VIDEO_TRACK).
2013-09-15 Andreas Kling <akling@apple.com>
Restore two-pass mechanism for FrameView::updateEmbeddedObjects().
<https://webkit.org/b/121380>
Reviewed by Darin Adler.
Restore the code to make a second pass over the embedded objects needing
an update in case more objects were added to the set during the first pass.
2013-09-15 Frédéric Wang <fred.wang@free.fr>
Implement the mmultiscripts tag
https://bugs.webkit.org/show_bug.cgi?id=99618
Reviewed by Chris Fleizach.
Tests: mathml/invalid-scripts-crash.html
mathml/presentation/multiscripts-equivalence.html
mathml/presentation/multiscripts-noscripts.html
mathml/presentation/multiscripts-positions.html
mathml/presentation/scripts-base-alignment.html
mathml/presentation/scripts-horizontal-alignment.html
mathml/presentation/scripts-vertical-alignment.html
mathml/scripts-addChild.html
mathml/scripts-removeChild.html
This relies on the existing msub/msup/msubsup code to implement the mmultiscripts tag. This also improves dynamic addition/removal of children for these MathML elements and adds a specific style for invalid children, so that they render like an merror tag. Finally, this fixes a bad memory access in the Accessibility render object of msubsup.
* CMakeLists.txt:
* GNUmakefile.list.am:
* Target.pri:
* WebCore.vcxproj/WebCore.vcxproj:
* WebCore.vcxproj/WebCore.vcxproj.filters:
* WebCore.xcodeproj/project.pbxproj:
* accessibility/AccessibilityRenderObject.cpp:
(WebCore::AccessibilityRenderObject::isMathSubscriptSuperscript):
(WebCore::AccessibilityRenderObject::mathSuperscriptObject):
* css/mathml.css:
(mo, mrow, mfenced, mfrac, msub, msup, msubsup, mmultiscripts, mprescripts, none, munder, mover, munderover, msqrt, mroot):
(mover > :last-child, munderover > :last-child):
(msub > * + *, msup > * + *, msubsup > * + *, mmultiscripts > * + *, munder > * + *, mover > * + *, munderover > * + *):
(merror, msub > * + * + *, msup > * + * + *, msubsup > * + * + * + *, msub > mprescripts, msup > mprescripts, msubsup > mprescripts, msub > none, msup > none, msubsup > none, mmultiscripts > mprescripts ~ mprescripts, mmultiscripts > mprescripts ~ mprescripts ~ *):
* mathml/MathMLInlineContainerElement.cpp:
(WebCore::MathMLInlineContainerElement::createRenderer):
* mathml/mathtags.in:
* rendering/mathml/RenderMathMLBlock.h:
(WebCore::RenderMathMLBlock::isRenderMathMLScripts):
(WebCore::RenderMathMLBlock::isRenderMathMLScriptsWrapper):
* rendering/mathml/RenderMathMLScripts.cpp: Added.
(WebCore::isMPrescripts):
(WebCore::RenderMathMLScripts::RenderMathMLScripts):
(WebCore::RenderMathMLScripts::base):
(WebCore::RenderMathMLScripts::fixAnonymousStyleForSubSupPair):
(WebCore::RenderMathMLScripts::fixAnonymousStyles):
(WebCore::RenderMathMLScripts::addChildInternal):
(WebCore::RenderMathMLScripts::removeChildInternal):
(WebCore::RenderMathMLScripts::addChild):
(WebCore::RenderMathMLScripts::removeChild):
(WebCore::RenderMathMLScripts::styleDidChange):
(WebCore::RenderMathMLScripts::unembellishedOperator):
(WebCore::RenderMathMLScripts::layout):
(WebCore::RenderMathMLScripts::firstLineBoxBaseline):
(WebCore::RenderMathMLScriptsWrapper::createAnonymousWrapper):
(WebCore::RenderMathMLScriptsWrapper::addChildInternal):
(WebCore::RenderMathMLScriptsWrapper::addChild):
(WebCore::RenderMathMLScriptsWrapper::removeChildInternal):
(WebCore::RenderMathMLScriptsWrapper::removeChild):
* rendering/mathml/RenderMathMLScripts.h: Added.
(WebCore::RenderMathMLScriptsWrapper::RenderMathMLScriptsWrapper):
(WebCore::RenderMathMLScriptsWrapper::renderName):
(WebCore::RenderMathMLScriptsWrapper::isRenderMathMLScriptsWrapper):
(WebCore::toRenderMathMLScriptsWrapper):
(WebCore::RenderMathMLScripts::isRenderMathMLScripts):
(WebCore::RenderMathMLScripts::renderName):
(WebCore::toRenderMathMLScripts):
* rendering/mathml/RenderMathMLSubSup.cpp: Removed.
* rendering/mathml/RenderMathMLSubSup.h: Removed.
2013-09-15 Andreas Kling <akling@apple.com>
Get rid of ref-counting on RenderWidget.
<https://webkit.org/b/121357>
Reviewed by Darin Adler.
Instead of RenderView tracking RenderWidgets, have FrameView track Widgets
that are currently in the render tree.
To protect ourselves during NPAPI tomfoolery, we now let RenderWidget hand
out weak pointers through a createWeakPtr() method so call sites can monitor
the renderer for deletion without having to take shared ownership.
This works out quite nicely since instead of keeping a limping object alive
for a little longer just so we can call methods on it (to accomplish nothing),
we're forced to check right away if it's gone, and take immediate action.
De-virtualized RenderObject::destroy() since it's no longer needed for
RenderWidget to defer destruction.
* page/FrameView.cpp:
(WebCore::FrameView::layout):
(WebCore::FrameView::repaintFixedElementsAfterScrolling):
Call updateWidgetPositions() on FrameView instead of RenderView.
(WebCore::FrameView::updateEmbeddedObject):
Turn null checking of embedded object's element backpointer into an
assertion. This will eventually go away completely once that renderer
can return a HTMLFrameOwnerElement&.
Use WeakPtr to check for renderer destruction following the call out
to updateWidget().
(WebCore::FrameView::updateEmbeddedObjects):
Slap a WidgetHierarchyUpdatesSuspensionScope guard on this function
to defer Widget updates until all the updateEmbeddedObject calls are
done. This avoids RenderWidget::setWidget() having to handle 'this'
disappearing from underneath.
Also use a ListHashSet with a null sentinel to avoid looping forever.
(WebCore::FrameView::performPostLayoutTasks):
Only call updateEmbeddedObjects() once since that function no longer
operates in chunks.
(WebCore::FrameView::notifyWidgetsInAllFrames):
Call notifyWidgets() on FrameView instead of RenderView.
(WebCore::FrameView::didAddWidgetToRenderTree):
(WebCore::FrameView::willRemoveWidgetFromRenderTree):
Added. These are called by RenderWidget when a Widget is being
added or removed from a RenderWidget.
(WebCore::collectWidgets):
Helper to collect raw Widget pointers into a Vector and ref them.
(WebCore::FrameView::updateWidgetPositions):
Moved here from RenderView. This function holds a ref on all the
attached Widgets and calls RenderWidget::updateWidgetPosition() on
their corresponding renderers.
(WebCore::FrameView::notifyWidgets):
Moved here from RenderView. Holds a ref on all the widgets while
calling Widget::notifyWidget() on each one.
* rendering/RenderLayer.cpp:
(WebCore::RenderLayer::scrollTo):
Call updateWidgetPositions() on FrameView instead of RenderView.
* rendering/RenderObject.h:
De-virtualized destroy().
* rendering/RenderView.cpp:
* rendering/RenderView.h:
Moved a bunch of things to FrameView. Made protected section private
since nothing inherits from RenderView.
* rendering/RenderWidget.h:
(WebCore::RenderWidget::createWeakPtr):
Added a WeakPtr factory for clients that want to monitor this object
for destruction.
* rendering/RenderWidget.cpp:
(WebCore::RenderWidget::RenderWidget):
(WebCore::RenderWidget::willBeDestroyed):
(WebCore::RenderWidget::~RenderWidget):
Removed ref counting.
Removed registration with RenderView in ctor/willBeDestroyed.
(WebCore::RenderWidget::setWidgetGeometry):
Monitor the RenderWidget itself through a WeakPtr and check on it
after each step that we're still alive. In that case just bail out.
(WebCore::RenderWidget::setWidget):
Register the incoming/outgoing Widget with the FrameView.
Use a WeakPtr to check on 'this' after updateWidgetGeometry().
(WebCore::RenderWidget::updateWidgetPosition):
Use a WeakPtr to check on 'this' after updateWidgetGeometry().
* GNUmakefile.list.am:
* rendering/RenderWidgetProtector.h:
Removed.
2013-09-14 Sam Weinig <sam@webkit.org>
[CTTE] Node subclasses should take a Document by reference in their constructor (Part 5)
https://bugs.webkit.org/show_bug.cgi?id=121375
Reviewed by Andreas Kling.
* dom/make_names.pl:
Add support for a top level 'constructorTakesDocumentReference' property to
force using a Document reference for the whole factory.
* html/HTMLTagNames.in:
Replace per-tag 'constructorTakesDocumentReference' with a top level declaration
now that all of the HTML tag names are supported.
Converts the following to take a Document reference:
- HTMLContentElement
- HTMLElement
- HTMLFrameElementBase
- HTMLFrameOwnerElement
- HTMLPlugInElement
- HTMLPlugInImageElement
- HTMLUnknownElement
- InsertionPoint
- StyledElement
- TextTrackCueBox
- TextTrackCueGenericBoxElement
2013-09-14 Eric Carlson <eric.carlson@apple.com>
MediaStream API: Update RTCDataChannel
https://bugs.webkit.org/show_bug.cgi?id=121102
Reviewed by Sam Weinig.
Based on https://chromium.googlesource.com/chromium/blink/+/c6975c41956acded7cf0363012d7d6b69d0c6d96,
and https://chromium.googlesource.com/chromium/blink/+/214dab0bd6385f573c918ba5ce58a5aa206ce186.
No new tests, existing tests updated.
* Modules/mediastream/RTCDataChannel.cpp:
(WebCore::RTCDataChannel::create): Take an options Dictionary.
(WebCore::RTCDataChannel::didChangeReadyState): String -> AtomicString. Early return if the
state hasn't changed.
(WebCore::RTCDataChannel::binaryType): String -> AtomicString.
(WebCore::RTCDataChannel::setBinaryType): String -> AtomicString.
* Modules/mediastream/RTCDataChannel.h:
* Modules/mediastream/RTCDataChannel.idl:
* Modules/mediastream/RTCPeerConnection.cpp:
(WebCore::RTCPeerConnection::createDataChannel): Take an options struct.
* platform/mediastream/RTCDataChannelHandler.h:
* platform/mediastream/RTCPeerConnectionHandler.h:
(WebCore::RTCDataChannelInit::RTCDataChannelInit): Take an options struct.
2013-09-14 Thiago de Barros Lacerda <thiago.lacerda@openbossa.org>
MediaStream API: Update RTCDataChannel to match the specification
https://bugs.webkit.org/show_bug.cgi?id=120889
Reviewed by Eric Carlson
Merged from https://chromium.googlesource.com/chromium/blink/+/c3862b0a83e20fc8b1f770c7e4a886a7cceb80d2
by Tommy Widenflycht.
According to WebRTC specification, RTCDataChannel must have the following new attributes:
boolean ordered
unsigned short maxRetransmitTime
unsigned short maxRetransmits
DOMString protocol
boolean negotiated
unsigned short id
and the following one was deprecated:
boolean reliable
Test updates will be landed with https://webkit.org/b/121102.
* Modules/mediastream/RTCDataChannel.cpp:
(WebCore::RTCDataChannel::ordered):
(WebCore::RTCDataChannel::maxRetransmitTime):
(WebCore::RTCDataChannel::maxRetransmits):
(WebCore::RTCDataChannel::protocol):
(WebCore::RTCDataChannel::negotiated):
(WebCore::RTCDataChannel::id):
* Modules/mediastream/RTCDataChannel.h:
* Modules/mediastream/RTCDataChannel.idl:
* platform/mediastream/RTCDataChannelHandler.h:
2013-09-14 Sam Weinig <sam@webkit.org>
[CTTE] Node subclasses should take a Document by reference in their constructor (Part 4)
https://bugs.webkit.org/show_bug.cgi?id=121372
Reviewed by Eric Carlson.
Converts the following to take a Document reference:
- HTMLFormControlElement
- HTMLFormControlElementWithState
- HTMLMapElement
- HTMLMarqueeElement
- HTMLMediaElement
- HTMLMenuElement
- HTMLMetaElement
- HTMLMeterElement
- HTMLOListElement
- HTMLObjectElement
- HTMLOptGroupElement
- HTMLOptionElement
- HTMLOutputElement
- HTMLParagraphElement
- HTMLParamElement
- HTMLProgressElement
- HTMLScriptElement
- HTMLSelectElement
- HTMLSourceElement
- HTMLSpanElement
- HTMLStyleElement
- HTMLSummaryElement
- HTMLTableCellElement
- HTMLTableElement
- HTMLTableRowElement
- HTMLTableSectionElement
- HTMLTemplateElement
- HTMLTextAreaElement
- HTMLTextFormControlElement
- HTMLTitleElement
- HTMLTrackElement
- HTMLUListElement
- InlineStyleSheetOwner
- LabelableElement
- All the MediaControl elements
2013-09-14 Joseph Pecoraro <pecoraro@apple.com>
XMLViewer_js and XMLViewer_css should be minified
https://bugs.webkit.org/show_bug.cgi?id=121334
Reviewed by Timothy Hatcher.
* CMakeLists.txt:
* DerivedSources.make:
* DerivedSources.pri:
* GNUmakefile.am:
* xml/XMLViewer.css:
* xml/XMLViewer.js:
2013-09-14 Eric Carlson <eric.carlson@apple.com>
[MediaStream] remove MediaStream.label
https://bugs.webkit.org/show_bug.cgi?id=121337
Reviewed by Sam Weinig.
No new tests or modified tests, this attribute was apparently never tested.
* Modules/mediastream/MediaStream.h:
* Modules/mediastream/MediaStream.idl:
2013-09-14 Sam Weinig <sam@webkit.org>
[CTTE] Node subclasses should take a Document by reference in their constructor (Part 3)
https://bugs.webkit.org/show_bug.cgi?id=121368
Reviewed by Darin Adler.
Converts the following to take a Document reference:
- DeleteButton
- DetailsContentElement
- DetailsMarkerControl
- DetailsSummaryElement
- HTMLBDIElement
- HTMLBRElement
- HTMLBaseElement
- HTMLBaseFontElement
- HTMLButtonElement
- HTMLCanvasElement
- HTMLDListElement
- HTMLDataListElement
- HTMLDetailsElement
- HTMLDirectoryElement
- HTMLDivElement
- HTMLEmbedElement
- HTMLFieldSetElement
- HTMLFontElement
- HTMLFormElement
- HTMLFrameElement
- HTMLFrameSetElement
- HTMLHRElement
- HTMLHeadElement
- HTMLHeadingElement
- HTMLHtmlElement
- HTMLIFrameElement
- HTMLImageElement
- HTMLInputElement
- HTMLKeygenElement
- HTMLLIElement
- HTMLLabelElement
- HTMLLegendElement
- HTMLLinkElement
- HTMLModElement
- HTMLPreElement
- HTMLQuoteElement
- HTMLTableCaptionElement
- HTMLTableColElement
- ImageDocumentElement
- KeygenSelectElement
- SummaryContentElement
- UploadButtonElement
2013-09-14 Zan Dobersek <zdobersek@igalia.com>
REGRESSION(r155228): Call to DragData::asFragment() nullifies PassRefPtr<Range> in documentFragmentFromDragData
https://bugs.webkit.org/show_bug.cgi?id=121359
Reviewed by Darin Adler.
* page/DragController.cpp:
(WebCore::documentFragmentFromDragData): Pass the naked pointer as the PassRefPtr<Range> argument to the DragData::asFragment()
call. The naked pointer will get wrapped and protected by a new PassRefPtr. Passing the original PassRefPtr will also create
a new PassRefPtr, but will leak the reference of the original one, leaving its pointer nullified.
2013-09-14 Zan Dobersek <zdobersek@igalia.com>
Unreviewed GTK build fix after r155774.
* bindings/scripts/CodeGeneratorGObject.pm:
(SkipFunction): Temporarily skip generation of bindings for the Console::profile() and Console::profileEnd() methods
as they're not correctly generated for the moment.
2013-09-14 Darin Adler <darin@apple.com>
Shrink the nameToPseudoTypeMap function
https://bugs.webkit.org/show_bug.cgi?id=121367
Reviewed by Andreas Kling.
* css/CSSSelector.cpp:
(WebCore::populatePseudoTypeByNameMap): Replaces the old nameToPseudoTypeMap
function. Use a table instead of lots of globals and unrolled code to set up
the map.
(WebCore::CSSSelector::parsePseudoType): Updated to use the code above, and
also use a different style that's tighter.
2013-09-14 Darin Adler <darin@apple.com>
Shrink the listMarkerText function
https://bugs.webkit.org/show_bug.cgi?id=121364
Reviewed by Andreas Kling.
Changed code to use StringBuilder, which is a better fit for what we are
doing here. But mainly, inlining was out of hand, so hit that with the
NEVER_INLINE stick. Might be worth revisiting this to optimize further for
speed by making StringBuilder better at this.
* rendering/RenderListMarker.cpp:
(WebCore::toRoman): NEVER_INLINE and use StringBuilder.
(WebCore::toAlphabeticOrNumeric): Use StringBuilder.
(WebCore::toSymbolic): NEVER_INLINE and use StringBuilder.
(WebCore::toAlphabetic): Ditto.
(WebCore::toNumeric): Ditto.
(WebCore::toHebrewUnder1000): NEVER_INLINE.
(WebCore::toHebrew): NEVER_INLINE and use StringBuilder.
(WebCore::toArmenianUnder10000): NEVER_INLINE.
(WebCore::toArmenian): NEVER_INLINE and use StringBuilder.
(WebCore::toGeorgian): NEVER_INLINE and use StringBuilder.
(WebCore::toCJKIdeographic): NEVER_INLINE and use StringBuilder.
(WebCore::listMarkerText): Use StringBuilder.
2013-09-14 Sam Weinig <sam@webkit.org>
[CTTE] Node subclasses should take a Document by reference in their
constructor (HTMLAnchorElement, HTMLAppletElement, HTMLAreaElement, HTMLAudioElement)
https://bugs.webkit.org/show_bug.cgi?id=121365
Reviewed by Andreas Kling.
* editing/CreateLinkCommand.cpp:
(WebCore::CreateLinkCommand::doApply):
* editing/UnlinkCommand.cpp:
(WebCore::UnlinkCommand::doApply):
* html/HTMLAnchorElement.cpp:
(WebCore::HTMLAnchorElement::HTMLAnchorElement):
(WebCore::HTMLAnchorElement::create):
* html/HTMLAnchorElement.h:
* html/HTMLAppletElement.cpp:
(WebCore::HTMLAppletElement::HTMLAppletElement):
(WebCore::HTMLAppletElement::create):
* html/HTMLAppletElement.h:
* html/HTMLAreaElement.cpp:
(WebCore::HTMLAreaElement::HTMLAreaElement):
(WebCore::HTMLAreaElement::create):
* html/HTMLAreaElement.h:
* html/HTMLAudioElement.cpp:
(WebCore::HTMLAudioElement::HTMLAudioElement):
(WebCore::HTMLAudioElement::create):
(WebCore::HTMLAudioElement::createForJSConstructor):
* html/HTMLAudioElement.h:
* html/HTMLTagNames.in:
* html/HTMLViewSourceDocument.cpp:
(WebCore::HTMLViewSourceDocument::addLink):
* page/DragController.cpp:
(WebCore::documentFragmentFromDragData):
2013-09-14 Thiago de Barros Lacerda <thiago.lacerda@openbossa.org>
Get INPUT_SPEECH compiling for Nix, EFL and GTK
https://bugs.webkit.org/show_bug.cgi?id=121362
r154257 was not applied completely in HTMLInputElement.cpp and there was a wrong method signature
in TextControlInnerElements.
Also adding the files needed to build INPUT_SPEECH to each build system files.
Reviewed by Andreas Kling.
No new tests needed.
* CMakeLists.txt:
* GNUmakefile.list.am:
* html/HTMLInputElement.cpp:
(WebCore::HTMLInputElement::parseAttribute):
* html/shadow/TextControlInnerElements.h:
2013-09-14 Alberto Garcia <berto@igalia.com>
Missing allow-none introspection annotation for DomDocument.evaluate method
https://bugs.webkit.org/show_bug.cgi?id=118310
Reviewed by Martin Robinson.
Add (allow-none) introspection annotation to parameters that can
be NULL.
* bindings/scripts/CodeGeneratorGObject.pm:
(GenerateFunction):
2013-09-14 Sam Weinig <sam@webkit.org>
[CTTE] Node subclasses should take a Document by reference in their constructor (HTMLBodyElement)
https://bugs.webkit.org/show_bug.cgi?id=121363
Reviewed by Andreas Kling.
* dom/make_names.pl:
(defaultTagPropertyHash):
(printConstructorInterior):
Add a new property, 'constructorTakesDocumentReference', to indicate that the class
has been converted to take a Document by reference. Once all classes are converted, this
will go away.
* html/HTMLTagNames.in:
Add the 'constructorTakesDocumentReference' property to the <body> tag as an initial
step.
* html/HTMLBodyElement.cpp:
(WebCore::HTMLBodyElement::HTMLBodyElement):
(WebCore::HTMLBodyElement::create):
* html/HTMLBodyElement.h:
Modify the constructor and create functions of HTMLBodyElement to take a Document reference.
* editing/markup.cpp:
(WebCore::createFragmentFromMarkup):
(WebCore::createFragmentForTransformToFragment):
* html/HTMLViewSourceDocument.cpp:
(WebCore::HTMLViewSourceDocument::createContainingTable):
Update callers of HTMLBodyElement::create() to pass a Document reference.
2013-09-14 Darin Adler <darin@apple.com>
* rendering/RenderListMarker.cpp: Roll out accidentally-checked-in-code.
2013-09-14 Darin Adler <darin@apple.com>
Add NeverDestroyed::get
https://bugs.webkit.org/show_bug.cgi?id=121358
Reviewed by Anders Carlsson.
* html/HTMLElement.cpp:
(WebCore::HTMLElement::parseAttribute): Use auto and the new get
function to make this code less repetitive.
2013-09-14 Sam Weinig <sam@webkit.org>
There is no need for any custom bindings for Console
https://bugs.webkit.org/show_bug.cgi?id=121338
Reviewed by Timothy Hatcher.
* GNUmakefile.list.am:
* Target.pri:
* UseJSC.cmake:
* WebCore.vcxproj/WebCore.vcxproj:
* WebCore.vcxproj/WebCore.vcxproj.filters:
* WebCore.xcodeproj/project.pbxproj:
* bindings/js/JSBindingsAllInOne.cpp:
Remove JSConsoleCustom.cpp from project files.
* bindings/js/JSConsoleCustom.cpp:
Removed.
* page/Console.cpp:
(WebCore::Console::profile):
(WebCore::Console::profileEnd):
* page/Console.h:
Swap the order of the arguments to appease the bindings generator.
* page/Console.idl:
Add the [CallWith=ScriptState] attribute to pass the ExecState
and [TreatNullAs=NullString, TreatUndefinedAs=NullString] to get
the right stringification.
2013-09-14 Anders Carlsson <andersca@apple.com>
AnimationBase::m_animation is never null
https://bugs.webkit.org/show_bug.cgi?id=121360
Reviewed by Darin Adler.
Enforce this by using references instead of pointers.
* page/animation/AnimationBase.cpp:
* page/animation/AnimationBase.h:
* page/animation/CompositeAnimation.cpp:
* page/animation/ImplicitAnimation.cpp:
* page/animation/ImplicitAnimation.h:
* page/animation/KeyframeAnimation.cpp:
* page/animation/KeyframeAnimation.h:
2013-09-14 Darin Adler <darin@apple.com>
Shrink the function that builds the event listener attribute name map
https://bugs.webkit.org/show_bug.cgi?id=121354
Reviewed by Andreas Kling.
* html/HTMLElement.cpp:
(WebCore::populateEventNameForAttributeLocalNameMap): Added. Uses a
table to populate the map.
(WebCore::eventNameForAttributeLocalNameMap): Added. Uses NeverDestroyed
to allocate a map, but does not initialize it.
(WebCore::HTMLElement::parseAttribute): Put code to use map in here.
* html/HTMLElement.h: Removed eventNameForAttributeName, no longer
a member function.
2013-09-14 Alberto Garcia <berto@igalia.com>
[GTK] WebKitGTK+ is linking against libxslt in too many places
https://bugs.webkit.org/show_bug.cgi?id=121356
Reviewed by Martin Robinson.
Don't use LIBXSLT_CFLAGS when compiling libWebCorePlatform and
libWebCoreGtk, no source files use libxslt there.
* GNUmakefile.am:
2013-09-14 Joseph Pecoraro <pecoraro@apple.com>
Web Inspector: InjectedScriptSource_js and InjectedScriptCanvasModuleSource_js should be minified
https://bugs.webkit.org/show_bug.cgi?id=121183
Reviewed by Timothy Hatcher.
* CMakeLists.txt:
* DerivedSources.make:
* DerivedSources.pri:
* GNUmakefile.am:
Minify files at build time before running xxd.pl.
* WebCore.xcodeproj/project.pbxproj:
* inspector/InjectedScriptCanvasModuleSource.js:
* inspector/InjectedScriptSource.js:
Strip trailing whitespace (touching the files so the derived sources are regenerated).
* inspector/InspectorOverlayPage.css: Added.
* inspector/InspectorOverlayPage.html:
* inspector/InspectorOverlayPage.js: Copied from Source/WebCore/inspector/InspectorOverlayPage.html.
Move JS and CSS to external files. They are inlined and minified at build time.
* inspector/Scripts/cssmin.py: Added.
* inspector/Scripts/jsmin.py: Added.
Copied from WebInspectorUI/Scripts.
* inspector/Scripts/inline-and-minify-stylesheets-and-scripts.py: Added.
Add a script that can inline stylesheets and scripts. For minifying InspectorOverlayPage.html.
2013-09-14 Zan Dobersek <zdobersek@igalia.com>
Unreviewed, fixing debug GTK builds after r155709.
* platform/gtk/PasteboardGtk.cpp:
(WebCore::Pasteboard::write): Assert that the PasteboardURL's URL is not empty.
2013-09-14 Andreas Kling <akling@apple.com>
CTTE: RenderDetailsMarker is never anonymous.
<https://webkit.org/b/121355>
Reviewed by Darin Adler.
This renderer is never anonymous, and always has a corresponding DetailsMarkerControl.
Couldn't resist cleaning up the class a little bit, adding OVERRIDE and making
toRenderDetailsMarker() into a reference version.
2013-09-14 Andreas Kling <akling@apple.com>
CTTE: RenderRubyAs{Block,Inline} are never anonymous.
<https://webkit.org/b/121353>
Reviewed by Darin Adler.
Replace element() with existingElement() and spam class with OVERRIDE.
Removed bogus removeLeftoverAnonymousBlock() override in RenderRubyAsInline
since it didn't override anything from a parent class.
2013-09-14 Andreas Kling <akling@apple.com>
CTTE: RenderRubyText is never anonymous.
<https://webkit.org/b/121352>
Reviewed by Darin Adler.
Replace element() with existingElement() and spam class with OVERRIDE.
2013-09-14 Andreas Kling <akling@apple.com>
CTTE: RenderSVGBlock renderers are never anonymous.
<https://webkit.org/b/121351>
Reviewed by Antti Koivisto.
RenderSVGBlock inherits from RenderBlockFlow, so needs separate treatment
from RenderSVGModelObject.
But like RSMO, these renderers are never anonymous, so add strongly typed
reference getters and do away with some magical type casts.
2013-09-14 Andreas Kling <akling@apple.com>
CTTE: RenderSVGModelObject renderers are never anonymous.
<https://webkit.org/b/121350>
Reviewed by Darin Adler.
Flip the switch, turning RenderSVGModelObject::element() into a reference.
2013-09-13 Andreas Kling <akling@apple.com>
CTTE: RenderSVGResourceClipper always has an SVGClipPathElement.
<https://webkit.org/b/121349>
Reviewed by Darin Adler.
This renderer is never anonymous. Tighten things up with a clipPathElement()
reference getter. Removed some unnecessary null checks and type casts.
2013-09-13 Andreas Kling <akling@apple.com>
CTTE: RenderSVGResourceFilter always has an SVGFilterElement.
<https://webkit.org/b/121348>
Reviewed by Darin Adler.
This renderer is never anonymous. Tighten things up with a filterElement()
reference getter. Removed some unnecessary null checks and type casts.
2013-09-13 Darin Adler <darin@apple.com>
Use a better name than m_invertibleCTM
https://bugs.webkit.org/show_bug.cgi?id=121341
Reviewed by Andreas Kling.
Rename isTransformInvertible to hasInvertibleTransform, and
m_invertibleCTM to m_hasInvertibleTransform.
* html/canvas/CanvasPathMethods.cpp:
(WebCore::CanvasPathMethods::moveTo):
(WebCore::CanvasPathMethods::lineTo):
(WebCore::CanvasPathMethods::quadraticCurveTo):
(WebCore::CanvasPathMethods::bezierCurveTo):
(WebCore::CanvasPathMethods::arcTo):
(WebCore::CanvasPathMethods::arc):
(WebCore::CanvasPathMethods::rect):
Updated for name change. Not really sure the name is good here,
because DOMPath doesn't have a transform at all; should switch
to a better name some day.
* html/canvas/CanvasPathMethods.h: Renamed, added a new constructor,
and made the virtual function private.
* html/canvas/CanvasRenderingContext2D.cpp:
(WebCore::CanvasRenderingContext2D::State::State):
(WebCore::CanvasRenderingContext2D::State::operator=):
(WebCore::CanvasRenderingContext2D::scale):
(WebCore::CanvasRenderingContext2D::rotate):
(WebCore::CanvasRenderingContext2D::translate):
(WebCore::CanvasRenderingContext2D::transform):
(WebCore::CanvasRenderingContext2D::setTransform):
(WebCore::CanvasRenderingContext2D::fill):
(WebCore::CanvasRenderingContext2D::stroke):
(WebCore::CanvasRenderingContext2D::clip):
(WebCore::CanvasRenderingContext2D::isPointInPath):
(WebCore::CanvasRenderingContext2D::isPointInStroke):
(WebCore::CanvasRenderingContext2D::clearRect):
(WebCore::CanvasRenderingContext2D::fillRect):
(WebCore::CanvasRenderingContext2D::strokeRect):
(WebCore::CanvasRenderingContext2D::drawImage):
(WebCore::CanvasRenderingContext2D::didDraw):
(WebCore::CanvasRenderingContext2D::drawTextInternal):
Updated for name change.
* html/canvas/CanvasRenderingContext2D.h: Updated for name change.
Also got rid of unneeded conditional around forward class declaration.
* html/canvas/DOMPath.h: Moved SVG-specific include into a
separate paragraph. Removed unneeded invocation of WTF_MAKE_NONCOPYABLE,
which is already true since we inherit from RefCounted. Changed create
function argument to be a const*. Eliminated extra constructors that were
unneeded. Made the path-parsing create function SVG-only, rather than
compiling a useless empty one when compiling without SVG.
2013-09-13 Andreas Kling <akling@apple.com>
CTTE: Tighter element types for RenderSVGResourceGradient and subclasses.
<https://webkit.org/b/121346>
Reviewed by Darin Adler
Codify the following:
- RenderSVGResourceGradient always has an SVGGradientElement.
- RenderSVGResourceLinearGradient always has an SVGLinearGradientElement.
- RenderSVGResourceRadialGradient always has an SVGRadialGradientElement.
None of these renderers are ever anonymous, so delete element() and provide
strongly typed reference getters instead.
Also made RenderSVGResourceGradient constructor protected since it should
never be instantiated directly.
2013-09-13 Andreas Kling <akling@apple.com>
CTTE: RenderSVGResourceMarker always has an SVGMarkerElement.
<https://webkit.org/b/121345>
Reviewed by Brent Fulgham.
This renderer is never anonymous. Tighten things up with a maskElement()
reference getter. Removed some unnecessary type casts and assertions.
2013-09-13 Andreas Kling <akling@apple.com>
CTTE: RenderSVGResourceMasker always has an SVGMaskElement.
<https://webkit.org/b/121344>
Reviewed by Brent Fulgham.
This renderer is never anonymous. Tighten things up with a maskElement()
reference getter. Removed some unnecessary null checks and assertions.
2013-09-13 Commit Queue <commit-queue@webkit.org>
Unreviewed, rolling out r155738.
http://trac.webkit.org/changeset/155738
https://bugs.webkit.org/show_bug.cgi?id=121342
Broke many tests (Requested by ap on #webkit).
* GNUmakefile.list.am:
* Target.pri:
* UseJSC.cmake:
* WebCore.vcxproj/WebCore.vcxproj:
* WebCore.vcxproj/WebCore.vcxproj.filters:
* WebCore.xcodeproj/project.pbxproj:
* bindings/js/JSBindingsAllInOne.cpp:
* bindings/js/JSConsoleCustom.cpp: Added.
(WebCore::JSConsole::profile):
(WebCore::JSConsole::profileEnd):
* bindings/js/ScriptState.h:
* page/Console.cpp:
(WebCore::Console::profile):
(WebCore::Console::profileEnd):
* page/Console.h:
* page/Console.idl:
2013-09-12 Ryosuke Niwa <rniwa@webkit.org>
CSSPropertyAnimation::ensurePropertyMap() is large
https://bugs.webkit.org/show_bug.cgi?id=121199
Reviewed by Darin Adler.
The bug was caused by repeated calls to Vector::append. Avoid it by storing pointers in a local array
and then adding them as we traverse them through to fill m_propertyToIdMap. Also reserve the full
initial capacity at once to avoid repeated calls to FastMalloc and FastFree.
* page/animation/CSSPropertyAnimation.cpp:
(WebCore::CSSPropertyAnimationWrapperMap::instance):
(WebCore::CSSPropertyAnimationWrapperMap::wrapperForProperty):
(WebCore::CSSPropertyAnimationWrapperMap::wrapperForIndex):
(WebCore::CSSPropertyAnimationWrapperMap::indexFromPropertyID):
(WebCore::CSSPropertyAnimationWrapperMap::CSSPropertyAnimationWrapperMap): Renamed from ensurePropertyMap.
Also merged addShorthandProperties into it since they have to access local variables of the other.
2013-09-13 Ryuan Choi <ryuan.choi@samsung.com>
Unreviewed build fix for EFL port.
* editing/efl/EditorEfl.cpp:
* platform/efl/PasteboardEfl.cpp:
(WebCore::Pasteboard::read):
(WebCore::Pasteboard::write):
2013-09-13 Sam Weinig <sam@webkit.org>
Fix a few lingering ScriptStates.
Reviewed by Andy Estes.
* Modules/indexeddb/IDBCursor.cpp:
(WebCore::IDBCursor::update):
* Modules/indexeddb/IDBObjectStore.cpp:
(WebCore::IDBObjectStore::add):
(WebCore::IDBObjectStore::put):
* bindings/cpp/WebNativeNodeFilterCondition.cpp:
(WebNativeNodeFilterCondition::acceptNode):
* bindings/cpp/WebNativeNodeFilterCondition.h:
* dom/CustomElementConstructor.cpp:
(WebCore::CustomElementConstructor::create):
* dom/CustomElementConstructor.h:
* dom/CustomElementRegistry.cpp:
(WebCore::CustomElementRegistry::registerElement):
* dom/CustomElementRegistry.h:
* plugins/PluginView.cpp:
(WebCore::PluginView::performRequest):
2013-09-13 Darin Adler <darin@apple.com>
Rename confusingly named "runtimeObject" functions
https://bugs.webkit.org/show_bug.cgi?id=121339
Also CTTE: HTMLElement.
Reviewed by Sam Weinig.
* bindings/js/JSHTMLAppletElementCustom.cpp:
(WebCore::JSHTMLAppletElement::putDelegate): Renamed.
(WebCore::JSHTMLAppletElement::getCallData): Renamed.
* bindings/js/JSHTMLEmbedElementCustom.cpp:
(WebCore::JSHTMLEmbedElement::putDelegate): Renamed.
(WebCore::JSHTMLEmbedElement::getCallData): Renamed.
* bindings/js/JSHTMLObjectElementCustom.cpp:
(WebCore::JSHTMLObjectElement::putDelegate): Renamed.
(WebCore::JSHTMLObjectElement::getCallData): Renamed.
* bindings/js/JSPluginElementFunctions.cpp:
(WebCore::isPluginElement): Changed to take HTMLElement&.
(WebCore::pluginInstance): Ditto.
(WebCore::pluginScriptObjectFromPluginViewBase): Updated for name and type change.
(WebCore::pluginScriptObject): Ditto.
(WebCore::pluginElementPropertyGetter): Ditto.
(WebCore::pluginElementCustomGetOwnPropertySlot): Ditto.
(WebCore::pluginElementCustomPut): Ditto.
(WebCore::pluginElementGetCallData): Ditto.
* bindings/js/JSPluginElementFunctions.h: Updated names and types.
* bindings/objc/WebScriptObject.mm:
(+[WebScriptObject _convertValueToObjcValue:JSC::originRootObject:rootObject:]):
Updated for type change.
* bridge/runtime_method.cpp:
(JSC::callRuntimeMethod): Ditto.
2013-09-13 Sam Weinig <sam@webkit.org>
There is no need for any custom bindings for Console
https://bugs.webkit.org/show_bug.cgi?id=121338
Reviewed by Joseph Pecoraro.
* GNUmakefile.list.am:
* Target.pri:
* UseJSC.cmake:
* WebCore.vcxproj/WebCore.vcxproj:
* WebCore.vcxproj/WebCore.vcxproj.filters:
* WebCore.xcodeproj/project.pbxproj:
* bindings/js/JSBindingsAllInOne.cpp:
Remove JSConsoleCustom.cpp from project files.
* bindings/js/JSConsoleCustom.cpp:
Removed.
* page/Console.cpp:
(WebCore::Console::profile):
(WebCore::Console::profileEnd):
* page/Console.h:
Swap the order of the arguments to appease the bindings generator.
* page/Console.idl:
Add the [CallWith=ScriptState] attribute to pass the ExecState
and [TreatNullAs=NullString, TreatUndefinedAs=NullString] to get
the right stringification.
2013-09-13 Sam Weinig <sam@webkit.org>
Part 2 of Replace ScriptState with JSC::ExecState
https://bugs.webkit.org/show_bug.cgi?id=121336
* dom/Document.h:
There is no WebCore::JSC namespace!
2013-09-13 Sam Weinig <sam@webkit.org>
Replace ScriptState with JSC::ExecState
https://bugs.webkit.org/show_bug.cgi?id=121336
Reviewed by Darin Adler.
* Modules/indexeddb/IDBCursor.h:
* Modules/indexeddb/IDBObjectStore.h:
* bindings/js/JSInjectedScriptHostCustom.cpp:
* bindings/js/JSInjectedScriptManager.cpp:
* bindings/js/JSNodeCustom.cpp:
* bindings/js/JSNodeFilterCondition.h:
* bindings/js/ScriptController.cpp:
* bindings/js/ScriptDebugServer.cpp:
* bindings/js/ScriptDebugServer.h:
* bindings/js/ScriptEventListener.cpp:
* bindings/js/ScriptEventListener.h:
* bindings/js/ScriptFunctionCall.cpp:
* bindings/js/ScriptFunctionCall.h:
* bindings/js/ScriptObject.cpp:
* bindings/js/ScriptObject.h:
* bindings/js/ScriptProfiler.cpp:
* bindings/js/ScriptProfiler.h:
* bindings/js/ScriptState.cpp:
* bindings/js/ScriptState.h:
* bindings/js/ScriptValue.cpp:
* bindings/js/ScriptValue.h:
* bindings/js/SerializedScriptValue.cpp:
* bindings/js/SerializedScriptValue.h:
* dom/Document.cpp:
* dom/Document.h:
* dom/NodeFilter.cpp:
* dom/NodeFilter.h:
* dom/NodeFilterCondition.cpp:
* dom/NodeFilterCondition.h:
* dom/NodeIterator.cpp:
* dom/NodeIterator.h:
* dom/ScriptExecutionContext.cpp:
* dom/ScriptExecutionContext.h:
* dom/Traversal.cpp:
* dom/Traversal.h:
* dom/TreeWalker.cpp:
* dom/TreeWalker.h:
* inspector/ConsoleMessage.cpp:
* inspector/ConsoleMessage.h:
* inspector/InjectedScript.h:
* inspector/InjectedScriptBase.cpp:
* inspector/InjectedScriptBase.h:
* inspector/InjectedScriptCanvasModule.cpp:
* inspector/InjectedScriptCanvasModule.h:
* inspector/InjectedScriptHost.cpp:
* inspector/InjectedScriptHost.h:
* inspector/InjectedScriptManager.cpp:
* inspector/InjectedScriptManager.h:
* inspector/InjectedScriptModule.cpp:
* inspector/InjectedScriptModule.h:
* inspector/InspectorAgent.cpp:
* inspector/InspectorCanvasAgent.cpp:
* inspector/InspectorCanvasAgent.h:
* inspector/InspectorConsoleAgent.cpp:
* inspector/InspectorConsoleAgent.h:
* inspector/InspectorConsoleInstrumentation.h:
* inspector/InspectorDOMAgent.cpp:
* inspector/InspectorDebuggerAgent.cpp:
* inspector/InspectorDebuggerAgent.h:
* inspector/InspectorFrontendClientLocal.cpp:
* inspector/InspectorFrontendHost.cpp:
* inspector/InspectorIndexedDBAgent.cpp:
* inspector/InspectorInstrumentation.cpp:
* inspector/InspectorInstrumentation.h:
* inspector/PageConsoleAgent.cpp:
* inspector/PageDebuggerAgent.cpp:
* inspector/PageRuntimeAgent.cpp:
* inspector/PageRuntimeAgent.h:
* inspector/ScriptArguments.cpp:
* inspector/ScriptArguments.h:
* inspector/ScriptDebugListener.h:
* inspector/WorkerDebuggerAgent.cpp:
* inspector/WorkerRuntimeAgent.cpp:
* page/Console.cpp:
* page/Console.h:
* page/ContentSecurityPolicy.cpp:
* page/ContentSecurityPolicy.h:
* page/PageConsole.cpp:
* page/PageConsole.h:
* workers/WorkerGlobalScope.cpp:
* workers/WorkerGlobalScope.h:
2013-09-13 Sam Weinig <sam@webkit.org>
Chrome, DragController and FocusController should hold onto a Page&
https://bugs.webkit.org/show_bug.cgi?id=121325
Reviewed by Anders Carlsson.
* editing/FrameSelection.cpp:
* editing/FrameSelection.h:
* page/Chrome.cpp:
(WebCore::Chrome::Chrome):
(WebCore::Chrome::scroll):
(WebCore::Chrome::createWindow):
(WebCore::canRunModalIfDuringPageDismissal):
(WebCore::Chrome::runBeforeUnloadConfirmPanel):
(WebCore::Chrome::runJavaScriptAlert):
(WebCore::Chrome::runJavaScriptConfirm):
(WebCore::Chrome::runJavaScriptPrompt):
(WebCore::Chrome::mouseDidMoveOverElement):
(WebCore::Chrome::setToolTip):
(WebCore::Chrome::windowScreenDidChange):
* page/Chrome.h:
* page/DragController.cpp:
* page/DragController.h:
* page/mac/DragControllerMac.mm:
* page/FocusController.cpp:
* page/FocusController.h:
* page/Page.cpp:
(WebCore::Page::Page):
* page/PageGroupLoadDeferrer.cpp:
* page/PageGroupLoadDeferrer.h:
Take references where possible.
2013-09-13 Anders Carlsson <andersca@apple.com>
Use nullptr instead of 0 in calls to HashMap::add
https://bugs.webkit.org/show_bug.cgi?id=121322
Reviewed by Sam Weinig.
* bridge/IdentifierRep.cpp:
(WebCore::IdentifierRep::get):
* css/CSSFontFaceSource.cpp:
(WebCore::CSSFontFaceSource::getFontData):
* css/CSSFontSelector.cpp:
(WebCore::CSSFontSelector::getFontFace):
* css/CSSSegmentedFontFace.cpp:
(WebCore::CSSSegmentedFontFace::getFontData):
* css/CSSValuePool.cpp:
(WebCore::CSSValuePool::createFontFamilyValue):
(WebCore::CSSValuePool::createFontFaceValue):
* dom/ChildListMutationScope.cpp:
(WebCore::ChildListMutationAccumulator::getOrCreate):
* dom/Document.cpp:
(WebCore::Document::getCSSCanvasElement):
* dom/NodeRareData.h:
(WebCore::NodeListsNodeData::addCacheWithAtomicName):
(WebCore::NodeListsNodeData::addCacheWithName):
(WebCore::NodeListsNodeData::addCacheWithQualifiedName):
* loader/appcache/ApplicationCacheStorage.cpp:
(WebCore::ApplicationCacheStorage::findOrCreateCacheGroup):
* page/PageGroup.cpp:
(WebCore::PageGroup::pageGroup):
* page/animation/AnimationController.cpp:
(WebCore::AnimationControllerPrivate::ensureCompositeAnimation):
* platform/mac/ScrollbarThemeMac.mm:
(WebCore::ScrollbarThemeMac::registerScrollbar):
* storage/StorageNamespaceImpl.cpp:
(WebCore::StorageNamespaceImpl::localStorageNamespace):
2013-09-13 Sam Weinig <sam@webkit.org>
ContextMenuController should hold onto a Page&
https://bugs.webkit.org/show_bug.cgi?id=121320
Reviewed by Anders Carlsson.
* page/ContextMenuController.cpp:
(WebCore::ContextMenuController::ContextMenuController):
(WebCore::ContextMenuController::~ContextMenuController):
(WebCore::ContextMenuController::showContextMenu):
(WebCore::ContextMenuController::contextMenuItemSelected):
(WebCore::ContextMenuController::checkOrEnableIfNeeded):
(WebCore::ContextMenuController::showContextMenuAt):
* page/ContextMenuController.h:
Store the Page and ContextMenuClient as references.
* page/Page.cpp:
(WebCore::Page::Page):
Pass the Page and ContextMenuClient as references and switch to using createOwned<>().
2013-09-13 Tim Horton <timothy_horton@apple.com>
Apply OVERRIDE and FINAL to Image subclasses and clean them up
https://bugs.webkit.org/show_bug.cgi?id=121086
Reviewed by Alexey Proskuryakov.
Everything other than the copious application of OVERRIDE and FINAL
is explicitly called out below.
* WebCore.exp.in:
Export the correct version of getCGImageRef for use by WebKit2.
* platform/graphics/BitmapImage.cpp:
* platform/graphics/BitmapImage.h:
Drive-by inline isBitmapImage.
Move create(HBITMAP) to be near the other create() functions.
Move all of the members private.
Devirtualize frameCount().
Move notSolidColor() near the other solid color functions.
* platform/graphics/CrossfadeGeneratedImage.cpp:
(WebCore::CrossfadeGeneratedImage::CrossfadeGeneratedImage):
(WebCore::CrossfadeGeneratedImage::drawPattern):
* platform/graphics/GeneratorGeneratedImage.cpp:
(WebCore::GeneratorGeneratedImage::draw):
(WebCore::GeneratorGeneratedImage::drawPattern):
Use size() and setContainerSize() instead of directly accessing a
superclass' (now private, previously protected) members.
* platform/graphics/CrossfadeGeneratedImage.h:
* platform/graphics/GeneratedImage.h:
Make m_size private, I don't think we do protected members.
* platform/graphics/GeneratorGeneratedImage.h:
Make all the members private.
* svg/graphics/SVGImage.h:
* svg/graphics/SVGImageForContainer.h:
2013-09-13 Alexey Proskuryakov <ap@apple.com>
[Mac] WebCore Web Inspector files are only copied as part of clean build
https://bugs.webkit.org/show_bug.cgi?id=121316
Reviewed by Timothy Hatcher.
Removed insufficient dependencies to make the phase run unconditionally.
* WebCore.xcodeproj/project.pbxproj:
2013-09-13 Eric Carlson <eric.carlson@apple.com>
CodeGeneratorJS doesn't generate header includes for sequence<type>
https://bugs.webkit.org/show_bug.cgi?id=121314
Reviewed by Dean Jackson.
* bindings/scripts/CodeGeneratorJS.pm:
(SkipIncludeHeader): Don't return false for sequence and array types.
(AddIncludesForType): Do add includes for sequence and array types.
(GenerateCallbackImplementation):
* bindings/scripts/test/JS/JSTestTypedefs.cpp: Regenerated
* bindings/scripts/test/JS/JSTestTypedefs.h: Ditto.
* bindings/scripts/test/TestTypedefs.idl: Add a method that takes a sequence<TestEventTarget>.
2013-09-13 Andreas Kling <akling@apple.com>
CTTE: RenderSVGResourcePattern always has an SVGPatternElement.
<https://webkit.org/b/121313>
Reviewed by Anders Carlsson.
This renderer is never anonymous. Tighten things up with a patternElement()
reference getter. Removed some unnecessary null checks and assertions.
2013-09-13 Darin Adler <darin@apple.com>
Remove layering-violating Pasteboard::plainText function (for all platforms now)
https://bugs.webkit.org/show_bug.cgi?id=121312
Reviewed by Antti Koivisto.
* editing/Editor.cpp:
(WebCore::Editor::pasteAsPlainTextWithPasteboard): Call readPlainTextFromPasteboard
on all platforms, not just Mac and EFL. Also call canSmartReplaceWithPasteboard with
a reference instead of a pointer.
(WebCore::Editor::readPlainTextFromPasteboard): Added. This is a cross-platform
version of what was previously a Mac-only function.
(WebCore::Editor::plainTextFromPasteboard): Added. This is the simple non-Mac version
of this function.
(WebCore::Editor::pasteWithPasteboard): Updated to call canSmartReplaceWithPasteboard
with a reference.
(WebCore::Editor::canSmartReplaceWithPasteboard): Updated to take a reference.
* editing/Editor.h: Make readPlainTextFromPasteboard cross-platform instead of
Mac-only. Also changed argument to canSmartReplaceWithPasteboard to be a reference.
Also added private plainTextFromPasteboard function.
* editing/mac/EditorMac.mm:
(WebCore::Editor::pasteWithPasteboard): Updated to call canSmartReplaceWithPasteboard
with a reference.
(WebCore::Editor::plainTextFromPasteboard): Added. Contains the Mac-specific parts
of the readPlainTextFromPasteboard function.
* platform/Pasteboard.h: Fixed a conditional in the PasteboardPlainText struct to
omit iOS. Removed the layering-voiolating plainText function.
* platform/blackberry/PasteboardBlackBerry.cpp:
(WebCore::Pasteboard::read): Renamed from plainText and updated to new calling
convention.
* platform/gtk/PasteboardGtk.cpp:
(WebCore::Pasteboard::read): Ditto.
* platform/ios/PasteboardIOS.mm:
(WebCore::Pasteboard::read): Ditto.
* platform/nix/PasteboardNix.cpp:
(WebCore::Pasteboard::read): Ditto.
* platform/qt/PasteboardQt.cpp:
(WebCore::Pasteboard::read): Ditto.
* platform/win/PasteboardWin.cpp:
(WebCore::Pasteboard::read): Ditto.
2013-09-13 Gustavo Noronha Silva <gustavo.noronha@collabora.com>
[GTK] Move to the new web inspector
https://bugs.webkit.org/show_bug.cgi?id=120647
Reviewed by Carlos Garcia Campos.
No tests for the new inspector UI as of yet.
* GNUmakefile.am: no longer install the deprecated inspector UI files.
* WebCore.exp.in: add SchemeRegistry symbol that is now used.
2013-09-13 Darin Adler <darin@apple.com>
Try to fix Qt build.
* platform/qt/PasteboardQt.cpp:
(WebCore::Pasteboard::write): Update variable name at one place I missed.
2013-09-13 Arvid Nilsson <anilsson@rim.com>
[BlackBerry] Scrolling and zooming is slow when Flash plugin visible
https://bugs.webkit.org/show_bug.cgi?id=120618
Reviewed by Anders Carlsson.
Internally reviewed by Jacky Jiang.
JIRA 490823
Compositing Flash plugin content triggered a workaround for a graphics
driver quirk. The workaround was actually related to WebGL, not Flash,
back when we used glCopyTexImage to implement WebGL double buffering
(see PR 148933 and 150228 for more details of the old implementation).
Originally, both WebGL and plugin layers added themselves to the
LayerRenderer::m_layersLockingTextureResources list. Now only plugin
layers use this list.
The glCopyTexImage code was removed long ago, and WebGL now uses the
EGLImage-based double buffering approach implemented in
EGLImageLayerWebKitThread and EGLImageLayerCompositingThreadClient.
Fixed by removing the now obsolete workaround, a call to "glFinish".
This considerably improves the frame rate of zooming and scrolling when
Flash content is visible.
Improvement in frame rate not appropriate to test using layout tests,
could easily result in flaky test.
* platform/graphics/blackberry/LayerRenderer.cpp:
(WebCore::LayerRenderer::compositeLayers):
2013-09-13 Zoltan Horvath <zoltan@webkit.org>
Move LineLayoutState class to LineLayoutState.h
https://bugs.webkit.org/show_bug.cgi?id=121263
Reviewed by Ryosuke Niwa.
I added bitfields, reordered the members and a functions too.
No new tests, no behavior change.
* rendering/LineLayoutState.h: Added.
(WebCore::LineLayoutState::LineLayoutState):
(WebCore::LineLayoutState::markForFullLayout):
(WebCore::LineLayoutState::isFullLayout):
(WebCore::LineLayoutState::usesRepaintBounds):
(WebCore::LineLayoutState::setRepaintRange):
(WebCore::LineLayoutState::updateRepaintRangeFromBox):
(WebCore::LineLayoutState::endLineMatched):
(WebCore::LineLayoutState::setEndLineMatched):
(WebCore::LineLayoutState::checkForFloatsFromLastLine):
(WebCore::LineLayoutState::setCheckForFloatsFromLastLine):
(WebCore::LineLayoutState::lineInfo):
(WebCore::LineLayoutState::endLineLogicalTop):
(WebCore::LineLayoutState::setEndLineLogicalTop):
(WebCore::LineLayoutState::endLine):
(WebCore::LineLayoutState::setEndLine):
(WebCore::LineLayoutState::lastFloat):
(WebCore::LineLayoutState::setLastFloat):
(WebCore::LineLayoutState::floats):
(WebCore::LineLayoutState::floatIndex):
(WebCore::LineLayoutState::setFloatIndex):
(WebCore::LineLayoutState::adjustedLogicalLineTop):
(WebCore::LineLayoutState::setAdjustedLogicalLineTop):
(WebCore::LineLayoutState::flowThread):
(WebCore::LineLayoutState::setFlowThread):
* rendering/RenderBlockLineLayout.cpp: Remove LineLayoutState.
2013-09-13 Darin Adler <darin@apple.com>
Remove layering-violating Pasteboard::writeURL (for all platforms now)
https://bugs.webkit.org/show_bug.cgi?id=121306
Reviewed by Antti Koivisto.
* editing/Editor.cpp:
(WebCore::Editor::copyURL): Move the contents of the writeURLToPasteboard function
in here.
* editing/Editor.h: Removed Mac-specific writeURLToPasteboard, added private
Mac-specific fillInUserVisibleForm function for the one Mac-specific part of writing URLs.
* editing/efl/EditorEfl.cpp: Deleted Editor::writeURLToPasteboard.
* editing/mac/EditorMac.mm: Deleted Editor::writeURLToPasteboard, moving the code
into copyURL.
(WebCore::Editor::fillInUserVisibleForm): Added.
* page/DragController.cpp:
(WebCore::DragController::startDrag): Call copyURL instead of writeURL or
writeURLToPasteboard.
* platform/Pasteboard.h: Fixed up the PasteboardURL struct so it's suitable for
cross-platform use. Removed the writeURL function. Removed the Frame* argument from
the Windows-specific writeURLToDataObject function.
* platform/blackberry/PasteboardBlackBerry.cpp:
(WebCore::Pasteboard::write): Renamed/refactored from writeURL.
* platform/gtk/PasteboardGtk.cpp:
(WebCore::Pasteboard::write): Ditto.
* platform/nix/PasteboardNix.cpp:
(WebCore::Pasteboard::write): Ditto.
* platform/qt/PasteboardQt.cpp:
(WebCore::Pasteboard::write): Ditto.
* platform/win/PasteboardWin.cpp:
(WebCore::Pasteboard::writeURLToDataObject): Removed unused Frame* argument.
(WebCore::Pasteboard::write): Renamed/refactored from writeURL.
2013-09-13 Chris Fleizach <cfleizach@apple.com>
AX: AXPress does not work in SVG
https://bugs.webkit.org/show_bug.cgi?id=121248
Reviewed by Mario Sanchez Prada.
Implement accessKeyAction() on SVGElements, which is what accessibility code
uses in order to activate Elements.
Test: accessibility/svg-element-press.html
* svg/SVGElement.cpp:
(WebCore::SVGElement::accessKeyAction):
* svg/SVGElement.h:
2013-09-13 Andreas Kling <akling@apple.com>
[CTTE] RenderSVGTransformableContainer is never anonymous.
<https://webkit.org/b/121304>
Reviewed by Anders Carlsson.
This renderer is never anonymous. Tighten things up with a graphicsElement()
reference getter.
2013-09-13 Andreas Kling <akling@apple.com>
[CTTE] RenderSVGImage always has a SVGImageElement.
<https://webkit.org/b/121301>
Reviewed by Anders Carlsson.
This renderer is never anonymous, and always has a corresponding SVGImageElement.
2013-09-13 Andreas Kling <akling@apple.com>
[CTTE] Tighter element types for RenderSVGShape and subclasses.
<https://webkit.org/b/121302>
Reviewed by Antti Koivisto.
Codify the following:
- RenderSVGPath always has an SVGGraphicsElement.
- RenderSVGEllipse always has an SVGGraphicsElement.
- RenderSVGRect always has an SVGRectElement.
- RenderSVGShape always has an SVGGraphicsElement.
None of these renderers are ever anonymous, so delete element() and provide
strongly typed reference getters instead.
2013-09-13 Andreas Kling <akling@apple.com>
[CTTE] RenderSVGResourceFilterPrimitive always has an SVGFilterPrimitiveStandardAttributes.
<https://webkit.org/b/121300>
Reviewed by Anders Carlsson.
This renderer is never anonymous, and always has a corresponding SVGFilterPrimitiveStandardAttributes element.
2013-09-12 Darin Adler <darin@apple.com>
Finish removing layer-violating code from Pasteboard (just for Mac during this first step)
https://bugs.webkit.org/show_bug.cgi?id=121279
Reviewed by Anders Carlsson.
* editing/Editor.h: Added webContentFromPasteboard member function, private nested class
WebContentReader, private createFragmentForImageResourceAndAddResource and
createFragmentAndAddResources member functions.
* editing/mac/EditorMac.mm: Re-sorted includes and added some.
(WebCore::Editor::pasteWithPasteboard): Call the new webContentFromPasteboard function.
(WebCore::Editor::insertParagraphSeparatorInQuotedContent): Comment tweak.
(WebCore::styleForSelectionStart): Removed an unneeded call to String::impl.
(WebCore::Editor::readPlainTextFromPasteboard): Updated to use an isURL boolean instead
of a separate string named "url".
(WebCore::Editor::WebContentReader::readWebArchive): Added. Contains reworked code that
was originally in Pasteboard::documentFragment.
(WebCore::Editor::WebContentReader::readFilenames): Ditto.
(WebCore::Editor::WebContentReader::readHTML): Ditto.
(WebCore::Editor::WebContentReader::readRTFD): Ditto.
(WebCore::Editor::WebContentReader::readRTF): Ditto.
(WebCore::Editor::WebContentReader::readImage): Ditto.
(WebCore::Editor::WebContentReader::readURL): Ditto.
(WebCore::Editor::WebContentReader::readPlainText): Ditto.
(WebCore::Editor::webContentFromPasteboard): Added. Uses WebContentReader to read the
content from the pasteboard.
(WebCore::Editor::createFragmentForImageResourceAndAddResource): Added. Helper used
by code above.
(WebCore::Editor::createFragmentAndAddResources): Ditto.
* platform/Pasteboard.h: Added new PasteboardWebContentReader abstract class so
client can get the various types of pasteboard content and stop on the kind it
can handle. Improved comments and formatting a bit. Removed documentFragment
when compiling for PLATFORM(MAC).
* platform/mac/DragDataMac.mm:
(WebCore::DragData::asFragment): Changed to use Editor::webContentFromPasteboard.
* platform/mac/PasteboardMac.mm:
(WebCore::Pasteboard::read): Updated the plain text overload of this for changes
to the struct that holds the result. Added a new web content overload of this,
which retains the pasteboard-reading part of Pasteboard::documentFragment, but
omits the document fragment construction part.
2013-09-13 Andreas Kling <akling@apple.com>
[CTTE] RenderSVGText always has a SVGTextElement.
<https://webkit.org/b/121299>
Reviewed by Antti Koivisto.
This renderer is never anonymous, and always has a corresponding <svg> element.
Tighten this up and remove some pointless assertions.
2013-09-13 Allan Sandfeld Jensen <allan.jensen@digia.com>
Remove support for QXmlStream as the XML parser.
https://bugs.webkit.org/show_bug.cgi?id=121229
Reviewed by Andreas Kling.
Remove the implementation and all the #ifdef related to it.
* Target.pri:
* WebCore.pri:
* dom/TransformSource.h:
* xml/XMLErrors.h:
* xml/XSLStyleSheet.h:
* xml/XSLTProcessor.h:
* xml/parser/XMLDocumentParser.cpp:
(WebCore::XMLDocumentParser::enterText):
(WebCore::toString):
(WebCore::XMLDocumentParser::exitText):
(WebCore::XMLDocumentParser::insertErrorMessageBlock):
* xml/parser/XMLDocumentParser.h:
* xml/parser/XMLDocumentParserQt.cpp: Removed.
2013-09-13 Andreas Kling <akling@apple.com>
[CTTE] RenderSVGViewportContainer always has a SVGSVGElement.
<https://webkit.org/b/121297>
Reviewed by Antti Koivisto.
This renderer is never anonymous, and always has a corresponding <svg> element.
Tighten this up and remove some pointless null checks and type checks.
2013-09-13 Andreas Kling <akling@apple.com>
[CTTE] RenderSVGRoot always has a SVGSVGElement.
<https://webkit.org/b/121293>
Reviewed by Antti Koivisto.
This renderer is never anonymous, and always has a corresponding <svg> element.
Tighten this up and remove some pointless null checks and assertions.
2013-09-13 Andreas Kling <akling@apple.com>
Remove support for anonymous deprecated flexboxes.
<https://webkit.org/b/121288>
Reviewed by Antti Koivisto.
There are no remaining internal clients of RenderDeprecatedFlexibleBox,
Nuke a FIXME from r143643 where the move to basing renderers on new flexbox started.
This was the only user of anonymous deprecated flexbox, so removed the ability to
construct those.
Also removed some Chrome-related feature observation gunk from constructor.
2013-09-13 Andreas Kling <akling@apple.com>
[CTTE] RenderMultiColumnBlock is never anonymous.
<https://webkit.org/b/121292>
Reviewed by Antti Koivisto.
Hide element() and provide existingElement() instead, returning an Element&.
2013-09-13 Andreas Kling <akling@apple.com>
[CTTE] RenderGrid is never anonymous.
<https://webkit.org/b/121290>
Reviewed by Antti Koivisto.
Hide element() and provide existingElement() instead, returning an Element&.
2013-09-13 Andreas Kling <akling@apple.com>
[CTTE] RenderTableCaption is never anonymous.
<https://webkit.org/b/121289>
Reviewed by Antti Koivisto.
Hide element() and provide existingElement() instead, returning an Element&.
2013-09-13 Andreas Kling <akling@apple.com>
[CTTE] RenderTableCol is never anonymous.
<https://webkit.org/b/121286>
Reviewed by Antti Koivisto.
Hide element() and provide existingElement() instead, returning an Element&.
Removed one bogus null check that was exposed.
2013-09-13 Andreas Kling <akling@apple.com>
[CTTE] RenderListItem is never anonymous.
<https://webkit.org/b/121285>
Reviewed by Antti Koivisto.
Hide element() and provide existingElement() instead, returning an Element&.
Removed some bogus assertions that were exposed by this.
2013-09-13 Andreas Kling <akling@apple.com>
[CTTE] Tighter element types for RenderSVGInline and subclasses.
<https://webkit.org/b/121283>
Reviewed by Antti Koivisto.
Codify the following:
- RenderSVGInline always has an SVGGraphicsElement.
- RenderSVGTextPath always has an SVGTextPathElement.
- RenderSVGTSpan always has an SVGTextPositioningElement.
None of these renderers are ever anonymous, so delete element() and provide
strongly typed reference getters instead.
2013-09-13 Andreas Kling <akling@apple.com>
[CTTE] RenderFileUploadControl always has a HTMLInputElement.
<https://webkit.org/b/121278>
Reviewed by Darin Adler.
RenderFileUploadControl is never anonymous and always has a corresponding HTMLInputElement.
2013-09-13 Andreas Kling <akling@apple.com>
[CTTE] RenderFieldset always has a HTMLFieldSetElement.
<https://webkit.org/b/121277>
Reviewed by Darin Adler.
RenderFieldset is never anonymous and always has a corresponding HTMLFieldSetElement.
2013-09-13 Andreas Kling <akling@apple.com>
[CTTE] RenderButton always has a HTMLFormControlElement.
<https://webkit.org/b/121281>
Reviewed by Antti Koivisto.
RenderButton is never anonymous and has either a <button> or an <input> element,
and their nearest shared ancestor is HTMLFormControlElement.
2013-09-13 Darin Adler <darin@apple.com>
Give actions in Range class NON_SHOUTING_NAMES
https://bugs.webkit.org/show_bug.cgi?id=121280
Reviewed by Andreas Kling.
* dom/Range.cpp:
(WebCore::Range::deleteContents):
(WebCore::Range::processContents):
(WebCore::Range::processContentsBetweenOffsets):
(WebCore::Range::processNodes):
(WebCore::Range::processAncestorsAndTheirSiblings):
(WebCore::Range::extractContents):
(WebCore::Range::cloneContents):
* dom/Range.h:
Just let do-webcore-rename do its thing.
- DELETE_CONTENTS -> Delete
- EXTRACT_CONTENTS -> Extract
- CLONE_CONTENTS -> Clone
2013-09-12 Santosh Mahto <santosh.ma@samsung.com>
[EFL]Background Style of element not visible because of default theme style
https://bugs.webkit.org/show_bug.cgi?id=117405
Reviewed by Gyuyoung Kim.
When select element is styled with css background property(color/image) the styling
gets hidden by Combo box non transparent image. This patch handle the
case and transparent images are used when select image is styled. So
now background-color and background-image are visible across the Combo box
The code is added to support css styling of other theme control,
Basically an extra signal is emitted to edje which change the state
of edje object whenever the control is styled.
Covered by existing test case, updated the test expected image.
* platform/efl/DefaultTheme/CMakeLists.txt:
* platform/efl/DefaultTheme/widget/combo/combo.edc:
* platform/efl/DefaultTheme/widget/combo/combo_focus_button_transparent.png: Added.
* platform/efl/DefaultTheme/widget/combo/combo_focus_transparent.png: Added.
* platform/efl/DefaultTheme/widget/combo/combo_hover_button_transparent.png: Added.
* platform/efl/DefaultTheme/widget/combo/combo_hover_transparent.png: Added.
* platform/efl/DefaultTheme/widget/combo/combo_normal_button_transparent.png: Added.
* platform/efl/DefaultTheme/widget/combo/combo_normal_transparent.png: Added.
* platform/efl/DefaultTheme/widget/combo/combo_press_button_transparent.png: Added.
* platform/efl/DefaultTheme/widget/combo/combo_press_transparent.png: Added.
* platform/efl/RenderThemeEfl.cpp:
(WebCore::RenderThemeEfl::applyEdjeStateFromForm):
(WebCore::RenderThemeEfl::isControlStyled):
(WebCore::RenderThemeEfl::paintThemePart):
* platform/efl/RenderThemeEfl.h:
2013-09-12 Andreas Kling <akling@apple.com>
[CTTE] RenderMenuList always has a HTMLSelectElement.
<https://webkit.org/b/121276>
Reviewed by Anders Carlsson.
This renderer is never anonymous and always has a corresponding HTMLSelectElement.
Deleted element() in favor of HTMLSelectElement& selectElement().
2013-09-12 Andreas Kling <akling@apple.com>
[CTTE] Tighten RenderTextControl element typing.
<https://webkit.org/b/121275>
Reviewed by Anders Carlsson.
Codify these invariants:
- RenderTextControl always has a HTMLTextFormControl.
- RenderSearchField always has a HTMLInputElement.
- RenderTextControlSingleLine always has a HTMLInputElement.
None of these renderers are ever anonymous. Deleted element() and added
strongly typed reference getters instead.
2013-09-12 Andreas Kling <akling@apple.com>
[CTTE] RenderListMarker is always anonymous and owned by RenderListItem.
<https://webkit.org/b/121274>
Reviewed by Anders Carlsson.
Store a RenderListItem& instead of a pointer in RenderListMarker.
Deleted the element() function since list markers are always anonymous.
2013-09-12 Andreas Kling <akling@apple.com>
[CTTE] RenderListBox's element is always a HTMLSelectElement.
<https://webkit.org/b/121273>
Reviewed by Anders Carlsson.
Hide element() on RenderListBox and make selectElement() return a reference
since this renderer cannot be anonymous.
2013-09-12 Andreas Kling <akling@apple.com>
[CTTE] RenderHTMLCanvas's element is always a HTMLCanvasElement.
<https://webkit.org/b/121272>
Reviewed by Anders Carlsson.
Add RenderHTMLCanvas::canvasElement(), hiding element().
This function also returns a reference since this renderer cannot be anonymous.
2013-09-12 Andreas Kling <akling@apple.com>
[CTTE] RenderTextControlMultiLine's element is always a HTMLTextAreaElement.
<https://webkit.org/b/121271>
Reviewed by Anders Carlsson.
Add RenderTextControlMultiLine::textAreaElement(), hiding element().
This function also returns a reference since this renderer cannot be anonymous.
2013-09-12 Tim Horton <timothy_horton@apple.com>
[mac] Cache rendered image in PDFDocumentImage
https://bugs.webkit.org/show_bug.cgi?id=121207
Reviewed by Simon Fraser.
Tests: fast/images/pdf-as-image-too-big.html
* loader/cache/CachedImage.cpp:
(WebCore::CachedImage::createImage):
PDFDocumentImage takes a ImageObserver now so that it can report
decoded data size changes to the memory cache.
* platform/graphics/Image.h:
(WebCore::Image::isPDFDocumentImage): Added.
* platform/graphics/cg/PDFDocumentImage.cpp:
(WebCore::PDFDocumentImage::PDFDocumentImage):
PDFDocumentImage takes a ImageObserver now so that it can report
decoded data size changes to the memory cache.
(WebCore::PDFDocumentImage::applyRotationForPainting):
Fix up some comments, and use GraphicsContext instead of CG API.
(WebCore::PDFDocumentImage::cacheParametersMatch):
Determine whether our cached image is still valid, given the new
destination's size, CTM scale, and source rect.
(WebCore::transformContextForPainting): Added.
(WebCore::PDFDocumentImage::updateCachedImageIfNeeded):
Cache a rendered bitmap of the PDF. Invalidate the cache if cacheParametersMatch
decides that the parameters don't match, unless we're painting in low quality mode,
in which case we'll scale the existing image (and then fully repaint when the
high-quality repaint timer fires).
Inform the memory cache of our new size.
(WebCore::PDFDocumentImage::draw):
Update the cached image if needed.
Paint the cached image into the context if it's available (which it might not be,
if the image is way too big and the allocation fails). Otherwise, paint straight
into the context as we previously did.
(WebCore::PDFDocumentImage::destroyDecodedData):
Throw away the cached image if requested.
(WebCore::PDFDocumentImage::decodedSize):
(WebCore::PDFDocumentImage::drawPDFPage):
Drive-by use GraphicsContext instead of CG directly.
* platform/graphics/cg/PDFDocumentImage.h:
(WebCore::PDFDocumentImage::create):
Override isPDFDocumentImage().
Add storage for the cached image buffer and various cache parameters.
* rendering/ImageQualityController.cpp:
(WebCore::ImageQualityController::shouldPaintAtLowQuality):
PDFDocumentImage is also interested in/capable of low-quality painting now.
2013-09-12 Tim Horton <timothy_horton@apple.com>
Image doesn't always repaint at high quality in all tiles after a live resize
https://bugs.webkit.org/show_bug.cgi?id=121244
Reviewed by Darin Adler.
Currently, ImageQualityController removes an image from its low-quality-images
list from inside shouldPaintAtLowQuality, if this is the first paint outside
of a live resize, but does not force the renderer to repaint in its entirety.
However, there's no guarantee we've invalidated the whole renderer, so this can
leave some parts of the image painted in low-quality.
This just removes a short-circuit, instead using the ordinary high-quality-repaint
timer to ensure that the entire renderer is repainted.
No new test; all attempts have failed, as this depends on tiled drawing
and a live resize occurring.
* rendering/ImageQualityController.cpp:
(WebCore::ImageQualityController::shouldPaintAtLowQuality):
2013-09-12 Brent Fulgham <bfulgham@apple.com>
[EFL] Speculative build fix after r155638.
* platform/efl/PasteboardEfl.cpp: Add include for PassRefPtr, which
is no longer implicitly included.
2013-09-12 Simon Fraser <simon.fraser@apple.com>
Avoid extra scrollbar-related layouts for overlay scrollbars
https://bugs.webkit.org/show_bug.cgi?id=121267
Reviewed by Beth Dakin.
If ScrollView::updateScrollbars() detected that scrollbars were added
and removed, it would call contentsResized(), which calls setNeedsLayout(),
followed by visibleContentsResized() which would trigger layout. There is no
point doing this with overlay scrollbars, so avoid it by having
setHas*Scrollbar() return true if the addition/removal of a scrollbar changed
the available width.
No tests: we can't test overlay scrollbars in tests.
* page/FrameView.cpp:
(WebCore::FrameView::setContentsSize): Drive-by assertion that
checks that the unsigned m_deferSetNeedsLayouts doesn't wrap when
decremented.
* platform/ScrollView.cpp:
(WebCore::ScrollView::setHasHorizontalScrollbar): Return true if the addition/removal
changed available space.
(WebCore::ScrollView::setHasVerticalScrollbar): Ditto.
(WebCore::ScrollView::updateScrollbars): Only set sendContentResizedNotification
if available space was changed by addition/removal of scrollbars.
* platform/ScrollView.h:
2013-09-12 Zoltan Horvath <zoltan@webkit.org>
[CSS Shapes] Rename shapeContainingBlockHeight to shapeContainingBlockLogicalHeight
https://bugs.webkit.org/show_bug.cgi?id=121252
Reviewed by Oliver Hunt.
No new tests, no behavior change.
* rendering/RenderBlockLineLayout.cpp:
(WebCore::pushShapeContentOverflowBelowTheContentBox):
* rendering/shapes/ShapeInfo.h:
(WebCore::ShapeInfo::shapeContainingBlockLogicalHeight):
2013-09-12 Samuel White <samuel_white@apple.com>
<meter> element AXValue is listed as a writable value
https://bugs.webkit.org/show_bug.cgi?id=117650
Reviewed by Chris Fleizach.
No new tests, updated existing accessibility/meter-element.html test
to check writability. Changed meter element value to be unwritable.
* accessibility/AccessibilityRenderObject.cpp:
(WebCore::AccessibilityRenderObject::canSetValueAttribute):
2013-09-12 Renata Hodovan <reni@webkit.org>
[Qt] SHOULD NEVER BE REACHED is touched WebCore::InputType::createStepRange
https://bugs.webkit.org/show_bug.cgi?id=121148
Reviewed by Kent Tamura.
Non-steppable input types must not rendered as slider even if its webkit-apperance style
property is set to slider-vertical/horizontal.
Test: platform/qt/fast/forms/range/slider-crash-on-input.html
* platform/qt/RenderThemeQStyle.cpp:
(WebCore::RenderThemeQStyle::paintSliderTrack):
2013-09-12 Ryosuke Niwa <rniwa@webkit.org>
Qt and Windows build fix.
* page/animation/CSSPropertyAnimation.cpp:
2013-09-11 Ryosuke Niwa <rniwa@webkit.org>
Encapsulate globals in CSSPropertyAnimation.cpp
https://bugs.webkit.org/show_bug.cgi?id=121205
Reviewed by Antti Koivisto.
Encapsulated the globals inside a newly added CSSPropertyAnimationWrapperMap. Also removed the circular
dependency from ShorthandPropertyWrapper's constructor to CSSPropertyAnimationWrapperMap::instance().
The circular dependency still exists in ensurePropertyMap but I'm going to remove it in the bug 121199.
* page/animation/CSSPropertyAnimation.cpp:
(WebCore::ShorthandPropertyWrapper::ShorthandPropertyWrapper): Takes a Vector of longhand wrappers instead of
calling wrapperForProperty in the middle of constructing the very table. This circular dependency is now
encapsulated in CSSPropertyAnimationWrapperMap::ensurePropertyMap.
(WebCore::CSSPropertyAnimationWrapperMap::instance): Added.
(WebCore::CSSPropertyAnimationWrapperMap::wrapperForProperty): Renamed from WebCore::wrapperForProperty.
(WebCore::CSSPropertyAnimationWrapperMap::wrapperForIndex): Added.
(WebCore::CSSPropertyAnimationWrapperMap::size): Added.
(WebCore::CSSPropertyAnimationWrapperMap::addPropertyWrapper): Renamed from WebCore::addPropertyWrapper. Also
cleaned up boolean logics to use early exits instead of nested ifs.
(WebCore::CSSPropertyAnimationWrapperMap::addShorthandProperties): Renamed from WebCore::addShorthandProperties.
(WebCore::CSSPropertyAnimationWrapperMap::ensurePropertyMap): Renamed from WebCore::ensurePropertyMap.
Added an alias gPropertyWrappers for m_propertyWrappers; this aliasing will be removed in the bug 121199.
(WebCore::CSSPropertyAnimation::blendProperties):
(WebCore::CSSPropertyAnimation::animationOfPropertyIsAccelerated):
(WebCore::CSSPropertyAnimation::animatableShorthandsAffectingProperty):
(WebCore::CSSPropertyAnimation::propertiesEqual):
(WebCore::CSSPropertyAnimation::getPropertyAtIndex):
(WebCore::CSSPropertyAnimation::getNumProperties):
* page/animation/CSSPropertyAnimation.h:
* rendering/style/RenderStyle.h:
2013-09-12 Anders Carlsson <andersca@apple.com>
SharedBuffer::createNSData should return a RetainPtr<NSData>
https://bugs.webkit.org/show_bug.cgi?id=121237
Reviewed by Darin Adler.
This makes memory management cleared and fixes a leak in PDFDocumentImage::createPDFDocument.
We use a RetainPtr subclass as a stopgap measure to prevent code that does [buffer->createNSData() autorelease]
from compiling and crashing due to the NSData object being overreleased.
* loader/ResourceBuffer.h:
* loader/mac/ResourceBuffer.mm:
(WebCore::ResourceBuffer::createNSData):
* platform/SharedBuffer.h:
(WebCore::SharedBuffer::NSDataRetainPtr::NSDataRetainPtr):
* platform/graphics/mac/PDFDocumentImageMac.mm:
(WebCore::PDFDocumentImage::createPDFDocument):
* platform/mac/HTMLConverter.mm:
(-[WebHTMLConverter _addAttachmentForElement:URL:needsParagraph:usePlaceholder:]):
(fileWrapperForURL):
* platform/mac/PasteboardMac.mm:
(WebCore::fileWrapper):
(WebCore::Pasteboard::read):
(WebCore::documentFragmentWithRTF):
(WebCore::fragmentFromWebArchive):
* platform/mac/PlatformPasteboardMac.mm:
(WebCore::PlatformPasteboard::setBufferForType):
* platform/mac/SharedBufferMac.mm:
(WebCore::SharedBuffer::createNSData):
2013-09-12 Timothy Hatcher <timothy@apple.com>
Remove more Timeline stuff we don't use
https://bugs.webkit.org/show_bug.cgi?id=121246
Reviewed by Joseph Pecoraro.
* inspector/InspectorController.cpp:
* inspector/InspectorController.h:
* inspector/InspectorDOMDebuggerAgent.cpp:
* inspector/InspectorDOMDebuggerAgent.h:
* inspector/InspectorProfilerAgent.cpp:
(WebCore::InspectorProfilerAgent::InspectorProfilerAgent):
* inspector/InspectorProfilerAgent.h:
* inspector/InspectorTimelineAgent.cpp:
(WebCore::InspectorTimelineAgent::innerAddRecordToTimeline):
* inspector/InspectorTimelineAgent.h:
2013-09-12 Christophe Dumez <ch.dumez@sisa.samsung.com>
[EFL] Get rid of layering violations in PasteboardEfl.cpp
https://bugs.webkit.org/show_bug.cgi?id=121241
Reviewed by Darin Adler.
Get rid of layering violations in PasteboardEfl.cpp. For now, just mimic
the Mac port to avoid divergences and leave port-specific functions
unimplemented as the EFL port does not support the pasteboard functionality
yet.
No new tests, no behavior change.
* PlatformEfl.cmake:
* editing/Editor.cpp:
(WebCore::Editor::pasteAsPlainTextWithPasteboard):
(WebCore::Editor::cut):
(WebCore::Editor::copy):
(WebCore::Editor::copyURL):
(WebCore::Editor::copyImage):
* editing/Editor.h:
* editing/efl/EditorEfl.cpp: Added.
(WebCore::Editor::writeSelectionToPasteboard):
(WebCore::Editor::writeURLToPasteboard):
(WebCore::Editor::writeImageToPasteboard):
(WebCore::Editor::readPlainTextFromPasteboard):
(WebCore::Editor::pasteWithPasteboard):
* page/DragController.cpp:
(WebCore::DragController::startDrag):
* platform/Pasteboard.h:
* platform/efl/PasteboardEfl.cpp:
2013-09-12 Alberto Garcia <berto@igalia.com>
[GTK] Unreviewed build fix after r155635.
Include DragData.h
* platform/gtk/PasteboardGtk.cpp:
2013-09-12 Brent Fulgham <bfulgham@apple.com>
[Windows] Build fix after r155635.
Rubber Stamped by Darin Adler.
* platform/Pasteboard.h: Add missing compile guards for Windows port.
2013-09-12 Darin Adler <darin@apple.com>
Reorganize Pasteboard.h to make it easier to read, and express plan for future work
https://bugs.webkit.org/show_bug.cgi?id=121234
Reviewed by Anders Carlsson.
* platform/Pasteboard.h: Move Mac/iOS-specific pasteboard names to the bottom of the
file rather than putting them up with forward declarations before the class. Removed
unneeded forward class declarations. Changed #if statements about migration to the
more modern non-layering-violation API to list platforms not yet migrated, rather than
listing platforms that have migrated (Mac). Move conditional code down below the
uncondiditional code so it's easier to see what the class is doing. Move layering-
violation code down to the bottom too, so it's easier to see the future class without
having the design mistakes mixed in. Sort platform-specific sections in alphabetical
order instead of random order. Did the destructor in a cleaner way so the #if is out
of the way after the class rather than in the class. Removed WebSmartPastePboardType,
WebURLPboardType, and WebURLsWithTitlesPboard declarations, since they are only used
inside the PasteboardMac.mm source file.
* platform/ios/PasteboardIOS.mm: Aded a FIXME comment.
* platform/mac/PasteboardMac.mm: Made the constants for pasteboard types be actual
constants, rather than global variables.
2013-09-12 Tamas Czene <tczene@inf.u-szeged.hu>
[curl] Use utf8 for headers in CurlDownload.
https://bugs.webkit.org/show_bug.cgi?id=120413
Reviewed by Brent Fulgham.
* platform/network/curl/CurlDownload.cpp:
(WebCore::CurlDownload::headerCallback):
2013-09-12 Peter Gal <galpeter@inf.u-szeged.hu>
[curl] Improve multipart response handling
https://bugs.webkit.org/show_bug.cgi?id=117735
Reviewed by Brent Fulgham.
The multipart/x-mixed-replace mime type in responses are ignored
with the curl network backend. To handle such responses the
MultipartHandle is introduced which will split the content using
the boundary specified by the mime type.
There are already existing tests (http/tests/multipart).
* WebCore.vcxproj/WebCore.vcxproj:
* WebCore.vcxproj/WebCore.vcxproj.filters:
* platform/network/HTTPParsers.cpp:
(WebCore::parseHTTPHeader):
* platform/network/HTTPParsers.h:
* platform/network/ResourceHandleInternal.h:
* platform/network/curl/MultipartHandle.cpp: Added.
(WebCore::MultipartHandle::extractBoundary):
(WebCore::MultipartHandle::matchForBoundary):
(WebCore::MultipartHandle::checkForBoundary):
(WebCore::MultipartHandle::parseHeadersIfPossible):
(WebCore::MultipartHandle::contentReceived):
(WebCore::MultipartHandle::processContent):
(WebCore::MultipartHandle::contentEnded):
(WebCore::MultipartHandle::didReceiveData):
(WebCore::MultipartHandle::didReceiveResponse):
* platform/network/curl/MultipartHandle.h: Added.
(WebCore::MultipartHandle::MultipartHandle):
(WebCore::MultipartHandle::~MultipartHandle):
* platform/network/curl/ResourceHandleManager.cpp:
(WebCore::writeCallback):
(WebCore::headerCallback):
(WebCore::ResourceHandleManager::downloadTimerCallback):
2013-09-12 Andreas Kling <akling@apple.com>
Remove RenderApplet.
<https://webkit.org/b/121231>
Reviewed by Darin Adler.
Add a RenderEmbeddedObject::createForApplet(HTMLAppletElement&) and nuke
the RenderApplet class from orbit.
2013-09-12 Brent Fulgham <bfulgham@apple.com>
[Windows] Build fix after r155621
Rubber-stamped by Anders Carlsson.
See also https://bugs.webkit.org/show_bug.cgi?id=121235 for
why this was necessary.
* css/MediaQueryEvaluator.cpp: Work around VS compiler bug.
* dom/make_names.pl: Ditto.
* loader/archive/ArchiveFactory.cpp: Ditto.
* rendering/svg/SVGPathData.cpp: Ditto.
2013-09-12 Anders Carlsson <andersca@apple.com>
SharedBuffer::createCFData should return RetainPtr<CFDataRef>
https://bugs.webkit.org/show_bug.cgi?id=121230
Reviewed by Darin Adler.
* loader/ResourceBuffer.cpp:
(WebCore::ResourceBuffer::createCFData):
* loader/ResourceBuffer.h:
* loader/archive/cf/LegacyWebArchive.cpp:
(WebCore::LegacyWebArchive::createPropertyListRepresentation):
(WebCore::LegacyWebArchive::create):
* platform/SharedBuffer.h:
* platform/cf/SharedBufferCF.cpp:
(WebCore::SharedBuffer::createCFData):
* platform/graphics/cg/ImageSourceCG.cpp:
(WebCore::ImageSource::setData):
* platform/graphics/cg/PDFDocumentImage.cpp:
(WebCore::PDFDocumentImage::createPDFDocument):
* platform/graphics/mac/FontCustomPlatformData.cpp:
(WebCore::createFontCustomPlatformData):
* platform/mac/SharedBufferMac.mm:
(WebCore::SharedBuffer::createCFData):
2013-09-12 Zoltan Horvath <zoltan@webkit.org>
Move LineInfo class into LineInfo.h
https://bugs.webkit.org/show_bug.cgi?id=121191
Reviewed by David Hyatt.
No new tests, no behavior change.
* GNUmakefile.list.am:
* Target.pri:
* WebCore.vcxproj/WebCore.vcxproj:
* WebCore.xcodeproj/project.pbxproj:
* rendering/LineInfo.h: Added.
(WebCore::LineInfo::LineInfo):
(WebCore::LineInfo::isFirstLine):
(WebCore::LineInfo::isLastLine):
(WebCore::LineInfo::isEmpty):
(WebCore::LineInfo::previousLineBrokeCleanly):
(WebCore::LineInfo::floatPaginationStrut):
(WebCore::LineInfo::runsFromLeadingWhitespace):
(WebCore::LineInfo::resetRunsFromLeadingWhitespace):
(WebCore::LineInfo::incrementRunsFromLeadingWhitespace):
(WebCore::LineInfo::setFirstLine):
(WebCore::LineInfo::setLastLine):
(WebCore::LineInfo::setEmpty):
(WebCore::LineInfo::setPreviousLineBrokeCleanly):
(WebCore::LineInfo::setFloatPaginationStrut):
* rendering/RenderBlockLineLayout.cpp:
2013-09-12 Bem Jones-Bey <bjonesbe@adobe.com>
[CSS Shapes] Remove unnecessarily complex template from ShapeInfo classes
https://bugs.webkit.org/show_bug.cgi?id=121213
Reviewed by Darin Adler.
These classes were trying to be way too clever, and as a result were
hard to read and hard to debug. Replace the complex templated method
calls with virtual methods to make these classes much easier to
understand and maintain.
No new tests, no behavior change.
* rendering/shapes/ShapeInfo.cpp:
(WebCore::::computedShape):
(WebCore::::computeSegmentsForLine):
* rendering/shapes/ShapeInfo.h:
* rendering/shapes/ShapeInsideInfo.cpp:
(WebCore::ShapeInsideInfo::getShapeValue):
* rendering/shapes/ShapeInsideInfo.h:
(WebCore::ShapeInsideInfo::computeSegmentsForLine):
(WebCore::ShapeInsideInfo::ShapeInsideInfo):
* rendering/shapes/ShapeOutsideInfo.cpp:
(WebCore::ShapeOutsideInfo::computeSegmentsForLine):
(WebCore::ShapeOutsideInfo::getShapeValue):
* rendering/shapes/ShapeOutsideInfo.h:
(WebCore::ShapeOutsideInfo::ShapeOutsideInfo):
2013-09-12 Zoltan Horvath <zoltan@webkit.org>
[CSS Shapes] Turn shape's logicalwidth/height into a LayoutSize
https://bugs.webkit.org/show_bug.cgi?id=121187
Reviewed by David Hyatt.
No new tests, no behavior change.
* rendering/shapes/ShapeInfo.cpp:
(WebCore::::computedShape):
* rendering/shapes/ShapeInfo.h:
(WebCore::ShapeInfo::setShapeSize):
(WebCore::ShapeInfo::shapeContainingBlockHeight):
2013-09-12 Darin Adler <darin@apple.com>
Move layering-violating code from Pasteboard::plainText into Editor (Mac only at first)
https://bugs.webkit.org/show_bug.cgi?id=121075
Reviewed by Anders Carlsson.
* editing/Editor.cpp:
(WebCore::Editor::pasteAsPlainTextBypassingDHTML): Pass pasteboard as a reference.
(WebCore::Editor::pasteAsPlainTextWithPasteboard): Use readPlainTextFromPasteboard
for Mac. Also update to take a reference.
(WebCore::Editor::paste): Pass pasteboard as a reference.
(WebCore::Editor::pasteAsPlainText): Ditto.
* editing/Editor.h: Ditto.
* editing/mac/EditorMac.mm:
(WebCore::Editor::readSelectionFromPasteboard): Pass pasteboard as a reference.
(WebCore::Editor::readPlainTextFromPasteboard): Added. The declaration of this
was added (by mistake) in an earlier patch. This has code that used to be inside
Pasteboard::plainText.
* platform/Pasteboard.h: Added PasteboardPlainText. Reorganized functions in the
Pasteboard class and added some FIXMEs. Sorted platforms alphabetically and grouped
functions together and data members separate from them.
* platform/mac/DragDataMac.mm:
(WebCore::DragData::asPlainText): Updated to call readPlainTextFromPasteboard.
(WebCore::DragData::asURL): Tweaked style of unused parameter.
* platform/mac/PasteboardMac.mm:
(WebCore::Pasteboard::read): Renamed this from plainText, and refactored so that
the data goes out in the PasteboardPlainText structure.
2013-09-12 Gurpreet Kaur <k.gurpreet@samsung.com>
CSS Unit vw in border-width maps to 0px.
https://bugs.webkit.org/show_bug.cgi?id=109229
Reviewed by Darin Adler.
Border and outline properties were not applied incase
its values were given in vh/vw units.
Tests: fast/css/viewport-height-border.html
fast/css/viewport-height-outline.html
fast/css/viewport-width-border.html
fast/css/viewport-width-outline.html
* css/CSSPrimitiveValue.cpp:
(WebCore::CSSPrimitiveValue::computeLengthDouble):
Added case CSS_VH and CSS_VW.
* css/CSSPrimitiveValue.h:
(WebCore::CSSPrimitiveValue::isViewportPercentageWidth):
(WebCore::CSSPrimitiveValue::isViewportPercentageHeight):
Added APIs to check the unit type(CSS_VW and CSS_VH).
* css/DeprecatedStyleBuilder.cpp:
(WebCore::ApplyPropertyComputeLength::applyValue):
Calculating the border values which has been specified
in vh/vw units.The vh/vw units are calcultated as percent
of viewport height and viewport width respectively.
2013-09-12 Jocelyn Turcotte <jocelyn.turcotte@digia.com>
[Coordinated Graphics] Fix the build on MacOS 10.9
https://bugs.webkit.org/show_bug.cgi?id=121225
Reviewed by Darin Adler.
* platform/graphics/surfaces/mac/GraphicsSurfaceMac.cpp:
2013-09-12 Mark Lam <mark.lam@apple.com>
Change debug hooks to pass sourceID and position info via the DebuggerCallFrame.
https://bugs.webkit.org/show_bug.cgi?id=121214.
Reviewed by Geoffrey Garen.
No new tests.
Also changed the Inspector's JavaScriptCallFrame to get the sourceID and
position info from its DebuggerCallFrame instead of caching those values.
* bindings/js/JavaScriptCallFrame.cpp:
(WebCore::JavaScriptCallFrame::JavaScriptCallFrame):
* bindings/js/JavaScriptCallFrame.h:
(WebCore::JavaScriptCallFrame::create):
(WebCore::JavaScriptCallFrame::invalidate):
(WebCore::JavaScriptCallFrame::sourceID):
(WebCore::JavaScriptCallFrame::position):
(WebCore::JavaScriptCallFrame::line):
(WebCore::JavaScriptCallFrame::column):
(WebCore::JavaScriptCallFrame::update):
* bindings/js/ScriptDebugServer.cpp:
(WebCore::ScriptDebugServer::createCallFrame):
(WebCore::ScriptDebugServer::updateCallFrameAndPauseIfNeeded):
(WebCore::ScriptDebugServer::callEvent):
(WebCore::ScriptDebugServer::atStatement):
(WebCore::ScriptDebugServer::returnEvent):
(WebCore::ScriptDebugServer::exception):
(WebCore::ScriptDebugServer::willExecuteProgram):
(WebCore::ScriptDebugServer::didExecuteProgram):
(WebCore::ScriptDebugServer::didReachBreakpoint):
* bindings/js/ScriptDebugServer.h:
* bindings/js/WorkerScriptDebugServer.cpp:
(WebCore::WorkerScriptDebugServer::willExecuteProgram):
* bindings/js/WorkerScriptDebugServer.h:
2013-09-12 peavo@outlook.com <peavo@outlook.com>
[WinCairo] Compile errors, missing include.
https://bugs.webkit.org/show_bug.cgi?id=121222
Reviewed by Brent Fulgham.
* platform/graphics/win/GlyphPageTreeNodeCairoWin.cpp: Include required header.
* platform/win/DragImageCairoWin.cpp: Include required header.
2013-09-12 Vivek Galatage <vivek.vg@samsung.com>
XMLSerializer.serializeToString() should throw exception for invalid node value.
https://bugs.webkit.org/show_bug.cgi?id=121209
Reviewed by Darin Adler.
FF and Opera 12 (pre blink/webkit) throw exception in case the node value is invalid.
Blink sends an empty string as the result of serializeToString operation with invalid node.
We should match with other browsers for throwing it as an exception.
Blink review URL: https://chromiumcodereview.appspot.com/23532055/
Test: fast/dom/xmlserializer-serialize-to-string-exception.html
* xml/XMLSerializer.cpp:
(WebCore::XMLSerializer::serializeToString):
2013-09-12 Zalan Bujtas <zalan@apple.com>
Crash in ScrollingStateStickyNode::updateConstraints
https://bugs.webkit.org/show_bug.cgi?id=119638
Reviewed by Simon Fraser.
Ensure when a scrolling state node is removed from the state tree,
we remove both the current node and all its children from the
associated m_stateNodeMap lookup table.
Test: fast/css/sticky/multiple-layers-sticky-crash.html
* page/scrolling/ScrollingStateNode.cpp:
(WebCore::ScrollingStateNode::removeChild):
(WebCore::ScrollingStateNode::willBeRemovedFromStateTree):
* page/scrolling/ScrollingStateNode.h:
2013-09-12 Zalan Bujtas <zalan@apple.com>
REGRESSION (r132516): Javascript menu text incorrectly disappearing and reappearing
https://bugs.webkit.org/show_bug.cgi?id=101047
Reviewed by Simon Fraser.
Compositing layers keep track of ancestors' clipping by constructing the RenderLayerBacking::m_ancestorClippingLayer.
It helps setting up the proper clipping context for the corresponding graphics layer.
When a RenderObject's clipping style changes, it needs to propagate this change not only
to the associated RenderLayer, but also to the descendants', if applicable.
Before r132516, it was mainly covered by initiating full style recalcs, which ensured that
style recalc on the descendant rendering tree took care of creating/destroying
RenderLayerBacking::m_ancestorClippingLayer at every compositing layer node. Without the full
recalc, the clipping of the compositing render layers and the corresponding render subtrees can get out of sync.
This patch updates the clipping context on the descendant subtree, when the clipping behaviour
changes on a render node.
Tests: compositing/overflow/clipping-behaviour-change-is-not-propagated-to-descendants.html
compositing/overflow/clipping-behaviour-change-is-not-propagated-to-descendants2.html
* rendering/RenderLayer.cpp:
(WebCore::RenderLayer::updateDescendantClippingContext):
(WebCore::RenderLayer::styleChanged):
* rendering/RenderLayer.h:
* rendering/RenderLayerBacking.cpp:
(WebCore::RenderLayerBacking::~RenderLayerBacking):
(WebCore::RenderLayerBacking::updateGraphicsLayerConfiguration):
(WebCore::RenderLayerBacking::updateAncestorClippingLayer):
(WebCore::RenderLayerBacking::updateDescendantClippingLayer):
* rendering/RenderLayerBacking.h:
2013-09-12 Mikhail Pozdnyakov <mikhail.pozdnyakov@intel.com>
Remove home-brewed nullptr
https://bugs.webkit.org/show_bug.cgi?id=119624
Reviewed by Anders Carlsson.
The standard C++11 nullptr and std::nullptr_t type should be used now.
* bindings/js/JSDOMBinding.h:
2013-09-12 Samuel White <samuel_white@apple.com>
<meter> element text value exposed as AXTitle; should be exposing AXValueDescription
https://bugs.webkit.org/show_bug.cgi?id=117651
Reviewed by Mario Sanchez Prada.
No new tests, updated accessibility/meter-element to handle platform specific output.
* accessibility/AccessibilityObject.cpp:
(WebCore::AccessibilityObject::isMeter):
* accessibility/AccessibilityObject.h:
* accessibility/mac/WebAccessibilityObjectWrapperMac.mm:
(-[WebAccessibilityObjectWrapper accessibilityAttributeValue:]):
2013-09-12 Santosh Mahto <santosh.ma@samsung.com>
class WeekInputType invokes wrong constructor
https://bugs.webkit.org/show_bug.cgi?id=120768
Reviewed by Andreas Kling.
Correcting wrong constuctor invocation.
* html/WeekInputType.h:
(WebCore::WeekInputType::WeekInputType):
2013-09-12 Samuel White <samuel_white@apple.com>
AX: Self-referencing aria-labelledby only uses contents.
https://bugs.webkit.org/show_bug.cgi?id=120814
Reviewed by Mario Sanchez Prada.
Implemented additional 'Text Alternative Computation' steps documented at:
http://www.w3.org/WAI/PF/aria/complete#textalternativecomputation. This allows us to remove
our raw text node iteration that was previously forcing us to do our computation incorrectly.
Element content is now sourced using textUnderElement (step 2C of the computation).
Test: accessibility/self-referencing-aria-labelledby.html
* accessibility/AccessibilityNodeObject.cpp:
(WebCore::accessibleNameForNode):
(WebCore::AccessibilityNodeObject::accessibilityDescriptionForElements):
2013-09-12 Commit Queue <commit-queue@webkit.org>
Unreviewed, rolling out r155597.
http://trac.webkit.org/changeset/155597
https://bugs.webkit.org/show_bug.cgi?id=121220
broke windows build because there's no ews :( (Requested by
thorton on #webkit).
* WebCore.exp.in:
* platform/graphics/BitmapImage.cpp:
(WebCore::BitmapImage::isBitmapImage):
* platform/graphics/BitmapImage.h:
(WebCore::BitmapImage::create):
* platform/graphics/CrossfadeGeneratedImage.cpp:
(WebCore::CrossfadeGeneratedImage::CrossfadeGeneratedImage):
(WebCore::CrossfadeGeneratedImage::drawPattern):
* platform/graphics/CrossfadeGeneratedImage.h:
(WebCore::CrossfadeGeneratedImage::setContainerSize):
(WebCore::CrossfadeGeneratedImage::usesContainerSize):
(WebCore::CrossfadeGeneratedImage::hasRelativeWidth):
(WebCore::CrossfadeGeneratedImage::hasRelativeHeight):
(WebCore::CrossfadeGeneratedImage::size):
* platform/graphics/GeneratedImage.h:
(WebCore::GeneratedImage::hasSingleSecurityOrigin):
(WebCore::GeneratedImage::setContainerSize):
(WebCore::GeneratedImage::usesContainerSize):
(WebCore::GeneratedImage::hasRelativeWidth):
(WebCore::GeneratedImage::hasRelativeHeight):
(WebCore::GeneratedImage::size):
(WebCore::GeneratedImage::destroyDecodedData):
(WebCore::GeneratedImage::decodedSize):
* platform/graphics/GeneratorGeneratedImage.cpp:
(WebCore::GeneratorGeneratedImage::draw):
(WebCore::GeneratorGeneratedImage::drawPattern):
* platform/graphics/GeneratorGeneratedImage.h:
(WebCore::GeneratorGeneratedImage::GeneratorGeneratedImage):
* svg/graphics/SVGImage.h:
(WebCore::SVGImage::isSVGImage):
(WebCore::SVGImage::usesContainerSize):
(WebCore::SVGImage::destroyDecodedData):
(WebCore::SVGImage::decodedSize):
* svg/graphics/SVGImageForContainer.h:
(WebCore::SVGImageForContainer::destroyDecodedData):
(WebCore::SVGImageForContainer::decodedSize):
2013-09-12 Andreas Kling <akling@apple.com>
RenderWidget elements are always HTMLFrameOwnerElement subclasses.
<https://webkit.org/b/121217>
Reviewed by Antti Koivisto.
Make RenderWidget constructor take HTMLFrameOwnerElement* and update subclasses
with even tighter types where possible.
Also added RenderWidget::frameOwnerElement() and deleted element().
Removed a handful of unnecessary type checks that were exposed by this.
2013-09-11 Tim Horton <timothy_horton@apple.com>
Apply OVERRIDE and FINAL to Image subclasses and clean them up
https://bugs.webkit.org/show_bug.cgi?id=121086
Reviewed by Alexey Proskuryakov.
Everything other than the copious application of OVERRIDE and FINAL
is explicitly called out below.
* WebCore.exp.in:
Export the correct version of getCGImageRef for use by WebKit2.
* platform/graphics/BitmapImage.cpp:
* platform/graphics/BitmapImage.h:
Drive-by inline isBitmapImage.
Move create(HBITMAP) to be near the other create() functions.
Move all of the members and quite a few functions from protected to private.
Devirtualize frameCount().
Move notSolidColor() near the other solid color functions.
* platform/graphics/CrossfadeGeneratedImage.cpp:
(WebCore::CrossfadeGeneratedImage::CrossfadeGeneratedImage):
(WebCore::CrossfadeGeneratedImage::drawPattern):
* platform/graphics/GeneratorGeneratedImage.cpp:
(WebCore::GeneratorGeneratedImage::draw):
(WebCore::GeneratorGeneratedImage::drawPattern):
Use size() and setContainerSize() instead of directly accessing a
superclass' (now private, previously protected) members.
* platform/graphics/CrossfadeGeneratedImage.h:
* platform/graphics/GeneratedImage.h:
Make m_size private, I don't think we do protected members.
* platform/graphics/GeneratorGeneratedImage.h:
Make all the members private.
* svg/graphics/SVGImage.h:
* svg/graphics/SVGImageForContainer.h:
2013-09-11 Rashmi Shyamasundar <rashmi.s2@samsung.com>
Canvas fillText and measureText handle ideographic spaces differently
https://bugs.webkit.org/show_bug.cgi?id=108881
Reviewed by Darin Adler.
According to spec for text preparation algorithm
http://www.whatwg.org/specs/web-apps/current-work/multipage/the-canvas-element.html#text-preparation-algorithm
all the space characters mentioned in the spec
http://www.whatwg.org/specs/web-apps/current-work/multipage/common-microsyntaxes.html#space-character
should be replaced by U+0020 space character.
The canvas functions fillText and measureText should run the text preparation algorithm.
This patch modifies the canvas functions drawTextInternal and measureText to conform to the above spec.
Tests: fast/canvas/canvas-measureText-ideographicSpace.html
* html/canvas/CanvasRenderingContext2D.cpp:
(WebCore::shouldSpaceBeReplaced):
(WebCore::replaceCharacterInString):
(WebCore::CanvasRenderingContext2D::measureText):
(WebCore::CanvasRenderingContext2D::drawTextInternal):
2013-09-11 Andreas Kling <akling@apple.com>
Fix Windows build.
* rendering/RenderingAllInOne.cpp:
2013-09-11 Andreas Kling <akling@apple.com>
Merge RenderPart into RenderWidget.
<https://webkit.org/b/121200>
Reviewed by Anders Carlsson.
Remove the RenderPart class and move its functionality into RenderWidget.
It was acting as a pointless extra layer between RenderWidget and renderers
for embedded objects, frames and iframes.
2013-09-11 Geoffrey Garen <ggaren@apple.com>
Removed some unused functions from the debugger interface
https://bugs.webkit.org/show_bug.cgi?id=121194
Reviewed by Joseph Pecoraro.
We plan to use the "evaluate" API and debugger activation property access for all the features we need.
* inspector/JavaScriptCallFrame.idl: These are the interfaces I removed.
* bindings/js/JSJavaScriptCallFrameCustom.cpp:
* inspector/InjectedScript.cpp:
* inspector/InjectedScript.h:
* inspector/InjectedScriptSource.js:
* inspector/Inspector.json:
* inspector/InspectorDebuggerAgent.cpp:
(WebCore::InspectorDebuggerAgent::setScriptSource):
* inspector/InspectorDebuggerAgent.h:
* inspector/JavaScriptCallFrame.idl:
* inspector/front-end/RemoteObject.js:
(WebInspector.RemoteObject.prototype.):
(WebInspector.RemoteObject.prototype.setPropertyValue): These files are mechanical removals of code that used
or implemented the interfaces I removed.
2013-09-11 Vivek Galatage <vivek.vg@samsung.com>
DOMParser.parseFromString() should support creating HTML Document with mime-type text/html
https://bugs.webkit.org/show_bug.cgi?id=120826
Reviewed by Darin Adler.
The specification http://domparsing.spec.whatwg.org/#the-domparser-interface for DOMParser.parseFromString()
allows the document creation if the mimeType is one of the supported types:
["text/html", "text/xml", "application/xml", "application/xhtml+xml", "image/svg+xml"]
Also script elements get marked unexecutable and the contents of noscript get parsed as markup.
blink review URL: https://codereview.chromium.org/23903014/
Test: fast/dom/domparser-parsefromstring-mimetype-support.html
* xml/DOMParser.cpp:
(WebCore::DOMParser::parseFromString):
2013-09-11 Hans Muller <hmuller@adobe.com>
[CSS Shapes] Improve the performance of image valued shapes
https://bugs.webkit.org/show_bug.cgi?id=120211
Reviewed by Alexandru Chiculita.
Replaced the implementation of RasterShapeIntervals with one based on the
new ShapeInterval<int> class. This eliminates the dependency the Region class
and delivers a 10X layout speedup for large image valued shapes.
This a just an implementation refactoring, no new tests were needed.
* rendering/shapes/RasterShape.cpp:
(WebCore::RasterShapeIntervals::appendInterval): Renamed this method, it was called addInterval().
(WebCore::shapeIntervalsContain):
(WebCore::RasterShapeIntervals::contains):
(WebCore::RasterShapeIntervals::getIntervalsInLine):
(WebCore::compareX1):
(WebCore::RasterShapeIntervals::firstIncludedIntervalY):
(WebCore::RasterShapeIntervals::getIncludedIntervals):
(WebCore::RasterShapeIntervals::getExcludedIntervals):
(WebCore::RasterShape::getExcludedIntervals):
(WebCore::RasterShape::getIncludedIntervals):
* rendering/shapes/RasterShape.h:
(WebCore::RasterShapeIntervals::RasterShapeIntervals): The constructor now takes a size argument which is used to allocate IntShapeIntervals storage.
(WebCore::RasterShapeIntervals::size):
(WebCore::RasterShapeIntervals::bounds):
(WebCore::RasterShapeIntervals::isEmpty):
(WebCore::RasterShapeIntervals::getIntervals):
* rendering/shapes/Shape.cpp:
(WebCore::Shape::createShape): Use appendInterval() instead of addInterval() (see above) and the new RasterShapeIntervals constructor.
2013-09-11 Eric Carlson <eric.carlson@apple.com>
[MediaStream API] Updating NavigatorUserMediaError to match the spec
https://bugs.webkit.org/show_bug.cgi?id=120880
Reviewed by Darin Adler.
Merge https://chromium.googlesource.com/chromium/blink/+/f07305e49ddebaa166f5dee514bcc881a8efd341
by Tommy Widenflycht.
The Blink change did not have any test changes because they don't appear to have any tests
for NavigatorUserMediaError. I can't add tests now because the MediaStream feature isn't enabled
yet, so https://bugs.webkit.org/show_bug.cgi?id=121182 tracks adding tests.
* Modules/mediastream/NavigatorUserMediaError.h:
(WebCore::NavigatorUserMediaError::create):
(WebCore::NavigatorUserMediaError::name):
(WebCore::NavigatorUserMediaError::message):
(WebCore::NavigatorUserMediaError::constraintName):
(WebCore::NavigatorUserMediaError::NavigatorUserMediaError):
* Modules/mediastream/NavigatorUserMediaError.idl:
* Modules/mediastream/UserMediaRequest.cpp:
(WebCore::UserMediaRequest::fail):
(WebCore::UserMediaRequest::failConstraint):
* Modules/mediastream/UserMediaRequest.h:
2013-09-11 Thiago de Barros Lacerda <thiago.lacerda@openbossa.org>
MediaStream API: Remove LocalMediaStream
https://bugs.webkit.org/show_bug.cgi?id=120875
blink merge: https://chromium.googlesource.com/chromium/blink/+/81643ee3fe048a64fa8931132e1294fa2c8e821a
Reviewed by Eric Carlson.
Existing tests were updated.
* CMakeLists.txt:
* DerivedSources.make:
* GNUmakefile.list.am:
* Modules/mediastream/LocalMediaStream.cpp: Removed.
* Modules/mediastream/LocalMediaStream.h: Removed.
* Modules/mediastream/LocalMediaStream.idl: Removed.
* Modules/mediastream/MediaStream.cpp:
(WebCore::MediaStream::stop):
* Modules/mediastream/MediaStream.h:
* Modules/mediastream/MediaStream.idl:
* Modules/mediastream/NavigatorUserMediaSuccessCallback.h:
* Modules/mediastream/NavigatorUserMediaSuccessCallback.idl:
* Modules/mediastream/UserMediaRequest.cpp:
(WebCore::UserMediaRequest::succeed):
* Modules/mediastream/UserMediaRequest.h:
* Modules/webaudio/AudioContext.cpp:
(WebCore::AudioContext::createMediaStreamSource):
* Modules/webaudio/MediaStreamAudioDestinationNode.cpp:
(WebCore::MediaStreamAudioDestinationNode::MediaStreamAudioDestinationNode):
* WebCore.xcodeproj/project.pbxproj:
* dom/EventTarget.h:
* dom/EventTargetFactory.in:
* platform/mediastream/MediaStreamDescriptor.h:
2013-09-11 Timothy Hatcher <timothy@apple.com>
Remove PlatformInstrumentation since we don't show decode or resize in the new Web Inspector
https://bugs.webkit.org/show_bug.cgi?id=121181
Reviewed by Joseph Pecoraro.
* CMakeLists.txt:
* GNUmakefile.list.am:
* Target.pri:
* WebCore.order:
* WebCore.vcxproj/WebCore.vcxproj:
* WebCore.vcxproj/WebCore.vcxproj.filters:
* WebCore.xcodeproj/project.pbxproj:
* inspector/InspectorTimelineAgent.cpp:
(WebCore::InspectorTimelineAgent::willPaint):
(WebCore::InspectorTimelineAgent::didCompleteCurrentRecord):
(WebCore::InspectorTimelineAgent::InspectorTimelineAgent):
(WebCore::InspectorTimelineAgent::pushCurrentRecord):
(WebCore::InspectorTimelineAgent::clearRecordStack):
* inspector/InspectorTimelineAgent.h:
* platform/PlatformInstrumentation.cpp: Removed.
* platform/PlatformInstrumentation.h: Removed.
* platform/image-decoders/bmp/BMPImageDecoder.cpp:
(WebCore::BMPImageDecoder::frameBufferAtIndex):
* platform/image-decoders/gif/GIFImageDecoder.cpp:
(WebCore::GIFImageDecoder::frameBufferAtIndex):
* platform/image-decoders/ico/ICOImageDecoder.cpp:
(WebCore::ICOImageDecoder::frameBufferAtIndex):
* platform/image-decoders/jpeg/JPEGImageDecoder.cpp:
(WebCore::JPEGImageDecoder::frameBufferAtIndex):
* platform/image-decoders/png/PNGImageDecoder.cpp:
(WebCore::PNGImageDecoder::frameBufferAtIndex):
* platform/image-decoders/webp/WEBPImageDecoder.cpp:
(WebCore::WEBPImageDecoder::frameBufferAtIndex):
2013-09-11 Brent Fulgham <bfulgham@apple.com>
[Windows] Avoid converting from IntSize->SIZE->IntSize.
https://bugs.webkit.org/show_bug.cgi?id=121180
Reviewed by Anders Carlsson.
* platform/graphics/BitmapImage.h: Take const IntSize* as
argument, rather than LPSIZE.
* platform/graphics/Image.h: Ditto.
(WebCore::Image::getHBITMAPOfSize):
* platform/graphics/win/ImageCGWin.cpp:
(WebCore::BitmapImage::getHBITMAPOfSize): Use passed-in
IntSize, rather than converting from SIZE.
* platform/graphics/win/ImageCairoWin.cpp:
(WebCore::BitmapImage::getHBITMAPOfSize): Ditto.
2013-09-11 Zoltan Horvath <zoltan@webkit.org>
Unreviewed debug build fix after r155567.
* rendering/LineWidth.cpp:
(WebCore::LineWidth::LineWidth):
2013-09-11 Zoltan Horvath <zoltan@webkit.org>
Move LineWidth out of RenderBlockLineLayout
https://bugs.webkit.org/show_bug.cgi?id=121107
Reviewed by David Hyatt.
Move LineWidth class and related code into LineWidth.{h,cpp}.
No new tests, no behavior change.
* CMakeLists.txt:
* GNUmakefile.list.am:
* Target.pri:
* WebCore.vcxproj/WebCore.vcxproj:
* WebCore.xcodeproj/project.pbxproj:
* rendering/LineWidth.cpp: Added.
(WebCore::LineWidth::applyOverhang):
(WebCore::LineWidth::fitBelowFloats):
* rendering/LineWidth.h: Added.
(WebCore::logicalHeightForLine):
(WebCore::LineWidth::LineWidth):
(WebCore::LineWidth::fitsOnLine):
(WebCore::LineWidth::fitsOnLineIncludingExtraWidth):
(WebCore::LineWidth::fitsOnLineExcludingTrailingWhitespace):
(WebCore::LineWidth::currentWidth):
(WebCore::LineWidth::uncommittedWidth):
(WebCore::LineWidth::committedWidth):
(WebCore::LineWidth::availableWidth):
(WebCore::LineWidth::addUncommittedWidth):
(WebCore::LineWidth::commit):
(WebCore::LineWidth::setTrailingWhitespaceWidth):
(WebCore::LineWidth::shouldIndentText):
(WebCore::LineWidth::computeAvailableWidthFromLeftAndRight):
(WebCore::LineWidth::fitsOnLineExcludingTrailingCollapsedWhitespace):
(WebCore::LineWidth::updateAvailableWidth):
(WebCore::LineWidth::shrinkAvailableWidthForNewFloatIfNeeded):
* rendering/RenderBlockLineLayout.cpp:
2013-09-11 Ryosuke Niwa <rniwa@webkit.org>
HTMLEntityTable could use char to reduce binary size
https://bugs.webkit.org/show_bug.cgi?id=121176
Reviewed by Anders Carlsson.
Use LChar instead.
* html/parser/HTMLEntityParser.cpp:
(WebCore::HTMLEntityParser::consumeNamedEntity):
* html/parser/HTMLEntityTable.h:
(WebCore::HTMLEntityTableEntry::lastCharacter):
* html/parser/create-html-entity-table:
2013-09-11 Brent Fulgham <bfulgham@apple.com>
[Windows] Revise GDI Create Functions to use GDIObject Smart Pointer.
https://bugs.webkit.org/show_bug.cgi?id=121100
Reviewed by Anders Carlsson.
* platform/graphics/FontPlatformData.h: Use GDIObject instead of bare pointer.
* platform/graphics/win/FontCacheWin.cpp:
(WebCore::createGDIFont): No longer need to leak the pointer; use move semantic
to pass ownership to FontPlatformData.
(WebCore::FontCache::createFontPlatformData):
* platform/graphics/win/FontCustomPlatformData.cpp:
(WebCore::FontCustomPlatformData::fontPlatformData): Use move operation.
* platform/graphics/win/FontCustomPlatformDataCairo.cpp:
(WebCore::FontCustomPlatformData::fontPlatformData): Ditto.
* platform/graphics/win/FontPlatformDataCGWin.cpp:
(WebCore::FontPlatformData::FontPlatformData): Ditto.
* platform/graphics/win/FontPlatformDataCairoWin.cpp:
(WebCore::FontPlatformData::FontPlatformData): Ditto.
* platform/graphics/win/FontPlatformDataWin.cpp:
(WebCore::FontPlatformData::FontPlatformData): Ditto.
* platform/graphics/win/GlyphPageTreeNodeCairoWin.cpp:
(WebCore::GlyphPage::fill): Use HWndDC smart pointer instead of bare HDC.
* platform/graphics/win/SimpleFontDataWin.cpp:
(WebCore::SimpleFontData::platformCreateScaledFontData): Use move operation.
* platform/win/DragImageCGWin.cpp:
(WebCore::allocImage): Change to use GDIObject.
(WebCore::scaleDragImage): Use smart pointers to avoid manual deallocs.
(WebCore::createDragImageFromImage): Ditto.
* platform/win/DragImageCairoWin.cpp:
(WebCore::allocImage): Change to use GDIObject.
(WebCore::scaleDragImage): Use smart pointers to avoid manual deallocs.
(WebCore::createDragImageFromImage): Ditto.
* platform/win/DragImageWin.cpp:
(WebCore::createDragImageForLink): Update for GDIObject.
* platform/win/PopupMenuWin.cpp:
(WebCore::PopupMenuWin::PopupMenuWin): Switch to GDIObject.
(WebCore::PopupMenuWin::~PopupMenuWin): Remove uneeded deallocs.
(WebCore::PopupMenuWin::paint): Update for GDIObject.
* platform/win/PopupMenuWin.h: Use smart pointers instead of bare GDI objects.
2013-09-11 Patrick Gansterer <paroga@webkit.org>
Fix animations with !USE(ACCELERATED_COMPOSITING) after r147792.
https://bugs.webkit.org/show_bug.cgi?id=121159
Reviewed by Simon Fraser.
CSSPropertyAnimation::blendProperties() is available always
and needs to be called to make the animations work.
* page/animation/ImplicitAnimation.cpp:
(WebCore::ImplicitAnimation::animate):
* page/animation/KeyframeAnimation.cpp:
(WebCore::KeyframeAnimation::animate):
2013-09-11 David Hyatt <hyatt@apple.com>
Move all collapsing margin code out of RenderBlock and into RenderBlockFlow.
https://bugs.webkit.org/show_bug.cgi?id=121049
Reviewed by Dean Jackson.
This patch begins the migration of the rare data struct of RenderBlock into
RenderBlockFlow. During this process we will temporarily have rare data structs
in both places, but ultimately all of the members are going to move down into
RenderBlockFlow, and if any don't, they will get forced into a hash.
For this patch, the margin information is being shifted out of RenderBlock and into
RenderBlockFlow. Any functions that refer to MarginValues or to MarginInfo also got
moved down into RenderBlockFlow. Most of block child layout is now in RenderBlockFlow
after this patch.
Note that in many cases the code didn't simply move. There is some type tightening
that happened as well, i.e., places that look for RenderBlock can now look for
RenderBlockFlow instead and let RenderBlock execute the base RenderBox functions.
* rendering/RenderBlock.cpp:
(WebCore::RenderBlock::RenderBlock):
(WebCore::RenderBlock::setPaginationStrut):
(WebCore::RenderBlock::setPageLogicalOffset):
(WebCore::RenderBlock::setBreakAtLineToAvoidWidow):
* rendering/RenderBlock.h:
(WebCore::RenderBlock::setLineGridBox):
(WebCore::RenderBlock::setShapeInsideInfo):
(WebCore::RenderBlock::RenderBlockRareData::RenderBlockRareData):
* rendering/RenderBlockFlow.cpp:
(WebCore::RenderBlockFlow::MarginInfo::MarginInfo):
(WebCore::RenderBlockFlow::RenderBlockFlow):
(WebCore::RenderBlockFlow::layoutBlockChild):
(WebCore::RenderBlockFlow::adjustPositionedBlock):
(WebCore::RenderBlockFlow::adjustFloatingBlock):
(WebCore::RenderBlockFlow::marginValuesForChild):
(WebCore::RenderBlockFlow::collapseMargins):
(WebCore::RenderBlockFlow::clearFloatsIfNeeded):
(WebCore::RenderBlockFlow::marginBeforeEstimateForChild):
(WebCore::RenderBlockFlow::estimateLogicalTopPosition):
(WebCore::RenderBlockFlow::setCollapsedBottomMargin):
(WebCore::RenderBlockFlow::handleAfterSideOfBlock):
(WebCore::RenderBlockFlow::setMaxMarginBeforeValues):
(WebCore::RenderBlockFlow::setMaxMarginAfterValues):
(WebCore::RenderBlockFlow::setMustDiscardMarginBefore):
(WebCore::RenderBlockFlow::setMustDiscardMarginAfter):
(WebCore::RenderBlockFlow::mustDiscardMarginBefore):
(WebCore::RenderBlockFlow::mustDiscardMarginAfter):
(WebCore::RenderBlockFlow::mustDiscardMarginBeforeForChild):
(WebCore::RenderBlockFlow::mustDiscardMarginAfterForChild):
(WebCore::RenderBlockFlow::mustSeparateMarginBeforeForChild):
(WebCore::RenderBlockFlow::mustSeparateMarginAfterForChild):
(WebCore::inNormalFlow):
(WebCore::RenderBlockFlow::applyBeforeBreak):
(WebCore::RenderBlockFlow::applyAfterBreak):
(WebCore::RenderBlockFlow::adjustBlockChildForPagination):
* rendering/RenderBlockFlow.h:
(WebCore::RenderBlockFlow::MarginValues::MarginValues):
(WebCore::RenderBlockFlow::MarginValues::positiveMarginBefore):
(WebCore::RenderBlockFlow::MarginValues::negativeMarginBefore):
(WebCore::RenderBlockFlow::MarginValues::positiveMarginAfter):
(WebCore::RenderBlockFlow::MarginValues::negativeMarginAfter):
(WebCore::RenderBlockFlow::MarginValues::setPositiveMarginBefore):
(WebCore::RenderBlockFlow::MarginValues::setNegativeMarginBefore):
(WebCore::RenderBlockFlow::MarginValues::setPositiveMarginAfter):
(WebCore::RenderBlockFlow::MarginValues::setNegativeMarginAfter):
(WebCore::RenderBlockFlow::RenderBlockFlowRareData::RenderBlockFlowRareData):
(WebCore::RenderBlockFlow::RenderBlockFlowRareData::positiveMarginBeforeDefault):
(WebCore::RenderBlockFlow::RenderBlockFlowRareData::negativeMarginBeforeDefault):
(WebCore::RenderBlockFlow::RenderBlockFlowRareData::positiveMarginAfterDefault):
(WebCore::RenderBlockFlow::RenderBlockFlowRareData::negativeMarginAfterDefault):
(WebCore::RenderBlockFlow::MarginInfo::setAtBeforeSideOfBlock):
(WebCore::RenderBlockFlow::MarginInfo::setAtAfterSideOfBlock):
(WebCore::RenderBlockFlow::MarginInfo::clearMargin):
(WebCore::RenderBlockFlow::MarginInfo::setHasMarginBeforeQuirk):
(WebCore::RenderBlockFlow::MarginInfo::setHasMarginAfterQuirk):
(WebCore::RenderBlockFlow::MarginInfo::setDeterminedMarginBeforeQuirk):
(WebCore::RenderBlockFlow::MarginInfo::setPositiveMargin):
(WebCore::RenderBlockFlow::MarginInfo::setNegativeMargin):
(WebCore::RenderBlockFlow::MarginInfo::setPositiveMarginIfLarger):
(WebCore::RenderBlockFlow::MarginInfo::setNegativeMarginIfLarger):
(WebCore::RenderBlockFlow::MarginInfo::setMargin):
(WebCore::RenderBlockFlow::MarginInfo::setCanCollapseMarginAfterWithChildren):
(WebCore::RenderBlockFlow::MarginInfo::setDiscardMargin):
(WebCore::RenderBlockFlow::MarginInfo::atBeforeSideOfBlock):
(WebCore::RenderBlockFlow::MarginInfo::canCollapseWithMarginBefore):
(WebCore::RenderBlockFlow::MarginInfo::canCollapseWithMarginAfter):
(WebCore::RenderBlockFlow::MarginInfo::canCollapseMarginBeforeWithChildren):
(WebCore::RenderBlockFlow::MarginInfo::canCollapseMarginAfterWithChildren):
(WebCore::RenderBlockFlow::MarginInfo::quirkContainer):
(WebCore::RenderBlockFlow::MarginInfo::determinedMarginBeforeQuirk):
(WebCore::RenderBlockFlow::MarginInfo::hasMarginBeforeQuirk):
(WebCore::RenderBlockFlow::MarginInfo::hasMarginAfterQuirk):
(WebCore::RenderBlockFlow::MarginInfo::positiveMargin):
(WebCore::RenderBlockFlow::MarginInfo::negativeMargin):
(WebCore::RenderBlockFlow::MarginInfo::discardMargin):
(WebCore::RenderBlockFlow::MarginInfo::margin):
(WebCore::RenderBlockFlow::maxPositiveMarginBefore):
(WebCore::RenderBlockFlow::maxNegativeMarginBefore):
(WebCore::RenderBlockFlow::maxPositiveMarginAfter):
(WebCore::RenderBlockFlow::maxNegativeMarginAfter):
(WebCore::RenderBlockFlow::initMaxMarginValues):
* rendering/RenderDeprecatedFlexibleBox.cpp:
(WebCore::RenderDeprecatedFlexibleBox::layoutBlock):
* rendering/RenderTable.cpp:
(WebCore::RenderTable::layout):
2013-09-11 Myles C. Maxfield <mmaxfield@apple.com>
Fix nested unicode-bidi: isolate
https://bugs.webkit.org/show_bug.cgi?id=120504
Reviewed by Darin Adler.
When we have a nested isolate renderer if the outer isolate has a text
and this text is not the first child, the isolated chain is not
rendered correctly. This happens because constructBidiRunsForSegment
uses always the first inner isolated renderer as isolated inline
container. This patch fixes the behavior described changing
containingIsolate to find the right isolated container.
Merged from Blink: https://chromium.googlesource.com/chromium/blink/+/840a57050eade39dd04dde0c6603e129b783151c
Tests: fast/text/international/unicode-bidi-isolate-nested-first-child-text.html
fast/text/international/unicode-bidi-isolate-nested-simple.html
* rendering/InlineIterator.h:
(WebCore::containingIsolate):
* rendering/RenderBlockLineLayout.cpp:
(WebCore::constructBidiRunsForSegment):
2013-09-11 Alexey Proskuryakov <ap@apple.com>
https://bugs.webkit.org/show_bug.cgi?id=121169
media/track/track-cue-rendering-vertical.html is flaky on Mac
Reviewed by Eric Carlson.
* html/shadow/MediaControlElements.cpp:
(WebCore::MediaControlTextTrackContainerElement::updateSizes): Added a FIXME.
2013-09-11 Anders Carlsson <andersca@apple.com>
Stop using deleteAllValues in SVG code
https://bugs.webkit.org/show_bug.cgi?id=121172
Reviewed by Antti Koivisto.
Use OwnPtr for values instead.
* rendering/svg/RenderSVGResourceClipper.cpp:
(WebCore::RenderSVGResourceClipper::~RenderSVGResourceClipper):
(WebCore::RenderSVGResourceClipper::removeAllClientsFromCache):
(WebCore::RenderSVGResourceClipper::removeClientFromCache):
(WebCore::RenderSVGResourceClipper::applyClippingToContext):
* rendering/svg/RenderSVGResourceClipper.h:
* rendering/svg/RenderSVGResourceFilter.cpp:
(WebCore::RenderSVGResourceFilter::~RenderSVGResourceFilter):
(WebCore::RenderSVGResourceFilter::removeAllClientsFromCache):
(WebCore::RenderSVGResourceFilter::removeClientFromCache):
(WebCore::RenderSVGResourceFilter::applyResource):
(WebCore::RenderSVGResourceFilter::postApplyResource):
(WebCore::RenderSVGResourceFilter::primitiveAttributeChanged):
* rendering/svg/RenderSVGResourceFilter.h:
* rendering/svg/RenderSVGResourceMasker.cpp:
(WebCore::RenderSVGResourceMasker::~RenderSVGResourceMasker):
(WebCore::RenderSVGResourceMasker::removeAllClientsFromCache):
(WebCore::RenderSVGResourceMasker::removeClientFromCache):
(WebCore::RenderSVGResourceMasker::applyResource):
* rendering/svg/RenderSVGResourceMasker.h:
2013-09-11 Ryosuke Niwa <rniwa@webkit.org>
Make the table static const.
* css/makeprop.pl:
2013-09-11 Timothy Hatcher <timothy@apple.com>
Remove TimelineTraceEventProcessor since no current ports use it
https://bugs.webkit.org/show_bug.cgi?id=121171
Reviewed by Joseph Pecoraro.
* CMakeLists.txt:
* GNUmakefile.list.am:
* Target.pri:
* WebCore.vcxproj/WebCore.vcxproj:
* WebCore.vcxproj/WebCore.vcxproj.filters:
* WebCore.xcodeproj/project.pbxproj:
* inspector/InspectorAllInOne.cpp:
* inspector/InspectorClient.h:
* inspector/InspectorInstrumentation.cpp:
* inspector/InspectorInstrumentation.h:
* inspector/InspectorTimelineAgent.cpp:
(WebCore::InspectorTimelineAgent::start):
(WebCore::InspectorTimelineAgent::stop):
* inspector/InspectorTimelineAgent.h:
* inspector/TimelineTraceEventProcessor.cpp: Removed.
* inspector/TimelineTraceEventProcessor.h: Removed.
2013-09-11 Commit Queue <commit-queue@webkit.org>
Unreviewed, rolling out r155519.
http://trac.webkit.org/changeset/155519
https://bugs.webkit.org/show_bug.cgi?id=121174
Included regression test fails, and an existing test started
to crash (Requested by ap on #webkit).
* dom/Document.cpp:
(WebCore::Document::hoveredElementDidDetach):
* page/EventHandler.cpp:
(WebCore::EventHandler::EventHandler):
(WebCore::EventHandler::clear):
(WebCore::EventHandler::handleMouseMoveEvent):
(WebCore::EventHandler::scheduleHoverStateUpdate):
(WebCore::EventHandler::hoverTimerFired):
* page/EventHandler.h:
2013-09-11 Anders Carlsson <andersca@apple.com>
Stop using deleteAllValues in SVG code
https://bugs.webkit.org/show_bug.cgi?id=121172
Reviewed by Antti Koivisto.
Use OwnPtr for values instead.
* rendering/svg/RenderSVGResourceClipper.cpp:
(WebCore::RenderSVGResourceClipper::~RenderSVGResourceClipper):
(WebCore::RenderSVGResourceClipper::removeAllClientsFromCache):
(WebCore::RenderSVGResourceClipper::removeClientFromCache):
(WebCore::RenderSVGResourceClipper::applyClippingToContext):
* rendering/svg/RenderSVGResourceClipper.h:
* rendering/svg/RenderSVGResourceFilter.cpp:
(WebCore::RenderSVGResourceFilter::~RenderSVGResourceFilter):
(WebCore::RenderSVGResourceFilter::removeAllClientsFromCache):
(WebCore::RenderSVGResourceFilter::removeClientFromCache):
(WebCore::RenderSVGResourceFilter::applyResource):
(WebCore::RenderSVGResourceFilter::postApplyResource):
(WebCore::RenderSVGResourceFilter::primitiveAttributeChanged):
* rendering/svg/RenderSVGResourceFilter.h:
* rendering/svg/RenderSVGResourceMasker.cpp:
(WebCore::RenderSVGResourceMasker::~RenderSVGResourceMasker):
(WebCore::RenderSVGResourceMasker::removeAllClientsFromCache):
(WebCore::RenderSVGResourceMasker::removeClientFromCache):
(WebCore::RenderSVGResourceMasker::applyResource):
* rendering/svg/RenderSVGResourceMasker.h:
2013-09-10 Simon Fraser <simon.fraser@apple.com>
REGRESSION (143483): overflow:hidden doesn't quash big repaints from text-indent: -9999px
https://bugs.webkit.org/show_bug.cgi?id=121137
Reviewed by Ryosuke Niwa.
The change in r143483 made it so that negative text-indent gets added
to visual oveflow even when we have overflow:hidden, which is really bad
because it causes large repaints (and large layers) for a common-on-the-web
pattern.
Revert the change, and add a new test to make sure it doesn't regress.
I can't reproduce the bug it was trying to fix with the change reverted.
Tests: compositing/geometry/negative-text-indent-with-overflow-hidden-layer.html
fast/repaint/negative-text-indent-with-overflow-hidden.html
* rendering/RenderBlock.cpp:
(WebCore::RenderBlock::computeOverflow):
2013-09-10 Simon Fraser <simon.fraser@apple.com>
Optionally show visual and layout overflow rects in layer tree dumps
https://bugs.webkit.org/show_bug.cgi?id=121135
Reviewed by Beth Dakin.
When calling showLayerTree() from the debugger, show overflow rects
(visaul and layout) for renderers.
Does not affect test output.
* rendering/RenderLayer.cpp:
(showLayerTree): Pass the new flag to show overflow rects.
* rendering/RenderTreeAsText.cpp:
(WebCore::RenderTreeAsText::writeRenderObject): Print the rects.
(WebCore::write): Don't force layout on subframes if the "dont' layout"
flag is set.
* rendering/RenderTreeAsText.h: New flag.
2013-09-11 Chris Fleizach <cfleizach@apple.com>
AX: WebKit exposes AXTitleUIElement incorrectly on checkboxes and radio buttons
https://bugs.webkit.org/show_bug.cgi?id=121039
Reviewed by Sam Weinig.
Stop hiding <label> elements for radio buttons and checkboxes (and using the text inside them for the AXTitle).
Instead, expose the <label> element as the titleUIElement if appropriate for the input.
This implies:
1) The web will no longer match MacOS behavior exactly (the text and the checkbox control are combined on MacOS into one element)
2) But, the user will now be able to explore the <label> element which may include links or other important controls.
I think sacrificing 1) here is a good tradeoff. The user will likely never know the difference in terms of output.
Test: platform/mac/accessibility/label-elements-exposed-as-title-ui-elements.html
* accessibility/AccessibilityNodeObject.cpp:
(WebCore::AccessibilityNodeObject::titleElementText):
(WebCore::AccessibilityNodeObject::title):
* accessibility/AccessibilityRenderObject.cpp:
(WebCore::AccessibilityRenderObject::hasTextAlternative):
(WebCore::AccessibilityRenderObject::exposesTitleUIElement):
2013-09-11 Andreas Kling <akling@apple.com>
Remove unnecessary Document::frame() null checks in rendererIsNeeded().
<https://webkit.org/b/121166>
Reviewed by Anders Carlsson.
rendererIsNeeded() is only called during style resolve, which only happens
while there's a Frame present.
* html/HTMLEmbedElement.cpp:
(WebCore::HTMLEmbedElement::rendererIsNeeded):
* html/HTMLMediaElement.cpp:
(WebCore::HTMLMediaElement::rendererIsNeeded):
* html/HTMLObjectElement.cpp:
* html/HTMLObjectElement.h:
2013-09-11 Csaba Osztrogonác <ossy@webkit.org>
ARM buildfix after r155491
https://bugs.webkit.org/show_bug.cgi?id=121152
Reviewed by Anders Carlsson.
FELightingNEON.cpp and FELightingNEON.h is inside COMPILER(GCC) guard, so it's safe to use GCC attribute.
* platform/graphics/cpu/arm/filters/FELightingNEON.cpp: Use __aligned__ GCC attribute directly.
* platform/graphics/cpu/arm/filters/FELightingNEON.h: Use __aligned__ GCC attribute instead of ugly template magic.
(WebCore::FELighting::platformApplyNeon):
2013-09-11 peavo@outlook.com <peavo@outlook.com>
[WinCairo] Compile errors.
https://bugs.webkit.org/show_bug.cgi?id=121153
Reviewed by Brent Fulgham.
* page/win/FrameCairoWin.cpp:
(WebCore::imageFromRect): Return empty GDIObject.
* platform/graphics/win/FontCustomPlatformDataCairo.cpp:
(WebCore::FontCustomPlatformData::fontPlatformData): Get actual handle from GDIObject.
2013-09-11 Darin Adler <darin@apple.com>
Rework CSS parser, eliminating "floating" concept and using %destructor
https://bugs.webkit.org/show_bug.cgi?id=121161
Reviewed by Antti Koivisto.
This is some basic improvement, but there is still room for a lot more
consistent approach and formatting in this file. There is a mix of code that
works by side effects in the CSSParser class and code that works with the
values that bison generates in the union that is more or less random. And
the data structures seem too costly, with too much heap allocation. And the
CSSParser class has grown massive, with a mix of both function for use by
code that wants to trigger parsing, and helper functions called by code in
the grammar file. All of that can benefit from more refinement in the future.
* css/CSSGrammar.y.in: Made some incremental improvements to the structure
of the grammar file, including:
- Breaking up the %union so types are declared next to their use
- Eliminating one shift/reduce conflict caused by two "maybe_space" in a row
- Breaking the conditional sections out into their own sections instead of
scattering them in with the other code.
- Eliminating unused return values in productions such as charset,
ignored_charset, namespace, margin_box, invalid_rule, save_block,
invalid_at, and declarations_and_margins.
- Adding %destructor to productions that return values that need to be deleted
or deref'd. This removes the need for CSSParser to separately track these
as "floating" to clean up in case of errors.
- Removing unneeded productions such as media_feature, region_selector,
attr_name, and medium.
- Removing explicit code blocks that just say "$$ = $1" or empty blocks when
there is no return type, since those are default.
- Formatting many productions on single lines since I find them easier to read.
Later I think we could make many more CSSParser functions and make even
more of the production single lines in the grammar file.
- Using adoptPtr, adoptRef, delete, deref, leakPtr, and leakRef to put
heap allocated values into and out of the union without storage leaks.
* css/CSSParser.cpp:
(WebCore::CSSParser::~CSSParser): Remove the now-unneeded deleteAllValues for
the various colections of floating things.
(WebCore::CSSParser::createFilterRule): Don't put the rule into m_parsedRules,
just return a PassRefPtr instead.
(WebCore::CSSParser::createImportRule): Ditto.
(WebCore::CSSParser::createMediaRule): Ditto.
(WebCore::CSSParser::createEmptyMediaRule): Ditto.
(WebCore::CSSParser::createSupportsRule): Ditto.
(WebCore::CSSParser::createKeyframesRule): Ditto.
(WebCore::CSSParser::createStyleRule): Ditto.
(WebCore::CSSParser::createFontFaceRule): Ditto.
(WebCore::CSSParser::createHostRule): Ditto.
(WebCore::CSSParser::rewriteSpecifiersWithNamespaceIfNeeded): Got rid of the
unused return value from this function and changed it to to take a reference
instead of a pointer.
(WebCore::CSSParser::rewriteSpecifiersWithElementName): Ditto.
(WebCore::CSSParser::rewriteSpecifiers): Changed this to take and return OwnPtr.
(WebCore::CSSParser::createPageRule): Don't put rule into m_parsedRules, return
PassRefPtr instead.
(WebCore::CSSParser::createSelectorVector): Added. Used to implement the
optimization where we recycle a single selector vector. Not sure we still need
this, or maybe we need more optimizations like it, but for now keep it.
(WebCore::CSSParser::recycleSelectorVector): Ditto.
(WebCore::CSSParser::createRegionRule): Don't put rule into m_parsedRules, return
PassRefPtr instead.
(WebCore::CSSParser::createMarginAtRule): Got rid of unused return value.
When this function is implemented for real, we might add a return value.
(WebCore::CSSParser::createKeyframe): Don't put keyframe into m_parsedKeyframes,
return PassRefPtr instead.
(WebCore::CSSParser::createViewportRule): Don't put rule into m_parsedRules, return
PassRefPtr instead.
* css/CSSParser.h: Removed many now-needed functions to manage floating items.
Changed rule creation functions to return PassRefPtr. Other changes as mentioned above.
* css/CSSParserValues.cpp:
(WebCore::destroy): Added.
(WebCore::CSSParserValueList::~CSSParserValueList): Updated to call destroy.
* css/CSSParserValues.h: Ditto.
2013-09-11 Mario Sanchez Prada <mario.prada@samsung.com>
[GTK] Remove Gail dependency from build system for GTK3
https://bugs.webkit.org/show_bug.cgi?id=119673
Reviewed by Gustavo Noronha Silva.
* GNUmakefile.am: Removed GAIL_CFLAGS.
* PlatformGTK.cmake: Removed GAIL3_INCLUDE_DIRS and GAIL3_LIBRARIES.
2013-09-11 Andreas Kling <akling@apple.com>
Remove Widget::widgetPositionsUpdated().
<https://webkit.org/b/121160>
Reviewed by Anders Carlsson.
Remove this no-op virtual that was only used by chromium.
2013-09-11 Andreas Kling <akling@apple.com>
Page::backForward() should return a reference.
<https://webkit.org/b/121151>
Reviewed by Anders Carlsson.
There is always a BackForwardController, so make backForward() return a reference.
Also made it store a Page& internally since it's tied to the lifetime of Page.
2013-09-11 Mikhail Pozdnyakov <mikhail.pozdnyakov@intel.com>
WTF::OwnPtr should behave similarly with the rest of WTF smart pointers
https://bugs.webkit.org/show_bug.cgi?id=120773
Reviewed by Anders Carlsson.
Before the change OwnPtr could take either the pointer type or the pointed-to type, which was bad
for the following reasons:
- It distinguished OwnPtr behaviour from other WTF smart pointer classes behaviour (so it was confusing for the Client).
- It was potential error-prone as it actually modified the type given by the Client in opaque way.
* page/animation/CSSPropertyAnimation.cpp:
(WebCore::PropertyWrapperShadow::blendSimpleOrMatchedShadowLists):
(WebCore::PropertyWrapperShadow::blendMismatchedShadowLists):
2013-09-11 Andreas Kling <akling@apple.com>
FrameView: Tighten widget handling code.
<https://webkit.org/b/121155>
Reviewed by Antti Koivisto.
Harden typing in this code to work with RenderEmbeddedObject& instead of RenderObject*.
Functions and members renamed to reflect that they only deal with embedded objects.
* html/HTMLPlugInImageElement.h:
(WebCore::toHTMLPlugInImageElement):
Add a toHTMLPlugInImageElement that takes an Element&.
* html/HTMLTagNames.in:
Generate type helpers for applet and embed elements.
* page/FrameView.h:
* page/FrameView.cpp:
(WebCore::FrameView::addEmbeddedObjectToUpdate):
(WebCore::FrameView::removeEmbeddedObjectToUpdate):
(WebCore::FrameView::updateEmbeddedObjects):
(WebCore::FrameView::updateEmbeddedObject):
Re-ordered this function in early return style. Change locals into references.
* rendering/RenderEmbeddedObject.cpp:
(WebCore::RenderEmbeddedObject::~RenderEmbeddedObject):
(WebCore::RenderEmbeddedObject::layout):
* rendering/RenderSnapshottedPlugIn.cpp:
(WebCore::RenderSnapshottedPlugIn::layout):
Updated for new FrameView function signatures.
2013-09-11 Patrick Gansterer <paroga@webkit.org>
[CMake] Split out generic Windows files into its own file
https://bugs.webkit.org/show_bug.cgi?id=119514
Reviewed by Gyuyoung Kim.
This allows us to add smaller CMakeLists.txt files when
adding additional Windows ports.
* PlatformWin.cmake: Copied from Source/WebCore/PlatformWinCE.cmake.
* PlatformWinCE.cmake:
2013-09-11 Mario Sanchez Prada <mario.prada@samsung.com>
[GTK] Get rid of Pango/Gail dependencies in accessibility for ATK
https://bugs.webkit.org/show_bug.cgi?id=114867
Reviewed by Martin Robinson.
Removed all trace of Gail and Pango specific code from the AtkText
implementation, now everything has been reimplemented.
* accessibility/atk/WebKitAccessibleInterfaceText.cpp:
(webkitAccessibleTextGetTextForOffset): Removed fallback code
relying in Gail/Pango, now all the related code has been
removed. Also, replaced the collection of if statements with a
switch, for better readability of the code.
2013-09-11 Allan Sandfeld Jensen <allan.jensen@digia.com>
Mouseenter/-leave not triggered when element under cursor is moved/removed
https://bugs.webkit.org/show_bug.cgi?id=120786
Reviewed by Antonio Gomes.
When a hovered element is detached it will now emit a fake mousemove event
similar to what happens when a hovered element has CSS display set to none.
Test: fast/events/mouseenterleave-detached-element.html
* dom/Document.cpp:
(WebCore::Document::hoveredElementDidDetach):
* page/EventHandler.cpp:
(WebCore::EventHandler::EventHandler):
(WebCore::EventHandler::clear):
(WebCore::EventHandler::handleMouseMoveEvent):
* page/EventHandler.h:
2013-09-11 Krzysztof Czech <k.czech@samsung.com>
[ATK] Adds mapping MenuItemRadioRole to ATK
https://bugs.webkit.org/show_bug.cgi?id=121149
Reviewed by Mario Sanchez Prada.
Adds mapping MenuItemRadioRole to ATK.
* accessibility/atk/WebKitAccessibleWrapperAtk.cpp:
(atkRole):
2013-09-10 Mario Sanchez Prada <mario.prada@samsung.com>
[GTK] Reimplement atk_text_get_text_*_offset for LINE boundaries
https://bugs.webkit.org/show_bug.cgi?id=114872
Reviewed by Gustavo Noronha Silva.
Re-implement these functions without using GailTextUtil nor Pango.
* accessibility/atk/WebKitAccessibleInterfaceText.cpp:
(lineAtPositionForAtkBoundary): New helper function to find the
line at a given position considering values of AtkTextBoundary.
(webkitAccessibleTextLineForBoundary): New function,
implementing atk_text_get_text_*_offset for LINE.
(webkitAccessibleTextGetTextForOffset): Replace usage of Gail for
LINE boundaries with webkitAccessibleTextLineForBoundary().
2013-09-11 Andreas Kling <akling@apple.com>
Missed one BackForwardListImpl.h in the last commit.
* history/BackForwardList.cpp:
2013-09-11 Andreas Kling <akling@apple.com>
Rename BackForwardListImpl.{cpp,h} => BackForwardClient.{cpp,h}
Rubber-stamped by Antti Koivisto.
2013-09-10 Ryosuke Niwa <rniwa@webkit.org>
CSSProperty::isInheritedProperty is large
https://bugs.webkit.org/show_bug.cgi?id=121083
Reviewed by Sam Weinig.
Support [Inherited] option in makeprop.pl and generate CSSProperty::isInheritedProperty in CSSPropertyNames.cpp
using a lookup table. We can pack the table better by using bitfield in the future but I think boolean lookup
table is a good first cut.
Updated CSSPropertyNames.in and SVGCSSPropertyNames.in to use the new option and removed the old code from
CSSProperty.cpp.
* css/CSSProperty.cpp:
* css/CSSPropertyNames.in:
* css/SVGCSSPropertyNames.in:
* css/makeprop.pl:
2013-09-11 Andreas Kling <akling@apple.com>
Rename BackForwardListImpl => BackForwardList.
<https://webkit.org/b/121146>
Reviewed by Antti Koivisto.
Nuke another old FIXME.
2013-09-11 Gyuyoung Kim <gyuyoung.kim@samsung.com>
Generate more HTML type checks and casting
https://bugs.webkit.org/show_bug.cgi?id=121080
Reviewed by Andreas Kling.
Clean-up remained functions of HTML elements using auto-generated isFooElement(),
and replace toFooElement() with ELEMENT_TYPE_CASTS() macro.
Besides this patch clean-up unnecessary checks which are being supported by
auto-generated isFooElement().
No new tests, no behavior change.
* accessibility/atk/AXObjectCacheAtk.cpp:
(WebCore::notifyChildrenSelectionChange):
* html/HTMLFrameElementBase.h:
(WebCore::toHTMLFrameElementBase):
* html/HTMLIFrameElement.h:
* html/HTMLImageLoader.cpp:
(WebCore::HTMLImageLoader::dispatchLoadEvent):
(WebCore::HTMLImageLoader::notifyFinished):
* html/HTMLObjectElemenaeh:
* html/HTMLOptionsCollection.cpp:
(WebCore::HTMLOptionsCollection::HTMLOptionsCollection):
* html/HTMLSelectElement.h:
* html/HTMLTagNames.in:
* html/HTMLVideoElement.h:
* html/shadow/HTMLContentElement.h:
* loader/ImageLoader.cpp:
(WebCore::ImageLoader::dispatchPendingBeforeLoadEvent):
* loader/archive/cf/LegacyWebArchive.cpp:
(WebCore::LegacyWebArchive::create):
* page/PageSerializer.cpp:
(WebCore::frameOwnerURLAttributeName):
* page/SpatialNavigation.cpp:
(WebCore::canScrollInDirection):
* platform/gtk/PasteboardGtk.cpp:
(WebCore::getURLForImageNode):
* plugins/IFrameShimSupport.cpp:
(WebCore::getPluginOcclusions):
* rendering/HitTestResult.cpp:
(WebCore::HitTestResult::mediaSupportsFullscreen):
(WebCore::HitTestResult::mediaElement):
(WebCore::HitTestResult::enterFullscreenForVideo):
(WebCore::HitTestResult::mediaIsVideo):
* rendering/RenderLayerCompositor.cpp:
(WebCore::RenderLayerCompositor::requiresCompositingForVideo):
* rendering/RenderListBox.cpp:
(WebCore::RenderListBox::RenderListBox):
* rendering/RenderMenuList.cpp:
(WebCore::RenderMenuList::RenderMenuList):
* testing/Internals.cpp:
(WebCore::Internals::isSelectPopupVisible):
2013-09-11 Chris Fleizach <cfleizach@apple.com>
AX: Mac platform is not using accessibilityTitle from the Base implementation
https://bugs.webkit.org/show_bug.cgi?id=121109
Reviewed by Sam Weinig.
Remove the Mac platform overrides of accessibilityTitle, Description, HelpText.
The Base implementation has these and we can share them between iOS and Mac
* accessibility/mac/WebAccessibilityObjectWrapperBase.mm:
(-[WebAccessibilityObjectWrapperBase accessibilityTitle]):
(-[WebAccessibilityObjectWrapperBase accessibilityDescription]):
* accessibility/mac/WebAccessibilityObjectWrapperMac.mm:
2013-09-11 Andreas Kling <akling@apple.com>
Rename BackForwardList.h => BackForwardClient.h
Rubber-stamped by Antti Koivisto.
2013-09-11 Andreas Kling <akling@apple.com>
Rename BackForwardList => BackForwardClient.
<https://webkit.org/b/121143>
Reviewed by Antti Koivisto.
Nuke a 3 year old FIXME about renaming this class.
2013-09-10 Daniel Bates <dabates@apple.com>
[iOS] Upstream text autosizing
https://bugs.webkit.org/show_bug.cgi?id=121111
Reviewed by Andy Estes and Sam Weinig.
Tests: platform/iphone-simulator/text-autosizing/anonymous-block.html
platform/iphone-simulator/text-autosizing/contenteditable.html
platform/iphone-simulator/text-autosizing/first-letter.html
platform/iphone-simulator/text-autosizing/font-family-case-insensitive.html
platform/iphone-simulator/text-autosizing/lists.html
platform/iphone-simulator/text-autosizing/overflow.html
platform/iphone-simulator/text-autosizing/percent-adjust-length-line-height.html
platform/iphone-simulator/text-autosizing/percent-adjust-number-line-height.html
platform/iphone-simulator/text-autosizing/percent-adjust-percent-line-height.html
* WebCore.exp.in:
* WebCore.xcodeproj/project.pbxproj:
* css/CSSComputedStyleDeclaration.cpp:
(WebCore::ComputedStyleExtractor::propertyValue):
* css/CSSParser.cpp:
(WebCore::isValidKeywordPropertyAndValue):
(WebCore::CSSParser::parseValue):
* css/CSSProperty.cpp:
(WebCore::CSSProperty::isInheritedProperty):
* css/CSSPropertyNames.in: Add property -webkit-text-size-adjust.
* css/DeprecatedStyleBuilder.cpp:
(WebCore::ApplyPropertyLineHeightForIOSTextAutosizing::applyValue): Added.
(WebCore::ApplyPropertyLineHeightForIOSTextAutosizing::applyInitialValue): Added.
(WebCore::ApplyPropertyLineHeightForIOSTextAutosizing::applyInheritValue): Added.
(WebCore::ApplyPropertyLineHeightForIOSTextAutosizing::createHandler): Added.
(WebCore::DeprecatedStyleBuilder::DeprecatedStyleBuilder):
* css/StyleResolver.cpp:
(WebCore::StyleResolver::updateFont):
(WebCore::StyleResolver::applyProperties): Add COMPILE_ASSERT to ensure that
all properties that affect font size, including -webkit-text-size-adjust, are
resolved before properties that depend on them; see <rdar://problem/13522835>.
(WebCore::StyleResolver::applyProperty):
(WebCore::StyleResolver::checkForTextSizeAdjust): Added.
* css/StyleResolver.h:
* dom/Document.cpp:
(WebCore::TextAutoSizingTraits::constructDeletedValue): Added.
(WebCore::TextAutoSizingTraits::isDeletedValue): Added.
(WebCore::Document::detach):
(WebCore::Document::addAutoSizingNode): Added.
(WebCore::Document::validateAutoSizingNodes): Added.
(WebCore::Document::resetAutoSizingNodes): Added.
* dom/Document.h:
* editing/EditingStyle.cpp:
* page/Frame.h: Add declarations for setTextAutosizingWidth(), textAutosizingWidth().
* page/FrameView.cpp:
(WebCore::FrameView::layout):
* page/Settings.in: Generate setter and getter for setting minimumZoomFontSize.
* platform/graphics/Font.h:
(WebCore::Font::equalForTextAutoSizing): Added.
* platform/graphics/FontDescription.cpp:
(WebCore::FontDescription::familiesEqualForTextAutoSizing): Added.
* platform/graphics/FontDescription.h:
(WebCore::FontDescription::equalForTextAutoSizing): Added.
* rendering/RenderBlock.cpp:
(WebCore::RenderBlock::RenderBlock):
(WebCore::isVisibleRenderText): Added.
(WebCore::resizeTextPermitted): Added.
(WebCore::RenderBlock::immediateLineCount): Added.
(WebCore::isNonBlocksOrNonFixedHeightListItems): Added.
(WebCore::oneLineTextMultiplier): Added.
(WebCore::textMultiplier): Added.
(WebCore::RenderBlock::adjustComputedFontSizes): Added.
* rendering/RenderBlock.h:
(WebCore::RenderBlock::resetComputedFontSize): Added.
* rendering/RenderObject.cpp:
(WebCore::RenderObject::traverseNext): Added.
(WebCore::includeNonFixedHeight): Added.
(WebCore::RenderObject::adjustComputedFontSizesOnBlocks): Added.
(WebCore::RenderObject::resetTextAutosizing): Added.
* rendering/RenderObject.h:
* rendering/RenderText.cpp:
(WebCore::RenderText::RenderText):
* rendering/RenderText.h:
(WebCore::RenderText::candidateComputedTextSize): Added.
(WebCore::RenderText::setCandidateComputedTextSize): Added.
* rendering/style/RenderStyle.cpp:
(WebCore::computeFontHash):
(WebCore::RenderStyle::hashForTextAutosizing): Added.
(WebCore::RenderStyle::equalForTextAutosizing): Added.
(WebCore::RenderStyle::changeRequiresLayout):
(WebCore::RenderStyle::specifiedLineHeight): Added; iOS-specific variant.
We should reconcile this getter with the getter of the same name that is
compiled when building with IOS_TEXT_AUTOSIZING disabled.
(WebCore::RenderStyle::setSpecifiedLineHeight): Added.
* rendering/style/RenderStyle.h:
(WebCore::RenderStyle::initialSpecifiedLineHeight): Added.
(WebCore::RenderStyle::initialTextSizeAdjust): Added.
(WebCore::RenderStyle::setTextSizeAdjust): Added.
(WebCore::RenderStyle::textSizeAdjust): Added.
* rendering/style/StyleInheritedData.cpp:
(WebCore::StyleInheritedData::StyleInheritedData):
(WebCore::StyleInheritedData::operator==):
* rendering/style/StyleInheritedData.h:
* rendering/style/StyleRareInheritedData.cpp:
(WebCore::StyleRareInheritedData::StyleRareInheritedData):
(WebCore::StyleRareInheritedData::operator==):
* rendering/style/StyleRareInheritedData.h:
* rendering/style/TextSizeAdjustment.h: Added.
(TextSizeAdjustment::TextSizeAdjustment):
(TextSizeAdjustment::percentage):
(TextSizeAdjustment::multiplier):
(TextSizeAdjustment::isAuto):
(TextSizeAdjustment::isNone):
(TextSizeAdjustment::isPercentage):
(TextSizeAdjustment::operator == ):
(TextSizeAdjustment::operator != ):
2013-09-10 Chris Fleizach <cfleizach@apple.com>
AX: AXValue/AXMenuItemMarkChar not defined for menuitemradio (should be false (0) with aria-checked=mixed | undefined)
https://bugs.webkit.org/show_bug.cgi?id=120372
Reviewed by Mario Sanchez Prada.
Add new roles to make the distinction between menu item, menu item radio and menu item checkbox.
Expose AXValue for menu items, so that they can convey the, on/off/mixed state of aria-checked.
Test: platform/mac/accessibility/menu-item-values.html
* accessibility/AccessibilityNodeObject.cpp:
(WebCore::AccessibilityNodeObject::isMenuRelated):
(WebCore::AccessibilityNodeObject::isMenuItem):
(WebCore::AccessibilityNodeObject::isChecked):
(WebCore::AccessibilityNodeObject::actionElement):
(WebCore::AccessibilityNodeObject::visibleText):
(WebCore::AccessibilityNodeObject::title):
* accessibility/AccessibilityObject.cpp:
(WebCore::createARIARoleMap):
(WebCore::AccessibilityObject::checkboxOrRadioValue):
* accessibility/AccessibilityObject.h:
* accessibility/AccessibilityRenderObject.cpp:
(WebCore::AccessibilityRenderObject::computeAccessibilityIsIgnored):
* accessibility/ios/WebAccessibilityObjectWrapperIOS.mm:
(-[WebAccessibilityObjectWrapper accessibilityCanFuzzyHitTest]):
(-[WebAccessibilityObjectWrapper accessibilityTraits]):
* accessibility/mac/WebAccessibilityObjectWrapperMac.mm:
(-[WebAccessibilityObjectWrapper accessibilityAttributeNames]):
(createAccessibilityRoleMap):
(-[WebAccessibilityObjectWrapper accessibilityAttributeValue:]):
2013-09-10 Anders Carlsson <andersca@apple.com>
Remove wtf/Alignment.h
https://bugs.webkit.org/show_bug.cgi?id=121077
Reviewed by Andreas Kling.
* platform/PODArena.h:
(WebCore::PODArena::minAlignment):
* platform/graphics/cpu/arm/filters/FELightingNEON.h:
(WebCore::FELighting::platformApplyNeon):
2013-09-10 Zoltan Horvath <zoltan@webkit.org>
[Qt] Add FloatingObjects.h to Target.pri
https://bugs.webkit.org/show_bug.cgi?id=121117
Reviewed by Andreas Kling.
No new tests, no behavior change.
* Target.pri:
2013-09-10 Sergio Correia <sergio.correia@openbossa.org>
Fix EFL build after r155477
https://bugs.webkit.org/show_bug.cgi?id=121126
Reviewed by Antonio Gomes.
No new tests, build fix.
* CMakeLists.txt: MediaStreamComponent.cpp and MediaStreamDescriptor.cpp
were added with an incorrect path.
2013-09-10 Andreas Kling <akling@apple.com>
AnimationController should have a Frame& internally.
<https://webkit.org/b/121078>
Reviewed by Anders Carlsson.
The AnimationController is owned by the Frame so make the back-pointer
a reference. This knocks off a couple of null checks.
2013-09-10 Anders Carlsson <andersca@apple.com>
More WTF/Alignment.h removal
https://bugs.webkit.org/show_bug.cgi?id=121125
Reviewed by Andreas Kling.
* platform/PODArena.h:
2013-09-10 Eric Carlson <eric.carlson@apple.com>
Make MediaStream objects ScriptWrappable
https://bugs.webkit.org/show_bug.cgi?id=120879
Reviewed by Jer Noble.
* Modules/mediastream/MediaStream.h: Inherit from ScriptWrappable.
* Modules/mediastream/MediaStreamTrack.h: Ditto.
* Modules/mediastream/RTCDTMFSender.h: Ditto.
* Modules/mediastream/RTCDataChannel.h: Ditto.
* Modules/mediastream/RTCIceCandidate.h: Ditto.
* Modules/mediastream/RTCPeerConnection.h: Ditto.
* Modules/mediastream/RTCSessionDescription.h: Ditto.
* Modules/mediastream/RTCStatsReport.h: Ditto.
* Modules/mediastream/RTCStatsResponse.h: Ditto.
2013-09-10 Eric Carlson <eric.carlson@apple.com>
Split MediaStreamDescriptor.h and MediaStreamComponent.h into .h and .cpp
https://bugs.webkit.org/show_bug.cgi?id=120878
Reviewed by Jer Noble.
No new tests, no functional change.
* CMakeLists.txt: Add MediaStreamComponent.cpp and MediaStreamDescriptor.cpp.
* GNUmakefile.list.am: Ditto.
* Modules/mediastream/LocalMediaStream.cpp:
(WebCore::LocalMediaStream::create): MediaStreamDescriptor::create() doesn't take a UUID.
* Modules/mediastream/MediaStream.cpp:
(WebCore::createFromSourceVectors): Ditto.
* WebCore.xcodeproj/project.pbxproj: Add MediaStreamComponent.cpp and MediaStreamDescriptor.cpp.
* platform/mediastream/MediaStreamComponent.cpp: Added.
* platform/mediastream/MediaStreamComponent.h:
* platform/mediastream/MediaStreamDescriptor.cpp: Added.
* platform/mediastream/MediaStreamDescriptor.h:
2013-09-10 Brent Fulgham <bfulgham@apple.com>
[Windows] Create SharedGDIObject Class Template
https://bugs.webkit.org/show_bug.cgi?id=121037
Reviewed by Anders Carlsson.
* WebCore.vcxproj/WebCore.vcxproj: Remove RefCountedGDIHandle.h, and
add new SharedGDIObject.h file.
* WebCore.vcxproj/WebCore.vcxproj.filters: Ditto.
* platform/graphics/FontPlatformData.h:
(WebCore::FontPlatformData::hfont): Switch to new SharedGDIObject.
* platform/graphics/win/FontPlatformDataCGWin.cpp:
(WebCore::FontPlatformData::FontPlatformData): Ditto.
* platform/graphics/win/FontPlatformDataCairoWin.cpp:
(WebCore::FontPlatformData::FontPlatformData): Ditto.
* platform/graphics/win/FontPlatformDataWin.cpp:
(WebCore::FontPlatformData::FontPlatformData): Ditto.
* platform/graphics/win/RefCountedGDIHandle.h: Removed.
* platform/graphics/win/SharedGDIObject.h: Added.
(WebCore::SharedGDIObject::create):
(WebCore::SharedGDIObject::get):
(WebCore::SharedGDIObject::hash):
(WebCore::SharedGDIObject::SharedGDIObject):
2013-09-10 Tim Horton <timothy_horton@apple.com>
[mac] PDFDocumentImage should use PDFKit to draw
https://bugs.webkit.org/show_bug.cgi?id=120651
<rdar://problem/12810731>
Unreviewed hopeful build fix.
* platform/graphics/mac/PDFDocumentImageMac.mm:
2013-09-10 Tim Horton <timothy_horton@apple.com>
[mac] PDFDocumentImage should use PDFKit to draw
https://bugs.webkit.org/show_bug.cgi?id=120651
<rdar://problem/12810731>
Reviewed by Alexey Proskuryakov.
Use PDFKit to draw PDF-in-<img> on Mac, so that annotations in PDF are painted.
Test: fast/images/pdf-as-image-with-annotations.html
* WebCore.xcodeproj/project.pbxproj:
Add PDFDocumentImageMac.mm.
* platform/graphics/cg/PDFDocumentImage.cpp:
(WebCore::PDFDocumentImage::PDFDocumentImage):
We don't need to initialize m_document anymore because it's now a RetainPtr.
Initialize m_hasPage to false.
(WebCore::PDFDocumentImage::~PDFDocumentImage):
We don't need to manually release our CGPDFDocumentRef anymore because it's now a RetainPtr.
(WebCore::PDFDocumentImage::size):
Use expandedIntSize for explicitness.
(WebCore::PDFDocumentImage::applyRotationForPainting):
Rename adjustCTM to applyRotationForPainting, and move the one non-rotation related transformation out.
We need to do this because PDFKit applies the rotation transformation itself, so we don't need to.
Also, explicitly use std::min instead of importing the whole std namespace.
(WebCore::PDFDocumentImage::dataChanged):
Assert that we don't re-enter dataChanged after we've created a document,
because it seems like that shouldn't happen - we only create a document when
we've supposedly received all data, and it would be nice if we didn't have
all this varying code to deal with SharedBuffers changing out from under each other.
Factor the code to create a CGPDFDocumentRef out into createPDFDocument, so we can
replace it with a different implementation that creates a PDFDocument.
(WebCore::PDFDocumentImage::setCurrentPage):
Make all page-number-related things unsigned, since they are in CG and PDFKit,
and add m_hasPage to denote whether we've acquired a valid page yet.
Factor code to retrieve the PDF box bounds into computeBoundsForCurrentPage.
Remove setCurrentPage itself, as we never use a page other than the first page;
we will call computeBoundsForCurrentPage and set hasPage in dataChanged, now.
(WebCore::PDFDocumentImage::draw):
Fix a weird comment.
Factor code that actually draws the PDF out into drawPDFPage.
The rest of the functions in this file are only built for USE(CG) && !PLATFORM(MAC):
(WebCore::PDFDocumentImage::createPDFDocument):
Factored out of dataChanged(). Use the PLATFORM(MAC) way of making a
CGDataProvider from a SharedBuffer everywhere; we're already using it on
iOS, and it should also work for Windows, the only other USE(CG) platform.
Since we only createPDFDocument() after all data has been received, remove
the comment about the SharedBuffer being secretly written to behind its back.
(WebCore::PDFDocumentImage::computeBoundsForCurrentPage):
Factored out of setCurrentPage().
Use deg2rad since we have it.
(WebCore::PDFDocumentImage::pageCount):
(WebCore::PDFDocumentImage::drawPDFPage):
Factored out of draw().
Reduced an unnecessary transform (we were effectively doing mediaBox.origin - cropBox.origin - mediaBox.origin).
* platform/graphics/cg/PDFDocumentImage.h:
Unindent all the things, as we don't indent the first level inside a namespace scope.
Forward-declare PDFDocument.
Make m_currentPage unsigned as it should be.
Add m_hasPage.
Make m_document a PDFDocument on PLATFORM(MAC) and a CGPDFDocumentRef on other platforms.
* platform/graphics/mac/PDFDocumentImageMac.mm: Added.
Soft-link in PDFKit and specifically the PDFDocument class.
(WebCore::PDFDocumentImage::createPDFDocument):
Create our PDFDocument from the SharedBuffer's NSData directly. This shouldn't be a problem
(with respect to the SharedBuffer's data being appended to in secret), because we've waited
for the document to finish loading before getting here.
(WebCore::PDFDocumentImage::computeBoundsForCurrentPage):
Ask PDFKit for the page's media and crop boxes; it automatically performs the correct fallback.
Ask PDFKit for the page's rotation.
(WebCore::PDFDocumentImage::pageCount):
Ask PDFKit for the page count.
(WebCore::PDFDocumentImage::drawPDFPage):
Paint the current page of the PDF. Note that we do not apply the rotation here
via applyRotationForPainting because PDFKit will do it itself.
Save and restore two bits of CG state which aren't saved and restored with the
graphics state, as PDFKit can mutate them above us (<rdar://problem/14951759>).
* platform/mac/SoftLinking.h:
I couldn't find any clients of SOFT_LINK_FRAMEWORK_IN_CORESERVICES_UMBRELLA,
so I made it the more generic SOFT_LINK_FRAMEWORK_IN_UMBRELLA, taking the name
of the umbrella framework and the subframework, so I could use it to soft link
Quartz.framework's PDFKit.framework.
2013-09-10 Tim Horton <timothy_horton@apple.com>
[mac] <progress> has rendering artifacts along the bottom
https://bugs.webkit.org/show_bug.cgi?id=120865
<rdar://problem/11571240>
Reviewed by Simon Fraser.
Allow RenderTheme to force the height of a <progress> bar.
Test: platform/mac/fast/forms/indeterminate-progress-inline-height.html
* rendering/RenderProgress.cpp:
(WebCore::RenderProgress::computeLogicalHeight):
Borrowed from RenderMeter, allow the theme to override the size of the progress bar.
* rendering/RenderProgress.h:
Drive-by add OVERRIDE to a few things.
* rendering/RenderTheme.cpp:
(WebCore::RenderTheme::progressBarRectForBounds):
* rendering/RenderTheme.h:
Add a default implementation of progressBarRectForBounds that just passes the bounds through.
* rendering/RenderThemeMac.h:
* rendering/RenderThemeMac.mm:
(WebCore::RenderThemeMac::progressBarRectForBounds):
Override progressBarRectForBounds; the implementation is factored out of paintProgressBar.
(WebCore::RenderThemeMac::paintProgressBar):
Make use of the factored-out progressBarRectForBounds().
Drive-by apply the device scale factor to the progress bar's image buffer,
so that it is rendered at 2x on appropriate hardware. Also, multiply the
progress animation phase by the device scale factor, as the phase value seems
to be proportional to the actual pixel offset of the animation; without this,
the animation would appear to progress half as slowly in HiDPI.
2013-09-10 Chris Fleizach <cfleizach@apple.com>
AX: Expose DOM ID and ClassList to AX APIs for automation and AT element hashes
https://bugs.webkit.org/show_bug.cgi?id=120552
Reviewed by Darin Adler.
Add Mac support for exposing the DOM ID and DOM class list so that accessibility
clients can leverage that information.
Test: platform/mac/accessibility/id-class-attributes.html
* accessibility/AccessibilityObject.cpp:
(WebCore::AccessibilityObject::domIdentifier):
(WebCore::AccessibilityObject::domClassList):
* accessibility/AccessibilityObject.h:
* accessibility/mac/WebAccessibilityObjectWrapperMac.mm:
(-[WebAccessibilityObjectWrapper accessibilityAttributeNames]):
(convertStringsToNSArray):
(-[WebAccessibilityObjectWrapper accessibilityAttributeValue:]):
2013-09-10 Denis Nomiyama <d.nomiyama@samsung.com>
[GTK] accessibility/loading-iframe-sends-notification.html is failing
https://bugs.webkit.org/show_bug.cgi?id=98370
Reviewed by Chris Fleizach.
Enabled AXLayoutComplete on the GTK platform.
No new tests are required because this feature will use an existing
accessibility layout test that is currently failing on the GTK+ platform
(e.g. loading-iframe-sends-notification.html).
* accessibility/atk/AXObjectCacheAtk.cpp:
(WebCore::AXObjectCache::postPlatformNotification): Send layout-complete
signal in case of AXLayoutComplete.
* dom/Document.cpp:
(WebCore::Document::implicitClose): Enabled AXLayoutComplete on the GTK
platform.
* page/FrameView.cpp:
(WebCore::FrameView::layout): Enabled AXLayoutComplete on the GTK
platform.
2013-09-09 Brent Fulgham <bfulgham@apple.com>
[Windows] Change from using OwnPtr<GDI Stuff> to new GDIObject template.
https://bugs.webkit.org/show_bug.cgi?id=120778
Reviewed by Anders Carlsson.
Change code to use a GDI-specific smart pointer, rather than OwnPtr. This
is a first step to simplifying OwnPtr. It also gets rid of some Windows-
specific code in WTF.
* WebCore.vcxproj/WebCore.vcxproj: Add the new header file.
* WebCore.vcxproj/WebCore.vcxproj.filters: Ditto.
* page/win/FrameCGWin.cpp:
(WebCore::imageFromRect): Switch to GDIObject.
* page/win/FrameCairoWin.cpp:
(WebCore::imageFromRect): Switch to GDIObject.
* page/win/FrameWin.cpp:
(WebCore::imageFromSelection): Switch to GDIObject.
(WebCore::Frame::dragImageForSelection): Ditto.
(WebCore::Frame::nodeImage): Ditto.
* page/win/FrameWin.h:
* platform/graphics/ca/win/CACFLayerTreeHost.cpp:
(WebCore::getDirtyRects): Switch from OwnPtr to GDIObject.
* platform/graphics/win/FontCacheWin.cpp:
(WebCore::createGDIFont): Switch to GDIObject.
(WebCore::FontCache::createFontPlatformData): Ditto.
* platform/graphics/win/FontCustomPlatformData.cpp:
(WebCore::FontCustomPlatformData::fontPlatformData): Switch to GDIObject.
* platform/graphics/win/FontCustomPlatformDataCairo.cpp:
(WebCore::FontCustomPlatformData::fontPlatformData): Switch to GDIObject.
* platform/graphics/win/GraphicsContextCGWin.cpp:
(WebCore::GraphicsContext::releaseWindowsContext): Switch to GDIObject.
* platform/graphics/win/GraphicsContextCairoWin.cpp:
(WebCore::GraphicsContext::releaseWindowsContext): Switch to GDIObject.
* platform/graphics/win/GraphicsContextWin.cpp:
(WebCore::GraphicsContext::getWindowsContext): Switch to GDIObject.
* platform/graphics/win/SimpleFontDataWin.cpp:
(WebCore::SimpleFontData::platformCreateScaledFontData): Switch to GDIObject.
* platform/win/CursorWin.cpp:
(WebCore::createSharedCursor): Switch to GDIObject.
* platform/win/DragImageCGWin.cpp:
(WebCore::scaleDragImage): Switch to GDIObject.
(WebCore::createDragImageFromImage):
* platform/win/DragImageCairoWin.cpp:
(WebCore::scaleDragImage): Switch to GDIObject.
(WebCore::createDragImageFromImage): Ditto.
* platform/win/DragImageWin.cpp:
(WebCore::createDragImageForLink): Switch to GDIObject.
* platform/win/PasteboardWin.cpp:
(WebCore::Pasteboard::writeImage): Switch to GDIObject.
* platform/win/ScrollbarThemeWin.cpp:
(WebCore::ScrollbarThemeWin::paintTrackPiece): Switch to GDIObject.
* plugins/win/PluginViewWin.cpp:
(WebCore::PluginView::updatePluginWidget): Switch to GDIObject.
(WebCore::PluginView::snapshot): Ditto.
* rendering/RenderThemeWin.cpp:
(WebCore::drawControl): Switch to GDIObject.
2013-09-10 Allan Sandfeld Jensen <allan.jensen@digia.com>
REGRESSION (r147454): Youtube annotation links to new window broken
https://bugs.webkit.org/show_bug.cgi?id=114242
Reviewed by Anders Carlsson.
Set the UserGestureIndicator to allow popups the same way the issue was solved for WebKit2.
* plugins/PluginView.cpp:
(WebCore::PluginView::performRequest):
2013-09-10 Alberto Garcia <berto@igalia.com>
[GTK] The code generator produces a warning if a parameter can be NULL
https://bugs.webkit.org/show_bug.cgi?id=121093
Reviewed by Christophe Dumez.
Return an empty string instead of an undefined value if a
particular parameter doesn't need to be checked.
* bindings/scripts/CodeGeneratorGObject.pm:
(GetGReturnMacro):
2013-09-10 Thiago de Barros Lacerda <thiago.lacerda@openbossa.org>
MediaStream API: Enhance MediaStreamDescriptor add/remove component
https://bugs.webkit.org/show_bug.cgi?id=120874
Merge blink https://chromium.googlesource.com/chromium/blink/+/67fcacf13ce922a762d7a1c6fb9e1b8e51e662ea
Reviewed by Eric Carlson.
No new tests needed.
* Modules/mediastream/MediaStream.cpp:
(WebCore::MediaStream::addTrack):
(WebCore::MediaStream::removeTrack):
(WebCore::MediaStream::addRemoteTrack):
(WebCore::MediaStream::removeRemoteTrack):
* platform/mediastream/MediaStreamDescriptor.h:
(WebCore::MediaStreamDescriptor::addRemoteTrack):
(WebCore::MediaStreamDescriptor::removeRemoteTrack):
(WebCore::MediaStreamDescriptor::addComponent):
(WebCore::MediaStreamDescriptor::removeComponent):
2013-09-10 Andreas Kling <akling@apple.com>
toFooElement() should use static_cast, not reinterpret_cast.
<https://webkit.org/b/121087>
Reviewed by Antti Koivisto.
reinterpret_cast is not safe for downcasting with multiple inheritance.
Add a ELEMENT_TYPE_CASTS(classname) macro that goes after class definitions.
It expands into the following methods:
- FooElement* toFooElement(Node*)
- const FooElement* toFooElement(const Node*)
- FooElement& toFooElement(Node&)
- const FooElement& toFooElement(const Node&)
As a bonus, it also adds these to catch unnecessary casting:
- void toFooElement(const Node*)
- void toFooElement(const Node&)
There might be a more clever way of doing this, but this gets us to a
correct place so we can think in peace.
* bridge/qt/qt_pixmapruntime.cpp:
(JSC::Bindings::assignToHTMLImageElement):
(JSC::Bindings::QtPixmapRuntime::toQt):
* dom/Element.h:
(WebCore::isElement):
* dom/make_names.pl:
(printTypeHelpers):
* html/HTMLAnchorElement.h:
* html/HTMLAreaElement.h:
* html/HTMLAudioElement.h:
* html/HTMLBaseElement.h:
* html/HTMLCanvasElement.h:
* html/HTMLElement.h:
(WebCore::isHTMLElement):
* html/HTMLFieldSetElement.h:
* html/HTMLFormElement.h:
* html/HTMLFrameSetElement.h:
* html/HTMLImageElement.h:
* html/HTMLInputElement.h:
* html/HTMLLabelElement.h:
* html/HTMLLegendElement.h:
* html/HTMLMapElement.h:
* html/HTMLMeterElement.h:
* html/HTMLOptGroupElement.h:
* html/HTMLOptionElement.h:
* html/HTMLParamElement.h:
* html/HTMLProgressElement.h:
* html/HTMLScriptElement.h:
* html/HTMLSourceElement.h:
* html/HTMLStyleElement.h:
* html/HTMLTableElement.h:
* html/HTMLTableRowElement.h:
* html/HTMLTextAreaElement.h:
* html/HTMLTitleElement.h:
* html/HTMLTrackElement.h:
* svg/SVGAltGlyphDefElement.h:
* svg/SVGAltGlyphElement.h:
* svg/SVGAltGlyphItemElement.h:
* svg/SVGAnimateMotionElement.h:
* svg/SVGAnimateTransformElement.h:
* svg/SVGCircleElement.h:
* svg/SVGClipPathElement.h:
* svg/SVGCursorElement.h:
* svg/SVGEllipseElement.h:
* svg/SVGFEDistantLightElement.h:
* svg/SVGFEFuncAElement.h:
* svg/SVGFEFuncBElement.h:
* svg/SVGFEFuncGElement.h:
* svg/SVGFEFuncRElement.h:
* svg/SVGFEMergeNodeElement.h:
* svg/SVGFEPointLightElement.h:
* svg/SVGFESpotLightElement.h:
* svg/SVGFilterElement.h:
* svg/SVGFontElement.h:
* svg/SVGFontFaceElement.h:
* svg/SVGFontFaceNameElement.h:
* svg/SVGFontFaceSrcElement.h:
* svg/SVGFontFaceUriElement.h:
* svg/SVGForeignObjectElement.h:
* svg/SVGGlyphElement.h:
* svg/SVGGlyphRefElement.h:
* svg/SVGHKernElement.h:
* svg/SVGImageElement.h:
* svg/SVGLineElement.h:
* svg/SVGLinearGradientElement.h:
* svg/SVGMPathElement.h:
* svg/SVGMarkerElement.h:
* svg/SVGMaskElement.h:
* svg/SVGMissingGlyphElement.h:
* svg/SVGPathElement.h:
* svg/SVGPatternElement.h:
* svg/SVGRadialGradientElement.h:
* svg/SVGRectElement.h:
* svg/SVGSVGElement.h:
* svg/SVGScriptElement.h:
* svg/SVGStyleElement.h:
* svg/SVGTextElement.h:
* svg/SVGTextPathElement.h:
* svg/SVGTitleElement.h:
* svg/SVGUseElement.h:
* svg/SVGVKernElement.h:
* svg/SVGViewElement.h:
2013-09-10 Mario Sanchez Prada <mario.prada@samsung.com>
[GTK] Test /webkit/atk/getTextInParagraphAndBodyModerate fails
https://bugs.webkit.org/show_bug.cgi?id=105538
Reviewed by Chris Fleizach.
Expose '\n' for linebreaks when they were explicitly set by the
author of the web content with a <br> tag.
Tests: accessibility/paragraph-with-linebreaks.html
* accessibility/AccessibilityNodeObject.cpp:
(WebCore::shouldAddSpaceBeforeAppendingNextElement): Helper
function to decide when to append spaces when building the text
under an element, considering line breaks.
(WebCore::AccessibilityNodeObject::textUnderElement): Use the
shouldAddSpaceBeforeAppendingNextElement() function here.
* accessibility/AccessibilityRenderObject.cpp:
(WebCore::AccessibilityRenderObject::textUnderElement): Return the
renderer's text for accessibility objects exposing <br> elements.
* html/parser/HTMLParserIdioms.h:
(WebCore::isHTMLSpaceButNotLineBreak): New helper function, useful
to be passed to other functions like simplifyWhiteSpace().
2013-09-10 Arpita Bahuguna <a.bah@samsung.com>
When deleting editable content, typing style should be reset when moving into another node.
https://bugs.webkit.org/show_bug.cgi?id=120726
Reviewed by Ryosuke Niwa.
When moving from one text node to the other, while deleting characters,
the deleted text node's style was being applied to any new characters
added into the existing text node.
Typing Style in the frame selection maintains the editing style for the
deleted text node, so that if new characters are inserted at the position
of the deleted text node, it's style can be applied to them.
However, when moving into another text node, we should reset or clear the
typing style maintained by the frame selection. This ensures that any new
content inserted within the existing node does not take on any uncleared
style of the deleted node.
Test: editing/deleting/maintain-style-after-delete.html
* editing/DeleteSelectionCommand.cpp:
(WebCore::DeleteSelectionCommand::saveTypingStyleState):
Calling clearTypingStyle() on frame selection whenever deletion occurs
within the same text node. Thus any existing typing styleh held by the
frame selection shall be cleared.
2013-09-09 Darin Adler <darin@apple.com>
Some refinements in FrameView::layout
https://bugs.webkit.org/show_bug.cgi?id=121076
Reviewed by Andreas Kling.
* page/FrameView.cpp:
(WebCore::FrameView::layout): Use a reference for the document in
this function since code assumes it's non-null anyway. Change code to
only call styleResolverIfExists once. Rewrite comments about blocks
and the scopes they create for better clarity. Make m_nestedLayoutCount
easier to read. Use HTMLElement* for the pointer to the body element.
Moved the call to calculateScrollbarModesForLayout in so we don't
waste time doing it for subtree layouts. Get rid of the unhelpful
currentHMode and currentVMode local variables. Get rid of an extra
block scope we did not need.
2013-09-09 Santosh Mahto <santosh.ma@samsung.com>
Adding "explicit" keyword in DOM related classes constructor
https://bugs.webkit.org/show_bug.cgi?id=121031
Reviewed by Ryosuke Niwa.
Added the explicit keyword in constructors.
* dom/ActiveDOMObject.h:
* dom/ContainerNode.h:
* dom/DocumentStyleSheetCollection.h:
* dom/ElementAncestorIterator.h:
* dom/ElementData.h:
* dom/ElementRareData.h:
* dom/EventListenerMap.h:
* dom/QualifiedName.h:
(WebCore::QualifiedName::QualifiedName):
* dom/TreeScope.h:
* dom/ViewportArguments.h:
(WebCore::ViewportArguments::ViewportArguments):
* dom/VisitedLinkState.h:
2013-09-09 Andreas Kling <akling@apple.com>
Remove unreviewed gunk I just accidentally committed :|
2013-09-09 Andreas Kling <akling@apple.com>
HTMLTextAreaElement no longer needs custom style resolve callbacks.
<https://webkit.org/b/121073>
Reviewed by Ryosuke Niwa.
After r155408 HTMLTextAreaElement doesn't override didAttachRenderer() anymore,
so we don't need to fire callbacks on textarea elements during style resolve.
* html/HTMLTextAreaElement.cpp:
(WebCore::HTMLTextAreaElement::HTMLTextAreaElement):
2013-09-09 Andreas Kling <akling@apple.com>
ScriptController should have a Frame& internally.
<https://webkit.org/b/121071>
Reviewed by Anders Carlsson.
Change ScriptController::m_frame to a reference since it's tied to
the lifetime of the owning Frame.
2013-09-09 Andreas Kling <akling@apple.com>
ScriptRunner should have a Document& internally.
<https://webkit.org/b/121072>
Reviewed by Anders Carlsson.
Change ScriptRunner::m_document to a reference since it's tied to
the lifetime of the Document.
2013-09-09 Andreas Kling <akling@apple.com>
Ref-ify more stack guards.
<https://webkit.org/b/121070>
Rubber-stamped by Anders Carlsson.
RefPtr<Foo> protect(this) => Ref<Foo> protect(*this).
2013-09-09 Andreas Kling <akling@apple.com>
Generate more SVG type checks and conversions.
<https://webkit.org/b/121066>
Reviewed by Anders Carlsson.
Switch another slew of SVG elements to auto-generated isFooElement()
and toFooElement() helpers.
Removed now-unnecessary casts and assertions as appropriate.
Converted some simple loops to childrenOfType iteration instead of
traversing child Nodes.
PS. This patch also adds const versions of toFooElement().
2013-09-09 Dean Jackson <dino@apple.com>
[WebGL] Allow multithreaded OpenGL contexts
https://bugs.webkit.org/show_bug.cgi?id=121062
Reviewed by Simon Fraser.
Expose a new preference "multithreadedWebGLEnabled".
Also examine the value of that preference and, on Mac,
tell the CGLContext that it should go to multithreaded mode.
* html/canvas/WebGLRenderingContext.cpp:
(WebCore::WebGLRenderingContext::create): Look at the value of the new setting, and
toggle a flag on the context attributes.
* page/Settings.in: New Setting "multithreadedWebGLEnabled".
* platform/graphics/GraphicsContext3D.h:
(WebCore::GraphicsContext3D::Attributes::Attributes): Add a "multithreaded" flag.
* platform/graphics/mac/GraphicsContext3DMac.mm:
(WebCore::GraphicsContext3D::GraphicsContext3D): If the context attributes
suggest we should, tell the OpenGL context to go into multithreaded mode.
2013-09-09 Ryosuke Niwa <rniwa@webkit.org>
Remove HTMLTextFormControl::fixPlaceholderRenderer
https://bugs.webkit.org/show_bug.cgi?id=121058
Reviewed by Kent Tamura.
HTMLTextFormControl::fixPlaceholderRenderer was added in r118733 to swap the order in which placeholder appears.
Namely, when a text form control element is focused, placeholder should be rendered behind the text for the caret
to render on top of, not behind, the placeholder text. However, we can achieve the same effect by changing
the order of elements in the shadow DOM instead of manually manipuating the render tree as the assertion failure
mentioned in the change log is a bogus one.
Cleaned up the code by removing HTMLTextFormControl::fixPlaceholderRenderer and changed the order in which inner
text element and placeholder element appear. Also fixed the assertion in Position's constructor.
* dom/Position.cpp:
(WebCore::Position::Position): The original assertion was bogus. What we don't want have is for a Position to be
before or after a shadow root. It's fine for it be anchroed against the shadow root as long as it's inside.
* html/HTMLTextAreaElement.cpp:
(WebCore::HTMLTextAreaElement::updatePlaceholderText): Insert the placeholder before the inner text element.
* html/HTMLTextAreaElement.h:
* html/HTMLTextFormControlElement.cpp:
* html/HTMLTextFormControlElement.h:
* html/TextFieldInputType.cpp:
(WebCore::TextFieldInputType::updatePlaceholderText): Ditto.
* html/TextFieldInputType.h:
2013-09-09 Andreas Kling <akling@apple.com>
Hide node() below RenderSVGModelObject, use element() instead.
<https://webkit.org/b/121051>
Reviewed by Darin Adler.
This was almost already there, just delete node() and add an element() that returns a SVGElement*.
The SVG render tree is crazy casual about compile-time types, this is only scratching the surface.
2013-09-09 Thiago de Barros Lacerda <thiago.lacerda@openbossa.org>
Fixing EFL build
https://bugs.webkit.org/show_bug.cgi?id=121048
Reviewed by Darin Adler.
No new tests needed.
* platform/efl/RenderThemeEfl.cpp:
(WebCore::RenderThemeEfl::applyEdjeRTLState):
2013-09-09 Bem Jones-Bey <bjonesbe@adobe.com>
Move Floats out of RenderBlock
https://bugs.webkit.org/show_bug.cgi?id=120779
Reviewed by Alexandru Chiculita.
Move FloatingObject, FloatingObjects and related code into
FloatingObjects.{h,cpp}. This not only makes the code more readable
and maintainable, it also will allow for more decoupling of
RenderBlock and the FloatingObjects, hopefully making it possible for
FloatingObjects to be more central and not need to have one for each
RenderBlock that is affected by floats.
No new tests, no behavior change.
* CMakeLists.txt:
* GNUmakefile.list.am:
* Target.pri:
* WebCore.vcxproj/WebCore.vcxproj:
* WebCore.xcodeproj/project.pbxproj:
* rendering/FloatingObjects.cpp: Added.
(WebCore::ComputeFloatOffsetAdapter::ComputeFloatOffsetAdapter):
(WebCore::ComputeFloatOffsetAdapter::lowValue):
(WebCore::ComputeFloatOffsetAdapter::highValue):
(WebCore::ComputeFloatOffsetAdapter::outermostFloat):
(WebCore::FloatingObjects::FloatingObjects):
(WebCore::FloatingObjects::~FloatingObjects):
(WebCore::FloatingObjects::clearLineBoxTreePointers):
(WebCore::FloatingObjects::clear):
(WebCore::FloatingObjects::increaseObjectsCount):
(WebCore::FloatingObjects::decreaseObjectsCount):
(WebCore::FloatingObjects::intervalForFloatingObject):
(WebCore::FloatingObjects::addPlacedObject):
(WebCore::FloatingObjects::removePlacedObject):
(WebCore::FloatingObjects::add):
(WebCore::FloatingObjects::remove):
(WebCore::FloatingObjects::computePlacedFloatsTree):
(WebCore::FloatingObjects::logicalLeftOffset):
(WebCore::FloatingObjects::logicalRightOffset):
(WebCore::rangesIntersect):
(WebCore::::updateOffsetIfNeeded):
(WebCore::::collectIfNeeded):
(WebCore::::getHeightRemaining):
(WebCore::::string):
* rendering/FloatingObjects.h: Added.
(WebCore::FloatingObject::FloatingObject):
(WebCore::FloatingObject::clone):
(WebCore::FloatingObject::type):
(WebCore::FloatingObject::renderer):
(WebCore::FloatingObject::isPlaced):
(WebCore::FloatingObject::setIsPlaced):
(WebCore::FloatingObject::x):
(WebCore::FloatingObject::maxX):
(WebCore::FloatingObject::y):
(WebCore::FloatingObject::maxY):
(WebCore::FloatingObject::width):
(WebCore::FloatingObject::height):
(WebCore::FloatingObject::setX):
(WebCore::FloatingObject::setY):
(WebCore::FloatingObject::setWidth):
(WebCore::FloatingObject::setHeight):
(WebCore::FloatingObject::frameRect):
(WebCore::FloatingObject::setFrameRect):
(WebCore::FloatingObject::paginationStrut):
(WebCore::FloatingObject::setPaginationStrut):
(WebCore::FloatingObject::isInPlacedTree):
(WebCore::FloatingObject::setIsInPlacedTree):
(WebCore::FloatingObject::shouldPaint):
(WebCore::FloatingObject::setShouldPaint):
(WebCore::FloatingObject::isDescendant):
(WebCore::FloatingObject::setIsDescendant):
(WebCore::FloatingObject::setRenderer):
(WebCore::FloatingObject::originatingLine):
(WebCore::FloatingObject::setOriginatingLine):
(WebCore::FloatingObject::logicalTop):
(WebCore::FloatingObject::logicalBottom):
(WebCore::FloatingObject::logicalLeft):
(WebCore::FloatingObject::logicalRight):
(WebCore::FloatingObject::logicalWidth):
(WebCore::FloatingObject::pixelSnappedLogicalTop):
(WebCore::FloatingObject::pixelSnappedLogicalBottom):
(WebCore::FloatingObject::pixelSnappedLogicalLeft):
(WebCore::FloatingObject::pixelSnappedLogicalRight):
(WebCore::FloatingObject::setLogicalTop):
(WebCore::FloatingObject::setLogicalLeft):
(WebCore::FloatingObject::setLogicalHeight):
(WebCore::FloatingObject::setLogicalWidth):
(WebCore::FloatingObjectHashFunctions::hash):
(WebCore::FloatingObjectHashFunctions::equal):
(WebCore::FloatingObjectHashTranslator::hash):
(WebCore::FloatingObjectHashTranslator::equal):
(WebCore::FloatingObjects::setHorizontalWritingMode):
(WebCore::FloatingObjects::hasLeftObjects):
(WebCore::FloatingObjects::hasRightObjects):
(WebCore::FloatingObjects::set):
(WebCore::FloatingObjects::placedFloatsTree):
* rendering/RenderBlock.cpp:
(WebCore::RenderBlock::RenderBlock):
(WebCore::RenderBlock::insertFloatingObject):
* rendering/RenderBlock.h:
* rendering/RenderBlockLineLayout.cpp:
(WebCore::LineWidth::shrinkAvailableWidthForNewFloatIfNeeded):
(WebCore::LineLayoutState::lastFloat):
(WebCore::LineLayoutState::setLastFloat):
* rendering/RenderView.cpp:
(WebCore::RenderView::intervalArena):
2013-09-09 David Hyatt <hyatt@apple.com>
REGRESSION (r155377): Convert the media elements that were RenderBlocks to RenderBlockFlows
https://bugs.webkit.org/show_bug.cgi?id=121052
Reviewed by Anders Carlsson.
Convert a couple of media renderers that I missed from RenderBlock to RenderBlockFlow.
The previous patch that I landed added asserts that get triggered now when this
situation occurs.
* rendering/RenderMediaControlElements.cpp:
(WebCore::RenderMediaVolumeSliderContainer::RenderMediaVolumeSliderContainer):
(WebCore::RenderMediaVolumeSliderContainer::layout):
(WebCore::RenderTextTrackContainerElement::RenderTextTrackContainerElement):
(WebCore::RenderTextTrackContainerElement::layout):
* rendering/RenderMediaControlElements.h:
2013-09-09 Thiago de Barros Lacerda <thiago.lacerda@openbossa.org>
[Bug Fix] Calling m_audioComponents.remove in removeAudioComponent (MediaStreamDescriptor)
https://bugs.webkit.org/show_bug.cgi?id=121034
Reviewed by Eric Carlson.
No new tests needed.
* platform/mediastream/MediaStreamDescriptor.h:
(WebCore::MediaStreamDescriptor::removeAudioComponent):
2013-09-09 Anders Carlsson <andersca@apple.com>
Stop using WTF type traits in WebCore
https://bugs.webkit.org/show_bug.cgi?id=121042
Reviewed by Andreas Kling.
Replace uses of WTF type traits in CrossThreadCopier with a simpler solution
that uses std::is_convertible_to and some helpers.
* dom/CrossThreadTask.h:
* platform/CrossThreadCopier.h:
* platform/MainThreadTask.h:
2013-09-06 Ryosuke Niwa <rniwa@webkit.org>
Internals should always cause a layout before calling into TextIterator
https://bugs.webkit.org/show_bug.cgi?id=120891
Reviewed by Antti Koivisto.
Inspired by https://chromium.googlesource.com/chromium/blink/+/5fee5da7b04a710171c79bd6e87eca3533188e45.
Force a layout in the constructors of TextIterator, and SimplifiedBackwardsTextIterator and remove
superfluous calls to updateLayout() in other places.
As much as I hate for a constructor to have a side effect like this, I couldn't think of a better place
to update the layout. Unfortunately, we're slowly moving away from manually createing TextIterator and
wrapping them in a static function.
* editing/TextIterator.cpp:
(WebCore::TextIterator::TextIterator):
(WebCore::SimplifiedBackwardsTextIterator::SimplifiedBackwardsTextIterator):
(WebCore::TextIterator::rangeFromLocationAndLength):
(WebCore::findPlainText):
2013-09-09 David Hyatt <hyatt@apple.com>
Move layoutBlock and layoutBlockChildren into RenderBlockFlow
https://bugs.webkit.org/show_bug.cgi?id=121036
Reviewed by Dean Jackson.
Move layoutBlock into RenderBlockFlow and make the base class version of
the method ASSERT_NOT_REACHED. Begin the process of moving block layout
into RenderBlockFlow by putting layoutBlockChildren there as well.
This patch also puts clearFloats into RenderBlockFlow and just ditches the
SVG-specific forceLayoutInlineChildren by letting RenderSVGText do what it
needs in its own file.
Convert RenderListBox to be a RenderBlockFlow, since this is necessary for it
to get the correct layoutBlock method.
Patch RenderRegion to call RenderBlockFlow::layoutBlock rather than RenderBlock::layoutBlock.
Fix run-ins so that they create block flows rather than blocks, and restrict run-ins to
only be block flows.
* rendering/RenderBlock.cpp:
(WebCore::RenderBlock::layoutBlock):
(WebCore::RenderBlock::createReplacementRunIn):
(WebCore::RenderBlock::moveRunInUnderSiblingBlockIfNeeded):
* rendering/RenderBlock.h:
* rendering/RenderBlockFlow.cpp:
(WebCore::RenderBlockFlow::clearFloats):
(WebCore::RenderBlockFlow::layoutBlock):
(WebCore::RenderBlockFlow::layoutBlockChildren):
* rendering/RenderBlockFlow.h:
* rendering/RenderBlockLineLayout.cpp:
(WebCore::RenderBlockFlow::layoutInlineChildren):
* rendering/RenderListBox.cpp:
(WebCore::RenderListBox::RenderListBox):
(WebCore::RenderListBox::layout):
(WebCore::RenderListBox::paintObject):
(WebCore::RenderListBox::addFocusRingRects):
(WebCore::RenderListBox::nodeAtPoint):
* rendering/RenderListBox.h:
* rendering/RenderRegion.cpp:
(WebCore::RenderRegion::paintObject):
(WebCore::RenderRegion::styleDidChange):
(WebCore::RenderRegion::layoutBlock):
(WebCore::RenderRegion::insertedIntoTree):
(WebCore::RenderRegion::willBeRemovedFromTree):
(WebCore::RenderRegion::computeIntrinsicLogicalWidths):
(WebCore::RenderRegion::computePreferredLogicalWidths):
(WebCore::RenderRegion::updateLogicalHeight):
* rendering/RenderTextControlSingleLine.cpp:
(WebCore::RenderTextControlSingleLine::layout):
* rendering/svg/RenderSVGText.cpp:
(WebCore::RenderSVGText::layout):
2013-09-09 Antti Koivisto <antti@apple.com>
Try to fix GTK build.
Not reviewed.
* accessibility/AccessibilityTable.cpp:
(WebCore::AccessibilityTable::isTableExposableThroughAccessibility):
2013-09-09 Antti Koivisto <antti@apple.com>
Hide node() below RenderLayerModelObject, use element() instead
https://bugs.webkit.org/show_bug.cgi?id=121038
Reviewed by Dave Hyatt.
Switch all call sites to element(). Remove now unnecessary casts, type checks and dead code.
Make constructors below RenderLayerModelObject take an Element instead of a ContainerNode.
This also removes a branch from many hasTagName() and isFooElement() calls.
* accessibility/AccessibilityRenderObject.cpp:
(WebCore::startOfContinuations):
* accessibility/AccessibilityTable.cpp:
(WebCore::AccessibilityTable::isDataTable):
* accessibility/AccessibilityTableCell.cpp:
(WebCore::AccessibilityTableCell::titleUIElement):
* accessibility/AccessibilityTableColumn.cpp:
(WebCore::AccessibilityTableColumn::headerObjectForSection):
* editing/markup.cpp:
(WebCore::highestAncestorToWrapMarkup):
* html/HTMLTableCellElement.cpp:
(WebCore::HTMLTableCellElement::cellAbove):
* html/shadow/SliderThumbElement.cpp:
(WebCore::RenderSliderThumb::updateAppearance):
(WebCore::RenderSliderContainer::computeLogicalHeight):
(WebCore::RenderSliderContainer::layout):
* page/Frame.cpp:
(WebCore::Frame::frameForWidget):
* rendering/RenderBlock.cpp:
(WebCore::OverflowEventDispatcher::~OverflowEventDispatcher):
(WebCore::RenderBlock::RenderBlock):
(WebCore::RenderBlock::clone):
(WebCore::RenderBlock::createReplacementRunIn):
(WebCore::RenderBlock::paintObject):
(WebCore::RenderBlock::isSelectionRoot):
(WebCore::RenderBlock::nodeForHitTest):
(WebCore::RenderBlock::hasLineIfEmpty):
(WebCore::RenderBlock::addFocusRingRects):
* rendering/RenderBlock.h:
* rendering/RenderBlockFlow.cpp:
(WebCore::RenderBlockFlow::RenderBlockFlow):
* rendering/RenderBlockFlow.h:
* rendering/RenderBlockLineLayout.cpp:
(WebCore::RenderBlock::addOverflowFromInlineChildren):
* rendering/RenderBox.cpp:
(WebCore::RenderBox::RenderBox):
(WebCore::RenderBox::updateFromStyle):
(WebCore::RenderBox::scroll):
(WebCore::RenderBox::logicalScroll):
(WebCore::RenderBox::canBeProgramaticallyScrolled):
(WebCore::RenderBox::nodeAtPoint):
(WebCore::RenderBox::paintCustomHighlight):
(WebCore::RenderBox::computeLogicalWidthInRegion):
(WebCore::RenderBox::sizesLogicalWidthToFitContent):
(WebCore::RenderBox::localCaretRect):
* rendering/RenderBox.h:
* rendering/RenderBoxModelObject.cpp:
(WebCore::RenderBoxModelObject::RenderBoxModelObject):
* rendering/RenderBoxModelObject.h:
* rendering/RenderButton.cpp:
(WebCore::RenderButton::updateFromElement):
(WebCore::RenderButton::canHaveGeneratedChildren):
* rendering/RenderButton.h:
* rendering/RenderEmbeddedObject.cpp:
(WebCore::RenderEmbeddedObject::paintContents):
(WebCore::RenderEmbeddedObject::isReplacementObscured):
(WebCore::RenderEmbeddedObject::layout):
(WebCore::RenderEmbeddedObject::viewCleared):
(WebCore::RenderEmbeddedObject::handleUnavailablePluginIndicatorEvent):
* rendering/RenderFileUploadControl.cpp:
(WebCore::RenderFileUploadControl::updateFromElement):
(WebCore::RenderFileUploadControl::maxFilenameWidth):
(WebCore::RenderFileUploadControl::paintObject):
(WebCore::RenderFileUploadControl::computeIntrinsicLogicalWidths):
(WebCore::RenderFileUploadControl::uploadButton):
(WebCore::RenderFileUploadControl::fileTextValue):
* rendering/RenderFrame.cpp:
(WebCore::RenderFrame::edgeInfo):
(WebCore::RenderFrame::viewCleared):
* rendering/RenderFrameBase.cpp:
(WebCore::RenderFrameBase::layoutWithFlattening):
* rendering/RenderFrameSet.cpp:
(WebCore::RenderFrameSet::frameSet):
* rendering/RenderHTMLCanvas.cpp:
(WebCore::RenderHTMLCanvas::requiresLayer):
(WebCore::RenderHTMLCanvas::paintReplaced):
(WebCore::RenderHTMLCanvas::canvasSizeChanged):
* rendering/RenderIFrame.cpp:
(WebCore::RenderIFrame::isSeamless):
(WebCore::RenderIFrame::flattenFrame):
* rendering/RenderImage.cpp:
(WebCore::RenderImage::imageChanged):
(WebCore::RenderImage::paintAreaElementFocusRing):
(WebCore::RenderImage::areaElementFocusChanged):
(WebCore::RenderImage::paintIntoRect):
(WebCore::RenderImage::imageMap):
(WebCore::RenderImage::nodeAtPoint):
(WebCore::RenderImage::updateAltText):
* rendering/RenderInline.cpp:
(WebCore::RenderInline::clone):
(WebCore::RenderInline::hitTestCulledInline):
(WebCore::RenderInline::updateHitTestResult):
* rendering/RenderInline.h:
* rendering/RenderLayer.cpp:
(WebCore::RenderLayer::RenderLayer):
(WebCore::RenderLayer::~RenderLayer):
(WebCore::RenderLayer::name):
(WebCore::RenderLayer::isTransparent):
(WebCore::RenderLayer::scrollTo):
(WebCore::RenderLayer::resize):
(WebCore::RenderLayer::filterNeedsRepaint):
* rendering/RenderLayerBacking.cpp:
(WebCore::RenderLayerBacking::createPrimaryGraphicsLayer):
(WebCore::RenderLayerBacking::updateGraphicsLayerConfiguration):
* rendering/RenderLayerCompositor.cpp:
(WebCore::RenderLayerCompositor::frameContentsCompositor):
* rendering/RenderLayerFilterInfo.cpp:
(WebCore::RenderLayer::FilterInfo::notifyFinished):
(WebCore::RenderLayer::FilterInfo::updateReferenceFilterClients):
(WebCore::RenderLayer::FilterInfo::notifyCustomFilterProgramLoaded):
* rendering/RenderLayerModelObject.cpp:
(WebCore::RenderLayerModelObject::RenderLayerModelObject):
* rendering/RenderLayerModelObject.h:
(WebCore::RenderLayerModelObject::element):
* rendering/RenderListBox.cpp:
(WebCore::RenderListBox::selectElement):
(WebCore::RenderListBox::paintItemForeground):
(WebCore::RenderListBox::paintItemBackground):
(WebCore::RenderListBox::scrollTo):
(WebCore::RenderListBox::createScrollbar):
* rendering/RenderListItem.cpp:
(WebCore::isList):
(WebCore::enclosingList):
(WebCore::nextListItem):
(WebCore::previousListItem):
(WebCore::RenderListItem::calcValue):
(WebCore::RenderListItem::explicitValueChanged):
(WebCore::RenderListItem::setExplicitValue):
(WebCore::RenderListItem::clearExplicitValue):
(WebCore::previousOrNextItem):
(WebCore::RenderListItem::updateListMarkerNumbers):
* rendering/RenderMarquee.cpp:
(WebCore::RenderMarquee::marqueeSpeed):
* rendering/RenderMedia.cpp:
(WebCore::RenderMedia::mediaElement):
* rendering/RenderMediaControlElements.cpp:
(WebCore::RenderMediaControlTimelineContainer::layout):
(WebCore::RenderTextTrackContainerElement::layout):
* rendering/RenderMenuList.cpp:
(WebCore::RenderMenuList::selectElement):
(WebCore::RenderMenuList::valueChanged):
(WebCore::RenderMenuList::createScrollbar):
* rendering/RenderMeter.cpp:
(WebCore::RenderMeter::meterElement):
* rendering/RenderPart.cpp:
(WebCore::RenderPart::requiresAcceleratedCompositing):
(WebCore::RenderPart::embeddedContentBox):
* rendering/RenderProgress.cpp:
(WebCore::RenderProgress::progressElement):
* rendering/RenderReplaced.cpp:
(WebCore::RenderReplaced::positionForPoint):
(WebCore::RenderReplaced::isSelected):
* rendering/RenderSearchField.cpp:
(WebCore::RenderSearchField::autosaveName):
(WebCore::RenderSearchField::createScrollbar):
* rendering/RenderSlider.cpp:
(WebCore::RenderSlider::layout):
(WebCore::RenderSlider::inDragMode):
* rendering/RenderSnapshottedPlugIn.cpp:
(WebCore::RenderSnapshottedPlugIn::plugInImageElement):
* rendering/RenderTable.cpp:
(WebCore::RenderTable::convertStyleLogicalWidthToComputedWidth):
(WebCore::RenderTable::convertStyleLogicalHeightToComputedHeight):
(WebCore::RenderTable::nodeAtPoint):
* rendering/RenderTableCell.cpp:
(WebCore::RenderTableCell::parseColSpanFromDOM):
(WebCore::RenderTableCell::parseRowSpanFromDOM):
(WebCore::RenderTableCell::updateColAndRowSpanFlags):
(WebCore::RenderTableCell::colSpanOrRowSpanChanged):
(WebCore::RenderTableCell::computePreferredLogicalWidths):
* rendering/RenderTableCol.cpp:
(WebCore::RenderTableCol::updateFromElement):
* rendering/RenderTextControl.cpp:
(WebCore::RenderTextControl::textFormControlElement):
(WebCore::RenderTextControl::adjustInnerTextStyle):
(WebCore::RenderTextControl::updateFromElement):
(WebCore::RenderTextControl::layoutSpecialExcludedChild):
* rendering/RenderTextControlMultiLine.cpp:
(WebCore::RenderTextControlMultiLine::~RenderTextControlMultiLine):
(WebCore::RenderTextControlMultiLine::nodeAtPoint):
(WebCore::RenderTextControlMultiLine::preferredContentLogicalWidth):
(WebCore::RenderTextControlMultiLine::computeControlLogicalHeight):
* rendering/RenderTextControlSingleLine.cpp:
(WebCore::RenderTextControlSingleLine::nodeAtPoint):
(WebCore::RenderTextControlSingleLine::capsLockStateMayHaveChanged):
(WebCore::RenderTextControlSingleLine::textShouldBeTruncated):
(WebCore::RenderTextControlSingleLine::inputElement):
* rendering/RenderThemeMac.mm:
(WebCore::RenderThemeMac::paintSnapshottedPluginOverlay):
* rendering/RenderTreeAsText.cpp:
(WebCore::writeRenderRegionList):
* rendering/RenderVideo.cpp:
(WebCore::RenderVideo::updateIntrinsicSize):
(WebCore::RenderVideo::videoElement):
* rendering/RenderWidget.cpp:
(WebCore::RenderWidget::setWidgetGeometry):
(WebCore::RenderWidget::updateWidgetPosition):
(WebCore::RenderWidget::nodeAtPoint):
* rendering/mathml/RenderMathMLFenced.cpp:
(WebCore::RenderMathMLFenced::updateFromElement):
(WebCore::RenderMathMLFenced::createMathMLOperator):
(WebCore::RenderMathMLFenced::styleDidChange):
* rendering/mathml/RenderMathMLFraction.cpp:
(WebCore::RenderMathMLFraction::updateFromElement):
* rendering/mathml/RenderMathMLOperator.cpp:
(WebCore::RenderMathMLOperator::updateFromElement):
(WebCore::RenderMathMLOperator::createGlyph):
* rendering/mathml/RenderMathMLSpace.cpp:
(WebCore::RenderMathMLSpace::updateFromElement):
* rendering/svg/RenderSVGForeignObject.cpp:
(WebCore::RenderSVGForeignObject::layout):
* rendering/svg/RenderSVGRoot.cpp:
(WebCore::RenderSVGRoot::computeIntrinsicRatioInformation):
(WebCore::RenderSVGRoot::isEmbeddedThroughSVGImage):
(WebCore::RenderSVGRoot::isEmbeddedThroughFrameContainingSVGDocument):
(WebCore::RenderSVGRoot::computeReplacedLogicalWidth):
(WebCore::RenderSVGRoot::computeReplacedLogicalHeight):
(WebCore::RenderSVGRoot::layout):
(WebCore::RenderSVGRoot::paintReplaced):
(WebCore::RenderSVGRoot::buildLocalToBorderBoxTransform):
(WebCore::RenderSVGRoot::nodeAtPoint):
(WebCore::RenderSVGRoot::hasRelativeDimensions):
(WebCore::RenderSVGRoot::hasRelativeIntrinsicLogicalWidth):
(WebCore::RenderSVGRoot::hasRelativeLogicalHeight):
* rendering/svg/RenderSVGText.cpp:
(WebCore::RenderSVGText::layout):
(WebCore::RenderSVGText::strokeBoundingBox):
* rendering/svg/RenderSVGTextPath.cpp:
(WebCore::RenderSVGTextPath::layoutPath):
(WebCore::RenderSVGTextPath::startOffset):
(WebCore::RenderSVGTextPath::exactAlignment):
(WebCore::RenderSVGTextPath::stretchMethod):
2013-09-09 Antti Koivisto <antti@apple.com>
Make RenderView anonymous
https://bugs.webkit.org/show_bug.cgi?id=121013
Reviewed by Darin Adler and Dave Hyatt.
RenderView is currently the only renderer that has an associated Node that is not either Element or Text.
By making it anonymous (not have associated node, RenderView::node() returns null) we will be able to
significantly tighten typing in both render and DOM trees.
* accessibility/AccessibilityRenderObject.cpp:
(WebCore::AccessibilityRenderObject::node):
We need to grab document() instead of node() in a few places for RenderViews to keep existing code
behaving like it did.
* inspector/InspectorLayerTreeAgent.cpp:
(WebCore::InspectorLayerTreeAgent::buildObjectForLayer):
Don't tell inspector that the root layer is anonymous for now to avoid changing behavior.
* rendering/RenderBlock.cpp:
(WebCore::RenderBlock::nodeForHitTest):
* rendering/RenderBox.cpp:
(WebCore::RenderBox::canBeProgramaticallyScrolled):
The old non-virtual RenderView test renderer->node == &renderer->document() does not work anymore.
Switch to isRenderView() which is now non-virtual in a number of places.
(WebCore::RenderBox::canAutoscroll):
(WebCore::RenderBox::findAutoscrollable):
(WebCore::RenderBox::computeReplacedLogicalHeightUsing):
* rendering/RenderBoxModelObject.cpp:
(WebCore::RenderBoxModelObject::hasAutoHeightOrContainingBlockWithAutoHeight):
* rendering/RenderLayerBacking.cpp:
(WebCore::RenderLayerBacking::isSimpleContainerCompositingLayer):
* rendering/RenderObject.h:
(WebCore::RenderObject::isRenderReplaced):
(WebCore::RenderObject::isAnonymousBlock):
RenderView is anonymous but not a CSS anonymous block.
(WebCore::RenderObject::isText):
(WebCore::RenderObject::isRenderView):
Make isRenderView non-virtual since it is now hot. Reuse existing bits.
(WebCore::RenderObject::setIsText):
(WebCore::RenderObject::setIsRenderView):
(WebCore::RenderObject::RenderObjectBitfields::RenderObjectBitfields):
* rendering/RenderTreeAsText.cpp:
(WebCore::writeSelection):
* rendering/RenderView.cpp:
Make anonymous.
(WebCore::RenderView::RenderView):
* rendering/RenderView.h:
* rendering/svg/RenderSVGRoot.cpp:
(WebCore::RenderSVGRoot::computeReplacedLogicalHeight):
2013-09-09 Bem Jones-Bey <bjonesbe@adobe.com>
Move logical(Left|Right)FloatOffsetForLine methods into FloatingObjects
https://bugs.webkit.org/show_bug.cgi?id=120705
Reviewed by Sam Weinig.
These are the only consumers of the CalculateFloatOffsetAdapter and
the placed floats tree, so it will allow us to reduce the public
interface of FloatingObjects and make the placed floats tree private.
No new tests, no behavior change.
* rendering/RenderBlock.cpp:
(WebCore::RenderBlock::logicalLeftFloatOffsetForLine):
(WebCore::RenderBlock::logicalRightFloatOffsetForLine):
(WebCore::RenderBlock::FloatingObjects::logicalLeftOffset):
(WebCore::RenderBlock::FloatingObjects::logicalRightOffset):
* rendering/RenderBlock.h:
(WebCore::RenderBlock::FloatingObjects::placedFloatsTree):
2013-09-09 Christophe Dumez <ch.dumez@sisa.samsung.com>
Add support for BeforeUnloadEvent interface
https://bugs.webkit.org/show_bug.cgi?id=120849
Reviewed by Darin Adler.
Add support for BeforeUnloadEvent as per the specification:
http://www.whatwg.org/specs/web-apps/current-work/#beforeunloadevent
BeforeUnloadEvent has a returnValue attribute. Setting returnValue to a non-empty
string in an event handler causes the user agent should ask the user to confirm
that they wish to unload the document. This is equivalent to returning a non-empty
string in the EventHandler:
http://www.whatwg.org/specs/web-apps/current-work/#onbeforeunloadeventhandler
BeforeUnloadEvent and returnValue are already supported by IE and Firefox. Previously,
WebKit was passing a base Event type to the beforeunload event handlers instead of
a BeforeUnloadEvent.
Note that this patch keeps support for the legacy Event.returnValue attribute. This used
to be an IE extension but this is no longer supported by IE (nor Firefox). The standard
preventDefault() should be used instead however (supported in IE >= 9).
Test: fast/events/before-unload-returnValue.html
* CMakeLists.txt:
* DerivedSources.cpp:
* DerivedSources.make:
* DerivedSources.pri:
* GNUmakefile.list.am:
* WebCore.order:
* WebCore.vcxproj/WebCore.vcxproj:
* bindings/js/JSEventListener.cpp:
(WebCore::JSEventListener::handleEvent):
* dom/BeforeUnloadEvent.cpp:
(WebCore::BeforeUnloadEvent::isBeforeUnloadEvent):
(WebCore::BeforeUnloadEvent::~BeforeUnloadEvent):
* dom/BeforeUnloadEvent.h:
(WebCore::BeforeUnloadEvent::create):
(WebCore::BeforeUnloadEvent::returnValue):
(WebCore::BeforeUnloadEvent::setReturnValue):
(WebCore::toBeforeUnloadEvent):
* dom/BeforeUnloadEvent.idl: Added.
* dom/Event.cpp:
(WebCore::Event::isBeforeUnloadEvent):
* dom/Event.h:
(WebCore::Event::legacyReturnValue):
(WebCore::Event::setLegacyReturnValue):
* dom/Event.idl:
* dom/EventNames.in:
* loader/FrameLoader.cpp:
(WebCore::FrameLoader::handleBeforeUnloadEvent):
2013-09-06 David Hyatt <hyatt@apple.com>
Get rid of isBlockFlowFlexBoxOrGrid().
https://bugs.webkit.org/show_bug.cgi?id=120897
Convert all callers and get rid of this method.
Reviewed by Beth Dakin.
* accessibility/AccessibilityRenderObject.cpp:
(WebCore::AccessibilityRenderObject::computeAccessibilityIsIgnored):
(WebCore::AccessibilityRenderObject::determineAccessibilityRole):
* dom/Position.cpp:
(WebCore::Position::isCandidate):
(WebCore::Position::getInlineBoxAndOffset):
(WebCore::Position::primaryDirection):
* dom/PositionIterator.cpp:
(WebCore::PositionIterator::isCandidate):
* editing/CompositeEditCommand.cpp:
(WebCore::CompositeEditCommand::addBlockPlaceholderIfNeeded):
* editing/Editor.cpp:
(WebCore::Editor::baseWritingDirectionForSelectionStart):
* editing/FrameSelection.cpp:
(WebCore::caretRenderer):
* editing/TextIterator.cpp:
(WebCore::TextIterator::shouldRepresentNodeOffsetZero):
* editing/TypingCommand.cpp:
(WebCore::TypingCommand::makeEditableRootEmpty):
* editing/htmlediting.cpp:
(WebCore::isBlockFlowElement):
* rendering/LayoutState.cpp:
(WebCore::LayoutState::LayoutState):
* rendering/RenderBlock.cpp:
(WebCore::RenderBlock::layoutBlock):
(WebCore::RenderBlock::collapseMargins):
(WebCore::RenderBlock::selectionGaps):
(WebCore::RenderBlock::firstLineBoxBaseline):
(WebCore::RenderBlock::lastLineBoxBaseline):
(WebCore::RenderBlock::firstLineBlock):
(WebCore::findFirstLetterBlock):
(WebCore::shouldCheckLines):
(WebCore::RenderBlock::adjustForBorderFit):
* rendering/RenderBox.cpp:
(WebCore::RenderBox::computeRectForRepaint):
(WebCore::RenderBox::positionForPoint):
* rendering/RenderBoxModelObject.h:
(WebCore::RenderBoxModelObject::canHaveBoxInfoInRegion):
* rendering/RenderInline.cpp:
(WebCore::RenderInline::computeRectForRepaint):
* rendering/RenderLineBoxList.cpp:
(WebCore::RenderLineBoxList::dirtyLinesFromChangedChild):
* rendering/RenderObject.cpp:
(WebCore::RenderObject::computeRectForRepaint):
(WebCore::RenderObject::styleWillChange):
(WebCore::firstLineStyleForCachedUncachedType):
* rendering/RenderObject.h:
* rendering/RenderObjectChildList.cpp:
(WebCore::RenderObjectChildList::insertChildNode):
* rendering/RenderView.h:
2013-09-09 Eric Carlson <eric.carlson@apple.com>
MediaStream API: Stop means stop
https://bugs.webkit.org/show_bug.cgi?id=120873
Reviewed by Jer Noble.
Merge blink https://chromium.googlesource.com/chromium/blink/+/9a97b0f3892320fa5741485e06a78183b77c3635
by Tommy Widenflycht.
Removing notification functionality from MediaStreamTrack::stop because the world is being torn down.
No new tests, the original author was unable to come up with a reliable test case.
* Modules/mediastream/MediaStreamTrack.cpp:
(WebCore::MediaStreamTrack::stop): Don't call didEndTrack, the world is going away.
2013-09-09 Filip Pizlo <fpizlo@apple.com>
Unreviewed, fix build.
* Modules/encryptedmedia/MediaKeySession.h:
2013-09-09 Eric Carlson <eric.carlson@apple.com>
MediaStream API: Moving Add/Remove track from WebMediaStreamCenterClient to WebMediaStream
https://bugs.webkit.org/show_bug.cgi?id=120872
Reviewed by Jer Noble.
Merge https://chromium.googlesource.com/chromium/blink/+/7d740fd27c1f345b59c846df01c3adce53c18e6e
Simple cleanup that makes the API cleaner.
* Modules/mediastream/MediaStream.cpp:
(WebCore::MediaStream::removeTrack):
(WebCore::MediaStream::addRemoteTrack):
(WebCore::MediaStream::removeRemoteTrack):
* platform/mediastream/MediaStreamCenter.cpp:
* platform/mediastream/MediaStreamCenter.h:
* platform/mediastream/MediaStreamDescriptor.h:
(WebCore::MediaStreamDescriptor::removeAudioComponent):
(WebCore::MediaStreamDescriptor::addRemoteTrack):
(WebCore::MediaStreamDescriptor::removeRemoteTrack):
2013-09-09 ChangSeok Oh <changseok.oh@collabora.com>
[WK2] Assertion failure in WebCore::Page::checkSubframeCountConsistency when going back
https://bugs.webkit.org/show_bug.cgi?id=119781
Reviewed by Alexey Proskuryakov.
We should pair restoring a cached frame and adding it to FrameTree so that
actual added frame count in FrameTree keeps same with restored frame count.
Otherwise assert failure occurs in Page::CheckSubframeCountConsistency.
We have added cached frames to FrameTree ahead and then restored them by tree travelsal.
But this way doesn't guarantee subframecount of Page and the number of child of FrameTree are equal.
In addition, we still make sure that adding a cached frame to FrameTree should happen
before opening it. Because FrameTree might be used while restoring a cached page.
Test: fast/history/go-back-to-iframe-with-plugin.html
* history/CachedFrame.cpp:
(WebCore::CachedFrameBase::restore):
(WebCore::CachedFrame::open):
2013-09-09 Luciano Wolf <luciano.wolf@openbossa.org>
Nix upstreaming - Adding stubs and Nix specific platform files
https://bugs.webkit.org/show_bug.cgi?id=118358
Reviewed by Benjamin Poulain.
Basically adding all files that have "Nix" in their names and
are related to WebCore module.
No new tests. They will be uploaded on another patch during the
upstreaming process.
* css/mediaControlsNix.css: Added.
* css/mediaControlsNixFullscreen.css: Added.
* page/nix/EventHandlerNix.cpp: Added.
* platform/graphics/egl/GLContextFromCurrentEGL.cpp: Added.
* platform/graphics/egl/GLContextFromCurrentEGL.h: Added.
* platform/graphics/gstreamer/PlatformVideoWindowNix.cpp: Added.
* platform/graphics/nix/IconNix.cpp: Added.
* platform/graphics/nix/ImageNix.cpp: Added.
* platform/nix/CursorNix.cpp: Added.
* platform/nix/DragDataNix.cpp: Added.
* platform/nix/DragImageNix.cpp: Added.
* platform/nix/GamepadsNix.cpp: Added.
* platform/nix/LanguageNix.cpp: Added.
* platform/nix/LocalizedStringsNix.cpp: Added.
* platform/nix/NixKeyboardUtilities.cpp: Added.
* platform/nix/NixKeyboardUtilities.h: Added.
* platform/nix/PasteboardNix.cpp: Added.
* platform/nix/PlatformKeyboardEventNix.cpp: Added.
* platform/nix/PlatformScreenNix.cpp: Added.
* platform/nix/SoundNix.cpp: Added.
* platform/nix/WidgetNix.cpp: Added.
* platform/text/nix/TextBreakIteratorInternalICUNix.cpp: Added.
2013-09-09 Hugo Parente Lima <hugo.lima@openbossa.org>
Preparing WebCore to receive Nix Port
https://bugs.webkit.org/show_bug.cgi?id=118326
Reviewed by Eric Carlson.
Only adding the compilation directives that are Nix specific, in the
existent WebCore files
* loader/FrameLoader.cpp:
(WebCore::FrameLoader::defaultObjectContentType):
* platform/Cursor.h:
* platform/DragData.h:
* platform/DragImage.h:
* platform/FileSystem.h:
* platform/RunLoop.h:
* platform/Widget.h:
* platform/audio/FFTFrame.h:
* platform/audio/HRTFElevation.cpp:
* platform/cairo/WidgetBackingStore.h:
* platform/graphics/ANGLEWebKitBridge.h:
* platform/graphics/FontPlatformData.h:
* platform/graphics/GraphicsContext3D.cpp:
* platform/graphics/GraphicsContext3D.h:
* platform/graphics/OpenGLESShims.h:
* platform/graphics/OpenGLShims.cpp:
(WebCore::getProcAddress):
* platform/graphics/OpenGLShims.h:
* platform/graphics/PlatformLayer.h:
* platform/graphics/cairo/GLContext.cpp:
(WebCore::GLContext::createContextForWindow):
* platform/graphics/cairo/GraphicsContext3DPrivate.cpp:
(WebCore::GraphicsContext3DPrivate::GraphicsContext3DPrivate):
* platform/graphics/freetype/FontPlatformDataFreeType.cpp:
* platform/graphics/opengl/Extensions3DOpenGL.cpp:
(WebCore::Extensions3DOpenGL::createVertexArrayOES):
(WebCore::Extensions3DOpenGL::deleteVertexArrayOES):
(WebCore::Extensions3DOpenGL::isVertexArrayOES):
(WebCore::Extensions3DOpenGL::bindVertexArrayOES):
(WebCore::Extensions3DOpenGL::supportsExtension):
* platform/graphics/opengl/Extensions3DOpenGL.h:
* platform/graphics/opengl/Extensions3DOpenGLCommon.cpp:
* platform/graphics/opengl/Extensions3DOpenGLES.h:
* platform/graphics/opengl/GraphicsContext3DOpenGL.cpp:
* platform/graphics/opengl/GraphicsContext3DOpenGLCommon.cpp:
(WebCore::GraphicsContext3D::reshape):
* platform/graphics/texmap/TextureMapper.h:
* plugins/PluginPackage.cpp:
* plugins/PluginView.cpp:
(WebCore::PluginView::PluginView):
* plugins/PluginView.h:
* plugins/PluginViewNone.cpp:
2013-09-08 Darin Adler <darin@apple.com>
Tighten up EventQueue classes a bit, less indirection and memory allocation
https://bugs.webkit.org/show_bug.cgi?id=121016
Reviewed by Andreas Kling.
* Modules/encryptedmedia/MediaKeySession.cpp:
(WebCore::MediaKeySession::MediaKeySession): Updated since event queue is now
a member rather than an OwnPtr.
(WebCore::MediaKeySession::close): Ditto.
(WebCore::MediaKeySession::keyRequestTimerFired): Ditto.
(WebCore::MediaKeySession::addKeyTimerFired): Ditto.
* Modules/encryptedmedia/MediaKeySession.h: Ditto.
* Modules/indexeddb/IDBDatabase.cpp:
(WebCore::IDBDatabase::closeConnection): Updated since ScriptExecutionContext's
eventQueue function now returns a reference rather than a pointer. Also, the
cancelEvent function takes a reference instead of a pointer.
(WebCore::IDBDatabase::enqueueEvent): Ditto.
* Modules/indexeddb/IDBRequest.cpp:
(WebCore::IDBRequest::abort): Ditto.
(WebCore::IDBRequest::enqueueEvent): Ditto.
* Modules/indexeddb/IDBTransaction.cpp:
(WebCore::IDBTransaction::enqueueEvent): Ditto.
* Modules/mediasource/MediaSource.cpp:
(WebCore::MediaSource::MediaSource): Updated since event queue is now a
member rather than an OwnPtr. Also use initialization instead of assignment
to set up source buffers.
(WebCore::MediaSource::hasPendingActivity): Ditto.
(WebCore::MediaSource::stop): Ditto.
(WebCore::MediaSource::scheduleEvent): Ditto.
* Modules/mediasource/MediaSource.h: Ditto.
* Modules/mediasource/SourceBufferList.cpp:
(WebCore::SourceBufferList::SourceBufferList): Take references instead of
pointers.
(WebCore::SourceBufferList::length): Changed type to unsigned instead of
unsigned long. This is an IDL "unsigned long", which corresponds to "unsigned"
in our C++ DOM implementation.
(WebCore::SourceBufferList::createAndFireEvent): Updated since event queue is
now a reference.
(WebCore::SourceBufferList::scriptExecutionContext): Updated since script
execution context is now a reference.
* Modules/mediasource/SourceBufferList.h: Ditto.
* dom/Document.cpp:
(WebCore::Document::Document): Updated since event queue is now a member rather
than a RefPtr.
(WebCore::Document::detach): Ditto.
(WebCore::Document::enqueueWindowEvent): Ditto.
(WebCore::Document::enqueueDocumentEvent): Ditto.
* dom/Document.h: Ditto.
* dom/DocumentEventQueue.cpp: Renamed DocumentEventQueueTimer to just Timer and
made it a class member of DocumentEventQueue. Also changed it to use references
instead of pointers and removed unneeded ScriptExecutionContext argument.
(WebCore::DocumentEventQueue::DocumentEventQueue): Updated to take a document
reference instead of a script execution context pointer.
(WebCore::DocumentEventQueue::enqueueEvent): Wrote the assertions in a clearer
style and do the assertions even when the queue is closed.
(WebCore::DocumentEventQueue::enqueueOrDispatchScrollEvent): Removed the unneeded
ScrollEventTargetType argument, since the policy is specific to the document node.
Made the argument a reference instead of a PassRefPtr, and rewrote the function
to be more straightforward and readable.
(WebCore::DocumentEventQueue::cancelEvent): Use the return value recently added to
the remove function to avoid the need for use of iterators and a find/remove pair.
(WebCore::DocumentEventQueue::pendingEventTimerFired): Rewrote this to use the
recently added ListHashSet takeFirst function. Also protect the document instead
of protecting just this object during the dispatch. Can't really protect the
event queue since it's no longer separately reference counted.
(WebCore::DocumentEventQueue::dispatchEvent): Changed this to take a reference and
added a FIXME about some curious code in here that needs a "why" comment.
* dom/DocumentEventQueue.h: Removed many unneeded includes, some unneeded forward
declarations, marked the class final, made it no longer derive from RefCounted,
removed ScrollEventTargetType and create, and did the other changes mentioned above.
* dom/EventQueue.h: Got rid of many uneeded includes, changed the argument type
of cancelEvent to Event& and rewrote the comment for close.
* dom/GenericEventQueue.cpp:
(WebCore::GenericEventQueue::GenericEventQueue): Updated to take a reference.
(WebCore::GenericEventQueue::enqueueEvent): Ditto.
(WebCore::GenericEventQueue::timerFired): Ditto.
* dom/GenericEventQueue.h: Changed this class to no longer derive from EventQueue
since there was no value coming from that polymorphism. Removed all the virtual
keywords from the class. Switched from pointers to references. Removed the unused
cancelEvent function. Removed the create function since this is always used as a
data member, not a pointer on the heap.
* dom/ScriptExecutionContext.h: Changed the return type of eventQueue to a reference.
* html/HTMLMediaElement.cpp:
(WebCore::HTMLMediaElement::HTMLMediaElement): Updated since event queue is now a
member rather than an OwnPtr.
(WebCore::HTMLMediaElement::~HTMLMediaElement): Ditto.
(WebCore::HTMLMediaElement::scheduleEvent): Ditto.
(WebCore::HTMLMediaElement::updateActiveTextTrackCues): Ditto.
(WebCore::HTMLMediaElement::cancelPendingEventsAndCallbacks): Ditto.
(WebCore::HTMLMediaElement::mediaPlayerKeyAdded): Ditto.
(WebCore::HTMLMediaElement::mediaPlayerKeyError): Ditto.
(WebCore::HTMLMediaElement::mediaPlayerKeyMessage): Ditto.
(WebCore::HTMLMediaElement::mediaPlayerKeyNeeded): Ditto.
(WebCore::HTMLMediaElement::stop): Ditto.
(WebCore::HTMLMediaElement::hasPendingActivity): Ditto.
* html/HTMLMediaElement.h: Ditto.
* page/EventHandler.cpp:
(WebCore::EventHandler::sendScrollEvent): Updated to remove the now-uneeded
ScrollEventTargetType argument, and also to use references instead of pointers.
* rendering/RenderLayer.cpp:
(WebCore::RenderLayer::scrollTo): Ditto.
* rendering/RenderListBox.cpp:
(WebCore::RenderListBox::scrollTo): Ditto.
* workers/WorkerEventQueue.cpp:
(WebCore::WorkerEventQueue::WorkerEventQueue): Updated to work with references
instead of pointers.
(WebCore::WorkerEventQueue::enqueueEvent): Ditto.
(WebCore::WorkerEventQueue::cancelEvent): Use the take function instead of a
get/remove pair, to eliminate double hashing.
* workers/WorkerEventQueue.h: Removed unneeded includes, forward declarations,
the create function, and the private removeEvent function. Marked class final.
* workers/WorkerGlobalScope.cpp:
(WebCore::WorkerGlobalScope::WorkerGlobalScope): Updated since eventQueue is
now a data member.
(WebCore::WorkerGlobalScope::eventQueue): Ditto.
* workers/WorkerGlobalScope.h: Made m_eventQueue a queue instead of a pointer
to a queue. Also made the eventQueue function private and final.
2013-09-09 Hans Muller <hmuller@adobe.com>
[CSS Shapes] Heap-buffer-overflow in WebCore::ShapeInterval<float>::subtractShapeIntervals
https://bugs.webkit.org/show_bug.cgi?id=120802
Reviewed by Darin Adler.
Revised the implementation of subtractShapeIntervals() to isloate and check the
places where it dereferences ShapeInterval vector iterators.
Test: fast/shapes/shape-inside/shape-inside-subtract-intervals-crash.html
* rendering/shapes/ShapeInterval.h:
(WebCore::ShapeInterval::subtractShapeIntervals):
2013-09-09 Darin Adler <darin@apple.com>
matchingShorthandsForLonghand builds map using a giant function
https://bugs.webkit.org/show_bug.cgi?id=121029
Reviewed by Anders Carlsson.
There is no need to use a map for this; a switch statement is fine.
Also, these structures are simple enough that we can build them
every time; we don't need to keep them in globals.
* css/CSSParser.cpp:
(WebCore::CSSParser::addProperty): Got rid of non-helpful local in
CSS_VARIABLES code. Updated for change in return value of the
matchingShorthandsForLonghand.
(WebCore::CSSParser::parseShorthand): Updated for change in return
type of propertiesForInitialization.
* css/CSSProperty.cpp:
(WebCore::StylePropertyMetadata::shorthandID): Updated for change in
return value of matchingShorthandsForLonghand.
* css/StylePropertyShorthand.cpp:
(WebCore::backgroundShorthand): Got rid of local variable, constructing
the StylePropertyShorthand every time.
(WebCore::backgroundPositionShorthand): Ditto.
(WebCore::backgroundRepeatShorthand): Ditto.
(WebCore::borderShorthand): Ditto.
(WebCore::borderAbridgedShorthand): Ditto.
(WebCore::borderBottomShorthand): Ditto.
(WebCore::borderColorShorthand): Ditto.
(WebCore::borderImageShorthand): Ditto.
(WebCore::borderLeftShorthand): Ditto.
(WebCore::borderRadiusShorthand): Ditto.
(WebCore::webkitBorderRadiusShorthand): Ditto.
(WebCore::borderRightShorthand): Ditto.
(WebCore::borderSpacingShorthand): Ditto.
(WebCore::borderStyleShorthand): Ditto.
(WebCore::borderTopShorthand): Ditto.
(WebCore::borderWidthShorthand): Ditto.
(WebCore::listStyleShorthand): Ditto.
(WebCore::fontShorthand): Ditto.
(WebCore::marginShorthand): Ditto. Ditto.
(WebCore::markerShorthand): Ditto.
(WebCore::outlineShorthand): Ditto.
(WebCore::overflowShorthand): Ditto.
(WebCore::paddingShorthand): Ditto.
(WebCore::transitionShorthand): Ditto.
(WebCore::webkitAnimationShorthand): Ditto.
(WebCore::webkitAnimationShorthandForParsing): Ditto.
(WebCore::webkitBorderAfterShorthand): Ditto.
(WebCore::webkitBorderBeforeShorthand): Ditto.
(WebCore::webkitBorderEndShorthand): Ditto.
(WebCore::webkitBorderStartShorthand): Ditto.
(WebCore::webkitColumnsShorthand): Ditto.
(WebCore::webkitColumnRuleShorthand): Ditto.
(WebCore::webkitFlexFlowShorthand): Ditto.
(WebCore::webkitFlexShorthand): Ditto.
(WebCore::webkitMarginCollapseShorthand): Ditto.
(WebCore::webkitGridColumnShorthand): Ditto.
(WebCore::webkitGridRowShorthand): Ditto.
(WebCore::webkitMarqueeShorthand): Ditto.
(WebCore::webkitMaskShorthand): Ditto.
(WebCore::webkitMaskPositionShorthand): Ditto.
(WebCore::webkitMaskRepeatShorthand): Ditto.
(WebCore::webkitTextDecorationShorthand): Ditto.
(WebCore::webkitTextEmphasisShorthand): Ditto.
(WebCore::webkitTextStrokeShorthand): Ditto.
(WebCore::webkitTransitionShorthand): Ditto.
(WebCore::webkitTransformOriginShorthand): Ditto.
(WebCore::widthShorthand): Ditto.
(WebCore::heightShorthand): Ditto.
(WebCore::shorthandForProperty): Ditto.
(WebCore::makeVector): Added. Helper function for the cases in the
switch inside matchingShorthandsForLonghand.
(WebCore::matchingShorthandsForLonghand): Rewrote this to use a switch
instead of a map.
(WebCore::indexOfShorthandForLonghand): Tightened up the coding style a bit.
* css/StylePropertyShorthand.h: Changed type of StylePropertyShorthand's
propertiesForInitialization to be an array of shorthands rather than an
array of pointers to shorthands. Changed return types of the shorthand
functions to return a shorthand object rather than a reference. Did the same
for the other functions.
2013-09-09 Allan Sandfeld Jensen <allan.jensen@digia.com>
MouseEnter and MouseLeave may be emitted on Document nodes
https://bugs.webkit.org/show_bug.cgi?id=120862
Reviewed by Antonio Gomes.
Replace the overgeneric use of Nodes with Elements in updateHoverActiveState.
This also fixes the bug of emitting mouseenter/mouseleave events on Document,
since Document is not an Element.
This is tested by fast/events/mouseenterleave-on-subframe.html
* dom/Document.cpp:
(WebCore::Document::updateHoverActiveState):
2013-09-09 Allan Sandfeld Jensen <allan.jensen@digia.com>
MouseLeave not always emitted when cursor leaves subframe
https://bugs.webkit.org/show_bug.cgi?id=121026
Reviewed by Antonio Gomes.
Forward the PlatformMouseEvent in the recursive calls so nested documents
also get a chance to emit mouseleave when the hover moves out.
Test: fast/events/mouseenterleave-on-subframe.html
* dom/Document.cpp:
(WebCore::Document::updateHoverActiveState):
2013-09-09 Thiago de Barros Lacerda <thiago.lacerda@openbossa.org>
Adding username to RTCIceServer
https://bugs.webkit.org/show_bug.cgi?id=120861
Reviewed by Eric Carlson.
No new tests needed. Existing media stream tests already cover it
* Modules/mediastream/RTCPeerConnection.cpp:
(WebCore::RTCPeerConnection::parseConfiguration):
* platform/mediastream/RTCConfiguration.h:
(WebCore::RTCIceServer::create):
(WebCore::RTCIceServer::username):
(WebCore::RTCIceServer::RTCIceServer):
2013-09-09 Antti Koivisto <antti@apple.com>
Hide Document::renderer()
https://bugs.webkit.org/show_bug.cgi?id=121028
Reviewed by Andreas Kling.
Use less generic Document::renderView() instead.
* accessibility/AXObjectCache.cpp:
(WebCore::AXObjectCache::postNotification):
* accessibility/AccessibilityObject.cpp:
(WebCore::appendAccessibilityObject):
* accessibility/AccessibilityScrollView.cpp:
(WebCore::AccessibilityScrollView::webAreaObject):
* css/CSSFontSelector.cpp:
(WebCore::CSSFontSelector::dispatchInvalidationCallbacks):
* css/StyleResolver.cpp:
(WebCore::StyleResolver::appendAuthorStyleSheets):
* dom/Document.cpp:
(WebCore::Document::~Document):
(WebCore::Document::webkitGetNamedFlows):
(WebCore::Document::setVisualUpdatesAllowed):
(WebCore::Document::elementFromPoint):
(WebCore::Document::caretRangeFromPoint):
(WebCore::Document::updateLayout):
(WebCore::Document::existingAXObjectCache):
(WebCore::Document::axObjectCache):
(WebCore::Document::setVisuallyOrdered):
(WebCore::Document::implicitClose):
(WebCore::Document::prepareMouseEvent):
(WebCore::Document::styleResolverChanged):
(WebCore::Document::documentWillBecomeInactive):
(WebCore::Document::documentDidResumeFromPageCache):
* dom/Document.h:
* dom/DocumentStyleSheetCollection.cpp:
(WebCore::DocumentStyleSheetCollection::updateActiveStyleSheets):
* dom/Element.cpp:
(WebCore::Element::~Element):
* dom/InlineStyleSheetOwner.cpp:
(WebCore::InlineStyleSheetOwner::removedFromDocument):
* dom/ProcessingInstruction.cpp:
(WebCore::ProcessingInstruction::removedFrom):
* editing/FrameSelection.cpp:
(WebCore::FrameSelection::contains):
* html/HTMLElement.cpp:
(WebCore::HTMLElement::adjustDirectionalityIfNeededAfterChildrenChanged):
* html/HTMLLinkElement.cpp:
(WebCore::HTMLLinkElement::removedFrom):
* html/HTMLStyleElement.cpp:
(WebCore::HTMLStyleElement::parseAttribute):
(WebCore::HTMLStyleElement::registerWithScopingNode):
(WebCore::HTMLStyleElement::unregisterWithScopingNode):
* html/parser/HTMLResourcePreloader.cpp:
(WebCore::HTMLResourcePreloader::preload):
* loader/ImageLoader.cpp:
(WebCore::ImageLoader::updateFromElement):
* page/EventHandler.cpp:
(WebCore::EventHandler::handleWheelEvent):
(WebCore::EventHandler::handleGestureScrollBegin):
* page/Frame.cpp:
(WebCore::Frame::setPageAndTextZoomFactors):
* page/FrameView.cpp:
(WebCore::FrameView::layout):
(WebCore::FrameView::doLayoutWithFrameFlattening):
* page/Page.cpp:
(WebCore::Page::setPageScaleFactor):
* page/PrintContext.cpp:
(WebCore::PrintContext::spoolAllPagesWithBoundaries):
* platform/graphics/mac/MediaPlayerPrivateQTKit.mm:
(WebCore::MediaPlayerPrivateQTKit::paint):
* style/StyleResolveTree.cpp:
(WebCore::Style::resolveTree):
* svg/SVGDocument.cpp:
(WebCore::SVGDocument::updatePan):
2013-09-09 Christophe Dumez <ch.dumez@sisa.samsung.com>
[DOM4] Have ProcessingInstruction inherit CharacterData
https://bugs.webkit.org/show_bug.cgi?id=120691
Reviewed by Darin Adler.
Have ProcessingInstruction inherit CharacterData as per the latest DOM4
specification:
http://dom.spec.whatwg.org/#processinginstruction
Previously, ProcessingInstruction was inheriting from Node as per DOM
Level 3.
Firefox and Blink already follow DOM4 here but not IE10.
This change leads to less code duplication.
Test: fast/dom/processing-instruction-inherit-characterdata.xhtml
* bindings/objc/PublicDOMInterfaces.h:
* dom/CharacterData.cpp:
(WebCore::CharacterData::setDataAndUpdate):
* dom/ProcessingInstruction.cpp:
(WebCore::ProcessingInstruction::ProcessingInstruction):
(WebCore::ProcessingInstruction::cloneNode):
(WebCore::ProcessingInstruction::checkStyleSheet):
(WebCore::ProcessingInstruction::insertedInto):
(WebCore::ProcessingInstruction::removedFrom):
(WebCore::ProcessingInstruction::finishParsingChildren):
* dom/ProcessingInstruction.h:
(WebCore::toProcessingInstruction):
* dom/ProcessingInstruction.idl:
2013-09-09 Krzysztof Czech <k.czech@samsung.com>
[AX][ATK] AccessibilityObject representing ProgressBar element should be ATK_VALUE type
https://bugs.webkit.org/show_bug.cgi?id=121023
Reviewed by Mario Sanchez Prada.
Test: accessibility/progressbar.html
ProgressBar element should support ATK_VALUE interface.
* accessibility/atk/WebKitAccessibleWrapperAtk.cpp:
(getInterfaceMaskFromObject):
2013-09-09 Claudio Saavedra <csaavedra@igalia.com>
[GTK] ghost cursor when mouse hovers over an image file in a tab
https://bugs.webkit.org/show_bug.cgi?id=120675
Reviewed by Carlos Garcia Campos.
No new tests, covered by existing.
* platform/gtk/CursorGtk.cpp:
(WebCore::createNamedCursor): Use new gdk_cursor_new_from_surface()
when compiling against GTK+ 3.9.12 or newer.
2013-09-08 Santosh Mahto <santosh.ma@samsung.com>
HTMLDocument.h : Removing unnecessary forward declaration.
https://bugs.webkit.org/show_bug.cgi?id=121002
Reviewed by Darin Adler.
Just code cleanup.
Removed the two forward declaration in HTMLDocument.h file.
* html/HTMLDocument.h:
2013-09-08 Gurpreet Kaur <k.gurpreet@samsung.com>
defining line height affects height of text box
https://bugs.webkit.org/show_bug.cgi?id=17619
Reviewed by Darin Adler.
Giving line height to input elements increase the height
of the element. To make it work similiar as Mozilla and IE
line-height :normal should be applied for input elements.
Test: fast/dom/HTMLInputElement/input-line-height.html
* css/html.css:
(input):
Made the line-height: normal as !important so that it does not
consider any other line-height specified through internal or
external styles.
2013-09-08 Gurpreet Kaur <k.gurpreet@samsung.com>
Scrollbar width is not applied when element hidden
https://bugs.webkit.org/show_bug.cgi?id=90546
Reviewed by Simon Fraser.
Webkit has css properties through which custom scroll
bars can be added. Incase the element's visible property
is hidden and custom scrollbar properties are applied
the scrollbar width is not considered when quering the
element.clientWidth. Incase of non-custom scrollbars
whether the element's visible property is hidden or not
correct scrollbar width is considered.
Tests: fast/dom/Element/scroll-width-hidden.html
fast/dom/Element/scroll-width-visible.html
* rendering/RenderScrollbar.cpp:
(WebCore::RenderScrollbar::updateScrollbarPart):
Incase custom scrollbar is created there is a check whether
the renderer to which scrollbar is added is visible or not.
This check is not required since for non-custom scrollbars same
check is not present. Also whether element's visible property is
hidden or not a placeholder is set for the element. Both behavoiur
i.e custom and non-custom scrollbars should be same.
2013-09-08 Tamas Czene <tczene@inf.u-szeged.hu>
GStreamer 0.10 build fix after r155251.
Reviewed by Csaba Osztrogonác.
* platform/graphics/gstreamer/GStreamerVersioning.cpp:
2013-09-08 Christophe Dumez <ch.dumez@sisa.samsung.com>
[wk2] REGRESSION (r154673): PDF scrolling moves very slowly
https://bugs.webkit.org/show_bug.cgi?id=120542
Reviewed by Tim Horton.
Handle 'wheel' events in addition to 'mousewheel'.
* html/shadow/MediaControlsApple.cpp:
Listen for the standard 'wheel' event instead of the legacy 'mousewheel' one.
While not strictly needed, we should use the legacy events as little as
possible.
* plugins/PluginView.cpp:
Handle 'wheel' events in addition to 'mousewheel'.
2013-09-08 Darin Adler <darin@apple.com>
Make Editor::deleteButtonController a reference
https://bugs.webkit.org/show_bug.cgi?id=121019
Reviewed by Andreas Kling.
* dom/ContainerNode.cpp:
(WebCore::ContainerNode::cloneChildNodes): Updated to use . instead of ->.
* editing/DeleteButton.cpp:
(WebCore::DeleteButton::defaultEventHandler): Ditto.
* editing/DeleteButtonController.cpp:
(WebCore::DeleteButtonController::DeleteButtonController): Updated to take a Frame&
instead of a Frame*.
(WebCore::DeleteButtonController::respondToChangedSelection): Ditto.
(WebCore::DeleteButtonController::createDeletionUI): Ditto.
(WebCore::DeleteButtonController::show): Ditto.
(WebCore::DeleteButtonController::enable): Ditto.
(WebCore::DeleteButtonController::deleteTarget): Ditto.
* editing/DeleteButtonController.h: Ditto.
* editing/Editor.cpp:
(WebCore::Editor::avoidIntersectionWithDeleteButtonController): Removed bogus
null check from both versions of this function.
(WebCore::Editor::Editor): Use construction rather than assignment and pass
a reference instead of a pointer to make m_deleteButtonController.
(WebCore::Editor::clear): Ditto.
* editing/Editor.h: Made deleteButtonController return a reference.
Also reorganized the header to put all the conditional functions together,
and not mixed in with non-conditional ones.
* editing/markup.cpp:
(WebCore::createMarkup): Updated to use . instead of -> and also to use
emptyString() instead of constructing a new empty string.
2013-09-08 Andreas Kling <akling@apple.com>
InlineBox::root() should return a reference.
<https://webkit.org/b/121014>
Reviewed by Antti Koivisto.
There is always a root inline box, so make root() return a reference.
Also make some effort to cache the result in a local at call sites.
2013-09-08 Andreas Kling <akling@apple.com>
FrameView::scheduleEvent() is over-engineered.
<https://webkit.org/b/121004>
Reviewed by Antti Koivisto.
Remove gratuitous FrameActionScheduler class that was really only being used
to defer the occassional "overflowchanged" event until layout had finished.
* CMakeLists.txt:
* GNUmakefile.list.am:
* Target.pri:
* WebCore.vcxproj/WebCore.vcxproj:
* WebCore.vcxproj/WebCore.vcxproj.filters:
* WebCore.xcodeproj/project.pbxproj:
* page/FrameActionScheduler.cpp:
* page/FrameActionScheduler.h:
Removed FrameActionScheduler.
* page/FrameView.h:
* page/FrameView.cpp:
(WebCore::FrameView::FrameView):
(WebCore::FrameView::~FrameView):
(WebCore::FrameView::layout):
(WebCore::FrameView::ScheduledEvent::ScheduledEvent):
(WebCore::FrameView::scheduleEvent):
(WebCore::FrameView::pauseScheduledEvents):
(WebCore::FrameView::resumeScheduledEvents):
(WebCore::FrameView::performPostLayoutTasks):
(WebCore::FrameView::updateOverflowStatus):
Replaced it with a Vector<ScheduledEvent> and a suppression counter.
A ScheduledEvent is just a { Node, Event } pair.
2013-09-08 Anders Carlsson <andersca@apple.com>
Move WTF::notFound to Vector.h and delete NotFound.h
https://bugs.webkit.org/show_bug.cgi?id=120990
Reviewed by Sam Weinig.
* html/HTMLImageElement.cpp:
* loader/archive/mhtml/MHTMLParser.cpp:
* platform/graphics/cairo/GraphicsContext3DCairo.cpp:
* platform/graphics/win/GraphicsContext3DWin.cpp:
* platform/network/soup/SocketStreamHandleSoup.cpp:
2013-09-08 Commit Queue <commit-queue@webkit.org>
Unreviewed, rolling out r155069 and r155138.
http://trac.webkit.org/changeset/155069
http://trac.webkit.org/changeset/155138
https://bugs.webkit.org/show_bug.cgi?id=121008
Seems to have broken many tests (bug 120963) (Requested by ap
on #webkit).
* WebCore.xcodeproj/project.pbxproj:
* platform/graphics/cg/PDFDocumentImage.cpp:
(WebCore::PDFDocumentImage::PDFDocumentImage):
(WebCore::PDFDocumentImage::~PDFDocumentImage):
(WebCore::PDFDocumentImage::size):
(WebCore::PDFDocumentImage::dataChanged):
(WebCore::PDFDocumentImage::adjustCTM):
(WebCore::PDFDocumentImage::setCurrentPage):
(WebCore::PDFDocumentImage::pageCount):
(WebCore::PDFDocumentImage::draw):
* platform/graphics/cg/PDFDocumentImage.h:
(WebCore::PDFDocumentImage::create):
(WebCore::PDFDocumentImage::hasSingleSecurityOrigin):
(WebCore::PDFDocumentImage::destroyDecodedData):
(WebCore::PDFDocumentImage::decodedSize):
* platform/graphics/mac/PDFDocumentImageMac.mm: Removed.
* platform/mac/SoftLinking.h:
2013-09-08 Andreas Kling <akling@apple.com>
ScriptExecutionContext: Use FINAL instead of foo() { virtualFoo() }
<https://webkit.org/b/120827>
Reviewed by Darin Adler.
Now that we have FINAL, we can just use that to have fast versions of url()
and completeURL() when calling through a Document or WorkerGlobalScope pointer.
* dom/Document.cpp:
* dom/Document.h:
* dom/ScriptExecutionContext.h:
* workers/WorkerGlobalScope.cpp:
* workers/WorkerGlobalScope.h:
2013-09-08 Antti Koivisto <antti@apple.com>
Rename needsShadowTreeWalker
https://bugs.webkit.org/show_bug.cgi?id=121005
Reviewed by Andreas Kling.
Rename to needsNodeRenderingTraversalSlowPath.
* dom/ContainerNode.h:
(WebCore::Node::needsNodeRenderingTraversalSlowPath):
* dom/Element.cpp:
(WebCore::shouldUseNodeRenderingTraversalSlowPath):
(WebCore::Element::resetNeedsNodeRenderingTraversalSlowPath):
Only Elements can have this flag. Move the code here from Node.
(WebCore::Element::addShadowRoot):
(WebCore::Element::setBeforePseudoElement):
(WebCore::Element::setAfterPseudoElement):
(WebCore::Element::clearBeforePseudoElement):
(WebCore::Element::clearAfterPseudoElement):
Reset after clear too.
* dom/Element.h:
* dom/Element.h:
* dom/Node.cpp:
* dom/Node.h:
(WebCore::Node::isInsertionPoint):
(WebCore::Node::setNeedsNodeRenderingTraversalSlowPath):
Make protected.
* dom/NodeRenderingTraversal.h:
(WebCore::NodeRenderingTraversal::parent):
(WebCore::NodeRenderingTraversal::nextSibling):
(WebCore::NodeRenderingTraversal::previousSibling):
2013-09-08 Andreas Kling <akling@apple.com>
Render{Block,Inline}::lineBoxes() should return a reference.
<https://webkit.org/b/120995>
Reviewed by Antti Koivisto.
This function was already just returning the address of a member variable.
2013-09-08 Andreas Kling <akling@apple.com>
Move "using software CSS filters" optimization flag to RenderView.
<https://webkit.org/b/120999>
Reviewed by Antti Koivisto.
This flag is used to avoid an extra tree walk when there are no software CSS filters in use.
Move it from FrameView to RenderView where it belongs.
* page/FrameView.h:
* rendering/RenderLayer.cpp:
(WebCore::RenderLayer::updateOrRemoveFilterEffectRenderer):
* rendering/RenderObject.cpp:
(WebCore::RenderObject::containerForRepaint):
* rendering/RenderView.cpp:
(WebCore::RenderView::RenderView):
* rendering/RenderView.h:
2013-09-08 Andreas Kling <akling@apple.com>
FrameLoader::icon() should return a reference.
<https://webkit.org/b/120993>
Reviewed by Antti Koivisto.
This function never returns null. Make it return a reference!
2013-09-08 Andreas Kling <akling@apple.com>
Remove unused Scrollbar tickmark stuff.
<https://webkit.org/b/121000>
Reviewed by Antti Koivisto.
This code is no longer used by any ports.
* page/FrameView.cpp:
* page/FrameView.h:
* platform/ScrollableArea.h:
* platform/Scrollbar.cpp:
* platform/Scrollbar.h:
* platform/ScrollbarThemeClient.h:
2013-09-08 Antti Koivisto <antti@apple.com>
Remove ComposedShadowTreeWalker
https://bugs.webkit.org/show_bug.cgi?id=120997
Reviewed by Andreas Kling.
Move the code to NodeRenderingTraversal which is the only client besides Internals.
* CMakeLists.txt:
* GNUmakefile.list.am:
* Target.pri:
* WebCore.exp.in:
* WebCore.vcxproj/WebCore.vcxproj:
* WebCore.xcodeproj/project.pbxproj:
* dom/ComposedShadowTreeWalker.cpp: Removed.
* dom/ComposedShadowTreeWalker.h: Removed.
* dom/NodeRenderingTraversal.cpp:
(WebCore::NodeRenderingTraversal::nodeCanBeDistributed):
(WebCore::NodeRenderingTraversal::findFirstSiblingEnteringInsertionPoints):
(WebCore::NodeRenderingTraversal::findFirstEnteringInsertionPoints):
(WebCore::NodeRenderingTraversal::findFirstFromDistributedNode):
(WebCore::NodeRenderingTraversal::findLastSiblingEnteringInsertionPoints):
(WebCore::NodeRenderingTraversal::findLastEnteringInsertionPoints):
(WebCore::NodeRenderingTraversal::findLastFromDistributedNode):
(WebCore::NodeRenderingTraversal::traverseParent):
(WebCore::NodeRenderingTraversal::traverseFirstChild):
(WebCore::NodeRenderingTraversal::traverseLastChild):
(WebCore::NodeRenderingTraversal::traverseNextSibling):
(WebCore::NodeRenderingTraversal::traversePreviousSibling):
Make former members of ComposedShadowTreeWalker standalone functions in NodeRenderingTraversal.
(WebCore::NodeRenderingTraversal::parentSlow):
(WebCore::NodeRenderingTraversal::nextSiblingSlow):
(WebCore::NodeRenderingTraversal::previousSiblingSlow):
(WebCore::NodeRenderingTraversal::nextInScope):
(WebCore::NodeRenderingTraversal::previousInScope):
(WebCore::NodeRenderingTraversal::parentInScope):
(WebCore::NodeRenderingTraversal::lastChildInScope):
* testing/Internals.cpp:
* testing/Internals.h:
* testing/Internals.idl:
2013-09-08 Andreas Kling <akling@apple.com>
FrameLoader::policyChecker() should return a reference.
<https://webkit.org/b/120991>
Reviewed by Antti Koivisto.
This function never returns null. Make it return a reference!
2013-09-08 Andreas Kling <akling@apple.com>
FrameLoader::mixedContentChecker() should return a reference.
<https://webkit.org/b/120992>
Reviewed by Antti Koivisto.
This function was already just returning the address of a member variable.
2013-09-07 Antti Koivisto <antti@apple.com>
Separate forward and backward paths in ComposedShadowTreeWalker
https://bugs.webkit.org/show_bug.cgi?id=120979
Reviewed by Andreas Kling.
Have separate first/last and next/previous paths instead of using a direction enum.
Reduce the number of helper functions and give them more understandable names.
* dom/ComposedShadowTreeWalker.cpp:
(WebCore::findFirstSiblingEnteringInsertionPoints):
(WebCore::findFirstEnteringInsertionPoints):
(WebCore::findFirstFromDistributedNode):
(WebCore::findLastSiblingEnteringInsertionPoints):
(WebCore::findLastEnteringInsertionPoints):
(WebCore::findLastFromDistributedNode):
(WebCore::ComposedShadowTreeWalker::firstChild):
(WebCore::ComposedShadowTreeWalker::traverseFirstChild):
(WebCore::ComposedShadowTreeWalker::lastChild):
(WebCore::ComposedShadowTreeWalker::traverseLastChild):
(WebCore::ComposedShadowTreeWalker::nextSibling):
(WebCore::ComposedShadowTreeWalker::previousSibling):
(WebCore::ComposedShadowTreeWalker::traverseNextSibling):
(WebCore::ComposedShadowTreeWalker::traversePreviousSibling):
* dom/ComposedShadowTreeWalker.h:
2013-09-07 Andreas Kling <akling@apple.com>
Beat FrameView with the FINAL stick.
<https://webkit.org/b/120989>
Reviewed by Anders Carlsson.
... and mark everything virtual with OVERRIDE, exposing a couple of things
that didn't actually override anything.
* WebCore.exp.in:
* page/FrameView.h:
2013-09-07 Anders Carlsson <andersca@apple.com>
Remove NonCopyableSort.h from WTF
https://bugs.webkit.org/show_bug.cgi?id=120984
Reviewed by Andreas Kling.
* css/MediaQuery.cpp:
(WebCore::MediaQuery::MediaQuery):
* html/HTMLMediaElement.cpp:
(WebCore::HTMLMediaElement::updateActiveTextTrackCues):
* html/RangeInputType.cpp:
(WebCore::RangeInputType::updateTickMarkValues):
* inspector/InspectorMemoryAgent.cpp:
* page/CaptionUserPreferences.cpp:
(WebCore::CaptionUserPreferences::sortedTrackListForMenu):
* page/CaptionUserPreferences.h:
* page/CaptionUserPreferencesMediaAF.cpp:
(WebCore::CaptionUserPreferencesMediaAF::sortedTrackListForMenu):
* platform/graphics/texmap/TextureMapper.cpp:
(WebCore::BitmapTexturePool::releaseUnusedTexturesTimerFired):
2013-09-07 Antti Koivisto <antti@apple.com>
Simplify ComposedShadowTreeWalker parent traversal
https://bugs.webkit.org/show_bug.cgi?id=120971
Reviewed by Andreas Kling.
Combine a bunch of parent traversal functions into one.
* dom/ComposedShadowTreeWalker.cpp:
(WebCore::ComposedShadowTreeWalker::traverseParent):
(WebCore::ComposedShadowTreeWalker::previous):
* dom/ComposedShadowTreeWalker.h:
Remove unused fromFirstChild.
2013-09-07 Anders Carlsson <andersca@apple.com>
Get rid of PassOwnArrayPtr
https://bugs.webkit.org/show_bug.cgi?id=120964
Reviewed by Andreas Kling.
Use OwnArrayPtr instead of PassOwnArrayPtr.
* html/canvas/WebGLRenderingContext.cpp:
* platform/Length.cpp:
(WebCore::newCoordsArray):
(WebCore::newLengthArray):
* platform/Length.h:
* platform/audio/FFTFrame.h:
* platform/graphics/GraphicsContext3D.cpp:
* platform/graphics/GraphicsContext3D.h:
* platform/graphics/texmap/TextureMapperGL.cpp:
* platform/graphics/wince/SharedBitmap.cpp:
2013-09-07 Antti Koivisto <antti@apple.com>
Remove unnecessary sibling text renderers after attach
https://bugs.webkit.org/show_bug.cgi?id=120953
Reviewed by the Swedish Review Team: Anders Carlsson and Andreas Kling.
The current createTextRenderersForSiblingsAfterAttachIfNeeded code only adds text renderers, never removes them.
Style changes can go either way.
The patch causes no visible changes in rendered output. The whitespace nodes that it affects are leftovers that
have no rendering effect. However it does change results of many dumpAsText and render tree dump based layout
tests as unnecessary text nodes disappear.
The main goal is to make results of dynamic attach and parsing time attach produce more similar results. As
an added bonus we get slightly simpler rendering trees.
Rendering tree dumps show us still leaving behind empty anonymous blocks when removing whitespace text nodes.
Those should collapse away too.
* style/StyleResolveTree.cpp:
(WebCore::Style::reattachTextRenderersForWhitespaceOnlySiblingsAfterAttachIfNeeded):
Allow the code both create and remove text renderers.
Tighten to bail out faster if case is not the exact one that matters.
Use NodeRenderingTraversal to mirror textRendererIsNeeded.
Renamed for clarity.
(WebCore::Style::updateTextRendererAfterContentChange):
(WebCore::Style::resolveLocal):
(WebCore::Style::updateTextStyle):
(WebCore::Style::attachRenderTree):
2013-09-07 Anders Carlsson <andersca@apple.com>
Get rid of FastAllocBase.h
https://bugs.webkit.org/show_bug.cgi?id=120952
Reviewed by Antti Koivisto.
Include FastMalloc.h instead of FastAllocBase.h.
* Modules/webdatabase/SQLTransactionClient.h:
* bindings/js/GCController.h:
* bridge/Bridge.h:
* bridge/IdentifierRep.h:
* dom/DocumentStyleSheetCollection.h:
* dom/TransformSource.h:
* html/InputType.h:
* inspector/InspectorCounters.h:
* inspector/InstrumentingAgents.h:
* inspector/WorkerInspectorController.h:
* loader/cache/CachedResourceClient.h:
* page/FrameActionScheduler.h:
* platform/Length.h:
* platform/MemoryPressureHandler.h:
* platform/ScrollAnimator.h:
* platform/SharedTimer.h:
* platform/audio/gstreamer/FFTFrameGStreamer.cpp:
* platform/cairo/WidgetBackingStore.h:
* platform/graphics/Color.h:
* platform/graphics/FontData.h:
* platform/graphics/Path.h:
* platform/graphics/qt/FontCustomPlatformData.h:
* platform/graphics/transforms/AffineTransform.h:
* platform/graphics/transforms/TransformationMatrix.h:
* platform/gtk/GtkDragAndDropHelper.h:
* platform/gtk/GtkPopupMenu.h:
* platform/network/NetworkStateNotifier.h:
* platform/sql/SQLiteTransaction.h:
* platform/text/enchant/TextCheckerEnchant.h:
* rendering/RenderArena.h:
* rendering/TableLayout.h:
* rendering/style/StyleCustomFilterProgram.h:
* rendering/style/StyleCustomFilterProgramCache.h:
* svg/SVGPathConsumer.h:
* workers/WorkerScriptLoader.h:
2013-09-07 Eric Carlson <eric.carlson@apple.com>
MediaStream should fire ended event when all tracks are ended
https://bugs.webkit.org/show_bug.cgi?id=120871
Reviewed by Jer Noble.
Merge https://chromium.googlesource.com/chromium/blink/+/bebd179b65be69e46f2f434a3ec8b1e4aa85cc42
Test: fast/mediastream/MediaStream-onended.html
* Modules/mediastream/MediaStream.cpp:
(WebCore::MediaStream::trackEnded): New.
* Modules/mediastream/MediaStream.h:
* Modules/mediastream/MediaStreamTrack.cpp:
(WebCore::MediaStreamTrack::sourceChangedState): Call didEndTrack when state changes to ReadyStateEnded.
(WebCore::MediaStreamTrack::didEndTrack): New.
(WebCore::MediaStreamTrack::stop): Call didEndTrack.
* Modules/mediastream/MediaStreamTrack.h:
* platform/mediastream/MediaStreamDescriptor.h:
(WebCore::MediaStreamDescriptor::MediaStreamDescriptor): Require didEndTrack.
2013-09-06 Thiago de Barros Lacerda <thiago.lacerda@openbossa.org>
Get MEDIA_STREAM compiling for other ports (EFL and GTK)
https://bugs.webkit.org/show_bug.cgi?id=120811
Reviewed by Eric Carlson.
* CMakeLists.txt:
* GNUmakefile.list.am:
* Modules/mediastream/LocalMediaStream.h:
* Modules/mediastream/MediaStreamRegistry.cpp:
(WebCore::MediaStreamRegistry::lookupMediaStreamDescriptor):
* Modules/mediastream/RTCStatsResponse.h:
2013-09-06 Bem Jones-Bey <bjonesbe@adobe.com>
[CSS Shapes] Floats with shape-outside aren't painting in the correct order
https://bugs.webkit.org/show_bug.cgi?id=118492
Reviewed by Darin Adler.
When removing the old positioning behavior, the code that makes a
float with shape-outside gain a layer was left behind. This patch
removes that, so now floats with shape-outside are painted just like
floats without shape-outside.
Also remove the isFloatingWithShapeOutside helper method because its
use is now somewhat redundant, and the check it does is now only
needed in one place.
Test: fast/shapes/shape-outside-floats/shape-outside-floats-not-a-layer.html
* rendering/RenderBox.h:
(WebCore::RenderBox::shapeOutsideInfo):
* rendering/RenderObject.h:
* rendering/shapes/ShapeOutsideInfo.cpp:
(WebCore::ShapeOutsideInfo::isEnabledFor):
2013-09-06 Anders Carlsson <andersca@apple.com>
Add a new smart pointer type for fastMalloc'ed memory
https://bugs.webkit.org/show_bug.cgi?id=120911
Reviewed by Andreas Kling.
Update for WTF changes.
* platform/network/cf/FormDataStreamCFNet.cpp:
(WebCore::advanceCurrentStream):
2013-09-06 Dirk Schulze <krit@webkit.org>
Interpolate between CSS filter() and cached images
https://bugs.webkit.org/show_bug.cgi?id=120602
Reviewed by Simon Fraser.
Interpolate from a filter() image function to a url() image reference and
the other way around, if the input image on the filter function is the same
as the referenced image on url().
* page/animation/CSSPropertyAnimation.cpp: Replaced old
filterBlend function with blendFilter function which is more generic
and can be reused in multiple places.
(WebCore::blendFilterOperations):
(WebCore::blendFunc):
(WebCore::blendFilter):
2013-09-06 Ryosuke Niwa <rniwa@webkit.org>
Elements retained by AccessibilityImageMapLink leak
https://bugs.webkit.org/show_bug.cgi?id=120917
Reviewed by Chris Fleizach.
Merge https://chromium.googlesource.com/chromium/blink/+/df0bd288efe65e5e38425fbdcdfc68b5a2a79e42
Unfortunately, the test added by the Blink change doesn't reproduce a leak in WebKit.
* accessibility/AccessibilityImageMapLink.cpp:
(WebCore::AccessibilityImageMapLink::detachFromParent):
* accessibility/AccessibilityImageMapLink.h:
* accessibility/AccessibilityMockObject.h:
(WebCore::AccessibilityMockObject::detachFromParent):
2013-09-06 Andreas Kling <akling@apple.com>
Make Obj-C bindings generator less #include-happy.
<https://webkit.org/b/120913>
Reviewed by Anders Carlsson.
Knock out an old FIXME in CodeGeneratorObjC.pm and avoid including unrelated
interface declarations from implementation files where they are not needed.
* bindings/scripts/CodeGeneratorObjC.pm:
(GenerateImplementation):
Only include DOMFooInternal.h relevant to the current interface.
* bindings/scripts/test/ObjC/*
Rebaseline Obj-C bindings tests now that they include fewer things.
2013-09-06 Andreas Kling <akling@apple.com>
Rebaseline bindings tests after Swedish breakage.
2013-09-06 Andreas Kling <akling@apple.com>
Don't include Document.h from JSDOMBinding.h
<https://webkit.org/b/120909>
Reviewed by Anders Carlsson.
Move DOMConstructorWithDocument out of JSDOMBinding.h to its own header.
This was the only part of JSDOMBinding.h that needed Document's definition.
This reduces the include dependency graph of many bindings files.
* WebCore.xcodeproj/project.pbxproj:
* bindings/js/DOMConstructorWithDocument.h:
* bindings/js/JSDOMBinding.cpp:
* bindings/js/JSDOMBinding.h:
* bindings/scripts/CodeGeneratorJS.pm:
* bindings/scripts/CodeGeneratorGObject.pm:
2013-09-06 Ryosuke Niwa <rniwa@webkit.org>
Range::ownerDocument should return Document&
https://bugs.webkit.org/show_bug.cgi?id=120908
Reviewed by Andreas Kling.
Return Document& in Range::ownerDocument(). Also make setDocument take Document& so that this invariant is self-evident.
* bindings/objc/DOM.mm:
(-[DOMRange boundingBox]):
(-[DOMRange renderedImageForcingBlackText:]):
(-[DOMRange textRects]):
* dom/Range.cpp:
(WebCore::Range::setDocument):
(WebCore::Range::setStart):
(WebCore::Range::setEnd):
(WebCore::Range::selectNode):
(WebCore::Range::selectNodeContents):
* dom/Range.h:
(WebCore::Range::ownerDocument):
* editing/AlternativeTextController.cpp:
(WebCore::AlternativeTextController::handleAlternativeTextUIResult):
* editing/Editor.cpp:
(WebCore::Editor::avoidIntersectionWithDeleteButtonController):
(WebCore::isFrameInRange):
(WebCore::Editor::countMatchesForText):
* editing/EditorCommand.cpp:
(WebCore::unionDOMRanges):
* editing/TextCheckingHelper.cpp:
(WebCore::TextCheckingHelper::unifiedTextCheckerEnabled):
* editing/TextIterator.cpp:
(WebCore::plainText):
(WebCore::findPlainText):
* editing/htmlediting.cpp:
(WebCore::extendRangeToWrappingNodes):
* editing/markup.cpp:
(WebCore::createMarkup):
(WebCore::createFragmentFromText):
* page/DragController.cpp:
(WebCore::documentFragmentFromDragData):
(WebCore::DragController::concludeEditDrag):
* page/Page.cpp:
(WebCore::Page::rangeOfString):
* rendering/RenderObject.cpp:
(WebCore::RenderObject::absoluteBoundingBoxRectForRange):
* testing/Internals.cpp:
(WebCore::Internals::addTextMatchMarker):
2013-09-06 Brent Fulgham <bfulgham@apple.com>
[Windows] StructuredExceptionHandlerSuppressor Causes Bad Interactions with Support Libraries
https://bugs.webkit.org/show_bug.cgi?id=120901
Reviewed by Anders Carlsson.
Change from old "crash on any exception" implementation to a new version that leaves normal
exception handling infrastructure in place for use by support libraries. We check exceptions
and decide whether to abort or not based on the failure type.
* WebCore.vcxproj/WebCore.vcxproj: Add new implementation files.
* WebCore.vcxproj/WebCore.vcxproj.filters: Ditto.
* platform/graphics/ca/win/LayerChangesFlusher.cpp:
(WebCore::LayerChangesFlusher::hookCallback): Allocate handler struct on stack.
* platform/win/StructuredExceptionHandlerSuppressor.cpp: Added.
(exceptionShouldTerminateProgram): New.
(exceptionHandler): New.
(WebCore::StructuredExceptionHandlerSuppressor::StructuredExceptionHandlerSuppressor): Moved
from header, and updated to add our new exception handler.
(WebCore::StructuredExceptionHandlerSuppressor::~StructuredExceptionHandlerSuppressor): Moved
from header.
* platform/win/StructuredExceptionHandlerSuppressor.h: Move implementation of constructor and
destructor from header file.
* platform/win/makesafeseh.asm: Added.
2013-09-06 Vivek Galatage <vivek.vg@samsung.com>
Refactor XMLDocumentParser to defer creation of XMLErrors until error occurs
https://bugs.webkit.org/show_bug.cgi?id=120850
Reviewed by Darin Adler.
XMLErrors is created as soon as XMLDocumentParser is constructed. It may not be required
for all the valid XML documents. Deferring its creation until an error for the invalid
XML document.
No new tests as code refactoring.
* xml/parser/XMLDocumentParser.cpp:
(WebCore::XMLDocumentParser::handleError):
(WebCore::XMLDocumentParser::insertErrorMessageBlock):
* xml/parser/XMLDocumentParser.h:
* xml/parser/XMLDocumentParserLibxml2.cpp:
(WebCore::XMLDocumentParser::XMLDocumentParser):
* xml/parser/XMLDocumentParserQt.cpp:
(WebCore::XMLDocumentParser::XMLDocumentParser):
2013-09-06 Anders Carlsson <andersca@apple.com>
Remove fastNew/fastDelete
https://bugs.webkit.org/show_bug.cgi?id=120904
Reviewed by Andreas Kling.
Call operator delete directly.
* css/CSSSelectorList.cpp:
(WebCore::CSSSelectorList::adoptSelectorVector):
2013-09-06 Anders Carlsson <andersca@apple.com>
Stop using fastNew/fastDelete in JavaScriptCore
https://bugs.webkit.org/show_bug.cgi?id=120898
Reviewed by Oliver Hunt.
Update for changes to JavaScriptCore.
* bindings/js/DOMObjectHashTableMap.h:
(WebCore::DOMObjectHashTableMap::get):
* bindings/js/JSDOMBinding.cpp:
(WebCore::getHashTableForGlobalData):
* bindings/js/JSDOMBinding.h:
* bindings/js/JSDOMWindowCustom.cpp:
(WebCore::JSDOMWindow::put):
* bindings/js/JSPluginElementFunctions.h:
(WebCore::pluginElementCustomGetOwnPropertySlot):
* bindings/js/JSStorageCustom.cpp:
(WebCore::JSStorage::deleteProperty):
(WebCore::JSStorage::putDelegate):
* bindings/scripts/CodeGeneratorJS.pm:
(hashTableAccessor):
(prototypeHashTableAccessor):
(constructorHashTableAccessor):
(GenerateGetOwnPropertySlotBody):
(GenerateImplementation):
(GenerateConstructorHelperMethods):
2013-09-06 Andreas Kling <akling@apple.com>
Include Frame.h in fewer places.
<https://webkit.org/b/120868>
Reviewed by Anders Carlsson.
- Move JSMainThreadExecState::instrumentFunctionCall() to a separate header.
This avoids including InspectorInstrumentation.h from JSMainThreadExecState.h
which caused all JS and Objective-C bindings to depend on Frame.h
- Out-of-line the three methods on FrameView that were operating on Frames.
Most of the call sites were in FrameView.cpp so they will still get inlined.
- Removed GenericBinding.h, nothing was using it anyway.
After this, touching Frame.h and doing a (debug) rebuild goes from 9m30 to 3m30
on my laptop.
* GNUmakefile.list.am:
* WebCore.exp.in:
* WebCore.vcxproj/WebCore.vcxproj:
* WebCore.vcxproj/WebCore.vcxproj.filters:
* WebCore.xcodeproj/project.pbxproj:
* bindings/generic/GenericBinding.h: Removed.
* bindings/js/JSCallbackData.cpp:
* bindings/js/JSEventListener.cpp:
* bindings/js/JSMainThreadExecState.h:
* bindings/js/JSMainThreadExecStateInstrumentation.h: Added.
(WebCore::JSMainThreadExecState::instrumentFunctionCall):
* bindings/js/JSMutationCallback.cpp:
* bindings/js/ScheduledAction.cpp:
* css/DeprecatedStyleBuilder.cpp:
* css/ElementRuleCollector.cpp:
* css/MediaQueryEvaluator.cpp:
* css/SelectorChecker.h:
* dom/StyledElement.cpp:
* html/HTMLPlugInImageElement.cpp:
* inspector/InspectorPageAgent.h:
* inspector/NetworkResourcesData.h:
* inspector/PageRuntimeAgent.cpp:
* loader/cache/CachedImage.cpp:
* page/FrameView.cpp:
(WebCore::FrameView::renderView):
(WebCore::FrameView::mapFromLayoutToCSSUnits):
(WebCore::FrameView::mapFromCSSToLayoutUnits):
* page/FrameView.h:
* page/TouchAdjustment.cpp:
* rendering/RenderBoxModelObject.cpp:
* rendering/RenderLayer.cpp:
* rendering/RenderLayerCompositor.h:
* rendering/RenderText.cpp:
* svg/graphics/SVGImage.cpp:
2013-09-06 Brent Fulgham <bfulgham@apple.com>
[Windows] Unreviewed gardening: Spell 'Suppressor' properly
* WebCore.vcxproj/WebCore.vcxproj: Change StructuredExceptionHandlerSupressor to StructuredExceptionHandlerSuppressor
* WebCore.vcxproj/WebCore.vcxproj.filters: Ditto
* platform/graphics/ca/win/LayerChangesFlusher.cpp:
(WebCore::LayerChangesFlusher::hookCallback): Ditto
* platform/win/StructuredExceptionHandlerSuppressor.h: Copied from platform/win/StructuredExceptionHandlerSupressor.h.
* platform/win/StructuredExceptionHandlerSupressor.h: Removed.
2013-09-06 David Hyatt <hyatt@apple.com>
Add new RenderBlockFlow class.
https://bugs.webkit.org/show_bug.cgi?id=120777
Reviewed by Beth Dakin.
This patch adds a new RenderBlockFlow class. The idea is to get all of the line/float/margin
code out of RenderBlock and into the subclass, and then we can make RenderBlock an abstract
base. This will save memory for all of the classes that derive from RenderBlock but have
their own layout systems (e.g., flexbox, grid, table), and it will let us tighten up
types to make it more clear when we're talking about block layout code vs. a more generic
block-level object that can have any kind of layout.
This patch adds the new class and it makes sure all the objects that should be block flows
inherit from the new class.
isBlockFlow() proved to be a problematic method (and was the source of regressions when I
landed this patch the first time). When the method was first implemented, it was added as
"I'm a block but not a table." and at the time table was the only subclass of block. However
when new subclasses were added, this function was never patched to account for them. This
means, for example, that flexible boxes and grids claim to be block flows in the codebase
and have for years. This is obviously wrong, since flexible boxes are not in fact block
flows, but because of this mistake, code has started relying on the incorrect behavior of
isBlockFlow() (form controls mostly).
What I've done to deal with this problem is renamed isBlockFlow() to be
isBlockFlowFlexBoxOrGrid() in order to make it obvious that this method is returning true
for pretty much all blocks other than tables. This makes a lot of call sites look pretty
stupid, since they obviously never intended to include flexible boxes or grids, but at least
it is clear what the method is doing now.
The plan is to land this patch and then start converting call sites from
isBlockFlowFlexBoxOrGrid() to isRenderBlockFlow() one by one, and that way we can figure
out which code is making bad assumptions and change those callers to be isRenderBlock()
instead. Ultimately this isBlockFlowFlexBoxOrGrid() method will go away with callers either
changing to use isRenderBlock() or isRenderBlockFlow().
* CMakeLists.txt:
* GNUmakefile.list.am:
* Target.pri:
* WebCore.vcxproj/WebCore.vcxproj:
* WebCore.xcodeproj/project.pbxproj:
* accessibility/AccessibilityRenderObject.cpp:
(WebCore::AccessibilityRenderObject::computeAccessibilityIsIgnored):
(WebCore::AccessibilityRenderObject::determineAccessibilityRole):
* dom/Position.cpp:
(WebCore::Position::isCandidate):
(WebCore::Position::getInlineBoxAndOffset):
(WebCore::Position::primaryDirection):
* dom/PositionIterator.cpp:
(WebCore::PositionIterator::isCandidate):
* editing/ApplyStyleCommand.cpp:
(WebCore::ApplyStyleCommand::applyInlineStyleToPushDown):
* editing/CompositeEditCommand.cpp:
(WebCore::CompositeEditCommand::addBlockPlaceholderIfNeeded):
* editing/Editor.cpp:
(WebCore::Editor::baseWritingDirectionForSelectionStart):
* editing/FrameSelection.cpp:
(WebCore::caretRenderer):
* editing/TextIterator.cpp:
(WebCore::TextIterator::shouldRepresentNodeOffsetZero):
* editing/TypingCommand.cpp:
(WebCore::TypingCommand::makeEditableRootEmpty):
* editing/htmlediting.cpp:
(WebCore::isBlockFlowElement):
* html/HTMLDetailsElement.cpp:
(WebCore::HTMLDetailsElement::createRenderer):
* html/HTMLSummaryElement.cpp:
(WebCore::HTMLSummaryElement::createRenderer):
* html/shadow/SliderThumbElement.cpp:
(WebCore::RenderSliderThumb::RenderSliderThumb):
* html/shadow/SliderThumbElement.h:
* rendering/LayoutState.cpp:
(WebCore::LayoutState::LayoutState):
* rendering/RenderBlock.cpp:
(WebCore::RenderBlock::createAnonymous):
(WebCore::RenderBlock::layoutBlock):
(WebCore::RenderBlock::collapseMargins):
(WebCore::RenderBlock::selectionGaps):
(WebCore::RenderBlock::firstLineBoxBaseline):
(WebCore::RenderBlock::lastLineBoxBaseline):
(WebCore::RenderBlock::firstLineBlock):
(WebCore::findFirstLetterBlock):
(WebCore::shouldCheckLines):
(WebCore::RenderBlock::adjustForBorderFit):
* rendering/RenderBlock.h:
* rendering/RenderBox.cpp:
(WebCore::RenderBox::computeRectForRepaint):
(WebCore::RenderBox::positionForPoint):
* rendering/RenderBoxModelObject.h:
(WebCore::RenderBoxModelObject::canHaveBoxInfoInRegion):
* rendering/RenderDeprecatedFlexibleBox.cpp:
(WebCore::RenderDeprecatedFlexibleBox::applyLineClamp):
(WebCore::RenderDeprecatedFlexibleBox::clearLineClamp):
* rendering/RenderDetailsMarker.cpp:
(WebCore::RenderDetailsMarker::RenderDetailsMarker):
* rendering/RenderDetailsMarker.h:
* rendering/RenderFieldset.cpp:
(WebCore::RenderFieldset::RenderFieldset):
* rendering/RenderFieldset.h:
* rendering/RenderFileUploadControl.cpp:
(WebCore::RenderFileUploadControl::RenderFileUploadControl):
* rendering/RenderFileUploadControl.h:
* rendering/RenderFlowThread.cpp:
(WebCore::RenderFlowThread::RenderFlowThread):
* rendering/RenderFlowThread.h:
* rendering/RenderFullScreen.cpp:
* rendering/RenderInline.cpp:
(WebCore::RenderInline::computeRectForRepaint):
* rendering/RenderLineBoxList.cpp:
(WebCore::RenderLineBoxList::dirtyLinesFromChangedChild):
* rendering/RenderListItem.cpp:
(WebCore::RenderListItem::RenderListItem):
(WebCore::RenderListItem::willBeDestroyed):
(WebCore::RenderListItem::willBeRemovedFromTree):
(WebCore::RenderListItem::layout):
(WebCore::RenderListItem::addOverflowFromChildren):
(WebCore::RenderListItem::computePreferredLogicalWidths):
(WebCore::RenderListItem::paint):
* rendering/RenderListItem.h:
* rendering/RenderMeter.cpp:
(WebCore::RenderMeter::RenderMeter):
* rendering/RenderMeter.h:
* rendering/RenderMultiColumnBlock.cpp:
(WebCore::RenderMultiColumnBlock::RenderMultiColumnBlock):
* rendering/RenderMultiColumnBlock.h:
* rendering/RenderObject.cpp:
(WebCore::RenderObject::createObject):
(WebCore::RenderObject::computeRectForRepaint):
(WebCore::RenderObject::styleWillChange):
(WebCore::firstLineStyleForCachedUncachedType):
* rendering/RenderObject.h:
(WebCore::RenderObject::isBR):
(WebCore::RenderObject::isRenderBlockFlow):
(WebCore::RenderObject::isBlockFlowFlexBoxOrGrid):
* rendering/RenderObjectChildList.cpp:
(WebCore::RenderObjectChildList::insertChildNode):
* rendering/RenderProgress.cpp:
(WebCore::RenderProgress::RenderProgress):
* rendering/RenderProgress.h:
* rendering/RenderRegion.cpp:
(WebCore::RenderRegion::RenderRegion):
* rendering/RenderRegion.h:
* rendering/RenderRuby.cpp:
(WebCore::RenderRubyAsBlock::RenderRubyAsBlock):
* rendering/RenderRuby.h:
* rendering/RenderRubyBase.cpp:
(WebCore::RenderRubyBase::RenderRubyBase):
* rendering/RenderRubyBase.h:
* rendering/RenderRubyRun.cpp:
(WebCore::RenderRubyRun::RenderRubyRun):
* rendering/RenderRubyRun.h:
* rendering/RenderRubyText.cpp:
(WebCore::RenderRubyText::RenderRubyText):
* rendering/RenderRubyText.h:
* rendering/RenderTableCaption.cpp:
(WebCore::RenderTableCaption::RenderTableCaption):
* rendering/RenderTableCaption.h:
* rendering/RenderTableCell.cpp:
(WebCore::RenderTableCell::RenderTableCell):
* rendering/RenderTableCell.h:
* rendering/RenderTextControl.cpp:
(WebCore::RenderTextControl::RenderTextControl):
* rendering/RenderTextControl.h:
* rendering/RenderTextControlSingleLine.h:
(WebCore::RenderTextControlInnerBlock::RenderTextControlInnerBlock):
* rendering/RenderTextTrackCue.cpp:
(WebCore::RenderTextTrackCue::RenderTextTrackCue):
* rendering/RenderTextTrackCue.h:
* rendering/RenderView.cpp:
(WebCore::RenderView::RenderView):
* rendering/RenderView.h:
* rendering/RenderingAllInOne.cpp:
* rendering/mathml/RenderMathMLOperator.cpp:
(WebCore::RenderMathMLOperator::createGlyph):
* rendering/svg/RenderSVGBlock.cpp:
(WebCore::RenderSVGBlock::RenderSVGBlock):
* rendering/svg/RenderSVGBlock.h:
2013-09-06 Vivek Galatage <vivek.vg@samsung.com>
Calling window.close() should indicate failure with warning message
https://bugs.webkit.org/show_bug.cgi?id=120156
Reviewed by Darin Adler.
Closing of window is allowed for the tests for the automation.
* page/DOMWindow.cpp:
(WebCore::DOMWindow::close):
2013-09-06 Mike West <mkwst@chromium.org>
Revalidation header blacklisting should be case-insensitive.
https://bugs.webkit.org/show_bug.cgi?id=120832
Reviewed by Alexey Proskuryakov.
Headers like 'content-type' should be ignored for 304 responses,
even if they are delivered as 'Content-Type', or 'CoNtEnT-TyPe', etc.
I broke this behavior in http://trac.webkit.org/changeset/142068
("Entity-header extension headers honored on 304 responses"). Pages like
https://learndev.unm.edu/ currently break on reload, as they incorrectly
send 'Content-Type: text/plain' for 304 responses for resources like
CSS and JavaScript. The browser should drop these headers, but because
we're comparing in a case-sensitive fashion, we don't.
https://code.google.com/p/chromium/issues/detail?id=246875 documents the
Blink-side fix; this patch is a port of that patch.
Test: http/tests/cache/content-type-ignored-during-revalidation.html
* loader/cache/CachedResource.cpp:
(WebCore::shouldUpdateHeaderAfterRevalidation):
Compare the provided AtomicString 'header' to the revalidation
blacklists in a case-insensitive fashion.
2013-09-06 Eric Carlson <eric.carlson@apple.com>
[MediaStream API] Allow empty MediaStreams
https://bugs.webkit.org/show_bug.cgi?id=120815
Reviewed by Jer Noble.
The spec is a bit unclear ecactly what should happen with newly created MediaStreams
that doesn't have any tracks. The current implementation is too strict and the spec
is being worked upon to be clearer. In the meantime this patch doesn't set eneded to
true in the constructor.
No new tests, existing test updated.
(WebCore::MediaStreamRegistry::lookupMediaStreamDescriptor):
* platform/mediastream/MediaStreamDescriptor.h:
(WebCore::MediaStreamDescriptor::MediaStreamDescriptor):
2013-09-06 Anders Carlsson <andersca@apple.com>
Stop using fastNew/fastDelete in WebCore
https://bugs.webkit.org/show_bug.cgi?id=120867
Reviewed by Geoffrey Garen.
Using fastNew/fastDelete can be dangerous, especially when put into a smart pointer
such as OwnPtr which uses regular delete. Because of this I'd like to remove fastNew/fastDelete.
Turns out it's only used in a couple of places in WebCore, so just use new/delete here instead.
* platform/audio/FFTFrame.h:
* platform/audio/gstreamer/FFTFrameGStreamer.cpp:
(WebCore::FFTFrame::FFTFrame):
(WebCore::FFTFrame::~FFTFrame):
(WebCore::FFTFrame::doFFT):
(WebCore::FFTFrame::doInverseFFT):
* platform/graphics/gstreamer/MediaPlayerPrivateGStreamerBase.cpp:
(WebCore::MediaPlayerPrivateGStreamerBase::MediaPlayerPrivateGStreamerBase):
(WebCore::MediaPlayerPrivateGStreamerBase::~MediaPlayerPrivateGStreamerBase):
* platform/graphics/gstreamer/VideoSinkGStreamer.cpp:
(webkitVideoSinkDispose):
2013-09-06 Anders Carlsson <andersca@apple.com>
Fix fastMalloc/delete mismatches in CSS parser
https://bugs.webkit.org/show_bug.cgi?id=120864
Reviewed by Andreas Kling.
Stop putting fastMalloced memory inside an OwnPtr.
* css/CSSParserValues.cpp:
(WebCore::CSSParserSelector::CSSParserSelector):
(WebCore::CSSParserSelector::adoptSelectorVector):
2013-09-06 Andreas Kling <akling@apple.com>
FrameLoader::subresourceLoader() should return a reference.
<https://webkit.org/b/120830>
Reviewed by Anders Carlsson.
There is always a SubresourceLoader, so this method could never return null.
Also made m_subresourceLoader an OwnPtr to reduce header dependencies.
2013-09-06 Chris Fleizach <cfleizach@apple.com>
AX: aria-relevant does not expose AXARIARelevant
https://bugs.webkit.org/show_bug.cgi?id=120373
Reviewed by Darin Adler.
When global ARIA attributes are present on an Element we need to ignore
a presentational role, if set on that Element.
Test: accessibility/global-aria-attributes-invalidate-presentational.html
* accessibility/AccessibilityNodeObject.cpp:
(WebCore::AccessibilityNodeObject::determineAriaRoleAttribute):
* accessibility/AccessibilityObject.cpp:
(WebCore::AccessibilityObject::supportsARIAAttributes):
2013-09-06 Brendan Long <b.long@cablelabs.com>
[Qt][BlackBerry] Text track localized string functions are named wrong
https://bugs.webkit.org/show_bug.cgi?id=120788
Reviewed by Philippe Normand.
This renames textTrackOffText() to textTrackOffMenuItemText(), and
adds textTrackAutomaticMenuItemText(), to make them match the
definitions in LocalizedStrings.h.
* platform/blackberry/LocalizedStringsBlackBerry.cpp:
* platform/qt/LocalizedStringsQt.cpp:
2013-09-06 Allan Sandfeld Jensen <allan.jensen@digia.com>
[Qt][WK2] Cached credentials not cleared between tests
https://bugs.webkit.org/show_bug.cgi?id=120775
Reviewed by Jocelyn Turcotte.
Clear the access credentials when resetting the state of a page for testing.
* testing/Internals.cpp:
(WebCore::Internals::resetToConsistentState):
2013-09-06 Sergio Villar Senin <svillar@igalia.com>
[CSS Grid Layout] Resolve named grid lines
https://bugs.webkit.org/show_bug.cgi?id=119632
Reviewed by Andreas Kling.
From Blink r152659, r153794 by <jchaffraix@chromium.org>
Test: fast/css-grid-layout/grid-item-named-grid-line-resolution.html
This change adds the code which translates from a raw named grid
line (stored in RenderStyle) to its actual grid position. This
even includes named grid resolution for grid lines with the 'span'
keyword.
* rendering/RenderGrid.cpp:
(WebCore::RenderGrid::explicitGridSizeForSide):
(WebCore::adjustGridPositionForRowEndColumnEndSide):
(WebCore::adjustGridPositionForSide):
(WebCore::RenderGrid::resolveNamedGridLinePositionFromStyle):
(WebCore::RenderGrid::resolveGridPositionFromStyle):
(WebCore::RenderGrid::resolveGridPositionAgainstOppositePosition):
(WebCore::RenderGrid::resolveNamedGridLinePositionAgainstOppositePosition):
(WebCore::RenderGrid::resolveRowStartColumnStartNamedGridLinePositionAgainstOppositePosition):
(WebCore::RenderGrid::resolveRowEndColumnEndNamedGridLinePositionAgainstOppositePosition):
* rendering/RenderGrid.h:
2013-09-06 Dirk Schulze <krit@webkit.org>
Allow string as image reference on filter()
https://bugs.webkit.org/show_bug.cgi?id=120829
Reviewed by Andreas Kling.
Beside <image> (which already includes url(), gradients, cross-fade() and
image-set()), the filter() image function should support <string> as image
reference.
http://dev.w3.org/fxtf/filters/#FilterCSSImageValue
* css/CSSParser.cpp:
(WebCore::CSSParser::parseFilterImage): Create CSSImageValue from string.
2013-09-05 Dirk Schulze <krit@webkit.org>
Support SVG filters on -webkit-filter() function
https://bugs.webkit.org/show_bug.cgi?id=120806
Reviewed by Darin Adler.
Add support for SVG Filters on CSS -webkit-filter() image function.
Test: fast/filter-image/filter-image-svg.html
* css/CSSFilterImageValue.cpp:
(WebCore::CSSFilterImageValue::image): Pass renderer to filter builder.
2013-09-05 Yoav Weiss <yoav@yoav.ws>
DRY out srcset related deviceScaleFactor calculations
https://bugs.webkit.org/show_bug.cgi?id=120791
Identical deviceScaleFactor calculations were performed in 3 different locations.
I've added that calculation as a method of Document.
Previous calculations are replaced by calls to this method.
Reviewed by Andreas Kling.
No new tests since this is a refactoring change. No functionality have changed.
* dom/Document.cpp:
(WebCore::Document::deviceScaleFactor):
* dom/Document.h:
* html/HTMLImageElement.cpp:
(WebCore::HTMLImageElement::parseAttribute):
* html/parser/HTMLDocumentParser.cpp:
(WebCore::HTMLDocumentParser::pumpTokenizer):
(WebCore::HTMLDocumentParser::insert):
2013-09-05 Brendan Long <b.long@cablelabs.com>
[Qt] DefaultFullScreenVideoHandler and PlatformVideoWindow are included in the build when they are disabled
https://bugs.webkit.org/show_bug.cgi?id=117206
Reviewed by Philippe Normand.
No new tests because this just fixes a build warning.
* Target.pri: Don't include PlatformVideoWindow* files in the build when they are disabled.
2013-09-05 Andreas Kling <akling@apple.com>
FrameView: Constructor should take Frame&.
<https://webkit.org/b/120824>
Reviewed by Anders Carlsson.
* WebCore.exp.in:
* inspector/InspectorOverlay.cpp:
(WebCore::InspectorOverlay::overlayPage):
* page/Frame.cpp:
(WebCore::Frame::createView):
* page/FrameView.cpp:
(WebCore::FrameView::FrameView):
(WebCore::FrameView::create):
* page/FrameView.h:
* svg/graphics/SVGImage.cpp:
(WebCore::SVGImage::dataChanged):
2013-09-05 Jinwoo Song <jinwoo7.song@samsung.com>
Fix build warnings by unused parameter
https://bugs.webkit.org/show_bug.cgi?id=120821
Reviewed by Anders Carlsson.
Fix warning by removing unused parameter.
* platform/graphics/gstreamer/TextSinkGStreamer.cpp:
(webkitTextSinkGetProperty):
(webkitTextSinkSetProperty):
* platform/network/soup/SynchronousLoaderClientSoup.cpp:
(WebCore::SynchronousLoaderClient::didReceiveAuthenticationChallenge):
2013-09-05 Andreas Kling <akling@apple.com>
FrameLoader: Convert three little loops to using Vector<Ref<Frame>>.
<https://webkit.org/b/120798>
Reviewed by Antti Koivisto.
Also apply a bit of inline capacity + reserveInitialCapacity + uncheckedAppend
in FrameLoader::detachChildren() since we know the final size from the start.
* loader/FrameLoader.cpp:
(WebCore::FrameLoader::detachChildren):
(WebCore::FrameLoader::checkLoadComplete):
(WebCore::FrameLoader::shouldClose):
2013-09-05 Andreas Kling <akling@apple.com>
ContainerNode: Apply Ref<T> to some popular DOM functions.
<https://webkit.org/b/120800>
Reviewed by Antti Koivisto.
Use Ref to avoid a bunch of null checks in some popular DOM functions.
* dom/ContainerNode.cpp:
(WebCore::ContainerNode::insertBefore):
'refChild' is never null here, so store it in a Ref.
(WebCore::ContainerNode::replaceChild):
'removedChild' is never null here, so store it in a Ref.
(WebCore::ContainerNode::removeChild):
'child' is never null here, so store it in a Ref.
Also return "true" at the end of the function since we can't
null-check 'child' anymore (not that it would ever be false!)
(WebCore::dispatchChildInsertionEvents):
(WebCore::dispatchChildRemovalEvents):
Use Ref<Document> in both of these methods.
2013-09-05 Andreas Kling <akling@apple.com>
ScrollView::children() should return a reference.
<https://webkit.org/b/120795>
Reviewed by Anders Carlsson.
This function was already just returning the address of a member variable.
Modernized some loops that were using it.
* bindings/js/PageScriptDebugServer.cpp:
(WebCore::PageScriptDebugServer::setJavaScriptPaused):
* page/FrameView.cpp:
(WebCore::FrameView::hasCustomScrollbars):
(WebCore::FrameView::updateLayoutAndStyleIfNeededRecursive):
* page/Page.cpp:
(WebCore::Page::pluginViews):
* page/scrolling/ScrollingCoordinator.cpp:
(WebCore::ScrollingCoordinator::computeNonFastScrollableRegion):
* platform/ScrollView.h:
(WebCore::ScrollView::children):
* plugins/IFrameShimSupport.cpp:
(WebCore::getPluginOcclusions):
2013-09-05 Beth Dakin <bdakin@apple.com>
Reverting revisions 155139, 155141, 155142, and 155145 since they appear to have
caused about 50 new test failures.
* CMakeLists.txt:
* GNUmakefile.list.am:
* Target.pri:
* WebCore.vcxproj/WebCore.vcxproj:
* WebCore.xcodeproj/project.pbxproj:
* accessibility/AccessibilityRenderObject.cpp:
(WebCore::AccessibilityRenderObject::computeAccessibilityIsIgnored):
(WebCore::AccessibilityRenderObject::determineAccessibilityRole):
* dom/Position.cpp:
(WebCore::Position::isCandidate):
(WebCore::Position::getInlineBoxAndOffset):
(WebCore::Position::primaryDirection):
* dom/PositionIterator.cpp:
(WebCore::PositionIterator::isCandidate):
* editing/ApplyStyleCommand.cpp:
(WebCore::ApplyStyleCommand::applyInlineStyleToPushDown):
* editing/CompositeEditCommand.cpp:
(WebCore::CompositeEditCommand::addBlockPlaceholderIfNeeded):
* editing/Editor.cpp:
(WebCore::Editor::baseWritingDirectionForSelectionStart):
* editing/FrameSelection.cpp:
(WebCore::caretRenderer):
* editing/TextIterator.cpp:
(WebCore::TextIterator::shouldRepresentNodeOffsetZero):
* editing/TypingCommand.cpp:
(WebCore::TypingCommand::makeEditableRootEmpty):
* editing/htmlediting.cpp:
(WebCore::isBlockFlowElement):
* html/HTMLDetailsElement.cpp:
(WebCore::HTMLDetailsElement::createRenderer):
* html/HTMLSummaryElement.cpp:
(WebCore::HTMLSummaryElement::createRenderer):
* html/shadow/SliderThumbElement.cpp:
(WebCore::RenderSliderThumb::RenderSliderThumb):
* html/shadow/SliderThumbElement.h:
* rendering/LayoutState.cpp:
(WebCore::LayoutState::LayoutState):
* rendering/RenderBlock.cpp:
(WebCore::RenderBlock::createAnonymous):
(WebCore::RenderBlock::layoutBlock):
(WebCore::RenderBlock::collapseMargins):
(WebCore::RenderBlock::selectionGaps):
(WebCore::RenderBlock::firstLineBoxBaseline):
(WebCore::RenderBlock::lastLineBoxBaseline):
(WebCore::RenderBlock::firstLineBlock):
(WebCore::findFirstLetterBlock):
(WebCore::shouldCheckLines):
(WebCore::RenderBlock::adjustForBorderFit):
* rendering/RenderBlock.h:
* rendering/RenderBlockFlow.cpp: Removed.
* rendering/RenderBlockFlow.h: Removed.
* rendering/RenderBox.cpp:
(WebCore::RenderBox::computeRectForRepaint):
(WebCore::RenderBox::positionForPoint):
* rendering/RenderBoxModelObject.h:
(WebCore::RenderBoxModelObject::canHaveBoxInfoInRegion):
* rendering/RenderDeprecatedFlexibleBox.cpp:
(WebCore::RenderDeprecatedFlexibleBox::applyLineClamp):
(WebCore::RenderDeprecatedFlexibleBox::clearLineClamp):
* rendering/RenderDetailsMarker.cpp:
(WebCore::RenderDetailsMarker::RenderDetailsMarker):
* rendering/RenderDetailsMarker.h:
* rendering/RenderFieldset.cpp:
(WebCore::RenderFieldset::RenderFieldset):
* rendering/RenderFieldset.h:
* rendering/RenderFileUploadControl.cpp:
(WebCore::RenderFileUploadControl::RenderFileUploadControl):
* rendering/RenderFileUploadControl.h:
* rendering/RenderFlowThread.cpp:
(WebCore::RenderFlowThread::RenderFlowThread):
* rendering/RenderFlowThread.h:
* rendering/RenderFullScreen.cpp:
* rendering/RenderInline.cpp:
(WebCore::RenderInline::computeRectForRepaint):
* rendering/RenderLineBoxList.cpp:
(WebCore::RenderLineBoxList::dirtyLinesFromChangedChild):
* rendering/RenderListItem.cpp:
(WebCore::RenderListItem::RenderListItem):
(WebCore::RenderListItem::willBeDestroyed):
(WebCore::RenderListItem::willBeRemovedFromTree):
(WebCore::RenderListItem::layout):
(WebCore::RenderListItem::addOverflowFromChildren):
(WebCore::RenderListItem::computePreferredLogicalWidths):
(WebCore::RenderListItem::paint):
* rendering/RenderListItem.h:
* rendering/RenderMeter.cpp:
(WebCore::RenderMeter::RenderMeter):
* rendering/RenderMeter.h:
* rendering/RenderMultiColumnBlock.cpp:
(WebCore::RenderMultiColumnBlock::RenderMultiColumnBlock):
* rendering/RenderMultiColumnBlock.h:
* rendering/RenderObject.cpp:
(WebCore::RenderObject::createObject):
(WebCore::RenderObject::computeRectForRepaint):
(WebCore::RenderObject::styleWillChange):
(WebCore::firstLineStyleForCachedUncachedType):
* rendering/RenderObject.h:
(WebCore::RenderObject::isBlockFlow):
(WebCore::RenderObject::isRenderBlock):
* rendering/RenderObjectChildList.cpp:
(WebCore::RenderObjectChildList::insertChildNode):
* rendering/RenderProgress.cpp:
(WebCore::RenderProgress::RenderProgress):
* rendering/RenderProgress.h:
* rendering/RenderRegion.cpp:
(WebCore::RenderRegion::RenderRegion):
* rendering/RenderRegion.h:
* rendering/RenderRuby.cpp:
(WebCore::RenderRubyAsBlock::RenderRubyAsBlock):
* rendering/RenderRuby.h:
* rendering/RenderRubyBase.cpp:
(WebCore::RenderRubyBase::RenderRubyBase):
* rendering/RenderRubyBase.h:
* rendering/RenderRubyRun.cpp:
(WebCore::RenderRubyRun::RenderRubyRun):
* rendering/RenderRubyRun.h:
* rendering/RenderRubyText.cpp:
(WebCore::RenderRubyText::RenderRubyText):
* rendering/RenderRubyText.h:
* rendering/RenderTableCaption.cpp:
(WebCore::RenderTableCaption::RenderTableCaption):
* rendering/RenderTableCaption.h:
* rendering/RenderTableCell.cpp:
(WebCore::RenderTableCell::RenderTableCell):
* rendering/RenderTableCell.h:
* rendering/RenderTextControl.cpp:
(WebCore::RenderTextControl::RenderTextControl):
* rendering/RenderTextControl.h:
* rendering/RenderTextControlSingleLine.h:
(WebCore::RenderTextControlInnerBlock::RenderTextControlInnerBlock):
* rendering/RenderTextTrackCue.cpp:
(WebCore::RenderTextTrackCue::RenderTextTrackCue):
* rendering/RenderTextTrackCue.h:
* rendering/RenderView.cpp:
(WebCore::RenderView::RenderView):
* rendering/RenderView.h:
* rendering/RenderingAllInOne.cpp:
* rendering/mathml/RenderMathMLOperator.cpp:
(WebCore::RenderMathMLOperator::createGlyph):
* rendering/svg/RenderSVGBlock.cpp:
(WebCore::RenderSVGBlock::RenderSVGBlock):
* rendering/svg/RenderSVGBlock.h:
2013-09-05 Alexey Proskuryakov <ap@apple.com>
Flaky Test: platform/mac/editing/deleting/deletionUI-single-instance.html
https://bugs.webkit.org/show_bug.cgi?id=114181
Reviewed by Ryosuke Niwa.
Editor survives navigations, and so did DeleteButtonController. But the state it holds
is document specific (like nodes in the old document).
* editing/Editor.cpp: (WebCore::Editor::clear): Replace DeleteButtonController.
2013-09-05 Gyuyoung Kim <gyuyoung.kim@samsung.com>
Generate toFooElement() functions from tagname data.
https://bugs.webkit.org/show_bug.cgi?id=120676
Reviewed by Andreas Kling.
As r154965 introduced the isFooElement() generation, this patch adds generations of toFooElement() function
to *generateTypeChecking* attribute. To represent isFooElement() and toFooElement(), *generateTypeChecking*
is changed to *generateTypeHelpers*.
Removed all the hand-written toFooElement() that can be covered by the *generateTypeHelpers*.
* GNUmakefile.am:
* GNUmakefile.list.am:
* WebCore.vcxproj/WebCore.vcxproj:
* WebCore.xcodeproj/project.pbxproj:
* dom/make_names.pl:
(defaultTagPropertyHash):
(printTypeHelpers):
(printTypeHelpersHeaderFile):
* html/HTMLAnchorElement.h:
* html/HTMLAreaElement.h:
* html/HTMLAudioElement.h:
* html/HTMLCanvasElement.h:
* html/HTMLElement.h:
* html/HTMLFormElement.h:
* html/HTMLFrameSetElement.h:
* html/HTMLImageElement.h:
* html/HTMLInputElement.h:
* html/HTMLLabelElement.h:
* html/HTMLMapElement.h:
* html/HTMLMeterElement.h:
* html/HTMLOptGroupElement.h:
* html/HTMLOptionElement.h:
* html/HTMLProgressElement.h:
* html/HTMLScriptElement.h:
* html/HTMLStyleElement.h:
* html/HTMLTableElement.h:
* html/HTMLTableRowElement.h:
* html/HTMLTagNames.in:
* html/HTMLTextAreaElement.h:
* html/HTMLTitleElement.h:
* svg/SVGElement.h:
* svg/SVGFontElement.h:
* svg/SVGFontFaceElement.h:
* svg/SVGImageElement.h:
* svg/SVGScriptElement.h:
* svg/svgtags.in:
2013-09-05 Andreas Kling <akling@apple.com>
Cached Page and Frame don't need to be ref-counted.
<https://webkit.org/b/120710>
Reviewed by Anders Carlsson.
- CachedPage is owned by HistoryItem.
- CachedFrame is owned by CachedPage.
Remove the ref counting from these objects to make the code less confusing.
Added a new method:
- PassOwnPtr<CachedPage> PageCache::take(HistoryItem*)
..which is what it looks like - a combined get() and remove() that transfers
ownership of the CachedPage to the caller.
This is used by commitProvisionalLoad() and invalidateCurrentItemCachedPage()
to accomplish in one swoop what they used to do in awkwardly spaced steps.
* history/CachedFrame.h:
(WebCore::CachedFrame::create):
* history/CachedPage.cpp:
(WebCore::CachedPage::create):
* history/CachedPage.h:
* history/HistoryItem.h:
* history/PageCache.cpp:
(WebCore::PageCache::take):
* history/PageCache.h:
* loader/FrameLoader.cpp:
(WebCore::FrameLoader::commitProvisionalLoad):
(WebCore::FrameLoader::transitionToCommitted):
* loader/FrameLoader.h:
* loader/HistoryController.cpp:
(WebCore::HistoryController::invalidateCurrentItemCachedPage):
2013-09-05 David Kilzer <ddkilzer@apple.com>
BUILD FIX (r155108): Add SynchronousLoaderClientCFNet.cpp to Xcode project
* WebCore.xcodeproj/project.pbxproj: The iOS port defines
USE(CFNETWORK), so it needs to compile
SynchronousLoaderClientCFNet.cpp to build successfully.
2013-09-05 Anders Carlsson <andersca@apple.com>
GCAssertions.h should use STL type traits and static_assert
https://bugs.webkit.org/show_bug.cgi?id=120785
Reviewed by Andreas Kling.
Update for JavaScriptCore changes.
* bindings/js/JSDOMBinding.cpp:
* bindings/js/JSImageConstructor.cpp:
2013-09-05 David Hyatt <hyatt@apple.com>
Make RenderListItem inherit from RenderBlockFlow.
https://bugs.webkit.org/show_bug.cgi?id=120789
Reviewed by Beth Dakin.
* rendering/RenderListItem.cpp:
(WebCore::RenderListItem::RenderListItem):
(WebCore::RenderListItem::willBeDestroyed):
(WebCore::RenderListItem::willBeRemovedFromTree):
(WebCore::RenderListItem::layout):
(WebCore::RenderListItem::addOverflowFromChildren):
(WebCore::RenderListItem::computePreferredLogicalWidths):
(WebCore::RenderListItem::paint):
* rendering/RenderListItem.h:
2013-09-05 David Hyatt <hyatt@apple.com>
Make RenderBlock have a protected constructor..
https://bugs.webkit.org/show_bug.cgi?id=120787
Reviewed by Beth Dakin.
Make sure nobody can create a RenderBlock directly. Make sure RenderBlockFlows
get made when a display:block/inline-block/compact/run-in is seen.
* html/HTMLDetailsElement.cpp:
(WebCore::HTMLDetailsElement::createRenderer):
* html/HTMLSummaryElement.cpp:
(WebCore::HTMLSummaryElement::createRenderer):
* rendering/RenderBlock.cpp:
(WebCore::RenderBlock::createAnonymous):
* rendering/RenderBlock.h:
* rendering/RenderObject.cpp:
(WebCore::RenderObject::createObject):
2013-09-05 David Hyatt <hyatt@apple.com>
Add new RenderBlockFlow class
https://bugs.webkit.org/show_bug.cgi?id=120777
Reviewed by Simon Fraser.
This patch adds a new RenderBlockFlow class. The idea is to get all of the line/float/margin
code out of RenderBlock and into the subclass, and then we can make RenderBlock an abstract
base. This will save memory for all of the classes that derive from RenderBlock but have
their own layout systems (e.g., flexbox, grid, table), and it will let us tighten up
types to make it more clear when we're talking about block layout code vs. a more generic
block-level object that can have any kind of layout.
The only real change here is that isBlockFlow() has been renamed to isRenderBlockFlow() and
is now checking if the object is a RenderBlockFlow. All of the block subclasses have been patched
to be a RenderBlock or RenderBlockFlow.
* CMakeLists.txt:
* GNUmakefile.list.am:
* Target.pri:
* WebCore.vcxproj/WebCore.vcxproj:
* WebCore.xcodeproj/project.pbxproj:
* accessibility/AccessibilityRenderObject.cpp:
(WebCore::AccessibilityRenderObject::computeAccessibilityIsIgnored):
(WebCore::AccessibilityRenderObject::determineAccessibilityRole):
* dom/Position.cpp:
(WebCore::Position::isCandidate):
(WebCore::Position::getInlineBoxAndOffset):
(WebCore::Position::primaryDirection):
* dom/PositionIterator.cpp:
(WebCore::PositionIterator::isCandidate):
* editing/ApplyStyleCommand.cpp:
(WebCore::ApplyStyleCommand::applyInlineStyleToPushDown):
* editing/CompositeEditCommand.cpp:
(WebCore::CompositeEditCommand::addBlockPlaceholderIfNeeded):
* editing/Editor.cpp:
(WebCore::Editor::baseWritingDirectionForSelectionStart):
* editing/FrameSelection.cpp:
(WebCore::caretRenderer):
* editing/TextIterator.cpp:
(WebCore::TextIterator::shouldRepresentNodeOffsetZero):
* editing/TypingCommand.cpp:
(WebCore::TypingCommand::makeEditableRootEmpty):
* editing/htmlediting.cpp:
(WebCore::isBlockFlowElement):
* html/shadow/SliderThumbElement.cpp:
(WebCore::RenderSliderThumb::RenderSliderThumb):
* html/shadow/SliderThumbElement.h:
* rendering/LayoutState.cpp:
(WebCore::LayoutState::LayoutState):
* rendering/RenderBlock.cpp:
(WebCore::RenderBlock::layoutBlock):
(WebCore::RenderBlock::collapseMargins):
(WebCore::RenderBlock::selectionGaps):
(WebCore::RenderBlock::firstLineBoxBaseline):
(WebCore::RenderBlock::lastLineBoxBaseline):
(WebCore::RenderBlock::firstLineBlock):
(WebCore::findFirstLetterBlock):
(WebCore::shouldCheckLines):
(WebCore::RenderBlock::adjustForBorderFit):
* rendering/RenderBlock.h:
* rendering/RenderBlockFlow.cpp: Added.
(WebCore::RenderBlockFlow::RenderBlockFlow):
(WebCore::RenderBlockFlow::~RenderBlockFlow):
* rendering/RenderBlockFlow.h: Added.
(WebCore::toRenderBlockFlow):
* rendering/RenderBox.cpp:
(WebCore::RenderBox::computeRectForRepaint):
(WebCore::RenderBox::positionForPoint):
* rendering/RenderBoxModelObject.h:
(WebCore::RenderBoxModelObject::canHaveBoxInfoInRegion):
* rendering/RenderDeprecatedFlexibleBox.cpp:
(WebCore::RenderDeprecatedFlexibleBox::applyLineClamp):
(WebCore::RenderDeprecatedFlexibleBox::clearLineClamp):
* rendering/RenderDetailsMarker.cpp:
(WebCore::RenderDetailsMarker::RenderDetailsMarker):
* rendering/RenderDetailsMarker.h:
* rendering/RenderFieldset.cpp:
(WebCore::RenderFieldset::RenderFieldset):
* rendering/RenderFieldset.h:
* rendering/RenderFileUploadControl.cpp:
(WebCore::RenderFileUploadControl::RenderFileUploadControl):
* rendering/RenderFileUploadControl.h:
* rendering/RenderFlowThread.cpp:
(WebCore::RenderFlowThread::RenderFlowThread):
* rendering/RenderFlowThread.h:
* rendering/RenderFullScreen.cpp:
* rendering/RenderInline.cpp:
(WebCore::RenderInline::computeRectForRepaint):
* rendering/RenderLineBoxList.cpp:
(WebCore::RenderLineBoxList::dirtyLinesFromChangedChild):
* rendering/RenderMeter.cpp:
(WebCore::RenderMeter::RenderMeter):
* rendering/RenderMeter.h:
* rendering/RenderMultiColumnBlock.cpp:
(WebCore::RenderMultiColumnBlock::RenderMultiColumnBlock):
* rendering/RenderMultiColumnBlock.h:
* rendering/RenderObject.cpp:
(WebCore::RenderObject::computeRectForRepaint):
(WebCore::RenderObject::styleWillChange):
(WebCore::firstLineStyleForCachedUncachedType):
* rendering/RenderObject.h:
(WebCore::RenderObject::isBR):
(WebCore::RenderObject::isRenderBlockFlow):
* rendering/RenderObjectChildList.cpp:
(WebCore::RenderObjectChildList::insertChildNode):
* rendering/RenderProgress.cpp:
(WebCore::RenderProgress::RenderProgress):
* rendering/RenderProgress.h:
* rendering/RenderRegion.cpp:
(WebCore::RenderRegion::RenderRegion):
* rendering/RenderRegion.h:
* rendering/RenderRuby.cpp:
(WebCore::RenderRubyAsBlock::RenderRubyAsBlock):
* rendering/RenderRuby.h:
* rendering/RenderRubyBase.cpp:
(WebCore::RenderRubyBase::RenderRubyBase):
* rendering/RenderRubyBase.h:
* rendering/RenderRubyRun.cpp:
(WebCore::RenderRubyRun::RenderRubyRun):
* rendering/RenderRubyRun.h:
* rendering/RenderRubyText.cpp:
(WebCore::RenderRubyText::RenderRubyText):
* rendering/RenderRubyText.h:
* rendering/RenderTableCaption.cpp:
(WebCore::RenderTableCaption::RenderTableCaption):
* rendering/RenderTableCaption.h:
* rendering/RenderTableCell.cpp:
(WebCore::RenderTableCell::RenderTableCell):
* rendering/RenderTableCell.h:
* rendering/RenderTextControl.cpp:
(WebCore::RenderTextControl::RenderTextControl):
* rendering/RenderTextControl.h:
* rendering/RenderTextControlSingleLine.h:
(WebCore::RenderTextControlInnerBlock::RenderTextControlInnerBlock):
* rendering/RenderTextTrackCue.cpp:
(WebCore::RenderTextTrackCue::RenderTextTrackCue):
* rendering/RenderTextTrackCue.h:
* rendering/RenderView.cpp:
(WebCore::RenderView::RenderView):
* rendering/RenderView.h:
* rendering/svg/RenderSVGBlock.cpp:
(WebCore::RenderSVGBlock::RenderSVGBlock):
* rendering/svg/RenderSVGBlock.h:
2013-09-05 Tim Horton <timothy_horton@apple.com>
iOS build broke with change to make Mac use PDFKit for PDFDocumentImage
https://bugs.webkit.org/show_bug.cgi?id=120771
Reviewed by Anders Carlsson.
* platform/graphics/cg/PDFDocumentImage.cpp:
(WebCore::PDFDocumentImage::createPDFDocument):
Use the (removed in r155069) PLATFORM(MAC) way of making a CGDataProvider from a SharedBuffer
everywhere; this is what iOS was expecting to use (where I accidentally changed behavior),
and it should also work for Windows, the only other USE(CG) platform.
Since we only createPDFDocument() after all data has been received, I'm not
restoring the comment about the SharedBuffer being secretly written to behind its back.
2013-09-04 Dean Jackson <dino@apple.com>
Rename supportsContext to probablySupportsContext
https://bugs.webkit.org/show_bug.cgi?id=120716
<rdar://problem/14914499>
Reviewed by Antoine Quint.
As decided in: http://lists.whatwg.org/htdig.cgi/whatwg-whatwg.org/2013-September/040680.html
* bindings/js/JSHTMLCanvasElementCustom.cpp:
(WebCore::JSHTMLCanvasElement::probablySupportsContext):
* html/HTMLCanvasElement.cpp:
(WebCore::HTMLCanvasElement::probablySupportsContext):
* html/HTMLCanvasElement.h:
* html/HTMLCanvasElement.idl:
2013-09-05 Joseph Pecoraro <pecoraro@apple.com>
Fix build warning about unused variable.
Unreviewed build fix.
* bindings/js/ScriptDebugServer.cpp:
(WebCore::ScriptDebugServer::evaluateBreakpointAction):
2013-09-05 Anders Carlsson <andersca@apple.com>
Enable C++11 wherever we build C++ files that include wtf/Platform.h
https://bugs.webkit.org/show_bug.cgi?id=120782
Reviewed by Andreas Kling.
Pass -std=gnu++11 when preprocessing wtf/Platform.h.
* DerivedSources.make:
2013-09-05 Joseph Pecoraro <pecoraro@apple.com>
Web Inspector: Breakpoint Actions
https://bugs.webkit.org/show_bug.cgi?id=120576
Reviewed by Timothy Hatcher.
Tests: inspector-protocol/debugger/setBreakpoint-actions.html
inspector-protocol/debugger/setBreakpoint-options-exception.html
* inspector/ScriptBreakpoint.h:
(WebCore::ScriptBreakpointAction::ScriptBreakpointAction):
(WebCore::ScriptBreakpoint::ScriptBreakpoint):
Struct for a breakpoint action. Type and string of data.
* bindings/js/ScriptDebugServer.h:
* bindings/js/ScriptDebugServer.cpp:
(WebCore::ScriptDebugServer::hasBreakpoint):
(WebCore::ScriptDebugServer::evaluateBreakpointAction):
(WebCore::ScriptDebugServer::evaluateBreakpointActions):
(WebCore::ScriptDebugServer::updateCallFrameAndPauseIfNeeded):
(WebCore::ScriptDebugServer::pauseIfNeeded):
When a breakpoint is triggered evaluate each of its breakpoint
actions in order. If there are exceptions, log them.
* inspector/Inspector.json:
* inspector/InspectorDebuggerAgent.cpp:
(WebCore::buildObjectForBreakpointCookie):
(WebCore::InspectorDebuggerAgent::didParseSource):
Save and restore breakpoint actions where needed.
(WebCore::breakpointActionTypeForString):
(WebCore::breakpointActionsFromProtocol):
(WebCore::InspectorDebuggerAgent::setBreakpointByUrl):
(WebCore::InspectorDebuggerAgent::setBreakpoint):
Parse optional breakpoint actions from the protocol into
ScriptBreakpointAction objects.
2013-09-05 Simon Fraser <simon.fraser@apple.com>
Fix repaint issue on "paints into ancestor" filtered layers
https://bugs.webkit.org/show_bug.cgi?id=120780
Reviewed by Tim Horton.
When a repaint happened on a layer with a filter, and which paints into
its compositing ancestor, we'd repaint the wrong layer (and assert).
Fix by ensuring that RenderLayer::enclosingFilterLayer() takes paintsIntoCompositedAncestor()
into account, by adding a function that we share between three callers who
check isComposited() && !paintsIntoCompositedAncestor(). I didn't use a function
on RenderLayer, because I wanted it to be inline but to not #include RenderLayerBacking
in RenderLayer.h.
Test: compositing/filters/opacity-change-on-filtered-paints-into-ancestor.html
* dom/Node.cpp: Drive-by removal of #include "RenderLayer.h"
* rendering/RenderLayer.cpp:
(WebCore::compositedWithOwnBackingStore):
(WebCore::RenderLayer::enclosingCompositingLayerForRepaint):
(WebCore::RenderLayer::enclosingFilterRepaintLayer):
(WebCore::RenderLayer::clippingRootForPainting):
2013-09-05 Brent Fulgham <bfulgham@apple.com>
[Windows] Unreviewed build/link improvement after r155127 to be
consistent about using debug-build support libraries.
Now that <rdar://problem/9898937> is resolved, we should be linking
to debug AVFoundationCF as well.
* page/CaptionUserPreferencesMediaAF.cpp: Link to AVFoundationCF_debug
when building with the DEBUG_ALL target.
* platform/graphics/avfoundation/InbandTextTrackPrivateAVF.cpp: Ditto.
* platform/graphics/avfoundation/cf/AVFoundationCFSoftLinking.h: Ditto.
2013-09-04 Anders Carlsson <andersca@apple.com>
Vector::releaseBuffer should return an OwnPtr
https://bugs.webkit.org/show_bug.cgi?id=120718
Reviewed by Andreas Kling.
Change FormStreamFields::currentData to an OwnPtr.
* platform/network/cf/FormDataStreamCFNet.cpp:
(WebCore::closeCurrentStream):
(WebCore::advanceCurrentStream):
(WebCore::formCreate):
2013-09-05 Andreas Kling <akling@apple.com>
Reverting "Cached Page and Frame don't need to be ref-counted.
<https://webkit.org/b/120758>
This didn't work so well on Qt bots. Will have to take bigger steps
here instead of iterating.
* history/CachedFrame.h:
(WebCore::CachedFrame::create):
* history/CachedPage.cpp:
(WebCore::CachedPage::create):
* history/CachedPage.h:
* history/HistoryItem.h:
* loader/FrameLoader.cpp:
(WebCore::FrameLoader::commitProvisionalLoad):
(WebCore::FrameLoader::transitionToCommitted):
* loader/FrameLoader.h:
2013-09-04 Anders Carlsson <andersca@apple.com>
Animations in an AnimationList are never null
https://bugs.webkit.org/show_bug.cgi?id=120720
Reviewed by Andreas Kling.
Change AnimationList::operator[] to return an Animation& and fix up related code to also take references.
* css/CSSComputedStyleDeclaration.cpp:
* css/DeprecatedStyleBuilder.cpp:
* page/animation/CompositeAnimation.cpp:
* page/animation/KeyframeAnimation.cpp:
* platform/animation/Animation.h:
* platform/animation/AnimationList.cpp:
* platform/animation/AnimationList.h:
* rendering/RenderLayerBacking.cpp:
2013-09-05 Antti Koivisto <antti@apple.com>
Call createTextRenderersForSiblingsAfterAttachIfNeeded only for the attach root
https://bugs.webkit.org/show_bug.cgi?id=120770
Reviewed by Andreas Kling.
There is no need to call this during recursive attach as siblings are going to be attached normally anyway.
Move call sites to attach roots only.
* style/StyleResolveTree.cpp:
(WebCore::Style::createTextRenderersForSiblingsAfterAttachIfNeeded):
Factor to take reference and do the inital tests itself.
(WebCore::Style::createTextRendererIfNeeded):
(WebCore::Style::updateTextRendererAfterContentChange):
(WebCore::Style::attachChildren):
Also tightened the condition where previously attached children may be encountered.
(WebCore::Style::attachRenderTree):
(WebCore::Style::resolveLocal):
(WebCore::Style::updateTextStyle):
(WebCore::Style::reattachRenderTree):
2013-09-05 Enrique Ocaña González <eocanha@igalia.com>
[GTK] Assertion fails when the mouse pointer is styled with a custom cursor
https://bugs.webkit.org/show_bug.cgi?id=118905
Reviewed by Philippe Normand.
Checked that the custom cursor image and its pixbuf is valid and create a null
cursor otherwise.
* platform/gtk/CursorGtk.cpp:
(WebCore::createCustomCursor):
2013-09-05 Praveen R Jadhav <praveen.j@samsung.com>
Precision updates in WebAudio.
https://bugs.webkit.org/show_bug.cgi?id=119739
Reviewed by Philippe Normand.
WebAudio Specification suggests to use 'double' datatypes
for minDecibels, maxDecibels and smoothingTimeConstant in
AnalyserNode.idl and currentTime in AudioContext.idl.
Current WebKit implementation has declared these attributes
as 'float' type.
Spec: https://dvcs.w3.org/hg/audio/raw-file/tip/webaudio/specification.html#AudioContext-section
https://dvcs.w3.org/hg/audio/raw-file/tip/webaudio/specification.html#AnalyserNode
No new tests, covered by existing tests.
* Modules/webaudio/AnalyserNode.cpp:
(WebCore::AnalyserNode::setMinDecibels):
(WebCore::AnalyserNode::setMaxDecibels):
(WebCore::AnalyserNode::setSmoothingTimeConstant):
* Modules/webaudio/AnalyserNode.h:
(WebCore::AnalyserNode::minDecibels):
(WebCore::AnalyserNode::maxDecibels):
(WebCore::AnalyserNode::smoothingTimeConstant):
* Modules/webaudio/AnalyserNode.idl:
* Modules/webaudio/AudioContext.idl:
* Modules/webaudio/RealtimeAnalyser.h:
(WebCore::RealtimeAnalyser::setMinDecibels):
(WebCore::RealtimeAnalyser::minDecibels):
(WebCore::RealtimeAnalyser::setMaxDecibels):
(WebCore::RealtimeAnalyser::maxDecibels):
(WebCore::RealtimeAnalyser::setSmoothingTimeConstant):
(WebCore::RealtimeAnalyser::smoothingTimeConstant):
2013-09-05 Mihnea Ovidenie <mihnea@adobe.com>
Replace node() calls with generatingNode() for RenderRegion code
https://bugs.webkit.org/show_bug.cgi?id=120397
Reviewed by Darin Adler.
As regions will become anonymous blocks nested inside elements with the flow-from property, a first step
would be to change the calls to node() with calls to generatingNode(). In the case of regions, generatingNode()
will always return an Element* and not a Node*. Therefore, to get rid of toElement() casts, i created
a specific method RenderRegion::generatingElement that will return the generating node as Element.
No new tests as no functional change was introduced.
Original patch by Catalin Badea.
* css/ElementRuleCollector.cpp:
(WebCore::ElementRuleCollector::collectMatchingRulesForRegion):
* dom/WebKitNamedFlow.cpp:
(WebCore::WebKitNamedFlow::getRegionsByContent):
(WebCore::WebKitNamedFlow::getRegions):
* rendering/RenderRegion.cpp:
(WebCore::RenderRegion::regionOversetState):
(WebCore::RenderRegion::setRegionOversetState):
(WebCore::RenderRegion::checkRegionStyle):
* rendering/RenderRegion.h:
(WebCore::RenderRegion::generatingElement):
* rendering/RenderTreeAsText.cpp:
(WebCore::writeRenderRegionList): For pseudo-elements as regions, i want to print
{pseudo} instead of {div} marker for the parent.
2013-09-05 Csaba Osztrogonác <ossy@webkit.org>
Fix SynchronousLoaderClient class for !USE(CFNETWORK) platforms
https://bugs.webkit.org/show_bug.cgi?id=120532
Reviewed by Darin Adler.
* CMakeLists.txt:
* PlatformEfl.cmake:
* PlatformGTK.cmake:
* WebCore.vcxproj/WebCore.vcxproj:
* WebCore.vcxproj/WebCore.vcxproj.filters:
* platform/network/SynchronousLoaderClient.cpp:
* platform/network/cf/SynchronousLoaderClientCFNet.cpp: Added.
(WebCore::SynchronousLoaderClient::didReceiveAuthenticationChallenge):
(WebCore::SynchronousLoaderClient::platformBadResponseError):
* platform/network/soup/SynchronousLoaderClientSoup.cpp: Added.
(WebCore::SynchronousLoaderClient::didReceiveAuthenticationChallenge):
(WebCore::SynchronousLoaderClient::platformBadResponseError):
2013-09-05 Jinwoo Song <jinwoo7.song@samsung.com>
Fix unused parameter warning in WebKitAccessibleInterfaceText.cpp
<https://webkit.org/b/120761>
Reviewed by Gyuyoung Kim.
Fix warning by removing unused parameter.
* accessibility/atk/WebKitAccessibleInterfaceText.cpp:
(sentenceAtPositionForAtkBoundary):
2013-09-05 Dirk Schulze <krit@webkit.org>
NULL ptr in WebCore::RefCountedPropertyWrapper<WebCore::ClipPathOperation>::blend
https://bugs.webkit.org/show_bug.cgi?id=105408
Reviewed by Dean Jackson.
Adding an early return if from or to clip-path values are 'none'. According to the
specification we shall just interpolate between two basic shapes.
http://dev.w3.org/csswg/css-shapes/#basic-shape-interpolation
* page/animation/CSSPropertyAnimation.cpp:
(WebCore::blendFunc):
2013-09-05 Andre Moreira Magalhaes <andre.magalhaes@collabora.co.uk>
[Qt][WK1] REGRESSION(r154988): compositing/video/video-with-invalid-source.html
https://bugs.webkit.org/show_bug.cgi?id=120683
Reviewed by Philippe Normand.
Do not set pipeline state to NULL on MediaPlayerPrivateGStreamer::loadingFailed()
otherwise the bus is flushed and we never get a GST_MESSAGE_ERROR when failing to
load uris.
Also restore previous behaviour (before r154988) of not invoking loadingFailed() for
all failed manual state change attempts.
* platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:
(WebCore::MediaPlayerPrivateGStreamer::changePipelineState):
Do not call loadingFailed() if state change fails as all manual state changes are
now done with changePipelineState().
(WebCore::MediaPlayerPrivateGStreamer::play):
(WebCore::MediaPlayerPrivateGStreamer::pause):
(WebCore::MediaPlayerPrivateGStreamer::seek):
(WebCore::MediaPlayerPrivateGStreamer::handleMessage):
Restore previous behaviour (before changeset r154988) when calling changePipelineState().
(WebCore::MediaPlayerPrivateGStreamer::updateStates):
Do nothing if changing to READY on EOS (same behaviour as setting to NULL as it was before
changeset r154988).
(WebCore::MediaPlayerPrivateGStreamer::loadingFailed):
Do not set pipeline state to NULL so we properly get GST_MESSAGE_ERROR on loading failures.
2013-09-05 Alberto Garcia <berto@igalia.com>
[GTK] MediaControlsGtk: fix warning in constructor due to incorrect order of attributes
https://bugs.webkit.org/show_bug.cgi?id=120703
Reviewed by Carlos Garcia Campos.
Fix member initialization so it matches their declaration [-Wreorder].
* html/shadow/MediaControlsGtk.cpp:
(WebCore::MediaControlsGtk::MediaControlsGtk):
2013-09-04 Dirk Schulze <krit@webkit.org>
Support interpolation between cross-fade() images
https://bugs.webkit.org/show_bug.cgi?id=119955
Reviewed by Darin Adler.
With this patch, CSS can animate from one -webkit-cross-fade
function to another, when the input images are the same in the
same order.
* css/CSSCrossfadeValue.cpp: Added blend function.
(WebCore::blendFunc):
(WebCore::CSSCrossfadeValue::blend):
(WebCore::CSSCrossfadeValue::equals):
(WebCore::CSSCrossfadeValue::equalInputImages):
* css/CSSCrossfadeValue.h: Added save casting functions.
(WebCore::toCSSCrossfadeValue):
* css/CSSValue.h:
(WebCore::CSSValue::isCrossfadeValue):
* page/animation/CSSPropertyAnimation.cpp: Add another condition to
interpolate between two -webkit-cross-fade functions.
(WebCore::blendFunc):
2013-09-04 Zoltan Herczeg <zherczeg@webkit.org>
<https://webkit.org/b/118553> Hash navigation doesn't affect history when the page is retrieved from appcache
Reviewed by Darin Adler.
A new flag called keepInHistory is added to allow keeping
certain pages in the history even if they have substitute data.
Test: http/tests/appcache/history-test.html
* loader/DocumentLoader.cpp:
(WebCore::DocumentLoader::urlForHistory):
* loader/SubstituteData.h:
(WebCore::SubstituteData::SubstituteData):
(WebCore::SubstituteData::shouldRevealToSessionHistory):
(WebCore::SubstituteData::setShouldRevealToSessionHistory):
* loader/appcache/ApplicationCacheHost.cpp:
(WebCore::ApplicationCacheHost::maybeLoadMainResource):
2013-09-04 Grzegorz Czajkowski <g.czajkowski@samsung.com>
Remove deprecated markersForNode(Node* node).
https://bugs.webkit.org/show_bug.cgi?id=120679
Reviewed by Ryosuke Niwa.
DocumentMarkerController::markersForNode(Node* node) has been marked as
deprecated in favor of markersFor(Node*, MarkerTypes = AllMarkers()).
No new tests, no behavior change.
* dom/DocumentMarkerController.cpp:
* dom/DocumentMarkerController.h:
Remove never used markersForNode(Node*).
2013-09-04 Andreas Kling <akling@apple.com>
CachedPage construction should begin with a Page&.
<https://webkit.org/b/120721>
Reviewed by Anders Carlsson.
We can't create a CachedPage from a null Page anyway.
* history/CachedPage.cpp:
(WebCore::CachedPage::create):
(WebCore::CachedPage::CachedPage):
(WebCore::CachedPage::restore):
* history/CachedPage.h:
* history/PageCache.cpp:
(WebCore::PageCache::add):
* history/PageCache.h:
* loader/FrameLoader.cpp:
(WebCore::FrameLoader::commitProvisionalLoad):
2013-09-04 Arpita Bahuguna <a.bah@samsung.com>
setAttributeNode() does not set the new value to an existing attribute if specified attribute is in a different case.
https://bugs.webkit.org/show_bug.cgi?id=120293
Reviewed by Darin Adler.
setAttributeNode() performs a case-insensitive search for an existing
attribute. If an existing attribute is found, it retrieves the index of
such an attribute. For setting the attribute's new value, we call upon
setAttributeInternal() to which both the index as well as the name of
the attribute is passed.
The name passed to this method is the same as the one passed to the
setAttributeNode() API from the webpage and thus can be in any case.
However, setAttributeInternal() uses this name to get the corresponding
existing attribute node. Since this retrieval is not case-insensitive,
the existing node is not returned and thus the new value is not set on
the existing node.
We should instead use the passed index and use that to retrieve the
existing node.
Note that obtaining the attribute's value using getAttributeNode() would
still return the correct value, i.e. the new one.
Also, this change shall make our behavior similar to that of FF and IE.
Test: fast/dom/Element/setAttributeNode-for-existing-attribute.html
* dom/Element.cpp:
(WebCore::Element::setAttributeInternal):
If the passed index is not equal to attributeNotFound, we use that index
to retrieve the existing attribute.
2013-09-04 Andreas Kling <akling@apple.com>
CachedFrame construction should begin with a Frame&.
<https://webkit.org/b/120719>
Reviewed by Anders Carlsson.
We can't create a CachedFrame from a null Frame anyway.
* bindings/js/ScriptCachedFrameData.cpp:
(WebCore::ScriptCachedFrameData::ScriptCachedFrameData):
(WebCore::ScriptCachedFrameData::restore):
* bindings/js/ScriptCachedFrameData.h:
* history/CachedFrame.cpp:
(WebCore::CachedFrameBase::CachedFrameBase):
(WebCore::CachedFrameBase::restore):
(WebCore::CachedFrame::CachedFrame):
* history/CachedFrame.h:
(WebCore::CachedFrame::create):
* history/CachedPage.cpp:
(WebCore::CachedPage::CachedPage):
2013-09-04 Andreas Kling <akling@apple.com>
Set "render tree being torn down" flag a bit earlier.
<https://webkit.org/b/120717>
Reviewed by Anders Carlsson.
Set the flag at the start of Document::detach() so everyone can get a chance
to avoid unnecessary work, not just renderers.
* dom/Document.cpp:
(WebCore::Document::detach):
2013-09-04 Andreas Kling <akling@apple.com>
Cached Page and Frame don't need to be ref-counted.
<https://webkit.org/b/120710>
Reviewed by Anders Carlsson.
- CachedPage is owned by HistoryItem.
- CachedFrame is owned by CachedPage.
Remove the ref counting from these objects to make the code less confusing.
The only place that used this was in FrameLoader::commitProvisionalLoad() which
took a temporary ref on the CachedPage. Switched this to using a raw pointer.
* history/CachedFrame.h:
(WebCore::CachedFrame::create):
* history/CachedPage.cpp:
(WebCore::CachedPage::create):
* history/CachedPage.h:
* history/HistoryItem.h:
* loader/FrameLoader.cpp:
(WebCore::FrameLoader::commitProvisionalLoad):
(WebCore::FrameLoader::transitionToCommitted):
* loader/FrameLoader.h:
2013-09-04 Roger Fong <roger_fong@apple.com>
Link to libdispatch_debug.lib when using DebugSuffix configuration.
https://bugs.webkit.org/show_bug.cgi?id=120712.
<rdar://problem/14883216>.
Reviewed by Brent Fulgham.
* platform/graphics/avfoundation/cf/MediaPlayerPrivateAVFoundationCF.cpp:
2013-09-04 Roger Fong <roger_fong@apple.com>
Unreviewed. Windows build fix and WebCore project cleanup.
* WebCore.vcxproj/WebCore.vcxproj.filters:
* rendering/RenderingAllInOne.cpp:
2013-09-04 Mark Lam <mark.lam@apple.com>
Renamed StackIterator to StackVisitor.
https://bugs.webkit.org/show_bug.cgi?id=120706.
Reviewed by Geoffrey Garen.
No new tests.
* ForwardingHeaders/interpreter/StackIterator.h: Removed.
* ForwardingHeaders/interpreter/StackVisitor.h: Copied from Source/WebCore/ForwardingHeaders/interpreter/StackIterator.h.
* bindings/js/JSXMLHttpRequestCustom.cpp:
(WebCore::SendFunctor::operator()):
* bindings/js/ScriptCallStackFactory.cpp:
(WebCore::CreateScriptCallStackFunctor::operator()):
(WebCore::CreateScriptCallStackForConsoleFunctor::operator()):
2013-09-04 Samuel White <samuel_white@apple.com>
AX: when no other label on provided on form elements, WebKit should fall back to using @title
https://bugs.webkit.org/show_bug.cgi?id=112842
Reviewed by Chris Fleizach.
Don't let input elements include empty labels in their accessibility title.
Test: platform/mac/accessibility/input-title.html
* accessibility/AccessibilityNodeObject.cpp:
(WebCore::AccessibilityNodeObject::titleElementText):
2013-09-04 Andreas Kling <akling@apple.com>
Make ImageQualityController per-RenderView.
<https://webkit.org/b/120702>
Reviewed by Anders Carlsson.
Move ImageQualityController to its own files and add a RenderView::imageQualityController()
getter instead of using a global map for all render trees.
This avoids having to unregister every renderer (well, every RenderBoxModelObject) from the
global hash map during render tree teardown.
It also simplifies the live resize optimization a bit since it can now short-circuit if
the RenderView's FrameView is being resized. (Previously there could be any number of
RenderViews present in the map.)
* CMakeLists.txt:
* GNUmakefile.list.am:
* Target.pri:
* WebCore.vcxproj/WebCore.vcxproj:
* WebCore.xcodeproj/project.pbxproj:
* rendering/ImageQualityController.cpp: Added.
* rendering/ImageQualityController.h: Added.
2013-09-04 Roger Fong <roger_fong@apple.com>
Unreviewed Build fix for Windows DebugSuffix configuration.
* WebCore.vcxproj/WebCore.vcxproj:
* WebCore.vcxproj/WebCore.vcxproj.filters:
2013-09-04 Mark Lam <mark.lam@apple.com>
Refining the StackIterator callback interface.
https://bugs.webkit.org/show_bug.cgi?id=120695.
Reviewed by Geoffrey Garen.
No new tests.
* bindings/js/JSXMLHttpRequestCustom.cpp:
(WebCore::SendFunctor::SendFunctor):
(WebCore::SendFunctor::line):
(WebCore::SendFunctor::url):
(WebCore::SendFunctor::operator()):
(WebCore::JSXMLHttpRequest::send):
* bindings/js/ScriptCallStackFactory.cpp:
(WebCore::createScriptCallStack):
2013-09-04 Andreas Kling <akling@apple.com>
Remove unnecessary RenderView.h inclusion from headers.
<https://webkit.org/b/120365>
Reviewed by Anders Carlsson.
RenderView.h was overzealously included by RenderText and RenderTextTrackCue,
making it unpleasant to edit on my laptop.
* rendering/RenderText.h:
* rendering/RenderTextTrackCue.h:
Don't include RenderView.h here, do it in .cpp files.
2013-09-04 Alexey Proskuryakov <ap@apple.com>
Editor::m_removedAnchor is unused
https://bugs.webkit.org/show_bug.cgi?id=120701
Reviewed by Ryosuke Niwa.
* editing/Editor.h: Removed m_removedAnchor. It was not only unused, but also broken,
as we didn't reset it when navigating.
2013-09-04 Pratik Solanki <psolanki@apple.com>
Document::updateHoverActiveState() should allow for deferred style recalcs
https://bugs.webkit.org/show_bug.cgi?id=120700
Reviewed by Simon Fraser.
Add an extra argument to Document::updateHoverActiveState() to specify if a style recalc
should be done. The default value keeps the current behavior of doing a style recalc. iOS
touch handling code will pass in DeferRecalcStyleIfNeeded to avoid the work.
No new tests because no functional changes.
* dom/Document.cpp:
(WebCore::Document::updateHoverActiveState):
* dom/Document.h:
2013-09-04 Tim Horton <timothy_horton@apple.com>
[mac] PDFDocumentImage should use PDFKit to draw
https://bugs.webkit.org/show_bug.cgi?id=120651
<rdar://problem/12810731>
Reviewed by Alexey Proskuryakov.
Use PDFKit to draw PDF-in-<img> on Mac, so that annotations in PDF are painted.
Test: fast/images/pdf-as-image-with-annotations.html
* WebCore.xcodeproj/project.pbxproj:
Add PDFDocumentImageMac.mm.
* platform/graphics/cg/PDFDocumentImage.cpp:
(WebCore::PDFDocumentImage::PDFDocumentImage):
We don't need to initialize m_document anymore because it's now a RetainPtr.
Initialize m_hasPage to false.
(WebCore::PDFDocumentImage::~PDFDocumentImage):
We don't need to manually release our CGPDFDocumentRef anymore because it's now a RetainPtr.
(WebCore::PDFDocumentImage::size):
Use expandedIntSize for explicitness.
(WebCore::PDFDocumentImage::applyRotationForPainting):
Rename adjustCTM to applyRotationForPainting, and move the one non-rotation related transformation out.
We need to do this because PDFKit applies the rotation transformation itself, so we don't need to.
Also, explicitly use std::min instead of importing the whole std namespace.
(WebCore::PDFDocumentImage::dataChanged):
Assert that we don't re-enter dataChanged after we've created a document,
because it seems like that shouldn't happen - we only create a document when
we've supposedly received all data, and it would be nice if we didn't have
all this varying code to deal with SharedBuffers changing out from under each other.
Factor the code to create a CGPDFDocumentRef out into createPDFDocument, so we can
replace it with a different implementation that creates a PDFDocument.
(WebCore::PDFDocumentImage::setCurrentPage):
Make all page-number-related things unsigned, since they are in CG and PDFKit,
and add m_hasPage to denote whether we've acquired a valid page yet.
Factor code to retrieve the PDF box bounds into computeBoundsForCurrentPage.
Remove setCurrentPage itself, as we never use a page other than the first page;
we will call computeBoundsForCurrentPage and set hasPage in dataChanged, now.
(WebCore::PDFDocumentImage::draw):
Fix a weird comment.
Factor code that actually draws the PDF out into drawPDFPage.
The rest of the functions in this file are only built for USE(CG) && !PLATFORM(MAC):
(WebCore::PDFDocumentImage::createPDFDocument):
Factored out of dataChanged(); I only kept the !PLATFORM(MAC) branch.
(WebCore::PDFDocumentImage::computeBoundsForCurrentPage):
Factored out of setCurrentPage().
Use deg2rad since we have it.
(WebCore::PDFDocumentImage::pageCount):
(WebCore::PDFDocumentImage::drawPDFPage):
Factored out of draw().
Reduced an unnecessary transform (we were effectively doing mediaBox.origin - cropBox.origin - mediaBox.origin).
* platform/graphics/cg/PDFDocumentImage.h:
Unindent all the things, as we don't indent the first level inside a namespace scope.
Forward-declare PDFDocument.
Make m_currentPage unsigned as it should be.
Add m_hasPage.
Make m_document a PDFDocument on PLATFORM(MAC) and a CGPDFDocumentRef on other platforms.
* platform/graphics/mac/PDFDocumentImageMac.mm: Added.
Soft-link in PDFKit and specifically the PDFDocument class.
(WebCore::PDFDocumentImage::createPDFDocument):
Create our PDFDocument from the SharedBuffer's NSData directly. This shouldn't be a problem
(with respect to the SharedBuffer's data being appended to in secret), because we've waited
for the document to finish loading before getting here.
(WebCore::PDFDocumentImage::computeBoundsForCurrentPage):
Ask PDFKit for the page's media and crop boxes; it automatically performs the correct fallback.
Ask PDFKit for the page's rotation.
(WebCore::PDFDocumentImage::pageCount):
Ask PDFKit for the page count.
(WebCore::PDFDocumentImage::drawPDFPage):
Paint the current page of the PDF. Note that we do not apply the rotation here
via applyRotationForPainting because PDFKit will do it itself.
* platform/mac/SoftLinking.h:
I couldn't find any clients of SOFT_LINK_FRAMEWORK_IN_CORESERVICES_UMBRELLA,
so I made it the more generic SOFT_LINK_FRAMEWORK_IN_UMBRELLA, taking the name
of the umbrella framework and the subframework, so I could use it to soft link
Quartz.framework's PDFKit.framework.
2013-09-04 Roger Fong <roger_fong@apple.com>
Unreviewed Windows build fix.
* WebCore.vcxproj/WebCoreCommon.props:
2013-09-04 Bem Jones-Bey <bjonesbe@adobe.com>
FloatingObjects should manage cleaning it's line box tree pointers itself
https://bugs.webkit.org/show_bug.cgi?id=120692
Reviewed by David Hyatt.
This is another step in properly encapsulating FloatingObjects.
Instead of having RenderBlock walk and clear the line box tree
pointers, create a method for the behavior, and have RenderBlock call
that.
In addtion, add a proper destructor to FloatingObjects, so that
RenderBlock does not have to explicitly delete the set in
FloatingObjects.
And as a bonus, fix the ordering of an if to avoid the expensive
descendantChild check.
This is a port of a Blink patch by Eric Seidel.
No new tests, no behavior change.
* rendering/RenderBlock.cpp:
(WebCore::RenderBlock::~RenderBlock):
(WebCore::RenderBlock::deleteLineBoxTree):
(WebCore::RenderBlock::repaintOverhangingFloats):
(WebCore::RenderBlock::FloatingObjects::~FloatingObjects):
(WebCore::RenderBlock::FloatingObjects::clearLineBoxTreePointers):
(WebCore::RenderBlock::FloatingObjects::clear):
* rendering/RenderBlock.h:
2013-09-04 Tim Horton <timothy_horton@apple.com>
Rename customCssText -> customCSSText to match WebKit style
https://bugs.webkit.org/show_bug.cgi?id=120694
Reviewed by Simon Fraser.
No new tests, just a rename.
* WebCore.order:
* css/CSSAspectRatioValue.cpp:
(WebCore::CSSAspectRatioValue::customCSSText):
* css/CSSAspectRatioValue.h:
* css/CSSBorderImageSliceValue.cpp:
(WebCore::CSSBorderImageSliceValue::customCSSText):
* css/CSSBorderImageSliceValue.h:
* css/CSSCalculationValue.cpp:
(WebCore::CSSCalcValue::customCSSText):
(WebCore::CSSCalcPrimitiveValue::customCSSText):
(WebCore::CSSCalcBinaryOperation::customCSSText):
* css/CSSCalculationValue.h:
* css/CSSCanvasValue.cpp:
(WebCore::CSSCanvasValue::customCSSText):
* css/CSSCanvasValue.h:
* css/CSSCrossfadeValue.cpp:
(WebCore::CSSCrossfadeValue::customCSSText):
* css/CSSCrossfadeValue.h:
* css/CSSCursorImageValue.cpp:
(WebCore::CSSCursorImageValue::customCSSText):
* css/CSSCursorImageValue.h:
* css/CSSFilterImageValue.cpp:
(WebCore::CSSFilterImageValue::customCSSText):
* css/CSSFilterImageValue.h:
* css/CSSFontFaceSrcValue.cpp:
(WebCore::CSSFontFaceSrcValue::customCSSText):
* css/CSSFontFaceSrcValue.h:
* css/CSSFunctionValue.cpp:
(WebCore::CSSFunctionValue::customCSSText):
* css/CSSFunctionValue.h:
* css/CSSGradientValue.cpp:
(WebCore::CSSLinearGradientValue::customCSSText):
(WebCore::CSSRadialGradientValue::customCSSText):
* css/CSSGradientValue.h:
* css/CSSImageSetValue.cpp:
(WebCore::CSSImageSetValue::customCSSText):
* css/CSSImageSetValue.h:
* css/CSSImageValue.cpp:
(WebCore::CSSImageValue::customCSSText):
* css/CSSImageValue.h:
* css/CSSInheritedValue.cpp:
(WebCore::CSSInheritedValue::customCSSText):
* css/CSSInheritedValue.h:
* css/CSSInitialValue.cpp:
(WebCore::CSSInitialValue::customCSSText):
* css/CSSInitialValue.h:
* css/CSSLineBoxContainValue.cpp:
(WebCore::CSSLineBoxContainValue::customCSSText):
* css/CSSLineBoxContainValue.h:
* css/CSSPrimitiveValue.cpp:
(WebCore::CSSPrimitiveValue::customCSSText):
(WebCore::CSSPrimitiveValue::customSerializeResolvingVariables):
* css/CSSPrimitiveValue.h:
* css/CSSReflectValue.cpp:
(WebCore::CSSReflectValue::customCSSText):
* css/CSSReflectValue.h:
* css/CSSTimingFunctionValue.cpp:
(WebCore::CSSLinearTimingFunctionValue::customCSSText):
(WebCore::CSSCubicBezierTimingFunctionValue::customCSSText):
(WebCore::CSSStepsTimingFunctionValue::customCSSText):
* css/CSSTimingFunctionValue.h:
* css/CSSUnicodeRangeValue.cpp:
(WebCore::CSSUnicodeRangeValue::customCSSText):
* css/CSSUnicodeRangeValue.h:
* css/CSSValue.cpp:
(WebCore::CSSValue::cssText):
* css/CSSValueList.cpp:
(WebCore::CSSValueList::customCSSText):
* css/CSSValueList.h:
* css/FontFeatureValue.cpp:
(WebCore::FontFeatureValue::customCSSText):
* css/FontFeatureValue.h:
* css/FontValue.cpp:
(WebCore::FontValue::customCSSText):
* css/FontValue.h:
* css/ShadowValue.cpp:
(WebCore::ShadowValue::customCSSText):
* css/ShadowValue.h:
* css/WebKitCSSArrayFunctionValue.cpp:
(WebCore::WebKitCSSArrayFunctionValue::customCSSText):
* css/WebKitCSSArrayFunctionValue.h:
* css/WebKitCSSFilterValue.cpp:
(WebCore::WebKitCSSFilterValue::customCSSText):
* css/WebKitCSSFilterValue.h:
* css/WebKitCSSMatFunctionValue.cpp:
(WebCore::WebKitCSSMatFunctionValue::customCSSText):
* css/WebKitCSSMatFunctionValue.h:
* css/WebKitCSSMixFunctionValue.cpp:
(WebCore::WebKitCSSMixFunctionValue::customCSSText):
* css/WebKitCSSMixFunctionValue.h:
* css/WebKitCSSSVGDocumentValue.cpp:
(WebCore::WebKitCSSSVGDocumentValue::customCSSText):
* css/WebKitCSSSVGDocumentValue.h:
* css/WebKitCSSShaderValue.cpp:
(WebCore::WebKitCSSShaderValue::customCSSText):
* css/WebKitCSSShaderValue.h:
* css/WebKitCSSTransformValue.cpp:
(WebCore::WebKitCSSTransformValue::customCSSText):
* css/WebKitCSSTransformValue.h:
* svg/SVGColor.cpp:
(WebCore::SVGColor::customCSSText):
* svg/SVGColor.h:
* svg/SVGPaint.cpp:
(WebCore::SVGPaint::customCSSText):
* svg/SVGPaint.h:
2013-09-04 Chris Fleizach <cfleizach@apple.com>
AX: aria-valuetext property not exposing AXValueDescription
https://bugs.webkit.org/show_bug.cgi?id=120375
Reviewed by Darin Adler.
Expose value based attributes for incrementor roles (which are called spinbuttons by ARIA).
Test: platform/mac/accessibility/spinbutton-valuedescription.html
* accessibility/mac/WebAccessibilityObjectWrapperMac.mm:
(-[WebAccessibilityObjectWrapper accessibilityAttributeNames]):
2013-09-04 Javier Fernandez <jfernandez@igalia.com>
<https://webkit.org/b/119622> [CSSRegions] Not possible to clear the selection when mixing content from different FlowThreads
Reviewed by David Hyatt.
When using CSS Regions is usual that the RenderTree doesn't match
the DOM Tree in terms of relative position of the nodes. Besides,
usually the content of a certain node is split and spread across
multiple blocks, rendered in different positions.
Regarding the Selection, this problem is even more important; the
selection direction changes when crossing the FlowThread
boundaries. This weird behavior is also present in other layouts
using non-regular positioning mechanisms, like absolute,
static. However, for those layouts the RenderTree preserves the
order of the nodes, unlike the CSS Regions layout model.
Because of how the RenderTree is generated with CSS Regions, the
RenderView::setSelection algorithm is not able to repaint some of
the rectangles defined during the selection process. In order to
face this issue, the proposed fix determines whether it should
backwards traversing the RenderTree, from the "stop" node to the
RenderView node.
Test: fast/regions/selecting-text-through-different-region-flows-2.html
* rendering/RenderView.cpp:
(WebCore::getNextOrPrevRenderObjectBasedOnDirection): Added.
(WebCore::RenderView::setSelection):
2013-09-04 Eric Carlson <eric.carlson@apple.com>
Get MEDIA_STREAM compiling on OSX
https://bugs.webkit.org/show_bug.cgi?id=120650
Reviewed by Darin Adler.
No new tests, the code changed doesn't run on OSX yet.
* DerivedSources.make: Add MediaStream idl files.
* Modules/mediastream/LocalMediaStream.h: Mark class as FINAL.
* Modules/mediastream/MediaConstraintsImpl.cpp:
(WebCore::MediaConstraintsImpl::getOptionalConstraints): append -> appendRange so we don't
need a MediaConstraint copy constructor.
* Modules/mediastream/RTCDataChannel.cpp:
(WebCore::RTCDataChannel::send): Remove an unused parameter name.
* Modules/mediastream/RTCDataChannel.h: ArrayBuffer and ArrayBufferView are in the JSC namespace.
* Modules/mediastream/RTCPeerConnection.cpp:
(WebCore::RTCPeerConnection::RTCPeerConnection): loader() doesn't return a pointer.
(WebCore::RTCPeerConnection::localDescription): Set the ExceptionCode on error.
(WebCore::RTCPeerConnection::remoteDescription): Ditto.
* Modules/mediastream/RTCSessionDescription.cpp:
(WebCore::RTCSessionDescription::setSdp): Remove the unused ExceptionCode parameter.
* Modules/mediastream/RTCSessionDescription.h: Ditto.
* Modules/mediastream/RTCSessionDescription.idl: Ditto.
* Modules/mediastream/RTCStatsResponse.cpp:
(WebCore::RTCStatsResponse::canGetItemsForName): Add so JSRTCStatsResponse::canGetItemsForName
doesn't cause ref count churn.
* Modules/mediastream/RTCStatsResponse.h: Mark class as FINAL. Declare canGetItemsForName.
* WebCore.xcodeproj/project.pbxproj: Add new files.
* bindings/js/JSRTCStatsResponseCustom.cpp:
(WebCore::JSRTCStatsResponse::canGetItemsForName): Use canGetItemsForName instead of namedItem.
Use propertyNameToAtomicString instead of propertyNameToString
(WebCore::JSRTCStatsResponse::nameGetter): Use propertyNameToAtomicString instead of
propertyNameToString because namedItem takes an AtomicString.
* platform/mediastream/mac: Added.
* platform/mediastream/mac/MediaStreamCenterMac.cpp: Added.
* platform/mediastream/mac/MediaStreamCenterMac.h: Added.
2013-09-04 Daniel Bates <dabates@apple.com>
[iOS] Fix the build following <http://trac.webkit.org/changeset/154903>
(https://bugs.webkit.org/show_bug.cgi?id=120540)
* style/StyleResolveTree.cpp:
(WebCore::Style::resolveTree): Use address operator and dot-notation when
passing Element to CheckForVisibilityChangeOnRecalcStyle and calling
Element::renderStyle(), respectively.
2013-09-04 Bem Jones-Bey <bjonesbe@adobe.com>
Move logical dimension getters/setters to FloatingObject from RenderBlock
https://bugs.webkit.org/show_bug.cgi?id=120686
Reviewed by David Hyatt.
This is the first step in decoupling FloatingObject, FloatingObjects,
et al from RenderBlock. It is not ideal that the methods take a bool;
however, passing down the actual writing mode would require
refactoring the way that RenderBlock stores this information, which is
a task for the future.
No new tests, no behavior change.
* rendering/RenderBlock.cpp:
(WebCore::RenderBlock::repaintOverhangingFloats): Use new methods.
(WebCore::RenderBlock::insertFloatingObject): Ditto.
(WebCore::RenderBlock::removeFloatingObject): Ditto.
(WebCore::RenderBlock::removeFloatingObjectsBelow): Ditto.
(WebCore::RenderBlock::computeLogicalLocationForFloat): Ditto.
(WebCore::RenderBlock::positionNewFloats): Ditto.
(WebCore::::updateOffsetIfNeeded): Ditto.
(WebCore::::collectIfNeeded): Ditto.
(WebCore::::getHeightRemaining): Ditto.
(WebCore::RenderBlock::logicalLeftFloatOffsetForLine): Ditto.
(WebCore::RenderBlock::logicalRightFloatOffsetForLine): Ditto.
(WebCore::RenderBlock::nextFloatLogicalBottomBelow): Ditto.
(WebCore::RenderBlock::lowestFloatLogicalBottom): Ditto.
(WebCore::RenderBlock::clearFloats): Ditto.
(WebCore::RenderBlock::addOverhangingFloats): Ditto.
(WebCore::RenderBlock::hasOverhangingFloat): Ditto.
(WebCore::RenderBlock::addIntrudingFloats): Ditto.
* rendering/RenderBlock.h:
(WebCore::RenderBlock::FloatingObject::logicalTop): Moved from RenderBlock::logicalTopForFloat
(WebCore::RenderBlock::FloatingObject::logicalBottom): Moved from RenderBlock::logicalBottomForFloat
(WebCore::RenderBlock::FloatingObject::logicalLeft): Moved from RenderBlock::logicalLeftForFloat
(WebCore::RenderBlock::FloatingObject::logicalRight): Moved from RenderBlock::logicalRightForFloat
(WebCore::RenderBlock::FloatingObject::logicalWidth): Moved from RenderBlock::logicalWidthForFloat
(WebCore::RenderBlock::FloatingObject::pixelSnappedLogicalTop): Moved from RenderBlock::pixelSnappedLogicalTopForFloat
(WebCore::RenderBlock::FloatingObject::pixelSnappedLogicalBottom): Moved from RenderBlock::pixelSnappedLogicalBottomForFloat
(WebCore::RenderBlock::FloatingObject::pixelSnappedLogicalLeft): Moved from RenderBlock::pixelSnappedLogicalLeftForFloat
(WebCore::RenderBlock::FloatingObject::pixelSnappedLogicalRight): Moved from RenderBlock::pixelSnappedLogicalRightForFloat
(WebCore::RenderBlock::FloatingObject::setLogicalTop): Moved from RenderBlock::setLogicalTopForFloat
(WebCore::RenderBlock::FloatingObject::setLogicalLeft): Moved from RenderBlock::setLogicalLeftForFloat
(WebCore::RenderBlock::FloatingObject::setLogicalHeight): Moved from RenderBlock::setLogicalHeightForFloat
(WebCore::RenderBlock::FloatingObject::setLogicalWidth): Moved from RenderBlock::setLogicalWidthForFloat
* rendering/RenderBlockLineLayout.cpp:
(WebCore::LineWidth::shrinkAvailableWidthForNewFloatIfNeeded): Use new methods.
(WebCore::RenderBlock::checkPaginationAndFloatsAtEndLine): Ditto.
(WebCore::RenderBlock::LineBreaker::nextSegmentBreak): Ditto.
(WebCore::RenderBlock::positionNewFloatOnLine): Ditto.
2013-09-04 Andre Moreira Magalhaes <andre.magalhaes@collabora.co.uk>
REGRESSION(r154977): Do not urlencode soup message on ResourceRequest::toSoupMessage()
https://bugs.webkit.org/show_bug.cgi?id=120681
Reviewed by Martin Robinson.
Do not call soup_message_set_uri with soupURI() (url encoded uri) on
ResourceRequest::toSoupMessage().
* platform/network/soup/ResourceRequest.h:
* platform/network/soup/ResourceRequestSoup.cpp:
(WebCore::ResourceRequest::updateSoupMessageMembers):
(WebCore::ResourceRequest::updateSoupMessage):
(WebCore::ResourceRequest::toSoupMessage):
Split common code from updateSoupMessage/toSoupMessage into updateSoupMessageMembers.
2013-09-04 Danilo Cesar Lemes de Paula <danilo.cesar@collabora.co.uk>
[GTK] add support for subtitles on webkit2GTK
https://bugs.webkit.org/show_bug.cgi?id=117008
By activating subtitles support on webkit2GTK, the video player
recognizes and use text <tracks> inside <video> elements.
Reviewed by Martin Robinson.
Layout tests (track-menu) should cover this change.
* css/mediaControlsGtk.css:
(audio::-webkit-media-controls-toggle-closed-captions-button, video::-webkit-media-controls-toggle-closed-captions-button):
(video::-webkit-media-controls-closed-captions-container):
(video::-webkit-media-controls-closed-captions-track-list):
(video::-webkit-media-controls-closed-captions-track-list h3):
(video::-webkit-media-controls-closed-captions-track-list ul):
(video::-webkit-media-controls-closed-captions-track-list li):
(video::-webkit-media-controls-closed-captions-track-list li.selected):
* html/shadow/MediaControlElements.cpp:
(WebCore::MediaControlToggleClosedCaptionsButtonElement::MediaControlToggleClosedCaptionsButtonElement):
(WebCore::MediaControlToggleClosedCaptionsButtonElement::defaultEventHandler):
* html/shadow/MediaControlElements.h:
* html/shadow/MediaControlsGtk.cpp:
(WebCore::MediaControlsGtkEventListener::create):
(WebCore::MediaControlsGtkEventListener::cast):
(WebCore::MediaControlsGtkEventListener::MediaControlsGtkEventListener):
(WebCore::MediaControlsGtk::MediaControlsGtk):
(WebCore::MediaControlsGtk::initializeControls):
(WebCore::MediaControlsGtk::setMediaController):
(WebCore::MediaControlsGtk::reset):
(WebCore::MediaControlsGtk::makeTransparent):
(WebCore::MediaControlsGtk::toggleClosedCaptionTrackList):
(WebCore::MediaControlsGtk::showClosedCaptionTrackList):
(WebCore::MediaControlsGtk::hideClosedCaptionTrackList):
(WebCore::MediaControlsGtk::handleClickEvent):
(WebCore::MediaControlsGtk::eventListener):
(WebCore::MediaControlsGtkEventListener::handleEvent):
(WebCore::MediaControlsGtkEventListener::operator==):
* html/shadow/MediaControlsGtk.h:
* page/CaptionUserPreferences.cpp:
(WebCore::trackDisplayName):
* platform/gtk/LocalizedStringsGtk.cpp:
(WebCore::textTrackSubtitlesText):
(WebCore::textTrackOffMenuItemText):
(WebCore::textTrackNoLabelText):
* platform/gtk/RenderThemeGtk.h:
2013-09-03 Darin Adler <darin@apple.com>
Use OwnPtr in the RenderLayerFilterInfo map
https://bugs.webkit.org/show_bug.cgi?id=120619
Reviewed by Anders Carlsson.
* rendering/RenderLayer.cpp:
(WebCore::RenderLayer::~RenderLayer): Use FilterInfo::remove directly instead of
going through removeFilterInfoIfNeeded function.
(WebCore::RenderLayer::paintsWithFilters): Rearranged #if a little bit and tweaked
the comment.
(WebCore::RenderLayer::requiresFullLayerImageForFilters): Use && instead of ternary.
(WebCore::RenderLayer::filterRenderer): Use FilterInfo::getIfExists directly instead
of going through filterInfo function.
(WebCore::RenderLayer::setFilterBackendNeedsRepaintingInRect): Use FilterInfo::get
directly instead of going through filterInfo function. Also use references instead
of pointers.
(WebCore::shouldDoSoftwarePaint): Marked this simple function, used only once, as
inline.
(WebCore::paintForFixedRootBackground): Ditto.
(WebCore::RenderLayer::setupFilters): Use FilterInfo::getIfExists directly instead
of going through filterInfo function. Also get rendererer out of filterInfo instead
of calling filterRenderer.
(WebCore::RenderLayer::updateOrRemoveFilterClients): Use FilterInfo::get and
FilterInfo::getIfExists directly instead of using ensureFilterInfo and
filterInfo functions.
(WebCore::RenderLayer::updateOrRemoveFilterEffectRenderer): Use FilterInfo::getIfExists
and FilterInfo::get directly instead of using filterInfo function.
* rendering/RenderLayer.h: Removed the ifdefs around forward declarations; overkill,
since there is no harm in a few extras. Marked the RenderLayer class FINAL. Removed the
no-longer-needed filterInfo, ensureFilterInfo, removeFilterInfoIfNeeded, hasFilterInfo,
and setHasFilterInfo functions. Mark everything private instead of protected since
there are no classes derived from this one. Made FilterInfo an embedded class so it
can get at the m_hasFilterInfo data member directly and has a shorter name.
* rendering/RenderLayerFilterInfo.cpp: Removed the ifs around includes, which were
overkill, since there is little harm including a few extra files.
(WebCore::RenderLayer::FilterInfo::map): Added. Returns the single global map.
(WebCore::RenderLayer::FilterInfo::getIfExists): Renamed from filterInfoForRenderLayer.
Also changed to take a reference instead of a pointer, and to use the new filterMap.
(WebCore::RenderLayer::FilterInfo::get): Renamed from createFilterInfoForRenderLayerIfNeeded.
Also changed to take a reference instead of a pointer, to use the new filterMap, and
to use add to avoid hashing twice when adding a new layer to the map.
(WebCore::RenderLayer::FilterInfo::remove): Renamed from removeFilterInfoForRenderLayer.
Also changed to take a reference instead of a pointer and eliminated the explicit
delete since we use OwnPtr now.
(WebCore::RenderLayer::FilterInfo::FilterInfo): Take a reference instead of a pointer.
(WebCore::RenderLayer::FilterInfo::~FilterInfo): Updated class name.
(WebCore::RenderLayer::FilterInfo::setRenderer): Ditto.
(WebCore::RenderLayer::FilterInfo::notifyFinished): Update since m_layer is a reference.
(WebCore::RenderLayer::FilterInfo::updateReferenceFilterClients): Update to iterate in a
slightly more idiomatic and efficient way. Also update since m_layer is a reference.
(WebCore::RenderLayer::FilterInfo::removeReferenceFilterClients): Ditto.
(WebCore::RenderLayer::FilterInfo::notifyCustomFilterProgramLoaded): Ditto.
(WebCore::RenderLayer::FilterInfo::updateCustomFilterClients): Ditto. Also switched to
a raw pointer for CustomFilterProgram*.
(WebCore::RenderLayer::FilterInfo::removeCustomFilterClients): Ditto.
* rendering/RenderLayerFilterInfo.h: Removed the ifs around includes, which were
overkill, since there is little harm including a few extra files. Changed to be a
member class of RenderLayer, marked the class FINAL, and changed the style of the
conditionals around the base classes. Renamed functions. Made overrides private and
used OVERRIDE. Changed functions to take references instead of pointers. Did some
small style cleanup. Made deleteOwnedPtr a friend so we can keep the destructor private.
Moved the typedef of RenderLayerFilterInfoMap into the class and named it just Map.
Got rid of s_filterMap and instead added a function named just map().
2013-09-04 Andreas Kling <akling@apple.com>
Simplify subtree relayout scheduling a bit.
<https://webkit.org/b/120684>
Reviewed by Antti Koivisto.
Subtree relayout scheduling should only happen while there's a render tree up,
the code can freely assume that there's a RenderView present.
Added an assertion that the render tree isn't being torn down. This should catch
renderers doing unnecessary work during document detach and could be a source
of "performance freebies."
I also un-nested scheduleRelayoutOfSubtree() with early-return style to make
the code more human-readable.
* page/FrameView.h:
* page/FrameView.cpp:
(WebCore::FrameView::scheduleRelayoutOfSubtree):
* rendering/RenderObject.cpp:
(WebCore::RenderObject::scheduleRelayout):
2013-09-04 Jae Hyun Park <jae.park@company100.net>
[Coordinated Graphics] Remove unused method in CoordinatedGraphicsLayer
https://bugs.webkit.org/show_bug.cgi?id=120664
Reviewed by Darin Adler.
CoordinatedGraphicsLayer::hasPendingVisibleChanges is not used as of
r148952.
* platform/graphics/texmap/coordinated/CoordinatedGraphicsLayer.cpp:
* platform/graphics/texmap/coordinated/CoordinatedGraphicsLayer.h:
2013-09-04 Hans Muller <hmuller@adobe.com>
[CSS Shapes] Revise the ShapeInterval set operations' implementation
https://bugs.webkit.org/show_bug.cgi?id=120349
Reviewed by Alexandru Chiculita.
Revised the ShapeIntervals unite, intersect, and subtract operations to
improve efficiency and clarity.
No new tests are required, this is just an internal refactoring.
* rendering/shapes/PolygonShape.cpp:
(WebCore::computeOverlappingEdgeXProjections): Removed call to ShapeInterval<T>sortVector(), since calling std::sort directly is simpler.
* rendering/shapes/ShapeInterval.h:
(WebCore::ShapeInterval::contains): True if the interval parameter is within this interval.
(WebCore::ShapeInterval::intersect): Substantially revised version of the original method.
(WebCore::ShapeInterval::uniteVectors): Ditto.
(WebCore::ShapeInterval::intersectVectors): Ditto.
(WebCore::ShapeInterval::subtractVectors): Ditto.
2013-09-04 Krzysztof Czech <k.czech@samsung.com>
[ATK] Adds an accessibility support to access a value of the color control element
https://bugs.webkit.org/show_bug.cgi?id=114354
Reviewed by Mario Sanchez Prada.
Implements a possibility of retrieving a value of the color control element.
* accessibility/atk/WebKitAccessibleInterfaceText.cpp:
(webkitAccessibleTextGetText):
* accessibility/atk/WebKitAccessibleWrapperAtk.cpp:
(getInterfaceMaskFromObject):
2013-09-04 Andreas Kling <akling@apple.com>
Use Vector<Ref<T>> in three random WebCore loops.
<https://webkit.org/b/120661>
Reviewed by Darin Adler.
Clean up three little loops to use Refs to avoid null checking known-valid objects.
Also apply auto, reserveInitialCapacity and uncheckedAppend as appropriate.
* page/DOMWindow.cpp:
(WebCore::DOMWindow::dispatchAllPendingBeforeUnloadEvents):
(WebCore::DOMWindow::dispatchAllPendingUnloadEvents):
* platform/graphics/FontCache.cpp:
(WebCore::FontCache::invalidate):
2013-09-04 Claudio Saavedra <csaavedra@igalia.com>
[GTK] Color of input button's text broken with recent gnome-themes-standard
https://bugs.webkit.org/show_bug.cgi?id=120581
Reviewed by Carlos Garcia Campos.
* platform/gtk/RenderThemeGtk3.cpp:
(WebCore::getStyleContext): add the "text-button" class.
(WebCore::RenderThemeGtk::systemColor): Use the ACTIVE state flag,
as this is the one actually used for button labels.
2013-09-04 Zan Dobersek <zdobersek@igalia.com>
[GTK] Add support for the Wayland build target
https://bugs.webkit.org/show_bug.cgi?id=120627
Reviewed by Gustavo Noronha Silva.
* GNUmakefile.list.am: Reorder the Source/WebCore/plugins/np* source files.
The X11-specific source files should only be included if the X11 target is being built. PluginPackageNone and
PluginViewNone source files must be included in non-X11-target builds. Other source files that were previously
guarded with the TARGET_X11 conditional should also be built for the Wayland target, so the new TARGET_X11_OR_WAYLAND
conditional is used. If neither of those two targets is being built we fall back to adding source files to the build
as necessary by the actual build target.
* platform/gtk/GtkVersioning.c:
(gdk_screen_get_monitor_workarea): Additionally guard bits of code that depend on the GDK_WINDOWING_X11 macro being
defined - these should only be built when building the X11 target, checked for with PLATFORM(X11).
2013-09-04 Mario Sanchez Prada <mario.prada@samsung.com>
[GTK] Reimplement atk_text_get_text_*_offset for SENTENCE boundaries
https://bugs.webkit.org/show_bug.cgi?id=114873
Reviewed by Chris Fleizach.
Re-implement these functions without using GailTextUtil nor Pango.
* accessibility/atk/WebKitAccessibleInterfaceText.cpp:
(webkitAccessibleTextWordForBoundary): Renamed from webkitAccessibleTextGetWordForBoundary,
to keep it consistent with names for new functions.
(isSentenceBoundary): Helper function to know when we are either
at the beginning or the end of a sentence.
(isWhiteSpaceBetweenSentences): It returns true if we are in the
middle of a white space between sentences. Useful for implementing
the SENTENCE_END boundary type.
(sentenceAtPositionForAtkBoundary): New helper function to find the
sentence at a given position considering values of AtkTextBoundary.
(webkitAccessibleTextSentenceForBoundary): New function,
implementing atk_text_get_text_*_offset for SENTENCE.
(webkitAccessibleTextGetTextForOffset): Replace usage of Gail for
SENTENCE boundaries with webkitAccessibleTextSentenceForBoundary().
2013-09-04 Andrei Bucur <abucur@adobe.com>
[CSS Regions] Extend the RenderRegionRange class to include overflow information + apply the layout overflow
https://bugs.webkit.org/show_bug.cgi?id=116299
Reviewed by David Hyatt.
Patch for computing overflow for boxes per region and applying it for layout overflow.
The approach is based on adding a RenderOverflow object inside the RenderBoxRegionInfo
structure. The RenderOverflow object is manipulated by the RenderRegion using some utility
functions that receive the target box as a parameter.
When computing the portion of a box inside a region it is necessary to split the border
rect of the box between regions. This means mapping the rectangle in the flow thread
coordinates, making the split and then remapping the fragment in the box coordinates.
For now, this is not optimized and walks the render tree to compute the block offsets.
The function getRegionRangeForBox is used to determine in what regions a box should
be rendered into. The range is computed at layout time and it depends on the height of
the box, if its unsplittable for fragmentation etc.
The patch also propagates the layout overflow to the regions. This enables to correctly
display scrollbars when chaining varying size regions (currently the horizontal overflow
is as wide as the widest region for all the regions). Unsplittable boxes will also generate
layout overflow in the start region so they can be scrolled and fully reachable. This
functionality depends on fixing the visual overflow and adapting the layout to take into
account the unsplittable box. Besides this, the relative positioning and transforms are applied
at a fragment level. This is in line with the CSS3 Break specification:
http://dev.w3.org/csswg/css-break/#transforms
Tests: fast/regions/overflow-scrollable-rel-pos-fragment.html
fast/regions/overflow-scrollable-rotated-fragment.html
fast/regions/overflow-scrollable-unsplittable-fragment.html
fast/regions/overflow-scrollable-varying-width-1.html
fast/regions/overflow-scrollable-varying-width-2.html
* rendering/RenderBlock.cpp:
(WebCore::RenderBlock::computeOverflow):
(WebCore::RenderBlock::clearLayoutOverflow):
(WebCore::RenderBlock::addVisualOverflowFromTheme):
(WebCore::RenderBlock::relayoutForPagination):
* rendering/RenderBlockLineLayout.cpp:
(WebCore::RenderBlock::addOverflowFromInlineChildren):
* rendering/RenderBox.cpp:
(WebCore::RenderBox::clientBoxRectInRegion):
(WebCore::RenderBox::addVisualEffectOverflow):
(WebCore::RenderBox::applyVisualEffectOverflow):
(WebCore::RenderBox::addOverflowFromChild):
(WebCore::RenderBox::clearOverflow):
* rendering/RenderBox.h:
* rendering/RenderBoxRegionInfo.h:
(WebCore::RenderBoxRegionInfo::createOverflow):
(WebCore::RenderBoxRegionInfo::overflow):
(WebCore::RenderBoxRegionInfo::clearOverflow):
* rendering/RenderEmbeddedObject.cpp:
(WebCore::RenderEmbeddedObject::layout):
* rendering/RenderFlowThread.cpp:
(WebCore::RenderFlowThread::updateLogicalWidth):
(WebCore::RenderFlowThread::markRegionsForOverflowLayoutIfNeeded):
(WebCore::RenderFlowThread::mapFromLocalToFlowThread):
(WebCore::RenderFlowThread::mapFromFlowThreadToLocal):
(WebCore::RenderFlowThread::addRegionsVisualEffectOverflow):
(WebCore::RenderFlowThread::addRegionsVisualOverflowFromTheme):
(WebCore::RenderFlowThread::addRegionsOverflowFromChild):
(WebCore::RenderFlowThread::addRegionsLayoutOverflow):
(WebCore::RenderFlowThread::clearRegionsOverflow):
* rendering/RenderFlowThread.h:
* rendering/RenderIFrame.cpp:
(WebCore::RenderIFrame::layout):
* rendering/RenderRegion.cpp:
(WebCore::RenderRegion::computeOverflowFromFlowThread):
(WebCore::RenderRegion::setRenderBoxRegionInfo):
(WebCore::RenderRegion::ensureOverflowForBox):
(WebCore::RenderRegion::rectFlowPortionForBox):
(WebCore::RenderRegion::addLayoutOverflowForBox):
(WebCore::RenderRegion::addVisualOverflowForBox):
(WebCore::RenderRegion::layoutOverflowRectForBox):
(WebCore::RenderRegion::visualOverflowRectForBox):
(WebCore::RenderRegion::layoutOverflowRectForBoxForPropagation):
(WebCore::RenderRegion::visualOverflowRectForBoxForPropagation):
* rendering/RenderRegion.h:
* rendering/RenderReplaced.cpp:
(WebCore::RenderReplaced::layout):
* rendering/RenderTableSection.cpp:
(WebCore::RenderTableSection::computeOverflowFromCells):
2013-09-04 Andre Moreira Magalhaes <andre.magalhaes@collabora.co.uk>
[GStreamer] cannot play live streams
https://bugs.webkit.org/show_bug.cgi?id=116831
Reviewed by Philippe Normand.
Fix issues with rtsp streams embedded on <video> not loading.
* platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:
Do not reset pipeline to READY state on STATE_CHANGE_ASYNC when entering PAUSED state for
live streams, otherwise we enter an endless loop of READY->PAUSED->READY->PAUSED when
starting playback.
2013-09-03 Chris Fleizach <cfleizach@apple.com>
AX: REGRESSION: @title is exposed as AXDescription when label label from contents already exists.
https://bugs.webkit.org/show_bug.cgi?id=120550
Reviewed by Mario Sanchez Prada.
Resolve a FIXME from the accessible name computation refactoring so that alternative text for links do not
show up in the title field and do not duplicate naming when a title tag is used.
Effectively, this means that links no longer use AXTitle for alternative text. They use AXDescription
like all other elements.
Test: platform/mac/accessibility/link-with-title.html
* accessibility/mac/WebAccessibilityObjectWrapperMac.mm:
(-[WebAccessibilityObjectWrapper accessibilityTitle]):
(-[WebAccessibilityObjectWrapper accessibilityDescription]):
2013-09-03 Darin Adler <darin@apple.com>
Change type of Document::doctype back to a raw pointer
https://bugs.webkit.org/show_bug.cgi?id=120617
Reviewed by Andreas Kling.
* dom/Document.cpp:
(WebCore::Document::doctype): Return a raw pointer.
(WebCore::Document::childrenChanged): Use the raw pointer.
Also added a FIXME about this code that is probably in the wrong place.
* dom/Document.h: More of the same.
* editing/markup.cpp:
(WebCore::documentTypeString): Get rid of local variable entirely,
since null is already handled right by createMarkup, and also remove
the call to get since doctype is just a raw pointer.
2013-09-03 Andreas Kling <akling@apple.com>
ASSERTION FAILED: frame().view() == this closing a page with SVG or video
<https://webkit.org/b/120645>
Reviewed by Antti Koivisto.
Have RenderSVGResourceContainer check if the document is being destroyed before
triggering any repaints. This replaces the previous check for a null RenderView
which meant basically the same thing.
We could add more and better assertions to catch unnecessary work during tree
teardown, but let's do that separately.
* rendering/svg/RenderSVGResourceContainer.cpp:
(WebCore::RenderSVGResourceContainer::markClientForInvalidation):
2013-09-03 Gyuyoung Kim <gyuyoung.kim@samsung.com>
Fix uninitialized build warning in make_names.pl
https://bugs.webkit.org/show_bug.cgi?id=120658
Reviewed by Andreas Kling.
No new tests, no behavior change.
* dom/make_names.pl:
(printTypeChecks): Fixed a build warning since r154965.
2013-09-03 Darin Adler <darin@apple.com>
Fix backwards branch in ~Node from r154967
https://bugs.webkit.org/show_bug.cgi?id=120659
Reviewed by Andreas Kling.
* dom/Node.cpp:
(WebCore::Node::~Node): Fix backwards branch. The old code ran the code only
when we did not remove the item from the table. I removed a ! from this expression
after review; bad idea.
2013-09-03 Enrica Casucci <enrica@apple.com>
Can't select Katakana word by double-clicking.
<rdar://problem/14654926>
Reviewed by Alexey Proskuryakov and Ryosuke Niwa.
For some languages, like Japanese we need
to use more context for word breaking.
New test: editing/selection/doubleclick-japanese-text.html
* platform/text/TextBoundaries.h:
(WebCore::requiresContextForWordBoundary):
2013-09-03 Mark Lam <mark.lam@apple.com>
Converting StackIterator to a callback interface.
https://bugs.webkit.org/show_bug.cgi?id=120564.
Reviewed by Filip Pizlo.
No new tests.
* bindings/js/JSXMLHttpRequestCustom.cpp:
(WebCore::SendFunctor::SendFunctor):
(WebCore::SendFunctor::hasViableFrame):
(WebCore::SendFunctor::operator()):
(WebCore::JSXMLHttpRequest::send):
* bindings/js/ScriptCallStackFactory.cpp:
(WebCore::CreateScriptCallStackFunctor::CreateScriptCallStackFunctor):
(WebCore::CreateScriptCallStackFunctor::operator()):
(WebCore::createScriptCallStack):
(WebCore::CreateScriptCallStackForConsoleFunctor::CreateScriptCallStackForConsoleFunctor):
(WebCore::CreateScriptCallStackForConsoleFunctor::operator()):
2013-09-03 Oliver Hunt <oliver@apple.com>
Support structured clone of Map and Set
https://bugs.webkit.org/show_bug.cgi?id=120654
Reviewed by Simon Fraser.
Add support for cloning Map and Set. Fairly self explanatory change.
Needed to add Forwarding headers for the JSMap, JSSet and MapData classes.
* ForwardingHeaders/runtime/JSMap.h: Added.
* ForwardingHeaders/runtime/JSSet.h: Added.
* ForwardingHeaders/runtime/MapData.h: Added.
* bindings/js/SerializedScriptValue.cpp:
(WebCore::CloneSerializer::isMap):
(WebCore::CloneSerializer::isSet):
(WebCore::CloneSerializer::startSet):
(WebCore::CloneSerializer::startMap):
(WebCore::CloneSerializer::serialize):
(WebCore::CloneDeserializer::consumeMapDataTerminationIfPossible):
(WebCore::CloneDeserializer::deserialize):
2013-09-03 Bear Travis <betravis@adobe.com>
[CSS Shapes] Shape's content gets extra left offset when left-border is positive on the content box
https://bugs.webkit.org/show_bug.cgi?id=117573
Reviewed by David Hyatt.
Nested blocks need to take into account their offset from the shape-inside container.
The new code calculates the offset from the shape-inside container, then applies the
offset to the computed segments. The line must be moved down by the offset's height,
and each segment must be moved left by the offset's width.
Test: fast/shapes/shape-inside/shape-inside-offset-block-children.html
* rendering/RenderBlock.cpp:
(WebCore::RenderBlock::relayoutShapeDescendantIfMoved): Relayout a block child if its
new logical left would cause it to rest at a new position within a shape container.
(WebCore::RenderBlock::logicalOffsetFromShapeAncestorContainer): Calculate the logical
offset form a shape inside ancestor container.
(WebCore::RenderBlock::layoutBlockChild): Call relayoutShapeDescendantIfMoved with the
new position offset.
* rendering/RenderBlock.h:
* rendering/RenderBlockLineLayout.cpp:
(WebCore::RenderBlock::updateShapeAndSegmentsForCurrentLine): Use layout offset, rather
than just vertical offset.
(WebCore::RenderBlock::updateShapeAndSegmentsForCurrentLineInFlowThread): Ditto.
(WebCore::RenderBlock::layoutRunsAndFloatsInRange): Ditto.
* rendering/shapes/ShapeInsideInfo.h:
(WebCore::ShapeInsideInfo::computeSegmentsForLine): Shift segments logically left when
there is an inline offset.
2013-09-03 Antoine Quint <graouts@apple.com>
Web Inspector: exceptions triggered from console evaluation do not pause the debugger
https://bugs.webkit.org/show_bug.cgi?id=120460
Reviewed by Timothy Hatcher.
* inspector/InjectedScriptSource.js:
Explicitly set a sourceURL such that the frontend may identify injected script when
processing call frames in order to hide such code from the debugger.
2013-09-03 Andreas Kling <akling@apple.com>
Support Vector<Ref<T>>.
<https://webkit.org/b/120637>
Reviewed by Antti Koivisto.
Use Vector<Ref<T>> internally in Page.
* page/Page.cpp:
(WebCore::networkStateChanged):
(WebCore::Page::refreshPlugins):
Clean up these functions and use Vector<Ref<Frame>> to store pointers to frames
since we know they are not going to be null.
(WebCore::Page::pluginViews):
Changed this to return a Vector<Ref<PluginView>> by value instead of passing a
writable vector as an argument. Clean up loops with 'auto'.
(WebCore::Page::storageBlockingStateChanged):
(WebCore::Page::privateBrowsingStateChanged):
Tweaked for pluginViews() returning a Vector now.
(WebCore::Page::setVisibilityState):
Store Documents that need a visibilitychange event in a Vector<Ref<Document>>.
2013-08-28 Sergio Villar Senin <svillar@igalia.com>
[CSS Grid Layout] Add parsing for named grid lines
https://bugs.webkit.org/show_bug.cgi?id=119540
Reviewed by Andreas Kling.
From Blink r150381,r150587 by <jchaffraix@chromium.org>
Adds parsing support for named grid lines at <grid-line> level,
i.e., inside grid-{row|column}-{start|end}. This change covers
only the parsing, layout changes coming in a follow up patch.
* css/CSSComputedStyleDeclaration.cpp:
(WebCore::valueForGridPosition):
* css/CSSParser.cpp:
(WebCore::CSSParser::parseIntegerOrStringFromGridPosition):
(WebCore::CSSParser::parseGridPosition):
* css/CSSParser.h:
* css/StyleResolver.cpp:
(WebCore::createGridPosition):
* rendering/RenderGrid.cpp:
(WebCore::RenderGrid::resolveGridPositionFromStyle):
* rendering/style/GridPosition.h:
(WebCore::GridPosition::setExplicitPosition):
(WebCore::GridPosition::setSpanPosition):
(WebCore::GridPosition::integerPosition):
(WebCore::GridPosition::namedGridLine):
2013-09-03 Alexey Proskuryakov <ap@apple.com>
[Mac] Hyphenation respects regional format settings language instead of primary language
https://bugs.webkit.org/show_bug.cgi?id=120641
Reviewed by Dan Bernstein.
Fixes hyphenation tests on my machine with non-English regional format settings.
* platform/text/cf/HyphenationCF.cpp: (createValueForNullKey):
Use primary UI language for hyphenation, not regional settings language.
2013-09-03 Danilo Cesar Lemes de Paula <danilo.cesar@collabora.co.uk>
[GTK][EFL] include missing localized strings for subtitle auto track
https://bugs.webkit.org/show_bug.cgi?id=120629
those methods are necessary to show the "Auto" track on webkitgtk
Reviewed by Gustavo Noronha Silva.
* platform/efl/LocalizedStringsEfl.cpp:
(WebCore::textTrackAutomaticMenuItemText):
* platform/gtk/LocalizedStringsGtk.cpp:
(WebCore::textTrackAutomaticMenuItemText):
2013-09-03 Daniel Bates <dabates@apple.com>
Require layout when -webkit-overflow-scrolling changes
https://bugs.webkit.org/show_bug.cgi?id=120535
Reviewed by Darin Adler.
Test: fast/repaint/overflow-scroll-touch-repaint.html
We want to require a layout when the value of -webkit-overflow-scrolling changes
since -webkit-overflow-scrolling creates a stacking context.
* rendering/style/RenderStyle.cpp:
(WebCore::RenderStyle::changeRequiresLayout):
2013-09-02 Ryosuke Niwa <rniwa@webkit.org>
Support the "json" responseType and JSON response entity in XHR
https://bugs.webkit.org/show_bug.cgi?id=73648
Reviewed by Oliver Hunt.
Based on the patch written by Jarred Nicholls.
Implement 'json' type for XMLHttpRequest.response. We cache the result on JSC side as a cached attribute
unlike other response types like 'document' and 'blob' for which the parsed response object is cached
in XMLHttpRequest itself. In the long run, we should do the same for other types of response types.
Also refactored the various code to share the code.
Tests: fast/xmlhttprequest/xmlhttprequest-responsetype-json-invalid.html
fast/xmlhttprequest/xmlhttprequest-responsetype-json-utf16.html
fast/xmlhttprequest/xmlhttprequest-responsetype-json-valid.html
* ForwardingHeaders/runtime/JSONObject.h: Added.
* bindings/js/JSXMLHttpRequestCustom.cpp:
(WebCore::JSXMLHttpRequest::visitChildren):
(WebCore::JSXMLHttpRequest::response): Use JSONParse to parse the response text and cache the result.
Call didCacheResponseJSON to set the cache status and clear the original response buffer.
* xml/XMLHttpRequest.cpp:
(WebCore::XMLHttpRequest::XMLHttpRequest): Added m_responseCacheIsValid to invalidate the cache of
a json response.
(WebCore::XMLHttpRequest::responseText):
(WebCore::XMLHttpRequest::didCacheResponseJSON): Added; Updates m_responseCacheIsValid and clears the
response buffer to save memory.
(WebCore::XMLHttpRequest::responseXML):
(WebCore::XMLHttpRequest::setResponseType):
(WebCore::XMLHttpRequest::responseType):
(WebCore::XMLHttpRequest::clearResponseBuffers):
(WebCore::XMLHttpRequest::didReceiveData):
* xml/XMLHttpRequest.h:
(WebCore::XMLHttpRequest::doneWithoutErrors): Extracted from responseXML.
(WebCore::XMLHttpRequest::responseTextIgnoringResponseType): Extracted from responseText.
(WebCore::XMLHttpRequest::responseCacheIsValid): Added.
(WebCore::XMLHttpRequest::shouldDecodeResponse): Extracted from didReceiveData.
Also modified to decode when the response type is ResponseTypeJSON.
* xml/XMLHttpRequest.idl: Added CachedAttribute IDL extention on response property. This cache is
used when the response type is 'json'.
2013-09-03 Commit Queue <commit-queue@webkit.org>
Unreviewed, rolling out r154881.
http://trac.webkit.org/changeset/154881
https://bugs.webkit.org/show_bug.cgi?id=120643
Crashes on macworld.com (Requested by kling on #webkit).
* dom/Element.cpp:
(WebCore::Element::setAttributeInternal):
2013-09-03 Andre Moreira Magalhaes <andre.magalhaes@collabora.co.uk>
[GStreamer] Don't set state to NULL until element is destroyed
https://bugs.webkit.org/show_bug.cgi?id=117354
Reviewed by Philippe Normand.
Don't set playbin to NULL until it is going to be destroyed or if we stay
for too long on the READY state. Instead only set the state to READY as this
allows much faster state changes to PAUSED/PLAYING again. playbin internally
caches some state that is destroyed when setting it to NULL.
This state is independent of the URI and it is even possible to change the
URI in READY state.
To avoid having resources (e.g. audio devices) open indefinitely,
when setting the state to READY we create a timeout and if the timeout
is reached we reset the pipeline state to NULL to free resources.
Also now all state changes use the changePipelineState method instead of setting
the playbin state directly with gst_element_set_state, so we have a better control
of when we are requesting state changes.
* platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:
(WebCore::mediaPlayerPrivateReadyStateTimeoutCallback):
(WebCore::MediaPlayerPrivateGStreamer::MediaPlayerPrivateGStreamer):
(WebCore::MediaPlayerPrivateGStreamer::~MediaPlayerPrivateGStreamer):
(WebCore::MediaPlayerPrivateGStreamer::commitLoad):
(WebCore::MediaPlayerPrivateGStreamer::changePipelineState):
(WebCore::MediaPlayerPrivateGStreamer::setRate):
(WebCore::MediaPlayerPrivateGStreamer::handlePluginInstallerResult):
* platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.h:
2013-09-03 peavo@outlook.com <peavo@outlook.com>
[WinCairo] Unneeded code in method GlyphPage::fill().
https://bugs.webkit.org/show_bug.cgi?id=120634
Reviewed by Andreas Kling.
* platform/graphics/win/GlyphPageTreeNodeCairoWin.cpp:
(WebCore::GlyphPage::fill): Remove unneeded call to GetTextMetrics() function.
2013-09-03 Mihnea Ovidenie <mihnea@adobe.com>
[CSSRegions] Pseudo-elements as regions should not be exposed to JS
https://bugs.webkit.org/show_bug.cgi?id=120633
Reviewed by Andreas Kling.
Until we properly implement the Region interface (http://dev.w3.org/csswg/css-regions/#the-region-interface)
for pseudo-elements, we should not return these as regions in JS.
Tests: fast/regions/get-regions-by-content-pseudo.html
fast/regions/webkit-named-flow-get-regions-pseudo.html
* dom/WebKitNamedFlow.cpp:
(WebCore::WebKitNamedFlow::firstEmptyRegionIndex): Skip pseudo-elements as regions here too,
otherwise we may get an index that cannot be used with getRegions().
(WebCore::WebKitNamedFlow::getRegionsByContent):
(WebCore::WebKitNamedFlow::getRegions):
2013-09-03 Zan Dobersek <zdobersek@igalia.com>
REGRESSION(r154967): http appcache tests crashing on WK1
https://bugs.webkit.org/show_bug.cgi?id=120620
Reviewed by Andreas Kling.
* loader/appcache/ApplicationCacheGroup.cpp:
(WebCore::ApplicationCacheGroup::cacheDestroyed): Reintroduce pre-r154967 behavior that returned early in
this method if the passed-in ApplicationCache object was not found in the ApplicationCacheGroup's HashSet
of all the caches. This is now done by checking that the HashSet<T>::remove(T) returns true (meaning the
object was found in the HashSet and removed from it) in addition to that HashSet being subsequently empty
before the method moves on to destroying its ApplicationCacheGroup instance.
2013-09-03 Andre Moreira Magalhaes <andre.magalhaes@collabora.co.uk>
[gstreamer] Disable HTTP request "Accept-Encoding:" header field on gstreamer source element to avoid receiving the wrong size when retrieving data
https://bugs.webkit.org/show_bug.cgi?id=115354
Reviewed by Philippe Normand.
Also disable Accept-Encoding on ResourceRequest::toSoupMessage accordingly.
* platform/network/soup/ResourceRequestSoup.cpp:
(WebCore::ResourceRequest::toSoupMessage):
Call ResourceRequest::updateSoupMessage from ResourceRequest::toSoupMessage so that the
Accept-Encoding header is also respected.
2013-09-03 Krzysztof Czech <k.czech@samsung.com>
[AX][ATK] Added support for sort and help attributes.
https://bugs.webkit.org/show_bug.cgi?id=120456
Reviewed by Chris Fleizach.
Added support for aria-sort and aria-help attributes.
Test: accessibility/aria-sort.html
* accessibility/atk/WebKitAccessibleWrapperAtk.cpp:
(webkitAccessibleGetAttributes):
2013-09-03 Allan Sandfeld Jensen <allan.jensen@digia.com>
[Qt] Remove dead code for QtXmlPatterns
https://bugs.webkit.org/show_bug.cgi?id=120624
Reviewed by Simon Hausmann.
Remove code supporting XSLT using QtXmlPatterns which has been
dead for some time.
* Target.pri:
* WebCore.pri:
* dom/TransformSourceQt.cpp: Removed.
* xml/XSLStyleSheetQt.cpp: Removed.
* xml/XSLTProcessorQt.cpp: Removed.
* xml/parser/XMLDocumentParserQt.cpp:
(WebCore::XMLDocumentParser::doEnd):
(WebCore::XMLDocumentParser::parseProcessingInstruction):
2013-09-03 Mihnea Ovidenie <mihnea@adobe.com>
[CSS Regions] position: fixed is computed relative to the first region, not the viewport
https://bugs.webkit.org/show_bug.cgi?id=111176
Reviewed by David Hyatt.
Fixed positioned elements inside a named flow should be positioned and sized relative to the viewport,
not on the first region, as described in the spec: http://dev.w3.org/csswg/css-regions/#the-flow-into-property.
While the flow thread will still act as containing block for the fixed positioned elements, the painting and hit
testing for the fixed positioned elements is done by RenderView. The layers for the fixed positioned elements
are collected by the flow thread.
Tests: fast/regions/element-in-named-flow-absolute-from-fixed.html
fast/regions/element-in-named-flow-fixed-from-absolute.html
fast/regions/element-inflow-fixed-from-outflow-static.html
fast/regions/element-outflow-static-from-inflow-fixed.html
fast/regions/fixed-element-transformed-parent.html
fast/regions/fixed-in-named-flow-scroll.html
fast/regions/fixed-inside-fixed-in-named-flow.html
fast/regions/fixed-inside-named-flow-zIndex.html
fast/regions/fixed-pos-elem-in-namedflow-noregions.html
fast/regions/fixed-pos-region-in-nested-flow.html
* rendering/FlowThreadController.cpp:
(WebCore::FlowThreadController::collectFixedPositionedLayers):
Return the list of layers for the fixed positioned elements with named flows as containing blocks.
Used in RenderLayer:: paintFixedLayersInNamedFlows and RenderLayer:: hitTestFixedLayersInNamedFlows.
* rendering/FlowThreadController.h:
* rendering/RenderBox.cpp:
(WebCore::RenderBox::mapLocalToContainer):
(WebCore::RenderBox::containingBlockLogicalWidthForPositioned):
(WebCore::RenderBox::containingBlockLogicalHeightForPositioned):
For fixed positioned elements, width and height are given by the view instead of the first region.
* rendering/RenderLayer.cpp:
(WebCore::accumulateOffsetTowardsAncestor):
Modified for the fixed positioned elements inside named flows with the named flows as containing block
to take into account the view scroll.
(WebCore::compareZIndex):
Moved upwards because it is used in RenderLayer::paintFixedLayersInNamedFlows.
(WebCore::RenderLayer::paintFixedLayersInNamedFlows):
Paint the list of fixed layers directly from the RenderView instead of painting them through regions -> named flows.
(WebCore::RenderLayer::paintLayerContents):
(WebCore::RenderLayer::paintList):
(WebCore::RenderLayer::hitTestFixedLayersInNamedFlows):
Hit test the layers for the fix positioned elements inside named flows from the RenderView layer
instead of the region -> named flow layer.
(WebCore::RenderLayer::hitTestLayer):
(WebCore::RenderLayer::calculateRects):
* rendering/RenderLayer.h:
* rendering/RenderLayerCompositor.cpp:
(WebCore::RenderLayerCompositor::updateLayerTreeGeometry):
We do not support yet the accelerated compositing for elements in named flows,
so bail out early here. We need to revisit fixed elements once we finish accelerated compositing for elements in named flows.
* rendering/RenderObject.cpp:
(WebCore::RenderObject::fixedPositionedWithNamedFlowContainingBlock):
(WebCore::hasFixedPosInNamedFlowContainingBlock):
(WebCore::RenderObject::containerForRepaint):
Changed to take into account that RenderView should be the repaintContainer for the
fixed positioned elements with named flow as the containing block.
* rendering/RenderObject.h:
2013-09-03 Arvid Nilsson <anilsson@rim.com>
[BlackBerry] Remove LayerData::LayerProgram
https://bugs.webkit.org/show_bug.cgi?id=120601
Reviewed by Anders Carlsson.
JIRA 490672
All layer contents are RGBA now, so there's no need to support BGRA any
more and the LayerData::LayerProgram enum can be removed. Related dead
code was removed.
No new tests, no change in behavior.
* platform/graphics/blackberry/EGLImageLayerWebKitThread.cpp:
(WebCore::EGLImageLayerWebKitThread::EGLImageLayerWebKitThread):
* platform/graphics/blackberry/LayerData.h:
(WebCore::LayerData::LayerData):
* platform/graphics/blackberry/LayerRenderer.cpp:
(WebCore::LayerRenderer::compositeLayersRecursive):
(WebCore::LayerRenderer::createProgram):
* platform/graphics/blackberry/LayerRenderer.h:
* platform/graphics/blackberry/LayerWebKitThread.h:
* platform/graphics/blackberry/PluginLayerWebKitThread.cpp:
(WebCore::PluginLayerWebKitThread::setPluginView):
2013-09-03 Xabier Rodriguez Calvar <calvaris@igalia.com>
[GStreamer] Video player sets system volume to 100%
https://bugs.webkit.org/show_bug.cgi?id=118974
Reviewed by Philippe Normand.
In order to preserve the system volume we need to keep track of
the volume being initialized in the HTMLMediaElement and then just
setting the volume to the sink when initializing the pipeline if
that volume was changed before.
* html/HTMLMediaElement.cpp:
(WebCore::HTMLMediaElement::HTMLMediaElement): Initialized
attribute to false.
(WebCore::HTMLMediaElement::setVolume): Set the attribute to true
when volume is changed.
(WebCore::HTMLMediaElement::updateVolume): Set the volume only if
volume was initialized.
(WebCore::HTMLMediaElement::mediaPlayerPlatformVolumeConfigurationRequired):
Platform volume configuration is required only if volume was not
initialized before.
* html/HTMLMediaElement.h: Added attribute and interface method.
* platform/graphics/MediaPlayer.h:
(WebCore::MediaPlayerClient::mediaPlayerPlatformVolumeConfigurationRequired):
Declared and added default implementation for the interface method.
(WebCore::MediaPlayer::platformVolumeConfigurationRequired):
Asked the client, meaning the HTMLMediaElement if the platform
volume configuration is required.
* platform/graphics/gstreamer/MediaPlayerPrivateGStreamerBase.cpp:
(WebCore::mediaPlayerPrivateVolumeChangedCallback): Added log.
(WebCore::MediaPlayerPrivateGStreamerBase::setVolume): Added log.
(WebCore::MediaPlayerPrivateGStreamerBase::setStreamVolumeElement):
Set the volume only if not platform volume is required and added log.
2013-09-02 Darin Adler <darin@apple.com>
* inspector/InspectorProfilerAgent.cpp:
(WebCore::InspectorProfilerAgent::removeProfile): Fix braces here; a review
comment I forgot to address in my last check-in.
2013-09-02 Darin Adler <darin@apple.com>
Cut down on double hashing and code needlessly using hash table iterators
https://bugs.webkit.org/show_bug.cgi?id=120611
Reviewed by Andreas Kling.
Some of these changes are primarily code cleanup, but others could provide
a small code size and speed improvement by avoiding extra hashing.
* Modules/geolocation/Geolocation.cpp:
(WebCore::Geolocation::Watchers::find): Use get instead of find.
(WebCore::Geolocation::Watchers::remove): Use take instead of find.
(WebCore::Geolocation::makeCachedPositionCallbacks): Use the return
value from remove to avoid hashing twice.
* Modules/webaudio/AudioContext.cpp:
(WebCore::AudioContext::addAutomaticPullNode): Use the return value from
add to avoid hashing twice.
(WebCore::AudioContext::removeAutomaticPullNode): Use the return value
from remove to avoid hashing twice.
* Modules/webaudio/AudioNodeInput.cpp:
(WebCore::AudioNodeInput::connect): Use the return value from add to avoid
hashing twice.
(WebCore::AudioNodeInput::disconnect): Use the return value from remove
to avoid hashing twice.
* Modules/webaudio/AudioParam.cpp:
(WebCore::AudioParam::connect): Use the return value from add to avoid
hashing twice.
(WebCore::AudioParam::disconnect): Use the return value from remove to
avoid hashing twice.
* bridge/NP_jsobject.cpp:
(ObjectMap::remove): Use remove instead of find/remove.
* dom/Node.cpp:
(WebCore::Node::~Node): Use the return value from remove instead of
find/remove.
* inspector/InspectorProfilerAgent.cpp:
(WebCore::InspectorProfilerAgent::removeProfile): Remove needless
calls to contains.
* loader/DocumentLoader.cpp:
(WebCore::DocumentLoader::removeSubresourceLoader): Use the return
value from remove instead of find/remove.
* loader/ResourceLoadScheduler.cpp:
(WebCore::ResourceLoadScheduler::HostInformation::remove): Use the
return value from remove to avoid hashing twice.
* loader/appcache/ApplicationCacheGroup.cpp:
(WebCore::ApplicationCacheGroup::disassociateDocumentLoader): Use
remove instead of find/remove.
(WebCore::ApplicationCacheGroup::cacheDestroyed): Removed a needless
call to contains to avoid hashing twice. It's fine to do the check
for an empty hash table unconditionally.
* page/DOMWindow.cpp:
(WebCore::addUnloadEventListener): Eliminated a local variable for clarity.
(WebCore::removeUnloadEventListener): Ditto. Also use remove instead
of find/remove.
(WebCore::removeAllUnloadEventListeners): Ditto. Also use removeAll instead
of find/removeAll.
(WebCore::addBeforeUnloadEventListener): Ditto.
(WebCore::removeBeforeUnloadEventListener): Ditto.
(WebCore::removeAllBeforeUnloadEventListeners): Ditto.
* page/FrameView.cpp:
(WebCore::FrameView::removeViewportConstrainedObject): Use the return
value from remove to avoid hashing twice.
(WebCore::FrameView::removeScrollableArea): Use the return value from
remove instead of find/remove.
(WebCore::FrameView::containsScrollableArea): Use && instead of an if
statement in a way that is idiomatic for this kind of function.
* page/Page.cpp:
(WebCore::Page::addRelevantRepaintedObject): Use the return value from
remove instead of find/remove.
* page/PageGroup.cpp:
(WebCore::PageGroup::removeUserScriptsFromWorld): Use remove instead
of find/remove.
(WebCore::PageGroup::removeUserStyleSheetsFromWorld): Use the return
value from remove instead of find/remove.
* page/PerformanceUserTiming.cpp:
(WebCore::clearPeformanceEntries): Removed a needless call to contains.
* platform/graphics/DisplayRefreshMonitor.cpp:
(WebCore::DisplayRefreshMonitor::removeClient): Use the return value
from remove instead of find/remove.
(WebCore::DisplayRefreshMonitorManager::displayDidRefresh): Use remove
instead of find/remove.
* platform/graphics/blackberry/LayerRenderer.cpp:
(WebCore::LayerRenderer::removeLayer): Use the return value from remove
instead of find/remove.
* platform/win/WindowMessageBroadcaster.cpp:
(WebCore::WindowMessageBroadcaster::removeListener): Use remove instead
of find/remove. It's fine to do the check for an empty hash table unconditionally.
* plugins/PluginDatabase.cpp:
(WebCore::PluginDatabase::removeDisabledPluginFile): Use the return value
from remove instead of find/remove.
* rendering/style/StyleCustomFilterProgramCache.cpp:
(WebCore::StyleCustomFilterProgramCache::lookup): Use get instead of find.
(WebCore::StyleCustomFilterProgramCache::add): Use contains instead of find
in an assertion.
(WebCore::StyleCustomFilterProgramCache::remove): Use remove instead of
find/remove.
* svg/SVGCursorElement.cpp:
(WebCore::SVGCursorElement::removeClient): Use the return value from remove
instead of find/remove.
* svg/SVGDocumentExtensions.cpp:
(WebCore::SVGDocumentExtensions::removeResource): Removed an unneeded call
to contains.
(WebCore::SVGDocumentExtensions::removeAllTargetReferencesForElement): Use
remove instead of find/remove. It's fine to do the check for an empty hash
table unconditionally.
(WebCore::SVGDocumentExtensions::removeAllElementReferencesForTarget): Use
remove instead of find/remove. Also removed unhelpful assertions. One is
already done by HashMap, and the other is just checking a basic invariant
of every HashMap that doesn't need to be checked.
* svg/graphics/SVGImageCache.cpp:
(WebCore::SVGImageCache::removeClientFromCache): Removed an unneeded call
to contains.
* svg/properties/SVGAnimatedProperty.cpp:
(WebCore::SVGAnimatedProperty::~SVGAnimatedProperty): Use the version of
remove that takes an iterator rather than the one that takes a key, so
we don't need to redo the hashing.
2013-09-02 Andreas Kling <akling@apple.com>
Generate isFooElement() functions from tagname data.
<https://webkit.org/b/120584>
Reviewed by Antti Koivisto.
Add a "generateTypeChecks" attribute that can be used in HTMLTagNames.in & friends.
If present, isFooElement() style helpers will be added to HTMLElementTypeChecks.h.
This also outputs an isElementOfType<T> check for the Element iterators.
Removed all the hand-written isFooElement() functions that only checked tag name.
* html/HTMLTagNames.in:
* svg/svgtags.in:
Added "generateTypeChecks" attribute as appropriate.
* GNUmakefile.am:
* GNUmakefile.list.am:
* WebCore.vcxproj/WebCore.vcxproj:
* WebCore.xcodeproj/project.pbxproj:
Added to build systems based on how HTMLNames.h was done.
We're just outputting an additional header file in the generated code directory
so I suspect most ports will just pick this up automagically.
* dom/make_names.pl:
(defaultTagPropertyHash):
(printLicenseHeader):
(printTypeChecks):
(printTypeChecksHeaderFile):
Generate a separate file for each namespace with isFooElement() helpers for
elements with "generateTypeChecks" attribute set.
2013-09-02 Darin Adler <darin@apple.com>
[Mac] No need for HardAutorelease, which is same as CFBridgingRelease
https://bugs.webkit.org/show_bug.cgi?id=120569
Reviewed by Andy Estes.
* accessibility/mac/WebAccessibilityObjectWrapperMac.mm:
(AXTextMarkerRange):
(AXTextMarkerRangeStart):
(AXTextMarkerRangeEnd):
(textMarkerForVisiblePosition):
Use CFBridgingRelease.
* platform/mac/KURLMac.mm:
(WebCore::KURL::operator NSURL *): Use CFBridgingRelease.
(WebCore::KURL::createCFURL): Get rid of needless local variable.
* platform/mac/WebCoreNSURLExtras.mm:
(WebCore::mapHostNameWithRange):
(WebCore::URLWithData):
(WebCore::userVisibleString):
* platform/text/mac/StringImplMac.mm:
(WTF::StringImpl::operator NSString *):
Use CFBridgingRelease.
2013-09-01 Andreas Kling <akling@apple.com>
Ref: A smart pointer for the reference age.
<https://webkit.org/b/120570>
Reviewed by Antti Koivisto.
Use Ref<T> for various stack guards where null checking isn't needed.
2013-09-02 Andreas Kling <akling@apple.com>
Simplify DocumentType handling.
<https://webkit.org/b/120529>
Reviewed by Antti Koivisto.
Removed the insertedInto()/removedFrom() handlers from DocumentType.
Document no longer keeps a pointer to its doctype node, it was only used for the
document.doctype DOM API, which now just looks through the list of (<=2) children.
The ENABLE(LEGACY_VIEWPORT_ADAPTION) hunk from Document::setDocType() was moved
into Document::childrenChanged().
We no longer clear the style resolver on doctype insertion/removal since it
doesn't actually affect style anyway.
Also made doctype() return a PassRefPtr<DocumentType> instead of a raw pointer.
* dom/Document.cpp:
(WebCore::Document::dispose):
(WebCore::Document::doctype):
(WebCore::Document::childrenChanged):
* dom/Document.h:
* dom/DocumentType.cpp:
* dom/DocumentType.h:
* editing/markup.cpp:
(WebCore::documentTypeString):
2013-09-02 Anton Obzhirov <a.obzhirov@samsung.com>
<https://webkit.org/b/98350> [GTK] accessibility/aria-invalid.html times out
Reviewed by Mario Sanchez Prada.
The patch exposes aria-invalid attribute to ATK.
* accessibility/atk/AXObjectCacheAtk.cpp:
(WebCore::AXObjectCache::postPlatformNotification):
Added emitting state-change signal for aria-invalid event.
* accessibility/atk/WebKitAccessibleWrapperAtk.cpp:
(webkitAccessibleGetAttributes):
Added aria-invalid attribute.
2013-09-02 Commit Queue <commit-queue@webkit.org>
Unreviewed, rolling out r154955.
http://trac.webkit.org/changeset/154955
https://bugs.webkit.org/show_bug.cgi?id=120605
broke xcode4 build :| (Requested by kling on #webkit).
* GNUmakefile.am:
* GNUmakefile.list.am:
* WebCore.vcxproj/WebCore.vcxproj:
* WebCore.xcodeproj/project.pbxproj:
* dom/make_names.pl:
(defaultTagPropertyHash):
(printLicenseHeader):
* html/HTMLAnchorElement.h:
(WebCore::isHTMLAnchorElement):
(WebCore::HTMLAnchorElement):
* html/HTMLAreaElement.h:
(WebCore::isHTMLAreaElement):
(WebCore::HTMLAreaElement):
* html/HTMLAudioElement.h:
(WebCore::isHTMLAudioElement):
* html/HTMLBaseElement.h:
(WebCore::isHTMLBaseElement):
(WebCore::HTMLBaseElement):
* html/HTMLCanvasElement.h:
(WebCore::isHTMLCanvasElement):
* html/HTMLElement.h:
* html/HTMLFieldSetElement.h:
(WebCore::isHTMLFieldSetElement):
(WebCore::HTMLFieldSetElement):
* html/HTMLFormElement.h:
(WebCore::isHTMLFormElement):
* html/HTMLFrameSetElement.h:
(WebCore::isHTMLFrameSetElement):
(WebCore::HTMLFrameSetElement):
* html/HTMLImageElement.h:
(WebCore::isHTMLImageElement):
* html/HTMLInputElement.h:
(WebCore::isHTMLInputElement):
* html/HTMLLabelElement.h:
(WebCore::isHTMLLabelElement):
(WebCore::HTMLLabelElement):
* html/HTMLLegendElement.h:
(WebCore::isHTMLLegendElement):
(WebCore::HTMLLegendElement):
* html/HTMLMapElement.h:
(WebCore::isHTMLMapElement):
* html/HTMLMeterElement.h:
(WebCore::isHTMLMeterElement):
* html/HTMLOptGroupElement.h:
(WebCore::isHTMLOptGroupElement):
* html/HTMLOptionElement.h:
(WebCore::isHTMLOptionElement):
* html/HTMLParamElement.h:
(WebCore::isHTMLParamElement):
(WebCore::HTMLParamElement):
* html/HTMLProgressElement.h:
(WebCore::isHTMLProgressElement):
* html/HTMLScriptElement.h:
(WebCore::isHTMLScriptElement):
* html/HTMLSourceElement.h:
(WebCore::isHTMLSourceElement):
(WebCore::HTMLSourceElement):
* html/HTMLStyleElement.h:
(WebCore::isHTMLStyleElement):
(WebCore::HTMLStyleElement):
* html/HTMLTableElement.h:
(WebCore::isHTMLTableElement):
* html/HTMLTableRowElement.h:
(WebCore::isHTMLTableRowElement):
(WebCore::HTMLTableRowElement):
* html/HTMLTagNames.in:
* html/HTMLTextAreaElement.h:
(WebCore::isHTMLTextAreaElement):
* html/HTMLTitleElement.h:
(WebCore::isHTMLTitleElement):
(WebCore::HTMLTitleElement):
* html/HTMLTrackElement.h:
(WebCore::isHTMLTrackElement):
(WebCore::HTMLTrackElement):
* svg/SVGElement.h:
* svg/SVGFontElement.h:
(WebCore::isSVGFontElement):
* svg/SVGFontFaceElement.h:
(WebCore::isSVGFontFaceElement):
(WebCore::SVGFontFaceElement):
* svg/SVGForeignObjectElement.h:
(WebCore::isSVGForeignObjectElement):
(WebCore::SVGForeignObjectElement):
* svg/SVGImageElement.h:
(WebCore::isSVGImageElement):
* svg/SVGScriptElement.h:
(WebCore::isSVGScriptElement):
* svg/svgtags.in:
2013-09-02 Antti Koivisto <antti@apple.com>
Clean up ContainerNode::childrenChanged
https://bugs.webkit.org/show_bug.cgi?id=120599
Reviewed by Andreas Kling.
- Make childrenChanged take a single struct argument instead of a long list of arguments.
- Use enum instead of childCountDelta. It was always -1, 0, 1 or the total number of children (in case of removing them all).
- Remove use of Node*, give the change range as Elements.
- Related cleanups.
* dom/Attr.cpp:
(WebCore::Attr::childrenChanged):
* dom/Attr.h:
* dom/CharacterData.cpp:
(WebCore::CharacterData::parserAppendData):
(WebCore::CharacterData::dispatchModifiedEvent):
* dom/ContainerNode.cpp:
(WebCore::ContainerNode::insertBefore):
(WebCore::ContainerNode::notifyChildInserted):
(WebCore::ContainerNode::notifyChildRemoved):
Add private helpers for setting up the struct.
(WebCore::ContainerNode::parserInsertBefore):
(WebCore::ContainerNode::replaceChild):
(WebCore::ContainerNode::removeChild):
(WebCore::ContainerNode::parserRemoveChild):
(WebCore::ContainerNode::removeChildren):
(WebCore::ContainerNode::appendChild):
(WebCore::ContainerNode::parserAppendChild):
(WebCore::ContainerNode::childrenChanged):
(WebCore::ContainerNode::updateTreeAfterInsertion):
* dom/ContainerNode.h:
* dom/Document.cpp:
(WebCore::Document::childrenChanged):
* dom/Document.h:
* dom/Element.cpp:
(WebCore::checkForSiblingStyleChanges):
Clean up and simplify. Since we now get element range automatically we don't need to compute it.
(WebCore::Element::childrenChanged):
(WebCore::Element::finishParsingChildren):
* dom/Element.h:
* dom/ShadowRoot.cpp:
(WebCore::ShadowRoot::childrenChanged):
* dom/ShadowRoot.h:
* html/HTMLElement.cpp:
(WebCore::HTMLElement::childrenChanged):
(WebCore::HTMLElement::adjustDirectionalityIfNeededAfterChildrenChanged):
Try to keep the existing behavior. This code needs more cleanup to be sane. It shouldn't operate on Nodes
as it only really cares about Elements.
* html/HTMLElement.h:
* html/HTMLFieldSetElement.cpp:
(WebCore::HTMLFieldSetElement::childrenChanged):
* html/HTMLFieldSetElement.h:
* html/HTMLObjectElement.cpp:
(WebCore::HTMLObjectElement::childrenChanged):
* html/HTMLObjectElement.h:
* html/HTMLOptGroupElement.cpp:
(WebCore::HTMLOptGroupElement::childrenChanged):
* html/HTMLOptGroupElement.h:
* html/HTMLOptionElement.cpp:
(WebCore::HTMLOptionElement::childrenChanged):
* html/HTMLOptionElement.h:
* html/HTMLOutputElement.cpp:
(WebCore::HTMLOutputElement::childrenChanged):
* html/HTMLOutputElement.h:
* html/HTMLScriptElement.cpp:
(WebCore::HTMLScriptElement::childrenChanged):
* html/HTMLScriptElement.h:
* html/HTMLSelectElement.cpp:
(WebCore::HTMLSelectElement::childrenChanged):
* html/HTMLSelectElement.h:
* html/HTMLStyleElement.cpp:
(WebCore::HTMLStyleElement::childrenChanged):
* html/HTMLStyleElement.h:
* html/HTMLTextAreaElement.cpp:
(WebCore::HTMLTextAreaElement::childrenChanged):
* html/HTMLTextAreaElement.h:
* html/HTMLTitleElement.cpp:
(WebCore::HTMLTitleElement::childrenChanged):
* html/HTMLTitleElement.h:
* html/shadow/InsertionPoint.cpp:
(WebCore::InsertionPoint::childrenChanged):
* html/shadow/InsertionPoint.h:
* svg/SVGClipPathElement.cpp:
(WebCore::SVGClipPathElement::childrenChanged):
* svg/SVGClipPathElement.h:
* svg/SVGElement.cpp:
(WebCore::SVGElement::childrenChanged):
* svg/SVGElement.h:
* svg/SVGFELightElement.cpp:
(WebCore::SVGFELightElement::childrenChanged):
* svg/SVGFELightElement.h:
* svg/SVGFilterElement.cpp:
(WebCore::SVGFilterElement::childrenChanged):
* svg/SVGFilterElement.h:
* svg/SVGFilterPrimitiveStandardAttributes.cpp:
(WebCore::SVGFilterPrimitiveStandardAttributes::childrenChanged):
* svg/SVGFilterPrimitiveStandardAttributes.h:
* svg/SVGFontFaceElement.cpp:
(WebCore::SVGFontFaceElement::childrenChanged):
* svg/SVGFontFaceElement.h:
* svg/SVGFontFaceFormatElement.cpp:
(WebCore::SVGFontFaceFormatElement::childrenChanged):
* svg/SVGFontFaceFormatElement.h:
* svg/SVGFontFaceSrcElement.cpp:
(WebCore::SVGFontFaceSrcElement::childrenChanged):
* svg/SVGFontFaceSrcElement.h:
* svg/SVGFontFaceUriElement.cpp:
(WebCore::SVGFontFaceUriElement::childrenChanged):
* svg/SVGFontFaceUriElement.h:
* svg/SVGGradientElement.cpp:
(WebCore::SVGGradientElement::childrenChanged):
* svg/SVGGradientElement.h:
* svg/SVGMarkerElement.cpp:
(WebCore::SVGMarkerElement::childrenChanged):
* svg/SVGMarkerElement.h:
* svg/SVGMaskElement.cpp:
(WebCore::SVGMaskElement::childrenChanged):
* svg/SVGMaskElement.h:
* svg/SVGPatternElement.cpp:
(WebCore::SVGPatternElement::childrenChanged):
* svg/SVGPatternElement.h:
* svg/SVGScriptElement.cpp:
(WebCore::SVGScriptElement::childrenChanged):
* svg/SVGScriptElement.h:
* svg/SVGStyleElement.cpp:
(WebCore::SVGStyleElement::childrenChanged):
* svg/SVGStyleElement.h:
* svg/SVGTitleElement.cpp:
(WebCore::SVGTitleElement::childrenChanged):
* svg/SVGTitleElement.h:
2013-09-02 Andreas Kling <akling@apple.com>
Generate isFooElement() functions from tagname data.
<https://webkit.org/b/120584>
Reviewed by Antti Koivisto.
Add a "generateTypeChecks" attribute that can be used in HTMLTagNames.in & friends.
If present, isFooElement() style helpers will be added to HTMLElementTypeChecks.h.
This also outputs an isElementOfType<T> check for the Element iterators.
Removed all the hand-written isFooElement() functions that only checked tag name.
* html/HTMLTagNames.in:
* svg/svgtags.in:
Added "generateTypeChecks" attribute as appropriate.
* GNUmakefile.am:
* GNUmakefile.list.am:
* WebCore.vcxproj/WebCore.vcxproj:
* WebCore.xcodeproj/project.pbxproj:
Added to build systems based on how HTMLNames.h was done.
We're just outputting an additional header file in the generated code directory
so I suspect most ports will just pick this up automagically.
* dom/make_names.pl:
(defaultTagPropertyHash):
(printLicenseHeader):
(printTypeChecks):
(printTypeChecksHeaderFile):
Generate a separate file for each namespace with isFooElement() helpers for
elements with "generateTypeChecks" attribute set.
2013-09-02 Dirk Schulze <krit@webkit.org>
Use edgeMode=duplicate for blurring on filter() function
https://bugs.webkit.org/show_bug.cgi?id=120590
Reviewed by Antti Koivisto.
Filters on the CSS Image function filter() are not allowed to extend the
dimension of the input image. This causes weird results on blurring an image,
where the fading on the edges is clipped at the half of the fading.
We shouldn't fade edges at all and use the edgeMode=duplicate instead.
This will duplicate the pixel value on the nearest edge of the input image
instead of taking transparent black and results in nice blurred images with
sharp edges.
Spec: http://dev.w3.org/fxtf/filters/#blurEquivalent
Test: fast/filter-image/filter-image-blur.html
* css/CSSFilterImageValue.cpp: Pass consumer information to the renderer.
(WebCore::CSSFilterImageValue::image):
* rendering/FilterEffectRenderer.cpp: Set edgeMode for feGaussianBlur to
'duplicate' or 'none' depending on the consumer.
(WebCore::FilterEffectRenderer::build):
* rendering/FilterEffectRenderer.h: Add enumeration to differ between the
different consumers of the renderer.
* rendering/RenderLayer.cpp:
(WebCore::RenderLayer::updateOrRemoveFilterEffectRenderer): Pass consumer
information to the renderer.
2013-09-01 Dirk Schulze <krit@webkit.org>
Add 'edgeMode' attribute to SVGFEGaussianBlur
https://bugs.webkit.org/show_bug.cgi?id=120582
Add 'edgeMode' attribute to the SVGFEGaussianBlur element. This attribute
allows users to define the behavior on edges with the values 'none' where
pixel values outside the input image are treated as transparent black. (The
current blurring behavior.) 'duplicate' which repeats the values on the
nearest edge and 'warp', which takes the pixel of the opposite site of
the input image.
Beside the attribute, this patch implements the behavior of 'duplicate'.
http://dev.w3.org/fxtf/filters/#feGaussianBlurEdgeModeAttribute
Reviewed by Rob Buis.
Tests: svg/dynamic-updates/SVGFEGaussianBlurElement-dom-edgeMode-attr.html
svg/dynamic-updates/SVGFEGaussianBlurElement-svgdom-edgeMode-prop.html
svg/filters/svg-gaussianblur-edgeMode-duplicate-expected.svg
svg/filters/svg-gaussianblur-edgeMode-duplicate.svg
* platform/graphics/filters/FEGaussianBlur.cpp:
(WebCore::FEGaussianBlur::FEGaussianBlur):
(WebCore::FEGaussianBlur::create):
(WebCore::FEGaussianBlur::edgeMode):
(WebCore::FEGaussianBlur::setEdgeMode):
(WebCore::boxBlur):
(WebCore::FEGaussianBlur::platformApplyGeneric):
(WebCore::FEGaussianBlur::determineAbsolutePaintRect):
* platform/graphics/filters/FEGaussianBlur.h:
* rendering/FilterEffectRenderer.cpp:
(WebCore::FilterEffectRenderer::build):
* svg/SVGFEGaussianBlurElement.cpp:
(WebCore::SVGFEGaussianBlurElement::SVGFEGaussianBlurElement):
(WebCore::SVGFEGaussianBlurElement::isSupportedAttribute):
(WebCore::SVGFEGaussianBlurElement::parseAttribute):
(WebCore::SVGFEGaussianBlurElement::svgAttributeChanged):
(WebCore::SVGFEGaussianBlurElement::build):
* svg/SVGFEGaussianBlurElement.h:
* svg/SVGFEGaussianBlurElement.idl:
2013-09-01 Andreas Kling <akling@apple.com>
EventHandler::m_frame should be a Frame&.
<https://webkit.org/b/120580>
Reviewed by Darin Adler.
EventHandler is tied to the lifetime of its frame, so let m_frame be a Frame&.
A handful of null checks and assertions removed.
2013-09-01 Darin Adler <darin@apple.com>
Fix a mistake in my recent pasteboard/editor refactoring that was causing tests to fail.
* editing/mac/EditorMac.mm:
(WebCore::getImage): One place this said cachedImage but it should have said tentativeCachedImage.
2013-09-01 Darin Adler <darin@apple.com>
HitTestResult should have innerNonSharedElement
https://bugs.webkit.org/show_bug.cgi?id=120579
Reviewed by Andreas Kling.
* editing/Editor.cpp:
(WebCore::Editor::copyImage): Call HitTestResult member function version of
innerNonSharedElement instead of a local function that does it.
* page/Chrome.cpp:
(WebCore::Chrome::setToolTip): Use innerNonSharedElement instead of getting
the node and checking if it's an input element. Also added some missing braces.
* page/EventHandler.cpp:
(WebCore::EventHandler::selectClosestWordFromHitTestResult): Use targetNode for
local variables instead of innerNode to match the HitTestResult function name.
(WebCore::EventHandler::selectClosestWordOrLinkFromMouseEvent): Ditto.
(WebCore::EventHandler::handleMousePressEventTripleClick): Ditto.
(WebCore::EventHandler::handleMousePressEventSingleClick): Ditto.
(WebCore::EventHandler::handleMousePressEvent): Ditto.
* rendering/HitTestResult.cpp:
(WebCore::HitTestResult::innerElement): Rewrote so there there is no loop.
(WebCore::HitTestResult::innerNonSharedElement): Ditto.
* rendering/HitTestResult.h: Added innerNonSharedElement. Generally speaking,
we'd like to avoid using Node unless there is some real need.
2013-09-01 Xabier Rodriguez Calvar <calvaris@igalia.com>
Volume slider value should be 0 when audio is muted
https://bugs.webkit.org/show_bug.cgi?id=120553
Reviewed by Eric Carlson.
Fixed the problem of showing a non empty slider when audio is
muted.
Test: media/volume-bar-empty-when-muted.html.
* html/shadow/MediaControls.cpp:
(WebCore::MediaControls::reset): Use setSliderVolume.
(WebCore::MediaControls::changedVolume): Use setSliderVolume.
(WebCore::MediaControls::setSliderVolume): Added to set the volume
to 0 when muted and to its value otherwise.
* html/shadow/MediaControls.h: Added setSliderVolume.
* html/shadow/MediaControlsApple.cpp:
(WebCore::MediaControlsApple::reset): Used setSliderVolume and
setFullscreenSliderVolume.
(WebCore::MediaControlsApple::changedVolume): Used
setFullscreenSliderVolume.
(WebCore::MediaControlsApple::setFullscreenSliderVolume): Added to
set the volume to 0 when muted and to its value otherwise.
* html/shadow/MediaControlsApple.h: Added setFullscreenSliderVolume
* html/shadow/MediaControlsBlackBerry.cpp:
(WebCore::MediaControlsBlackBerry::reset): Used setSliderVolume.
2013-09-01 Andreas Kling <akling@apple.com>
Give EditCommand a protected Frame& getter.
<https://webkit.org/b/120574>
Reviewed by Darin Adler.
EditCommand is only created for documents that are attached to a Frame,
we already ASSERTed as much in the EditCommand constructor.
This patch adds a "Frame& EditCommand::frame()" helper, so EditCommand
and its subclasses don't have to fumble around with pointers.
2013-08-31 Antti Koivisto <antti@apple.com>
Add element ancestor iterator
https://bugs.webkit.org/show_bug.cgi?id=120563
Reviewed by Andreas Kling.
This patch adds ancestor iterators. They iterate over elements parent chain up to the root.
To iterate over Element ancestors:
auto ancestors = elementAncestors(this);
for (auto it = ancestors.begin(), end = ancestors.end(); it != end; ++it) {
Element& element = *it;
...
To iterate over Element ancestors including the current element:
auto lineage = elementLineage(this);
for (auto it = lineage.begin(), end = lineage.end(); it != end; ++it) {
Element& element = *it;
...
To iterate over ancestors of a specific Element subclass:
auto htmlAncestors = ancestorsOfType<HTMLElement>(this);
for (auto it = htmlAncestors.begin(), end = htmlAncestors.end(); it != end; ++it) {
HTMLElement& htmlElement = *it;
...
To iterate over ancestors of a specific Element subclass including the current element:
auto htmlLineage = lineageOfType<HTMLElement>(this);
for (auto it = htmlLineage.begin(), end = htmlLineage.end(); it != end; ++it) {
HTMLElement& htmlElement = *it;
...
The patch also uses the new types in a few places.
* WebCore.xcodeproj/project.pbxproj:
* accessibility/AccessibilityNodeObject.cpp:
(WebCore::AccessibilityNodeObject::mouseButtonListener):
(WebCore::AccessibilityNodeObject::labelForElement):
* dom/ElementAncestorIterator.h: Added.
(WebCore::::ElementAncestorIterator):
(WebCore::::operator):
(WebCore::::ElementAncestorConstIterator):
(WebCore::::ElementAncestorIteratorAdapter):
(WebCore::::begin):
(WebCore::::end):
(WebCore::::ElementAncestorConstIteratorAdapter):
(WebCore::elementLineage):
(WebCore::elementAncestors):
(WebCore::ancestorsOfType):
* dom/ElementIterator.h:
(WebCore::findElementAncestorOfType):
(WebCore::::traverseAncestor):
(WebCore::=):
* html/HTMLElement.cpp:
(WebCore::HTMLElement::adjustDirectionalityIfNeededAfterChildAttributeChanged):
* html/HTMLFieldSetElement.h:
(WebCore::isHTMLFieldSetElement):
(WebCore::HTMLFieldSetElement):
* html/HTMLFrameSetElement.cpp:
(WebCore::HTMLFrameSetElement::findContaining):
* html/HTMLFrameSetElement.h:
(WebCore::HTMLFrameSetElement):
* html/HTMLInputElement.h:
(WebCore::isHTMLInputElement):
(WebCore::toHTMLInputElement):
* html/HTMLLegendElement.cpp:
(WebCore::HTMLLegendElement::associatedControl):
2013-08-31 Darin Adler <darin@apple.com>
Refactor URL and image writing so layer-violating parts are in Editor, not Pasteboard (Mac-only at first)
https://bugs.webkit.org/show_bug.cgi?id=120573
Reviewed by Andreas Kling.
* editing/Editor.cpp:
(WebCore::Editor::copy): Use writeImageToPasteboard instead of Pasteboard::writeImage on Mac.
(WebCore::Editor::copyURL): Use writeURLToPasteboard instead of Pasteboard::writeURL on Mac.
(WebCore::innerNonSharedElement): Added. Used in copyImage.
(WebCore::Editor::copyImage): Use innerNonSharedElement instead of innerNonSharedNode.
Use writeImageToPasteboard instead of Pasteboard::writeImage on Mac.
* editing/Editor.h: Add new functions, writeURLToPasteboard and writeImageToPasteboard,
both Mac-only for now.
* editing/mac/EditorMac.mm:
(WebCore::Editor::pasteWithPasteboard): Removed unneeded "m_frame.editor()" round trip that
was left behind in this function.
(WebCore::getImage): Added. Helper used by writeImageToPasteboard.
(WebCore::Editor::writeURLToPasteboard): Added. Sets up PasteboardURL and then calls
Pasteboard::write with it.
(WebCore::Editor::writeImageToPasteboard): Added. Sets up PasteboardImage and then calls
Pasteboard::write with it.
* page/DragController.cpp:
(WebCore::DragController::startDrag): Use Editor::writeURLToPasteboard instead of
Pasteboard::writeURL on Mac.
* platform/Pasteboard.h: Added PasteboardURL and PasteboardImage structures.
Declare write functions for PasteboardWebContent, PasteboardURL, and PasteboardImage.
Guard writeURL and writeImage with !PLATFORM(MAC).
* platform/mac/PasteboardMac.mm:
(WebCore::writeURLForTypes): Changed this to take a PasteboardURL.
(WebCore::Pasteboard::write): Renamed writeURL and writeImage to this. Refactor both
to take PasteboardURL and PasteboardImage arguments.
(WebCore::fileWrapper): Renamed from fileWrapperForImage since the fact that this is
for an image is now clear from its argument, a PasteboardImage.
(WebCore::writeFileWrapperAsRTFDAttachment): Changed this function to use early return.
2013-08-31 Andreas Kling <akling@apple.com>
EditCommand constructors should take Document&.
<https://webkit.org/b/120566>
Reviewed by Darin Adler.
Let EditCommand's and all subclass constructors take Document& instead of Document*.
EditCommand::document() now returns a Document&.
Added Editor::document() which returns Editor::frame().document() after asserting
that it's non-null, to make passing a Document& from Editor functions easier.
2013-08-31 Andreas Kling <akling@apple.com>
Make more use of toRenderFoo(RenderObject&) cast helpers.
<https://webkit.org/b/120565>
Reviewed by Darin Adler.
To make amends for putting ugly toRenderFoo(&renderer) casts everywhere,
here's a patch that switches a bunch of code over to using reference-based casts.
I removed pointer-based casts altogether for these renderers:
- RenderBR
- RenderCombineText
- RenderListMarker
- RenderVideo
- RenderView
2013-08-31 Santosh Mahto <santosh.ma@samsung.com>
warning: unused parameter renderingMode' in ImageBufferCairo.cpp:94
https://bugs.webkit.org/show_bug.cgi?id=120543
Reviewed by Darin Adler.
Fixing warning by adding ASSERT_UNUSED.
* platform/graphics/cairo/ImageBufferCairo.cpp:
(WebCore::ImageBuffer::ImageBuffer):
2013-08-31 Andreas Kling <akling@apple.com>
Fix typo in r154931 that caused assertions in continuation tests.
* rendering/InlineFlowBox.cpp:
(WebCore::InlineFlowBox::paint):
2013-08-31 Rob Buis <rwlbuis@webkit.org>
XMLSerializer-attribute-namespace-prefix-conflicts can't produce reliable results
https://bugs.webkit.org/show_bug.cgi?id=120490
Reviewed by Ryosuke Niwa.
Retain the key of the namespaces map by using AtomicString as key instead of AtomicStringImpl*.
* editing/MarkupAccumulator.h:
2013-08-31 Andreas Kling <akling@apple.com>
InlineBox::renderer() and pals should return references.
<https://webkit.org/b/120562>
Reviewed by Antti Koivisto.
Make InlineBox::renderer() and its friends return references instead of pointers.
Every box always has a renderer, so this clears up any ambiguity, and a number of
weird assertions in SVG code.
Made InlineBox::m_renderer private so subclasses have to go through renderer().
The next step will be to replace renderer() with tightly-typed accessors where
applicable (e.g InlineTextBox's renderer is always a RenderText.)
Also added reference versions of these RenderObject casts:
- toRenderBox()
- toRenderBlock()
- toRenderInline()
- toRenderSVGInlineText()
2013-08-31 Andreas Kling <akling@apple.com>
PostAttachCallbackDisabler should take a ContainerNode&.
<https://webkit.org/b/120560>
Reviewed by Antti Koivisto.
Let PostAttachCallbackDisabler take a reference and remove an ugly assertion.
* dom/ContainerNode.h:
(WebCore::PostAttachCallbackDisabler::PostAttachCallbackDisabler):
(WebCore::PostAttachCallbackDisabler::~PostAttachCallbackDisabler):
* dom/Document.cpp:
(WebCore::Document::recalcStyle):
* style/StyleResolveTree.cpp:
(WebCore::Style::attachRenderTree):
2013-08-31 Antti Koivisto <antti@apple.com>
Rename ChildIterator -> ElementChildIterator, DescendantIterator -> ElementDescendantIterator
https://bugs.webkit.org/show_bug.cgi?id=120561
Reviewed by Andreas Kling.
New names are more descriptive and consistent. They also put related iterator files close by in file lists.
The types are always used with auto so longer names don't make them any clumsier to use.
For simplicity included all Element iterator types from ElementIterator.h so it is the only file that has
to be included by the clients.
* GNUmakefile.list.am:
* Target.pri:
* WebCore.vcxproj/WebCore.vcxproj:
* WebCore.xcodeproj/project.pbxproj:
* accessibility/AccessibilityNodeObject.cpp:
* accessibility/AccessibilityRenderObject.cpp:
* accessibility/AccessibilityTable.cpp:
* css/CSSFontFaceSource.cpp:
* dom/ChildIterator.h: Removed.
* dom/DescendantIterator.h: Removed.
* dom/Document.cpp:
* dom/ElementChildIterator.h: Copied from Source/WebCore/dom/ChildIterator.h.
(WebCore::::ElementChildIterator):
(WebCore::::operator):
(WebCore::::ElementChildConstIterator):
(WebCore::::ElementChildIteratorAdapter):
(WebCore::::begin):
(WebCore::::end):
(WebCore::::ElementChildConstIteratorAdapter):
(WebCore::elementChildren):
(WebCore::childrenOfType):
* dom/ElementDescendantIterator.h: Copied from Source/WebCore/dom/DescendantIterator.h.
(WebCore::::ElementDescendantIterator):
(WebCore::::operator):
(WebCore::::ElementDescendantConstIterator):
(WebCore::::ElementDescendantIteratorAdapter):
(WebCore::::begin):
(WebCore::::end):
(WebCore::::ElementDescendantConstIteratorAdapter):
(WebCore::elementDescendants):
(WebCore::descendantsOfType):
* dom/ElementIterator.h:
* dom/Node.cpp:
* dom/TreeScope.cpp:
* editing/ApplyStyleCommand.cpp:
* editing/markup.cpp:
* html/HTMLAppletElement.cpp:
* html/HTMLFieldSetElement.cpp:
* html/HTMLLabelElement.cpp:
* html/HTMLMapElement.cpp:
* html/HTMLMediaElement.cpp:
* html/HTMLObjectElement.cpp:
* loader/PlaceholderDocument.cpp:
* rendering/FilterEffectRenderer.cpp:
* style/StyleResolveTree.cpp:
* svg/SVGElement.cpp:
* svg/SVGSVGElement.cpp:
* svg/animation/SMILTimeContainer.cpp:
* svg/graphics/SVGImage.cpp:
2013-08-31 Andreas Kling <akling@apple.com>
Don't do document style recalc unless there's a RenderView.
<https://webkit.org/b/120558>
Reviewed by Antti Koivisto.
There's no sense in computing style for a Document that has no RenderView.
Checking this before continuing also lets us know that there's a Frame & FrameView
present, simplifying some things later on.
* dom/Document.cpp:
(WebCore::Document::recalcStyle):
* style/StyleResolveForDocument.cpp:
(WebCore::Style::resolveForDocument):
2013-08-31 Antti Koivisto <antti@apple.com>
Add common base for element iterators
https://bugs.webkit.org/show_bug.cgi?id=120557
Reviewed by Andreas Kling.
Add ElementIterator and use it as the base for child and descendant iterators. The only difference is the definition of operator++.
Also renamed DescendantIteratorAssertions to ElementIteratorAssertions.
* GNUmakefile.list.am:
* Target.pri:
* WebCore.vcxproj/WebCore.vcxproj:
* WebCore.xcodeproj/project.pbxproj:
* dom/ChildIterator.h:
(WebCore::::ChildIterator):
(WebCore::::operator):
(WebCore::::ChildConstIterator):
(WebCore::::begin):
(WebCore::::end):
* dom/DescendantIterator.h:
(WebCore::::DescendantIterator):
(WebCore::::operator):
(WebCore::::DescendantConstIterator):
* dom/DescendantIteratorAssertions.h: Removed.
* dom/ElementIterator.h: Added.
(WebCore::::ElementIterator):
(WebCore::::traverseNext):
(WebCore::::traversePrevious):
(WebCore::::traverseNextSibling):
(WebCore::::traversePreviousSibling):
(WebCore::::operator):
(WebCore::=):
(WebCore::::ElementConstIterator):
* dom/ElementIteratorAssertions.h: Copied from Source/WebCore/dom/DescendantIteratorAssertions.h.
(WebCore::ElementIteratorAssertions::ElementIteratorAssertions):
(WebCore::ElementIteratorAssertions::domTreeHasMutated):
(WebCore::ElementIteratorAssertions::dropEventDispatchAssertion):
2013-08-30 Brent Fulgham <bfulgham@apple.com>
[Windows] Build fix after r154921.
AVFoundationCF uses an internal wrapper object around the C-API. The call point
in the original patch was inside the wrapper, which did not (yet) provide
a method implementation.
* platform/graphics/avfoundation/cf/MediaPlayerPrivateAVFoundationCF.cpp:
(WebCore::MediaPlayerPrivateAVFoundationCF::updateVideoLayerGravity):
(WebCore::AVFWrapper::updateVideoLayerGravity):
2013-08-30 Simon Fraser <simon.fraser@apple.com>
Video with object-fit: cover can spill outside the box
https://bugs.webkit.org/show_bug.cgi?id=52103
Reviewed by Dean Jackson.
object-fit on renderers which use accelerated compositing needs special
treatment.
For directly composited images, and video, GraphicsLayer needs to know
both the size of the content layer, and also a rectangle at which this
should be clipped (because, for the first time, that content layer can be
larger than the renderer's content box).
AVFoundation would always aspect-ratio fit video by default, so plumb
through MediaPlayer a way to override that when object-fit requires it.
Added a LAYER_TREE_INCLUDES_CONTENT_LAYERS enum to the layerTreeAsText()
flags so we can dump content layers for testing.
Tests: compositing/images/direct-image-object-fit.html
compositing/reflections/direct-image-object-fit-reflected.html
compositing/video/video-object-fit.html
* page/Frame.h: New LayerTreeFlagsIncludeContentLayers flag.
* platform/graphics/GraphicsLayer.h: New flag.
* platform/graphics/MediaPlayer.cpp:
(WebCore::MediaPlayer::shouldMaintainAspectRatio):
(WebCore::MediaPlayer::setShouldMaintainAspectRatio):
* platform/graphics/MediaPlayer.h:
* platform/graphics/MediaPlayerPrivate.h:
(WebCore::MediaPlayerPrivateInterface::shouldMaintainAspectRatio):
(WebCore::MediaPlayerPrivateInterface::setShouldMaintainAspectRatio):
* platform/graphics/avfoundation/MediaPlayerPrivateAVFoundation.cpp:
(WebCore::MediaPlayerPrivateAVFoundation::MediaPlayerPrivateAVFoundation):
(WebCore::MediaPlayerPrivateAVFoundation::setShouldMaintainAspectRatio):
* platform/graphics/avfoundation/MediaPlayerPrivateAVFoundation.h:
* platform/graphics/avfoundation/cf/MediaPlayerPrivateAVFoundationCF.cpp:
(WebCore::MediaPlayerPrivateAVFoundationCF::updateVideoLayerGravity):
(WebCore::AVFWrapper::platformLayer):
* platform/graphics/avfoundation/cf/MediaPlayerPrivateAVFoundationCF.h:
* platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.h:
* platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
(WebCore::MediaPlayerPrivateAVFoundationObjC::createVideoLayer):
(WebCore::MediaPlayerPrivateAVFoundationObjC::updateVideoLayerGravity):
* platform/graphics/ca/GraphicsLayerCA.cpp: We need a new m_contentsClippingLayer to
clip the contents layer, which only gets created when necessary. It has to be cloned
for reflections.
(WebCore::GraphicsLayerCA::willBeDestroyed):
(WebCore::GraphicsLayerCA::setContentsRect):
(WebCore::GraphicsLayerCA::setContentsClippingRect):
(WebCore::GraphicsLayerCA::commitLayerChangesBeforeSublayers):
(WebCore::GraphicsLayerCA::updateSublayerList):
(WebCore::GraphicsLayerCA::updateContentsImage):
(WebCore::GraphicsLayerCA::updateContentsMediaLayer):
(WebCore::GraphicsLayerCA::updateContentsCanvasLayer):
(WebCore::GraphicsLayerCA::updateContentsColorLayer):
(WebCore::GraphicsLayerCA::updateContentsRects):
(WebCore::GraphicsLayerCA::dumpAdditionalProperties):
(WebCore::GraphicsLayerCA::ensureCloneLayers):
(WebCore::GraphicsLayerCA::removeCloneLayers):
(WebCore::GraphicsLayerCA::fetchCloneLayers):
* platform/graphics/ca/GraphicsLayerCA.h:
* rendering/RenderLayerBacking.cpp: Need to push both the contentsRect and
the contentsClippingRect down to the GraphicsLayers. Most of the time they
are the same, unless object-fit makes them different.
(WebCore::RenderLayerBacking::resetContentsRect):
(WebCore::RenderLayerBacking::positionOverflowControlsLayers):
(WebCore::RenderLayerBacking::updateDirectlyCompositedBackgroundColor):
(WebCore::RenderLayerBacking::updateDirectlyCompositedBackgroundImage):
(WebCore::RenderLayerBacking::updateImageContents):
(WebCore::RenderLayerBacking::contentsBox):
* rendering/RenderLayerCompositor.cpp:
(WebCore::RenderLayerCompositor::layerTreeAsText):
* rendering/RenderVideo.cpp:
(WebCore::RenderVideo::updatePlayer):
* testing/Internals.cpp:
(WebCore::Internals::layerTreeAsText):
* testing/Internals.h:
* testing/Internals.idl:
2013-08-30 Brent Fulgham <bfulgham@apple.com>
[Windows] Update to incorporate additional suggestions
https://bugs.webkit.org/show_bug.cgi?id=120448
Reviewed by Darin Adler
* platform/graphics/avfoundation/cf/MediaPlayerPrivateAVFoundationCF.cpp: Add
notes as to why AVFoundationCF needs this extra method call.
* platform/graphics/avfoundation/cf/MediaPlayerPrivateAVFoundationCF.h: Use OVERRIDE
* rendering/RenderVideo.cpp: Replace ternary operator with logical &&.
2013-08-30 Brent Fulgham <bfulgham@apple.com>
[Windows] Vide element in page always uses non-hw accelerated mode.
https://bugs.webkit.org/show_bug.cgi?id=120448
Reviewed by Darin Adler
This patch is unfortunately larger than my original idea, but seems to make the
layout system happier. Instead of switching into composited mode when building
the media player, we now build the original layout tree with compositing active
if the underlying media element requires it. The AVFoundationCF player needs to
have the compositor available at construction time so it can attach to the
rendering device. Otherwise it falls back to CPU-only mode.
* platform/graphics/MediaPlayer.cpp:
(WebCore::MediaPlayer::requiresImmediateCompositing): Added
* platform/graphics/MediaPlayer.h:
* platform/graphics/MediaPlayerPrivate.h:
(WebCore::MediaPlayerPrivateInterface::requiresImmediateCompositing): Added
* platform/graphics/avfoundation/cf/MediaPlayerPrivateAVFoundationCF.cpp:
(WebCore::MediaPlayerPrivateAVFoundationCF::createAVPlayer): Added
* platform/graphics/avfoundation/cf/MediaPlayerPrivateAVFoundationCF.h:
(WebCore::MediaPlayerPrivateAVFoundationCF::requiresImmediateCompositing):
* rendering/RenderLayerCompositor.cpp:
(WebCore::RenderLayerCompositor::requiresCompositingForVideo): Uses new
'requiresImmediateCompositing' to short-circuit check for whether a
compositor is required.
* rendering/RenderVideo.cpp:
(WebCore::RenderVideo::requiresImmediateCompositing):
* rendering/RenderVideo.h:
2013-08-30 Joseph Pecoraro <pecoraro@apple.com>
Web Inspector: Breakpoints should have Automatically Continue Option
https://bugs.webkit.org/show_bug.cgi?id=120187
Reviewed by Timothy Hatcher.
Tests: inspector-protocol/debugger/removeBreakpoint.html
inspector-protocol/debugger/setBreakpoint-autoContinue.html
inspector-protocol/debugger/setBreakpoint-column.html
inspector-protocol/debugger/setBreakpoint-condition.html
inspector-protocol/debugger/setBreakpoint.html
* inspector/Inspector.json:
Convert the "condition" argument of setBreakpoint and setBreakpointByUrl
to a BreakpointOptions object with optional properties. One of which
is "condition" and a new option "autoContinue".
* bindings/js/ScriptDebugServer.h:
* bindings/js/ScriptDebugServer.cpp:
(WebCore::ScriptDebugServer::hasBreakpoint):
(WebCore::ScriptDebugServer::pauseIfNeeded):
Automatically continue if the breakpoint was hit and has autoContinue.
* inspector/InspectorDebuggerAgent.h:
* inspector/InspectorDebuggerAgent.cpp:
(WebCore::buildObjectForBreakpointCookie):
(WebCore::InspectorDebuggerAgent::setBreakpointByUrl):
(WebCore::InspectorDebuggerAgent::setBreakpoint):
(WebCore::InspectorDebuggerAgent::continueToLocation):
(WebCore::InspectorDebuggerAgent::didParseSource):
* inspector/ScriptBreakpoint.h:
(WebCore::ScriptBreakpoint::ScriptBreakpoint):
Handle the new incoming BreakpointOptions type, and set the
autoContinue state on ScriptBreakpoints.
* inspector/front-end/DebuggerModel.js:
(WebInspector.DebuggerModel.prototype.setBreakpointByURL):
(WebInspector.DebuggerModel.prototype.setBreakpointBySourceId):
Update old front-end to be compatible with the new API.
2013-08-30 Dean Jackson <dino@apple.com>
Animations should use double for key values, not floats
https://bugs.webkit.org/show_bug.cgi?id=120547
Reviewed by Simon Fraser.
Merge https://chromium.googlesource.com/chromium/blink/+/71de046541c77120874b9bff82958ee9e0e20c7c
Some files have been renamed in the Blink port, and they have made some
improvements, but I took what applied to us.
All our existing tests passed.
* css/StyleResolver.cpp:
(WebCore::StyleResolver::keyframeStylesForAnimation):
* css/WebKitCSSKeyframeRule.cpp:
(WebCore::StyleKeyframe::parseKeyString):
* css/WebKitCSSKeyframeRule.h:
(WebCore::StyleKeyframe::getKeys):
* platform/graphics/GraphicsLayer.h:
(WebCore::AnimationValue::keyTime):
(WebCore::AnimationValue::AnimationValue):
(WebCore::FloatAnimationValue::create):
(WebCore::FloatAnimationValue::FloatAnimationValue):
(WebCore::TransformAnimationValue::create):
(WebCore::TransformAnimationValue::TransformAnimationValue):
(WebCore::FilterAnimationValue::create):
(WebCore::FilterAnimationValue::FilterAnimationValue):
* rendering/RenderLayerBacking.cpp:
(WebCore::RenderLayerBacking::startAnimation):
* rendering/style/KeyframeList.h:
(WebCore::KeyframeValue::KeyframeValue):
(WebCore::KeyframeValue::key):
(WebCore::KeyframeValue::setKey):
2013-08-30 Brendan Long <b.long@cablelabs.com>
[GStreamer] support in-band text tracks
https://bugs.webkit.org/show_bug.cgi?id=103771
Reviewed by Eric Carlson.
Tests: New tests added because existing tests were too specific.
media/track/in-band/track-in-band-kate-ogg-cues-added-once.html
media/track/in-band/track-in-band-kate-ogg-kind.html
media/track/in-band/track-in-band-kate-ogg-language.html
media/track/in-band/track-in-band-kate-ogg-mode.html
media/track/in-band/track-in-band-kate-ogg-style.html
media/track/in-band/track-in-band-kate-ogg-track-order.html
media/track/in-band/track-in-band-srt-mkv-cues-added-once.html
media/track/in-band/track-in-band-srt-mkv-kind.html
media/track/in-band/track-in-band-srt-mkv-language.html
media/track/in-band/track-in-band-srt-mkv-mode.html
media/track/in-band/track-in-band-srt-mkv-style.html
media/track/in-band/track-in-band-srt-mkv-track-order.html
* CMakeLists.txt: Add InbandTextTrackPrivateGStreamer, InbandGenericTextTrack, InbandWebVTTTextTrack, and TextCombinerGStreamer files.
* GNUmakefile.list.am: Same.
* PlatformEfl.cmake: Same.
* Target.pri: Same.
* WebCore.vcxproj/WebCore.vcxproj: Same.
* WebCore.vcxproj/WebCore.vcxproj.filters: Same.
* WebCore.xcodeproj/project.pbxproj: Same.
* html/track/InbandGenericTextTrack.cpp: Split out code for handling generic cues.
(WebCore::GenericTextTrackCueMap::GenericTextTrackCueMap): Move from InbandTextTrack.
(WebCore::GenericTextTrackCueMap::~GenericTextTrackCueMap): Same.
(WebCore::GenericTextTrackCueMap::add): Same.
(WebCore::GenericTextTrackCueMap::find): Same.
(WebCore::GenericTextTrackCueMap::remove): Same.
(WebCore::InbandGenericTextTrack::create): Same.
(WebCore::InbandGenericTextTrack::updateCueFromCueData): Same.
(WebCore::InbandGenericTextTrack::addGenericCue): Same.
(WebCore::InbandGenericTextTrack::updateGenericCue): Same.
(WebCore::InbandGenericTextTrack::removeGenericCue): Same.
(WebCore::InbandGenericTextTrack::removeCue): Same.
(WebCore::InbandGenericTextTrack::InbandGenericTextTrack): Empty.
(WebCore::InbandGenericTextTrack::~InbandGenericTextTrack): Empty.
* html/track/InbandGenericTextTrack.h: Copied from Source/WebCore/html/track/InbandTextTrack.h.
The only addition is the ASSERT_NOT_REACHED() for WebVTT cues.
* html/track/InbandTextTrack.cpp: Add label and language changed callbacks.
(WebCore::InbandTextTrack::create): Return a generic or WebVTT text track based on the private CueFormat.
(WebCore::InbandTextTrack::labelChanged): Added.
(WebCore::InbandTextTrack::languageChanged): Added.
* html/track/InbandTextTrack.h: Add label and language changed callbacks.
* html/track/InbandWebVTTTextTrack.cpp: Added, based on InbandTextTrack.
(WebCore::InbandWebVTTTextTrack::create): Same.
(WebCore::InbandWebVTTTextTrack::InbandWebVTTTextTrack): Empty.
(WebCore::InbandWebVTTTextTrack::~InbandWebVTTTextTrack): Empty.
(WebCore::InbandWebVTTTextTrack::parseWebVTTCueData): Sends data to a WebVTTParser.
(WebCore::InbandWebVTTTextTrack::newCuesParsed): Adds cues when WebVTTParser parses them.
(WebCore::InbandWebVTTTextTrack::fileFailedToParse): Prints a warning when WebVTTParser has a problem.
* html/track/InbandWebVTTTextTrack.h: Added.
* platform/graphics/InbandTextTrackPrivate.h:
(WebCore::InbandTextTrackPrivate::cueFormat): For determining if the track will have generic or WebVTT cues.
(WebCore::InbandTextTrackPrivate::InbandTextTrackPrivate): Pass CueFormat in the constructor.
* platform/graphics/InbandTextTrackPrivateClient.h: Same.
* platform/graphics/avfoundation/InbandTextTrackPrivateAVF.cpp:
(WebCore::InbandTextTrackPrivateAVF::InbandTextTrackPrivateAVF): Pass CueFormat (Generic) to InbandTextTrackPrivate.
* platform/graphics/gstreamer/GRefPtrGStreamer.cpp: Add GRefPtr specializations for GstSample and GstEvent.
* platform/graphics/gstreamer/GRefPtrGStreamer.h: Same.
* platform/graphics/gstreamer/GStreamerUtilities.h: Add WARN_MEDIA_MESSAGE.
* platform/graphics/gstreamer/GStreamerVersioning.h: Add a function to check GStreamer version at runtime.
* platform/graphics/gstreamer/InbandTextTrackPrivateGStreamer.cpp: Added.
(WebCore::textTrackPrivateEventCallback): Watches for tag and stream start events.
(WebCore::textTrackPrivateSampleTimeoutCallback): See notifyTrackOfSample();
(WebCore::textTrackPrivateStreamTimeoutCallback): See notifyTrackOfStreamChanged();
(WebCore::textTrackPrivateTagsChangeTimeoutCallback): See notifyTrackOfTagsChanged();
(WebCore::InbandTextTrackPrivateGStreamer::InbandTextTrackPrivateGStreamer): Initializes tags and stream and sets up event callback.
(WebCore::InbandTextTrackPrivateGStreamer::~InbandTextTrackPrivateGStreamer): Calls disconnect:
(WebCore::InbandTextTrackPrivateGStreamer::disconnect): Removes signal handlers and frees some memory.
(WebCore::InbandTextTrackPrivateGStreamer::handleSample): Adds samples to a list and sets up callback.
(WebCore::InbandTextTrackPrivateGStreamer::streamChanged): Sets up callback.
(WebCore::InbandTextTrackPrivateGStreamer::tagsChanged): Same.
(WebCore::InbandTextTrackPrivateGStreamer::notifyTrackOfSample): Parses all queued samples with WebVTTParser.
(WebCore::InbandTextTrackPrivateGStreamer::notifyTrackOfStreamChanged): Keeps track of current stream.
(WebCore::InbandTextTrackPrivateGStreamer::notifyTrackOfTagsChanged): Sets label and language from tags.
* platform/graphics/gstreamer/InbandTextTrackPrivateGStreamer.h: Added.
(WebCore::InbandTextTrackPrivateGStreamer::create): Basic RefPtr create function.
(WebCore::InbandTextTrackPrivateGStreamer::pad): Returns the pad this track is associated with (used
to determine if a playbin text stream has already been associated with a text track).
(WebCore::InbandTextTrackPrivateGStreamer::setIndex): Sets the track index (used for sorting).
(WebCore::InbandTextTrackPrivateGStreamer::streamId): Returns the stream ID (used to handle new samples).
* platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:
(WebCore::mediaPlayerPrivateTextChangedCallback): Called for playbin "text-changed" event. See textChanged().
(WebCore::mediaPlayerPrivateTextChangeTimeoutCallback): See notifyPlayerOfText().
(WebCore::mediaPlayerPrivateNewTextSampleCallback): See newTextSample().
(WebCore::MediaPlayerPrivateGStreamer::MediaPlayerPrivateGStreamer): Initialize m_textTimerHandler.
(WebCore::MediaPlayerPrivateGStreamer::~MediaPlayerPrivateGStreamer): Disconnect text tracks (they don't necessarily
get freed here, since a script could hold a reference).
(WebCore::MediaPlayerPrivateGStreamer::textChanged): Setup callback for notifyPlayerOfText.
(WebCore::MediaPlayerPrivateGStreamer::notifyPlayerOfText): Create text tracks.
(WebCore::MediaPlayerPrivateGStreamer::newTextSample): Handle new samples by giving them to a text track
with a matching stream. This method is syncryonous because we need to get the stream start sticky event
immediately.
* platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.h:
* platform/graphics/gstreamer/TextCombinerGStreamer.cpp: Added. This element forwards buffers from all
of its input pads, but also converts plain text to WebVTT as needed.
(webkit_text_combiner_init): Setup internal funnel.
(webkitTextCombinerPadEvent): If the caps are plain text make sure we have a webvttenv, otherwise connect
directly to the funnel.
(webkitTextCombinerRequestNewPad): Setup ghostpad and event callback.
(webkitTextCombinerReleasePad): Release pad and optional associated webvttenc.
(webkit_text_combiner_class_init): Setup pad templates and request/release pad functions.
(webkitTextCombinerNew): Returns a new WebKitTextCombiner.
* platform/graphics/gstreamer/TextCombinerGStreamer.h: Added.
* platform/graphics/gstreamer/TextSinkGStreamer.cpp: Added.
(webkit_text_sink_init): Set sync=false.
(webkitTextSinkGetProperty): Ignore sync property.
(webkitTextSinkSetProperty): Same.
(webkitTextSinkQuery): Ignore position and duration queries, forward everything else to appsink.
(webkit_text_sink_class_init): Setup property and query functions.
(webkitTextSinkNew): Return a new WebKitTextSink.
* platform/graphics/gstreamer/TextSinkGStreamer.h: Added.
2013-08-30 Dirk Schulze <krit@webkit.org>
Animate CSS Image filter() function
https://bugs.webkit.org/show_bug.cgi?id=119938
Reviewed by Simon Fraser.
With this patch, the new introduced CSS Image function filter() can be
animated. According to the spec, just filter functions can be
interpolated.
The patch also prepares StyleImage blending for interpolation of other
generated images like gradients or cross-fade().
http://dev.w3.org/fxtf/filters/#interpolating-filter-image
Test: fast/filter-image/filter-image-animation.html
* css/CSSComputedStyleDeclaration.cpp: Reuse the code that creates a
CSSValueList from ComputeStyle logic.
(WebCore::valueForPixel):
For StyleRules we want to have not-adjusted length values.
(WebCore::ComputedStyleExtractor::valueForShadow):
Add argument to switch between adjusted and not-adjusted length.
(WebCore::ComputedStyleExtractor::valueForFilter):
Ditto.
(WebCore::ComputedStyleExtractor::propertyValue):
* css/CSSComputedStyleDeclaration.h:
* css/CSSFilterImageValue.h: Add helper functions
for animating filters. We need to pass the FilterOperations for
the image generation and the CSSValueList for StyleRule.
(WebCore::CSSFilterImageValue::filterOperations):
(WebCore::CSSFilterImageValue::setFilterOperations):
(WebCore::CSSFilterImageValue::cachedImage):
* page/animation/CSSPropertyAnimation.cpp:
Add animation code to support animations between two filter()
function values.
(WebCore::blendFilterOperations):
(WebCore::blendFunc):
(WebCore::filterBlend):
* rendering/style/StyleGeneratedImage.h: Add helper functions.
(WebCore::CSSFilterImageValue::imageValue):
2013-08-30 Leo Yang <leoyang@blackberry.com>
Make sure remove CachedResourceClient when destructing IconLoader
https://bugs.webkit.org/show_bug.cgi?id=120541
Reviewed by Darin Adler.
It's a good practice to call CachedResource::removeClient(client)
when the client is being destructed. We need to do this for InconLoader
to prevent m_resource from keeping dangling client in case m_resource
is referenced by someone else in the future.
Found by code inspection. Just a defensive enhancement no new tests.
* loader/icon/IconLoader.cpp:
(WebCore::IconLoader::~IconLoader):
2013-08-30 Hans Muller <hmuller@adobe.com>
[CSS Shapes] Redefine the ShapeIntervals class as a template
https://bugs.webkit.org/show_bug.cgi?id=120381
Reviewed by Alexandru Chiculita.
No new tests, this was just an internal refactoring.
The existing ShapeIntervals class has been converted into a template whose
type specifies the type of the interval's x1 and x2 horizontal endpoints
(formerly float). There were several other minor changes, all in the realm
of refactoring:
- The original type was a struct with public x1 and x2 fields. It's now a class
with x1 and x2 accessors. ASSERTS are now used to maintain the x2 >= x1 invariant.
In the original code the invariant was not checked.
- The logical comparison operators have been overloaded for ShapeInterval.
This obviates the IntervalX1Comparator class which has been removed.
- The names of the global ShapeInterval Vector set operation methods have been
changed to reflect the fact that they're now members of the template class,
rather than globals.
PolygonShape.cpp depended on the ShapeInterval class. In the one or two places
where an interval's x1 or x1 fields had been set explicitly, ShapeInterval::set()
is now used to set both fields. This also enables the invariant check mentioned
earlier. The other changes to this class are syntatic, to account for the ShapeInterval
class's changes.
* CMakeLists.txt:
* GNUmakefile.list.am:
* WebCore.vcxproj/WebCore.vcxproj:
* WebCore.xcodeproj/project.pbxproj:
* rendering/shapes/PolygonShape.cpp:
(WebCore::appendIntervalX):
(WebCore::computeXIntersections):
(WebCore::computeOverlappingEdgeXProjections):
(WebCore::PolygonShape::getExcludedIntervals):
(WebCore::PolygonShape::getIncludedIntervals):
* rendering/shapes/PolygonShape.h:
* rendering/shapes/ShapeInterval.cpp: Removed.
* rendering/shapes/ShapeInterval.h: The entire implementation is now here.
(WebCore::ShapeInterval::ShapeInterval):
(WebCore::ShapeInterval::x1):
(WebCore::ShapeInterval::x2):
(WebCore::ShapeInterval::set):
(WebCore::ShapeInterval::overlaps):
(WebCore::ShapeInterval::intersect):
(WebCore::ShapeInterval::sortVector):
(WebCore::ShapeInterval::uniteVectors):
(WebCore::ShapeInterval::intersectVectors):
(WebCore::ShapeInterval::subtractVectors):
(WebCore::operator==):
(WebCore::operator!=):
(WebCore::operator< ):
(WebCore::operator> ):
(WebCore::operator<=):
(WebCore::operator>=):
2013-08-30 Antti Koivisto <antti@apple.com>
Use Element& in StyleResolveTree
https://bugs.webkit.org/show_bug.cgi?id=120540
Reviewed by Andreas Kling.
* dom/ContainerNode.cpp:
(WebCore::attachChild):
(WebCore::detachChild):
* dom/Document.cpp:
(WebCore::Document::recalcStyle):
(WebCore::Document::createRenderTree):
(WebCore::Document::detach):
* dom/Element.cpp:
(WebCore::Element::lazyReattach):
(WebCore::Element::updateExistingPseudoElement):
(WebCore::Element::createPseudoElementIfNeeded):
(WebCore::disconnectPseudoElement):
* dom/ShadowRoot.cpp:
(WebCore::ShadowRoot::setResetStyleInheritance):
* 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::documentWillSuspendForPageCache):
(WebCore::HTMLPlugInImageElement::documentDidResumeFromPageCache):
(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::createRenderTree):
* style/StyleResolveTree.cpp:
(WebCore::Style::attachChildren):
(WebCore::Style::attachRenderTree):
(WebCore::Style::detachChildren):
(WebCore::Style::detachRenderTree):
(WebCore::Style::resolveLocal):
(WebCore::Style::updateTextStyle):
(WebCore::Style::resolveShadowTree):
(WebCore::Style::resolveTree):
Documents only ever have one child element. Remove the loop.
(WebCore::Style::detachRenderTreeInReattachMode):
(WebCore::Style::reattachRenderTree):
* style/StyleResolveTree.h:
* svg/SVGTests.cpp:
(WebCore::SVGTests::handleAttributeChange):
* xml/XMLErrors.cpp:
(WebCore::XMLErrors::insertErrorMessageBlock):
* xml/parser/XMLDocumentParserLibxml2.cpp:
(WebCore::XMLDocumentParser::startElementNs):
2013-08-30 Andreas Kling <akling@apple.com>
Document style resolve should take Document&.
<https://webkit.org/b/120534>
Reviewed by Darin Adler.
Tweak Style::resolveTree(Document*) and Style::resolveForDocument(Document*) to take Document& instead.
* dom/Document.cpp:
(WebCore::Document::recalcStyle):
* html/HTMLLinkElement.cpp:
(WebCore::HTMLLinkElement::process):
* style/StyleResolveForDocument.cpp:
(WebCore::Style::resolveForDocument):
* style/StyleResolveForDocument.h:
* style/StyleResolveTree.cpp:
(WebCore::Style::resolveTree):
* style/StyleResolveTree.h:
2013-08-30 Darin Adler <darin@apple.com>
[Mac] No need for Pasteboard::getDataSelection
https://bugs.webkit.org/show_bug.cgi?id=120536
Reviewed by Anders Carlsson.
* editing/Editor.h: Added some Mac-only private member functions.
* editing/mac/EditorMac.mm:
(WebCore::Editor::selectionInWebArchiveFormat): Added.
(WebCore::Editor::adjustedSelectionRange): Added.
(WebCore::attributedStringForRange): Added.
(WebCore::dataInRTFDFormat): Added.
(WebCore::dataInRTFFormat): Added.
(WebCore::Editor::dataSelectionForPasteboard): Moved the implementation
of Pasteboard::getDataSelection here, refactoring to share code with the
writeSelectionToPasteboard function.
(WebCore::Editor::writeSelectionToPasteboard): Refactored to share code
with the new function above.
* platform/Pasteboard.h: Removed getDataSelection. One less layering violation.
* platform/mac/PasteboardMac.mm: Ditto.
2013-08-30 Rob Buis <rwlbuis@webkit.org>
SVG error parsing empty path
https://bugs.webkit.org/show_bug.cgi?id=78980
Reviewed by Darin Adler.
According to the spec (http://www.w3.org/TR/SVG/paths.html#PathData), path 'd' attribute can be empty.
No error should be reported in this case.
* svg/SVGPathParser.cpp:
(WebCore::SVGPathParser::parsePathDataFromSource):
* svg/SVGPathUtilities.cpp:
(WebCore::buildPathFromString):
(WebCore::buildSVGPathByteStreamFromSVGPathSegList):
(WebCore::buildPathFromByteStream):
(WebCore::buildSVGPathSegListFromByteStream):
(WebCore::buildStringFromByteStream):
(WebCore::buildStringFromSVGPathSegList):
(WebCore::buildSVGPathByteStreamFromString):
(WebCore::buildAnimatedSVGPathByteStream):
(WebCore::addToSVGPathByteStream):
2013-08-30 Andreas Kling <akling@apple.com>
Try to fix CSS_VARIABLES and CSS_DEVICE_ADAPTATION builds.
* css/StyleResolver.cpp:
(WebCore::StyleResolver::StyleResolver):
(WebCore::StyleResolver::resolveVariables):
2013-08-30 Commit Queue <commit-queue@webkit.org>
Unreviewed, rolling out r154891.
http://trac.webkit.org/changeset/154891
https://bugs.webkit.org/show_bug.cgi?id=120539
broke the mac build (Requested by Ossy on #webkit).
* platform/network/SynchronousLoaderClient.h:
2013-08-30 Csaba Osztrogonác <ossy@webkit.org>
Add USE(CFNETWORK) guard to SynchronousLoaderClient::didReceiveAuthenticationChallengedidReceiveAuthenticationChallenge()
https://bugs.webkit.org/show_bug.cgi?id=120532
Reviewed by Darin Adler.
* platform/network/SynchronousLoaderClient.h:
2013-08-30 Brent Fulgham <bfulgham@apple.com>
[Windows] Video inside page always uses non-hardware accelerated playback
https://bugs.webkit.org/show_bug.cgi?id=120448
Reviewed by Eric Carlson.
* platform/graphics/avfoundation/cf/MediaPlayerPrivateAVFoundationCF.cpp:
(WebCore::MediaPlayerPrivateAVFoundationCF::createAVPlayer): Check for
D3D device. If it doesn't exist, switch to compositing mode and try again.
2013-08-30 Leo Yang <leoyang@blackberry.com>
Possible dangling CachedResourceClient of StyleRuleImport and XSLImportRule
https://bugs.webkit.org/show_bug.cgi?id=120479
Reviewed by Darin Adler.
In StyleRuleImport::requestStyleSheet() and XSLImportRule::loadSheet() we
didn't call removeClient() for m_cachedSheet before assigning m_cachedSheet
a new value. This could leave the client as a client of the old cached
sheet and dangling after the client is deleted. Fix them by calling removeClient()
before assigning m_cacheSheet a new value.
Found by code inspection. Seems no way to test it automatically.
* css/StyleRuleImport.cpp:
(WebCore::StyleRuleImport::requestStyleSheet):
* xml/XSLImportRule.cpp:
(WebCore::XSLImportRule::loadSheet):
2013-08-30 Gabor Abraham <abrhm@inf.u-szeged.hu>
Fix unused parameter warning in graphics/cairo/GraphicsContextCairo.cpp file.
https://bugs.webkit.org/show_bug.cgi?id=120524
Reviewed by Darin Adler.
* platform/graphics/cairo/GraphicsContextCairo.cpp:
(WebCore::GraphicsContext::fillRectWithRoundedHole):
2013-08-30 Andreas Kling <akling@apple.com>
StyleResolver & friends should use Document&.
<https://webkit.org/b/120527>
Reviewed by Antti Koivisto.
Document&-ify StyleResolver, ElementRuleCollector and SelectorChecker.
2013-08-30 Brent Fulgham <bfulgham@apple.com>
[Windows] Unreviewed build correction after r154835. Only seen when doing a
full (clean) rebuild.
* DerivedSources.cpp: Remove reference to deleted JSHTMLDialogElement.cpp
2013-08-30 Tamas Czene <tczene@inf.u-szeged.hu>
Resolve unused parameter warning in FindController.cpp
https://bugs.webkit.org/show_bug.cgi?id=120407
Reviewed by Darin Adler.
* accessibility/atk/WebKitAccessibleInterfaceText.cpp:
(wordAtPositionForAtkBoundary):
2013-08-30 Arpita Bahuguna <a.bah@samsung.com>
setAttributeNode() does not set the new value to an existing attribute if specified attribute is in a different case.
https://bugs.webkit.org/show_bug.cgi?id=120293
Reviewed by Darin Adler.
setAttributeNode() performs a case-insensitive search for an existing
attribute. If an existing attribute is found, it retrieves the index of
such an attribute. For setting the attribute's new value, we call upon
setAttributeInternal() to which both the index as well as the name of
the attribute is passed.
The name passed to this method is the same as the one passed to the
setAttributeNode() API from the webpage and thus can be in any case.
However, setAttributeInternal() uses this name to get the corresponding
existing attribute node. Since this retrieval is not case-insensitive,
the existing node is not returned and thus the new value is not set on
the existing node.
We should instead use the passed index and use that to retrieve the
existing node.
Note that obtaining the attribute's value using getAttributeNode() would
still return the correct value, i.e. the new one.
Also, this change shall make our behavior similar to that of FF and IE.
Test: fast/dom/Element/setAttributeNode-for-existing-attribute.html
* dom/Element.cpp:
(WebCore::Element::setAttributeInternal):
If the passed index is not equal to attributeNotFound, we use that index
to retrieve the existing attribute.
2013-08-30 Mikhail Pozdnyakov <mikhail.pozdnyakov@intel.com>
SimpleClassVectorTraits shall be used for RuleData
https://bugs.webkit.org/show_bug.cgi?id=120526
Reviewed by Andreas Kling.
Whereas RuleData is POD type and whereas there are quite a lot of Vector<RuleData> occurrences in the code,
it makes sense to use SimpleClassVectorTraits for RuleData and hence to allow using more efficient mem functions
in vectors.
* css/RuleSet.h:
2013-08-30 Andreas Kling <akling@apple.com>
Node::document() should return a reference.
<https://webkit.org/b/120496>
Reviewed by Antti Koivisto.
Now that orphan DocumentType nodes also have document pointers, it's no longer
possible to have a null Node::document().
Cement this by making document() return a reference, and remove the various
null checks exposed by this.
2013-08-30 Andrei Parvu <parvu@adobe.com>
[CSS Masking] -webkit-mask-repeat: space does not work
Added the space option to background-repeat and -webkit-mask-repeat.
With the property value 'space', the background or mask image gets repeated as often as it fits within the background positioning
area. The repeated images are spaced equally to fill the unused area.
https://bugs.webkit.org/show_bug.cgi?id=119324
Reviewed by Dirk Schulze.
Tests: css3/background/background-repeat-space-border.html
css3/background/background-repeat-space-content.html
css3/background/background-repeat-space-padding.html
css3/masking/mask-repeat-space-border.html
css3/masking/mask-repeat-space-content.html
css3/masking/mask-repeat-space-padding.html
* platform/graphics/GeneratorGeneratedImage.cpp:
(WebCore::GeneratorGeneratedImage::drawPattern): Passed the space values to the image buffer.
* platform/graphics/Image.cpp:
(WebCore::Image::drawTiled): Added the space values when computing the location of the tile.
* platform/graphics/Image.h: Added the space property.
(WebCore::Image::spaceSize):
(WebCore::Image::setSpaceSize):
* platform/graphics/ImageBuffer.h: Added the space property.
(WebCore::ImageBuffer::spaceSize):
(WebCore::ImageBuffer::setSpaceSize):
* platform/graphics/cg/ImageBufferCG.cpp: Passed the space values when copying an image.
(WebCore::ImageBuffer::copyImage):
* platform/graphics/cg/ImageCG.cpp: Added the space values when creating a platform pattern.
(WebCore::Image::drawPattern):
* rendering/RenderBoxModelObject.cpp:
(WebCore::RenderBoxModelObject::paintFillLayerExtended): Computed the space values on x and y axis.
(WebCore::getSpace):
(WebCore::RenderBoxModelObject::calculateBackgroundImageGeometry): Pass the space values to the Image class.
* rendering/RenderBoxModelObject.h: Added the space property.
(WebCore::RenderBoxModelObject::BackgroundImageGeometry::spaceSize):
(WebCore::RenderBoxModelObject::BackgroundImageGeometry::setSpaceSize):
* svg/graphics/SVGImage.cpp: Passed the space property to the created image.
(WebCore::SVGImage::drawPatternForContainer):
* svg/graphics/SVGImageForContainer.cpp: Passed the space property to the image property.
(WebCore::SVGImageForContainer::drawPattern):
2013-08-30 Antti Koivisto <antti@apple.com>
Remove AttachContext
https://bugs.webkit.org/show_bug.cgi?id=120518
Reviewed by Andreas Kling.
This type is not useful anymore. Just pass the precomputed style to attachRenderTree and reattach-or-not flag to detachRenderTree.
* style/StyleResolveTree.cpp:
(WebCore::Style::createRendererIfNeeded):
(WebCore::Style::attachChildren):
(WebCore::Style::attachShadowRoot):
(WebCore::Style::attachRenderTree):
(WebCore::Style::detachChildren):
(WebCore::Style::detachShadowRoot):
(WebCore::Style::detachRenderTree):
(WebCore::Style::reattachRenderTree):
(WebCore::Style::resolveLocal):
* style/StyleResolveTree.h:
2013-08-30 Commit Queue <commit-queue@webkit.org>
Unreviewed, rolling out r154826.
http://trac.webkit.org/changeset/154826
https://bugs.webkit.org/show_bug.cgi?id=120517
Still breaks icloud.com (Requested by mwenge_ on #webkit).
* rendering/RenderBox.cpp:
(WebCore::RenderBox::computePositionedLogicalWidth):
(WebCore::RenderBox::computePositionedLogicalHeight):
* rendering/RenderBox.h:
(WebCore::RenderBox::intrinsicSize):
* rendering/RenderButton.h:
* rendering/RenderFileUploadControl.cpp:
(WebCore::RenderFileUploadControl::computePreferredLogicalWidths):
* rendering/RenderListBox.cpp:
(WebCore::RenderListBox::RenderListBox):
(WebCore::RenderListBox::computePreferredLogicalWidths):
(WebCore::RenderListBox::computeLogicalHeight):
* rendering/RenderListBox.h:
* rendering/RenderMenuList.h:
* rendering/RenderSlider.cpp:
(WebCore::RenderSlider::computePreferredLogicalWidths):
* rendering/RenderTextControl.cpp:
(WebCore::RenderTextControl::RenderTextControl):
(WebCore::RenderTextControl::computeLogicalHeight):
* rendering/RenderTextControl.h:
2013-08-29 Ryosuke Niwa <rniwa@webkit.org>
Unduplicate the code to convert between VisiblePosition and index
https://bugs.webkit.org/show_bug.cgi?id=120506
Reviewed by Darin Adler.
Encapsulate the conversion between VisiblePosition and index into indexForVisiblePosition
and visiblePositionForIndexUsingCharacterIterator. It's unfortunate that these two functions
are different from the two other existing functions of similar names but we've at least
confined problems into a single cpp file now.
* accessibility/AccessibilityRenderObject.cpp:
(WebCore::AccessibilityRenderObject::visiblePositionForIndex):
(WebCore::AccessibilityRenderObject::indexForVisiblePosition):
* editing/Editor.cpp:
(WebCore::findFirstMarkable):
* editing/htmlediting.cpp:
(WebCore::indexForVisiblePosition):
(WebCore::visiblePositionForIndexUsingCharacterIterator):
* editing/htmlediting.h:
* html/HTMLTextFormControlElement.cpp:
(WebCore::hasVisibleTextArea):
(WebCore::HTMLTextFormControlElement::setSelectionRange):
(WebCore::HTMLTextFormControlElement::indexForVisiblePosition):
(WebCore::HTMLTextFormControlElement::visiblePositionForIndex):
* html/HTMLTextFormControlElement.h:
* rendering/RenderTextControl.cpp:
* rendering/RenderTextControl.h:
2013-08-29 Ryosuke Niwa <rniwa@webkit.org>
Avoid Node references from AXObjectCache from leaking
https://bugs.webkit.org/show_bug.cgi?id=120501
Reviewed by Darin Adler.
Merge https://chromium.googlesource.com/chromium/blink/+/454f31497613b6d0fbcfb0df757254b64a177c06
without any tests since we don't have the same infrastructure to detect leaks in WebKit.
A real world example of this would be selecting an <option> item inside frame by keyboard. The node will not be deref()-ed until the topDocument() is detached.
The issue was that AccessibilityMenuListOption is created in childrenChanged()
hook called when its RenderObject is being destroyed. This patch modifies AccessibilityMenuListPopup so it won't create AccessibilityMenuListOption if its
element is already detached.
* accessibility/AccessibilityMenuListPopup.cpp:
(WebCore::AccessibilityMenuListPopup::menuListOptionAccessibilityObject):
* rendering/RenderMenuList.cpp:
(WebCore::RenderMenuList::didUpdateActiveOption):
2013-08-26 Simon Fraser <simon.fraser@apple.com>
Implement object-fit CSS property
https://bugs.webkit.org/show_bug.cgi?id=52040
Reviewed by Antti Koivisto, Sam Weinig.
Merge object-fit patch from Blink r156535, which started as a patch
by me.
Since then, the spec has gone to CR. This patch is an
implementation of object-fit as described in
http://www.w3.org/TR/2012/CR-css3-images-20120417/#object-fit
Object-fit is used to maintain the aspect ratio of replaced content
within its content box. All object-fit values but the initial one
('fill') will always ensure that the aspect ratio is retained, in
different ways (fit inside the content box, cover the content box, or
use intrinsic size). Painting is always clipped against the content
box, regardless of the 'overflow' property.
Tests: fast/css/object-fit/object-fit-canvas.html
fast/css/object-fit/object-fit-embed.html
fast/css/object-fit/object-fit-grow-landscape.html
fast/css/object-fit/object-fit-grow-portrait.html
fast/css/object-fit/object-fit-img-svg.html
fast/css/object-fit/object-fit-img-svg2.html
fast/css/object-fit/object-fit-img.html
fast/css/object-fit/object-fit-input-image.html
fast/css/object-fit/object-fit-object.html
fast/css/object-fit/object-fit-shrink.html
fast/css/object-fit/object-fit-video-poster.html
fast/css/parsing-object-fit.html
http/tests/css/object-fit-delayed-img-svg.html
media/video-object-fit-change.html
media/video-object-fit.html
* css/CSSComputedStyleDeclaration.cpp:
(WebCore::ComputedStyleExtractor::propertyValue):
* css/CSSParser.cpp:
(WebCore::isValidKeywordPropertyAndValue):
(WebCore::isKeywordPropertyID):
(WebCore::CSSParser::parseValue):
* css/CSSPrimitiveValueMappings.h:
(WebCore::CSSPrimitiveValue::CSSPrimitiveValue):
(WebCore::CSSPrimitiveValue::operator EObjectFit):
* css/CSSProperty.cpp:
(WebCore::CSSProperty::isInheritedProperty):
* css/CSSPropertyNames.in:
* css/CSSValueKeywords.in:
* css/DeprecatedStyleBuilder.cpp:
(WebCore::DeprecatedStyleBuilder::DeprecatedStyleBuilder):
* css/StyleResolver.cpp:
(WebCore::StyleResolver::applyProperty):
* css/html.css:
(video): Set object-fit to 'contain'. This is how VIDEO elements
work, apparently.
* loader/cache/CachedImage.cpp:
(WebCore::CachedImage::imageSizeForRenderer):
* loader/cache/CachedImage.h:
* platform/graphics/LayoutSize.h:
(WebCore::fitLayoutSizeToAspectRatio): New function to grow or shrink
in one dimension to fit to the aspect ratio.
* rendering/RenderHTMLCanvas.cpp:
(WebCore::RenderHTMLCanvas::paintReplaced): Apply object-fit and
clip if necessary.
* rendering/RenderImage.cpp:
(WebCore::RenderImage::updateInnerContentRect):
(WebCore::RenderImage::imageDimensionsChanged): Update intrinsic
size properly, and recalculate the inner content rectangle (the
exact area occupied by the replaced content) again if appropriate.
(WebCore::RenderImage::paintReplaced): Apply object-fit and clip
if necessary.
(WebCore::RenderImage::foregroundIsKnownToBeOpaqueInRect):
object-fit may leave parts of the content box empty, in which case
it won't be fully obscured.
(WebCore::RenderImage::layout):
* rendering/RenderImage.h:
* rendering/RenderImageResource.cpp:
(WebCore::RenderImageResource::intrinsicSize): Need this to
differentiate between intrinsic and extrinsic size for SVG images.
* rendering/RenderImageResource.h:
* rendering/RenderImageResourceStyleImage.h:
* rendering/RenderReplaced.cpp:
(WebCore::RenderReplaced::replacedContentRect): Return the
rectangle occupied by the replaced content. This will be identical
to the content box if object-fit is 'fill', but will typically be
something else for other values.
* rendering/RenderReplaced.h:
* rendering/RenderVideo.cpp:
(WebCore::RenderVideo::videoBox): Not much left to do here, with
the new RenderReplaced::replacedContentRect() method in place.
(WebCore::RenderVideo::paintReplaced): Apply object-fit and clip
if necessary.
* rendering/style/RenderStyle.cpp:
(WebCore::RenderStyle::changeRequiresRepaint):
* rendering/style/RenderStyle.h:
* rendering/style/RenderStyleConstants.h:
* rendering/style/StyleRareNonInheritedData.cpp:
(WebCore::StyleRareNonInheritedData::StyleRareNonInheritedData):
(WebCore::StyleRareNonInheritedData::operator==):
* rendering/style/StyleRareNonInheritedData.h:
2013-08-29 Tim Horton <timothy_horton@apple.com>
SVG clipping, masking, and gradients-on-text do not respect the device scale factor
https://bugs.webkit.org/show_bug.cgi?id=120377
<rdar://problem/14777944>
Reviewed by Simon Fraser.
Tests: svg/custom/masking-clipping-hidpi.svg
calculateTransformationToOutermostCoordinateSystem should include the page's
device scale factor in its transform.
* rendering/svg/SVGRenderingContext.cpp:
(WebCore::SVGRenderingContext::calculateTransformationToOutermostCoordinateSystem):
2013-08-29 Chris Fleizach <cfleizach@apple.com>
AX: Crash when VoiceOver reference a TextMarker from an iframe that has been removed
https://bugs.webkit.org/show_bug.cgi?id=120318
Reviewed by Darin Adler.
These crashes occur because an AXTextMarker is retrieved that reference a Node in an iframe.
The iframe goes away, but when it tries to clean up and remove that Node from the InUse cache,
the document() tree has already been detached, so it never clears the actual InUse cache.
The fix here is to pre-emptively clean up any nodes in the document going away when the frame is about to disconnect.
I'm removing the clearAXObjectCache() at the disconnectOwnerElement because it
1) Cleared the AXObjectCache for the iframe document (which is always empty -- only the top level doc maintains the cache), because
the document() tree had already been detached... so it essentially did nothing.
2) And if it did work, we wouldn't want this behavior -- that is to say, when an iframe goes away, we don't want to clear the entire cache for all
the other documents (there's even an existing layout test to verify this behavior).
Test: platform/mac/accessibility/stale-textmarker-crash.html
* accessibility/AXObjectCache.cpp:
(WebCore::AXObjectCache::clearTextMarkerNodesInUse):
* accessibility/AXObjectCache.h:
* page/Frame.cpp:
(WebCore::Frame::disconnectOwnerElement):
2013-08-29 Brent Fulgham <bfulgham@apple.com>
[Windows] More unreviewed gardening of project file.
Move css files inline with related source code.
* WebCore.vcxproj/WebCore.vcxproj:
* WebCore.vcxproj/WebCore.vcxproj.filters:
2013-08-29 Sam Weinig <sam@webkit.org>
Add ENABLE guards for Promises
https://bugs.webkit.org/show_bug.cgi?id=120488
Reviewed by Andreas Kling.
* Configurations/FeatureDefines.xcconfig:
2013-08-29 Andreas Kling <akling@apple.com>
Inspector: Use a bit of RefPtr::release() in generated code.
<https://webkit.org/b/120485>
Reviewed by Darin Adler.
Just something I spotted while reading InspectorBackendDispatcher.cpp.
Avoid 3 cases of reference count churnery.
* inspector/CodeGeneratorInspectorStrings.py:
2013-08-29 Christophe Dumez <ch.dumez@sisa.samsung.com>
According to DOM4, all DocType nodes should have a document
https://bugs.webkit.org/show_bug.cgi?id=99244
Reviewed by Darin Adler.
Doctypes now always have a node document and can be moved across document boundaries as per
the latest DOM4 specification:
http://dom.spec.whatwg.org/#dom-domimplementation-createdocumenttype
http://dom.spec.whatwg.org/#dom-node-ownerdocument
This means that DOMImplementation.createDocumentType() now sets the ownerDocument of the
new DocumentType Node to the associated document of the current "context" object. In
DOM4, all nodes have a document at all times. DocumentType nodes can now be moved across
document boundaries so that the node can be added to a Document after being created.
This means we will no longer need to special case DocumentType nodes in the code and
Node::document() can no longer return NULL, which means that we'll be able to remove
NULL checks in call sites.
Firefox stable and since recently Blink already follow DOM4 here while IE10 does not (yet).
Test: fast/dom/createDocumentType-ownerDocument.html
* dom/ContainerNode.cpp:
(WebCore::checkAcceptChild):
* dom/DOMImplementation.cpp:
(WebCore::DOMImplementation::createDocumentType):
(WebCore::DOMImplementation::createDocument):
* dom/Node.h:
(WebCore::Node::document):
2013-08-29 Darin Adler <darin@apple.com>
Pasteboard::writeSelection violates layering (first step, fixes it for Mac platform only)
https://bugs.webkit.org/show_bug.cgi?id=120483
Reviewed by Anders Carlsson.
* editing/Editor.cpp:
(WebCore::Editor::cut): Added some comments. Use the new writeSelectionToPasteboard
function on Mac instead of Pasteboard::writeSelection.
(WebCore::Editor::copy): Ditto.
* editing/Editor.h: Removed an old unused Mac-only writeSelectionToPasteboard function
that was a cover that called through to Pasteboard::writeSelectionForTypes. Added a new
Mac-only writeSelectionToPasteboard function that is destined to become cross-platform soon.
* editing/mac/EditorMac.mm:
(WebCore::Editor::writeSelectionToPasteboard): Added. Uses a new pattern where the Editor
puts all the data into a structure called PasteboardWebContent then calls the Pasteboard to
do the work. The platform-specific aspect of PasteboardWebContent is what formats are needed
for each platform.
* page/DragController.cpp:
(WebCore::DragController::startDrag): Added some comments. Use the new writeSelectionToPasteboard
function on Mac instead of Pasteboard::writeSelection.
* platform/Pasteboard.h: Remove some unneeded forward declarations. Added comments for all functions
that don't belong in this class because they are layering violations; this becomes the to do list for
the project we are beginning here. Added the new PasteboardWebContent structure, empty on all platforms
except for Mac for now. Removed writeSelectionForTypes, a Mac-only function that is no longer used.
Added setTypes and writeAfterSettingTypes, the two halves of the future function named writeWebContent.
Put the writeSelection function inside a "not Mac" if statement. Later to be deleted entirely.
* platform/mac/PasteboardMac.mm: Removed now-unneeded selectionPasteboardTypes,
Pasteboard::writeSelectionForTypes, and writeSelection functions.
(WebCore::Pasteboard::setTypes): Added. First half of writing web content to the pasteboard.
(WebCore::Pasteboard::writeAfterSettingTypes): Added. Second half of writing web content to the pasteboard.
2013-08-29 Antti Koivisto <antti@apple.com>
Remove code behind ENABLE(DIALOG_ELEMENT)
https://bugs.webkit.org/show_bug.cgi?id=120467
Reviewed by Darin Adler.
It is incomplete and no one is building it.
* CMakeLists.txt:
* Configurations/FeatureDefines.xcconfig:
* DerivedSources.make:
* DerivedSources.pri:
* GNUmakefile.list.am:
* Target.pri:
* WebCore.exp.in:
* WebCore.xcodeproj/project.pbxproj:
* bindings/generic/RuntimeEnabledFeatures.cpp:
* bindings/generic/RuntimeEnabledFeatures.h:
* css/StyleResolver.cpp:
(WebCore::StyleResolver::adjustRenderStyle):
* css/html.css:
* dom/ContextFeatures.cpp:
* dom/ContextFeatures.h:
* dom/Document.cpp:
* dom/Document.h:
* dom/Element.cpp:
(WebCore::Element::removedFrom):
(WebCore::Element::setContainsFullScreenElementOnAncestorsCrossingFrameBoundaries):
* dom/Element.h:
(WebCore::Element::isDisabledFormControl):
* dom/ElementRareData.h:
(WebCore::ElementRareData::ElementRareData):
* html/HTMLDialogElement.cpp: Removed.
* html/HTMLDialogElement.h: Removed.
* html/HTMLDialogElement.idl: Removed.
* html/HTMLElementsAllInOne.cpp:
* html/HTMLTagNames.in:
* rendering/RenderDialog.cpp: Removed.
* rendering/RenderDialog.h: Removed.
* rendering/RenderLayer.cpp:
(WebCore::RenderLayer::rebuildZOrderLists):
(WebCore::RenderLayer::collectLayers):
* rendering/RenderLayer.h:
* rendering/RenderObject.h:
(WebCore::RenderObject::isCounter):
* rendering/RenderingAllInOne.cpp:
* testing/InternalSettings.cpp:
(WebCore::InternalSettings::Backup::Backup):
(WebCore::InternalSettings::Backup::restoreTo):
* testing/InternalSettings.h:
2013-08-29 Simon Fraser <simon.fraser@apple.com>
Fix slider thumb event handling to use local, not absolute coordinates
https://bugs.webkit.org/show_bug.cgi?id=120480
Reviewed by Darin Adler.
SliderThumbElement::setPositionFromPoint() did all of its coordinate
math by mapping renderer rects into absolute coordinates, which was
unnecessary and expensive.
Fix by doing all the math in the coordinate space of the input's
renderer. This simplified the code. Also, currentPosition
was computed but unused, so was removed.
No behavior change. Tested by fast/forms/range/slider-transformed.html
* html/shadow/SliderThumbElement.cpp:
(WebCore::SliderThumbElement::setPositionFromPoint):
2013-08-29 Zan Dobersek <zdobersek@igalia.com>
[Automake] libWebCoreDOM.la could use a better name
https://bugs.webkit.org/show_bug.cgi?id=120232
Reviewed by Martin Robinson.
* bindings/gobject/GNUmakefile.am: Rename the libWebCoreDOM library to libGObjectDOMBindings.
2013-08-29 Joseph Pecoraro <pecoraro@apple.com>
Web Inspector: Download Web Archive of Inspected Page
https://bugs.webkit.org/show_bug.cgi?id=119774
Reviewed by Timothy Hatcher.
Add PageAgent.archive which will return a Base-64 encoded web archive
when successful. In order to then allow saving non-string files, extend
InspectorFrontendHost.save to allow for Base-64 encoded data.
* inspector/Inspector.json:
* inspector/InspectorPageAgent.cpp:
(WebCore::InspectorPageAgent::archive):
* inspector/InspectorPageAgent.h:
Introduce and implement PageAgent.archive. Create a Web Archive of the
page's main frame.
* inspector/InspectorFrontendClient.h:
* inspector/InspectorFrontendClientLocal.h:
(WebCore::InspectorFrontendClientLocal::save):
* inspector/InspectorFrontendHost.cpp:
(WebCore::InspectorFrontendHost::save):
* inspector/InspectorFrontendHost.h:
* inspector/InspectorFrontendHost.idl:
Extend InspectorFrontendHost.save to include a base64Encoded param.
* inspector/front-end/FileManager.js:
* inspector/front-end/InspectorFrontendHostStub.js:
(.WebInspector.InspectorFrontendHostStub.prototype.save):
Misc. updates to the old inspector for function changes.
2013-08-29 Robert Hogan <robert@webkit.org>
Positioned Replaced Elements That Aren't RenderReplaced get Incorrect Width
https://bugs.webkit.org/show_bug.cgi?id=93735
Reviewed by David Hyatt.
Replaced elements that aren't RenderReplaced aren't |isReplaced| and don't have an
intrinsic height or width. This causes them to go down the wrong height and width computation
path in RenderBox when they are absolute positioned.
The notion of |isReplaced| is entwined with the notion of being |isInline| so it isn't really
possible to make them isReplaced without re-wiring a lot of code. So instead use an ad-hoc definition
of isReplacedElement in RenderBox to bring all replaced elements into the height and width calculation.
To make sure we get the right height and width in there, give non-RenderReplaced replaced renderers
the helpers for returning their approximation of intrinsic height and width.
The initial attempt at landing this patch had to be rolled out because it used LayoutUnit() for default
intrinsic height of some replaced elements and this made the layout of the elements unstable in some sites.
The fix for this issue is captured in intrinsic-button-and-input-height.html.
Tests: fast/replaced/intrinsic-button-and-input-height.html
fast/replaced/width-and-height-of-positioned-replaced-elements.html
* rendering/RenderBox.cpp:
(WebCore::isReplacedElement):
(WebCore::RenderBox::computePositionedLogicalWidth):
(WebCore::RenderBox::computePositionedLogicalHeight):
* rendering/RenderBox.h:
(WebCore::RenderBox::intrinsicSize):
* rendering/RenderButton.h:
* rendering/RenderFileUploadControl.cpp:
(WebCore::RenderFileUploadControl::computePreferredLogicalWidths):
* rendering/RenderListBox.cpp:
(WebCore::RenderListBox::RenderListBox):
(WebCore::RenderListBox::computePreferredLogicalWidths):
(WebCore::RenderListBox::computeLogicalHeight):
* rendering/RenderListBox.h:
* rendering/RenderMenuList.h:
* rendering/RenderReplaced.h:
* rendering/RenderSlider.cpp:
(WebCore::RenderSlider::computePreferredLogicalWidths):
* rendering/RenderTextControl.cpp:
(WebCore::RenderTextControl::RenderTextControl):
(WebCore::RenderTextControl::computeLogicalHeight):
* rendering/RenderTextControl.h:
2013-08-29 Brent Fulgham <bfulgham@apple.com>
[Windows] Unreviewed gardening. Add missing *.css files from project.
* WebCore.vcxproj/WebCore.vcxproj:
* WebCore.vcxproj/WebCore.vcxproj.filters:
2013-08-29 Pratik Solanki <pratik.solanki@gmail.com>
SharedBuffer m_segments and m_dataArray must be exclusive
https://bugs.webkit.org/show_bug.cgi?id=77715
Reviewed by Benjamin Poulain.
When USE(NETWORK_CFDATA_ARRAY_CALLBACK) is enabled, we use m_dataArray to hold the incoming
data. We do not use m_segments. Since they are exclusive in practice, do not define or use
m_segments when NETWORK_CFDATA_ARRAY_CALLBACK is enabled.
No new tests because no functional changes.
* platform/SharedBuffer.cpp:
(WebCore::SharedBuffer::append):
(WebCore::SharedBuffer::clear):
(WebCore::SharedBuffer::copy):
(WebCore::SharedBuffer::buffer):
(WebCore::SharedBuffer::getSomeData):
* platform/SharedBuffer.h:
2013-08-29 Daniel Bates <dabates@apple.com>
[iOS] Upstream changes to WebCore/style
https://bugs.webkit.org/show_bug.cgi?id=120173
Reviewed by Darin Adler.
* style/StyleResolveTree.cpp:
(WebCore::Style::elementImplicitVisibility): Added; specific to iOS.
(WebCore::Style::CheckForVisibilityChangeOnRecalcStyle::CheckForVisibilityChangeOnRecalcStyle): Added; specific to iOS.
(WebCore::Style::CheckForVisibilityChangeOnRecalcStyle::~CheckForVisibilityChangeOnRecalcStyle): Added; specific to iOS.
(WebCore::Style::resolveTree): Modified to instantiate CheckForVisibilityChangeOnRecalcStyle when building on iOS.
2013-08-29 Arnaud Renevier <a.renevier@samsung.com>
[cairo] canvas drawing on itself doesn't work with accelerated canvas
https://bugs.webkit.org/show_bug.cgi?id=118808
Reviewed by Martin Robinson.
When copying an accelerated image, we try to get its dimensions with
cairo_image_surface_get_width/cairo_image_surface_get_height. As
surface is not an image, this returns width and height of 0.
Many other places use cairo_image_surface_get although the surface may
be a gl surface.
This patch fixes those issues by implementing a cairoSurfaceSize
helper that returns the surface size whatever type it is.
It use cairo_surface_create_similar instead of
cairo_image_surface_create in copyCairoImageSurface. It also calls
cairo_paint in encodeImage when a drawing over a black background is
needed.
It copies the surface to an image surface if needed in extractImage.
No new tests. Covered by existing tests.
* platform/graphics/cairo/BitmapImageCairo.cpp:
(WebCore::BitmapImage::BitmapImage):
(WebCore::BitmapImage::draw):
(WebCore::BitmapImage::checkForSolidColor):
* platform/graphics/cairo/CairoUtilities.cpp:
(WebCore::copyCairoImageSurface):
(WebCore::cairoSurfaceSize):
* platform/graphics/cairo/CairoUtilities.h:
* platform/graphics/cairo/GraphicsContext3DCairo.cpp:
(WebCore::GraphicsContext3D::ImageExtractor::extractImage):
* platform/graphics/gtk/GdkCairoUtilities.cpp:
(cairoSurfaceToGdkPixbuf):
* platform/graphics/gtk/GdkCairoUtilities.h:
* platform/graphics/gtk/ImageBufferGtk.cpp:
(WebCore::encodeImage):
* platform/graphics/gtk/ImageGtk.cpp:
(WebCore::BitmapImage::getGdkPixbuf):
* platform/gtk/DragIcon.cpp:
(WebCore::DragIcon::setImage):
2013-08-29 Tamas Czene <tczene@inf.u-szeged.hu>
Buildfix after r154806 for !ENABLE(CSS_REGIONS) platforms.
https://bugs.webkit.org/show_bug.cgi?id=120461
Reviewed by Csaba Osztrogonác.
moveToFlowThreadIfNeeded() is used only inside of ENABLE(CSS_REGIONS)
block (and only once), so it should be guarded too.
* style/StyleResolveTree.cpp:
2013-08-29 David Kilzer <ddkilzer@apple.com>
BUILD FIX (r154778): AXSearchFieldCancelButtonText() is not defined on iOS
See: AX: Cancel button in search field not accessible.
<https://webkit.org/b/120322>
Fixes the following build error:
In file included from Source/WebCore/accessibility/AccessibilityAllInOne.cpp:44:
Source/WebCore/accessibility/AccessibilitySearchFieldButtons.cpp:46:12: error: use of undeclared identifier 'AXSearchFieldCancelButtonText'
return AXSearchFieldCancelButtonText();
^
1 error generated.
* accessibility/AccessibilitySearchFieldButtons.cpp:
(WebCore::AccessibilitySearchFieldCancelButton::accessibilityDescription):
Return String() instead of calling AXSearchFieldCancelButtonText() on iOS.
2013-08-29 Antti Koivisto <antti@apple.com>
Remove NodeRenderingContext
https://bugs.webkit.org/show_bug.cgi?id=120466
Reviewed by Andreas Kling.
Switch the few remaining clients of this class to call the underlying code directly.
* CMakeLists.txt:
* GNUmakefile.list.am:
* Target.pri:
* WebCore.exp.in:
* WebCore.vcxproj/WebCore.vcxproj:
* WebCore.xcodeproj/project.pbxproj:
* css/StyleResolver.cpp:
(WebCore::StyleResolver::State::initForStyleResolve):
* dom/DOMAllInOne.cpp:
* dom/Node.cpp:
* dom/Node.h:
Remove Node::parentNodeForRenderingAndStyle(). Make clients invoke NodeRenderingTraversal::parent() directly.
* dom/NodeRenderingContext.cpp: Removed.
* dom/NodeRenderingContext.h: Removed.
* dom/ShadowRoot.h:
* dom/Text.cpp:
* dom/Text.h:
* dom/TreeScope.cpp:
* dom/TreeScope.h:
Remove virtual TreeScope::resetStyleInheritance. Make clients cast to ShadowRoot when needed.
* html/HTMLSummaryElement.cpp:
(WebCore::HTMLSummaryElement::detailsElement):
* style/StyleResolveTree.cpp:
(WebCore::Style::createTextRendererIfNeeded):
For consistency switch resetStyleInheritance check to use parentNode() instead of renderingParentNode. This matches the NodeRenderingTraversal implementation.
This difference is probably not testable in current trunk.
(WebCore::Style::resolveTree):
2013-08-29 Antti Koivisto <antti@apple.com>
Move element renderer creation out of NodeRenderingContext
https://bugs.webkit.org/show_bug.cgi?id=120461
Reviewed by Andreas Kling.
Move NodeRenderingContext::createRendererIfNeeded() and the related utility functions to StyleResolveTree.
Tighten typing and constness. Refactor sligthly to be more understandable.
* dom/Element.cpp:
(WebCore::Element::shouldMoveToFlowThread):
* dom/Element.h:
* dom/NodeRenderingContext.cpp:
(WebCore::NodeRenderingContext::NodeRenderingContext):
(WebCore::NodeRenderingContext::nextRenderer):
(WebCore::NodeRenderingContext::previousRenderer):
(WebCore::NodeRenderingContext::parentRenderer):
* dom/NodeRenderingContext.h:
* dom/PseudoElement.h:
* style/StyleResolveTree.cpp:
(WebCore::Style::nextSiblingRenderer):
(WebCore::Style::shouldCreateRenderer):
(WebCore::Style::elementInsideRegionNeedsRenderer):
(WebCore::Style::moveToFlowThreadIfNeeded):
(WebCore::Style::createRendererIfNeeded):
(WebCore::Style::attachRenderTree):
* svg/SVGElement.cpp:
(WebCore::SVGElement::shouldMoveToFlowThread):
* svg/SVGElement.h:
2013-08-28 Chris Fleizach <cfleizach@apple.com>
AX: WebProcess at com.apple.WebCore: WebCore::AXObjectCache::rootObject + 27
https://bugs.webkit.org/show_bug.cgi?id=120434
Reviewed by Darin Adler.
Crash logs indicate that there's a null pointer access in rootObject. That seems like it could only
happen in Document was null.
Unfortunately, there are no reproducible steps and no other information to construct a test case.
* accessibility/AXObjectCache.cpp:
(WebCore::AXObjectCache::rootObject):
2013-08-28 Ryosuke Niwa <rniwa@webkit.org>
The code to look for an ancestor form element is duplicated in three different places
https://bugs.webkit.org/show_bug.cgi?id=120391
Reviewed by Darin Adler.
Unduplicated the code by putting a single implementation in HTMLFormElement.cpp.
* WebCore.order:
* html/FormAssociatedElement.cpp:
(WebCore::FormAssociatedElement::findAssociatedForm):
(WebCore::FormAssociatedElement::formAttributeChanged):
* html/HTMLElement.cpp:
(WebCore::HTMLElement::virtualForm):
* html/HTMLElement.h:
* html/HTMLFormControlElement.cpp:
(WebCore::HTMLFormControlElement::HTMLFormControlElement):
* html/HTMLFormElement.cpp:
(WebCore::HTMLFormElement::findClosestFormAncestor):
* html/HTMLFormElement.h:
* html/HTMLImageElement.cpp:
(WebCore::HTMLImageElement::insertedInto):
* html/HTMLObjectElement.cpp:
(WebCore::HTMLObjectElement::HTMLObjectElement):
* html/parser/HTMLTreeBuilder.cpp:
(WebCore::HTMLTreeBuilder::HTMLTreeBuilder):
2013-08-28 Ryosuke Niwa <rniwa@webkit.org>
Stop throwing DOM exceptions in internal 'XMLHttpRequest' response getters
https://bugs.webkit.org/show_bug.cgi?id=120446
Reviewed by Alexey Proskuryakov.
Merge https://chromium.googlesource.com/chromium/blink/+/c8188c21452501b68950a9fcc1f5cbc7b4de4df5
Unlike 'responseText' and 'responseXML', 'responseBlob' and
'responseArrayBuffer' are not exposed to JavaScript (they don't
appear in the IDL or in the specification). As they are only called from
custom bindings in response to a JavaScript call to the 'response' getter,
we can safely replace the exception-throwing code in the implementation
with an ASSERT that the request type is correct.
* bindings/js/JSXMLHttpRequestCustom.cpp:
(WebCore::JSXMLHttpRequest::response):
* xml/XMLHttpRequest.cpp:
(WebCore::XMLHttpRequest::responseBlob):
(WebCore::XMLHttpRequest::responseArrayBuffer):
* xml/XMLHttpRequest.h:
2013-08-28 Chris Curtis <chris_curtis@apple.com>
https://bugs.webkit.org/show_bug.cgi?id=119548
Refactoring Exception throws.
Reviewed by Geoffrey Garen.
Gets column information from the error object for reporting exceptions.
* bindings/js/JSDOMBinding.cpp:
(WebCore::reportException):
* bindings/js/ScriptCallStackFactory.cpp:
(WebCore::createScriptCallStackFromException):
Moved setting an exception into the vm, These functions changed to use the new functionality.
* bindings/js/JSAudioBufferSourceNodeCustom.cpp:
(WebCore::JSAudioBufferSourceNode::setBuffer):
* bindings/js/JSBiquadFilterNodeCustom.cpp:
(WebCore::JSBiquadFilterNode::setType):
* bindings/js/JSCryptoCustom.cpp:
(WebCore::JSCrypto::getRandomValues):
* bindings/js/JSDOMBinding.cpp:
(WebCore::setDOMException):
* bindings/js/JSInjectedScriptHostCustom.cpp:
(WebCore::JSInjectedScriptHost::setFunctionVariableValue):
* bindings/js/JSJavaScriptCallFrameCustom.cpp:
(WebCore::JSJavaScriptCallFrame::evaluate):
(WebCore::JSJavaScriptCallFrame::setVariableValue):
* bindings/js/JSNodeFilterCondition.cpp:
(WebCore::JSNodeFilterCondition::acceptNode):
* bindings/js/JSOscillatorNodeCustom.cpp:
(WebCore::JSOscillatorNode::setType):
* bindings/js/JSPannerNodeCustom.cpp:
(WebCore::JSPannerNode::setPanningModel):
(WebCore::JSPannerNode::setDistanceModel):
* bindings/js/JSSVGLengthCustom.cpp:
(WebCore::JSSVGLength::convertToSpecifiedUnits):
* bindings/js/JSWebGLRenderingContextCustom.cpp:
(WebCore::getObjectParameter):
(WebCore::JSWebGLRenderingContext::getAttachedShaders):
(WebCore::JSWebGLRenderingContext::getExtension):
(WebCore::JSWebGLRenderingContext::getFramebufferAttachmentParameter):
(WebCore::JSWebGLRenderingContext::getParameter):
(WebCore::JSWebGLRenderingContext::getProgramParameter):
(WebCore::JSWebGLRenderingContext::getShaderParameter):
(WebCore::JSWebGLRenderingContext::getUniform):
(WebCore::dataFunctionf):
(WebCore::dataFunctioni):
(WebCore::dataFunctionMatrix):
* bindings/js/JSXMLHttpRequestCustom.cpp:
(WebCore::JSXMLHttpRequest::open):
* bindings/js/SerializedScriptValue.cpp:
(WebCore::CloneBase::throwStackOverflow):
(WebCore::CloneDeserializer::throwValidationError):
(WebCore::SerializedScriptValue::maybeThrowExceptionIfSerializationFailed):
* bindings/js/WorkerScriptController.cpp:
(WebCore::WorkerScriptController::evaluate):
(WebCore::WorkerScriptController::setException):
* bridge/c/c_instance.cpp:
(JSC::Bindings::CInstance::moveGlobalExceptionToExecState):
(JSC::Bindings::CInstance::invokeMethod):
(JSC::Bindings::CInstance::invokeDefaultMethod):
(JSC::Bindings::CInstance::invokeConstruct):
(JSC::Bindings::CInstance::toJSPrimitive):
* bridge/objc/objc_instance.mm:
(ObjcInstance::invokeMethod):
* bridge/objc/objc_runtime.mm:
(JSC::Bindings::ObjcArray::setValueAt):
(JSC::Bindings::ObjcArray::valueAt):
* bridge/objc/objc_utility.mm:
(JSC::Bindings::throwError):
* bridge/qt/qt_instance.cpp:
(JSC::Bindings::QtField::valueFromInstance):
(JSC::Bindings::QtField::setValueToInstance):
* bridge/runtime_array.cpp:
(JSC::RuntimeArray::put):
(JSC::RuntimeArray::putByIndex):
* bridge/runtime_object.cpp:
(JSC::Bindings::RuntimeObject::throwInvalidAccessError):
2013-08-28 Alexey Proskuryakov <ap@apple.com>
Remove an unused data member from Page.
Rubber-stamped by Brady Eidson.
* page/Page.cpp:
* page/Page.h:
Removed m_cookieEnabled. This was completely dead code, long obsoleted by PageSettings.
2013-08-28 Gustavo Noronha Silva <gns@gnome.org>
Unreviewed build fix - copy/paste failure, copied too much.
* bindings/gobject/WebKitDOMCustom.h:
2013-08-28 Dean Jackson <dino@apple.com>
[WebGL] CoreGraphics can provide greyscale image data
https://webkit.org/b/120443
Reviewed by Simon Fraser.
CoreGraphics can decode greyscale or greyscale+alpha images
while preserving the format. Our WebGL texture unpacker
was seeing this and assuming it meant the data did not come
from an <img> element. Since that method already special cased
CoreGraphics, the fix was to simply return true for these
extra types.
I also renamed srcFormatComeFromDOMElementOrImageData
to srcFormatComesFromDOMElementOrImageData.
Test: fast/canvas/webgl/tex-image-with-greyscale-image.html
* platform/graphics/GraphicsContext3D.cpp: Call new name.
* platform/graphics/GraphicsContext3D.h:
(WebCore::GraphicsContext3D::srcFormatComesFromDOMElementOrImageData):
Add support for R8, AR8, A8, and RA8 data formats.
2013-08-28 Gustavo Noronha Silva <gns@gnome.org>
[GTK] HTMLElement lost setID and getID - need to add compatibility symbols
https://bugs.webkit.org/show_bug.cgi?id=120440
Reviewed by Martin Robinson.
No tests, just adding compatibility symbols.
setID and getID were removed, and the parent class (Element) ones should be used instead.
We need to keep our ABI compatible, though, so add compatibility symbols.
* bindings/gobject/WebKitDOMCustom.cpp:
(webkit_dom_html_element_get_id):
(webkit_dom_html_element_set_id):
* bindings/gobject/WebKitDOMCustom.h:
2013-08-28 Simon Fraser <simon.fraser@apple.com>
Fix compositing layers in columns
https://bugs.webkit.org/show_bug.cgi?id=120436
Reviewed by Dave Hyatt.
Remove the old hack in RenderLayer::updateLayerPosition() for placing
layers in columns, which changed the layer position for composited
layers; this broke hit-testing.
Fix a better way by moving compositing layers to the correct
positions that take column offsets into account, by fixing
RenderLayer::convertToLayerCoords() to optionally apply column
adjustment, and using this in the code which positions compositing layers.
Tests: compositing/columns/ancestor-clipped-in-paginated.html
compositing/columns/clipped-in-paginated.html
compositing/columns/composited-columns-vertical-rl.html
compositing/columns/composited-columns.html
compositing/columns/composited-in-paginated-rl.html
compositing/columns/composited-in-paginated-writing-mode-rl.html
compositing/columns/composited-lr-paginated-repaint.html
compositing/columns/composited-rl-paginated-repaint.html
compositing/columns/hittest-composited-in-paginated.html
compositing/columns/rotated-in-paginated.html
compositing/columns/untransformed-composited-in-paginated.html
* rendering/RenderLayer.cpp:
(WebCore::RenderLayer::updateLayerPosition):
(WebCore::RenderLayer::convertToPixelSnappedLayerCoords):
(WebCore::accumulateOffsetTowardsAncestor):
(WebCore::RenderLayer::convertToLayerCoords):
* rendering/RenderLayer.h:
* rendering/RenderLayerBacking.cpp:
(WebCore::RenderLayerBacking::updateCompositedBounds):
(WebCore::RenderLayerBacking::updateGraphicsLayerGeometry):
2013-08-28 Brent Fulgham <bfulgham@webkit.org>
[WinCairo] Unreviewed build fix.
* WebCore.vcxproj/WebCore.vcxproj: Don't exclude the full screen
window from the build.
* WebCore.vcxproj/WebCore.vcxproj.filters: Ditto.
2013-08-28 Benjamin Poulain <benjamin@webkit.org>
Fix the build after r154780
* dom/SpaceSplitString.cpp:
(WebCore::SpaceSplitStringData::create):
2013-08-27 Benjamin Poulain <bpoulain@apple.com>
Simplify and clean SpaceSplitString
https://bugs.webkit.org/show_bug.cgi?id=120385
Reviewed by Ryosuke Niwa.
Clean up of SpaceSplitString following the cleaning of the DOMTokenList hierarchy.
This brings the following:
- Fix the coding style of the header.
- Remove the concepts of empty and null. The list can now be empty or have something.
There is no null state.
- Put the tokens directly following SpaceSplitStringData instead of using a Vector in between.
* WebCore.exp.in:
* dom/ElementData.h:
(WebCore::ElementData::hasClass):
* dom/SpaceSplitString.cpp:
(WebCore::tokenizeSpaceSplitString):
(WebCore::SpaceSplitStringData::containsAll):
(WebCore::SpaceSplitString::set):
(WebCore::SpaceSplitString::spaceSplitStringContainsValue):
(WebCore::TokenCounterProcessor::TokenCounterProcessor):
(WebCore::TokenCounterProcessor::processToken):
(WebCore::TokenCounterProcessor::tokenCount):
(WebCore::TokenInitializerProcessor::TokenInitializerProcessor):
(WebCore::TokenInitializerProcessor::processToken):
(WebCore::TokenInitializerProcessor::nextMemoryBucket):
(WebCore::SpaceSplitStringData::create):
(WebCore::SpaceSplitStringData::destroy):
* dom/SpaceSplitString.h:
(WebCore::SpaceSplitStringData::contains):
(WebCore::SpaceSplitStringData::size):
(WebCore::SpaceSplitStringData::operator[]):
(WebCore::SpaceSplitStringData::ref):
(WebCore::SpaceSplitStringData::deref):
(WebCore::SpaceSplitStringData::SpaceSplitStringData):
(WebCore::SpaceSplitStringData::~SpaceSplitStringData):
(WebCore::SpaceSplitStringData::tokenArrayStart):
(WebCore::SpaceSplitString::SpaceSplitString):
(WebCore::SpaceSplitString::operator!=):
(WebCore::SpaceSplitString::clear):
(WebCore::SpaceSplitString::contains):
(WebCore::SpaceSplitString::containsAll):
(WebCore::SpaceSplitString::size):
(WebCore::SpaceSplitString::isEmpty):
(WebCore::SpaceSplitString::operator[]):
(WebCore::SpaceSplitString::spaceSplitStringContainsValue):
* html/ClassList.cpp:
(WebCore::ClassList::classNames):
* page/EventHandler.cpp:
(WebCore::findDropZone):
2013-08-28 Benjamin Poulain <benjamin@webkit.org>
Simplify and clean SpaceSplitString
https://bugs.webkit.org/show_bug.cgi?id=120385
Reviewed by Ryosuke Niwa.
Clean up of SpaceSplitString following the cleaning of the DOMTokenList hierarchy.
- Remove the concepts of empty and null. The list can now be empty or have something.
There is no null state.
- Put the tokens directly following SpaceSplitStringData instead of using a Vector in between.
* WebCore.exp.in:
* dom/ElementData.h:
(WebCore::ElementData::hasClass):
* dom/SpaceSplitString.cpp:
(WebCore::tokenizeSpaceSplitString):
(WebCore::SpaceSplitStringData::containsAll):
(WebCore::SpaceSplitString::set):
(WebCore::SpaceSplitString::spaceSplitStringContainsValue):
(WebCore::TokenCounter::TokenCounter):
(WebCore::TokenCounter::processToken):
(WebCore::TokenCounter::tokenCount):
(WebCore::TokenAtomicStringInitializer::TokenAtomicStringInitializer):
(WebCore::TokenAtomicStringInitializer::processToken):
(WebCore::TokenAtomicStringInitializer::nextMemoryBucket):
(WebCore::SpaceSplitStringData::create):
(WebCore::SpaceSplitStringData::destroy):
* dom/SpaceSplitString.h:
(WebCore::SpaceSplitStringData::contains):
(WebCore::SpaceSplitStringData::size):
(WebCore::SpaceSplitStringData::operator[]):
(WebCore::SpaceSplitStringData::ref):
(WebCore::SpaceSplitStringData::deref):
(WebCore::SpaceSplitStringData::SpaceSplitStringData):
(WebCore::SpaceSplitStringData::~SpaceSplitStringData):
(WebCore::SpaceSplitStringData::tokenArrayStart):
(WebCore::SpaceSplitString::containsAll):
(WebCore::SpaceSplitString::isEmpty):
(WebCore::SpaceSplitString::operator[]):
* html/ClassList.cpp:
(WebCore::ClassList::classNames):
* page/EventHandler.cpp:
(WebCore::findDropZone):
2013-08-28 Rob Buis <rwlbuis@webkit.org>
Namespace prefix is blindly followed when serializing
https://bugs.webkit.org/show_bug.cgi?id=19121
Serializer doesn't handling inconsistent prefixes properly
https://bugs.webkit.org/show_bug.cgi?id=117764
Attribute namespaces are serialized as if they were element ones
https://bugs.webkit.org/show_bug.cgi?id=22958
Reviewed by Ryosuke Niwa.
Add code to make sure unique prefixes and namespace declarations are generated.
Unique prefix generation happens when:
- the same prefix is used to map to different namespaces or
- no prefix is given but the attribute is in a namespace.
This is done in order to not violate constraints listed in http://www.w3.org/TR/xml-names11/. In general
the pseudo code listed in http://www.w3.org/TR/DOM-Level-3-Core/namespaces-algorithms.html#normalizeDocumentAlgo
is used, doing the following for attributes:
if the attribute has a namespace then
if the attribute has no prefix OR prefix is not declared OR conflicts with existing prefix mapping to different NS then
try to find the matching in-scope declaration by looking up the prefix in the namespace -> prefix mapping, if found use that prefix
else if the attribute prefix is not null AND not mapped in-scope, declare the prefix
else generate a unique prefix for the namespace
To keep track of in-scope namespaces a prefix to namespace mapping is used.
Tests: fast/dom/XMLSerializer-attribute-namespace-prefix-conflicts.html
fast/dom/XMLSerializer-same-prefix-different-namespaces-conflict.html
fast/dom/XMLSerializer-setAttributeNS-namespace-no-prefix.html
svg/custom/xlink-prefix-generation-in-attributes.html
* editing/MarkupAccumulator.cpp:
(WebCore::MarkupAccumulator::MarkupAccumulator):
(WebCore::MarkupAccumulator::shouldAddNamespaceAttribute):
(WebCore::MarkupAccumulator::appendNamespace):
(WebCore::MarkupAccumulator::generateUniquePrefix):
(WebCore::MarkupAccumulator::appendAttribute):
* editing/MarkupAccumulator.h:
2013-08-28 Sam White <samuel_white@apple.com>
AX: Cancel button in search field not accessible.
<https://webkit.org/b/120322>
Expose the cancel button that shows in an input element of
type search to accessibility.
Reviewed by Chris Fleizach.
Test: platform/mac/accessibility/search-field-cancel-button.html
* CMakeLists.txt:
* English.lproj/Localizable.strings:
* GNUmakefile.list.am:
* Target.pri:
* WebCore.vcxproj/WebCore.vcxproj:
* WebCore.xcodeproj/project.pbxproj:
* accessibility/AXObjectCache.cpp:
(WebCore::createFromRenderer):
* accessibility/AccessibilityAllInOne.cpp:
* accessibility/AccessibilitySearchFieldButtons.cpp: Added.
(WebCore::AccessibilitySearchFieldCancelButton::create):
(WebCore::AccessibilitySearchFieldCancelButton::AccessibilitySearchFieldCancelButton):
(WebCore::AccessibilitySearchFieldCancelButton::accessibilityDescription):
(WebCore::AccessibilitySearchFieldCancelButton::accessibilityText):
(WebCore::AccessibilitySearchFieldCancelButton::press):
(WebCore::AccessibilitySearchFieldCancelButton::computeAccessibilityIsIgnored):
* accessibility/AccessibilitySearchFieldButtons.h: Added.
* dom/Element.h:
(WebCore::Element::isSearchFieldCancelButtonElement):
* html/shadow/TextControlInnerElements.h:
* platform/LocalizedStrings.cpp:
(WebCore::AXSearchFieldCancelButtonText):
* platform/LocalizedStrings.h:
* platform/efl/LocalizedStringsEfl.cpp:
(WebCore::AXSearchFieldCancelButtonText):
* platform/gtk/LocalizedStringsGtk.cpp:
(WebCore::AXSearchFieldCancelButtonText):
* platform/qt/LocalizedStringsQt.cpp:
(WebCore::AXSearchFieldCancelButtonText):
2013-08-28 Eric Carlson <eric.carlson@apple.com>
MediaPlayerPrivateAVFoundationObjC is painting video frames under the video layer
https://bugs.webkit.org/show_bug.cgi?id=120170
Reviewed by Simon Fraser.
No new tests, it is only possible to test in the debugger.
* platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
(WebCore::MediaPlayerPrivateAVFoundationObjC::hasAvailableVideoFrame): Drive by optimization.
(WebCore::MediaPlayerPrivateAVFoundationObjC::paintCurrentFrameInContext): Move logic from paint here.
(WebCore::MediaPlayerPrivateAVFoundationObjC::paint): Do nothing if we already have a video layer,
otherwise call paint().
2013-08-28 Antti Koivisto <antti@apple.com>
Add child and descendant const iterators
https://bugs.webkit.org/show_bug.cgi?id=120430
Reviewed by Andreas Kling
This patch adds const-correct DOM tree traversal iterators. It also uses them in a few places.
Some const_casts have been applied where constness breaks.
* dom/ChildIterator.h:
(WebCore::::ChildConstIterator):
(WebCore::::operator):
(WebCore::=):
(WebCore::::ChildConstIteratorAdapter):
(WebCore::::begin):
(WebCore::::end):
(WebCore::elementChildren):
(WebCore::childrenOfType):
* dom/DescendantIterator.h:
(WebCore::::DescendantConstIterator):
(WebCore::::operator):
(WebCore::=):
(WebCore::::DescendantConstIteratorAdapter):
(WebCore::::begin):
(WebCore::::end):
(WebCore::elementDescendants):
(WebCore::descendantsOfType):
* dom/Node.cpp:
(WebCore::Node::numberOfScopedHTMLStyleChildren):
* html/HTMLFieldSetElement.cpp:
(WebCore::HTMLFieldSetElement::legend):
* html/HTMLFieldSetElement.h:
* html/HTMLMediaElement.cpp:
(WebCore::HTMLMediaElement::finishParsingChildren):
* html/HTMLObjectElement.cpp:
(WebCore::HTMLObjectElement::containsJavaApplet):
* svg/SVGElement.cpp:
(WebCore::SVGElement::title):
* svg/SVGSVGElement.cpp:
(WebCore::SVGSVGElement::collectIntersectionOrEnclosureList):
(WebCore::SVGSVGElement::checkIntersection):
(WebCore::SVGSVGElement::checkEnclosure):
(WebCore::SVGSVGElement::getElementById):
* svg/SVGSVGElement.h:
2013-08-28 Lukasz Gajowy <l.gajowy@samsung.com>
AX:Null pointer may be dereferenced.
https://bugs.webkit.org/show_bug.cgi?id=120300
Reviewed by Chris Fleizach.
Added a check if newObj is not null and an assert in order to avoid dereferecing null pointer.
* accessibility/AXObjectCache.cpp:
(WebCore::AXObjectCache::getOrCreate):
2013-08-28 Pratik Solanki <psolanki@apple.com>
Document::elementSheet() should return a reference
https://bugs.webkit.org/show_bug.cgi?id=120433
Reviewed by Andreas Kling.
Since elementSheet() always retruns a valid pointer, we can simply return a reference
instead. Also rename m_elemSheet to m_elementSheet.
* css/CSSParser.cpp:
(WebCore::CSSParser::parseInlineStyleDeclaration):
* css/PropertySetCSSStyleDeclaration.cpp:
(WebCore::InlineCSSStyleDeclaration::parentStyleSheet):
* dom/Document.cpp:
(WebCore::Document::~Document):
(WebCore::Document::recalcStyle):
(WebCore::Document::updateBaseURL):
(WebCore::Document::elementSheet):
* dom/Document.h:
* dom/StyledElement.cpp:
(WebCore::StyledElement::setInlineStyleFromString):
(WebCore::StyledElement::setInlineStyleProperty):
(WebCore::StyledElement::addSubresourceAttributeURLs):
(WebCore::StyledElement::addPropertyToPresentationAttributeStyle):
* inspector/InspectorStyleSheet.cpp:
(WebCore::InspectorStyleSheetForInlineStyle::getStyleAttributeRanges):
2013-08-28 Ryosuke Niwa <rniwa@webkit.org>
REGRESSION(r154586): Past names map should only be used when named item is empty
https://bugs.webkit.org/show_bug.cgi?id=120432
Reviewed by Anders Carlsson.
Don't add the element from the past names map if we've found elements of the given name.
Test: fast/forms/past-names-map-should-be-used-only-when-named-item-is-empty.html
* html/HTMLFormElement.cpp:
(WebCore::HTMLFormElement::getNamedElements):
2013-08-27 Ryosuke Niwa <rniwa@webkit.org>
Don't keep unassociated elements in the past names map
https://bugs.webkit.org/show_bug.cgi?id=120328
Reviewed by Darin Adler.
Remove elements from the past names map of a form element when they are disassociated with the form to match
the behaviors of Firefox 24 and Internet Explorer 10. The specification feedback has been submitted to WHATWG
in http://lists.whatwg.org/pipermail/whatwg-whatwg.org/2013-August/040586.html
Also fix a memory leak via the past names map when the elements in the map becomes an ancestor of the form
element by storing a raw pointer in the map. This is safe because the form associated elements are kept alive
by another mechanism.
Because ~FormAssociatedElement removes entries from the past names map, we could no longer store HTMLElement*
in HTMLFormElement::m_pastNamesMap as that requires casting FormAssociatedElement* to HTMLElement*, which is
not possible in ~FormAssociatedElement. We instead store pointers to FormNamedItem, new base class of
FormAssociatedElement and HTMLImageElement.
Test: fast/forms/past-names-map-should-not-contained-disassociated-elements.html
* Target.pri:
* WebCore.exp.in:
* WebCore.vcxproj/WebCore.vcxproj:
* WebCore.vcxproj/WebCore.vcxproj.filters:
* WebCore.xcodeproj/project.pbxproj:
* html/FormAssociatedElement.cpp:
* html/FormAssociatedElement.h:
(WebCore::toHTMLElement):
* html/FormNamedItem.h: Added.
(WebCore::FormNamedItem::~FormNamedItem):
* html/HTMLElement.h:
(WebCore::HTMLElement::asFormNamedItem): Added. This allows the conversion from a HTMLFormControlElement,
HTMLObjectElement, HTMLImageElement to FormNamedItem in getNamedElements to update the past names map.
* html/HTMLFormControlElement.h:
* html/HTMLFormElement.cpp:
(WebCore::HTMLFormElement::removeFormElement):
(WebCore::HTMLFormElement::removeImgElement):
(WebCore::HTMLFormElement::assertItemCanBeInPastNamesMap): Asserts that FormNamedItem added to or obtained
from the past names map is either a form associated element or an image element; the condition guarantees
that the item will be removed from the map before its element gets destructed.
(WebCore::HTMLFormElement::elementFromPastNamesMap):
(WebCore::HTMLFormElement::addToPastNamesMap):
(WebCore::HTMLFormElement::removeFromPastNamesMap): Finds and removes the obsolete item from the map in O(n).
Note that removeFromVector, which is called on m_associatedElements or m_imageElements before this function is called,
is already O(n).
(WebCore::HTMLFormElement::getNamedElements):
* html/HTMLFormElement.h:
* html/HTMLImageElement.h:
* html/HTMLObjectElement.h:
2013-08-28 Brendan Long <b.long@cablelabs.com>
Duplicate in-band tracks when switching <source> elements
https://bugs.webkit.org/show_bug.cgi?id=120369
Reviewed by Eric Carlson.
Test: media/track/track-in-band-duplicate-tracks-when-source-changes.html
* html/HTMLMediaElement.cpp:
(WebCore::HTMLMediaElement::createMediaPlayer):
Delete existing in-band tracks before creating a new media player.
2013-08-28 Bem Jones-Bey <bjonesbe@adobe.com>
Code cleanup: rename FloatIntervalSearchAdapter and remove unnecessary inlines
https://bugs.webkit.org/show_bug.cgi?id=120378
Reviewed by Darin Adler.
Rename FloatIntervalSearchAdapter to ComputeFloatOffsetAdapter. The
naming of this adapter has caused much confusion in reading the code,
as it wasn't apparent that calls to it were actually doing anything
other than searching the interval tree. The new name is a much better
description of what it actually does.
Also, rename m_lowValue and m_highValue member variables to make it
easier to read the code that uses them.
Removed the inlines based on a change by eseidel in Blink.
No new tests, no behavior change.
* rendering/RenderBlock.cpp:
(WebCore::::updateOffsetIfNeeded): Update for renames.
(WebCore::::collectIfNeeded): Ditto.
(WebCore::::getHeightRemaining): Ditto.
(WebCore::RenderBlock::logicalLeftFloatOffsetForLine): Ditto.
(WebCore::RenderBlock::logicalRightFloatOffsetForLine): Ditto.
* rendering/RenderBlock.h:
(WebCore::RenderBlock::FloatingObject::x): Remove unnecessary inline.
(WebCore::RenderBlock::FloatingObject::maxX): Ditto.
(WebCore::RenderBlock::FloatingObject::y): Ditto.
(WebCore::RenderBlock::FloatingObject::maxY): Ditto.
(WebCore::RenderBlock::FloatingObject::width): Ditto.
(WebCore::RenderBlock::FloatingObject::height): Ditto.
(WebCore::RenderBlock::ComputeFloatOffsetAdapter::ComputeFloatOffsetAdapter): Rename.
(WebCore::RenderBlock::ComputeFloatOffsetAdapter::lowValue): Rename m_lowValue.
(WebCore::RenderBlock::ComputeFloatOffsetAdapter::highValue): Rename m_highValue.
2013-08-28 Tamas Czene <tczene@inf.u-szeged.hu>
Resolve unused parameter warning in ScriptedAnimationController.cpp.
https://bugs.webkit.org/show_bug.cgi?id=120408
Reviewed by Darin Adler.
* dom/ScriptedAnimationController.cpp:
(WebCore::ScriptedAnimationController::setThrottled):
2013-08-28 Sergio Villar Senin <svillar@igalia.com>
[CSS Grid Layout] Handle 'span' positions during layout
https://bugs.webkit.org/show_bug.cgi?id=119756
Reviewed by Andreas Kling.
From Blink r149133 by <jchaffraix@chromium.org>
Properly handle the 'span' keyword during layout. We only had
parsing support so far but with this change we are able to
recognize these positions and act accordingly.
* rendering/RenderGrid.cpp:
(WebCore::RenderGrid::resolveGridPositionsFromStyle):
(WebCore::RenderGrid::resolveGridPositionAgainstOppositePosition):
* rendering/RenderGrid.h:
* rendering/style/GridPosition.h:
(WebCore::GridPosition::shouldBeResolvedAgainstOppositePosition):
2013-08-28 Antti Koivisto <antti@apple.com>
Factor descendant iterator assertions into a class.
https://bugs.webkit.org/show_bug.cgi?id=120422
Reviewed by Darin Adler.
Share the assertions between ChildIterator and DescendantIterator. We can use it for future const iterators too.
* GNUmakefile.list.am:
* Target.pri:
* WebCore.vcxproj/WebCore.vcxproj:
* WebCore.xcodeproj/project.pbxproj:
* dom/ChildIterator.h:
(WebCore::::ChildIterator):
(WebCore::::operator):
(WebCore::=):
* dom/DescendantIterator.h:
(WebCore::::DescendantIterator):
(WebCore::::operator):
(WebCore::=):
* dom/DescendantIteratorAssertions.h: Added.
(WebCore::DescendantIteratorAssertions::DescendantIteratorAssertions):
(WebCore::DescendantIteratorAssertions::domTreeHasMutated):
(WebCore::DescendantIteratorAssertions::dropEventDispatchAssertion):
2013-08-28 Darin Adler <darin@apple.com>
Eliminate Pasteboard::generalPasteboard
https://bugs.webkit.org/show_bug.cgi?id=120392
Reviewed by Anders Carlsson.
* WebCore.exp.in: Removed the generalPasteboard function.
It didn't need to be exported, because no one was using it.
* editing/Editor.cpp:
(WebCore::Editor::paste): Added an overload that takes a Pasteboard.
(WebCore::Editor::copyURL): Ditto.
* editing/Editor.h: Added overloads.
* editing/EditorCommand.cpp:
(WebCore::executePasteGlobalSelection): Put this function inside the same
platform #if that the global selection code in the Pasteboard class was in.
Changed to use Pasteboard::createForGlobalSelection instead of using the
Pasteboard::setSelectionMode approach.
(WebCore::createCommandMap): Put PasteGlobalSelection inside the platform #if.
* inspector/InjectedScriptHost.cpp:
(WebCore::InjectedScriptHost::copyText): Use Pasteboard::createForCopyAndPaste()
instead of Pasteboard::generalPasteboard().
* inspector/InspectorFrontendHost.cpp:
(WebCore::InspectorFrontendHost::copyText): Ditto.
* platform/Pasteboard.h: Removed generalPasteboard. Replaced isSelectionMode
and setSelectionMode with createForGlobalSelection.
* platform/blackberry/PasteboardBlackBerry.cpp: Deleted generalPasteboard.
* platform/efl/PasteboardEfl.cpp: Deleted generalPasteboard.
* platform/gtk/PasteboardGtk.cpp: Deleted selectionClipboard, primaryClipboard,
generalPasteboard, isSelectionMode, and setSelectionMode.
(WebCore::Pasteboard::createForGlobalSelection): Added.
* platform/gtk/PasteboardHelper.cpp: Deleted m_usePrimarySelectionClipboard,
getCurrentClipboard, and getClipboard.
* platform/gtk/PasteboardHelper.h: Deleted the above, plus
setUsePrimarySelectionClipboard and usePrimarySelectionClipboard.
* platform/ios/PasteboardIOS.mm: Deleted generalPasteboard.
* platform/mac/PasteboardMac.mm: Deleted generalPasteboard.
* platform/qt/PasteboardQt.cpp: Deleted generalPasteboard, isSelectionMode,
and setSelectionMode.
(WebCore::Pasteboard::createForGlobalSelection): Added.
* platform/win/PasteboardWin.cpp: Deleted generalPasteboard.
2013-08-28 Antti Koivisto <antti@apple.com>
Share attach loops between Elements and ShadowRoots
https://bugs.webkit.org/show_bug.cgi?id=120414
Reviewed Andreas Kling.
* style/StyleResolveTree.cpp:
(WebCore::Style::attachChildren):
(WebCore::Style::attachShadowRoot):
(WebCore::Style::detachChildren):
(WebCore::Style::detachShadowRoot):
2013-08-28 Anders Carlsson <andersca@apple.com>
Clean up XPathExpressionNode and XPath::Function
https://bugs.webkit.org/show_bug.cgi?id=120411
Reviewed by Antti Koivisto.
Rename the subexpression and function argument getters to be more descriptive,
remove the non-const overloads (they were never used) and change the getters to return
references since they can never be null.
* xml/XPathExpressionNode.cpp:
* xml/XPathExpressionNode.h:
(WebCore::XPath::ParseNode::~ParseNode):
(WebCore::XPath::Expression::addSubExpression):
(WebCore::XPath::Expression::isContextNodeSensitive):
(WebCore::XPath::Expression::setIsContextNodeSensitive):
(WebCore::XPath::Expression::isContextPositionSensitive):
(WebCore::XPath::Expression::setIsContextPositionSensitive):
(WebCore::XPath::Expression::isContextSizeSensitive):
(WebCore::XPath::Expression::setIsContextSizeSensitive):
(WebCore::XPath::Expression::subExpressionCount):
(WebCore::XPath::Expression::subExpression):
* xml/XPathFunctions.cpp:
(WebCore::XPath::Function::setArguments):
(WebCore::XPath::FunId::evaluate):
(WebCore::XPath::FunLocalName::evaluate):
(WebCore::XPath::FunNamespaceURI::evaluate):
(WebCore::XPath::FunName::evaluate):
(WebCore::XPath::FunCount::evaluate):
(WebCore::XPath::FunString::evaluate):
(WebCore::XPath::FunConcat::evaluate):
(WebCore::XPath::FunStartsWith::evaluate):
(WebCore::XPath::FunContains::evaluate):
(WebCore::XPath::FunSubstringBefore::evaluate):
(WebCore::XPath::FunSubstringAfter::evaluate):
(WebCore::XPath::FunSubstring::evaluate):
(WebCore::XPath::FunStringLength::evaluate):
(WebCore::XPath::FunNormalizeSpace::evaluate):
(WebCore::XPath::FunTranslate::evaluate):
(WebCore::XPath::FunBoolean::evaluate):
(WebCore::XPath::FunNot::evaluate):
(WebCore::XPath::FunLang::evaluate):
(WebCore::XPath::FunNumber::evaluate):
(WebCore::XPath::FunSum::evaluate):
(WebCore::XPath::FunFloor::evaluate):
(WebCore::XPath::FunCeiling::evaluate):
(WebCore::XPath::FunRound::evaluate):
* xml/XPathFunctions.h:
(WebCore::XPath::Function::setName):
(WebCore::XPath::Function::argumentCount):
(WebCore::XPath::Function::argument):
(WebCore::XPath::Function::name):
* xml/XPathPredicate.cpp:
(WebCore::XPath::Negative::evaluate):
(WebCore::XPath::NumericOp::evaluate):
(WebCore::XPath::EqTestOp::evaluate):
(WebCore::XPath::LogicalOp::evaluate):
(WebCore::XPath::Union::evaluate):
2013-08-28 Andreas Kling <akling@apple.com>
Page::pluginData() should return a reference.
<https://webkit.org/b/120386>
Reviewed by Darin Adler.
The PluginData is lazily constructed by pluginData(); it never returns null.
A small number of null checks were harmed in the making of this patch.
2013-08-28 Andrei Parvu <parvu@adobe.com>
<https://webkit.org/b/120002> [CSS Masking] Add -webkit-mask-source-type shorthand property
Added the -webkit-mask-source-type property to the -webkit-mask shorthand property.
Reviewed by Dirk Schulze.
Test cases added in LayoutTests/fast/masking/parsing-mask.html
* css/CSSParser.cpp: Added the CSSPropertyWebkitMaskSourceType property to the array of shorthand properties.
(WebCore::CSSParser::parseValue):
* css/StylePropertyShorthand.cpp: Added the CSSPropertyWebkitMaskSourceType to the list of shorthands.
(WebCore::webkitMaskShorthand):
(WebCore::matchingShorthandsForLonghand):
2013-08-28 Zan Dobersek <zdobersek@igalia.com>
REGRESSION(r154708): It broke all plugin tests on GTK and Qt WK1
https://bugs.webkit.org/show_bug.cgi?id=120398
Reviewed by Anders Carlsson.
* bridge/c/c_class.cpp:
(JSC::Bindings::CClass::methodNamed): Keep the pointer of the new CMethod object
to return it after it's adopted by the new HashMap entry.
(JSC::Bindings::CClass::fieldNamed): The pointer to the newly created CField object
should be returned in this branch, matching the behavior before r154708.
2013-08-28 Antti Koivisto <antti@apple.com>
Fix Qt no-libxml2 build.
Not reviewed.
* xml/parser/XMLDocumentParserQt.cpp:
(WebCore::XMLDocumentParser::parseCdata):
2013-08-28 Antti Koivisto <antti@apple.com>
Don't use NodeRenderingContext when attaching text renderers
https://bugs.webkit.org/show_bug.cgi?id=120402
Reviewed by Andreas Kling.
This patch moves various functions for creating text renderers from NodeRenderingContext and Text to StyleResolveTree.
It also tightens the logic and combines some functions.
* dom/CharacterData.cpp:
(WebCore::CharacterData::parserAppendData):
(WebCore::CharacterData::setDataAndUpdate):
* dom/ContainerNode.cpp:
(WebCore::attachChild):
(WebCore::detachChild):
* dom/NodeRenderingContext.cpp:
* dom/NodeRenderingContext.h:
* dom/Text.cpp:
(WebCore::Text::~Text):
* dom/Text.h:
* html/HTMLViewSourceDocument.cpp:
(WebCore::HTMLViewSourceDocument::addText):
* html/parser/HTMLConstructionSite.cpp:
(WebCore::executeTask):
* html/shadow/InsertionPoint.cpp:
(WebCore::InsertionPoint::willAttachRenderers):
(WebCore::InsertionPoint::willDetachRenderers):
* style/StyleResolveTree.cpp:
(WebCore::Style::isRendererReparented):
(WebCore::Style::previousSiblingRenderer):
(WebCore::Style::nextSiblingRenderer):
From NodeRenderingContext::next/previousRenderer
(WebCore::Style::createTextRenderersForSiblingsAfterAttachIfNeeded):
From Text::createTextRenderersForSiblingsAfterAttachIfNeeded()
(WebCore::Style::textRendererIsNeeded):
From Text::textRendererIsNeeded
(WebCore::Style::createTextRendererIfNeeded):
Combines code from Text::createTextRendererIfNeeded, NodeRenderingContext::createRendererForTextIfNeeded,
NodeRenderingContext constructor and text node relevant code NodeRenderingContext::shouldCreateRenderer.
(WebCore::Style::attachTextRenderer):
(WebCore::Style::detachTextRenderer):
New functions of attaching text renderers. From Text::attach/detachText()
(WebCore::Style::updateTextRendererAfterContentChange):
From Text::updateTextRenderer.
(WebCore::Style::attachShadowRoot):
(WebCore::Style::attachChildren):
(WebCore::Style::attachRenderTree):
(WebCore::Style::detachShadowRoot):
(WebCore::Style::detachChildren):
(WebCore::Style::updateTextStyle):
* style/StyleResolveTree.h:
* xml/parser/XMLDocumentParser.cpp:
(WebCore::XMLDocumentParser::exitText):
* xml/parser/XMLDocumentParserLibxml2.cpp:
(WebCore::XMLDocumentParser::cdataBlock):
2013-08-28 Antti Koivisto <antti@apple.com>
Make descendant iterators always require ContainerNode root
https://bugs.webkit.org/show_bug.cgi?id=120393
Reviewed by Andreas Kling.
Remove Node* root versions of the iterators.
Fix the few call sites that required them to have tighter typing.
* accessibility/AccessibilityNodeObject.cpp:
(WebCore::AccessibilityNodeObject::canvasHasFallbackContent):
(WebCore::siblingWithAriaRole):
* dom/ChildIterator.h:
(WebCore::::ChildIteratorAdapter):
(WebCore::::begin):
(WebCore::::end):
(WebCore::elementChildren):
(WebCore::childrenOfType):
* dom/DescendantIterator.h:
(WebCore::::DescendantIterator):
(WebCore::::DescendantIteratorAdapter):
(WebCore::::begin):
(WebCore::::end):
(WebCore::elementDescendants):
(WebCore::descendantsOfType):
* editing/ApplyStyleCommand.cpp:
(WebCore::dummySpanAncestorForNode):
(WebCore::ApplyStyleCommand::cleanupUnstyledAppleStyleSpans):
(WebCore::ApplyStyleCommand::applyInlineStyle):
* editing/ApplyStyleCommand.h:
2013-08-28 Sergio Villar Senin <svillar@igalia.com>
WorkerGlobalScopeWebDatabase requires ENABLE(WORKERS)
https://bugs.webkit.org/show_bug.cgi?id=120395
Reviewed by Christophe Dumez.
WorkerGlobalScopeDatabase uses the WorkerGlobalScope object which is
defined only when WORKERS are enabled. We should guard that code.
* Modules/webdatabase/WorkerGlobalScopeWebDatabase.cpp:
* Modules/webdatabase/WorkerGlobalScopeWebDatabase.h:
* Modules/webdatabase/WorkerGlobalScopeWebDatabase.idl:
2013-08-28 Sergio Villar Senin <svillar@igalia.com>
[CSS Grid Layout] Fix grid position resolution
https://bugs.webkit.org/show_bug.cgi?id=119801
Reviewed by Andreas Kling.
From Blink r148833, r148878, r150403 by <jchaffraix@chromium.org>
Both grid-{column|row}-end and negative positions were not
properly handled in our grid position resolution code. We were
using the same code to resolve all the grid positions without
considering the edges of the grid.
Also refactored the grid size estimation in
resolveGridPositionsFromStyle() so we can use it for the grid size
estimation. The code no longer requires the grid to be filled at
that moment as the specs changed to use the "explicit grid" which
is independent of grid items (only depends on style).
Test: fast/css-grid-layout/grid-item-negative-position-resolution.html
* rendering/RenderGrid.cpp:
(WebCore::RenderGrid::maximumIndexInDirection):
(WebCore::RenderGrid::resolveGridPositionsFromStyle):
(WebCore::adjustGridPositionForSide):
(WebCore::RenderGrid::resolveGridPositionFromStyle):
* rendering/RenderGrid.h:
2013-08-28 Sergio Villar Senin <svillar@igalia.com>
[CSS Grid Layout] infinity should be defined as a negative value
https://bugs.webkit.org/show_bug.cgi?id=107053
Reviewed by Andreas Kling.
From Blink r154805 by <jchaffraix@chromium.org>
Reject negative values for track-breadth at parse time as
mentioned in the latest versions of the spec.
Added some extra checks to the existing tests.
* css/CSSParser.cpp:
(WebCore::CSSParser::parseGridBreadth):
* rendering/RenderGrid.cpp:
(WebCore::RenderGrid::computeUsedBreadthOfMaxLength):
2013-08-28 Sergio Villar Senin <svillar@igalia.com>
[Soup] WebTiming information not shown in the inspector
https://bugs.webkit.org/show_bug.cgi?id=118395
Reviewed by Martin Robinson.
WebTiming information was not correctly provided to WebCore
because the gotHeadersCallback was incorrectly resetting the
original ResourceResponse (which had the ResourceLoadTiming
object) instead of simply updating their contents using the
SoupMessage.
No new test required as this feature is already covered by the
existing webtiming tests. In any case this change includes a fix
for the http/tests/misc/webtiming-ssl.php test which was not
failing even if it should because it was not correct.
* platform/network/soup/ResourceHandleSoup.cpp:
(WebCore::gotHeadersCallback):
(WebCore::restartedCallback): restartedCallback should be
available only if WEB_TIMING is defined.
(WebCore::createSoupMessageForHandleAndRequest): Ditto.
2013-08-26 Antonio Gomes <a1.gomes@sisa.samsung.com>
Scrolling allowed when overflow:hidden (seen on Acid2)
https://bugs.webkit.org/show_bug.cgi?id=22769
Reviewed by Darin Adler.
Autoscroll, as well as other user-driven scroll actions,
has to respect the scrollability styled into the web page.
More specifically, if a html or body tags are styled with
overflow:hidden, autoscroll should not scroll the containing document.
In order to fix this, patch hardens RenderBox::canAutoscroll as
following: previously, ::canAutoscroll was relying solemnly in
::canBeScrolledAndHasScrollableArea to determine the scrollability
of #document node, which was unconditionally returned as 'true'.
Patch extends ::canAutoscroll to handle the #document case for
main and inner frames, and now it asks through ::isScrollable if
the corresponding document's FrameView is actually user-scrollable.
Note, that the patch change ::canAutoscroll to cover the non-mainFrame
#document case, so the comment specific to Apple's Mail app can be omited
now.
Test: fast/events/autoscroll-in-overflow-hidden-html.html
* rendering/RenderBox.cpp:
(WebCore::RenderBox::canAutoscroll):
2013-08-27 Santosh Mahto <santosh.ma@samsung.com>
Adding "explicit" keyword in forms related classes constructor
https://bugs.webkit.org/show_bug.cgi?id=120366
Reviewed by Darin Adler.
Adding "explicit" keyword in constructors.
* html/BaseButtonInputType.h:
(WebCore::BaseButtonInputType::BaseButtonInputType):
* html/BaseCheckableInputType.h:
(WebCore::BaseCheckableInputType::BaseCheckableInputType):
* html/BaseChooserOnlyDateAndTimeInputType.h:
(WebCore::BaseChooserOnlyDateAndTimeInputType::BaseChooserOnlyDateAndTimeInputType):
* html/BaseClickableWithKeyInputType.h:
(WebCore::BaseClickableWithKeyInputType::BaseClickableWithKeyInputType):
* html/BaseTextInputType.h:
(WebCore::BaseTextInputType::BaseTextInputType):
* html/ColorInputType.h:
(WebCore::ColorInputType::ColorInputType):
* html/DateInputType.h:
* html/DateTimeInputType.h:
(WebCore::DateTimeInputType::DateTimeInputType):
* html/DateTimeLocalInputType.h:
(WebCore::DateTimeLocalInputType::DateTimeLocalInputType):
* html/EmailInputType.h:
(WebCore::EmailInputType::EmailInputType):
* html/FileInputType.h:
* html/HiddenInputType.h:
(WebCore::HiddenInputType::HiddenInputType):
* html/ImageData.h:
* html/ImageInputType.h:
* html/InputType.h:
(WebCore::InputType::InputType):
* html/MediaController.h:
* html/MonthInputType.h:
(WebCore::MonthInputType::MonthInputType):
* html/RadioInputType.h:
(WebCore::RadioInputType::RadioInputType):
* html/RangeInputType.h:
* html/ResetInputType.h:
(WebCore::ResetInputType::ResetInputType):
* html/SearchInputType.h:
* html/SubmitInputType.h:
(WebCore::SubmitInputType::SubmitInputType):
* html/TelephoneInputType.h:
(WebCore::TelephoneInputType::TelephoneInputType):
* html/TextFieldInputType.h:
* html/TextInputType.h:
(WebCore::TextInputType::TextInputType):
* html/TimeInputType.h:
* html/URLInputType.h:
(WebCore::URLInputType::URLInputType):
* html/ValidationMessage.h:
* html/WeekInputType.h:
(WebCore::WeekInputType::WeekInputType):
2013-08-27 Benjamin Poulain <benjamin@webkit.org>
Fix the indentation of SpaceSplitString
https://bugs.webkit.org/show_bug.cgi?id=120390
Reviewed by Ryosuke Niwa.
* dom/SpaceSplitString.h:
(WebCore::SpaceSplitStringData::contains):
(WebCore::SpaceSplitStringData::isUnique):
(WebCore::SpaceSplitStringData::size):
(WebCore::SpaceSplitStringData::operator[]):
(WebCore::SpaceSplitString::SpaceSplitString):
(WebCore::SpaceSplitString::operator!=):
(WebCore::SpaceSplitString::clear):
(WebCore::SpaceSplitString::contains):
(WebCore::SpaceSplitString::containsAll):
(WebCore::SpaceSplitString::size):
(WebCore::SpaceSplitString::isNull):
(WebCore::SpaceSplitString::operator[]):
(WebCore::SpaceSplitString::spaceSplitStringContainsValue):
(WebCore::SpaceSplitString::ensureUnique):
2013-08-27 Andreas Kling <akling@apple.com>
Make it less awkward to check if a Frame is the main Frame.
<https://webkit.org/b/120382>
Reviewed by Anders Carlsson.
Added Page::frameIsMainFrame(const Frame*) so code that wants to find out if a given
Frame is a Page's main frame doesn't have to do a manual pointer compare.
* page/Page.h:
(WebCore::Page::frameIsMainFrame):
Added. Replaces (frame == &page->mainFrame()) idiom.
2013-08-27 Morten Stenshorne <mstensho@opera.com>
Improve multicol intrinsic width calculation
https://bugs.webkit.org/show_bug.cgi?id=116677
Reviewed by David Hyatt.
Test: fast/css-intrinsic-dimensions/multicol.html
* rendering/RenderBlock.cpp:
(WebCore::RenderBlock::computeIntrinsicLogicalWidths):
(WebCore::RenderBlock::adjustIntrinsicLogicalWidthsForColumns):
* rendering/RenderBlock.h:
2013-08-27 Rob Buis <rwlbuis@webkit.org>
feImage fails if referenced node contains radialGradient declaration
https://bugs.webkit.org/show_bug.cgi?id=118735
Reviewed by Darin Adler.
Only call parent's updateRelativeLengthsInformation for graphics elements.
Tests: svg/custom/feImage-pserver-with-percentage-expected.svg
svg/custom/feImage-pserver-with-percentage.svg
* svg/SVGElement.cpp:
(WebCore::SVGElement::updateRelativeLengthsInformation):
2013-08-27 Darin Adler <darin@apple.com>
No need for generalPasteboard (aside from "global selection mode")
https://bugs.webkit.org/show_bug.cgi?id=120367
Reviewed by Alexey Proskuryakov.
* editing/Editor.cpp:
(WebCore::Editor::pasteAsPlainTextBypassingDHTML):
(WebCore::Editor::dispatchCPPEvent):
(WebCore::Editor::cut):
(WebCore::Editor::copy):
(WebCore::Editor::paste):
(WebCore::Editor::pasteAsPlainText):
(WebCore::Editor::copyURL):
(WebCore::Editor::copyImage):
Use Pasteboard::createForCopyAndPaste rather than the single general pasteboard
for editing operations.
2013-08-27 Chris Fleizach <cfleizach@apple.com>
<https://webkit.org/b/120117> AX: <noscript> contents are exposed as static text
Reviewed by Tim Horton.
If <noscript> is not being used (because there is script) then we need to ignore its contents for AX.
Test: accessibility/noscript-ignored.html
* accessibility/AccessibilityRenderObject.cpp:
(WebCore::AccessibilityRenderObject::addCanvasChildren):
* accessibility/AccessibilityNodeObject.cpp:
(WebCore::AccessibilityNodeObject::canHaveChildren):
2013-08-27 Anders Carlsson <andersca@apple.com>
Stop using deleteAllValues in CClass
https://bugs.webkit.org/show_bug.cgi?id=120376
Reviewed by Andreas Kling.
* bridge/c/c_class.cpp:
(JSC::Bindings::CClass::CClass):
(JSC::Bindings::CClass::~CClass):
(JSC::Bindings::CClass::methodNamed):
(JSC::Bindings::CClass::fieldNamed):
* bridge/c/c_class.h:
* bridge/jsc/BridgeJSC.h:
2013-08-27 Benjamin Poulain <benjamin@webkit.org>
Clean ClassList and DOMSettableTokenList
https://bugs.webkit.org/show_bug.cgi?id=120344
Reviewed by Ryosuke Niwa.
This patch cleans ClassList and DOMSettableTokenList to make it simpler to update
SpaceSplitString:
- Move the implementation of virtual functions to the cpp file.
- Clean the #includes.
- Make the implemented pure virtual methods final.
- Make the element() accessor const.
* html/ClassList.cpp:
(WebCore::ClassList::create):
(WebCore::ClassList::element):
(WebCore::ClassList::value):
(WebCore::ClassList::setValue):
(WebCore::ClassList::classNames):
* html/ClassList.h:
* html/DOMSettableTokenList.cpp:
(WebCore::DOMSettableTokenList::create):
(WebCore::DOMSettableTokenList::ref):
(WebCore::DOMSettableTokenList::deref):
(WebCore::DOMSettableTokenList::length):
(WebCore::DOMSettableTokenList::value):
* html/DOMSettableTokenList.h:
* html/DOMTokenList.h:
(WebCore::DOMTokenList::element):
2013-08-27 Arunprasad Rajkumar <arurajku@cisco.com>
Replace currentTime() with monotonicallyIncreasingTime() in WebCore
https://bugs.webkit.org/show_bug.cgi?id=119958
Reviewed by Alexey Proskuryakov.
WTF::currentTime() is prone to NTP and manual adjustments, so use
WTF::monotonicallyIncreasingTime() to measure elapsed time.
It is a continuation of r154201.
* history/CachedPage.cpp:
(WebCore::CachedPage::CachedPage):
(WebCore::CachedPage::hasExpired):
* html/parser/HTMLParserScheduler.h:
(WebCore::HTMLParserScheduler::checkForYieldBeforeToken):
* loader/CrossOriginPreflightResultCache.cpp:
(WebCore::CrossOriginPreflightResultCacheItem::parse):
(WebCore::CrossOriginPreflightResultCacheItem::allowsRequest):
* loader/FrameLoader.cpp:
(WebCore::FrameLoader::setState):
* loader/ProgressTracker.cpp:
(WebCore::ProgressTracker::incrementProgress):
* loader/cache/CachedCSSStyleSheet.cpp:
(WebCore::CachedCSSStyleSheet::restoreParsedStyleSheet):
* loader/cache/CachedImage.cpp:
(WebCore::CachedImage::didDraw):
* loader/cache/MemoryCache.cpp:
(WebCore::MemoryCache::pruneLiveResourcesToSize):
* loader/icon/IconDatabase.cpp:
(WebCore::IconDatabase::iconDatabaseSyncThread):
(WebCore::IconDatabase::syncThreadMainLoop):
(WebCore::IconDatabase::readFromDatabase):
(WebCore::IconDatabase::writeToDatabase):
(WebCore::IconDatabase::cleanupSyncThread):
* page/animation/AnimationBase.cpp:
(WebCore::AnimationBase::freezeAtTime):
* page/animation/AnimationController.cpp:
(WebCore::AnimationControllerPrivate::beginAnimationUpdateTime):
* platform/graphics/GraphicsLayerAnimation.cpp:
(WebCore::GraphicsLayerAnimation::computeTotalRunningTime):
(WebCore::GraphicsLayerAnimation::resume):
* platform/graphics/avfoundation/cf/MediaPlayerPrivateAVFoundationCF.cpp:
(WebCore::AVFWrapper::createImageForTimeInRect):
* platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
(WebCore::MediaPlayerPrivateAVFoundationObjC::createImageForTimeInRect):
(WebCore::MediaPlayerPrivateAVFoundationObjC::createPixelBuffer):
* platform/graphics/ca/GraphicsLayerCA.cpp:
(WebCore::GraphicsLayerCA::suspendAnimations):
* platform/graphics/ca/PlatformCALayer.h:
(WebCore::PlatformCALayer::currentTimeToMediaTime):
* platform/graphics/ca/mac/LayerPool.mm:
(WebCore::LayerPool::addLayer):
(WebCore::LayerPool::decayedCapacity):
(WebCore::LayerPool::pruneTimerFired):
* platform/graphics/ca/mac/PlatformCALayerMac.mm:
(mediaTimeToCurrentTime):
* platform/graphics/ca/win/CACFLayerTreeHost.cpp:
(WebCore::CACFLayerTreeHost::notifyAnimationsStarted):
* platform/graphics/ca/win/PlatformCALayerWin.cpp:
(PlatformCALayer::printTree):
* platform/graphics/texmap/GraphicsLayerTextureMapper.cpp:
(WebCore::GraphicsLayerTextureMapper::addAnimation):
* platform/graphics/texmap/TextureMapperFPSCounter.cpp:
(WebCore::TextureMapperFPSCounter::TextureMapperFPSCounter):
(WebCore::TextureMapperFPSCounter::updateFPSAndDisplay):
* platform/graphics/texmap/coordinated/CoordinatedGraphicsLayer.cpp:
(WebCore::CoordinatedGraphicsLayer::addAnimation):
* platform/network/DNSResolveQueue.cpp:
(WebCore::DNSResolveQueue::isUsingProxy):
* plugins/win/PluginMessageThrottlerWin.cpp:
(WebCore::PluginMessageThrottlerWin::appendMessage):
* rendering/RenderLayerCompositor.cpp:
(WebCore::RenderLayerCompositor::didPaintBacking):
(WebCore::RenderLayerCompositor::updateCompositingLayers):
* rendering/RenderProgress.cpp:
(WebCore::RenderProgress::animationProgress):
(WebCore::RenderProgress::updateAnimationState):
* svg/animation/SMILTimeContainer.cpp:
(WebCore::SMILTimeContainer::elapsed):
(WebCore::SMILTimeContainer::begin):
(WebCore::SMILTimeContainer::pause):
(WebCore::SMILTimeContainer::resume):
(WebCore::SMILTimeContainer::setElapsed):
2013-08-27 Robert Hogan <robert@webkit.org>
cell width / offsetTop incorrect
https://bugs.webkit.org/show_bug.cgi?id=11582
Reviewed by David Hyatt.
The offsetTop and offsetLeft of sections, rows and cells should include the table's border. There are separate
problems with the offset[Top|Left] of table sections and the offsetLeft of rows which are covered under bugs 119020
and 119021 respectively - here we stick to just fixing the inclusion of the border as it doesn't require rebaselining
a lot of tests.
Test: fast/table/offset-top-includes-border.html
* rendering/RenderBoxModelObject.cpp:
(WebCore::RenderBoxModelObject::adjustedPositionRelativeToOffsetParent):
* rendering/RenderTableSection.cpp:
(WebCore::RenderTableSection::layoutRows):
2013-08-27 Jacky Jiang <zhajiang@blackberry.com>
[BlackBerry] Rotate device from landscape to portrait during youtube streaming will cause device screen flash with video list page
https://bugs.webkit.org/show_bug.cgi?id=120364
Reviewed by Rob Buis.
Internally reviewed by Arvid Nilsson.
JIRA 461232
When rotating device from landscape mode to portrait mode, we updated
texture contents based on landscape mode front visibility and back
visibility on WebKit thread at the very beginning and the landscape mode
tiles wouldn't be able to cover the portrait mode screen which resulted
in the screen flash.
It's hard to compute front visibility information on WebKit thread because
it doesn't know where the layers will be on the screen. Therefore, the
front visibility won't be updated until the first time we draw textures
on compositing thread.
The patch traverses through LayerWebKitThread and LayerCompositingThread
and discards back visibility and front visibility respectively if there
is a pending orientation. In this way, we can pick up layerTilerPrefillRect
as visibleRect instead of the visibleRect from the stale visibilities
and add more tiles for uncovered screen when updating texture contents
on WebKit thread.
The patch also fixes a bug that we prune tiles based on the stale
m_requiredTextureSize in pruneTextures(). We should prune tiles based
on the updated pendingTextureSize instead.
* platform/graphics/blackberry/LayerCompositingThread.cpp:
(WebCore::LayerCompositingThread::discardFrontVisibility):
* platform/graphics/blackberry/LayerCompositingThread.h:
* platform/graphics/blackberry/LayerCompositingThreadClient.h:
(WebCore::LayerCompositingThreadClient::discardFrontVisibility):
* platform/graphics/blackberry/LayerRenderer.cpp:
(WebCore::LayerRenderer::discardFrontVisibility):
* platform/graphics/blackberry/LayerRenderer.h:
* platform/graphics/blackberry/LayerTiler.cpp:
(WebCore::LayerTiler::discardFrontVisibility):
(WebCore::LayerTiler::processTextureJob):
(WebCore::LayerTiler::pruneTextures):
(WebCore::LayerTiler::discardBackVisibility):
* platform/graphics/blackberry/LayerTiler.h:
* platform/graphics/blackberry/LayerWebKitThread.cpp:
(WebCore::LayerWebKitThread::discardBackVisibility):
* platform/graphics/blackberry/LayerWebKitThread.h:
2013-08-27 Antti Koivisto <antti@apple.com>
Better mutation and event assertions for descendant iterators
https://bugs.webkit.org/show_bug.cgi?id=120368
Reviewed by Andreas Kling.
Add mutation assertions to all functions.
Drop the no-event-dispatch assertion when the iterator reaches the end. This reduces need for iterator scoping
just to avoid assertions.
* dom/ChildIterator.h:
(WebCore::::domTreeHasMutated):
(WebCore::::operator):
(WebCore::=):
* dom/DescendantIterator.h:
(WebCore::::domTreeHasMutated):
(WebCore::::operator):
(WebCore::=):
* dom/Document.cpp:
(WebCore::Document::childrenChanged):
Make idiomatic.
2013-08-27 Renata Hodovan <reni@webkit.org>
Missing null-check of parent renderer in WebCore::HTMLEmbedElement::rendererIsNeeded()
https://bugs.webkit.org/show_bug.cgi?id=120343
Reviewed by Darin Adler.
Null-check the parent renderer of HTMLEmbedElement in WebCore::HTMLEmbedElement::rendererIsNeeded()
and early return.
Test: fast/html/HTMLEmbedElement_without_parent_renderer_assert_crash.html
* html/HTMLEmbedElement.cpp:
(WebCore::HTMLEmbedElement::rendererIsNeeded):
2013-08-27 Brent Fulgham <bfulgham@apple.com>
[Windows] Correct method call for characteristic update.
Reviewed by Eric Carlson.
* platform/graphics/avfoundation/cf/MediaPlayerPrivateAVFoundationCF.cpp:
(WebCore::MediaPlayerPrivateAVFoundationCF::tracksChanged):
[Windows] Correct method call (should have been "characteristicsChanged", not
"player()->characteristicChanged()"
2013-08-26 Brent Fulgham <bfulgham@apple.com>
[Windows] some track language tags are not recognized
https://bugs.webkit.org/show_bug.cgi?id=120335
Reviewed by Eric Carlson.
* platform/graphics/avfoundation/cf/MediaPlayerPrivateAVFoundationCF.cpp: Revise implementation
to match logic in platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjc.mm
2013-08-27 Andreas Kling <akling@apple.com>
Clumsily fix Gtk+ build. Not my proudest moment.
* rendering/svg/RenderSVGResourceFilter.cpp:
2013-08-27 Andreas Kling <akling@apple.com>
Fix Qt build.
* rendering/svg/RenderSVGResourceFilter.cpp:
2013-08-27 Andreas Kling <akling@apple.com>
RenderView::availableLogicalHeight() should be self-contained.
<https://webkit.org/b/120356>
Reviewed by Antti Koivisto.
Instead of checking isRenderView() in RenderBox::availableLogicalHeightUsing()
and doing an early return, do everything needed without leaving RenderView instead.
Document style never has min-/max-height so there's no need to apply constraints.
* rendering/RenderBox.cpp:
(WebCore::RenderBox::availableLogicalHeightUsing):
* rendering/RenderView.cpp:
(WebCore::RenderView::availableLogicalHeight):
2013-08-27 Andreas Kling <akling@apple.com>
Simplify some more Settings access where we have a Frame in reach.
<https://webkit.org/b/120256>
Reviewed by Darin Adler.
RenderObjects can always find Settings through the Frame.
* rendering/InlineTextBox.cpp:
(WebCore::InlineTextBox::paint):
* rendering/RenderBoxModelObject.cpp:
(WebCore::RenderBoxModelObject::paintFillLayerExtended):
* rendering/svg/RenderSVGResourceFilter.cpp:
(WebCore::RenderSVGResourceFilter::applyResource):
2013-08-27 Andreas Kling <akling@apple.com>
RenderView::flowThreadController() should return a reference.
<https://webkit.org/b/120363>
Reviewed by Antti Koivisto.
This function does lazy construction and always returns an object.
2013-08-27 Andreas Kling <akling@apple.com>
HTMLAppletElement: Use child iterator to walk <param> children.
<https://webkit.org/b/120361>
Reviewed by Antti Koivisto.
Take Antti's fancy new child iterator for a quick spin.
* html/HTMLAppletElement.cpp:
(WebCore::HTMLAppletElement::updateWidget):
2013-08-27 Andre Moreira Magalhaes <andre.magalhaes@collabora.co.uk>
[gstreamer] Make sure gstreamer source element is thread-safe
https://bugs.webkit.org/show_bug.cgi?id=115352
Reviewed by Philippe Normand.
GStreamer source element may be created by any gstreamer element on any thread by calling
gst_element_make_from_uri with the URIs handled by the source element.
This patch makes sure the gstreamer source element is thread-safe to avoid issues with it
being created outside the main thread.
* platform/graphics/gstreamer/WebKitWebSourceGStreamer.cpp:
(webkit_web_src_init):
(webKitWebSrcDispose):
(webKitWebSrcFinalize):
(webKitWebSrcSetProperty):
(webKitWebSrcGetProperty):
(removeTimeoutSources):
(webKitWebSrcStop):
(webKitWebSrcStart):
(webKitWebSrcChangeState):
(webKitWebSrcQueryWithParent):
(webKitWebSrcGetUri):
(webKitWebSrcSetUri):
(webKitWebSrcNeedDataMainCb):
(webKitWebSrcNeedDataCb):
(webKitWebSrcEnoughDataMainCb):
(webKitWebSrcEnoughDataCb):
(webKitWebSrcSeekMainCb):
(webKitWebSrcSeekDataCb):
(webKitWebSrcSetMediaPlayer):
(StreamingClient::StreamingClient):
(StreamingClient::~StreamingClient):
(StreamingClient::createReadBuffer):
(StreamingClient::handleResponseReceived):
(StreamingClient::handleDataReceived):
(StreamingClient::handleNotifyFinished):
(CachedResourceStreamingClient::CachedResourceStreamingClient):
(CachedResourceStreamingClient::~CachedResourceStreamingClient):
(CachedResourceStreamingClient::loadFailed):
(CachedResourceStreamingClient::setDefersLoading):
(CachedResourceStreamingClient::getOrCreateReadBuffer):
(CachedResourceStreamingClient::responseReceived):
(CachedResourceStreamingClient::dataReceived):
(CachedResourceStreamingClient::notifyFinished):
(ResourceHandleStreamingClient::ResourceHandleStreamingClient):
(ResourceHandleStreamingClient::~ResourceHandleStreamingClient):
(ResourceHandleStreamingClient::loadFailed):
(ResourceHandleStreamingClient::setDefersLoading):
(ResourceHandleStreamingClient::getOrCreateReadBuffer):
(ResourceHandleStreamingClient::willSendRequest):
(ResourceHandleStreamingClient::didReceiveResponse):
(ResourceHandleStreamingClient::didReceiveData):
(ResourceHandleStreamingClient::didFinishLoading):
(ResourceHandleStreamingClient::didFail):
(ResourceHandleStreamingClient::wasBlocked):
(ResourceHandleStreamingClient::cannotShowURL):
Make element thread-safe, add support to use the element without a player associated (e.g.
the DASH plugin using the webkitsrc to download fragments), use GMutexLocker to simplify
locks and other general improvements.
2013-08-27 Antti Koivisto <antti@apple.com>
Remove branch from DescendantIteratorAdapter::begin() when invoking for ContainerNode
https://bugs.webkit.org/show_bug.cgi?id=120358
Reviewed by Andreas Kling.
* dom/ContainerNode.h:
Delete isContainerNode() so it can't be called if there is static knowledge that the object is a ContainerNode.
* dom/DescendantIterator.h:
(WebCore::::DescendantIterator):
Make DescendantIterator use Node* as root instead of ContainerNode*. It is only used for equality comparison.
(WebCore::::begin):
Remove branch. Rely on ElementTraversal specialization for ContainerNodes.
2013-08-27 Joseph Pecoraro <pecoraro@apple.com>
Web Inspector: Column Breakpoint not working, may be off by 1
https://bugs.webkit.org/show_bug.cgi?id=120334
Reviewed by David Kilzer.
JavaScriptCore changed to 1-based column numbers at some point. We
need to update the ScriptDebugger assumption that they were 0-based.
Test: inspector-protocol/debugger/column-breakpoint.html
* bindings/js/ScriptDebugServer.cpp:
(WebCore::ScriptDebugServer::createCallFrame):
(WebCore::ScriptDebugServer::updateCallFrameAndPauseIfNeeded):
2013-08-27 Antti Koivisto <antti@apple.com>
Switch some more code to element child/descendant iterators
https://bugs.webkit.org/show_bug.cgi?id=120355
Reviewed by Andreas Kling.
Move from Traversal<ElementType>::next() and Traversal<ElementType>::nextSibling() to iterators.
* css/CSSFontFaceSource.cpp:
(WebCore::CSSFontFaceSource::getFontData):
* dom/Document.cpp:
(WebCore::Document::removeTitle):
(WebCore::Document::updateBaseURL):
(WebCore::Document::processBaseElement):
* dom/TreeScope.cpp:
(WebCore::TreeScope::labelElementForId):
(WebCore::TreeScope::findAnchor):
* html/HTMLFieldSetElement.cpp:
(WebCore::HTMLFieldSetElement::invalidateDisabledStateUnder):
(WebCore::HTMLFieldSetElement::childrenChanged):
* html/HTMLLabelElement.cpp:
(WebCore::HTMLLabelElement::control):
* html/HTMLMediaElement.cpp:
(WebCore::HTMLMediaElement::cancelPendingEventsAndCallbacks):
* html/HTMLObjectElement.cpp:
(WebCore::HTMLObjectElement::parametersForPlugin):
* rendering/FilterEffectRenderer.cpp:
(WebCore::FilterEffectRenderer::buildReferenceFilter):
* svg/SVGFilterPrimitiveStandardAttributes.h:
(WebCore::isSVGFilterPrimitiveStandardAttributes):
(WebCore::SVGFilterPrimitiveStandardAttributes):
* svg/animation/SMILTimeContainer.cpp:
(WebCore::SMILTimeContainer::updateDocumentOrderIndexes):
* svg/graphics/SVGImage.cpp:
(WebCore::SVGImage::hasSingleSecurityOrigin):
2013-08-26 Andreas Kling <akling@apple.com>
FocusController::focusedOrMainFrame() should return a reference.
<https://webkit.org/b/120339>
Reviewed by Antti Koivisto.
Now that Page::mainFrame() returns a reference, we can make this return a reference
too, since there's always either a focused or a main frame.
One hectogram of null checks removed as a result.
2013-08-26 Andreas Kling <akling@apple.com>
Document's renderer is always a RenderView.
<https://webkit.org/b/120304>
Reviewed by Darin Adler.
Let's enforce this better by storing a RenderView* instead of a plain RenderObject*.
We should switch callers that grab at Document::renderer() to calling renderView()
instead, but that's better done separately.
* dom/Document.cpp:
(WebCore::Document::Document):
(WebCore::Document::~Document):
(WebCore::Document::setRenderView):
(WebCore::Document::createRenderTree):
(WebCore::Document::detach):
(WebCore::Document::setInPageCache):
* dom/Document.h:
(WebCore::Document::renderView):
(WebCore::Document::renderer):
* html/parser/HTMLResourcePreloader.cpp:
* rendering/RenderObject.cpp:
(WebCore::RenderObject::setStyle):
* rendering/RenderView.h:
* svg/SVGSVGElement.cpp:
(WebCore::SVGSVGElement::updateCurrentTranslate):
2013-08-27 Allan Sandfeld Jensen <allan.jensen@digia.com>
Font's fast code path doesn't handle partial runs correctly when kerning or ligatures are enabled
https://bugs.webkit.org/show_bug.cgi?id=100050
Reviewed by Darin Adler.
Renamed m_characterIndex to m_characterIndexOfGlyph and gave it an inline size of 10,
which covers around 66% of all cases. The rest of the cases are now preallocated to the
upper limit which is length of the original TextRun.
* platform/graphics/FontFastPath.cpp:
(WebCore::Font::getGlyphsAndAdvancesForSimpleText):
(WebCore::Font::selectionRectForSimpleText):
(WebCore::Font::offsetForPositionForSimpleText):
* platform/graphics/WidthIterator.cpp:
(WebCore::WidthIterator::WidthIterator):
(WebCore::WidthIterator::advanceInternal):
* platform/graphics/WidthIterator.h:
2013-08-27 Christophe Dumez <ch.dumez@sisa.samsung.com>
Implement DOM3 wheel event
https://bugs.webkit.org/show_bug.cgi?id=94081
Reviewed by Darin Adler.
Add support for DOM Level 3 WheelEvent:
http://www.w3.org/TR/DOM-Level-3-Events/#events-WheelEvent
Firefox, IE10 and since recently Blink already support it so
it increases our cross-browser compatibility.
The non-standard 'mousewheel' event is still supported for backward
compatibility. Note that the deltas returned by the mousewheel and
the wheel events are not identical:
- They have opposite signs.
- The wheel event reports the actual amount of pixels that should be
scrolled while the legacy mousewheel event reports a factor of the
number of mouse wheel ticks (using a constant multiplier).
Tests: fast/events/wheelevent-basic.html
fast/events/wheelevent-constructor.html
fast/events/wheelevent-mousewheel-interaction.html
* dom/Document.h:
* dom/Document.idl:
* dom/Element.h:
* dom/Element.idl:
* dom/EventNames.h:
* dom/EventTarget.cpp:
(WebCore::legacyType):
(WebCore::EventTarget::shouldObserveLegacyType):
(WebCore::EventTarget::setupLegacyTypeObserverIfNeeded):
(WebCore::EventTarget::fireEventListeners):
* dom/EventTarget.h:
* dom/Node.cpp:
(WebCore::Node::didMoveToNewDocument):
(WebCore::tryAddEventListener):
(WebCore::tryRemoveEventListener):
(WebCore::Node::defaultEventHandler):
* dom/WheelEvent.cpp:
(WebCore::WheelEventInit::WheelEventInit):
(WebCore::WheelEvent::WheelEvent):
(WebCore::WheelEvent::initWheelEvent):
* dom/WheelEvent.h:
(WebCore::WheelEvent::deltaX):
(WebCore::WheelEvent::deltaY):
(WebCore::WheelEvent::deltaZ):
(WebCore::WheelEvent::wheelDelta):
(WebCore::WheelEvent::wheelDeltaX):
(WebCore::WheelEvent::wheelDeltaY):
* dom/WheelEvent.idl:
* html/HTMLAttributeNames.in:
* html/HTMLElement.cpp:
(WebCore::HTMLElement::eventNameForAttributeName):
* page/DOMWindow.cpp:
(WebCore::DOMWindow::addEventListener):
(WebCore::DOMWindow::removeEventListener):
* page/DOMWindow.h:
* page/DOMWindow.idl:
* page/EventHandler.cpp:
(WebCore::EventHandler::defaultWheelEventHandler):
* plugins/blackberry/PluginViewBlackBerry.cpp:
(WebCore::PluginView::handleWheelEvent):
* svg/SVGElementInstance.cpp:
* svg/SVGElementInstance.h:
* svg/SVGElementInstance.idl:
2013-08-27 Allan Sandfeld Jensen <allan.jensen@digia.com>
Assertion while scrolling news.google.com
https://bugs.webkit.org/show_bug.cgi?id=115303
Reviewed by Anders Carlsson.
Do not relayout when accessing script elements during painting.
* html/HTMLEmbedElement.cpp:
(WebCore::HTMLEmbedElement::renderWidgetForJSBindings):
2013-08-27 Benjamin Poulain <benjamin@webkit.org>
Remove DOMSettableTokenList's overload of add() and remove()
https://bugs.webkit.org/show_bug.cgi?id=120341
Reviewed by Ryosuke Niwa.
Little refactoring to make other cleanups easier. Instead of modifying
SpaceSplitString directly, rely on DOMTokenList ultimately changing
the value, which in turn updates the tokens.
* html/DOMSettableTokenList.cpp:
* html/DOMSettableTokenList.h:
* html/DOMTokenList.h:
2013-08-27 Xabier Rodriguez Calvar <calvaris@igalia.com>
[GTK] Volume slider shows incorrect track when muted
https://bugs.webkit.org/show_bug.cgi?id=120253
Reviewed by Philippe Normand.
When painting the volume bar, consider that it could be muted even
then volume is different than zero.
* platform/gtk/RenderThemeGtk.cpp:
(WebCore::RenderThemeGtk::paintMediaVolumeSliderTrack): Asign
painted volume as 0 when media is muted.
2013-08-26 Sam Weinig <sam@webkit.org>
EditorInternalCommand should use Frame& where possible
https://bugs.webkit.org/show_bug.cgi?id=120340
Reviewed by Andreas Kling.
Only isSupportedFromDOM still takes a Frame*, as it still has callers that expect null to work.
* dom/UserTypingGestureIndicator.cpp:
* dom/UserTypingGestureIndicator.h:
* editing/Editor.cpp:
* editing/EditorCommand.cpp:
* page/EventHandler.cpp:
2013-08-26 Ryosuke Niwa <rniwa@webkit.org>
Elements in a node list of the form element's name getter should not be added to the past names map
https://bugs.webkit.org/show_bug.cgi?id=120279
Reviewed by Darin Adler.
Don't add the element in the named items to the past names map when there are multiple elements.
This matches IE10's behavior and the specified behavior in HTML5:
http://www.w3.org/TR/2013/WD-html51-20130528/forms.html#dom-form-nameditem
Test: fast/forms/past-names-map-should-not-contain-nodelist-item.html
* html/HTMLFormElement.cpp:
(WebCore::HTMLFormElement::getNamedElements):
2013-08-26 Ryosuke Niwa <rniwa@webkit.org>
Windows build fix after r154658.
* page/AutoscrollController.cpp:
(WebCore::getMainFrame):
2013-08-26 Andreas Kling <akling@apple.com>
Page::mainFrame() should return a reference.
<http://webkit.org/b/119677>
Reviewed by Antti Koivisto.
Page always creates the main Frame by itself now, so it will never be null during the Page's lifetime.
Let Page::mainFrame() return Frame& and remove a sea of null checks.
2013-08-26 Sam Weinig <sam@webkit.org>
Remove two unnecessary .get()s.
Reviewed by Anders Carlsson.
* editing/Editor.h:
(WebCore::Editor::killRing):
(WebCore::Editor::spellChecker):
2013-08-26 Joseph Pecoraro <pecoraro@apple.com>
Web Inspector: We should regenerate InspectorBackendCommands.js for Legacy Inspector.json versions
https://bugs.webkit.org/show_bug.cgi?id=120242
Reviewed by Timothy Hatcher.
- Update the Inspector.json CodeGenerator to include an output_js_dir.
- Cleanup multiple trailing newlines in some of the generated files.
- Provide a way to not verify runtime casts, needed for Legacy inputs.
* CMakeLists.txt:
* DerivedSources.make:
* DerivedSources.pri:
* GNUmakefile.am:
* inspector/CodeGeneratorInspector.py:
(resolve_all_types):
(SmartOutput.close):
2013-08-26 Sam Weinig <sam@webkit.org>
AlternativeTextController should hold onto Frame as a reference
https://bugs.webkit.org/show_bug.cgi?id=120327
Reviewed by Andreas Kling.
While in the area I also:
- Reference-ified Editor::killRing().
- Const-ified Editor::m_killRing, Editor::m_spellChecker, and Editor::m_alternativeTextController.
* editing/AlternativeTextController.cpp:
(WebCore::AlternativeTextController::AlternativeTextController):
(WebCore::AlternativeTextController::stopPendingCorrection):
(WebCore::AlternativeTextController::isSpellingMarkerAllowed):
(WebCore::AlternativeTextController::applyAlternativeTextToRange):
(WebCore::AlternativeTextController::applyAutocorrectionBeforeTypingIfAppropriate):
(WebCore::AlternativeTextController::respondToUnappliedSpellCorrection):
(WebCore::AlternativeTextController::timerFired):
(WebCore::AlternativeTextController::handleAlternativeTextUIResult):
(WebCore::AlternativeTextController::rootViewRectForRange):
(WebCore::AlternativeTextController::respondToChangedSelection):
(WebCore::AlternativeTextController::respondToAppliedEditing):
(WebCore::AlternativeTextController::respondToUnappliedEditing):
(WebCore::AlternativeTextController::alternativeTextClient):
(WebCore::AlternativeTextController::editorClient):
(WebCore::AlternativeTextController::markPrecedingWhitespaceForDeletedAutocorrectionAfterCommand):
(WebCore::AlternativeTextController::processMarkersOnTextToBeReplacedByResult):
(WebCore::AlternativeTextController::respondToMarkerAtEndOfWord):
(WebCore::AlternativeTextController::insertDictatedText):
(WebCore::AlternativeTextController::applyDictationAlternative):
* editing/AlternativeTextController.h:
(WebCore::AlternativeTextController::UNLESS_ENABLED):
* editing/Editor.cpp:
(WebCore::Editor::Editor):
(WebCore::Editor::addToKillRing):
* editing/Editor.h:
(WebCore::Editor::killRing):
* editing/EditorCommand.cpp:
(WebCore::executeYank):
(WebCore::executeYankAndSelect):
2013-08-23 Andy Estes <aestes@apple.com>
Fix issues found by the Clang Static Analyzer
https://bugs.webkit.org/show_bug.cgi?id=120230
Reviewed by Darin Adler.
* WebCore.xcodeproj/project.pbxproj: Removed FoundationExtras.h.
* accessibility/mac/WebAccessibilityObjectWrapperMac.mm: Removed CFAutoreleaseHelper().
(AXTextMarkerRange): Used HardAutorelease() instead of
CFAutoreleaseHelper().
(AXTextMarkerRangeStart): Ditto.
(AXTextMarkerRangeEnd): Ditto.
(textMarkerForVisiblePosition): Ditto.
* platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
(-[WebCoreAVFMovieObserver initWithCallback:]): Called [super init]
first so that we don't later use ivars from the wrong self.
(-[WebCoreAVFLoaderDelegate initWithCallback:]): Ditto.
* platform/mac/FoundationExtras.h: Removed.
* platform/mac/KURLMac.mm:
(WebCore::KURL::operator NSURL *): Used WTF's HardAutorelease().
* platform/mac/WebCoreNSURLExtras.mm:
(WebCore::mapHostNameWithRange): Used HardAutorelease() instead of
WebCoreCFAutorelease().
(WebCore::URLWithData): Ditto.
(WebCore::userVisibleString): Ditto.
(WebCore::URLByRemovingComponentAndSubsequentCharacter): Used Vector<>
with an inline capacity rather than heap-allocating a buffer.
* platform/mac/WebCoreObjCExtras.h: Used HardAutorelease() instead of
WebCoreCFAutorelease().
* platform/text/mac/StringImplMac.mm:
(WTF::StringImpl::operator NSString *): Used WTF's HardAutorelease().
2013-08-26 Pratik Solanki <psolanki@apple.com>
Page::console() should return a reference
https://bugs.webkit.org/show_bug.cgi?id=120320
Reviewed by Darin Adler.
Page::m_console is never NULL so console() can just return a reference.
* css/CSSParser.cpp:
(WebCore::CSSParser::logError):
* dom/Document.cpp:
(WebCore::Document::addConsoleMessage):
(WebCore::Document::addMessage):
* page/DOMWindow.cpp:
(WebCore::DOMWindow::pageConsole):
* page/Page.h:
(WebCore::Page::console):
* xml/XSLStyleSheetLibxslt.cpp:
(WebCore::XSLStyleSheet::parseString):
* xml/XSLTProcessorLibxslt.cpp:
(WebCore::docLoaderFunc):
2013-08-26 Rob Buis <rwlbuis@webkit.org>
Lonely stop crashes
https://bugs.webkit.org/show_bug.cgi?id=87964
Reviewed by Darin Adler.
Provide a nodeAtFloatPoint implementation for RenderSVGGradientStop to avoid hitting the assert in RenderObject::nodeAtFloatPoint.
Test: svg/custom/stop-crash-hittest.svg
* rendering/svg/RenderSVGGradientStop.h:
2013-08-26 Sam Weinig <sam@webkit.org>
Editor::spellChecker() should return a reference
https://bugs.webkit.org/show_bug.cgi?id=120325
Reviewed by Anders Carlsson.
* editing/Editor.cpp:
(WebCore::Editor::Editor):
* editing/Editor.h:
(WebCore::Editor::spellChecker):
* editing/SpellChecker.cpp:
(WebCore::SpellChecker::SpellChecker):
(WebCore::SpellChecker::client):
(WebCore::SpellChecker::isAsynchronousEnabled):
(WebCore::SpellChecker::didCheck):
(WebCore::SpellChecker::didCheckSucceed):
* editing/SpellChecker.h:
* page/EditorClient.h:
* testing/Internals.cpp:
(WebCore::Internals::lastSpellCheckRequestSequence):
(WebCore::Internals::lastSpellCheckProcessedSequence):
2013-08-26 Bem Jones-Bey <bjonesbe@adobe.com>
Optimize FloatIntervalSearchAdapter::collectIfNeeded
https://bugs.webkit.org/show_bug.cgi?id=120237
Reviewed by David Hyatt.
This is a port of 3 Blink patches:
https://codereview.chromium.org/22463002 (By shatch@chromium.org)
https://chromiumcodereview.appspot.com/22909005 (By me)
https://chromiumcodereview.appspot.com/23084002 (By me)
shatch optimized FloatIntervalSearchAdapter by having it store the
outermost float instead of making a bunch of calls to
logical(Left/Right/Bottom)ForFloat, and then only making that call
once when heightRemaining needs to be computed.
I noticed that now we were storing both the last float encountered and
the outermost float, and that the behavior for shape-outside wasn't
significantly changed by using the outermost float instead of the last
float encountered (and in most cases, using the outermost float gives
more reasonable behavior). Since this isn't covered in the spec yet, I
changed shape-outside to use the outermost float, making it so that we
only need to store one float pointer when walking the placed floats
tree, and keeping the performance win.
Also while changing updateOffsetIfNeeded, removed const, since that is
a lie. Nothing about that method is const.
Test: fast/shapes/shape-outside-floats/shape-outside-floats-outermost.html
* rendering/RenderBlock.cpp:
(WebCore::::updateOffsetIfNeeded):
(WebCore::::collectIfNeeded):
(WebCore::::getHeightRemaining):
(WebCore::RenderBlock::logicalLeftFloatOffsetForLine):
(WebCore::RenderBlock::logicalRightFloatOffsetForLine):
* rendering/RenderBlock.h:
(WebCore::RenderBlock::FloatIntervalSearchAdapter::FloatIntervalSearchAdapter):
(WebCore::RenderBlock::FloatIntervalSearchAdapter::outermostFloat):
2013-08-26 Alexey Proskuryakov <ap@apple.com>
[Mac] can-read-in-dragstart-event.html and can-read-in-copy-and-cut-events.html fail
https://bugs.webkit.org/show_bug.cgi?id=113094
Reviewed by Darin Adler.
Mac platform implementation has checks for pasteboard change count, but it
didn't use to update the count when writing to pasteboad from JavaScript.
* platform/PasteboardStrategy.h: Changed changeCount function to return a long
instead of an int, as the underlying Mac type is NSInteger. Changed all methods
that modify the pasteboard to return a new change count.
* platform/PlatformPasteboard.h: Changed all methods that modify the pasteboard
to return a new change count.
* platform/mac/PasteboardMac.mm:
(WebCore::Pasteboard::clear): Update m_changeCount.
(WebCore::Pasteboard::writeSelectionForTypes): Ditto.
(WebCore::Pasteboard::writePlainText): Ditto.
(WebCore::writeURLForTypes): Ditto.
(WebCore::Pasteboard::writeURL): Ditto.
(WebCore::writeFileWrapperAsRTFDAttachment): Ditto.
(WebCore::Pasteboard::writeImage): Ditto.
(WebCore::Pasteboard::writePasteboard): Ditto.
(WebCore::addHTMLClipboardTypesForCocoaType): Ditto.
(WebCore::Pasteboard::writeString): Ditto.
* platform/mac/PlatformPasteboardMac.mm:
(WebCore::PlatformPasteboard::changeCount): Changed returned type to long to avoid
data loss.
(WebCore::PlatformPasteboard::copy): Return new change count.
(WebCore::PlatformPasteboard::addTypes): Ditto.
(WebCore::PlatformPasteboard::setTypes): Ditto.
(WebCore::PlatformPasteboard::setBufferForType): Ditto.
(WebCore::PlatformPasteboard::setPathnamesForType): Ditto.
(WebCore::PlatformPasteboard::setStringForType): Ditto. Replaced -[NSURL writeToPasteboard:]
with an equivalent implemnentation that tells use whether writing was successful.
There is difference with invalid URL string handling - we used to silently ignore
such requets, but set pasteboard content to empty URL now.
2013-08-24 Sam Weinig <sam@webkit.org>
Add support for Promises
https://bugs.webkit.org/show_bug.cgi?id=120260
Reviewed by Darin Adler.
Add an initial implementation of Promises - http://dom.spec.whatwg.org/#promises.
- Despite Promises being defined in the DOM, the implementation is being put in JSC
in preparation for the Promises eventually being defined in ECMAScript.
Tests: fast/js/Promise-already-fulfilled.html
fast/js/Promise-already-rejected.html
fast/js/Promise-already-resolved.html
fast/js/Promise-catch-in-workers.html
fast/js/Promise-catch.html
fast/js/Promise-chain.html
fast/js/Promise-exception.html
fast/js/Promise-fulfill-in-workers.html
fast/js/Promise-fulfill.html
fast/js/Promise-init-in-workers.html
fast/js/Promise-init.html
fast/js/Promise-reject-in-workers.html
fast/js/Promise-reject.html
fast/js/Promise-resolve-chain.html
fast/js/Promise-resolve-in-workers.html
fast/js/Promise-resolve-with-then-exception.html
fast/js/Promise-resolve-with-then-fulfill.html
fast/js/Promise-resolve-with-then-reject.html
fast/js/Promise-resolve.html
fast/js/Promise-simple-fulfill-inside-callback.html
fast/js/Promise-simple-fulfill.html
fast/js/Promise-simple-in-workers.html
fast/js/Promise-simple.html
fast/js/Promise-static-fulfill.html
fast/js/Promise-static-reject.html
fast/js/Promise-static-resolve.html
fast/js/Promise-then-in-workers.html
fast/js/Promise-then-without-callbacks-in-workers.html
fast/js/Promise-then-without-callbacks.html
fast/js/Promise-then.html
fast/js/Promise-types.html
fast/js/Promise.html
* GNUmakefile.list.am:
* Target.pri:
* UseJSC.cmake:
* WebCore.vcxproj/WebCore.vcxproj:
* WebCore.vcxproj/WebCore.vcxproj.filters:
* WebCore.xcodeproj/project.pbxproj:
* bindings/js/JSBindingsAllInOne.cpp:
Add new files.
* bindings/js/JSDOMGlobalObjectTask.cpp: Added.
(WebCore::JSGlobalObjectCallback::create):
(WebCore::JSGlobalObjectCallback::~JSGlobalObjectCallback):
(WebCore::JSGlobalObjectCallback::call):
(WebCore::JSGlobalObjectCallback::JSGlobalObjectCallback):
(WebCore::JSGlobalObjectTask::JSGlobalObjectTask):
(WebCore::JSGlobalObjectTask::~JSGlobalObjectTask):
(WebCore::JSGlobalObjectTask::performTask):
* bindings/js/JSDOMGlobalObjectTask.h: Added.
(WebCore::JSGlobalObjectTask::create):
Add a new task type to be used with the GlobalObjectMethodTable's new QueueTaskToEventLoop callback.
* bindings/js/JSDOMWindowBase.cpp:
(WebCore::JSDOMWindowBase::queueTaskToEventLoop):
* bindings/js/JSDOMWindowBase.h:
Implement the GlobalObjectMethodTable callback, QueueTaskToEventLoop.
* bindings/js/JSMainThreadExecState.h:
All using JSMainThreadExecState as a simple RAII object.
* bindings/js/JSWorkerGlobalScopeBase.cpp:
(WebCore::JSWorkerGlobalScopeBase::JSWorkerGlobalScopeBase):
(WebCore::JSWorkerGlobalScopeBase::allowsAccessFrom):
(WebCore::JSWorkerGlobalScopeBase::supportsProfiling):
(WebCore::JSWorkerGlobalScopeBase::supportsRichSourceInfo):
(WebCore::JSWorkerGlobalScopeBase::shouldInterruptScript):
(WebCore::JSWorkerGlobalScopeBase::javaScriptExperimentsEnabled):
(WebCore::JSWorkerGlobalScopeBase::queueTaskToEventLoop):
* bindings/js/JSWorkerGlobalScopeBase.h:
Add a GlobalObjectMethodTable and implement QueueTaskToEventLoop. Forward the other callbacks
to JSGlobalObject so they retain their existing behavior.
2013-08-26 Rob Buis <rwlbuis@webkit.org>
Computed style of fill/stroke properties incorrect on references
https://bugs.webkit.org/show_bug.cgi?id=114761
Reviewed by Darin Adler.
The computed style of the fill and stroke properties did not include
the url() function. Added the url() string to output.
Updated existing tests to cover the issue.
* css/CSSPrimitiveValue.cpp: Cleanup.
(WebCore::CSSPrimitiveValue::customCssText):
* svg/SVGPaint.cpp: Added "url("
(WebCore::SVGPaint::customCssText):
2013-08-26 Zan Dobersek <zdobersek@igalia.com>
Prettify generated build guards in HTMLElementFactory.cpp
https://bugs.webkit.org/show_bug.cgi?id=120310
Reviewed by Darin Adler.
Build guards should wrap the constructor definitions without empty lines between
the guards and the constructor code. Similarly, build guards for addTag calls
shouldn't put an empty line after the build guard closure.
* dom/make_names.pl:
(printConstructorInterior):
(printConstructors):
(printFunctionInits):
2013-08-26 Robert Hogan <robert@webkit.org>
Avoid painting every non-edge collapsed border twice over
https://bugs.webkit.org/show_bug.cgi?id=119759
Reviewed by David Hyatt.
Every collapsed border that isn't on the edge of a table gets painted at least twice, once by each
adjacent cell. The joins are painted four times. This is unnecessary and results in tables with semi-transparent
borders getting rendered incorrectly - each border adjoing two cells is painted twice and ends up darker than it should be.
Fixing the overpainting at joins is another day's work. This patch ensures each collapsed border inside a table is only
painted once. It does this by only allowing cells at the top and left edge of the table to paint their top and left collapsed borders.
All the others can only paint their right and bottom collapsed border. This works because the borders are painted from bottom right to top left.
Tests: fast/table/border-collapsing/collapsed-borders-adjoining-sections-vertical-rl.html
fast/table/border-collapsing/collapsed-borders-adjoining-sections.html
* rendering/RenderTableCell.cpp:
(WebCore::RenderTableCell::paintCollapsedBorders):
2013-08-26 Andreas Kling <akling@apple.com>
Unreviewed build fix.
* page/Page.cpp:
(WebCore::Page::setNeedsRecalcStyleInAllFrames):
2013-08-26 Brent Fulgham <bfulgham@apple.com>
Unreviewed buid fix.
* page/Page.cpp:
(WebCore::Page::setNeedsRecalcStyleInAllFrames): Remove extra '{' character.
2013-08-26 Pratik Solanki <psolanki@apple.com>
PageGroup::groupSettings() should return a reference
https://bugs.webkit.org/show_bug.cgi?id=120319
Reviewed by Andreas Kling.
PageGroup::m_groupSettings is never NULL so we can just return a reference from groupSettings().
* Modules/indexeddb/IDBFactory.cpp:
* page/PageGroup.h:
(WebCore::PageGroup::groupSettings):
* storage/StorageNamespaceImpl.cpp:
(WebCore::StorageNamespaceImpl::localStorageNamespace):
* workers/DefaultSharedWorkerRepository.cpp:
(WebCore::SharedWorkerProxy::groupSettings):
* workers/WorkerMessagingProxy.cpp:
(WebCore::WorkerMessagingProxy::startWorkerGlobalScope):
2013-08-26 Andreas Kling <akling@apple.com>
WebCore: Let Page create the main Frame.
<https://webkit.org/b/119964>
Reviewed by Anders Carlsson.
Previously, Frame::create() would call Page::setMainFrame() when constructing the
main Frame for a Page. Up until that point, Page had a null mainFrame().
To guarantee that Page::mainFrame() is never null, we re-order things so that
Page is responsible for creating its own main Frame. We do this at the earliest
possible point; in the Page constructor initializer list.
Constructing a Frame requires a FrameLoaderClient*, so I've added such a field to
the PageClients struct.
When creating a WebKit-layer frame, we now wrap the already-instantiated
Page::mainFrame() instead of creating a new Frame.
* loader/EmptyClients.cpp:
(WebCore::fillWithEmptyClients):
Add an EmptyFrameLoaderClient to the PageClients constructed here.
* inspector/InspectorOverlay.cpp:
(WebCore::InspectorOverlay::overlayPage):
* svg/graphics/SVGImage.cpp:
(WebCore::SVGImage::dataChanged):
Updated to wrap Page::mainFrame() in a FrameView instead of creating their
own Frame manually.
* page/Frame.cpp:
(WebCore::Frame::create):
* page/Page.h:
Remove Page::setMainFrame() and the only call site.
* page/Page.cpp:
(WebCore::Page::Page):
Construct Page::m_mainFrame in the initializer list.
(WebCore::Page::PageClients::PageClients):
Add "FrameLoaderClient* loaderClientForMainFrame" to PageClients.
(WebCore::Page::setNeedsRecalcStyleInAllFrames):
Null-check the Frame::document() before calling through on it. This would
otherwise crash when changing font-related Settings before calling init() on
the Frame (like InspectorOverlay does.)
2013-08-26 Brent Fulgham <bfulgham@apple.com>
[Windows] Unreviewed build fix.
* rendering/RenderMediaControls.cpp: Remove references to QuickTime controls
that are no longer part of WKSI.
(wkHitTestMediaUIPart):
(wkMeasureMediaUIPart):
(wkDrawMediaUIPart):
(wkDrawMediaSliderTrack):
2013-08-26 Gurpreet Kaur <gur.trio@gmail.com>
<https://webkit.org/b/106133> document.body.scrollTop & document.documentElement.scrollTop differ cross-browser
Reviewed by Darin Adler.
Webkit always uses document.body.scrollTop whether quirks or
standard mode. Similiar behaviour is for document.body.scrollLeft.
As per the specification webkit should return document.body.scrollTop
for quirks mode and document.documentElement.scrollTop for standard mode.
Same for document.body.scrollLeft and document.documentElement.scrollLeft.
Tests: fast/dom/Element/scrollLeft-Quirks.html
fast/dom/Element/scrollLeft.html
fast/dom/Element/scrollTop-Quirks.html
fast/dom/Element/scrollTop.html
* dom/Element.cpp:
(WebCore::Element::scrollLeft):
(WebCore::Element::scrollTop):
If the element does not have any associated CSS layout box or the element
is the root element and the Document is in quirks mode return zero.
Else If the element is the root element return the value of scrollY
for scrollTop and scrollX for scrollLeft.
* html/HTMLBodyElement.cpp:
(WebCore::HTMLBodyElement::scrollLeft):
(WebCore::HTMLBodyElement::scrollTop):
If the element is the HTML body element, the Document is in quirks mode,
return the value of scrollY for scrollTop and scrollX for scrollLeft.
2013-08-26 Antti Koivisto <antti@apple.com>
REGRESSION (r154581): Some plugin tests failing in debug bots
https://bugs.webkit.org/show_bug.cgi?id=120315
Reviewed by Darin Adler.
We are hitting the new no-event-dispatch-while-iterating assertion.
Detaching deletes a plugin which modifies DOM while it dies.
* dom/Document.cpp:
(WebCore::Document::createRenderTree):
(WebCore::Document::detach):
Don't iterate at all. Document never has more than one Element child anyway.
2013-08-26 David Kilzer <ddkilzer@apple.com>
BUILD FIX (r154580): RenderObject::document() returns a reference
See: <https://webkit.org/b/120272>
* accessibility/ios/WebAccessibilityObjectWrapperIOS.mm:
(-[WebAccessibilityObjectWrapper _accessibilityParentForSubview:]):
(AXAttributeStringSetHeadingLevel):
2013-08-26 Brent Fulgham <bfulgham@apple.com>
[Windows] Build fix after r154578. Return Vector<String>() instead
of ListHashSet<String>().
* platform/win/PasteboardWin.cpp:
(WebCore::Pasteboard::types):
2013-08-26 Brent Fulgham <bfulgham@apple.com>
[Windows] Build fix after r154580.
* rendering/RenderThemeWin.cpp: Mirror changes made for other ports now that
Frame is known to always be valid when in a render tree. This allows us to
get rid of some unneeded null checks.
(WebCore::RenderThemeWin::getThemeData):
(WebCore::RenderThemeWin::paintMenuList):
2013-08-26 Brent Fulgham <bfulgham@apple.com>
[Windows] Build fix after r154554.
* page/AutoscrollController.cpp: Correct various places where pointers are now
references.
(WebCore::AutoscrollController::stopAutoscrollTimer):
(WebCore::AutoscrollController::startPanScrolling):
(WebCore::AutoscrollController::autoscrollTimerFired):
2013-08-26 Andreas Kling <akling@apple.com>
Move DocumentTiming inside ENABLE(WEB_TIMING) guards.
<https://webkit.org/b/120281>
Reviewed by Anders Carlsson.
Looks like this struct is only used by other ENABLE(WEB_TIMING) code, so don't bother
filling it in if we're not building like that.
* dom/Document.cpp:
(WebCore::Document::setReadyState):
(WebCore::Document::finishedParsing):
* dom/Document.h:
* dom/DocumentTiming.h:
2013-08-26 Carlos Garcia Campos <cgarcia@igalia.com>
[GTK] Fix compile warning in WebKitDOMCustom
https://bugs.webkit.org/show_bug.cgi?id=120286
Reviewed by Philippe Normand.
* bindings/gobject/WebKitDOMCustom.cpp:
(webkit_dom_html_element_get_item_type): Add return 0.
2013-08-25 Ryosuke Niwa <rniwa@webkit.org>
JSHTMLFormElement::canGetItemsForName needlessly allocates a Vector
https://bugs.webkit.org/show_bug.cgi?id=120277
Reviewed by Sam Weinig.
Added HTMLFormElement::hasNamedElement and used it in JSHTMLFormElement::canGetItemsForName.
This required fixing a bug in HTMLFormElement::getNamedElements that the first call to getNamedElements
after replacing an element A with another element B of the same name caused it to erroneously append A
to namedItems via the aliases mapping. Because getNamedElements used to be always called in pairs, this
wrong behavior was never visible to the Web. Fixed the bug by not adding the old element to namedItem
when namedItem's size is 1.
Also renamed m_elementAliases to m_pastNamesMap along with related member functions.
No new tests are added since there should be no Web exposed behavioral change.
* bindings/js/JSHTMLFormElementCustom.cpp:
(WebCore::JSHTMLFormElement::canGetItemsForName):
* html/HTMLFormElement.cpp:
(WebCore::HTMLFormElement::elementFromPastNamesMap):
(WebCore::HTMLFormElement::addElementToPastNamesMap):
(WebCore::HTMLFormElement::hasNamedElement):
(WebCore::HTMLFormElement::getNamedElements):
* html/HTMLFormElement.h:
2013-08-25 Andreas Kling <akling@apple.com>
RenderLayerBacking::renderer() should return a reference.
<https://webkit.org/b/120280>
Reviewed by Anders Carlsson.
It's just a forwarding call to RenderLayer::renderer() which already returns a reference.
2013-08-25 Gyuyoung Kim <gyuyoung.kim@samsung.com>
Add toSVGMissingGlyphElement(), and use it.
https://bugs.webkit.org/show_bug.cgi?id=120197
Reviewed by Andreas Kling.
As a step to clean-up static_cast<SVGXXX>, toSVGMissingGlyphElement() is added to clean-up
static_cast<SVGMissingGlyphElement*>.
* svg/SVGFontElement.cpp:
(WebCore::SVGFontElement::firstMissingGlyphElement):
(WebCore::SVGFontElement::ensureGlyphCache):
* svg/SVGMissingGlyphElement.h:
(WebCore::toSVGMissingGlyphElement):
2013-08-25 Andreas Kling <akling@apple.com>
RenderLayer::renderer() should return a reference.
<https://webkit.org/b/120276>
Reviewed by Anders Carlsson.
RenderLayer is always created with a renderer, so make renderer() (and m_renderer) references.
Nuked an assortment of useless null checks.
2013-08-25 Antti Koivisto <antti@apple.com>
Element child and descendant iterators
https://bugs.webkit.org/show_bug.cgi?id=120248
Reviewed by Sam Weinig and Andreas Kling.
Add iterators for Element children and descendants.
To iterate over element children:
#include "ChildIterator.h"
for (auto it = elementChildren(this).begin(), end = elementChildren(this).end(); it != end; ++it) {
Element& element = *it;
...
for (auto it = childrenOfType<HTMLAreaElement>(this).begin(), end = childrenOfType<HTMLAreaElement>(this).end(); it != end; ++it) {
HTMLAreaElement& area = *it;
...
To iteratate over element descendants in pre-order:
#include "DescendantIterator.h"
for (auto it = elementDescendants(this).begin(), end = elementDescendants(this).end(); it != end; ++it) {
Element& element = *it;
...
for (auto it = descendantsOfType<HTMLAreaElement>(this).begin(), end = descendantsOfType<HTMLAreaElement>(this).end(); it != end; ++it) {
HTMLAreaElement& area = *it;
...
The iterators assert against DOM mutations and event dispatch while iterating in debug builds.
They are compatible with C++11 range-based for loops. In the future we can use
for (auto& element : elementChildren(this))
...
etc.
The patch all uses the new iterators in a few places.
* WebCore.xcodeproj/project.pbxproj:
* accessibility/AccessibilityNodeObject.cpp:
(WebCore::AccessibilityNodeObject::canvasHasFallbackContent):
(WebCore::siblingWithAriaRole):
* accessibility/AccessibilityRenderObject.cpp:
* accessibility/AccessibilityTable.cpp:
(WebCore::AccessibilityTable::isDataTable):
* dom/ChildIterator.h: Added.
(WebCore::ChildIterator::operator*):
(WebCore::ChildIterator::operator->):
(WebCore::::ChildIterator):
(WebCore::::operator):
(WebCore::=):
(WebCore::::ChildIteratorAdapter):
(WebCore::::begin):
(WebCore::::end):
(WebCore::elementChildren):
(WebCore::childrenOfType):
* dom/DescendantIterator.h: Added.
(WebCore::DescendantIterator::operator*):
(WebCore::DescendantIterator::operator->):
(WebCore::::DescendantIterator):
(WebCore::::operator):
(WebCore::=):
(WebCore::::DescendantIteratorAdapter):
(WebCore::::begin):
(WebCore::::end):
(WebCore::elementDescendants):
(WebCore::descendantsOfType):
* dom/Document.cpp:
(WebCore::Document::buildAccessKeyMap):
(WebCore::Document::childrenChanged):
(WebCore::Document::attach):
(WebCore::Document::detach):
* editing/ApplyStyleCommand.cpp:
(WebCore::ApplyStyleCommand::cleanupUnstyledAppleStyleSpans):
* editing/markup.cpp:
(WebCore::completeURLs):
* html/HTMLMapElement.cpp:
(WebCore::HTMLMapElement::mapMouseEvent):
* html/HTMLMediaElement.cpp:
(WebCore::HTMLMediaElement::selectMediaResource):
(WebCore::HTMLMediaElement::textTrackModeChanged):
2013-08-25 Andreas Kling <akling@apple.com>
RenderObject::document() should return a reference.
<https://webkit.org/b/120272>
Reviewed by Antti Koivisto.
There's always a Document. We were allocated in someone's arena, after all.
Various null checks and assertions neutralized.
2013-08-25 David Kilzer <ddkilzer@apple.com>
BUILD FIX (r154578): Return Vector<String>() from Pasteboard::types() for iOS
* platform/ios/PasteboardIOS.mm:
(WebCore::Pasteboard::types): Return Vector<String>() instead of
ListHashSet<String>() after r154578.
2013-08-25 Darin Adler <darin@apple.com>
Make JavaScript binding for Clipboard::types more normal
https://bugs.webkit.org/show_bug.cgi?id=120271
Reviewed by Anders Carlsson.
* bindings/js/JSClipboardCustom.cpp:
(WebCore::JSClipboard::types): Make a simple custom binding. Only needed because
there is a special value, null, this can return.
* dom/Clipboard.cpp:
(WebCore::Clipboard::types): Return Vector<String> instead of ListHashSet<String>.
* dom/Clipboard.h: Ditto.
* platform/Pasteboard.h: Ditto.
* platform/blackberry/PasteboardBlackBerry.cpp:
(WebCore::Pasteboard::types): Ditto.
* platform/efl/PasteboardEfl.cpp:
(WebCore::Pasteboard::types): Ditto.
* platform/gtk/PasteboardGtk.cpp:
(WebCore::Pasteboard::types): Ditto.
* platform/ios/PasteboardIOS.mm:
(WebCore::Pasteboard::types): Ditto.
* platform/mac/PasteboardMac.mm:
(WebCore::Pasteboard::types): Ditto.
* platform/qt/PasteboardQt.cpp:
(WebCore::Pasteboard::types): Ditto.
* platform/win/PasteboardWin.cpp:
(WebCore::Pasteboard::types): Ditto.
2013-08-25 David Kilzer <ddkilzer@apple.com>
Unreviewed rollout of r154571. Broke internal iOS build.
Reopened: No need for clearTimers function in Frame
https://bugs.webkit.org/show_bug.cgi?id=120265
* history/CachedFrame.cpp:
(WebCore::CachedFrame::CachedFrame):
(WebCore::CachedFrame::destroy):
* page/Frame.cpp:
(WebCore::Frame::clearTimers):
* page/Frame.h:
2013-08-25 Darin Adler <darin@apple.com>
No need for hasData in Clipboard
https://bugs.webkit.org/show_bug.cgi?id=120269
Reviewed by Andreas Kling.
This simple forwarder does not belong in the Clipboard class.
The drag code that uses it already works directly with Pasteboard.
* dom/Clipboard.cpp: Removed hasData.
* dom/Clipboard.h: Ditto.
* page/DragController.cpp:
(WebCore::DragController::startDrag): Call through the pasteboard.
2013-08-25 Darin Adler <darin@apple.com>
No need for documentTypeString function in Frame
https://bugs.webkit.org/show_bug.cgi?id=120262
Reviewed by Andreas Kling.
* WebCore.exp.in: Removed export of Frame::documentTypeString.
* editing/markup.cpp:
(WebCore::documentTypeString): Added. Replaces the old Frame member function.
Makes more sense to have this here since it is both called by and calls code
in this file; somehow this function was left behind.
(WebCore::createFullMarkup): Changed to call the new function.
* editing/markup.h: Added documentTypeString function. Has to be exported
because LegacyWebArchive uses it; might be worth fixing that later.
* loader/archive/cf/LegacyWebArchive.cpp:
(WebCore::LegacyWebArchive::create): Changed to call the new function.
(WebCore::LegacyWebArchive::createFromSelection): Ditto.
* page/Frame.cpp: Removed Frame::documentTypeString.
* page/Frame.h: Ditto.
2013-08-25 Darin Adler <darin@apple.com>
Clipboard is in DOM directory, but ClipboardMac is in platform directory
https://bugs.webkit.org/show_bug.cgi?id=120267
Reviewed by Andreas Kling.
This file is almost gone; has just one function in it. Move it for now, and later
we can delete it entirely.
* WebCore.xcodeproj/project.pbxproj: Updated for new file location.
* dom/ClipboardMac.mm: Moved from Source/WebCore/platform/mac/ClipboardMac.mm.
2013-08-25 Darin Adler <darin@apple.com>
No need for notifyChromeClientWheelEventHandlerCountChanged in Frame
https://bugs.webkit.org/show_bug.cgi?id=120264
Reviewed by Andreas Kling.
* dom/Document.cpp:
(WebCore::Document::createRenderTree): Renamed attach to this.
This made it practical to remove a comment that says the same thing and
also helps make the purpose of the function considerably more clear,
although the relationship to the attached and detach functions is now
less clear; should fix that soon.
(WebCore::pageWheelEventHandlerCountChanged): Added. Contains the code
from Frame::notifyChromeClientWheelEventHandlerCountChanged, minus some
assertions that were only needed because the function was passed a frame
rather than a page.
(WebCore::Document::didBecomeCurrentDocumentInFrame): Added. Contains
most of the code from Frame::setDocument. Looking at before and after,
we can see that most of the work is within the document class and matches
up with other code already in this class. Added FIXMEs about many problems
spotted in the code.
(WebCore::Document::topDocument): Added FIXME and tweaked formatting.
(WebCore::wheelEventHandlerCountChanged): Moved the call to the
pageWheelEventHandlerCountChanged in here from the two call sites.
Also added a FIXME.
(WebCore::Document::didAddWheelEventHandler): Removed the call to
notifyChromeClientWheelEventHandlerCountChanged, since that's now handled
inside wheelEventHandlerCountChanged.
(WebCore::Document::didRemoveWheelEventHandler): Ditto.
* dom/Document.h: Renamed attach to createRenderTree, made it private,
and added a new didBecomeCurrentDocumentInFrame function.
* loader/PlaceholderDocument.cpp:
(WebCore::PlaceholderDocument::createRenderTree): Renamed from attach.
* loader/PlaceholderDocument.h: Did the rename and made the function a
private override.
* page/Frame.cpp:
(WebCore::Frame::setDocument): Moved most of this function out of here
into the new Document::didBecomeCurrentDocumentInFrame function.
Also deleted notifyChromeClientWheelEventHandlerCountChanged.
* page/Frame.h: Deleted notifyChromeClientWheelEventHandlerCountChanged.
2013-08-25 Darin Adler <darin@apple.com>
No need for dispatchVisibilityStateChangeEvent function
https://bugs.webkit.org/show_bug.cgi?id=120261
Reviewed by Andreas Kling.
* dom/Document.cpp: Removed dispatchVisibilityStateChangeEvent.
* dom/Document.h: Ditto.
* page/Frame.cpp: Ditto.
* page/Frame.h: Ditto.
* page/Page.cpp:
(WebCore::Page::setVisibilityState): Put all the logic for dispatching the
visibility state change event. Nothing here requires any special information
about the internals of Frame or Document.
2013-08-25 Darin Adler <darin@apple.com>
No need for clearTimers function in Frame
https://bugs.webkit.org/show_bug.cgi?id=120265
Reviewed by Andreas Kling.
* history/CachedFrame.cpp:
(WebCore::clearTimers): Added. Moved here from Frame.
(WebCore::CachedFrame::CachedFrame): Call above function.
(WebCore::CachedFrame::destroy): Ditto.
* page/Frame.cpp: Removed the two clearTimers functions.
* page/Frame.h: Ditto.
2013-08-24 Ryuan Choi <ryuan.choi@samsung.com>
Unreviewed build fix after r154560
* page/FrameTree.cpp:
(WebCore::FrameTree::scopedChild):
Use tree(). instead of tree()->.
2013-08-24 Benjamin Poulain <benjamin@webkit.org>
<https://webkit.org/b/120102> Inline SelectorQuery's execution traits
Reviewed by Sam Weinig.
For some reason, clang does not always inline the trait. The operations are so simple
that it shows up in profile.
Force the inlining to match the original speed.
* dom/SelectorQuery.cpp:
(WebCore::AllElementExtractorSelectorQueryTrait::appendOutputForElement):
(WebCore::SingleElementExtractorSelectorQueryTrait::appendOutputForElement):
2013-08-24 Benjamin Poulain <benjamin@webkit.org>
Remove a useless #include from StyledElement
https://bugs.webkit.org/show_bug.cgi?id=120245
Reviewed by Andreas Kling.
* dom/StyledElement.cpp:
2013-08-24 Darin Adler <darin@apple.com>
Move Frame::inScope into FrameTree
https://bugs.webkit.org/show_bug.cgi?id=120257
Reviewed by Sam Weinig.
* page/Frame.cpp: Removed inScope.
* page/Frame.h: Ditto.
* page/FrameTree.cpp:
(WebCore::inScope): Moved it here.
(WebCore::FrameTree::scopedChild): Changed to call new function.
(WebCore::FrameTree::scopedChildCount): Ditto.
2013-08-24 David Kilzer <ddkilzer@apple.com>
BUILD FIX: Include HTMLPlugInImageElement.h for ENABLE(PLUGIN_PROXY_FOR_VIDEO)
Fixes the following build failure for iOS:
In file included from Source/WebCore/accessibility/AccessibilityAllInOne.cpp:28:
In file included from Source/WebCore/accessibility/AXObjectCache.cpp:42:
In file included from Source/WebCore/accessibility/AccessibilityMediaControls.h:36:
In file included from Source/WebCore/html/shadow/MediaControlElements.h:34:
In file included from Source/WebCore/html/shadow/MediaControlElementTypes.h:37:
Source/WebCore/html/HTMLMediaElement.h:324:23: error: unknown type name 'PluginCreationOption'
void updateWidget(PluginCreationOption);
^
* html/HTMLMediaElement.h:
2013-08-24 Darin Adler <darin@apple.com>
Frame::tree should return a reference instead of a pointer
https://bugs.webkit.org/show_bug.cgi?id=120259
Reviewed by Andreas Kling.
* page/Frame.h:
(WebCore::Frame::tree): Return a reference instead of a pointer.
* bindings/js/JSDOMWindowCustom.cpp:
(WebCore::childFrameGetter):
(WebCore::indexGetter):
(WebCore::JSDOMWindow::getOwnPropertySlot):
(WebCore::JSDOMWindow::getOwnPropertySlotByIndex):
(WebCore::JSDOMWindow::setLocation):
* bindings/js/PageScriptDebugServer.cpp:
(WebCore::PageScriptDebugServer::setJavaScriptPaused):
* dom/Document.cpp:
(WebCore::canAccessAncestor):
(WebCore::Document::adoptNode):
(WebCore::Document::canNavigate):
(WebCore::Document::findUnsafeParentScrollPropagationBoundary):
(WebCore::Document::notifySeamlessChildDocumentsOfStylesheetUpdate):
(WebCore::Document::openSearchDescriptionURL):
(WebCore::Document::setDesignMode):
(WebCore::Document::parentDocument):
(WebCore::Document::initSecurityContext):
(WebCore::Document::initContentSecurityPolicy):
(WebCore::Document::requestFullScreenForElement):
(WebCore::Document::webkitExitFullscreen):
(WebCore::Document::didRemoveTouchEventHandler):
* dom/TreeScope.cpp:
(WebCore::focusedFrameOwnerElement):
* editing/FrameSelection.cpp:
(WebCore::FrameSelection::selectFrameElementInParentIfFullySelected):
* history/CachedFrame.cpp:
(WebCore::CachedFrameBase::CachedFrameBase):
(WebCore::CachedFrameBase::restore):
(WebCore::CachedFrame::CachedFrame):
* history/CachedPage.cpp:
(WebCore::CachedPage::restore):
* history/PageCache.cpp:
(WebCore::logCanCacheFrameDecision):
(WebCore::PageCache::canCachePageContainingThisFrame):
* html/HTMLDocument.cpp:
(WebCore::HTMLDocument::hasFocus):
* html/HTMLPlugInImageElement.cpp:
(WebCore::HTMLPlugInImageElement::restartSimilarPlugIns):
* inspector/InspectorApplicationCacheAgent.cpp:
(WebCore::InspectorApplicationCacheAgent::getFramesWithManifests):
* inspector/InspectorCanvasAgent.cpp:
(WebCore::InspectorCanvasAgent::findFramesWithUninstrumentedCanvases):
(WebCore::InspectorCanvasAgent::frameNavigated):
* inspector/InspectorDOMAgent.cpp:
(WebCore::InspectorDOMAgent::documents):
* inspector/InspectorFileSystemAgent.cpp:
(WebCore::InspectorFileSystemAgent::assertScriptExecutionContextForOrigin):
* inspector/InspectorPageAgent.cpp:
(WebCore::InspectorPageAgent::getCookies):
(WebCore::InspectorPageAgent::deleteCookie):
(WebCore::InspectorPageAgent::searchInResources):
(WebCore::InspectorPageAgent::findFrameWithSecurityOrigin):
(WebCore::InspectorPageAgent::buildObjectForFrame):
(WebCore::InspectorPageAgent::buildObjectForFrameTree):
* inspector/PageRuntimeAgent.cpp:
(WebCore::PageRuntimeAgent::reportExecutionContextCreation):
* loader/DocumentLoader.cpp:
(WebCore::DocumentLoader::willSendRequest):
(WebCore::DocumentLoader::mainResource):
* loader/DocumentWriter.cpp:
(WebCore::DocumentWriter::createDecoderIfNeeded):
* loader/FrameLoader.cpp:
(WebCore::FrameLoader::submitForm):
(WebCore::FrameLoader::allChildrenAreComplete):
(WebCore::FrameLoader::allAncestorsAreComplete):
(WebCore::FrameLoader::loadURLIntoChildFrame):
(WebCore::FrameLoader::outgoingReferrer):
(WebCore::FrameLoader::updateFirstPartyForCookies):
(WebCore::FrameLoader::setFirstPartyForCookies):
(WebCore::FrameLoader::completed):
(WebCore::FrameLoader::started):
(WebCore::FrameLoader::loadURL):
(WebCore::FrameLoader::loadWithDocumentLoader):
(WebCore::FrameLoader::stopAllLoaders):
(WebCore::FrameLoader::commitProvisionalLoad):
(WebCore::FrameLoader::closeOldDataSources):
(WebCore::FrameLoader::prepareForCachedPageRestore):
(WebCore::FrameLoader::subframeIsLoading):
(WebCore::FrameLoader::subresourceCachePolicy):
(WebCore::FrameLoader::detachChildren):
(WebCore::FrameLoader::closeAndRemoveChild):
(WebCore::FrameLoader::checkLoadComplete):
(WebCore::FrameLoader::numPendingOrLoadingRequests):
(WebCore::FrameLoader::detachFromParent):
(WebCore::FrameLoader::shouldClose):
(WebCore::FrameLoader::handleBeforeUnloadEvent):
(WebCore::FrameLoader::continueLoadAfterNewWindowPolicy):
(WebCore::FrameLoader::shouldInterruptLoadForXFrameOptions):
(WebCore::FrameLoader::findFrameForNavigation):
(WebCore::FrameLoader::effectiveSandboxFlags):
(WebCore::createWindow):
* loader/HistoryController.cpp:
(WebCore::HistoryController::saveDocumentState):
(WebCore::HistoryController::saveDocumentAndScrollState):
(WebCore::HistoryController::restoreDocumentState):
(WebCore::HistoryController::goToItem):
(WebCore::HistoryController::updateForRedirectWithLockedBackForwardList):
(WebCore::HistoryController::recursiveUpdateForCommit):
(WebCore::HistoryController::recursiveUpdateForSameDocumentNavigation):
(WebCore::HistoryController::initializeItem):
(WebCore::HistoryController::createItemTree):
(WebCore::HistoryController::recursiveSetProvisionalItem):
(WebCore::HistoryController::recursiveGoToItem):
(WebCore::HistoryController::currentFramesMatchItem):
* loader/NavigationScheduler.cpp:
(WebCore::NavigationScheduler::mustLockBackForwardList):
(WebCore::NavigationScheduler::scheduleFormSubmission):
* loader/ProgressTracker.cpp:
(WebCore::ProgressTracker::progressStarted):
(WebCore::ProgressTracker::progressCompleted):
(WebCore::ProgressTracker::isMainLoadProgressing):
* loader/appcache/ApplicationCacheGroup.cpp:
(WebCore::ApplicationCacheGroup::selectCache):
(WebCore::ApplicationCacheGroup::selectCacheWithoutManifestURL):
* loader/archive/cf/LegacyWebArchive.cpp:
(WebCore::LegacyWebArchive::create):
* loader/cache/CachedResourceLoader.cpp:
(WebCore::CachedResourceLoader::checkInsecureContent):
* loader/icon/IconController.cpp:
(WebCore::IconController::urlsForTypes):
(WebCore::IconController::startLoader):
* page/Chrome.cpp:
(WebCore::canRunModalIfDuringPageDismissal):
(WebCore::Chrome::windowScreenDidChange):
* page/DOMWindow.cpp:
(WebCore::DOMWindow::length):
(WebCore::DOMWindow::name):
(WebCore::DOMWindow::setName):
(WebCore::DOMWindow::parent):
(WebCore::DOMWindow::top):
(WebCore::DOMWindow::open):
* page/EventHandler.cpp:
(WebCore::EventHandler::scrollRecursively):
(WebCore::EventHandler::logicalScrollRecursively):
(WebCore::EventHandler::handleMouseMoveEvent):
* page/FocusController.cpp:
(WebCore::FocusController::setContainingWindowIsVisible):
* page/Frame.cpp:
(WebCore::parentPageZoomFactor):
(WebCore::parentTextZoomFactor):
(WebCore::Frame::setPrinting):
(WebCore::Frame::shouldUsePrintingLayout):
(WebCore::Frame::dispatchVisibilityStateChangeEvent):
(WebCore::Frame::willDetachPage):
(WebCore::Frame::setPageAndTextZoomFactors):
(WebCore::Frame::deviceOrPageScaleFactorChanged):
(WebCore::Frame::notifyChromeClientWheelEventHandlerCountChanged):
(WebCore::Frame::isURLAllowed):
* page/FrameTree.cpp:
(WebCore::FrameTree::~FrameTree):
(WebCore::FrameTree::setName):
(WebCore::FrameTree::transferChild):
(WebCore::FrameTree::appendChild):
(WebCore::FrameTree::actuallyAppendChild):
(WebCore::FrameTree::removeChild):
(WebCore::FrameTree::uniqueChildName):
(WebCore::FrameTree::scopedChild):
(WebCore::FrameTree::scopedChildCount):
(WebCore::FrameTree::childCount):
(WebCore::FrameTree::child):
(WebCore::FrameTree::find):
(WebCore::FrameTree::isDescendantOf):
(WebCore::FrameTree::traverseNext):
(WebCore::FrameTree::traversePreviousWithWrap):
(WebCore::FrameTree::deepLastChild):
(WebCore::FrameTree::top):
(printFrames):
(showFrameTree):
* page/FrameView.cpp:
(WebCore::FrameView::setFrameRect):
(WebCore::FrameView::hasCompositedContentIncludingDescendants):
(WebCore::FrameView::hasCompositingAncestor):
(WebCore::FrameView::flushCompositingStateIncludingSubframes):
(WebCore::FrameView::updateCanBlitOnScrollRecursively):
(WebCore::FrameView::setIsOverlapped):
(WebCore::FrameView::shouldUseLoadTimeDeferredRepaintDelay):
(WebCore::FrameView::updateLayerFlushThrottlingInAllFrames):
(WebCore::FrameView::serviceScriptedAnimations):
(WebCore::FrameView::updateBackgroundRecursively):
(WebCore::FrameView::parentFrameView):
(WebCore::FrameView::paintContentsForSnapshot):
(WebCore::FrameView::setTracksRepaints):
(WebCore::FrameView::notifyWidgetsInAllFrames):
* page/Location.cpp:
(WebCore::Location::ancestorOrigins):
* page/Page.cpp:
(WebCore::networkStateChanged):
(WebCore::Page::~Page):
(WebCore::Page::renderTreeSize):
(WebCore::Page::updateStyleForAllPagesAfterGlobalChangeInEnvironment):
(WebCore::Page::setNeedsRecalcStyleInAllFrames):
(WebCore::Page::refreshPlugins):
(WebCore::Page::takeAnyMediaCanStartListener):
(WebCore::incrementFrame):
(WebCore::Page::setDefersLoading):
(WebCore::Page::setMediaVolume):
(WebCore::Page::setDeviceScaleFactor):
(WebCore::Page::setShouldSuppressScrollbarAnimations):
(WebCore::Page::didMoveOnscreen):
(WebCore::Page::willMoveOffscreen):
(WebCore::Page::setIsInWindow):
(WebCore::Page::suspendScriptedAnimations):
(WebCore::Page::resumeScriptedAnimations):
(WebCore::Page::userStyleSheetLocationChanged):
(WebCore::Page::allVisitedStateChanged):
(WebCore::Page::visitedStateChanged):
(WebCore::Page::setDebugger):
(WebCore::Page::setMemoryCacheClientCallsEnabled):
(WebCore::Page::setMinimumTimerInterval):
(WebCore::Page::setTimerAlignmentInterval):
(WebCore::Page::dnsPrefetchingStateChanged):
(WebCore::Page::collectPluginViews):
(WebCore::Page::storageBlockingStateChanged):
(WebCore::Page::privateBrowsingStateChanged):
(WebCore::Page::checkSubframeCountConsistency):
(WebCore::Page::suspendActiveDOMObjectsAndAnimations):
(WebCore::Page::resumeActiveDOMObjectsAndAnimations):
(WebCore::Page::captionPreferencesChanged):
* page/PageGroup.cpp:
(WebCore::PageGroup::invalidateInjectedStyleSheetCacheInAllFrames):
* page/PageGroupLoadDeferrer.cpp:
(WebCore::PageGroupLoadDeferrer::PageGroupLoadDeferrer):
(WebCore::PageGroupLoadDeferrer::~PageGroupLoadDeferrer):
* page/PageSerializer.cpp:
(WebCore::PageSerializer::serializeFrame):
* page/PageThrottler.cpp:
(WebCore::PageThrottler::throttlePage):
(WebCore::PageThrottler::unthrottlePage):
* page/Settings.cpp:
(WebCore::setImageLoadingSettings):
(WebCore::Settings::setTextAutosizingFontScaleFactor):
* page/SpatialNavigation.cpp:
(WebCore::rectToAbsoluteCoordinates):
* page/animation/AnimationController.cpp:
(WebCore::AnimationControllerPrivate::suspendAnimations):
(WebCore::AnimationControllerPrivate::resumeAnimations):
* page/mac/PageMac.cpp:
(WebCore::Page::addSchedulePair):
(WebCore::Page::removeSchedulePair):
* page/scrolling/ScrollingCoordinator.cpp:
(WebCore::ScrollingCoordinator::computeNonFastScrollableRegion):
(WebCore::ScrollingCoordinator::computeCurrentWheelEventHandlerCount):
* plugins/PluginView.cpp:
(WebCore::PluginView::performRequest):
(WebCore::PluginView::load):
* rendering/HitTestResult.cpp:
(WebCore::HitTestResult::targetFrame):
* rendering/RenderLayerCompositor.cpp:
(WebCore::RenderLayerCompositor::enclosingCompositorFlushingLayers):
(WebCore::RenderLayerCompositor::updateCompositingLayers):
(WebCore::RenderLayerCompositor::notifyIFramesOfCompositingChange):
* rendering/TextAutosizer.cpp:
(WebCore::TextAutosizer::processSubtree):
* storage/StorageEventDispatcher.cpp:
(WebCore::StorageEventDispatcher::dispatchSessionStorageEvents):
(WebCore::StorageEventDispatcher::dispatchLocalStorageEvents):
* svg/SVGSVGElement.cpp:
(WebCore::SVGSVGElement::currentScale):
(WebCore::SVGSVGElement::setCurrentScale):
* testing/Internals.cpp:
(WebCore::Internals::formControlStateOfPreviousHistoryItem):
(WebCore::Internals::setFormControlStateOfPreviousHistoryItem):
(WebCore::Internals::numberOfScrollableAreas):
* xml/parser/XMLDocumentParserLibxml2.cpp:
(WebCore::hasNoStyleInformation):
Use tree(). instead of tree()->.
2013-08-24 Andreas Kling <akling@apple.com>
Merge Document::viewportSize() logic into RenderView::viewportSize().
<https://webkit.org/b/120254>
Reviewed by Darin Adler.
RenderView can just ask FrameView (the viewport) about its size directly, no need for
a weirdly-placed method on Document.
* dom/Document.cpp:
* rendering/RenderView.cpp:
(WebCore::RenderView::viewportSize):
* rendering/RenderView.h:
2013-08-24 Andreas Kling <akling@apple.com>
RenderObject::frame() should return a reference.
<https://webkit.org/b/120251>
Reviewed by Darin Adler.
There is now always a Frame, and we can get to it by walking this path:
RenderObject -> Document -> RenderView -> FrameView -> Frame
Removed the customary horde of null checks.
2013-08-24 Andreas Kling <akling@apple.com>
RenderLayer::compositor() should return a reference.
<https://webkit.org/b/120250>
Reviewed by Anders Carlsson.
It was already converting from a reference to a pointer.
2013-08-24 Yoav Weiss <yoav@yoav.ws>
Eliminate a useless comparison in srcset's candidate selection algorithm
https://bugs.webkit.org/show_bug.cgi?id=120235
There is no point in comparing the last item in the candidates vector to the DPR, since it will be returned anyway. Therefore, the
iteration on the candidates vector now skips the last candidate.
Reviewed by Andreas Kling.
* html/parser/HTMLParserIdioms.cpp:
(WebCore::bestFitSourceForImageAttributes):
2013-08-24 Andreas Kling <akling@apple.com>
RenderObject::view() should return a reference.
<https://webkit.org/b/120247>
Reviewed by Antti Koivisto.
Now that the lifetime and accessibility characteristics of RenderView are well-defined,
we can make RenderObject::view() return a reference, exposing a plethora of unnecessary
null checks.
2013-08-24 Joseph Pecoraro <pecoraro@apple.com>
Web Inspector: Cleanup Inspector Agents a bit
https://bugs.webkit.org/show_bug.cgi?id=120218
Reviewed by Andreas Kling.
Merge https://chromium.googlesource.com/chromium/blink/+/8693dcb8ba42a5c225f516c664fb0f453c8ba6f0.
* inspector/InspectorCSSAgent.cpp:
(WebCore::InspectorCSSAgent::elementForId):
* inspector/InspectorStyleSheet.cpp:
(ParsedStyleSheet::ParsedStyleSheet):
(WebCore::InspectorStyle::setPropertyText):
(WebCore::InspectorStyle::populateAllProperties):
(WebCore::InspectorStyleSheet::inlineStyleSheetText):
2013-08-24 Andreas Kling <akling@apple.com>
Let Document keep its RenderView during render tree detach.
<https://webkit.org/b/120233>
Reviewed by Antti Koivisto.
Instead of having "Document::renderer() == NULL" signify that the render tree is being
torn down, give Document an explicit flag for this instead.
This way, we can keep Document's RenderView in place during tree detach.
* dom/Document.cpp:
(WebCore::Document::Document):
(WebCore::Document::detach):
* dom/Document.h:
(WebCore::Document::renderTreeBeingDestroyed):
* rendering/RenderObject.h:
(WebCore::RenderObject::documentBeingDestroyed):
2013-08-24 Antti Koivisto <antti@apple.com>
Tighten before/after pseudo element accessors
https://bugs.webkit.org/show_bug.cgi?id=120204
Reviewed by Andreas Kling.
We have generic looking Element::pseudoElement(PseudoID) which only returns before/after pseudo elements.
Switch to Element::before/afterPseudoElement(), similarly for setters.
* WebCore.exp.in:
* css/CSSComputedStyleDeclaration.cpp:
(WebCore::ComputedStyleExtractor::styledNode):
* dom/Element.cpp:
(WebCore::Element::~Element):
(WebCore::beforeOrAfterPseudeoElement):
(WebCore::Element::computedStyle):
(WebCore::Element::updatePseudoElement):
(WebCore::Element::createPseudoElementIfNeeded):
(WebCore::Element::updateBeforePseudoElement):
(WebCore::Element::updateAfterPseudoElement):
(WebCore::Element::beforePseudoElement):
(WebCore::Element::afterPseudoElement):
(WebCore::Element::setBeforePseudoElement):
(WebCore::Element::setAfterPseudoElement):
(WebCore::disconnectPseudoElement):
(WebCore::Element::clearBeforePseudoElement):
(WebCore::Element::clearAfterPseudoElement):
(WebCore::Element::clearStyleDerivedDataBeforeDetachingRenderer):
* dom/Element.h:
* dom/ElementRareData.h:
(WebCore::ElementRareData::beforePseudoElement):
(WebCore::ElementRareData::afterPseudoElement):
(WebCore::ElementRareData::hasPseudoElements):
(WebCore::ElementRareData::~ElementRareData):
(WebCore::ElementRareData::clearBeforePseudoElement):
(WebCore::ElementRareData::clearAfterPseudoElement):
(WebCore::ElementRareData::setBeforePseudoElement):
(WebCore::ElementRareData::setAfterPseudoElement):
Move detach logic to Element. ElementRareData should not implement semantics.
* dom/Node.cpp:
(WebCore::Node::pseudoAwarePreviousSibling):
(WebCore::Node::pseudoAwareNextSibling):
(WebCore::Node::pseudoAwareFirstChild):
(WebCore::Node::pseudoAwareLastChild):
* dom/NodeRenderingTraversal.cpp:
(WebCore::NodeRenderingTraversal::nextSiblingSlow):
(WebCore::NodeRenderingTraversal::previousSiblingSlow):
* rendering/RenderTreeAsText.cpp:
(WebCore::writeCounterValuesFromChildren):
(WebCore::counterValueForElement):
* style/StyleResolveTree.cpp:
(WebCore::Style::attachRenderTree):
(WebCore::Style::resolveTree):
* testing/Internals.cpp:
(WebCore::Internals::pauseAnimationAtTimeOnPseudoElement):
(WebCore::Internals::pauseTransitionAtTimeOnPseudoElement):
2013-08-23 Simon Fraser <simon.fraser@apple.com>
Improve scrolling behavior in iTunes
https://bugs.webkit.org/show_bug.cgi?id=120241
<rdar://problem/14825344>
Reviewed by Sam Weinig.
When vertically scrolling a page with horizontally scrollable overflow areas,
vertical scroll gestures would be interrupted when wheel events with non-zero
X deltas were intercepted by the overflow areas.
Fix by storing a small history of wheel events deltas and using
it to determine of the scroll gesture is primarily vertical or horizontal.
When this is detected, avoid dispatching scroll events on the on the
non-dominant axis.
Currently this behavior is conditionalized to only apply in iTunes.
* page/EventHandler.cpp:
(WebCore::EventHandler::EventHandler):
(WebCore::EventHandler::recordWheelEventDelta):
(WebCore::deltaIsPredominantlyVertical):
(WebCore::EventHandler::dominantScrollGestureDirection):
(WebCore::EventHandler::handleWheelEvent):
(WebCore::EventHandler::defaultWheelEventHandler):
* page/EventHandler.h:
* platform/RuntimeApplicationChecks.cpp:
(WebCore::applicationIsITunes):
* platform/RuntimeApplicationChecks.h:
2013-08-23 Pratik Solanki <psolanki@apple.com>
MediaQuery::expressions() should return a reference
<https://webkit.org/b/120215>
Reviewed by Anders Carlsson.
m_expressions is never NULL so we can just return a reference.
* css/MediaList.cpp:
(WebCore::reportMediaQueryWarningIfNeeded):
* css/MediaQuery.cpp:
(WebCore::MediaQuery::MediaQuery):
* css/MediaQuery.h:
(WebCore::MediaQuery::expressions):
* css/MediaQueryEvaluator.cpp:
(WebCore::MediaQueryEvaluator::eval):
2013-08-23 Ryosuke Niwa <rniwa@webkit.org>
Build fix after r154515.
* dom/ElementTraversal.h:
(WebCore::Traversal<ElementType>::firstChild):
(WebCore::Traversal<ElementType>::lastChild):
2013-08-23 Andreas Kling <akling@apple.com>
Simplify some Settings access where we have a Frame in reach.
<http://webkit.org/b/120239>
Reviewed by Anders Carlsson.
In three cases where we can grab at a Frame, we can reach all the way to some Settings
without having to use pointers.
* loader/FrameLoader.cpp:
(WebCore::FrameLoader::didBeginDocument):
* rendering/RenderLayerCompositor.cpp:
(WebCore::RenderLayerCompositor::addToOverlapMap):
(WebCore::RenderLayerCompositor::requiresCompositingForPosition):
2013-08-23 Jer Noble <jer.noble@apple.com>
REGRESSION (r150516): Media controls are messed up on right-to-left webpages
https://bugs.webkit.org/show_bug.cgi?id=120234
Reviewed by Dan Bernstein.
Test: media/video-rtl.html
Make the media control panel explicitly direction:ltr. The captions menu and captions
display are unaffected, so rtl content will continue to appear rtl there.
* css/mediaControls.css:
(audio::-webkit-media-controls-panel, video::-webkit-media-controls-panel):
2013-08-23 Beth Dakin <bdakin@apple.com>
REGRESSION (r132545): Some PDFs generated by WebKit are blank when viewed in
Adobe Reader
https://bugs.webkit.org/show_bug.cgi?id=120240
-and corresponding-
<rdar://problem/14634453>
Reviewed by Anders Carlsson.
This patch makes it so that we dont use the infinite rect for the PDF context,
and it adds WebCoreSystemInterface API to find out if the current content is the
PDF context.
* WebCore.exp.in:
* platform/graphics/cg/GraphicsContextCG.cpp:
(WebCore::GraphicsContext::clipOut):
* platform/mac/WebCoreSystemInterface.h:
* platform/mac/WebCoreSystemInterface.mm:
2013-08-23 Eric Carlson <eric.carlson@apple.com>
[Mac] some track language tags are not recognized
https://bugs.webkit.org/show_bug.cgi?id=119643
Reviewed by Jere Noble.
No new tests, existing tests updated.
* html/HTMLMediaElement.cpp:
(WebCore::HTMLMediaElement::HTMLMediaElement): Initialize m_captionDisplayMode from settings
if possible.
(WebCore::HTMLMediaElement::configureTextTrackGroup): Don't enable a default track when preferences
say captions should be disabled. Don't disable an already visible track if we don't find
a match unless preferences say captions should be disabled. m_forcedOrAutomaticSubtitleTrackLanguage ->
m_subtitleTrackLanguage.
(WebCore::HTMLMediaElement::mediaPlayerCharacteristicChanged): If the language of the primary
audio track changes, only kick off a text track recalc if caption preference are set to "automatic".
* html/HTMLMediaElement.h:
* platform/graphics/avfoundation/MediaPlayerPrivateAVFoundation.cpp:
(WebCore::MediaPlayerPrivateAVFoundation::MediaPlayerPrivateAVFoundation): Initialize m_characteristicsChanged
and m_delayCharacteristicsChangedNotification.
(WebCore::MediaPlayerPrivateAVFoundation::setHasVideo): Call characteristicsChanged.
(WebCore::MediaPlayerPrivateAVFoundation::setHasAudio): Ditto.
(WebCore::MediaPlayerPrivateAVFoundation::setHasClosedCaptions): Ditto.
(WebCore::MediaPlayerPrivateAVFoundation::characteristicsChanged): New, allows us to coalesce
calls to the media player when we know several characteristics may change.
(WebCore::MediaPlayerPrivateAVFoundation::setDelayCharacteristicsChangedNotification): Enable or
disable notification delay.
* platform/graphics/avfoundation/MediaPlayerPrivateAVFoundation.h:
* platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
(WebCore::MediaPlayerPrivateAVFoundationObjC::tracksChanged): Always call languageOfPrimaryAudioTrack(),
a track may have changed so we may have a new language.
(WebCore::MediaPlayerPrivateAVFoundationObjC::languageOfPrimaryAudioTrack): Call [AVAssetTrack languageCode]
if [AVAssetTrack extendedLanguageTag] returns NULL in case the media file has an old
QuickTime language code.
2013-08-23 Andreas Kling <akling@apple.com>
RenderView::compositor() should return a reference.
<https://webkit.org/b/120217>
Reviewed by Beth Dakin.
The RenderLayerCompositor is lazily constructed by compositor() and never returns null.
2013-08-23 Yoav Weiss <yoav@yoav.ws>
Fix srcset's image candidate algorithm when DPR exceeds all candidates
https://bugs.webkit.org/show_bug.cgi?id=120168
When the DPR exceeded the 'x' qualifier of all image candidates, none was chosen.
From the srcset spec: "If there are any entries in candidates that have an associated pixel density that is less than a
user-agent-defined value giving the nominal pixel density of the display, then remove them, unless that would remove all the
entries, in which case remove only the entries whose associated pixel density is less than the greatest such pixel density."
Fixed by returning the last one in the list of candidates sorted by their qualifier, in case none of them is equal or greater than
DPR.
Reviewed by Andreas Kling.
Test: fast/hidpi/image-srcset-fraction.html
* html/parser/HTMLParserIdioms.cpp:
(WebCore::bestFitSourceForImageAttributes):
2013-08-23 Chris Fleizach <cfleizach@apple.com>
<https://webkit.org/b/113895> Webkit exposes aria-expanded="undefined" as aria-expanded="false" (AXExpanded = NO)
Reviewed by Darin Adler.
Don't support the ARIA expanded attribute unless the value is one of the defined ARIA values (true/false).
Test: platform/mac/accessibility/aria-expanded-not-exposed-when-undefined.html
* accessibility/AccessibilityObject.cpp:
(WebCore::AccessibilityObject::supportsARIAExpanded):
2013-08-17 Darin Adler <darin@apple.com>
<https://webkit.org/b/119945> Some cleanup for PasteboardIOS
Reviewed by Andreas Kling.
* platform/ios/PasteboardIOS.mm:
(WebCore::Pasteboard::setFrame): Moved this function up near the
create functions and constructors.
(WebCore::documentFragmentWithRTF): Tweaked formatting.
(WebCore::Pasteboard::documentFragmentForPasteboardItemAtIndex):
Ditto.
(WebCore::utiTypeFromCocoaType): Changed to use early return and removed
an unneeded local variable.
(WebCore::cocoaTypeFromHTMLClipboardType): Renamed the quaint qType and
pbType local variables, and tweaked formatting.
(WebCore::Pasteboard::clear): Tweaked comment.
(WebCore::Pasteboard::readString): Tweaked formatting.
(WebCore::addHTMLClipboardTypesForCocoaType): Tweaked formatting.
(WebCore::Pasteboard::writeString): Streamlined logic and tweaked formatting
(WebCore::Pasteboard::types): Renamed pbType to just type.
2013-08-23 Bem Jones-Bey <bjonesbe@adobe.com>
Attempt to make it more clear what FloatIntervalSearchAdaptor::collectIfNeeded is doing
https://bugs.webkit.org/show_bug.cgi?id=119816
Reviewed by David Hyatt.
This is a port from Blink of
https://src.chromium.org/viewvc/blink?revision=155885&view=revision
Original Patch by Eric Seidel
Original comments:
"It seemed to me that template specifications would be clearer than an
if. They also allow for compile-time error checking were a 3rd type
of float to come into existance in CSS4. :p
For any unfamiliar with this method, this the object used for
performing a search on a RedBlackTree in WTF.
We create one of these adaptors, specifying that we want to search for
values in a specific (logical) Y interval, and this adaptor is called
back for any values in the RBTree cooresponding to that interval
range.
The job of this adaptor is to collect the various values we care
about, including the left or right-most offset of the floats in that
Y-range as well as what the last (document order) float seen in that
range.
It also collects the remaining available height for the block but I'm
less clear on how that parameter is used."
Note that in addition to the original change, I have made the
updateOffsetIfNeeded and rangesIntersect methods inline, as this was
shown to be a performance win in
https://src.chromium.org/viewvc/blink?revision=156064&view=revision
and it seemed a rather trivial change to be subject to a separate
patch when porting.
No new tests, no behavior change.
* rendering/RenderBlock.cpp:
(WebCore::::updateOffsetIfNeeded):
(WebCore::::collectIfNeeded):
* rendering/RenderBlock.h:
2013-08-23 David Kilzer <ddkilzer@apple.com>
WebCore fails to link due to changes in Objective-C++ ABI in trunk clang
<http://webkit.org/b/120183>
<rdar://problem/14764114>
Reviewed by Eric Carlson.
The trunk version of clang made an ABI change for Objective-C++
parameters that caused WebCore to fail to link. The short-term
fix is to change the parameter type from id<protocol> to just id
and add an ASSERT that the parameter still conforms to the
protocol.
* platform/DragData.h:
(DragDataRef): Change typedef from id<NSDragInfo> to id.
* platform/mac/DragDataMac.mm:
(WebCore::DragData::DragData): Add ASSERT that checks that the
DragDataRef object implements the NSDragInfo protocol.
2013-08-23 Andreas Kling <akling@apple.com>
RenderLayerCompositor::m_renderView should be a reference.
<https://webkit.org/b/120210>
Reviewed by Antti Koivisto.
The RenderLayerCompositor is always created by a RenderView passing itself to the constructor.
By making m_renderView a reference, we flush out some unnecessary null checks.
We also gain a pointer-free path to Settings through m_renderView.frameView().frame().settings()
so we don't have to make those blocks conditional anymore, reducing ambiguity.
* rendering/RenderLayerCompositor.cpp:
* rendering/RenderLayerCompositor.h:
* rendering/RenderView.cpp:
(WebCore::RenderView::compositor):
2013-08-23 Andreas Kling <akling@apple.com>
RenderView::frameView() should return a reference.
<https://webkit.org/b/120208>
Reviewed by Antti Koivisto.
A RenderView should always have a corresponding FrameView, so make frameView()
return a reference. Also remove a myriad of now-impossible null checks.
2013-08-23 Allan Sandfeld Jensen <allan.jensen@digia.com>
REGRESSION(r153939) Fix typo in Qt build-files
Reviewed by Antti Koivisto.
Fix simple typo in Target.pri introduced in r153939.
* Target.pri:
2013-08-23 Antti Koivisto <antti@apple.com>
<https://webkit.org/b/120166> Add Traversal<ElementType> template
Reviewed by Andreas Kling.
It is common to traverse through a subtree looking for elements of specific type and then casting to the type. This pattern can be generalized.
This patch adds a new Traversal<typename ElementType> template. It works like ElementTraversal except that the traversal is limited to the specified type.
The patch also uses the template in a bunch of applicable places.
* WebCore.exp.in:
* accessibility/AccessibilityRenderObject.cpp:
(WebCore::AccessibilityRenderObject::addImageMapChildren):
* dom/Document.cpp:
(WebCore::Document::removeTitle):
(WebCore::Document::updateBaseURL):
(WebCore::Document::processBaseElement):
* dom/Element.h:
* dom/ElementTraversal.h:
(WebCore::::firstChildTemplate):
(WebCore::::firstWithinTemplate):
(WebCore::::lastChildTemplate):
(WebCore::::lastWithinTemplate):
(WebCore::::nextTemplate):
(WebCore::::previousTemplate):
(WebCore::::nextSiblingTemplate):
(WebCore::::previousSiblingTemplate):
(WebCore::::nextSkippingChildrenTemplate):
(WebCore::::firstChild):
(WebCore::::lastChild):
(WebCore::::firstWithin):
(WebCore::::lastWithin):
(WebCore::::next):
(WebCore::::previous):
(WebCore::::nextSibling):
(WebCore::::previousSibling):
(WebCore::::nextSkippingChildren):
(WebCore::ElementTraversal::previousIncludingPseudo):
(WebCore::ElementTraversal::nextIncludingPseudo):
(WebCore::ElementTraversal::nextIncludingPseudoSkippingChildren):
(WebCore::ElementTraversal::pseudoAwarePreviousSibling):
* dom/Node.cpp:
(WebCore::Node::numberOfScopedHTMLStyleChildren):
* dom/NodeIterator.cpp:
(WebCore::NodeIterator::NodeIterator):
* dom/NodeIterator.h:
* dom/Traversal.cpp:
(WebCore::NodeIteratorBase::NodeIteratorBase):
(WebCore::NodeIteratorBase::acceptNode):
* dom/Traversal.h:
Renamed existing class called Traversal to less generic NodeIteratorBase.
* dom/TreeScope.cpp:
(WebCore::TreeScope::labelElementForId):
(WebCore::TreeScope::findAnchor):
* dom/TreeWalker.cpp:
(WebCore::TreeWalker::TreeWalker):
* dom/TreeWalker.h:
* editing/FrameSelection.cpp:
(WebCore::scanForForm):
* editing/markup.cpp:
(WebCore::createContextualFragment):
* html/HTMLAnchorElement.h:
(WebCore::isHTMLAnchorElement):
(WebCore::HTMLAnchorElement):
* html/HTMLAreaElement.h:
(WebCore::isHTMLAreaElement):
(WebCore::HTMLAreaElement):
* html/HTMLBaseElement.h:
(WebCore::isHTMLBaseElement):
(WebCore::HTMLBaseElement):
* html/HTMLElement.h:
(WebCore::HTMLElement):
* html/HTMLFieldSetElement.cpp:
(WebCore::HTMLFieldSetElement::invalidateDisabledStateUnder):
(WebCore::HTMLFieldSetElement::childrenChanged):
(WebCore::HTMLFieldSetElement::legend):
* html/HTMLFormControlElement.h:
(WebCore::toHTMLFormControlElement):
(WebCore::HTMLFormControlElement):
* html/HTMLLabelElement.cpp:
(WebCore::nodeAsSupportedLabelableElement):
(WebCore::HTMLLabelElement::control):
* html/HTMLLabelElement.h:
(WebCore::isHTMLLabelElement):
(WebCore::HTMLLabelElement):
* html/HTMLLegendElement.h:
(WebCore::isHTMLLegendElement):
(WebCore::HTMLLegendElement):
* html/HTMLMapElement.cpp:
(WebCore::HTMLMapElement::mapMouseEvent):
* html/HTMLMediaElement.cpp:
(WebCore::HTMLMediaElement::finishParsingChildren):
* html/HTMLStyleElement.h:
(WebCore::isHTMLStyleElement):
(WebCore::HTMLStyleElement):
* html/HTMLTitleElement.h:
(WebCore::HTMLTitleElement):
* html/HTMLTrackElement.h:
(WebCore::isHTMLTrackElement):
(WebCore::HTMLTrackElement):
* html/LabelableElement.h:
(WebCore::isLabelableElement):
(WebCore::LabelableElement):
* rendering/FilterEffectRenderer.cpp:
(WebCore::FilterEffectRenderer::buildReferenceFilter):
* svg/SVGElement.h:
(WebCore::SVGElement):
* svg/SVGForeignObjectElement.h:
(WebCore::isSVGForeignObjectElement):
(WebCore::SVGForeignObjectElement):
* svg/SVGSVGElement.cpp:
(WebCore::SVGSVGElement::collectIntersectionOrEnclosureList):
(WebCore::SVGSVGElement::getElementById):
* svg/SVGStyledElement.cpp:
(WebCore::SVGStyledElement::title):
* svg/SVGTitleElement.h:
(WebCore::SVGTitleElement):
* svg/animation/SMILTimeContainer.cpp:
(WebCore::SMILTimeContainer::updateDocumentOrderIndexes):
* svg/animation/SVGSMILElement.cpp:
(WebCore::SVGSMILElement::isSMILElement):
* svg/animation/SVGSMILElement.h:
(WebCore::SVGSMILElement):
* svg/graphics/SVGImage.cpp:
(WebCore::SVGImage::hasSingleSecurityOrigin):
2013-08-23 Arpita Bahuguna <a.bah@samsung.com>
<br> does not get deleted when inlined after some non-textual content.
https://bugs.webkit.org/show_bug.cgi?id=120006
Reviewed by Ryosuke Niwa.
deleteSelectionCommand does not handle the case when a <br> element is
inlined after some non-textual content (input controls, image etc.).
When doing a back-delete at the start of a line following such a <br>
the two contiguous lines should merge and the <br> should get deleted.
Currently, even though the <br> is deleted, another placeholder <br>
is incorrectly inserted at the same point, thus effectively there is no
change.
We are incorrectly computing the inline <br> to be at the start of an
empty line even though the line is not empty.
Test: editing/deleting/delete-inline-br.html
* editing/DeleteSelectionCommand.cpp:
(WebCore::DeleteSelectionCommand::handleSpecialCaseBRDelete):
Adding a check to verify that the inline <br> is not on an empty line
if the end node is not a <br> element itself and it's previous sibling
is the start <br> element.
Basically we check whether there is another node (end node) following
the <br>, that the node is not a <br> itself, and that the end node's
previous node is the start <br>.
2013-08-23 Renata Hodovan <reni@webkit.org>
Missing null-check in HTMLFormElement::rendererIsNeeded()
https://bugs.webkit.org/show_bug.cgi?id=120159
Reviewed by Ryosuke Niwa.
Null-check parentRenderer in HTMLFormElement::rendererIsNeeded()
and early return.
Test: fast/forms/missing-parentrenderer-crash.html
* html/HTMLFormElement.cpp:
(WebCore::HTMLFormElement::rendererIsNeeded):
2013-08-23 Zalan Bujtas <zalan@apple.com>
MathML: ASSERTION FAILED: !isPreferredLogicalHeightDirty() in RenderMathMLBlock::preferredLogicalHeight() const
https://bugs.webkit.org/show_bug.cgi?id=120157
Reviewed by Antti Koivisto.
RenderListMarker needs to be inserted to the render tree before
we start computing the preferred logical widths for the associated
RenderListItem.
Test: mathml/mn-as-list-item-assert.html
* rendering/RenderListItem.cpp:
(WebCore::RenderListItem::insertOrMoveMarkerRendererIfNeeded):
(WebCore::RenderListItem::layout):
(WebCore::RenderListItem::computePreferredLogicalWidths):
* rendering/RenderListItem.h:
2013-08-22 Gyuyoung Kim <gyuyoung.kim@samsung.com>
Introduce toSVGLinearGradientElement(), and use it
https://bugs.webkit.org/show_bug.cgi?id=120154
Reviewed by Andreas Kling.
As a step to clean-up static_cast<SVGXXX>, toSVGLinearGradientElement() is added to clean-up
static_cast<SVGLinearGradientElement*>.
* rendering/svg/RenderSVGResourceLinearGradient.cpp:
(WebCore::RenderSVGResourceLinearGradient::collectGradientAttributes):
* rendering/svg/SVGRenderTreeAsText.cpp:
(WebCore::writeSVGResourceContainer):
* svg/SVGLinearGradientElement.cpp:
(WebCore::SVGLinearGradientElement::collectGradientAttributes):
* svg/SVGLinearGradientElement.h:
(WebCore::toSVGLinearGradientElement):
2013-08-22 Simon Fraser <simon.fraser@apple.com>
compositing/geometry/bounds-ignores-hidden-dynamic.html has incorrect initial rendering
https://bugs.webkit.org/show_bug.cgi?id=119825
Reviewed by Tim Horton.
r137526 and some earlier commits attempted to avoid unconditionally
repainting layers when their size changes, because this was causing
TiledBacking layers to repaint when the document size changed.
However, the approach required that we have good information about
whether size changes require a repaint, which in some cases is hard
to determine, especially when RenderLayer changes affect our
decisions about which layers are composited.
Fix by pushing the decision about whether to repaint on size change
into GraphicsLayer. The default is to repaint on size change,
but GraphicsLayer provides a function that can be overridden to
modify this behavior; GraphicsLayerCA does so to avoid repaints
when layers with TiledBackings get resized.
Test: compositing/repaint/repaint-on-layer-grouping-change.html
* WebCore.exp.in: WebKit2 needs GraphicsLayer::setSize, which is no longer inline.
* platform/graphics/GraphicsLayer.cpp:
(WebCore::GraphicsLayer::setOffsetFromRenderer):
(WebCore::GraphicsLayer::setSize):
* platform/graphics/GraphicsLayer.h:
(WebCore::GraphicsLayer::shouldRepaintOnSizeChange):
* platform/graphics/ca/GraphicsLayerCA.cpp:
(WebCore::GraphicsLayerCA::shouldRepaintOnSizeChange):
* platform/graphics/ca/GraphicsLayerCA.h:
* rendering/RenderLayerBacking.h: No longer need m_boundsConstrainedByClipping
* rendering/RenderLayerBacking.cpp:
(WebCore::RenderLayerBacking::RenderLayerBacking):
(WebCore::RenderLayerBacking::updateCompositedBounds):
(WebCore::RenderLayerBacking::updateGraphicsLayerGeometry): setSize takes
care of repainting for us now, so we can remove all the conditional code.
2013-08-22 Simon Fraser <simon.fraser@apple.com>
Repaint counters are sometimes not in the corner of the compositing layer
https://bugs.webkit.org/show_bug.cgi?id=120176
Reviewed by Beth Dakin.
Sometimes the repaint counters are not in the corner of the compositing layer;
they are either inset, or partially or entirely outside the layer.
Fix by making sure that we restore the CGContext before drawing
the counter, since the WebCore code may have translated the CTM.
The counter-painting code saves and restores the context itself,
so this is safe.
* platform/graphics/mac/WebLayer.mm:
(drawLayerContents):
2013-08-22 Tim Horton <timothy_horton@apple.com>
Unavailable plug-in indicator text is one pixel too low
https://bugs.webkit.org/show_bug.cgi?id=120177
<rdar://problem/14811951>
Reviewed by Kevin Decker.
Move the unavailable plug-in indicator text up one pixel.
* rendering/RenderEmbeddedObject.cpp:
(WebCore::RenderEmbeddedObject::paintReplaced):
2013-08-22 Christophe Dumez <ch.dumez@sisa.samsung.com>
[SVG2] Merge SVGStyledElement and SVGElement
https://bugs.webkit.org/show_bug.cgi?id=107386
Reviewed by Andreas Kling.
Merge SVGStyledElement into SVGElement to simplify the SVG inheritance
model and match the SVG2 specification:
https://svgwg.org/svg2-draft/single-page.html#types-InterfaceSVGElement
Test: svg/dom/svg2-inheritance.html
* CMakeLists.txt:
* DerivedSources.cpp:
* DerivedSources.make:
* DerivedSources.pri:
* GNUmakefile.list.am:
* Target.pri:
* WebCore.order:
* WebCore.vcxproj/WebCore.vcxproj:
* WebCore.vcxproj/WebCore.vcxproj.filters:
* WebCore.xcodeproj/project.pbxproj:
* accessibility/AccessibilityNodeObject.cpp:
(WebCore::AccessibilityNodeObject::alternativeText):
(WebCore::AccessibilityNodeObject::accessibilityDescription):
* css/SVGCSSStyleSelector.cpp:
* rendering/style/SVGRenderStyle.cpp:
* rendering/svg/RenderSVGContainer.cpp:
(WebCore::RenderSVGContainer::RenderSVGContainer):
* rendering/svg/RenderSVGContainer.h:
* rendering/svg/RenderSVGHiddenContainer.cpp:
(WebCore::RenderSVGHiddenContainer::RenderSVGHiddenContainer):
* rendering/svg/RenderSVGHiddenContainer.h:
* rendering/svg/RenderSVGModelObject.cpp:
(WebCore::RenderSVGModelObject::RenderSVGModelObject):
(WebCore::getElementCTM):
* rendering/svg/RenderSVGModelObject.h:
* rendering/svg/RenderSVGResourceClipper.cpp:
(WebCore::RenderSVGResourceClipper::drawContentIntoMaskImage):
(WebCore::RenderSVGResourceClipper::calculateClipContentRepaintRect):
(WebCore::RenderSVGResourceClipper::hitTestClipContent):
* rendering/svg/RenderSVGResourceContainer.cpp:
(WebCore::RenderSVGResourceContainer::RenderSVGResourceContainer):
* rendering/svg/RenderSVGResourceContainer.h:
* rendering/svg/RenderSVGResourceFilter.cpp:
* rendering/svg/RenderSVGResourceFilterPrimitive.h:
* rendering/svg/RenderSVGResourceMarker.cpp:
* rendering/svg/RenderSVGResourceMarker.h:
* rendering/svg/RenderSVGResourceMasker.cpp:
(WebCore::RenderSVGResourceMasker::drawContentIntoMaskImage):
(WebCore::RenderSVGResourceMasker::calculateMaskContentRepaintRect):
* rendering/svg/RenderSVGResourcePattern.cpp:
(WebCore::RenderSVGResourcePattern::createTileImage):
* rendering/svg/RenderSVGRoot.cpp:
(WebCore::RenderSVGRoot::RenderSVGRoot):
* rendering/svg/RenderSVGRoot.h:
* rendering/svg/RenderSVGViewportContainer.cpp:
(WebCore::RenderSVGViewportContainer::RenderSVGViewportContainer):
* rendering/svg/RenderSVGViewportContainer.h:
* rendering/svg/SVGRenderSupport.cpp:
(WebCore::SVGRenderSupport::layoutChildren):
* rendering/svg/SVGRenderTreeAsText.cpp:
* rendering/svg/SVGResources.cpp:
(WebCore::registerPendingResource):
* rendering/svg/SVGResourcesCache.cpp:
* svg/SVGAElement.cpp:
(WebCore::SVGAElement::title):
* svg/SVGAllInOne.cpp:
* svg/SVGAltGlyphDefElement.h:
* svg/SVGAltGlyphItemElement.h:
* svg/SVGAnimateElement.cpp:
* svg/SVGAnimatedType.cpp:
(WebCore::SVGAnimatedType::valueAsString):
(WebCore::SVGAnimatedType::setValueAsString):
* svg/SVGAnimationElement.cpp:
(WebCore::SVGAnimationElement::isTargetAttributeCSSProperty):
(WebCore::SVGAnimationElement::computeCSSPropertyValue):
(WebCore::SVGAnimationElement::adjustForInheritance):
(WebCore::inheritsFromProperty):
* svg/SVGComponentTransferFunctionElement.h:
* svg/SVGCursorElement.h:
* svg/SVGDescElement.cpp:
(WebCore::SVGDescElement::SVGDescElement):
* svg/SVGDescElement.h:
* svg/SVGDescElement.idl:
* svg/SVGElement.cpp:
(WebCore::mapAttributeToCSSProperty):
(WebCore::cssPropertyToTypeMap):
(WebCore::SVGElement::SVGElement):
(WebCore::SVGElement::~SVGElement):
(WebCore::SVGElement::removedFrom):
(WebCore::SVGElement::parseAttribute):
(WebCore::SVGElement::animatedPropertyTypeForAttribute):
(WebCore::collectInstancesForSVGElement):
(WebCore::SVGElement::isAnimatableAttribute):
(WebCore::SVGElement::title):
(WebCore::SVGElement::rendererIsNeeded):
(WebCore::SVGElement::cssPropertyIdForSVGAttributeName):
(WebCore::SVGElement::isAnimatableCSSProperty):
(WebCore::SVGElement::isPresentationAttribute):
(WebCore::SVGElement::collectStyleForPresentationAttribute):
(WebCore::SVGElement::isKnownAttribute):
(WebCore::SVGElement::svgAttributeChanged):
(WebCore::SVGElement::insertedInto):
(WebCore::SVGElement::buildPendingResourcesIfNeeded):
(WebCore::SVGElement::childrenChanged):
(WebCore::SVGElement::getPresentationAttribute):
(WebCore::SVGElement::instanceUpdatesBlocked):
(WebCore::SVGElement::setInstanceUpdatesBlocked):
(WebCore::SVGElement::localCoordinateSpaceTransform):
(WebCore::SVGElement::updateRelativeLengthsInformation):
(WebCore::SVGElement::isMouseFocusable):
(WebCore::SVGElement::isKeyboardFocusable):
* svg/SVGElement.h:
(WebCore::SVGElement::supportsMarkers):
(WebCore::SVGElement::hasRelativeLengths):
(WebCore::SVGElement::needsPendingResourceHandling):
(WebCore::SVGElement::selfHasRelativeLengths):
(WebCore::SVGElement::updateRelativeLengthsInformation):
* svg/SVGElement.idl:
* svg/SVGElementInstance.cpp:
(WebCore::SVGElementInstance::invalidateAllInstancesOfElement):
(WebCore::SVGElementInstance::InstanceUpdateBlocker::InstanceUpdateBlocker):
* svg/SVGElementInstance.h:
* svg/SVGFEBlendElement.idl:
* svg/SVGFEColorMatrixElement.idl:
* svg/SVGFEComponentTransferElement.idl:
* svg/SVGFECompositeElement.idl:
* svg/SVGFEConvolveMatrixElement.idl:
* svg/SVGFEDiffuseLightingElement.idl:
* svg/SVGFEDisplacementMapElement.idl:
* svg/SVGFEDropShadowElement.idl:
* svg/SVGFEFloodElement.idl:
* svg/SVGFEGaussianBlurElement.idl:
* svg/SVGFEImageElement.idl:
* svg/SVGFELightElement.h:
* svg/SVGFEMergeElement.idl:
* svg/SVGFEMergeNodeElement.h:
* svg/SVGFEMorphologyElement.idl:
* svg/SVGFEOffsetElement.idl:
* svg/SVGFESpecularLightingElement.idl:
* svg/SVGFETileElement.idl:
* svg/SVGFETurbulenceElement.idl:
* svg/SVGFilterElement.cpp:
(WebCore::SVGFilterElement::SVGFilterElement):
(WebCore::SVGFilterElement::parseAttribute):
(WebCore::SVGFilterElement::svgAttributeChanged):
(WebCore::SVGFilterElement::childrenChanged):
* svg/SVGFilterElement.h:
* svg/SVGFilterElement.idl:
* svg/SVGFilterPrimitiveStandardAttributes.cpp:
(WebCore::SVGFilterPrimitiveStandardAttributes::SVGFilterPrimitiveStandardAttributes):
(WebCore::SVGFilterPrimitiveStandardAttributes::parseAttribute):
(WebCore::SVGFilterPrimitiveStandardAttributes::svgAttributeChanged):
(WebCore::SVGFilterPrimitiveStandardAttributes::childrenChanged):
(WebCore::SVGFilterPrimitiveStandardAttributes::rendererIsNeeded):
* svg/SVGFilterPrimitiveStandardAttributes.h:
* svg/SVGFontElement.cpp:
(WebCore::SVGFontElement::SVGFontElement):
* svg/SVGFontElement.h:
* svg/SVGFontFaceElement.cpp:
* svg/SVGFontFaceElement.h:
* svg/SVGFontFaceFormatElement.h:
* svg/SVGFontFaceNameElement.h:
* svg/SVGFontFaceSrcElement.h:
* svg/SVGFontFaceUriElement.h:
* svg/SVGGElement.cpp:
(WebCore::SVGGElement::rendererIsNeeded):
* svg/SVGGlyphElement.cpp:
(WebCore::SVGGlyphElement::SVGGlyphElement):
(WebCore::SVGGlyphElement::parseAttribute):
(WebCore::SVGGlyphElement::insertedInto):
(WebCore::SVGGlyphElement::removedFrom):
* svg/SVGGlyphElement.h:
* svg/SVGGlyphRefElement.cpp:
(WebCore::SVGGlyphRefElement::SVGGlyphRefElement):
(WebCore::SVGGlyphRefElement::parseAttribute):
* svg/SVGGlyphRefElement.h:
* svg/SVGGlyphRefElement.idl:
* svg/SVGGradientElement.cpp:
(WebCore::SVGGradientElement::SVGGradientElement):
(WebCore::SVGGradientElement::parseAttribute):
(WebCore::SVGGradientElement::svgAttributeChanged):
(WebCore::SVGGradientElement::childrenChanged):
* svg/SVGGradientElement.h:
* svg/SVGGradientElement.idl:
* svg/SVGGraphicsElement.cpp:
(WebCore::SVGGraphicsElement::SVGGraphicsElement):
(WebCore::SVGGraphicsElement::parseAttribute):
(WebCore::SVGGraphicsElement::svgAttributeChanged):
* svg/SVGGraphicsElement.h:
* svg/SVGGraphicsElement.idl:
* svg/SVGLocatable.cpp:
(WebCore::SVGLocatable::computeCTM):
* svg/SVGMPathElement.h:
* svg/SVGMarkerElement.cpp:
(WebCore::SVGMarkerElement::SVGMarkerElement):
(WebCore::SVGMarkerElement::parseAttribute):
(WebCore::SVGMarkerElement::svgAttributeChanged):
(WebCore::SVGMarkerElement::childrenChanged):
* svg/SVGMarkerElement.h:
* svg/SVGMarkerElement.idl:
* svg/SVGMaskElement.cpp:
(WebCore::SVGMaskElement::SVGMaskElement):
(WebCore::SVGMaskElement::parseAttribute):
(WebCore::SVGMaskElement::svgAttributeChanged):
(WebCore::SVGMaskElement::childrenChanged):
* svg/SVGMaskElement.h:
* svg/SVGMaskElement.idl:
* svg/SVGMetadataElement.h:
* svg/SVGMissingGlyphElement.cpp:
(WebCore::SVGMissingGlyphElement::SVGMissingGlyphElement):
* svg/SVGMissingGlyphElement.h:
* svg/SVGMissingGlyphElement.idl:
* svg/SVGPatternElement.cpp:
(WebCore::SVGPatternElement::SVGPatternElement):
(WebCore::SVGPatternElement::parseAttribute):
(WebCore::SVGPatternElement::svgAttributeChanged):
(WebCore::SVGPatternElement::childrenChanged):
* svg/SVGPatternElement.h:
* svg/SVGPatternElement.idl:
* svg/SVGScriptElement.h:
* svg/SVGStopElement.cpp:
(WebCore::SVGStopElement::SVGStopElement):
(WebCore::SVGStopElement::parseAttribute):
(WebCore::SVGStopElement::svgAttributeChanged):
* svg/SVGStopElement.h:
* svg/SVGStopElement.idl:
* svg/SVGStyleElement.h:
* svg/SVGStyledElement.cpp: Removed.
* svg/SVGStyledElement.h: Removed.
* svg/SVGStyledElement.idl: Removed.
* svg/SVGSymbolElement.cpp:
(WebCore::SVGSymbolElement::SVGSymbolElement):
(WebCore::SVGSymbolElement::parseAttribute):
(WebCore::SVGSymbolElement::svgAttributeChanged):
* svg/SVGSymbolElement.h:
* svg/SVGSymbolElement.idl:
* svg/SVGTRefElement.cpp:
(WebCore::SVGTRefElement::insertedInto):
(WebCore::SVGTRefElement::removedFrom):
* svg/SVGTitleElement.cpp:
(WebCore::SVGTitleElement::SVGTitleElement):
(WebCore::SVGTitleElement::insertedInto):
* svg/SVGTitleElement.h:
* svg/SVGTitleElement.idl:
* svg/SVGTransformable.cpp:
* svg/SVGUseElement.cpp:
(WebCore::SVGUseElement::selfHasRelativeLengths):
* svg/SVGViewElement.cpp:
(WebCore::SVGViewElement::SVGViewElement):
(WebCore::SVGViewElement::parseAttribute):
* svg/SVGViewElement.h:
* svg/animation/SVGSMILElement.h:
* svg/graphics/filters/SVGFEImage.cpp:
(WebCore::FEImage::platformApplySoftware):
2013-08-22 Andreas Kling <akling@apple.com>
FrameLoader::history() should return a reference.
<https://webkit.org/b/120163>
Reviewed by Anders Carlsson.
Rehued by Anders Carlsson.
FrameLoader::m_history is never null, so make history() return a reference.
Also made HistoryController::m_frame a reference, since HistoryController's
lifetime is tied to FrameLoader, which is tied to the Frame.
2013-08-21 Simon Fraser <simon.fraser@apple.com>
Reloading this video test shows garbage briefly
https://bugs.webkit.org/show_bug.cgi?id=119377
Reviewed by Anders Carlson.
RenderVideo should not claim that it's foreground is opaque
unless it has a video frame to display.
* rendering/RenderVideo.cpp:
(WebCore::RenderVideo::foregroundIsKnownToBeOpaqueInRect):
2013-08-22 Andreas Kling <akling@apple.com>
Remove accidental cruft from r154449.
* rendering/RenderWidget.cpp:
(WebCore::RenderWidget::destroy):
2013-08-22 Andreas Kling <akling@apple.com>
FrameLoader: frame() and client() should return references.
<https://webkit.org/b/120158>
Reviewed by Anders Carlsson.
These two are never null so change them to return references.
2013-08-22 Andrei Bucur <abucur@adobe.com>
RenderNamedFlowThread should not create NodeRenderingContext objects
https://bugs.webkit.org/show_bug.cgi?id=119923
Reviewed by Antti Koivisto.
Port of https://chromium.googlesource.com/chromium/blink/+/949d7d7e7b8685454742a55cf0ca912bb9a7b177.
Original patch by Elliott Sprehn.
RenderNamedFlowThread should not create NodeRenderingContext objects
RenderNamedFlowThread is using NodeRenderingContext to get the original
parent renderer, but should just be using NodeRenderingTraversal::parent
instead (which is what NodeRenderingContext does internally anyway).
Tests: No change in functionality. No new tests.
* rendering/RenderNamedFlowThread.cpp:
(WebCore::RenderNamedFlowThread::isChildAllowed):
2013-08-22 Christophe Dumez <ch.dumez@sisa.samsung.com>
Introduce a SVGUnknownElement class for unknown SVG elements
https://bugs.webkit.org/show_bug.cgi?id=120155
Reviewed by Andreas Kling.
Introduce a SVGUnknownElement class and have it override rendererIsNeeded() to return false.
We now use SVGUnknownElement type (instead of SVGElement) for unknown SVG elements:
- Unknown Elements in SVG namespace
- Registered custom tag elements in SVG namespace:
http://www.w3.org/TR/2013/WD-custom-elements-20130514/#registering-custom-elements
As a consequence, SVGElement::rendererIsNeeded() is not longer required to return false and
it will be able to behave as SVGStyledElement::rendererIsNeeded() once we merge
SVGStyledElement into SVGElement.
This is a pre-requirement to merging SVGStyledElement into SVGElement.
No new tests, no behavior change.
* GNUmakefile.list.am:
* Target.pri:
* WebCore.vcxproj/WebCore.vcxproj:
* WebCore.vcxproj/WebCore.vcxproj.filters:
* dom/CustomElementConstructor.cpp:
(WebCore::CustomElementConstructor::createElementInternal):
* dom/make_names.pl:
(defaultParametersHash):
(printJSElementIncludes):
(printWrapperFunctions):
(printWrapperFactoryCppFile):
* svg/SVGElement.cpp:
* svg/SVGElement.h:
* svg/SVGUnknownElement.h: Added.
(WebCore::SVGUnknownElement::create):
(WebCore::SVGUnknownElement::SVGUnknownElement):
* svg/svgtags.in:
2013-08-22 Rob Buis <rwlbuis@webkit.org>
REGRESSION: Assertion failure !collection->hasExactlyOneItem() in WebCore::namedItemGetter
https://bugs.webkit.org/show_bug.cgi?id=118056
Reviewed by Ryosuke Niwa.
The assert is hit in Debug mode because the DocumentOrderedMap in HTMLDocument::m_windowNamedItem
includes matched SVG elements, but the WindowNameCollection used to collect the elements does not.
This means the HTMLCollection stripped of SVG elements could end up hitting the empty or single item
assertion, which the testcase verifies.
To fix this change WindowNameCollection to include both SVG and HTML elements so it matches DocumentOrderedMap.
Tests: svg/custom/document-all-includes-svg.html
svg/custom/window-named-item-lookup.html
* html/HTMLCollection.cpp:
(WebCore::isMatchingElement):
(WebCore::HTMLCollection::updateNameCache):
2013-08-22 Gyuyoung Kim <gyuyoung.kim@samsung.com>
Introduce toSVGRadialGradientElement(), and use it
https://bugs.webkit.org/show_bug.cgi?id=120153
Reviewed by Andreas Kling.
As a step to clean-up static_cast<SVGXXX>, toSVGRadialGradientElement() is added to clean-up
static_cast<SVGRadialGradientElement*>.
* rendering/svg/RenderSVGResourceRadialGradient.cpp:
(WebCore::RenderSVGResourceRadialGradient::collectGradientAttributes):
* rendering/svg/SVGRenderTreeAsText.cpp:
(WebCore::writeSVGResourceContainer):
* svg/SVGRadialGradientElement.cpp:
(WebCore::SVGRadialGradientElement::collectGradientAttributes):
* svg/SVGRadialGradientElement.h:
(WebCore::toSVGRadialGradientElement):
2013-08-22 Renata Hodovan <reni@webkit.org>
ASSERTION FAILED: extractedStyle in WebCore::ApplyStyleCommand::removeInlineStyleFromElement
https://bugs.webkit.org/show_bug.cgi?id=119672
Reviewed by Darin Adler.
The last extractedStyle parameter of removeInlineStyleFromElement() is not mandatory and it's set
to default 0. This way we have to check its existence before the usage.
Test: editing/execCommand/extracted_style_assert.html
* editing/ApplyStyleCommand.cpp:
(WebCore::ApplyStyleCommand::removeInlineStyleFromElement):
2013-08-21 Commit Queue <commit-queue@webkit.org>
Unreviewed, rolling out r154416.
http://trac.webkit.org/changeset/154416
https://bugs.webkit.org/show_bug.cgi?id=120147
Broke Windows builds (Requested by rniwa on #webkit).
* WebCore.vcxproj/WebCoreGenerated.make:
* WebCore.vcxproj/WebCoreGeneratedWinCairo.make:
* WebCore.vcxproj/WebCoreGeneratedWinCairoCommon.props:
* WebCore.vcxproj/build-generated-files.sh:
* WebCore.vcxproj/copyForwardingHeaders.cmd:
* WebCore.vcxproj/copyWebCoreResourceFiles.cmd:
2013-08-21 Ryuan Choi <ryuan.choi@samsung.com>
[EFL] Unreviewed build fix after r154430.
* rendering/style/StyleRareNonInheritedData.cpp:
(WebCore::StyleRareNonInheritedData::hasFilters): Added CSS_FILTERS guard.
2013-08-21 Simon Fraser <simon.fraser@apple.com>
Setting -webkit-filter: in :active selector causes failure to redraw
https://bugs.webkit.org/show_bug.cgi?id=120135
Reviewed by Jer Noble.
When removing a filter on an inline child of a compositing layer,
the inline loses its RenderLayer and compositing layer, but we fail to
repaint the compositing layer that the inline is now painting into.
This worked correctly for opacity, because opacity toggles cause
layouts (which then paint the correct layer), so do the same for filters.
Test: css3/filters/remove-filter-repaint.html
* rendering/style/RenderStyle.cpp:
(WebCore::RenderStyle::changeRequiresLayout): Return true if we toggled
between having filters and not. Drive-by cleanup, making use of new convenience
function for hasOpacity().
* rendering/style/StyleRareNonInheritedData.cpp:
(WebCore::StyleRareNonInheritedData::hasFilters): Returns true if we have any
filters.
* rendering/style/StyleRareNonInheritedData.h:
(WebCore::StyleRareNonInheritedData::hasOpacity): Convenience function that
returns true if opacity is < 1.
2013-08-21 Gavin Barraclough <barraclough@apple.com>
https://bugs.webkit.org/show_bug.cgi?id=120139
PropertyDescriptor argument to define methods should be const
Rubber stamped by Sam Weinig.
This should never be modified, and this way we can use rvalues.
* bindings/js/JSDOMWindowCustom.cpp:
(WebCore::JSDOMWindow::defineOwnProperty):
* bindings/js/JSLocationCustom.cpp:
(WebCore::JSLocation::defineOwnProperty):
(WebCore::JSLocationPrototype::defineOwnProperty):
* bindings/scripts/CodeGeneratorJS.pm:
(GenerateHeader):
- make PropertyDescriptor const
2013-08-21 Jacky Jiang <zhajiang@blackberry.com>
<https://webkit.org/b/120123> [BlackBerry] Incorrect origin of indexOfTile in LayerTiler can cause unnecessary texture jobs and waste memory
Reviewed by Yong Li.
Internally reviewed by Arvid Nilsson.
JIRA 481356
The origin of indexOfTile(origin) is incorrect in these two places. For
example, if the maxXMaxYCorner of the rect is (768, 768), there can be
three other redundant indexOfTile (0, 1), (1, 0), (1, 1) which can cause
unnecessary texture jobs and waste memory.
The origin should be the top left of the bottom right pixel of a rect.
* platform/graphics/blackberry/LayerTiler.cpp:
(WebCore::LayerTiler::updateTextureContentsIfNeeded):
(WebCore::LayerTiler::processTextureJob):
2013-08-21 Simon Fraser <simon.fraser@apple.com>
<https://webkit.org/b/116901> ASSERTION FAILED: !m_visibleDescendantStatusDirty on twitter
Reviewed by Beth Dakin.
In order to make decisions about compositing, the m_hasVisibleDescendant bit on RenderLayers
needs to be up-to-date when RenderLayerCompositor::computeCompositingRequirements is recursing
over the RenderLayer tree.
However, was possible for computeCompositingRequirements() to hit a layer whose m_visibleDescendantStatusDirty
bit was set; we only clear this bit from collectLayers() (when updating z-order lists), and from styleChanged()
which requires that style changed on the layer itself.
Fix by always calling updateDescendantDependentFlags() from computeCompositingRequirements().
Wasn't able to easily get a reduced testcase.
* rendering/RenderLayerCompositor.cpp:
(WebCore::RenderLayerCompositor::computeCompositingRequirements):
2013-08-21 Alex Christensen <achristensen@apple.com>
<https://webkit.org/b/120137> Separating Win32 and Win64 builds.
Reviewed by Brent Fulgham.
* WebCore.vcxproj/WebCoreGenerated.make:
* WebCore.vcxproj/WebCoreGeneratedWinCairo.make:
Pass PlatformArchitecture as a command line parameter to bash scripts
and use PlatformArchitecture to determine which directory to delete
while cleaning (obj32 or obj64).
* WebCore.vcxproj/WebCoreGeneratedWinCairoCommon.props:
Export PlatformArchitecture to be used by make and cmd scripts.
* WebCore.vcxproj/build-generated-files.sh:
Use PlatformArchitecture from command line to determine which object directory to use (obj32 or obj64).
* WebCore.vcxproj/copyForwardingHeaders.cmd:
* WebCore.vcxproj/copyWebCoreResourceFiles.cmd:
Use PlatformArchitecture to determine which directory to copy to (obj32 or obj64).
2013-08-21 Tim Horton <timothy_horton@apple.com>
revalidateTiles and ensureTilesForRect can share a lot of code
https://bugs.webkit.org/show_bug.cgi?id=119282
Missed the review comments, whoops.
* platform/graphics/ca/mac/TileController.h:
* platform/graphics/ca/mac/TileController.mm:
(WebCore::TileController::prepopulateRect):
(WebCore::TileController::revalidateTiles):
(WebCore::TileController::ensureTilesForRect):
2013-08-21 Andreas Kling <akling@apple.com>
<https://webkit.org/b/120115> SVG elements always have custom style resolve callbacks.
Reviewed by Antti Koivisto.
Simplify SVGElement construction by making them opt in to custom style resolve callbacks
by default, and removing the ability to pass a custom ConstructionType to some subclass
constructors.
* dom/Node.h:
Add HasCustomStyleResolveCallbacksFlag to the CreateSVGElement mask.
* svg/SVGElement.cpp:
(WebCore::SVGElement::SVGElement):
* svg/SVGElement.h:
* svg/SVGGElement.cpp:
(WebCore::SVGGElement::SVGGElement):
* svg/SVGGElement.h:
* svg/SVGGraphicsElement.cpp:
(WebCore::SVGGraphicsElement::SVGGraphicsElement):
* svg/SVGGraphicsElement.h:
* svg/SVGImageElement.cpp:
(WebCore::SVGImageElement::SVGImageElement):
* svg/SVGStyledElement.cpp:
(WebCore::SVGStyledElement::SVGStyledElement):
* svg/SVGStyledElement.h:
Remove calls to setHasCustomStyleResolveCallbacks() in SVGElement and subclasses.
Also remove unnecessary ConstructionType argument from subclasses since nobody
overrides it and everyone just uses CreateSVGElement.
2013-08-21 Tim Horton <timothy_horton@apple.com>
revalidateTiles and ensureTilesForRect can share a lot of code
https://bugs.webkit.org/show_bug.cgi?id=119282
Reviewed by Simon Fraser.
No new tests, just a refactoring.
The bodies of ensureTilesForRect and revalidateTiles are nearly equivalent.
* platform/graphics/ca/mac/TileController.h:
Add an enum, NewTileType, to note whether the tiles created by ensureTilesForRect will
be primary coverage tiles or secondary out-of-view tiles.
* platform/graphics/ca/mac/TileController.mm:
(WebCore::TileController::prepopulateRect):
Move the code to see if we already have the requisite tiles in the
primary coverage rect, as well as our call to updateTileCoverageMap,
out into prepopulateRect, to generalize ensureTilesForRect.
(WebCore::TileController::revalidateTiles):
Make use of ensureTilesForRect. The platformCALayerDidCreateTiles call will happen there, now.
(WebCore::TileController::ensureTilesForRect):
Make ensureTilesForRect return the rect that it created tiles for, and only put
tiles in a cohort if we're creating secondary tiles.
2013-08-21 Tim Horton <timothy_horton@apple.com>
isReplacementObscured is wrong when the indicator is clipped by an iframe
https://bugs.webkit.org/show_bug.cgi?id=120031
<rdar://problem/14606819>
Reviewed by Simon Fraser.
Hit-test for plugin obscurity in the root document. To do this, we also need
to convert the indicator rectangle into root view coordinates before
hit testing its edges.
This resolves the case where an iframe which clips its content was reporting
the indicator as not obscured, despite the fact that it was obscured from the
point of view of the user.
Updated test plugins/unavailable-plugin-indicator-obscurity.html
* rendering/RenderEmbeddedObject.cpp:
(WebCore::RenderEmbeddedObject::isReplacementObscured):
2013-08-21 Andreas Kling <akling@apple.com>
<https://webkit.org/b/120132> Frame::navigationScheduler() should return a reference.
Reviewed by Anders Carlzon.
Frame::m_navigationScheduler is an inline member, not a pointer.
2013-08-21 Tim Horton <timothy_horton@apple.com>
REGRESSION(r154399): broke Mac ML debug WK1 tests > 50 crashes (Requested by thorton on #webkit).
https://bugs.webkit.org/show_bug.cgi?id=120129
Rolling out http://trac.webkit.org/changeset/154399.
* rendering/RenderBlock.cpp:
* rendering/RenderBlock.h:
* rendering/RenderBlockLineLayout.cpp:
(WebCore::RenderBlock::LineBreaker::skipLeadingWhitespace):
* rendering/RenderBox.h:
2013-08-21 Andreas Kling <akling@apple.com>
<https://webkit.org/b/120118> Frame::animation() should return a reference.
Reviewed by Anders Carlsson.
Frame::m_animationController is never null.
Also changed RenderObject::animation() to return a reference since it's just a wrapper
around RenderObject::frame()->animation() with no null checking of frame().
2013-08-21 Simon Fraser <simon.fraser@apple.com>
Allow opacity to apply to custom scrollbars
https://bugs.webkit.org/show_bug.cgi?id=120104
Reviewed by David Hyatt.
Opacity was ignored custom scrollbar pseudoelements because custom scrollbar
renderers never create layers, and opacity is normally handled by the RenderLayer code.
Fix by having RenderScrollbarTheme and RenderScrollbarPart do the transparency
layers necessary for opacity. RenderScrollbarPart handles opacity for individual
parts.
Because ScrollbarThemeComposite::paint() renders the parts on after another (with
no nesting), opacity handling for the entire scrollbar needs special-casing.
This is done by willPaintScrollbar()/didPaintScrollbar() on the theme.
RenderScrollbarTheme consults the opacity the scrollbar (which we get from
the ScrollbarBGPart renderer) to decide whether to set up a transparency layer.
Test: scrollbars/scrollbar-parts-opacity.html
* platform/ScrollbarThemeComposite.cpp:
(WebCore::ScrollbarThemeComposite::paint):
* platform/ScrollbarThemeComposite.h:
(WebCore::ScrollbarThemeComposite::willPaintScrollbar):
(WebCore::ScrollbarThemeComposite::didPaintScrollbar):
* rendering/RenderScrollbar.cpp:
(WebCore::RenderScrollbar::opacity):
* rendering/RenderScrollbar.h:
* rendering/RenderScrollbarPart.cpp:
(WebCore::RenderScrollbarPart::paintIntoRect):
* rendering/RenderScrollbarTheme.cpp:
(WebCore::RenderScrollbarTheme::willPaintScrollbar):
(WebCore::RenderScrollbarTheme::didPaintScrollbar):
* rendering/RenderScrollbarTheme.h:
2013-08-21 Robert Hogan <robert@webkit.org>
REGRESSION(r127163): Respect clearance set on ancestors when placing floats
https://bugs.webkit.org/show_bug.cgi?id=119979
Reviewed by David Hyatt.
If a float has a self-collapsing ancestor with clearance then it needs to respect
that clearance when placing itself on the line.
Test: fast/block/margin-collapse/self-collapsing-block-with-float-descendant.html
* rendering/RenderBlock.cpp:
(WebCore::RenderBlock::marginOffsetForSelfCollapsingBlock):
* rendering/RenderBlock.h:
* rendering/RenderBlockLineLayout.cpp:
(WebCore::RenderBlock::LineBreaker::skipLeadingWhitespace):
* rendering/RenderBox.h:
(WebCore::RenderBox::previousInFlowSiblingBox):
2013-08-21 Brent Fulgham <bfulgham@apple.com>
<https://webkit.org/b/120113> [Windows] Enable CSS_IMAGE_SET
Reviewed by Anders Carlsson.
We can now activate:
fast/css/image-set-parsing.html
fast/css/image-set-parsing-invalid.html
* WebCore.vcxproj/WebCore.vcxproj: Add missing image set implementation files.
* WebCore.vcxproj/WebCore.vcxproj.filters: Ditto.
* css/CSSAllInOne.cpp: Add missing CSSImageSetValue.cpp
* rendering/style/StyleAllInOne.cpp: Add missing StyeCachedImageSet.cpp
2013-08-21 Robert Hogan <robert@webkit.org>
In RenderTableCell::paintCollapsedBorders() check surrounding cells using physical rather than logical direction
https://bugs.webkit.org/show_bug.cgi?id=120074
Reviewed by David Hyatt.
No new tests, covered by existing tests.
The functions cellAbove(), cellBelow() etc. check the logical rather than the physical direction but they're being
used to decide the painting of the physical borders of the cell. As we paint all four sides of every cell, and
the borders of adjoining cells twice over, this has no impact on painting currently but making the check consistent
in its treatment of physical and logical direction will help with webkit.org/b/119759 and make the code less confusing
to the next guy.
* rendering/RenderTableCell.cpp:
(WebCore::RenderTableCell::cellAtLeft):
(WebCore::RenderTableCell::cellAtRight):
(WebCore::RenderTableCell::cellAtTop):
(WebCore::RenderTableCell::cellAtBottom):
(WebCore::RenderTableCell::paintCollapsedBorders):
* rendering/RenderTableCell.h:
2013-08-21 Róbert Sipka <sipka@inf.u-szeged.hu>
<https://webkit.org/b/120109> [curl] only include WebCoreBundleWin on Windows
Reviewed by Brent Fulgham.
The WebCoreBundleWin is a windows specific file, it is only needed on Windows.
* platform/network/curl/ResourceHandleManager.cpp:
2013-08-21 Jae Hyun Park <jae.park@company100.net>
[Qt] Remove unused code path in PluginView
https://bugs.webkit.org/show_bug.cgi?id=113173
Reviewed by Anders Carlsson.
m_platformLayer in PluginView has been removed in r121710, but there are
still some leftover code path related to m_platformLayer. This patch
removes unused code path.
No new tests, removing unused code paths.
* plugins/PluginView.h:
(PluginView):
* plugins/qt/PluginViewQt.cpp:
(WebCore::PluginView::updatePluginWidget):
(WebCore::PluginView::paint):
2013-08-21 Allan Sandfeld Jensen <allan.jensen@digia.com>
Fonts fast code path doesnt handle partial runs correctly when kerning or ligatures are enabled
https://bugs.webkit.org/show_bug.cgi?id=100050
Reviewed by Antti Koivisto.
Always let WidthIterator iterate over an entire TextRun to avoid problems
with pixel rounding or shaping on partial runs.
This fix is necessary for Qt because the complex font-path can not disable
shaping, leading to the complex path painting slighly different from the
fast path, which messes up selection painting.
No change in functionality, no new tests.
* platform/graphics/Font.cpp:
(WebCore::Font::drawText):
(WebCore::Font::drawEmphasisMarks):
(WebCore::Font::selectionRectForText):
(WebCore::Font::offsetForPosition):
* platform/graphics/FontFastPath.cpp:
(WebCore::Font::getGlyphsAndAdvancesForSimpleText):
(WebCore::Font::selectionRectForSimpleText):
(WebCore::Font::offsetForPositionForSimpleText):
* platform/graphics/GlyphBuffer.h:
(WebCore::GlyphBuffer::add):
(GlyphBuffer):
* platform/graphics/WidthIterator.cpp:
(WebCore::WidthIterator::advanceInternal):
* platform/graphics/WidthIterator.h:
(WidthIterator): Removed now unused advanceOneCharacter method.
2013-08-20 Antonio Gomes <a1.gomes@sisa.samsung.com>
Harden RenderBox::canBeScrolledAndHasScrollableArea logic
https://bugs.webkit.org/show_bug.cgi?id=104373
Reviewed by Simon Fraser.
Previously if a say div has a overflown content on 'y' but is
styled as "overflow-x: auto; overflow-y: hidden", RenderBox::canBeProgramaticallyScrolled
would still return true. It interfers, among other things, with the way
autoscroll works.
Patch fixes it by adding two helper methods to RenderBox class in order to verify a box'
scrollability in a given axis (x or y); They are used when checking if a given box is in
fact programatically scrollable.
Test: fast/events/autoscroll-overflow-hidden-longhands.html
WebKit autoscroll behavior now matches Firefox and Opera12 (pre-blink)
in that sense.
* rendering/RenderBox.cpp:
(WebCore::RenderBox::canBeProgramaticallyScrolled):
* rendering/RenderBox.h:
(WebCore::RenderBox::hasScrollableOverflowX):
(WebCore::RenderBox::hasScrollableOverflowY):
2013-08-19 Antonio Gomes <a1.gomes@sisa.samsung.com>
Text dragging can scroll overflow:hidden boxes
https://bugs.webkit.org/show_bug.cgi?id=119760
Reviewed by Darin Adler.
Consider the case of the following HTML:
<div style="overflow:hidden; width: 100px; height: 100px" >
<input id="input" type="text" size=10 value="any text here!"/>
<button style="position:relative; top: 100px; left: 100px"/>
</div>
If ones starts a text selection by dragging the mouse from within the input
field, and continues to drag beyong the outer div boundary, the latter will
be scrolled no matter its overflow:hidden style.
That happens because when the autoscroll has started, it gets propagated up
to the current layer's parent layer, instead of the to current layer's enclosing
scrollable layer.
Patch fixes the issue by hardening the way scrolling is
propagated upwards when autoscroll is being performed.
RenderLayer::enclosingScrollableLayer method also got rewritten
in terms of RenderLayer tree traversing, instead of RenderObject tree.
The rewrite adds support for cross frame upwards traversal.
Test: fast/events/autoscroll-upwards-propagation.html
* rendering/RenderLayer.cpp:
(WebCore::parentLayerCrossFrame):
(WebCore::RenderLayer::enclosingScrollableLayer):
(WebCore::RenderLayer::scrollRectToVisible):
2013-08-20 Jer Noble <jer.noble@apple.com>
<https://webkit.org/b/120101> [Mac] Suspended HTMLMediaElements can still hold power assertion after playback stops.
Reviewed by Eric Carlson.
Call updateDisplaySleep() when we clear our MediaPlayer, as doing so may kill any in-flight
rateChanged() notifications.
* html/HTMLMediaElement.cpp:
(WebCore::HTMLMediaElement::clearMediaPlayer):
(WebCore::HTMLMediaElement::stop):
2013-08-20 David Barr <davidbarr@chromium.org>, Gyuyoung Kim <gyuyoung.kim@samsung.com>
<https://webkit.org/b/92330> [CSS] Pass an image orientation data to drawImage()
Reviewed by Beth Dakin.
In support of ongoing css3-images image-orientation implementation. This patch passes
an imageOrientationDescription object to drawImage() function as a argument. The drawImage()
can know information of image orientation by the argument.
Spec: http://www.w3.org/TR/2012/CR-css3-images-20120417/#the-image-orientation
* html/HTMLCanvasElement.cpp:
(WebCore::HTMLCanvasElement::paint):
* html/canvas/CanvasRenderingContext2D.cpp:
(WebCore::CanvasRenderingContext2D::drawImage):
(WebCore::drawImageToContext):
* platform/graphics/ImageOrientation.h: Add setter functions.
(WebCore::ImageOrientationDescription::setRespectImageOrientation):
(WebCore::ImageOrientationDescription::setImageOrientationEnum):
* platform/graphics/texmap/TextureMapperImageBuffer.cpp:
(WebCore::BitmapTextureImageBuffer::updateContents):
* rendering/RenderBoxModelObject.cpp:
(WebCore::RenderBoxModelObject::paintNinePieceImage):
* rendering/RenderImage.cpp:
(WebCore::RenderImage::paintReplaced):
(WebCore::RenderImage::paintIntoRect):
* rendering/RenderSnapshottedPlugIn.cpp:
(WebCore::RenderSnapshottedPlugIn::paintSnapshot):
2013-08-20 Gavin Barraclough <barraclough@apple.com>
https://bugs.webkit.org/show_bug.cgi?id=120093
Remove getOwnPropertyDescriptor trap
Reviewed by Geoff Garen.
All implementations of this method are now called via the method table, and equivalent in behaviour.
Remove all duplicate implementations (and the method table trap), and add a single member function implementation on JSObject.
* WebCore.exp.in:
* bindings/js/JSDOMWindowCustom.cpp:
* bindings/scripts/CodeGeneratorJS.pm:
(GenerateHeader):
(GenerateImplementation):
(GenerateConstructorDeclaration):
(GenerateConstructorHelperMethods):
* bindings/scripts/test/JS/JSTestActiveDOMObject.cpp:
* bindings/scripts/test/JS/JSTestActiveDOMObject.h:
* bindings/scripts/test/JS/JSTestCustomNamedGetter.cpp:
* bindings/scripts/test/JS/JSTestCustomNamedGetter.h:
* bindings/scripts/test/JS/JSTestEventConstructor.cpp:
* bindings/scripts/test/JS/JSTestEventConstructor.h:
* bindings/scripts/test/JS/JSTestEventTarget.cpp:
* bindings/scripts/test/JS/JSTestEventTarget.h:
* bindings/scripts/test/JS/JSTestException.cpp:
* bindings/scripts/test/JS/JSTestException.h:
* bindings/scripts/test/JS/JSTestInterface.cpp:
* bindings/scripts/test/JS/JSTestInterface.h:
* bindings/scripts/test/JS/JSTestMediaQueryListListener.cpp:
* bindings/scripts/test/JS/JSTestMediaQueryListListener.h:
* bindings/scripts/test/JS/JSTestNamedConstructor.cpp:
* bindings/scripts/test/JS/JSTestNamedConstructor.h:
* bindings/scripts/test/JS/JSTestNode.cpp:
* bindings/scripts/test/JS/JSTestNode.h:
* bindings/scripts/test/JS/JSTestObj.cpp:
* bindings/scripts/test/JS/JSTestObj.h:
* bindings/scripts/test/JS/JSTestOverloadedConstructors.cpp:
* bindings/scripts/test/JS/JSTestOverloadedConstructors.h:
* bindings/scripts/test/JS/JSTestSerializedScriptValueInterface.cpp:
* bindings/scripts/test/JS/JSTestSerializedScriptValueInterface.h:
* bindings/scripts/test/JS/JSTestTypedefs.cpp:
* bindings/scripts/test/JS/JSTestTypedefs.h:
* bridge/jsc/BridgeJSC.h:
(JSC::Bindings::Instance::getOwnPropertySlot):
* bridge/objc/objc_runtime.h:
* bridge/objc/objc_runtime.mm:
* bridge/runtime_array.cpp:
* bridge/runtime_array.h:
* bridge/runtime_method.cpp:
* bridge/runtime_method.h:
* bridge/runtime_object.cpp:
* bridge/runtime_object.h:
- remove getOwnPropertyDescriptor
2013-08-20 Antti Koivisto <antti@apple.com>
<https://webkit.org/b/120071> Replace NodeRenderingContext with Node* as childShouldCreateRenderer() argument
Reviewed by Darin Adler.
This simplifies the code. NodeRenderingContext was basically only used for getting the Node.
* dom/ContainerNode.h:
(WebCore::ContainerNode::childShouldCreateRenderer):
* dom/Element.cpp:
(WebCore::Element::childShouldCreateRenderer):
* dom/Element.h:
* dom/NodeRenderingContext.cpp:
(WebCore::NodeRenderingContext::shouldCreateRenderer):
* dom/NodeRenderingContext.h:
Move isOnEncapsulationBoundary() to InsertionPoint.h and call it hasShadowRootOrActiveInsertionPointParent().
Move isOnUpperEncapsulationBoundary() to ShadowRoot.h and call it hasShadowRootParent().
* dom/ShadowRoot.h:
(WebCore::hasShadowRootParent):
* html/HTMLDetailsElement.cpp:
(WebCore::HTMLDetailsElement::childShouldCreateRenderer):
* html/HTMLDetailsElement.h:
* html/HTMLFormControlElement.cpp:
(WebCore::HTMLFormControlElement::validationMessageShadowTreeContains):
* html/HTMLFormControlElement.h:
* html/HTMLMediaElement.cpp:
(WebCore::HTMLMediaElement::childShouldCreateRenderer):
* html/HTMLMediaElement.h:
* html/HTMLMeterElement.cpp:
(WebCore::HTMLMeterElement::childShouldCreateRenderer):
* html/HTMLMeterElement.h:
* html/HTMLOptGroupElement.h:
(WebCore::isHTMLOptGroupElement):
* html/HTMLOptionElement.h:
(WebCore::isHTMLOptionElement):
* html/HTMLProgressElement.cpp:
(WebCore::HTMLProgressElement::childShouldCreateRenderer):
* html/HTMLProgressElement.h:
* html/HTMLSelectElement.cpp:
(WebCore::HTMLSelectElement::childShouldCreateRenderer):
* html/HTMLSelectElement.h:
* html/HTMLSummaryElement.cpp:
(WebCore::HTMLSummaryElement::childShouldCreateRenderer):
* html/HTMLSummaryElement.h:
* html/HTMLTextFormControlElement.cpp:
(WebCore::HTMLTextFormControlElement::childShouldCreateRenderer):
(WebCore::enclosingTextFormControl):
* html/HTMLTextFormControlElement.h:
* html/ValidationMessage.cpp:
(WebCore::ValidationMessage::shadowTreeContains):
* html/ValidationMessage.h:
* html/shadow/InsertionPoint.cpp:
(WebCore::InsertionPoint::rendererIsNeeded):
* html/shadow/InsertionPoint.h:
(WebCore::isActiveInsertionPoint):
Remove isShadowBoundary() as it was equivalent to isActive().
Remove isLowerEncapsulationBoundary() as it was equivalent to isActiveInsertionPoint().
(WebCore::hasShadowRootOrActiveInsertionPointParent):
Moved and renamed from NodeRenderingContext::isOnEncapsulationBoundary().
* svg/SVGAElement.cpp:
(WebCore::SVGAElement::childShouldCreateRenderer):
* svg/SVGAElement.h:
* svg/SVGAltGlyphElement.cpp:
(WebCore::SVGAltGlyphElement::childShouldCreateRenderer):
* svg/SVGAltGlyphElement.h:
* svg/SVGDocument.cpp:
(WebCore::SVGDocument::childShouldCreateRenderer):
* svg/SVGDocument.h:
* svg/SVGElement.cpp:
(WebCore::SVGElement::childShouldCreateRenderer):
* svg/SVGElement.h:
* svg/SVGFilterElement.cpp:
(WebCore::SVGFilterElement::childShouldCreateRenderer):
* svg/SVGFilterElement.h:
* svg/SVGFilterPrimitiveStandardAttributes.h:
* svg/SVGForeignObjectElement.cpp:
(WebCore::SVGForeignObjectElement::childShouldCreateRenderer):
* svg/SVGForeignObjectElement.h:
* svg/SVGSVGElement.h:
(WebCore::toSVGSVGElement):
* svg/SVGSwitchElement.cpp:
(WebCore::SVGSwitchElement::childShouldCreateRenderer):
* svg/SVGSwitchElement.h:
* svg/SVGTRefElement.cpp:
(WebCore::SVGTRefElement::childShouldCreateRenderer):
* svg/SVGTRefElement.h:
* svg/SVGTSpanElement.cpp:
(WebCore::SVGTSpanElement::childShouldCreateRenderer):
* svg/SVGTSpanElement.h:
* svg/SVGTextElement.cpp:
(WebCore::SVGTextElement::childShouldCreateRenderer):
* svg/SVGTextElement.h:
* svg/SVGTextPathElement.cpp:
(WebCore::SVGTextPathElement::childShouldCreateRenderer):
* svg/SVGTextPathElement.h:
2013-08-20 Benjamin Poulain <benjamin@webkit.org>
<https://webkit.org/b/120050> Don't bother using a Vector for the ouput of querySelector, just return the first element found
Reviewed by Ryosuke Niwa.
Simplify the case of querySelector. Instead of using the same output type as querySelectorAll,
simply use a trait to define what to do in the loop.
* dom/SelectorQuery.cpp:
(WebCore::AllElementExtractorSelectorQueryTrait::appendOutputForElement):
(WebCore::SelectorDataList::queryAll):
(WebCore::SingleElementExtractorSelectorQueryTrait::appendOutputForElement):
(WebCore::SelectorDataList::queryFirst):
(WebCore::SelectorDataList::executeFastPathForIdSelector):
(WebCore::elementsForLocalName):
(WebCore::anyElement):
(WebCore::SelectorDataList::executeSingleTagNameSelectorData):
(WebCore::SelectorDataList::executeSingleClassNameSelectorData):
(WebCore::SelectorDataList::executeSingleSelectorData):
(WebCore::SelectorDataList::executeSingleMultiSelectorData):
(WebCore::SelectorDataList::execute):
* dom/SelectorQuery.h:
2013-08-20 Antti Koivisto <antti@apple.com>
Rollout the previous patch for landing with the correct ChangeLog.
013-08-20 Jacky Jiang <zhajiang@blackberry.com>
<https://webkit.org/b/120082> [BlackBerry] Remove unused previousTextureRect in LayerTiler
Reviewed by Rob Buis.
Internally reviewed by Mike Lattanzio and Jakob Petsovits.
* platform/graphics/blackberry/LayerTiler.cpp:
(WebCore::LayerTiler::updateTextureContentsIfNeeded):
2013-08-20 Antti Koivisto <antti@apple.com>
<https://webkit.org/b/120078> Replace NodeRenderingContext with RenderStyle& as shouldCreateRenderer() argument
Reviewed by Darin Adler.
This simplifies the code. NodeRenderingContext was only used for getting the RenderStyle.
* dom/Element.cpp:
(WebCore::Element::rendererIsNeeded):
* dom/Element.h:
* dom/NodeRenderingContext.cpp:
(WebCore::NodeRenderingContext::elementInsideRegionNeedsRenderer):
(WebCore::NodeRenderingContext::createRendererForElementIfNeeded):
* dom/PseudoElement.cpp:
(WebCore::PseudoElement::rendererIsNeeded):
* dom/PseudoElement.h:
* html/HTMLAppletElement.cpp:
(WebCore::HTMLAppletElement::rendererIsNeeded):
* html/HTMLAppletElement.h:
* html/HTMLElement.cpp:
(WebCore::HTMLElement::rendererIsNeeded):
* html/HTMLElement.h:
* html/HTMLEmbedElement.cpp:
(WebCore::HTMLEmbedElement::rendererIsNeeded):
* html/HTMLEmbedElement.h:
* html/HTMLFormElement.cpp:
(WebCore::HTMLFormElement::rendererIsNeeded):
* html/HTMLFormElement.h:
* html/HTMLFrameElement.cpp:
(WebCore::HTMLFrameElement::rendererIsNeeded):
* html/HTMLFrameElement.h:
* html/HTMLFrameSetElement.cpp:
(WebCore::HTMLFrameSetElement::rendererIsNeeded):
* html/HTMLFrameSetElement.h:
* html/HTMLIFrameElement.cpp:
(WebCore::HTMLIFrameElement::rendererIsNeeded):
* html/HTMLIFrameElement.h:
* html/HTMLInputElement.cpp:
(WebCore::HTMLInputElement::rendererIsNeeded):
* html/HTMLInputElement.h:
* html/HTMLMediaElement.cpp:
(WebCore::HTMLMediaElement::rendererIsNeeded):
* html/HTMLMediaElement.h:
* html/HTMLObjectElement.cpp:
(WebCore::HTMLObjectElement::rendererIsNeeded):
* html/HTMLObjectElement.h:
* html/HTMLOptGroupElement.h:
* html/HTMLOptionElement.h:
* html/HTMLVideoElement.cpp:
(WebCore::HTMLVideoElement::rendererIsNeeded):
* html/HTMLVideoElement.h:
* html/shadow/DetailsMarkerControl.cpp:
(WebCore::DetailsMarkerControl::rendererIsNeeded):
* html/shadow/DetailsMarkerControl.h:
* html/shadow/InsertionPoint.cpp:
(WebCore::InsertionPoint::rendererIsNeeded):
* html/shadow/InsertionPoint.h:
* html/shadow/MeterShadowElement.cpp:
(WebCore::MeterShadowElement::rendererIsNeeded):
(WebCore::MeterInnerElement::rendererIsNeeded):
* html/shadow/MeterShadowElement.h:
* html/shadow/ProgressShadowElement.cpp:
(WebCore::ProgressShadowElement::rendererIsNeeded):
(WebCore::ProgressInnerElement::rendererIsNeeded):
* html/shadow/ProgressShadowElement.h:
* svg/SVGDescElement.h:
* svg/SVGElement.h:
(WebCore::SVGElement::rendererIsNeeded):
* svg/SVGFilterPrimitiveStandardAttributes.cpp:
(WebCore::SVGFilterPrimitiveStandardAttributes::rendererIsNeeded):
* svg/SVGFilterPrimitiveStandardAttributes.h:
* svg/SVGFontElement.h:
* svg/SVGForeignObjectElement.cpp:
(WebCore::SVGForeignObjectElement::rendererIsNeeded):
* svg/SVGForeignObjectElement.h:
* svg/SVGGElement.cpp:
(WebCore::SVGGElement::rendererIsNeeded):
* svg/SVGGElement.h:
* svg/SVGGlyphElement.h:
* svg/SVGGlyphRefElement.h:
* svg/SVGHKernElement.h:
* svg/SVGMarkerElement.h:
* svg/SVGMissingGlyphElement.h:
* svg/SVGSVGElement.cpp:
(WebCore::SVGSVGElement::rendererIsNeeded):
* svg/SVGSVGElement.h:
* svg/SVGStopElement.cpp:
(WebCore::SVGStopElement::rendererIsNeeded):
* svg/SVGStopElement.h:
* svg/SVGStyledElement.cpp:
(WebCore::SVGStyledElement::rendererIsNeeded):
* svg/SVGStyledElement.h:
* svg/SVGTRefElement.cpp:
(WebCore::SVGTRefElement::rendererIsNeeded):
* svg/SVGTRefElement.h:
* svg/SVGTSpanElement.cpp:
(WebCore::SVGTSpanElement::rendererIsNeeded):
* svg/SVGTSpanElement.h:
* svg/SVGTextPathElement.cpp:
(WebCore::SVGTextPathElement::rendererIsNeeded):
* svg/SVGTextPathElement.h:
* svg/SVGTitleElement.h:
* svg/SVGVKernElement.h:
* svg/SVGViewElement.h:
2013-08-20 Daniel Bates <dabates@apple.com>
<https://webkit.org/b/120088> Define Clipboard::hasData() only when building with drag support
Reviewed by Darin Adler.
Clipboard::hasData() is specific to drag-and-drop support. We should only define it when
such support is enabled.
* dom/Clipboard.cpp: Move hasData() to DRAG_SUPPORT section of the file.
* dom/Clipboard.h: Ditto.
2013-08-20 Antti Koivisto <antti@apple.com>
<https://webkit.org/b/120078> Replace NodeRenderingContext with RenderStyle& as shouldCreateRenderer() argument
Reviewed by Darin Adler.
This simplifies the code. NodeRenderingContext was only used for getting the RenderStyle.
* dom/Element.cpp:
(WebCore::Element::rendererIsNeeded):
* dom/Element.h:
* dom/NodeRenderingContext.cpp:
(WebCore::NodeRenderingContext::elementInsideRegionNeedsRenderer):
(WebCore::NodeRenderingContext::createRendererForElementIfNeeded):
* dom/PseudoElement.cpp:
(WebCore::PseudoElement::rendererIsNeeded):
* dom/PseudoElement.h:
* html/HTMLAppletElement.cpp:
(WebCore::HTMLAppletElement::rendererIsNeeded):
* html/HTMLAppletElement.h:
* html/HTMLElement.cpp:
(WebCore::HTMLElement::rendererIsNeeded):
* html/HTMLElement.h:
* html/HTMLEmbedElement.cpp:
(WebCore::HTMLEmbedElement::rendererIsNeeded):
* html/HTMLEmbedElement.h:
* html/HTMLFormElement.cpp:
(WebCore::HTMLFormElement::rendererIsNeeded):
* html/HTMLFormElement.h:
* html/HTMLFrameElement.cpp:
(WebCore::HTMLFrameElement::rendererIsNeeded):
* html/HTMLFrameElement.h:
* html/HTMLFrameSetElement.cpp:
(WebCore::HTMLFrameSetElement::rendererIsNeeded):
* html/HTMLFrameSetElement.h:
* html/HTMLIFrameElement.cpp:
(WebCore::HTMLIFrameElement::rendererIsNeeded):
* html/HTMLIFrameElement.h:
* html/HTMLInputElement.cpp:
(WebCore::HTMLInputElement::rendererIsNeeded):
* html/HTMLInputElement.h:
* html/HTMLMediaElement.cpp:
(WebCore::HTMLMediaElement::rendererIsNeeded):
* html/HTMLMediaElement.h:
* html/HTMLObjectElement.cpp:
(WebCore::HTMLObjectElement::rendererIsNeeded):
* html/HTMLObjectElement.h:
* html/HTMLOptGroupElement.h:
* html/HTMLOptionElement.h:
* html/HTMLVideoElement.cpp:
(WebCore::HTMLVideoElement::rendererIsNeeded):
* html/HTMLVideoElement.h:
* html/shadow/DetailsMarkerControl.cpp:
(WebCore::DetailsMarkerControl::rendererIsNeeded):
* html/shadow/DetailsMarkerControl.h:
* html/shadow/InsertionPoint.cpp:
(WebCore::InsertionPoint::rendererIsNeeded):
* html/shadow/InsertionPoint.h:
* html/shadow/MeterShadowElement.cpp:
(WebCore::MeterShadowElement::rendererIsNeeded):
(WebCore::MeterInnerElement::rendererIsNeeded):
* html/shadow/MeterShadowElement.h:
* html/shadow/ProgressShadowElement.cpp:
(WebCore::ProgressShadowElement::rendererIsNeeded):
(WebCore::ProgressInnerElement::rendererIsNeeded):
* html/shadow/ProgressShadowElement.h:
* svg/SVGDescElement.h:
* svg/SVGElement.h:
(WebCore::SVGElement::rendererIsNeeded):
* svg/SVGFilterPrimitiveStandardAttributes.cpp:
(WebCore::SVGFilterPrimitiveStandardAttributes::rendererIsNeeded):
* svg/SVGFilterPrimitiveStandardAttributes.h:
* svg/SVGFontElement.h:
* svg/SVGForeignObjectElement.cpp:
(WebCore::SVGForeignObjectElement::rendererIsNeeded):
* svg/SVGForeignObjectElement.h:
* svg/SVGGElement.cpp:
(WebCore::SVGGElement::rendererIsNeeded):
* svg/SVGGElement.h:
* svg/SVGGlyphElement.h:
* svg/SVGGlyphRefElement.h:
* svg/SVGHKernElement.h:
* svg/SVGMarkerElement.h:
* svg/SVGMissingGlyphElement.h:
* svg/SVGSVGElement.cpp:
(WebCore::SVGSVGElement::rendererIsNeeded):
* svg/SVGSVGElement.h:
* svg/SVGStopElement.cpp:
(WebCore::SVGStopElement::rendererIsNeeded):
* svg/SVGStopElement.h:
* svg/SVGStyledElement.cpp:
(WebCore::SVGStyledElement::rendererIsNeeded):
* svg/SVGStyledElement.h:
* svg/SVGTRefElement.cpp:
(WebCore::SVGTRefElement::rendererIsNeeded):
* svg/SVGTRefElement.h:
* svg/SVGTSpanElement.cpp:
(WebCore::SVGTSpanElement::rendererIsNeeded):
* svg/SVGTSpanElement.h:
* svg/SVGTextPathElement.cpp:
(WebCore::SVGTextPathElement::rendererIsNeeded):
* svg/SVGTextPathElement.h:
* svg/SVGTitleElement.h:
* svg/SVGVKernElement.h:
* svg/SVGViewElement.h:
2013-08-20 Tim Horton <timothy_horton@apple.com>
<https://webkit.org/b/105988> [Mac] Some inspector tests intermittently assert in InspectorOverlay::paint
<rdar://problem/12958038>
Reviewed by Joseph Pecoraro.
Update the inspector overlay's layout before painting, if it is stale.
No new tests; fixes an intermittent assertion failure in some existing tests.
* inspector/InspectorOverlay.cpp:
(WebCore::InspectorOverlay::paint):
2013-08-20 Daniel Bates <dabates@apple.com>
Build fix after <http://trac.webkit.org/changeset/154260> (https://webkit.org/b/119949);
declare Clipboard::hasData() when building with and without drag support
* dom/Clipboard.h:
2013-08-20 Hans Muller <hmuller@adobe.com>
<https://webkit.org/b/119849> [CSS Shapes] Complete RasterShape::firstIncludedIntervalLogicalTop()
Reviewed by Alexandru Chiculita.
Completed the implementation of RasterShape::firstIncludedIntervalLogicalTop(). The
method now computes first logical top location where a line segment can be laid
out within a RasterShape, i.e. a shape derived from an image valued URL resource.
A detailed description of the algorithm can be found in
http://hansmuller-webkit.blogspot.com/2013/08/first-fit-location-for-image-shapes.html.
The new tests exposed a bug in the existing getIncludedIntervals() method. A shape
with a vertical gap that spans the entire line now causes the method to short circuit
and return an empty interval list.
Tests: fast/shapes/shape-inside/shape-inside-image-003.html
fast/shapes/shape-inside/shape-inside-image-004.html
fast/shapes/shape-inside/shape-inside-image-005.html
* rendering/shapes/RasterShape.cpp:
(WebCore::RasterShapeIntervals::firstIncludedIntervalY):
(WebCore::RasterShapeIntervals::getIncludedIntervals):
(WebCore::RasterShape::firstIncludedIntervalLogicalTop):
* rendering/shapes/RasterShape.h:
2013-08-20 Pratik Solanki <psolanki@apple.com>
<https://webkit.org/b/120029> Document::markers() should return a reference
Reviewed by Andreas Kling.
Document::m_markers is never NULL so return a reference from Document::markers(). Also mark
m_markers as const and initialize it in member initialization.
* dom/Document.cpp:
(WebCore::Document::Document):
* dom/Document.h:
(WebCore::Document::markers):
* editing/AlternativeTextController.cpp:
(WebCore::AlternativeTextController::isSpellingMarkerAllowed):
(WebCore::AlternativeTextController::applyAlternativeTextToRange):
(WebCore::AlternativeTextController::respondToUnappliedSpellCorrection):
(WebCore::AlternativeTextController::handleAlternativeTextUIResult):
(WebCore::AlternativeTextController::respondToChangedSelection):
(WebCore::AlternativeTextController::respondToAppliedEditing):
(WebCore::AlternativeTextController::respondToUnappliedEditing):
(WebCore::AlternativeTextController::markReversed):
(WebCore::AlternativeTextController::markCorrection):
(WebCore::AlternativeTextController::recordSpellcheckerResponseForModifiedCorrection):
(WebCore::AlternativeTextController::markPrecedingWhitespaceForDeletedAutocorrectionAfterCommand):
(WebCore::AlternativeTextController::processMarkersOnTextToBeReplacedByResult):
(WebCore::AlternativeTextController::applyDictationAlternative):
* editing/CompositeEditCommand.cpp:
(WebCore::CompositeEditCommand::replaceTextInNodePreservingMarkers):
* editing/DeleteSelectionCommand.cpp:
(WebCore::DeleteSelectionCommand::originalStringForAutocorrectionAtBeginningOfSelection):
* editing/DictationCommand.cpp:
(WebCore::DictationMarkerSupplier::addMarkersToTextNode):
* editing/Editor.cpp:
(WebCore::Editor::ignoreSpelling):
(WebCore::Editor::learnSpelling):
(WebCore::Editor::advanceToNextMisspelling):
(WebCore::Editor::clearMisspellingsAndBadGrammar):
(WebCore::Editor::markAndReplaceFor):
(WebCore::Editor::changeBackToReplacedString):
(WebCore::Editor::updateMarkersForWordsAffectedByEditing):
(WebCore::Editor::countMatchesForText):
(WebCore::Editor::setMarkedTextMatchesAreHighlighted):
(WebCore::Editor::respondToChangedSelection):
(WebCore::Editor::selectionStartHasMarkerFor):
* editing/SpellChecker.cpp:
(WebCore::SpellChecker::didCheckSucceed):
* editing/SplitTextNodeCommand.cpp:
(WebCore::SplitTextNodeCommand::doApply):
(WebCore::SplitTextNodeCommand::doUnapply):
* editing/TextCheckingHelper.cpp:
(WebCore::TextCheckingHelper::findFirstMisspelling):
(WebCore::TextCheckingHelper::findFirstGrammarDetail):
* page/FrameView.cpp:
(WebCore::FrameView::getTickmarks):
(WebCore::FrameView::paintContents):
* page/Page.cpp:
(WebCore::Page::unmarkAllTextMatches):
* rendering/HitTestResult.cpp:
(WebCore::HitTestResult::spellingToolTip):
(WebCore::HitTestResult::replacedString):
(WebCore::HitTestResult::dictationAlternatives):
* rendering/InlineTextBox.cpp:
(WebCore::InlineTextBox::paintDocumentMarkers):
* rendering/svg/SVGInlineFlowBox.cpp:
(WebCore::SVGInlineFlowBox::computeTextMatchMarkerRectForRenderer):
* testing/Internals.cpp:
(WebCore::Internals::markerCountForNode):
(WebCore::Internals::markerAt):
(WebCore::Internals::addTextMatchMarker):
2013-08-20 Pratik Solanki <psolanki@apple.com>
<https://webkit.org/b/119875> localeToScriptCodeForFontSelection should use hash tables with larger default capacity
Reviewed by Darin Adler.
The two static hash tables used in this file have 106 and 198 entries. Set a minimumTableSize for
these hash tables so we don't have to expand them during initialization.
No new tests because no functional changes.
* platform/text/LocaleToScriptMappingDefault.cpp:
(WebCore::scriptNameToCode):
(WebCore::localeToScriptCodeForFontSelection):
2013-08-20 Eric Carlson <eric.carlson@apple.com>
<https://webkit.org/b/120068> Media controls can be attached lazily
Reviewed by Jer Noble.
Merge https://chromium.googlesource.com/chromium/blink/+/28a995486a675992f2e72f81bfabdfff05688a31.
* html/HTMLMediaElement.cpp:
(WebCore::HTMLMediaElement::createMediaControls): Add AttachLazily to appendChild().
2013-08-20 Daniel Bates <dabates@apple.com>
<https://webkit.org/b/120072> Use nullAtom instead of defining static local in
Accessibility{Object, RenderObject}::actionVerb()
Reviewed by Chris Fleizach.
* accessibility/AccessibilityObject.cpp:
(WebCore::AccessibilityObject::actionVerb):
* accessibility/AccessibilityRenderObject.cpp:
(WebCore::AccessibilityRenderObject::actionVerb):
2013-08-20 Daniel Bates <dabates@apple.com>
<https://webkit.org/b/119914> [iOS] Upstream changes to WebCore/accessibility
Reviewed by Darin Adler and Chris Fleizach.
* accessibility/AccessibilityMenuList.cpp:
(WebCore::AccessibilityMenuList::press):
(WebCore::AccessibilityMenuList::isCollapsed):
* accessibility/AccessibilityObject.cpp:
(WebCore::AccessibilityObject::headingElementForNode):
(WebCore::AccessibilityObject::actionVerb):
* accessibility/AccessibilityObject.h:
* accessibility/AccessibilityRenderObject.cpp:
(WebCore::AccessibilityRenderObject::boundsForVisiblePositionRange):
(WebCore::AccessibilityRenderObject::actionVerb):
* accessibility/AccessibilityTableColumn.cpp:
(WebCore::AccessibilityTableColumn::computeAccessibilityIsIgnored):
* accessibility/AccessibilityTableHeaderContainer.cpp:
(WebCore::AccessibilityTableHeaderContainer::computeAccessibilityIsIgnored):
* accessibility/ios/WebAccessibilityObjectWrapperIOS.mm:
2013-08-20 Bruno de Oliveira Abinader <bruno.d@partner.samsung.com>
[css3-text] Implement CSS3 text-decoration shorthand
https://bugs.webkit.org/show_bug.cgi?id=92000
Reviewed by Darin Adler.
Implements the text-decoration shorthand (with -webkit- prefix), as specified by the CSS3 Text Decoration specification:
http://dev.w3.org/csswg/css-text-decor-3/#text-decoration-property
Backported from Blink:
https://src.chromium.org/viewvc/blink?revision=156266&view=revision
Tests: fast/css3-text/css3-text-decoration/getComputedStyle/getComputedStyle-text-decoration-shorthand-ordering.html
fast/css3-text/css3-text-decoration/getComputedStyle/getComputedStyle-text-decoration-shorthand.html
* css/CSSComputedStyleDeclaration.cpp:
(WebCore::ComputedStyleExtractor::propertyValue):
* css/CSSParser.cpp:
(WebCore::CSSParser::parseValue):
(WebCore::CSSParser::addTextDecorationProperty):
(WebCore::CSSParser::parseTextDecoration):
* css/CSSProperty.cpp:
(WebCore::CSSProperty::isInheritedProperty):
* css/CSSPropertyNames.in:
* css/StylePropertyShorthand.cpp:
(WebCore::webkitTextDecorationShorthand):
(WebCore::shorthandForProperty):
(WebCore::matchingShorthandsForLonghand):
* css/StylePropertyShorthand.h:
2013-08-20 Gavin Barraclough <barraclough@apple.com>
https://bugs.webkit.org/show_bug.cgi?id=120054
Remove some dead code following getOwnPropertyDescriptor cleanup
Reviewed by Oliver Hunt.
* bindings/js/JSPluginElementFunctions.cpp:
* bindings/js/JSPluginElementFunctions.h:
- remove runtimeObjectCustomGetOwnPropertyDescriptor, pluginElementCustomGetOwnPropertyDescriptor
2013-08-20 Alex Christensen <achristensen@apple.com>
Use PlatformArchitecture to distinguish between 32-bit and 64-bit builds on Windows.
https://bugs.webkit.org/show_bug.cgi?id=119512
Reviewed by Brent Fulgham.
* WebCore.vcxproj/WebCore.vcxproj:
* WebCore.vcxproj/WebCore.vcxproj.filters:
* WebCore.vcxproj/WebCoreCommon.props:
* WebCore.vcxproj/WebCoreGeneratedCommon.props:
* WebCore.vcxproj/WebCoreTestSupport.vcxproj:
* WebCore.vcxproj/WebCoreTestSupport.vcxproj.filters:
Replaced obj32, bin32, and lib32 with macros for 64-bit build.
2013-08-20 Jessie Berlin <jberlin@apple.com>
Remove a string no longer used after r154251.
Rubber-stamped by Brady Eidson.
* English.lproj/Localizable.strings:
2013-08-20 Jakob Petsovits <jpetsovits@blackberry.com>
[BlackBerry] Avoid an assertion from calling releaseBufferDrawable(nullptr)
https://bugs.webkit.org/show_bug.cgi?id=119862
JIRA 470760
Reviewed by Antonio Gomes.
destroyBuffer() finds a null pointer valid but
releaseBufferDrawable() does not. Fix by adding a
null pointer check.
No new tests, caught by existing layout test runs.
* platform/graphics/blackberry/ImageBufferBlackBerry.cpp:
(WebCore::ImageBuffer::~ImageBuffer):
2013-08-19 Gustavo Noronha Silva <gns@gnome.org>
<https://webkit.org/b/120048> [GTK] Add stubs for APIs that went missing in the DOM bindings
Reviewed by Martin Robinson.
No new tests, these are just stubs for the DOM bindings API.
* bindings/gobject/WebKitDOMCustom.cpp:
(webkit_dom_bar_info_get_property):
(webkit_dom_bar_info_class_init):
(webkit_dom_bar_info_init):
(webkit_dom_bar_info_get_visible):
(webkit_dom_console_get_memory):
(webkit_dom_css_style_declaration_get_property_css_value):
(webkit_dom_document_get_webkit_hidden):
(webkit_dom_document_get_webkit_visibility_state):
(webkit_dom_html_document_open):
(webkit_dom_html_element_set_item_id):
(webkit_dom_html_element_get_item_id):
(webkit_dom_html_element_get_item_ref):
(webkit_dom_html_element_get_item_prop):
(webkit_dom_html_element_set_item_scope):
(webkit_dom_html_element_get_item_scope):
(webkit_dom_html_element_get_item_type):
(webkit_dom_html_properties_collection_get_property):
(webkit_dom_html_properties_collection_class_init):
(webkit_dom_html_properties_collection_init):
(webkit_dom_html_properties_collection_item):
(webkit_dom_html_properties_collection_named_item):
(webkit_dom_html_properties_collection_get_length):
(webkit_dom_html_properties_collection_get_names):
(webkit_dom_node_get_attributes):
(webkit_dom_node_has_attributes):
(webkit_dom_memory_info_get_property):
(webkit_dom_memory_info_class_init):
(webkit_dom_memory_info_init):
(webkit_dom_memory_info_get_total_js_heap_size):
(webkit_dom_memory_info_get_used_js_heap_size):
(webkit_dom_memory_info_get_js_heap_size_limit):
(webkit_dom_micro_data_item_value_class_init):
(webkit_dom_micro_data_item_value_init):
(webkit_dom_performance_get_memory):
(webkit_dom_property_node_list_get_property):
(webkit_dom_property_node_list_class_init):
(webkit_dom_property_node_list_init):
(webkit_dom_property_node_list_item):
(webkit_dom_property_node_list_get_length):
* bindings/gobject/WebKitDOMCustom.h:
2013-08-20 Antti Koivisto <antti@apple.com>
<https://webkit.org/b/120017> Remove NodeRenderingTraversal::ParentDetails
Reviewed by Andreas Kling.
Remove this oddly factored type that is used to optionally collect some data during ComposedShadowTreeWalker parent traversal.
Also removed support for reset-style-inheritance attribute in InsertionPoint. We don't use or expose it.
* css/StyleResolver.cpp:
(WebCore::StyleResolver::State::initForStyleResolve):
(WebCore::StyleResolver::styleForElement):
* css/StyleResolver.h:
(WebCore::StyleResolver::State::State):
(WebCore::StyleResolver::State::elementLinkState):
Remove m_distributedToInsertionPoint State field. We never hit the cases where it was used.
* dom/ComposedShadowTreeWalker.cpp:
(WebCore::ComposedShadowTreeWalker::traverseSiblingOrBackToInsertionPoint):
(WebCore::ComposedShadowTreeWalker::traverseNodeEscapingFallbackContents):
(WebCore::ComposedShadowTreeWalker::traverseParent):
Return null instead of setting childWasOutOfComposition to details object. That's what would happen anyway in the caller.
(WebCore::ComposedShadowTreeWalker::traverseParentInCurrentTree):
(WebCore::ComposedShadowTreeWalker::traverseParentBackToShadowRootOrHost):
* dom/ComposedShadowTreeWalker.h:
* dom/Node.cpp:
(WebCore::Node::insertionParentForBinding):
* dom/NodeRenderingContext.cpp:
(WebCore::NodeRenderingContext::NodeRenderingContext):
(WebCore::NodeRenderingContext::isOnEncapsulationBoundary):
Make this look up InsertionPoint directly intead of relying it being populated in m_parentDetails. The function is used only in
a few non-performance critical places.
(WebCore::NodeRenderingContext::resetStyleInheritance):
Return parent ShadowRoots resetStyleInheritance() flag instead of using m_parentDetails.
* dom/NodeRenderingContext.h:
* dom/NodeRenderingTraversal.cpp:
(WebCore::NodeRenderingTraversal::parentSlow):
* dom/NodeRenderingTraversal.h:
(WebCore::NodeRenderingTraversal::parent):
Remove ParentDetails.
* html/HTMLAttributeNames.in:
* html/shadow/InsertionPoint.cpp:
Remove unused resetStyleInheritance attribute.
(WebCore::InsertionPoint::removedFrom):
(WebCore::findInsertionPointOf):
Renamed for clarity.
* html/shadow/InsertionPoint.h:
* testing/Internals.cpp:
(WebCore::Internals::includerFor):
2013-08-20 Antti Koivisto <antti@apple.com>
<https://webkit.org/b/120025> REGRESSION (r154254): fast/frames/frameset-frameborder-inheritance.html failing on Apple MountainLion Debug WK1 (Tests)
Reviewed by Anders Carlsson.
* html/HTMLDocument.cpp:
(WebCore::HTMLDocument::isFrameSet):
* html/HTMLFrameElement.cpp:
(WebCore::HTMLFrameElement::didAttachRenderers):
Make helper public in HTMLFrameSetElement.
* html/HTMLFrameSetElement.cpp:
(WebCore::HTMLFrameSetElement::findContaining):
Static function for finding containing frameset, if any.
(WebCore::HTMLFrameSetElement::willAttachRenderers):
This broke in refactoring. We should exit the loop when the first containing frameset is found. Fix by refactoring more.
* html/HTMLFrameSetElement.h:
(WebCore::isHTMLFrameSetElement):
(WebCore::toHTMLFrameSetElement):
Add casting functions.
* rendering/RenderFrameSet.cpp:
(WebCore::RenderFrameSet::frameSet):
2013-08-20 Antti Koivisto <antti@apple.com>
<https://webkit.org/b/120023> REGRESSION(r154257): svg/custom/bug78807.svg and svg/custom/use-invalid-style.svg failing
Reviewed by Andreas Kling.
* xml/XMLErrors.cpp:
(WebCore::XMLErrors::insertErrorMessageBlock): "reattach" had accidentally turned into "detach" in refactoring.
2013-08-20 Antti Koivisto <antti@apple.com>
<https://webkit.org/b/119969> REGRESSION (r154232): Crash on the japantimes.co.jp
Reviewed by Andreas Kling.
PseudoElement no longer has parent and calling Element::insertedInto for them crashes as it tries to access it.
Normally there are no pseudo elements when Element::insertedInto() is invoked as they get detached and attached
along with rendering. However in this case the page inserts a <style> that uses ::before along with an element
that it applies to. Stylesheet insertion triggers synchronous style recalc that attaches rendering to all newly
insered elements. Later Element::insertedInto gets called for the element that has pseudo element and we crash.
Test: fast/css-generated-content/insert-stylesheet-and-pseudo-crash.html
* dom/Element.cpp:
(WebCore::Element::insertedInto):
(WebCore::Element::removedFrom):
Remove calls to insertedInto/removedFrom for pseudo elements. They are not considered to be in document.
When they are added normally during render tree attach these calls don't happen either.
2013-08-20 Ryosuke Niwa <rniwa@webkit.org>
Windows build fix after r154314.
* platform/graphics/cg/PathCG.cpp:
(WebCore::Path::platformAddPathForRoundedRect):
2013-08-19 Hurnjoo Lee <hurnjoo.lee@samsung.com>
[Cairo] Canvas putImageData is not working as expected
https://bugs.webkit.org/show_bug.cgi?id=119992
Reviewed by Darin Adler.
ImageBufferCairo::putImageArray didn't perform pre-multiply in case of zero alpha value.
If the alpha value is not 255, image data should always be pre-multiplied.
Test: fast/canvas/canvas-putImageData-zero-alpha.html
* platform/graphics/cairo/ImageBufferCairo.cpp:
(WebCore::ImageBuffer::putByteArray):
2013-08-19 Santosh Mahto <santosh.ma@samsung.com>
<https://webkit.org/b/119991> change usage of calculateUTCOffset()/calculateDSTOffset to calculateLocalTimeOffset
Reviewed by Darin Adler.
Resolving code error.
* html/BaseDateAndTimeInputType.cpp:
(WebCore::BaseDateAndTimeInputType::defaultValueForStepUp):
* html/MonthInputType.cpp:
(WebCore::MonthInputType::defaultValueForStepUp):
* html/TimeInputType.cpp:
(WebCore::TimeInputType::defaultValueForStepUp):
2013-08-19 Ryosuke Niwa <rniwa@webkit.org>
<https://webkit.org/b/120049> Delete code for Snow Leopard
Reviewed by Benjamin Poulain.
Delete all the code for Mac OS 10.6. Nobody builds on Snow Leopard at this point.
* WebCore.exp.in:
* WebCore.xcodeproj/project.pbxproj:
* editing/mac/EditorMac.mm:
(WebCore::Editor::pasteWithPasteboard):
* page/ContextMenuController.cpp:
(WebCore::ContextMenuController::populate):
* platform/LocalizedStrings.cpp:
(WebCore::truncatedStringForLookupMenuItem):
(WebCore::contextMenuItemTagSearchWeb):
(WebCore::contextMenuItemTagLookUpInDictionary):
* platform/MemoryPressureHandler.cpp:
* platform/audio/mac/AudioBusMac.mm:
(WebCore::AudioBus::loadPlatformResource):
* platform/graphics/ca/GraphicsLayerCA.cpp:
(WebCore::GraphicsLayerCA::createTransformAnimationsFromKeyframes):
* platform/graphics/ca/PlatformCALayer.h:
* platform/graphics/ca/mac/PlatformCALayerMac.mm:
(PlatformCALayer::acceleratesDrawing):
(PlatformCALayer::setAcceleratesDrawing):
(PlatformCALayer::contentsScale):
(PlatformCALayer::setContentsScale):
(PlatformCALayer::synchronouslyDisplayTilesInRect):
* platform/graphics/ca/mac/TileController.mm:
(WebCore::TileController::setScale):
(WebCore::TileController::setAcceleratesDrawing):
(WebCore::TileController::createTileLayer):
* platform/graphics/cg/ImageBufferDataCG.cpp:
(WebCore::ImageBufferData::getData):
(WebCore::ImageBufferData::putData):
* platform/graphics/cg/ImageBufferDataCG.h:
* platform/graphics/cg/PathCG.cpp:
(WebCore::Path::platformAddPathForRoundedRect):
* platform/graphics/cocoa/FontPlatformDataCocoa.mm:
(WebCore::FontPlatformData::FontPlatformData):
(WebCore::FontPlatformData::setFont):
* platform/graphics/mac/FontMac.mm:
(WebCore::showGlyphsWithAdvances):
* platform/graphics/mac/GraphicsContextMac.mm:
(WebCore::GraphicsContext::drawLineForDocumentMarker):
* platform/graphics/mac/MediaPlayerPrivateQTKit.mm:
(WebCore::MediaPlayerPrivateQTKit::createQTMovie):
(WebCore::MediaPlayerPrivateQTKit::layerHostChanged):
* platform/graphics/mac/WebLayer.mm:
(drawLayerContents):
* platform/mac/CursorMac.mm:
(WebCore::Cursor::ensurePlatformCursor):
* platform/mac/EmptyProtocolDefinitions.h: Removed.
* platform/mac/MemoryPressureHandlerMac.mm:
(WebCore::MemoryPressureHandler::releaseMemory):
* platform/mac/NSScrollerImpDetails.h:
* platform/mac/PlatformEventFactoryMac.mm:
(WebCore::momentumPhaseForEvent):
(WebCore::phaseForEvent):
* platform/mac/ScrollAnimatorMac.mm:
* platform/mac/SharedTimerMac.mm:
* platform/mac/WebCoreSystemInterface.h:
* platform/mac/WebCoreSystemInterface.mm:
* platform/network/mac/ResourceHandleMac.mm:
* platform/network/mac/ResourceRequestMac.mm:
(WebCore::ResourceRequest::doUpdateResourceRequest):
(WebCore::ResourceRequest::doUpdatePlatformRequest):
* platform/text/cf/HyphenationCF.cpp:
* platform/text/mac/HyphenationMac.mm: Removed.
* rendering/RenderLayerBacking.cpp:
(WebCore::RenderLayerBacking::containsPaintedContent):
* rendering/RenderThemeMac.mm:
(WebCore::RenderThemeMac::shouldShowPlaceholderWhenFocused):
2013-08-19 Ryosuke Niwa <rniwa@webkit.org>
<https://webkit.org/b/120041> Remove superfluous min calls in RenderBlock::computeOverflow
Reviewed by Simon Fraser.
Merge https://chromium.googlesource.com/chromium/blink/+/29cad35d6b4642804e6b7c1a30f0b4435dd7a71d
They are contained in an "if" statement that ensures that textIndent < 0 and so the min will never be 0.
* rendering/RenderBlock.cpp:
(WebCore::RenderBlock::computeOverflow):
2013-08-19 Ryosuke Niwa <rniwa@webkit.org>
<https://webkit.org/b/119930> input[type=range]: Fix a crash by changing input type in 'input' event handler
Reviewed by Kent Tamura.
Merge https://chromium.googlesource.com/chromium/blink/+/99afc9b55ce176b4f5fe053070e19dbebc1891a5
In SliderThumbElement::setPositionFromPoint, renderer() can be NULL after HTMLInputElement::setValueFromRenderer,
which dispatches 'input' event. Also, make a local vairable 'input' a RefPtr just in case.
Also add null-poinetr checks for the host element as SliderThumbElement only weakly holds onto the host element.
Test: fast/forms/range/range-type-change-oninput.html
* html/shadow/SliderThumbElement.cpp:
(WebCore::SliderThumbElement::isDisabledFormControl):
(WebCore::SliderThumbElement::matchesReadOnlyPseudoClass):
(WebCore::SliderThumbElement::matchesReadWritePseudoClass):
(WebCore::SliderThumbElement::setPositionFromPoint):
(WebCore::SliderThumbElement::hostInput):
2013-08-19 Alexey Proskuryakov <ap@apple.com>
https://bugs.webkit.org/show_bug.cgi?id=120028
ASSERTION FAILED: m_history->provisionalItem() == m_requestedHistoryItem.get()
when navigating to an uncached subframe
Reviewed by Brady Eidson.
Test: http/tests/navigation/post-frames-goback1-uncached.html
* loader/FrameLoader.cpp: (WebCore::FrameLoader::loadURLIntoChildFrame):
Set m_requestedHistoryItem in a code path that doesn't go through FrameLoader::loadItem.
* loader/HistoryController.cpp: (WebCore::HistoryController::restoreDocumentState):
Now that we always set m_requestedHistoryItem, there is no need to traverse frame
tree to see if this document is being loaded as part of b/f navigation (which was
add in bug 90870).
2013-08-19 Gavin Barraclough <barraclough@apple.com>
https://bugs.webkit.org/show_bug.cgi?id=120034
Remove custom getOwnPropertyDescriptor for global objects
Reviewed by Geoff Garen.
Fix attributes of JSC SynbolTableObject entries, ensure that cross frame access is safe, and suppress prototype chain walk.
* bindings/js/JSDOMWindowCustom.cpp:
(WebCore::JSDOMWindow::getOwnPropertySlot):
- Remove custom getOwnPropertyDescriptor implementation, on cross-frame access ensure
all properties are marked as read-only, non-configurable to prevent defineProperty.
2013-08-19 Gavin Barraclough <barraclough@apple.com>
https://bugs.webkit.org/show_bug.cgi?id=119995
Start removing custom implementations of getOwnPropertyDescriptor
Reviewed by Sam Weinig.
This can now typically implemented in terms of getOwnPropertySlot.
Add a macro to PropertyDescriptor to define an implementation of GOPD in terms of GOPS.
Switch over most classes in JSC & the WebCore bindings generator to use this.
* bindings/js/JSCSSStyleDeclarationCustom.cpp:
* bindings/js/JSHTMLAppletElementCustom.cpp:
* bindings/js/JSHTMLEmbedElementCustom.cpp:
* bindings/js/JSHTMLObjectElementCustom.cpp:
* bindings/js/JSHistoryCustom.cpp:
(WebCore::JSHistory::getOwnPropertySlotDelegate):
* bindings/js/JSLocationCustom.cpp:
(WebCore::JSLocation::getOwnPropertySlotDelegate):
* bindings/js/JSWorkerGlobalScopeCustom.cpp:
- Remove getOwnPropertyDescriptorDelegate methods,
Change attributes of cross-frame access properties in JSHistory/JSLocation to prevent properties from being redefined.
* bindings/scripts/CodeGeneratorJS.pm:
(GenerateHeader):
(GenerateImplementation):
(GenerateConstructorHelperMethods):
- Implement getOwnPropertySlot in terms of GET_OWN_PROPERTY_DESCRIPTOR_IMPL.
* bindings/scripts/test/JS/JSTestActiveDOMObject.cpp:
* bindings/scripts/test/JS/JSTestCustomNamedGetter.cpp:
* bindings/scripts/test/JS/JSTestEventConstructor.cpp:
* bindings/scripts/test/JS/JSTestEventTarget.cpp:
* bindings/scripts/test/JS/JSTestException.cpp:
* bindings/scripts/test/JS/JSTestInterface.cpp:
* bindings/scripts/test/JS/JSTestMediaQueryListListener.cpp:
* bindings/scripts/test/JS/JSTestNamedConstructor.cpp:
* bindings/scripts/test/JS/JSTestNode.cpp:
* bindings/scripts/test/JS/JSTestObj.cpp:
* bindings/scripts/test/JS/JSTestOverloadedConstructors.cpp:
* bindings/scripts/test/JS/JSTestSerializedScriptValueInterface.cpp:
* bindings/scripts/test/JS/JSTestTypedefs.cpp:
- Update test expectations.
2013-08-19 Benjamin Poulain <benjamin@webkit.org>
<https://webkit.org/b/119936> Fix some encapsulation issues of RuleSet
Reviewed by Darin Adler.
None of the attributes of RuleSet should be modified directly.
* css/DocumentRuleSets.cpp:
(WebCore::DocumentRuleSets::initUserStyle):
* css/ElementRuleCollector.cpp:
(WebCore::ElementRuleCollector::collectMatchingRulesForRegion):
* css/RuleSet.h:
(WebCore::RuleSet::RuleSetSelectorPair::RuleSetSelectorPair):
(WebCore::RuleSet::regionSelectorsAndRuleSets):
(WebCore::RuleSet::ruleCount):
* css/StyleResolver.cpp:
(WebCore::StyleResolver::checkRegionStyle):
2013-08-19 Benjamin Poulain <benjamin@webkit.org>
<https://webkit.org/b/119937> Remove ElementRuleCollector's m_behaviorAtBoundary
Reviewed by Darin Adler.
The value DoesNotCrossBoundary is the default behavior boundary of SelectorChecker,
and it is never changed by ElementRuleCollector.
* css/ElementRuleCollector.cpp:
(WebCore::ElementRuleCollector::collectMatchingRules):
(WebCore::ElementRuleCollector::ruleMatches):
* css/ElementRuleCollector.h:
(WebCore::ElementRuleCollector::ElementRuleCollector):
2013-08-19 Benjamin Poulain <benjamin@webkit.org>
<https://webkit.org/b/119934> Remove a repeated "private:" from ElementRuleCollector
Reviewed by Darin Adler.
* css/ElementRuleCollector.h:
2013-08-19 Pratik Solanki <psolanki@apple.com>
<https://webkit.org/b/120019> Document::visitedLinkState() should return a reference
Reviewed by Andreas Kling.
Document::m_visitedLinkState is never NULL so we can just return a reference. Also make it a const.
* css/StyleResolver.cpp:
(WebCore::StyleResolver::State::initElement):
* dom/Document.h:
(WebCore::Document::visitedLinkState):
* history/CachedPage.cpp:
(WebCore::CachedPage::restore):
* page/Page.cpp:
(WebCore::Page::allVisitedStateChanged):
(WebCore::Page::visitedStateChanged):
2013-08-19 Ryosuke Niwa <rniwa@webkit.org>
ASSERTION FAILED: !node || node->isShadowRoot() in WebCore::EventRetargeter::eventTargetRespectingTargetRules
https://bugs.webkit.org/show_bug.cgi?id=119720
Reviewed by Andy Estes.
Merge https://chromium.googlesource.com/chromium/blink/+/4ce9bfbf54410179cd0f18b3d1a912045fc0ec3d
* dom/EventRetargeter.h:
(WebCore::EventRetargeter::eventTargetRespectingTargetRules):
2013-08-19 Darin Adler <darin@apple.com>
<https://webkit.org/b/120013> Tighten up logic in HTMLTableRowsCollection
Reviewed by Andy Estes.
I was looking for incorrect uses of hasLocalName in places where hasTagName should be used.
The use in HTMLTableRowsCollection looked like that kind of mistake, but when I tried to
make a test case to show the mistake, I found I could not. So I wrote assertions to restate
what I learned, and removed an unneeded null check and tightened up the code a bit. This
should make code size slightly smaller.
* html/HTMLTableRowsCollection.cpp:
(WebCore::assertRowIsInTable): Added. Asserts that the row's position in the table is consistent
with the invariants of how the collection class works. A row that is processed here would have
to be an immediate child of the table, or an immediate child of a table section that in turn is
an immediate child of the table.
(WebCore::isInSection): Added. Replaces the three more-specific helper functions. Unlike those,
this does not do a null check.
(WebCore::HTMLTableRowsCollection::rowAfter): Changed to use the two new functions.
2013-08-19 Pratik Solanki <psolanki@apple.com>
<https://webkit.org/b/119918> Frame::selection() should return a reference
Reviewed by Darin Adler.
m_selection is never NULL so return a reference from Frame::selection(). Also removed some
unnecessary null checks and assert diff ts exposed as a result.
* accessibility/AccessibilityRenderObject.cpp:
(WebCore::AccessibilityRenderObject::selection):
(WebCore::AccessibilityRenderObject::setSelectedTextRange):
(WebCore::AccessibilityRenderObject::isFocused):
(WebCore::AccessibilityRenderObject::setSelectedVisiblePositionRange):
(WebCore::AccessibilityRenderObject::handleActiveDescendantChanged):
* accessibility/ios/WebAccessibilityObjectWrapperIOS.mm:
(-[WebAccessibilityObjectWrapper accessibilityModifySelection:increase:]):
(-[WebAccessibilityObjectWrapper accessibilityMoveSelectionToMarker:]):
(-[WebAccessibilityObjectWrapper _convertToNSRange:]):
(-[WebAccessibilityObjectWrapper _convertToDOMRange:]):
* accessibility/mac/WebAccessibilityObjectWrapperMac.mm:
(-[WebAccessibilityObjectWrapper accessibilitySetValue:forAttribute:]):
* css/SelectorChecker.cpp:
(WebCore::SelectorChecker::isFrameFocused):
* dom/CharacterData.cpp:
(WebCore::CharacterData::setDataAndUpdate):
* dom/Document.cpp:
(WebCore::Document::nodeChildrenWillBeRemoved):
(WebCore::Document::nodeWillBeRemoved):
* dom/Element.cpp:
(WebCore::Element::updateFocusAppearance):
* editing/AlternativeTextController.cpp:
(WebCore::AlternativeTextController::stopPendingCorrection):
(WebCore::AlternativeTextController::applyAlternativeTextToRange):
(WebCore::AlternativeTextController::applyAutocorrectionBeforeTypingIfAppropriate):
(WebCore::AlternativeTextController::respondToUnappliedSpellCorrection):
(WebCore::AlternativeTextController::timerFired):
(WebCore::AlternativeTextController::respondToChangedSelection):
* editing/DeleteButtonController.cpp:
(WebCore::DeleteButtonController::respondToChangedSelection):
(WebCore::DeleteButtonController::enable):
(WebCore::DeleteButtonController::deleteTarget):
* editing/DeleteSelectionCommand.cpp:
(WebCore::DeleteSelectionCommand::calculateTypingStyleAfterDelete):
* editing/DictationCommand.cpp:
(WebCore::DictationCommand::insertText):
* editing/EditCommand.cpp:
(WebCore::EditCommand::EditCommand):
* editing/EditingStyle.cpp:
(WebCore::EditingStyle::mergeTypingStyle):
* editing/Editor.cpp:
(WebCore::Editor::selectionForCommand):
(WebCore::Editor::canEdit):
(WebCore::Editor::canEditRichly):
(WebCore::Editor::canDHTMLCut):
(WebCore::Editor::canDHTMLCopy):
(WebCore::Editor::canCopy):
(WebCore::Editor::canDelete):
(WebCore::Editor::canSmartCopyOrDelete):
(WebCore::Editor::deleteWithDirection):
(WebCore::Editor::deleteSelectionWithSmartDelete):
(WebCore::Editor::replaceSelectionWithFragment):
(WebCore::Editor::selectedRange):
(WebCore::Editor::tryDHTMLCopy):
(WebCore::Editor::tryDHTMLCut):
(WebCore::Editor::hasBidiSelection):
(WebCore::Editor::selectionUnorderedListState):
(WebCore::Editor::selectionOrderedListState):
(WebCore::Editor::increaseSelectionListLevel):
(WebCore::Editor::increaseSelectionListLevelOrdered):
(WebCore::Editor::increaseSelectionListLevelUnordered):
(WebCore::Editor::decreaseSelectionListLevel):
(WebCore::Editor::findEventTargetFromSelection):
(WebCore::Editor::applyStyle):
(WebCore::Editor::applyParagraphStyle):
(WebCore::Editor::applyStyleToSelection):
(WebCore::Editor::applyParagraphStyleToSelection):
(WebCore::Editor::selectionStartHasStyle):
(WebCore::Editor::selectionHasStyle):
(WebCore::Editor::selectionStartCSSPropertyValue):
(WebCore::Editor::appliedEditing):
(WebCore::Editor::insertTextWithoutSendingTextEvent):
(WebCore::Editor::insertLineBreak):
(WebCore::Editor::insertParagraphSeparator):
(WebCore::Editor::cut):
(WebCore::Editor::copy):
(WebCore::Editor::paste):
(WebCore::Editor::baseWritingDirectionForSelectionStart):
(WebCore::Editor::selectComposition):
(WebCore::Editor::setComposition):
(WebCore::Editor::ignoreSpelling):
(WebCore::Editor::learnSpelling):
(WebCore::Editor::advanceToNextMisspelling):
(WebCore::Editor::misspelledWordAtCaretOrRange):
(WebCore::Editor::isSelectionUngrammatical):
(WebCore::Editor::guessesForMisspelledOrUngrammatical):
(WebCore::Editor::markMisspellingsAfterTypingToWord):
(WebCore::Editor::isSpellCheckingEnabledInFocusedNode):
(WebCore::Editor::markAndReplaceFor):
(WebCore::Editor::updateMarkersForWordsAffectedByEditing):
(WebCore::Editor::revealSelectionAfterEditingOperation):
(WebCore::Editor::getCompositionSelection):
(WebCore::Editor::transpose):
(WebCore::Editor::changeSelectionAfterCommand):
(WebCore::Editor::selectedText):
(WebCore::Editor::computeAndSetTypingStyle):
(WebCore::Editor::findString):
(WebCore::Editor::respondToChangedSelection):
(WebCore::Editor::selectionStartHasMarkerFor):
(WebCore::Editor::toggleOverwriteModeEnabled):
* editing/EditorCommand.cpp:
(WebCore::executeToggleStyleInList):
(WebCore::expandSelectionToGranularity):
(WebCore::stateTextWritingDirection):
(WebCore::executeDelete):
(WebCore::executeDeleteToMark):
(WebCore::executeMoveBackward):
(WebCore::executeMoveBackwardAndModifySelection):
(WebCore::executeMoveDown):
(WebCore::executeMoveDownAndModifySelection):
(WebCore::executeMoveForward):
(WebCore::executeMoveForwardAndModifySelection):
(WebCore::executeMoveLeft):
(WebCore::executeMoveLeftAndModifySelection):
(WebCore::executeMovePageDown):
(WebCore::executeMovePageDownAndModifySelection):
(WebCore::executeMovePageUp):
(WebCore::executeMovePageUpAndModifySelection):
(WebCore::executeMoveRight):
(WebCore::executeMoveRightAndModifySelection):
(WebCore::executeMoveToBeginningOfDocument):
(WebCore::executeMoveToBeginningOfDocumentAndModifySelection):
(WebCore::executeMoveToBeginningOfLine):
(WebCore::executeMoveToBeginningOfLineAndModifySelection):
(WebCore::executeMoveToBeginningOfParagraph):
(WebCore::executeMoveToBeginningOfParagraphAndModifySelection):
(WebCore::executeMoveToBeginningOfSentence):
(WebCore::executeMoveToBeginningOfSentenceAndModifySelection):
(WebCore::executeMoveToEndOfDocument):
(WebCore::executeMoveToEndOfDocumentAndModifySelection):
(WebCore::executeMoveToEndOfSentence):
(WebCore::executeMoveToEndOfSentenceAndModifySelection):
(WebCore::executeMoveToEndOfLine):
(WebCore::executeMoveToEndOfLineAndModifySelection):
(WebCore::executeMoveToEndOfParagraph):
(WebCore::executeMoveToEndOfParagraphAndModifySelection):
(WebCore::executeMoveParagraphBackwardAndModifySelection):
(WebCore::executeMoveParagraphForwardAndModifySelection):
(WebCore::executeMoveUp):
(WebCore::executeMoveUpAndModifySelection):
(WebCore::executeMoveWordBackward):
(WebCore::executeMoveWordBackwardAndModifySelection):
(WebCore::executeMoveWordForward):
(WebCore::executeMoveWordForwardAndModifySelection):
(WebCore::executeMoveWordLeft):
(WebCore::executeMoveWordLeftAndModifySelection):
(WebCore::executeMoveWordRight):
(WebCore::executeMoveWordRightAndModifySelection):
(WebCore::executeMoveToLeftEndOfLine):
(WebCore::executeMoveToLeftEndOfLineAndModifySelection):
(WebCore::executeMoveToRightEndOfLine):
(WebCore::executeMoveToRightEndOfLineAndModifySelection):
(WebCore::executeSelectAll):
(WebCore::executeSelectToMark):
(WebCore::executeSetMark):
(WebCore::executeSwapWithMark):
(WebCore::executeUnselect):
(WebCore::enabledInRichlyEditableText):
(WebCore::enabledRangeInEditableText):
(WebCore::enabledRangeInRichlyEditableText):
(WebCore::valueFormatBlock):
* editing/FrameSelection.cpp:
(WebCore::FrameSelection::setSelection):
(WebCore::FrameSelection::selectFrameElementInParentIfFullySelected):
* editing/InsertLineBreakCommand.cpp:
(WebCore::InsertLineBreakCommand::doApply):
* editing/InsertTextCommand.cpp:
(WebCore::InsertTextCommand::doApply):
* editing/ModifySelectionListLevel.cpp:
(WebCore::IncreaseSelectionListLevelCommand::canIncreaseSelectionListLevel):
(WebCore::DecreaseSelectionListLevelCommand::canDecreaseSelectionListLevel):
* editing/RemoveFormatCommand.cpp:
(WebCore::RemoveFormatCommand::doApply):
* editing/ReplaceSelectionCommand.cpp:
(WebCore::ReplaceSelectionCommand::doApply):
* editing/SetSelectionCommand.cpp:
(WebCore::SetSelectionCommand::doApply):
(WebCore::SetSelectionCommand::doUnapply):
* editing/SpellingCorrectionCommand.cpp:
(WebCore::SpellingCorrectionCommand::doApply):
* editing/TextInsertionBaseCommand.cpp:
(WebCore::TextInsertionBaseCommand::applyTextInsertionCommand):
* editing/TypingCommand.cpp:
(WebCore::TypingCommand::deleteSelection):
(WebCore::TypingCommand::updateSelectionIfDifferentFromCurrentSelection):
(WebCore::TypingCommand::insertText):
(WebCore::TypingCommand::deleteKeyPressed):
(WebCore::TypingCommand::forwardDeleteKeyPressed):
* editing/ios/EditorIOS.mm:
(WebCore::Editor::setTextAlignmentForChangedBaseWritingDirection):
(WebCore::styleForSelectionStart):
(WebCore::Editor::fontForSelection):
* editing/mac/EditorMac.mm:
(WebCore::styleForSelectionStart):
(WebCore::Editor::fontForSelection):
(WebCore::Editor::canCopyExcludingStandaloneImages):
(WebCore::Editor::readSelectionFromPasteboard):
* html/HTMLAnchorElement.cpp:
(WebCore::HTMLAnchorElement::defaultEventHandler):
(WebCore::HTMLAnchorElement::setActive):
* html/HTMLInputElement.cpp:
(WebCore::HTMLInputElement::updateFocusAppearance):
* html/HTMLTextAreaElement.cpp:
(WebCore::HTMLTextAreaElement::updateFocusAppearance):
(WebCore::HTMLTextAreaElement::handleBeforeTextInsertedEvent):
* html/HTMLTextFormControlElement.cpp:
(WebCore::HTMLTextFormControlElement::setSelectionRange):
(WebCore::HTMLTextFormControlElement::computeSelectionStart):
(WebCore::HTMLTextFormControlElement::computeSelectionEnd):
(WebCore::HTMLTextFormControlElement::computeSelectionDirection):
(WebCore::HTMLTextFormControlElement::selectionChanged):
* html/TextFieldInputType.cpp:
(WebCore::TextFieldInputType::handleBeforeTextInsertedEvent):
* loader/FrameLoader.cpp:
(WebCore::FrameLoader::clear):
* loader/archive/cf/LegacyWebArchive.cpp:
(WebCore::LegacyWebArchive::createFromSelection):
* page/ContextMenuController.cpp:
(WebCore::insertUnicodeCharacter):
(WebCore::ContextMenuController::contextMenuItemSelected):
(WebCore::selectionContainsPossibleWord):
(WebCore::ContextMenuController::populate):
(WebCore::ContextMenuController::checkOrEnableIfNeeded):
* page/DOMSelection.cpp:
(WebCore::selectionShadowAncestor):
(WebCore::DOMSelection::visibleSelection):
(WebCore::DOMSelection::isCollapsed):
(WebCore::DOMSelection::type):
(WebCore::DOMSelection::rangeCount):
(WebCore::DOMSelection::collapse):
(WebCore::DOMSelection::collapseToEnd):
(WebCore::DOMSelection::collapseToStart):
(WebCore::DOMSelection::empty):
(WebCore::DOMSelection::setBaseAndExtent):
(WebCore::DOMSelection::setPosition):
(WebCore::DOMSelection::modify):
(WebCore::DOMSelection::extend):
(WebCore::DOMSelection::getRangeAt):
(WebCore::DOMSelection::removeAllRanges):
(WebCore::DOMSelection::addRange):
(WebCore::DOMSelection::deleteFromDocument):
(WebCore::DOMSelection::containsNode):
(WebCore::DOMSelection::toString):
* page/DragController.cpp:
(WebCore::DragController::dragIsMove):
(WebCore::setSelectionToDragCaret):
(WebCore::DragController::concludeEditDrag):
(WebCore::DragController::draggableElement):
(WebCore::selectElement):
(WebCore::dragLocForSelectionDrag):
(WebCore::DragController::startDrag):
* page/DragController.h:
* page/EventHandler.cpp:
(WebCore::setSelectionIfNeeded):
(WebCore::EventHandler::updateSelectionForMouseDownDispatchingSelectStart):
(WebCore::EventHandler::handleMousePressEventDoubleClick):
(WebCore::EventHandler::handleMousePressEventSingleClick):
(WebCore::EventHandler::updateSelectionForMouseDrag):
(WebCore::EventHandler::lostMouseCapture):
(WebCore::EventHandler::handleMouseReleaseEvent):
(WebCore::nodeIsNotBeingEdited):
(WebCore::EventHandler::selectCursor):
(WebCore::EventHandler::handleMousePressEvent):
(WebCore::EventHandler::handleMouseDoubleClickEvent):
(WebCore::EventHandler::dispatchMouseEvent):
(WebCore::EventHandler::sendContextMenuEvent):
(WebCore::EventHandler::sendContextMenuEventForKey):
(WebCore::handleKeyboardSelectionMovement):
(WebCore::EventHandler::handleDrag):
* page/FocusController.cpp:
(WebCore::FocusController::setFocusedFrame):
(WebCore::FocusController::setFocused):
(WebCore::FocusController::advanceFocusInDocumentOrder):
(WebCore::clearSelectionIfNeeded):
(WebCore::FocusController::setActive):
* page/Frame.cpp:
(WebCore::Frame::dragImageForSelection):
* page/Frame.h:
(WebCore::Frame::selection):
* page/FrameView.cpp:
(WebCore::FrameView::performPostLayoutTasks):
(WebCore::FrameView::paintContentsForSnapshot):
* page/Page.cpp:
(WebCore::Page::findString):
(WebCore::Page::findStringMatchingRanges):
(WebCore::Page::selection):
* page/mac/FrameMac.mm:
(WebCore::Frame::dragImageForSelection):
* page/mac/FrameSnapshottingMac.mm:
(WebCore::selectionImage):
* page/win/FrameWin.cpp:
(WebCore::imageFromSelection):
(WebCore::Frame::dragImageForSelection):
* platform/ios/PasteboardIOS.mm:
(WebCore::Pasteboard::documentFragmentForPasteboardItemAtIndex):
* rendering/HitTestResult.cpp:
(WebCore::HitTestResult::isSelected):
* rendering/RenderBlock.cpp:
(WebCore::RenderBlock::paintCaret):
* rendering/RenderImage.cpp:
(WebCore::RenderImage::paintAreaElementFocusRing):
* rendering/RenderLayer.cpp:
(WebCore::RenderLayer::scrollTo):
* rendering/RenderListBox.cpp:
(WebCore::RenderListBox::paintItemForeground):
(WebCore::RenderListBox::paintItemBackground):
* rendering/RenderObject.cpp:
(WebCore::RenderObject::selectionBackgroundColor):
(WebCore::RenderObject::selectionColor):
* rendering/RenderTextControlSingleLine.cpp:
(WebCore::RenderTextControlSingleLine::capsLockStateMayHaveChanged):
* rendering/RenderTheme.cpp:
(WebCore::RenderTheme::isFocused):
* rendering/RenderThemeWin.cpp:
(WebCore::RenderThemeWin::adjustSearchFieldStyle):
* rendering/RenderTreeAsText.cpp:
(WebCore::writeSelection):
* rendering/RenderView.cpp:
(WebCore::RenderView::setSelection):
* svg/SVGSVGElement.cpp:
(WebCore::SVGSVGElement::deselectAll):
* svg/SVGTextContentElement.cpp:
(WebCore::SVGTextContentElement::selectSubString):
* testing/Internals.cpp:
(WebCore::Internals::absoluteCaretBounds):
(WebCore::Internals::selectionBounds):
2013-08-19 Víctor Manuel Jáquez Leal <vjaquez@igalia.com>
<https://webkit.org/b/119679> Remove the cast-align warnings for ARM
Reviewed by Darin Adler.
While compiling WebKitGTK+ for ARM a lot of warnings of this form
where shown (gcc 4.7.3):
../../Source/WebCore/css/StylePropertySet.h: In member function 'const WebCore::StylePropertyMetadata* WebCore::ImmutableStylePropertySet::metadataArray() const':
../../Source/WebCore/css/StylePropertySet.h:179:142: warning: cast from 'const char*' to 'const WebCore::StylePropertyMetadata*' increases required alignment of target type [-Wcast-align]
This patch changes reinterpret_cast<>() for reinterpret_cast_ptr<>()
which is part of WTF for this purpose, silencing the compiler.
* css/StylePropertySet.h:
(WebCore::ImmutableStylePropertySet::metadataArray):
2013-08-19 Antti Koivisto <antti@apple.com>
<https://webkit.org/b/120014> REGRESSION(r154268): Some stylesheet media attribute tests failing
Reviewed by Dan Bernstein.
* html/HTMLStyleElement.cpp:
(WebCore::HTMLStyleElement::parseAttribute): Always set the media on InlineStyleSheetOwner.
2013-08-19 Chris Fleizach <cfleizach@apple.com>
<https://webkit.org/b/119916> AX: WebKit is not exposing AXLanguage correctly
Reviewed by Darin Adler.
Expose the AXLanguage attribute for all objects.
* accessibility/mac/WebAccessibilityObjectWrapperMac.mm:
(-[WebAccessibilityObjectWrapper accessibilityAttributeNames]):
2013-08-19 Brent Fulgham <bfulgham@apple.com>
[Windows] Unreviewed gardening.
* WebCore.vcxproj/WebCore.vcxproj: Add missing header for easy access/editing.
* WebCore.vcxproj/WebCore.vcxproj.filters: Ditto.
2013-08-19 Mario Sanchez Prada <mario.prada@samsung.com>
<https://webkit.org/b/119882> Speed up moving cursor/selection up or down past non-rendered elements.
Reviewed by Darin Adler.
This is a port from Blink originally written by Dominic Mazzoni:
https://src.chromium.org/viewvc/blink?revision=154977&view=revision
From the original commit:
Skips calling firstPositionInOrBeforeNode when a node doesn't have a
renderer, since there couldn't possibly be a visible position there.
This was particularly wasteful when trying to move the cursor up when at
the beginning of a document, as it did a O(n^2) scan through the document head.
Test: editing/execCommand/move-up-down-should-skip-hidden-elements.html
* editing/VisibleUnits.cpp:
(WebCore::previousRootInlineBoxCandidatePosition): Updated.
(WebCore::nextRootInlineBoxCandidatePosition): Updates.
2013-08-19 Andreas Kling <akling@apple.com>
<https://webkit.org/b/120000> Chrome::client() should return a reference.
Reviewed by Antti Koivisto.
Chrome::m_client should never be null.
2013-08-19 Antti Koivisto <antti@apple.com>
<https://webkit.org/b/120004> Rename StyleElement to InlineStyleSheetOwner and stop inheriting from it
Reviewed by Andreas Kling.
Saner names and class relations.
* CMakeLists.txt:
* GNUmakefile.list.am:
* Target.pri:
* WebCore.vcxproj/WebCore.vcxproj:
* WebCore.xcodeproj/project.pbxproj:
* dom/DOMAllInOne.cpp:
* dom/InlineStyleSheetOwner.cpp: Copied from Source/WebCore/dom/StyleElement.cpp.
(WebCore::InlineStyleSheetOwner::InlineStyleSheetOwner):
(WebCore::InlineStyleSheetOwner::~InlineStyleSheetOwner):
(WebCore::InlineStyleSheetOwner::insertedIntoDocument):
(WebCore::InlineStyleSheetOwner::removedFromDocument):
(WebCore::InlineStyleSheetOwner::clearDocumentData):
(WebCore::InlineStyleSheetOwner::childrenChanged):
(WebCore::InlineStyleSheetOwner::finishParsingChildren):
(WebCore::InlineStyleSheetOwner::createSheetFromTextContents):
(WebCore::InlineStyleSheetOwner::clearSheet):
(WebCore::InlineStyleSheetOwner::createSheet):
(WebCore::InlineStyleSheetOwner::isLoading):
(WebCore::InlineStyleSheetOwner::sheetLoaded):
(WebCore::InlineStyleSheetOwner::startLoadingDynamicSheet):
* dom/InlineStyleSheetOwner.h: Copied from Source/WebCore/dom/StyleElement.h.
* dom/StyleElement.cpp: Removed.
* dom/StyleElement.h: Removed.
* html/HTMLStyleElement.cpp:
(WebCore::HTMLStyleElement::HTMLStyleElement):
(WebCore::HTMLStyleElement::~HTMLStyleElement):
(WebCore::HTMLStyleElement::parseAttribute):
(WebCore::HTMLStyleElement::finishParsingChildren):
(WebCore::HTMLStyleElement::insertedInto):
(WebCore::HTMLStyleElement::removedFrom):
(WebCore::HTMLStyleElement::childrenChanged):
* html/HTMLStyleElement.h:
* svg/SVGStyleElement.cpp:
(WebCore::SVGStyleElement::SVGStyleElement):
(WebCore::SVGStyleElement::~SVGStyleElement):
(WebCore::SVGStyleElement::parseAttribute):
(WebCore::SVGStyleElement::finishParsingChildren):
(WebCore::SVGStyleElement::insertedInto):
(WebCore::SVGStyleElement::removedFrom):
(WebCore::SVGStyleElement::childrenChanged):
* svg/SVGStyleElement.h:
2013-08-19 Allan Sandfeld Jensen <allan.jensen@digia.com>
[Qt] QtWebKit (using the Arora browser) displays the border radii (radius) of a button very ugly
https://bugs.webkit.org/show_bug.cgi?id=28113
Reviewed by Jocelyn Turcotte.
StylePainter::init() was called twice making it clobber the previous antialiasing setting.
This patch cleans up the construction so we only have one constructor with init inlined.
* platform/qt/RenderThemeQStyle.cpp:
(WebCore::StylePainterQStyle::StylePainterQStyle):
(WebCore::StylePainterQStyle::setupStyleOption):
* platform/qt/RenderThemeQStyle.h:
* platform/qt/RenderThemeQt.cpp:
(WebCore::StylePainter::StylePainter):
* platform/qt/RenderThemeQt.h:
* platform/qt/RenderThemeQtMobile.cpp:
(WebCore::StylePainterMobile::StylePainterMobile):
2013-08-19 Julien Brianceau <jbrianceau@nds.com>
<https://webkit.org/b/119998> [Qt] Build fix (broken since r154257).
Reviewed by Andreas Kling.
Element::attach() doesn't exist anymore since r154257.
* xml/parser/XMLDocumentParserQt.cpp:
(WebCore::XMLDocumentParser::parseStartElement):
2013-08-19 Antti Koivisto <antti@apple.com>
<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:
2013-08-19 Gyuyoung Kim <gyuyoung.kim@samsung.com>
<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):
2013-08-19 Gyuyoung Kim <gyuyoung.kim@samsung.com>
<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):
2013-08-19 Andreas Kling <akling@apple.com>
<https://webkit.org/b/119997> Page::progress() should return a reference.
Reviewed by Antti Koivisto.
Page::m_progress is never null.
2013-08-18 Darin Adler <darin@apple.com>
<https://webkit.org/b/119989> Make use of Node::ownerDocument a compile time error
Reviewed by Sam Weinig.
* 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.
2013-08-18 Darin Adler <darin@apple.com>
<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.
2013-08-17 Darin Adler <darin@apple.com>
<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.
2013-08-18 David Kilzer <ddkilzer@apple.com>
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.
2013-08-18 Antti Koivisto <antti@apple.com>
<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):
2013-08-18 Antti Koivisto <antti@apple.com>
Fix crashing plugin tests caused by a logic error in the previous patch.
Not reviewed.
* html/HTMLPlugInImageElement.cpp:
(WebCore::HTMLPlugInImageElement::willDetachRenderers):
2013-08-18 Antti Koivisto <antti@apple.com>
<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):
2013-08-18 Gavin Barraclough <barraclough@apple.com>
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).
* 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.
2013-08-18 Ryosuke Niwa <rniwa@webkit.org>
<https://webkit.org/b/119917> Pasting multiple lines into a textarea can introduce extra new lines
Reviewed by Darin Adler.
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):
2013-08-18 Andreas Kling <akling@apple.com>
<https://webkit.org/b/119983> Add two missing RefPtr::release() in HTMLLinkElement.
Reviewed by Antti Koivisto.
* html/HTMLLinkElement.cpp:
(WebCore::HTMLLinkElement::setCSSStyleSheet):
2013-08-18 Andreas Kling <akling@apple.com>
<https://webkit.org/b/119981> Move ElementData & co to their own files.
Reviewed by Antti Koivisto.
I like to move it move it.
2013-08-18 David Kilzer <ddkilzer@apple.com>
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.
2013-08-18 Danilo Cesar Lemes de Paula <danilo.cesar@collabora.co.uk>
[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
Reviewed by Christophe Dumez.
* platform/efl/LocalizedStringsEfl.cpp:
(WebCore::textTrackOffMenuItemText):
2013-08-17 Antti Koivisto <antti@apple.com>
<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.
2013-08-17 Antti Koivisto <antti@apple.com>
<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.
2013-08-17 Antti Koivisto <antti@apple.com>
<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):
2013-08-17 Andreas Kling <akling@apple.com>
<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):
2013-08-17 Andreas Kling <akling@apple.com>
<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):
2013-08-17 Andreas Kling <akling@apple.com>
<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.
2013-08-17 Andreas Kling <akling@apple.com>
<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.
2013-08-16 Antti Koivisto <antti@apple.com>
<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):
2013-08-17 Darin Adler <darin@apple.com>
<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.
2013-08-17 Darin Adler <darin@apple.com>
<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.
2013-08-17 Darin Adler <darin@apple.com>
<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.
2013-08-17 Darin Adler <darin@apple.com>
<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.
2013-08-17 Darin Adler <darin@apple.com>
<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.
2013-08-17 Darin Adler <darin@apple.com>
<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.
2013-08-17 Darin Adler <darin@apple.com>
<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.
2013-08-17 Darin Adler <darin@apple.com>
<https://webkit.org/b/119941> Make Page::dragController return a reference
Reviewed by Andreas Kling.
* 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.
2013-08-17 Morten Stenshorne <mstensho@opera.com>
<https://webkit.org/b/119795> Propagate writing-mode from the first region to the flow thread
Reviewed by Darin Adler.
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):
2013-08-16 Andreas Kling <akling@apple.com>
<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.
2013-08-16 Ryosuke Niwa <rniwa@webkit.org>
<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):
2013-08-16 Benjamin Poulain <benjamin@webkit.org>
Remove a useless #include of SelectorChecker.h
Rubber-stamped by Ryosuke Niwa.
* dom/DocumentStyleSheetCollection.cpp:
2013-08-16 Brent Fulgham <bfulgham@apple.com>
[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.
2013-08-16 Arunprasad Rajkumar <arurajku@cisco.com>
<https://webkit.org/b/119912> Fix WebKit build error when SVG is disabled(broken since r154174)
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:
2013-08-16 Arunprasad Rajkumar <arurajku@cisco.com>
<https://webkit.org/b/119785> Replace currentTime() with monotonicallyIncreasingTime() in WebCore
Reviewed by Alexey Proskuryakov.
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):
2013-08-16 peavo@outlook.com <peavo@outlook.com>
<https://webkit.org/b/119891> [WinCairo] Compile error.
Reviewed by Brent Fulgham.
* rendering/FlowThreadController.cpp: Need USE(ACCELERATED_COMPOSITING) guard.
* rendering/FlowThreadController.h: Need USE(ACCELERATED_COMPOSITING) guard.
2013-08-16 Zan Dobersek <zdobersek@igalia.com>
<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.
2013-08-16 Pratik Solanki <psolanki@apple.com>
<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.
* 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):
2013-08-16 Andreas Kling <akling@apple.com>
Attempt to fix the Qt/MountainLion build after r154142.
* platform/graphics/qt/MediaPlayerPrivateQt.cpp:
(WebCore::MediaPlayerPrivateQt::commitLoad):
2013-08-16 Allan Sandfeld Jensen <allan.jensen@digia.com>
[Qt] Kerning in fast font path breaks letter-spacing
https://bugs.webkit.org/show_bug.cgi?id=119838
Reviewed by Jocelyn Turcotte.
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):
2013-08-16 Andreas Kling <akling@apple.com>
<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()
2013-08-16 Brady Eidson <beidson@apple.com>
(NetworkProcess) Sync XHRs should load using async ResourceHandles, not ResourceHandle::loadResourceSynchronously
https://bugs.webkit.org/show_bug.cgi?id=119493
Reviewed by Alexey Proskuryakov.
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.
2013-08-16 peavo@outlook.com <peavo@outlook.com>
<https://webkit.org/b/119889> [WinCairo] Compile error.
Reviewed by Brent Fulgham.
* platform/network/curl/ResourceHandleManager.cpp:
(WebCore::certificatePath): Use correct function name.
2013-08-16 Brent Fulgham <bfulgham@apple.com>
[Windows] Unreviewed build correction after r154165.
* WebCore.vcxproj/copyForwardingHeaders.cmd: Copy html/shadow header files
to WebKit include location.
2013-08-15 Brent Fulgham <bfulgham@apple.com>
[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
2013-08-16 Andreas Kling <akling@apple.com>
<https://webkit.org/b/119866> Frame::eventHandler() should return a reference.
Reviewed by Anders Carlsson.
Frame::m_eventHandler is never null.
2013-08-16 Commit Queue <commit-queue@webkit.org>
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).
* GNUmakefile.am:
2013-08-16 Danilo Cesar Lemes de Paula <danilo.cesar@collabora.co.uk>
[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
Reviewed by Gustavo Noronha Silva.
* platform/gtk/LocalizedStringsGtk.cpp:
(WebCore::textTrackOffMenuItemText):
2013-08-16 Andrei Parvu <parvu@adobe.com>
[CSS Masking] Add -webkit-mask-source-type property, with auto, alpha and luminance values
https://bugs.webkit.org/show_bug.cgi?id=119614
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.
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.
2013-08-16 Raphael Kubo da Costa <raphael.kubo.da.costa@intel.com>
<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.
2013-08-16 Julien Brianceau <jbrianceau@nds.com>
<https://webkit.org/b/119880> [Qt] Build fix (broken since r154142).
Reviewed by Gyuyoung Kim.
Since r154142, Frame::loader() is a reference (and not a pointer anymore).
* xml/parser/XMLDocumentParserQt.cpp:
(WebCore::XMLDocumentParser::parseStartElement):
2013-08-16 Przemyslaw Szymanski <p.szymanski3@samsung.com>
[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.
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):
2013-08-15 Antti Koivisto <antti@apple.com>
<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):
2013-08-13 Darin Adler <darin@apple.com>
[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.
2013-08-15 Ryuan Choi <ryuan.choi@samsung.com>
[EFL] Unreviewed build fix after r154142 and r154144.
* platform/efl/ErrorsEfl.cpp: Follow the changes of r154142.
(WebCore::printError):
(WebCore::printerNotFoundError):
(WebCore::invalidPageRangeToPrint):
2013-08-15 Hans Muller <hmuller@adobe.com>
[CSS Shapes] Add support for shape-outside image values
https://bugs.webkit.org/show_bug.cgi?id=119809
Added minimal support for shape-outside image values. A new method that computes
the excluded intervals for a horizontal line segment was added to the RasterIntervals
class. The stub RasterShape getExcludedIntervals() method has been replaced by
one that uses the new method.
Image shapes are represented by a RasterIntervals object, which just encapsulates a
Region object. The new getExcludedIntervals() method computes the excluded intervals
for a horizontal line segment between y1 and y2. To find the excluded intervals we
vertically expand each of the image shape Region's rectangles that fall within the line
segment, so that they begin at y1 and have height = y2 - y1. The union of the expanded
rectangles produces a new Region whose horizontal projection defines the excluded intervals.
Reviewed by Alexandru Chiculita.
Tests: fast/shapes/shape-outside-floats/shape-outside-floats-image-001.html
fast/shapes/shape-outside-floats/shape-outside-floats-image-002.html
* rendering/shapes/RasterShape.cpp:
(WebCore::RasterShapeIntervals::getExcludedIntervals): See above.
(WebCore::RasterShape::getExcludedIntervals): Stub method has been replaced by one that uses RasterShapeIntervals::getExcludedIntervals().
* rendering/shapes/RasterShape.h:
* rendering/shapes/ShapeOutsideInfo.cpp:
(WebCore::ShapeOutsideInfo::isEnabledFor): Enable Image valued shapes.
2013-08-15 Simon Fraser <simon.fraser@apple.com>
<https://webkit.org/b/119871> Flash of garbage pixels when playing a show on Hulu
Reviewed by Tim Horton.
When starting a show on Hulu, there's a layer that gets marked as
opaque because it has a child RenderLayer whose background fills the
compositing layer. That child RenderLayer was recently position:fixed
but outside the viewport, so its viewportConstrainedNotCompositedReason
was set to a non-zero value.
However, we failed to clear the viewportConstrainedNotCompositedReason
when the layer became non-fixed. This caused painting the opaque
layer to bail in RenderLayer::paintLayer(), leaving garbage.
Test: compositing/contents-opaque/fixed-to-nonfixed.html
* rendering/RenderLayer.cpp:
(WebCore::RenderLayer::paintLayer): Add an assertion to catch this error in future.
* rendering/RenderLayerCompositor.cpp:
(WebCore::RenderLayerCompositor::updateBacking): Make sure we clear the
ViewportConstrainedNotCompositedReason if the layer is no longer fixed.
2013-08-15 Brent Fulgham <bfulgham@apple.com>
[Windows] Consolidate WebKit Bundle Handling
https://bugs.webkit.org/show_bug.cgi?id=119869
Reviewed by Tim Horton.
* WebCore.vcxproj/WebCore.vcxproj: Add new WebCoreBundleWin files.
* WebCore.vcxproj/WebCore.vcxproj.filters: Ditto.
* platform/network/curl/ResourceHandleManager.cpp:
(WebCore::certificatePath): Use correct bundle handling logic.
* platform/win/LocalizedStringsWin.cpp: Move bundle implementation to
new WebCoreBundleWin.cpp file.
* platform/win/WebCoreBundleWin.cpp: Added.
(WebCore::createWebKitBundle):
(WebCore::webKitBundle):
* platform/win/WebCoreBundleWin.h: Added.
2013-08-15 Anders Carlsson <andersca@apple.com>
<https://webkit.org/b/119859> Frame::loader() should return a reference
Reviewed by Andreas Kling.
* Modules/websockets/WebSocketChannel.cpp:
(WebCore::WebSocketChannel::willOpenSocketStream):
* WebCore.xcodeproj/project.pbxproj:
* accessibility/AccessibilityObject.cpp:
(WebCore::AccessibilityObject::press):
* accessibility/mac/WebAccessibilityObjectWrapperMac.mm:
(-[WebAccessibilityObjectWrapper remoteAccessibilityParentObject]):
* bindings/ScriptControllerBase.cpp:
(WebCore::ScriptController::canExecuteScripts):
* bindings/js/ScriptController.cpp:
(WebCore::ScriptController::initScript):
* css/CSSFontSelector.cpp:
(WebCore::CSSFontSelector::beginLoadTimerFired):
* dom/DOMImplementation.cpp:
(WebCore::DOMImplementation::createDocument):
* dom/Document.cpp:
(WebCore::Document::Document):
(WebCore::Document::setVisualUpdatesAllowed):
(WebCore::Document::updateTitle):
(WebCore::Document::open):
(WebCore::Document::explicitClose):
(WebCore::Document::implicitClose):
(WebCore::Document::userAgent):
(WebCore::Document::canNavigate):
(WebCore::Document::processHttpEquiv):
(WebCore::Document::referrer):
(WebCore::Document::documentDidResumeFromPageCache):
(WebCore::Document::openSearchDescriptionURL):
(WebCore::Document::finishedParsing):
(WebCore::Document::addIconURL):
(WebCore::Document::initSecurityContext):
(WebCore::Document::updateURLForPushOrReplaceState):
(WebCore::Document::loadEventDelayTimerFired):
(WebCore::Document::loader):
(WebCore::Document::decrementActiveParserCount):
* history/CachedFrame.cpp:
(WebCore::CachedFrameBase::CachedFrameBase):
(WebCore::CachedFrameBase::restore):
(WebCore::CachedFrame::CachedFrame):
(WebCore::CachedFrame::open):
(WebCore::CachedFrame::destroy):
* history/PageCache.cpp:
(WebCore::logCanCacheFrameDecision):
(WebCore::logCanCachePageDecision):
(WebCore::PageCache::canCachePageContainingThisFrame):
(WebCore::PageCache::canCache):
* html/HTMLAnchorElement.cpp:
(WebCore::HTMLAnchorElement::handleClick):
* html/HTMLAppletElement.cpp:
(WebCore::HTMLAppletElement::updateWidget):
* html/HTMLElement.cpp:
(WebCore::HTMLElement::rendererIsNeeded):
* html/HTMLEmbedElement.cpp:
(WebCore::HTMLEmbedElement::updateWidget):
* html/HTMLFormElement.cpp:
(WebCore::HTMLFormElement::prepareForSubmission):
(WebCore::HTMLFormElement::submit):
* html/HTMLFrameElementBase.cpp:
(WebCore::HTMLFrameElementBase::openURL):
* html/HTMLFrameOwnerElement.cpp:
(WebCore::HTMLFrameOwnerElement::disconnectContentFrame):
* html/HTMLFrameSetElement.cpp:
(WebCore::HTMLFrameSetElement::insertedInto):
(WebCore::HTMLFrameSetElement::removedFrom):
* html/HTMLHtmlElement.cpp:
(WebCore::HTMLHtmlElement::insertedByParser):
* html/HTMLMediaElement.cpp:
(WebCore::HTMLMediaElement::createRenderer):
(WebCore::HTMLMediaElement::attach):
(WebCore::HTMLMediaElement::loadResource):
(WebCore::HTMLMediaElement::getPluginProxyParams):
(WebCore::HTMLMediaElement::createMediaPlayerProxy):
(WebCore::HTMLMediaElement::updateWidget):
(WebCore::HTMLMediaElement::mediaPlayerReferrer):
(WebCore::HTMLMediaElement::mediaPlayerUserAgent):
* html/HTMLObjectElement.cpp:
(WebCore::HTMLObjectElement::parametersForPlugin):
(WebCore::HTMLObjectElement::updateWidget):
* html/HTMLPlugInImageElement.cpp:
(WebCore::HTMLPlugInImageElement::isImageType):
(WebCore::HTMLPlugInImageElement::wouldLoadAsNetscapePlugin):
(WebCore::HTMLPlugInImageElement::restartSimilarPlugIns):
* html/HTMLVideoElement.cpp:
(WebCore::HTMLVideoElement::setDisplayMode):
* html/ImageDocument.cpp:
(WebCore::ImageDocumentParser::appendBytes):
(WebCore::ImageDocumentParser::finish):
(WebCore::ImageDocument::createDocumentStructure):
* html/MediaDocument.cpp:
(WebCore::MediaDocumentParser::createDocumentStructure):
* html/PluginDocument.cpp:
(WebCore::PluginDocumentParser::createDocumentStructure):
(WebCore::PluginDocumentParser::appendBytes):
(WebCore::PluginDocument::detach):
(WebCore::PluginDocument::cancelManualPluginLoad):
* html/canvas/WebGLRenderingContext.cpp:
(WebCore::WebGLRenderingContext::create):
(WebCore::WebGLRenderingContext::loseContextImpl):
(WebCore::WebGLRenderingContext::maybeRestoreContext):
* html/parser/HTMLConstructionSite.cpp:
(WebCore::HTMLConstructionSite::dispatchDocumentElementAvailableIfNeeded):
(WebCore::HTMLConstructionSite::insertHTMLBodyElement):
* html/parser/HTMLParserOptions.cpp:
(WebCore::HTMLParserOptions::HTMLParserOptions):
* html/parser/XSSAuditor.cpp:
(WebCore::XSSAuditor::init):
* html/parser/XSSAuditorDelegate.cpp:
(WebCore::XSSAuditorDelegate::generateViolationReport):
(WebCore::XSSAuditorDelegate::didBlockScript):
* inspector/InspectorApplicationCacheAgent.cpp:
(WebCore::InspectorApplicationCacheAgent::updateApplicationCacheStatus):
(WebCore::InspectorApplicationCacheAgent::getFramesWithManifests):
* inspector/InspectorFrontendClientLocal.cpp:
(WebCore::InspectorFrontendClientLocal::openInNewTab):
* inspector/InspectorFrontendHost.cpp:
(WebCore::InspectorFrontendHost::loadResourceSynchronously):
* inspector/InspectorOverlay.cpp:
(WebCore::InspectorOverlay::overlayPage):
* inspector/InspectorPageAgent.cpp:
(WebCore::InspectorPageAgent::mainResourceContent):
(WebCore::InspectorPageAgent::reload):
(WebCore::InspectorPageAgent::navigate):
(WebCore::allResourcesURLsForFrame):
(WebCore::InspectorPageAgent::searchInResource):
(WebCore::InspectorPageAgent::assertDocumentLoader):
(WebCore::InspectorPageAgent::buildObjectForFrame):
* inspector/InspectorResourceAgent.cpp:
(WebCore::InspectorResourceAgent::didFailLoading):
* loader/CookieJar.cpp:
(WebCore::networkingContext):
* loader/DocumentLoader.cpp:
(WebCore::DocumentLoader::frameLoader):
(WebCore::DocumentLoader::document):
(WebCore::DocumentLoader::stopLoading):
(WebCore::DocumentLoader::removeSubresourceLoader):
(WebCore::DocumentLoader::subresourceLoaderFinishedLoadingOnePart):
(WebCore::DocumentLoader::iconLoadDecisionAvailable):
(WebCore::DocumentLoader::continueIconLoadWithDecision):
* loader/DocumentThreadableLoader.cpp:
(WebCore::DocumentThreadableLoader::didReceiveResponse):
(WebCore::DocumentThreadableLoader::didFinishLoading):
(WebCore::DocumentThreadableLoader::didFail):
(WebCore::DocumentThreadableLoader::preflightFailure):
(WebCore::DocumentThreadableLoader::loadRequest):
* loader/DocumentWriter.cpp:
(WebCore::DocumentWriter::replaceDocument):
(WebCore::DocumentWriter::createDocument):
(WebCore::DocumentWriter::begin):
* loader/FrameLoader.cpp:
(WebCore::FrameLoader::~FrameLoader):
(WebCore::FrameLoader::allChildrenAreComplete):
(WebCore::FrameLoader::allAncestorsAreComplete):
(WebCore::FrameLoader::loadURLIntoChildFrame):
(WebCore::FrameLoader::outgoingReferrer):
(WebCore::FrameLoader::setOpener):
(WebCore::FrameLoader::completed):
(WebCore::FrameLoader::started):
(WebCore::FrameLoader::loadFrameRequest):
(WebCore::FrameLoader::loadURL):
(WebCore::FrameLoader::load):
(WebCore::FrameLoader::loadWithDocumentLoader):
(WebCore::FrameLoader::stopAllLoaders):
(WebCore::FrameLoader::closeOldDataSources):
(WebCore::FrameLoader::subframeIsLoading):
(WebCore::FrameLoader::subresourceCachePolicy):
(WebCore::FrameLoader::checkLoadCompleteForThisFrame):
(WebCore::FrameLoader::detachChildren):
(WebCore::FrameLoader::checkLoadComplete):
(WebCore::FrameLoader::detachFromParent):
(WebCore::FrameLoader::loadPostRequest):
(WebCore::FrameLoader::loadResourceSynchronously):
(WebCore::FrameLoader::shouldClose):
(WebCore::FrameLoader::handleBeforeUnloadEvent):
(WebCore::FrameLoader::continueLoadAfterNavigationPolicy):
(WebCore::FrameLoader::continueLoadAfterNewWindowPolicy):
(WebCore::createWindow):
* loader/HistoryController.cpp:
(WebCore::HistoryController::saveScrollPositionAndViewStateToItem):
(WebCore::HistoryController::restoreScrollPositionAndViewState):
(WebCore::HistoryController::saveDocumentState):
(WebCore::HistoryController::saveDocumentAndScrollState):
(WebCore::isAssociatedToRequestedHistoryItem):
(WebCore::HistoryController::restoreDocumentState):
(WebCore::HistoryController::shouldStopLoadingForHistoryItem):
(WebCore::HistoryController::goToItem):
(WebCore::HistoryController::updateForBackForwardNavigation):
(WebCore::HistoryController::updateForReload):
(WebCore::HistoryController::updateForStandardLoad):
(WebCore::HistoryController::updateForRedirectWithLockedBackForwardList):
(WebCore::HistoryController::updateForClientRedirect):
(WebCore::HistoryController::updateForCommit):
(WebCore::HistoryController::recursiveUpdateForCommit):
(WebCore::HistoryController::updateForSameDocumentNavigation):
(WebCore::HistoryController::recursiveUpdateForSameDocumentNavigation):
(WebCore::HistoryController::initializeItem):
(WebCore::HistoryController::createItemTree):
(WebCore::HistoryController::recursiveSetProvisionalItem):
(WebCore::HistoryController::recursiveGoToItem):
(WebCore::HistoryController::updateBackForwardListClippedAtTarget):
(WebCore::HistoryController::updateCurrentItem):
(WebCore::HistoryController::pushState):
(WebCore::HistoryController::replaceState):
* loader/ImageLoader.cpp:
(WebCore::pageIsBeingDismissed):
* loader/MixedContentChecker.cpp:
(WebCore::MixedContentChecker::client):
* loader/NavigationScheduler.cpp:
(WebCore::ScheduledURLNavigation::fire):
(WebCore::ScheduledURLNavigation::didStartTimer):
(WebCore::ScheduledURLNavigation::didStopTimer):
(WebCore::ScheduledRedirect::shouldStartTimer):
(WebCore::ScheduledRedirect::fire):
(WebCore::ScheduledRefresh::fire):
(WebCore::ScheduledHistoryNavigation::fire):
(WebCore::ScheduledFormSubmission::fire):
(WebCore::ScheduledFormSubmission::didStartTimer):
(WebCore::ScheduledFormSubmission::didStopTimer):
(WebCore::NavigationScheduler::mustLockBackForwardList):
(WebCore::NavigationScheduler::scheduleLocationChange):
(WebCore::NavigationScheduler::scheduleFormSubmission):
(WebCore::NavigationScheduler::scheduleRefresh):
(WebCore::NavigationScheduler::schedule):
* loader/PingLoader.cpp:
(WebCore::PingLoader::loadImage):
(WebCore::PingLoader::sendPing):
(WebCore::PingLoader::sendViolationReport):
(WebCore::PingLoader::PingLoader):
* loader/PolicyChecker.cpp:
(WebCore::PolicyChecker::checkNavigationPolicy):
(WebCore::PolicyChecker::checkNewWindowPolicy):
(WebCore::PolicyChecker::checkContentPolicy):
(WebCore::PolicyChecker::cancelCheck):
(WebCore::PolicyChecker::stopCheck):
(WebCore::PolicyChecker::cannotShowMIMEType):
(WebCore::PolicyChecker::continueLoadAfterWillSubmitForm):
(WebCore::PolicyChecker::continueAfterNavigationPolicy):
(WebCore::PolicyChecker::continueAfterNewWindowPolicy):
(WebCore::PolicyChecker::handleUnimplementablePolicy):
* loader/ProgressTracker.cpp:
(WebCore::ProgressTracker::progressStarted):
(WebCore::ProgressTracker::progressCompleted):
(WebCore::ProgressTracker::finalProgressComplete):
(WebCore::ProgressTracker::incrementProgress):
(WebCore::ProgressTracker::progressHeartbeatTimerFired):
* loader/ResourceLoadNotifier.cpp:
(WebCore::ResourceLoadNotifier::didReceiveAuthenticationChallenge):
(WebCore::ResourceLoadNotifier::didCancelAuthenticationChallenge):
(WebCore::ResourceLoadNotifier::willSendRequest):
(WebCore::ResourceLoadNotifier::didFailToLoad):
(WebCore::ResourceLoadNotifier::assignIdentifierToInitialRequest):
(WebCore::ResourceLoadNotifier::dispatchWillSendRequest):
(WebCore::ResourceLoadNotifier::dispatchDidReceiveResponse):
(WebCore::ResourceLoadNotifier::dispatchDidReceiveData):
(WebCore::ResourceLoadNotifier::dispatchDidFinishLoading):
(WebCore::ResourceLoadNotifier::dispatchDidFailLoading):
* loader/ResourceLoader.cpp:
(WebCore::ResourceLoader::ResourceLoader):
(WebCore::ResourceLoader::start):
(WebCore::ResourceLoader::frameLoader):
(WebCore::ResourceLoader::willSendRequest):
* loader/SubframeLoader.cpp:
(WebCore::SubframeLoader::pluginIsLoadable):
(WebCore::SubframeLoader::loadMediaPlayerProxyPlugin):
(WebCore::SubframeLoader::createJavaAppletWidget):
(WebCore::SubframeLoader::loadOrRedirectSubframe):
(WebCore::SubframeLoader::loadSubframe):
(WebCore::SubframeLoader::allowPlugins):
(WebCore::SubframeLoader::shouldUsePlugin):
(WebCore::SubframeLoader::loadPlugin):
* loader/appcache/ApplicationCacheGroup.cpp:
(WebCore::ApplicationCacheGroup::selectCache):
(WebCore::ApplicationCacheGroup::selectCacheWithoutManifestURL):
(WebCore::ApplicationCacheGroup::update):
(WebCore::ApplicationCacheGroup::createResourceHandle):
(WebCore::ApplicationCacheGroup::didReceiveResponse):
(WebCore::ApplicationCacheGroup::didFinishLoading):
(WebCore::ApplicationCacheGroup::didFail):
(WebCore::ApplicationCacheGroup::addEntry):
(WebCore::CallCacheListenerTask::performTask):
(WebCore::ApplicationCacheGroup::postListenerTask):
* loader/appcache/DOMApplicationCache.cpp:
(WebCore::DOMApplicationCache::applicationCacheHost):
* loader/archive/cf/LegacyWebArchive.cpp:
(WebCore::LegacyWebArchive::create):
(WebCore::LegacyWebArchive::createFromSelection):
* loader/cache/CachedResource.cpp:
(WebCore::CachedResource::addAdditionalRequestHeaders):
(WebCore::CachedResource::load):
* loader/cache/CachedResourceLoader.cpp:
(WebCore::CachedResourceLoader::requestImage):
(WebCore::CachedResourceLoader::checkInsecureContent):
(WebCore::CachedResourceLoader::canRequest):
(WebCore::CachedResourceLoader::shouldContinueAfterNotifyingLoadedFromMemoryCache):
(WebCore::CachedResourceLoader::requestResource):
(WebCore::CachedResourceLoader::clientDefersImage):
(WebCore::CachedResourceLoader::cachePolicy):
(WebCore::CachedResourceLoader::loadDone):
* loader/icon/IconController.cpp:
(WebCore::IconController::commitToDatabase):
(WebCore::IconController::startLoader):
(WebCore::IconController::continueLoadWithDecision):
* loader/icon/IconLoader.cpp:
(WebCore::IconLoader::startLoading):
(WebCore::IconLoader::notifyFinished):
* page/Chrome.cpp:
(WebCore::canRunModalIfDuringPageDismissal):
* page/ContextMenuController.cpp:
(WebCore::openNewWindow):
(WebCore::ContextMenuController::contextMenuItemSelected):
(WebCore::ContextMenuController::populate):
(WebCore::ContextMenuController::checkOrEnableIfNeeded):
* page/DOMWindow.cpp:
(WebCore::DOMWindow::dispatchAllPendingBeforeUnloadEvents):
(WebCore::DOMWindow::postMessageTimerFired):
(WebCore::DOMWindow::close):
(WebCore::DOMWindow::print):
(WebCore::DOMWindow::stop):
(WebCore::DOMWindow::setName):
(WebCore::DOMWindow::opener):
(WebCore::DOMWindow::dispatchLoadEvent):
(WebCore::DOMWindow::setLocation):
(WebCore::DOMWindow::createWindow):
(WebCore::DOMWindow::open):
* page/DOMWindowExtension.cpp:
(WebCore::DOMWindowExtension::disconnectFrameForPageCache):
(WebCore::DOMWindowExtension::reconnectFrameFromPageCache):
(WebCore::DOMWindowExtension::willDestroyGlobalObjectInCachedFrame):
(WebCore::DOMWindowExtension::willDestroyGlobalObjectInFrame):
(WebCore::DOMWindowExtension::willDetachGlobalObjectFromFrame):
* page/DragController.cpp:
(WebCore::DragController::performDrag):
* page/EventHandler.cpp:
(WebCore::EventHandler::handleMousePressEvent):
(WebCore::EventHandler::keyEvent):
* page/Frame.cpp:
(WebCore::Frame::~Frame):
(WebCore::Frame::setView):
(WebCore::Frame::injectUserScripts):
(WebCore::Frame::willDetachPage):
* page/Frame.h:
(WebCore::Frame::loader):
* page/FrameView.cpp:
(WebCore::FrameView::mediaType):
(WebCore::FrameView::setFixedVisibleContentRect):
(WebCore::FrameView::shouldUseLoadTimeDeferredRepaintDelay):
(WebCore::FrameView::performPostLayoutTasks):
(WebCore::FrameView::autoSizeIfEnabled):
(WebCore::FrameView::scrollTo):
(WebCore::FrameView::shouldSuspendScrollAnimations):
(WebCore::FrameView::qualifiesAsVisuallyNonEmpty):
(WebCore::FrameView::wheelEvent):
(WebCore::FrameView::firePaintRelatedMilestones):
* page/History.cpp:
(WebCore::History::stateInternal):
(WebCore::History::stateObjectAdded):
* page/Location.cpp:
(WebCore::Location::setLocation):
* page/Navigator.cpp:
(WebCore::Navigator::userAgent):
* page/Page.cpp:
(WebCore::Page::goToItem):
(WebCore::Page::refreshPlugins):
(WebCore::Page::setDefersLoading):
(WebCore::Page::setMemoryCacheClientCallsEnabled):
(WebCore::Page::addRelevantRepaintedObject):
* page/Performance.cpp:
(WebCore::Performance::now):
* page/PerformanceNavigation.cpp:
(WebCore::PerformanceNavigation::type):
(WebCore::PerformanceNavigation::redirectCount):
* page/PerformanceResourceTiming.cpp:
(WebCore::monotonicTimeToDocumentMilliseconds):
* page/mac/PageMac.cpp:
(WebCore::Page::addSchedulePair):
(WebCore::Page::removeSchedulePair):
* platform/ios/PasteboardIOS.mm:
(WebCore::documentFragmentWithImageResource):
(WebCore::documentFragmentWithRTF):
(WebCore::Pasteboard::documentFragmentForPasteboardItemAtIndex):
* platform/mac/HTMLConverter.mm:
(-[WebHTMLConverter _addAttachmentForElement:URL:needsParagraph:usePlaceholder:]):
(-[WebHTMLConverter _loadFromDOMRange]):
* platform/mac/PasteboardMac.mm:
(WebCore::documentFragmentWithImageResource):
(WebCore::documentFragmentWithRTF):
(WebCore::fragmentFromWebArchive):
* plugins/DOMMimeType.cpp:
(WebCore::DOMMimeType::enabledPlugin):
* rendering/RenderLayer.cpp:
(WebCore::RenderLayer::scrollTo):
* svg/SVGAElement.cpp:
(WebCore::SVGAElement::defaultEventHandler):
* svg/graphics/SVGImage.cpp:
(WebCore::SVGImage::~SVGImage):
(WebCore::SVGImage::dataChanged):
* testing/Internals.cpp:
(WebCore::Internals::formControlStateOfPreviousHistoryItem):
(WebCore::Internals::setFormControlStateOfPreviousHistoryItem):
(WebCore::Internals::getReferencedFilePaths):
(WebCore::Internals::forceReload):
* xml/XSLTProcessorLibxslt.cpp:
(WebCore::docLoaderFunc):
* xml/parser/XMLDocumentParserLibxml2.cpp:
(WebCore::openFunc):
(WebCore::XMLDocumentParser::startElementNs):
2013-08-15 Daniel Bates <dabates@apple.com>
<https://webkit.org/b/119863> [iOS] Upstream WebCore/editing/ios
Reviewed by David Kilzer.
Use the same UUIDs for EditorIOS.mm and the group ios as in the iOS tree
so as to make it straightforward to merge changes to the WebCore Xcode
project file on WebKit.org with changes to the same file in the iOS tree.
* WebCore.xcodeproj/project.pbxproj:
2013-08-15 Brent Fulgham <bfulgham@apple.com>
[Windows] Unreviewed build fix after r15417.
* DerivedSources.cpp: Remove classes that now live in JSC.
* WebCore.vcxproj/WebCore.vcxproj: Remove classes no longer included in WebCore.
* WebCore.vcxproj/WebCore.vcxproj.filters: Ditto.
* bindings/js/WebCoreTypedArrayController.cpp: Add explicit namespace to avoid conflict
with Windows 'Unknown' type.
(WebCore::WebCoreTypedArrayController::JSArrayBufferOwner::isReachableFromOpaqueRoots):
(WebCore::WebCoreTypedArrayController::JSArrayBufferOwner::finalize):
2013-08-15 Daniel Bates <dabates@apple.com>
<https://webkit.org/b/119863> [iOS] Upstream WebCore/editing/ios
Reviewed by David Kilzer.
* WebCore.xcodeproj/project.pbxproj:
* editing/ios/EditorIOS.mm: Added.
(WebCore::Editor::newGeneralClipboard):
(WebCore::Editor::showFontPanel):
(WebCore::Editor::showStylesPanel):
(WebCore::Editor::showColorPanel):
(WebCore::Editor::setTextAlignmentForChangedBaseWritingDirection):
(WebCore::Editor::insertParagraphSeparatorInQuotedContent):
(WebCore::styleForSelectionStart):
(WebCore::Editor::fontForSelection):
(WebCore::Editor::fontAttributesForSelectionStart):
(WebCore::Editor::removeUnchangeableStyles):
2013-08-15 Dirk Schulze <krit@webkit.org>
Implement CSS Image filter() function
https://bugs.webkit.org/show_bug.cgi?id=119845
Reviewed by Dean Jackson.
The Filter Effects specification defines a new CSS Image function called
filter(). This function takes another CSS Image as well as a filter function
list as input and can be used by various CSS properties.
Example:
background-image: -webkit-filter(url(image.png), brightness(0.5))
This patch implements the current definition of filter() based on other
image generation classes like CSSCrossfadeValue.
A new class called CSSFilterImageValue was added together with an
image observer.
The function is implemented prefixed and behind the compiler flag CSS_FILTERS.
Tests: fast/filter-image/filter-image.html
fast/filter-image/parse-filter-image.html
* CMakeLists.txt: Added new files to build systems.
* GNUmakefile.list.am:
* Target.pri:
* WebCore.vcxproj/WebCore.vcxproj:
* WebCore.xcodeproj/project.pbxproj:
* css/CSSAllInOne.cpp:
* css/CSSCrossfadeValue.cpp: Share code together with CSSFilterImageValue
in CSSImageGeneratorValue.cpp.
(WebCore::CSSCrossfadeValue::isPending):
(WebCore::CSSCrossfadeValue::loadSubimages):
* css/CSSFilterImageValue.cpp: Added.
(WebCore::CSSFilterImageValue::~CSSFilterImageValue):
(WebCore::CSSFilterImageValue::customCssText):
(WebCore::CSSFilterImageValue::fixedSize):
(WebCore::CSSFilterImageValue::isPending):
(WebCore::CSSFilterImageValue::knownToBeOpaque):
(WebCore::CSSFilterImageValue::loadSubimages):
(WebCore::CSSFilterImageValue::image):
(WebCore::CSSFilterImageValue::filterImageChanged):
(WebCore::CSSFilterImageValue::createFilterOperations):
(WebCore::CSSFilterImageValue::FilterSubimageObserverProxy::imageChanged):
(WebCore::CSSFilterImageValue::hasFailedOrCanceledSubresources):
(WebCore::CSSFilterImageValue::equals):
* css/CSSFilterImageValue.h: Added.
(WebCore::CSSFilterImageValue::create):
(WebCore::CSSFilterImageValue::isFixedSize):
(WebCore::CSSFilterImageValue::CSSFilterImageValue):
(WebCore::CSSFilterImageValue::FilterSubimageObserverProxy::FilterSubimageObserverProxy):
(WebCore::CSSFilterImageValue::FilterSubimageObserverProxy::~FilterSubimageObserverProxy):
(WebCore::CSSFilterImageValue::FilterSubimageObserverProxy::setReady):
* css/CSSImageGeneratorValue.cpp: Shared code between CSSCrossfadeValue and
CSSFilterImageValue.
(WebCore::CSSImageGeneratorValue::image):
(WebCore::CSSImageGeneratorValue::isFixedSize):
(WebCore::CSSImageGeneratorValue::fixedSize):
(WebCore::CSSImageGeneratorValue::isPending):
(WebCore::CSSImageGeneratorValue::knownToBeOpaque):
(WebCore::CSSImageGeneratorValue::loadSubimages):
(WebCore::CSSImageGeneratorValue::subimageIsPending):
(WebCore::CSSImageGeneratorValue::cachedImageForCSSValue):
* css/CSSImageGeneratorValue.h:
* css/CSSParser.cpp: Added parsing information for new image function.
(WebCore::CSSParser::parseValue):
(WebCore::CSSParser::isGeneratedImageValue):
(WebCore::CSSParser::parseGeneratedImage):
(WebCore::CSSParser::parseFilterImage):
(WebCore::CSSParser::parseFilter):
* css/CSSParser.h:
* css/CSSValue.cpp:
(WebCore::CSSValue::hasFailedOrCanceledSubresources):
(WebCore::CSSValue::equals):
(WebCore::CSSValue::cssText):
(WebCore::CSSValue::destroy):
* css/CSSValue.h:
(WebCore::CSSValue::isFilterImageValue):
* css/StyleResolver.cpp:
(WebCore::StyleResolver::applyProperty):
(WebCore::StyleResolver::generatedOrPendingFromValue):
(WebCore::StyleResolver::createFilterOperations):
* css/StyleResolver.h: StyleResolver needs to be passed to
CSSFilterImageValue in order to resolve blur() and
drop-shadow() function. Both needs to be resolved together
with all other properties and can't be done earlier or later.
* rendering/FilterEffectRenderer.cpp:
(WebCore::FilterEffectRenderer::build): Pass an argument whether the
intermediate filter results should be clipped or not. The filter
property for instance doesn't clip but scales the intermediate
image sizes.
* rendering/FilterEffectRenderer.h:
2013-08-15 Filip Pizlo <fpizlo@apple.com>
Unreviewed, fix bindings tests after http://trac.webkit.org/changeset/154127
* bindings/scripts/test/JS/JSTestCallback.cpp:
(WebCore::JSTestCallback::callbackWithArrayParam):
* bindings/scripts/test/JS/JSTestCallback.h:
* bindings/scripts/test/JS/JSTestObj.cpp:
(WebCore::setJSTestObjTypedArrayAttr):
* bindings/scripts/test/JS/JSTestOverloadedConstructors.cpp:
(WebCore::JSTestOverloadedConstructorsConstructor::constructJSTestOverloadedConstructors2):
* bindings/scripts/test/JS/JSTestTypedefs.cpp:
(WebCore::jsTestTypedefsPrototypeFunctionFunc):
* bindings/scripts/test/ObjC/DOMFloat64Array.mm:
* bindings/scripts/test/ObjC/DOMTestCallback.mm:
* bindings/scripts/test/TestTypedArray.idl: Removed.
2013-08-15 Ryosuke Niwa <rniwa@webkit.org>
Qt minimum build fix after r154116.
* page/FrameView.cpp:
(WebCore::FrameView::sendResizeEventIfNeeded):
2013-08-14 Filip Pizlo <fpizlo@apple.com>
Typed arrays should be rewritten
https://bugs.webkit.org/show_bug.cgi?id=119064
Reviewed by Oliver Hunt.
Typed arrays are now implemented in JavaScriptCore, and WebCore is merely a
client of them. There is only one layering violation: WebCore installs a
WebCoreTypedArrayController on VM, which makes the
ArrayBuffer<->JSArrayBuffer relationship resemble DOM wrappers. By default,
JSC makes the ownership go one way; the JSArrayBuffer keeps the ArrayBuffer
alive but if ArrayBuffer is kept alive from native code then the
JSArrayByffer may die. WebCoreTypedArrayController will keep the
JSArrayBuffer alive if the ArrayBuffer is in the opaque root set.
To make non-JSDOMWrappers behave like DOM wrappers, a bunch of code is
changed to make most references to wrappers refer to JSObject* rather than
JSDOMWrapper*.
Array buffer views are now transient; the JS array buffer view wrappers
don't own them or keep them alive. This required a bunch of changes to make
bindings code use RefPtr<ArrayBufferView> to hold onto their views.
Also there is a bunch of new code to make JSC-provided array buffers and
views obey the toJS/to<ClassName> idiom for wrapping and unwrapping.
Finally, the DataView API is now completely different: the JSDataView
provides the same user-visible JS API but using its own internal magic; the
C++ code that uses DataView now uses a rather different API that is not
aware of usual DOM semantics, since it's in JSC and not WebCore. It's
equally useful for all of WebCore's purposes, but some code had to change
to adapt the new conventions.
Some tests have been changed or rebased due to changes in behavior, that
bring us into conformance with where the standards are going and allow us to
match Firefox behavior.
Automake work and some additional GTK changes courtesy of
Zan Dobersek <zdobersek@igalia.com>.
Additional Qt changes courtesy of Arunprasad Rajkumar <arurajku@cisco.com>.
* CMakeLists.txt:
* DerivedSources.make:
* ForwardingHeaders/runtime/DataView.h: Added.
* ForwardingHeaders/runtime/JSArrayBuffer.h: Added.
* ForwardingHeaders/runtime/JSArrayBufferView.h: Added.
* ForwardingHeaders/runtime/JSDataView.h: Added.
* ForwardingHeaders/runtime/JSTypedArrays.h: Added.
* ForwardingHeaders/runtime/TypedArrayController.h: Added.
* ForwardingHeaders/runtime/TypedArrayInlines.h: Added.
* ForwardingHeaders/runtime/TypedArrays.h: Added.
* GNUmakefile.list.am:
* Modules/webaudio/RealtimeAnalyser.h:
* Target.pri:
* UseJSC.cmake:
* WebCore.exp.in:
* WebCore.vcxproj/WebCore.vcxproj:
* WebCore.xcodeproj/project.pbxproj:
* bindings/js/DOMWrapperWorld.h:
* bindings/js/JSArrayBufferCustom.cpp: Removed.
* bindings/js/JSArrayBufferViewHelper.h: Removed.
* bindings/js/JSAudioContextCustom.cpp:
* bindings/js/JSBindingsAllInOne.cpp:
* bindings/js/JSBlobCustom.cpp:
* bindings/js/JSCSSRuleCustom.cpp:
(WebCore::toJS):
* bindings/js/JSCSSValueCustom.cpp:
(WebCore::toJS):
* bindings/js/JSCryptoCustom.cpp:
(WebCore::JSCrypto::getRandomValues):
* bindings/js/JSDOMBinding.h:
(WebCore::wrapperOwner):
(WebCore::wrapperContext):
(WebCore::getInlineCachedWrapper):
(WebCore::setInlineCachedWrapper):
(WebCore::clearInlineCachedWrapper):
(WebCore::getCachedWrapper):
(WebCore::cacheWrapper):
(WebCore::uncacheWrapper):
(WebCore::wrap):
(WebCore::toJS):
(WebCore::toArrayBufferView):
(WebCore::toInt8Array):
(WebCore::toInt16Array):
(WebCore::toInt32Array):
(WebCore::toUint8Array):
(WebCore::toUint8ClampedArray):
(WebCore::toUint16Array):
(WebCore::toUint32Array):
(WebCore::toFloat32Array):
(WebCore::toFloat64Array):
(WebCore::toDataView):
* bindings/js/JSDataViewCustom.cpp: Removed.
* bindings/js/JSDictionary.cpp:
* bindings/js/JSDictionary.h:
* bindings/js/JSDocumentCustom.cpp:
(WebCore::JSDocument::location):
(WebCore::toJS):
* bindings/js/JSEventCustom.cpp:
(WebCore::toJS):
* bindings/js/JSFileReaderCustom.cpp:
* bindings/js/JSHTMLCollectionCustom.cpp:
(WebCore::toJS):
* bindings/js/JSHTMLTemplateElementCustom.cpp:
(WebCore::JSHTMLTemplateElement::content):
* bindings/js/JSImageDataCustom.cpp:
(WebCore::toJS):
* bindings/js/JSInjectedScriptHostCustom.cpp:
* bindings/js/JSMessageEventCustom.cpp:
* bindings/js/JSMessagePortCustom.cpp:
* bindings/js/JSSVGPathSegCustom.cpp:
(WebCore::toJS):
* bindings/js/JSStyleSheetCustom.cpp:
(WebCore::toJS):
* bindings/js/JSTrackCustom.cpp:
(WebCore::toJS):
* bindings/js/JSWebGLRenderingContextCustom.cpp:
* bindings/js/JSXMLHttpRequestCustom.cpp:
(WebCore::JSXMLHttpRequest::send):
* bindings/js/SerializedScriptValue.cpp:
(WebCore::SerializedScriptValue::transferArrayBuffers):
* bindings/js/WebCoreJSClientData.h:
(WebCore::initNormalWorldClientData):
* bindings/js/WebCoreTypedArrayController.cpp: Added.
(WebCore::WebCoreTypedArrayController::WebCoreTypedArrayController):
(WebCore::WebCoreTypedArrayController::~WebCoreTypedArrayController):
(WebCore::WebCoreTypedArrayController::toJS):
(WebCore::WebCoreTypedArrayController::JSArrayBufferOwner::isReachableFromOpaqueRoots):
(WebCore::WebCoreTypedArrayController::JSArrayBufferOwner::finalize):
* bindings/js/WebCoreTypedArrayController.h: Added.
(WebCore::WebCoreTypedArrayController::wrapperOwner):
* bindings/scripts/CodeGenerator.pm:
(ForAllParents):
(ParseInterface):
(SkipIncludeHeader):
(IsTypedArrayType):
(IsWrapperType):
* bindings/scripts/CodeGeneratorJS.pm:
(AddIncludesForType):
(GenerateHeader):
(GenerateImplementation):
(GenerateParametersCheck):
(GetNativeType):
(JSValueToNative):
(NativeToJSValue):
(GenerateConstructorDefinition):
(GenerateConstructorHelperMethods):
* fileapi/WebKitBlobBuilder.cpp:
(WebCore::BlobBuilder::append):
* fileapi/WebKitBlobBuilder.h:
* html/canvas/ArrayBuffer.idl: Removed.
* html/canvas/ArrayBufferView.idl: Removed.
* html/canvas/DataView.cpp: Removed.
* html/canvas/DataView.h: Removed.
* html/canvas/DataView.idl: Removed.
* html/canvas/Float32Array.idl: Removed.
* html/canvas/Float64Array.idl: Removed.
* html/canvas/Int16Array.idl: Removed.
* html/canvas/Int32Array.idl: Removed.
* html/canvas/Int8Array.idl: Removed.
* html/canvas/Uint16Array.idl: Removed.
* html/canvas/Uint32Array.idl: Removed.
* html/canvas/Uint8Array.idl: Removed.
* html/canvas/Uint8ClampedArray.idl: Removed.
* html/canvas/WebGLRenderingContext.cpp:
(WebCore::WebGLRenderingContext::readPixels):
(WebCore::WebGLRenderingContext::validateTexFuncData):
* page/Crypto.cpp:
* platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
(WebCore::MediaPlayerPrivateAVFoundationObjC::shouldWaitForLoadingOfResource):
(WebCore::MediaPlayerPrivateAVFoundationObjC::extractKeyURIKeyIDAndCertificateFromInitData):
* platform/graphics/filters/FECustomFilter.h:
* platform/graphics/filters/FEGaussianBlur.cpp:
* platform/graphics/filters/FilterEffect.cpp:
* testing/MockCDM.cpp:
2013-08-15 Chris Fleizach <cfleizach@apple.com>
<https://webkit.org/b/119824> AX: WKView does not become first responder when the voiceover cursor lands on it
Reviewed by Darin Adler.
Incorporate review feedback from Darin.
* accessibility/AccessibilityScrollView.cpp:
(WebCore::AccessibilityScrollView::canSetFocusAttribute):
(WebCore::AccessibilityScrollView::isFocused):
* accessibility/AccessibilityScrollView.h:
2013-08-15 Andreas Kling <akling@apple.com>
<https://webkit.org/b/119826> Page::focusController() should return a reference.
Reviewed by Anders Carlsson.
Page::focusController() is never null so make it return a reference.
Some unnecessary checks were removed as a result.
2013-08-15 Rob Buis <rwlbuis@webkit.org>
ASSERTION FAILED: !m_adoptionIsRequired in void WebCore::TreeShared<NodeType>::ref()
https://bugs.webkit.org/show_bug.cgi?id=116979
Reviewed by Alexey Proskuryakov.
Make constructors private since only ::create should use them.
* html/shadow/MeterShadowElement.h:
* html/shadow/ProgressShadowElement.h:
2013-08-15 Tim Horton <timothy_horton@apple.com>
FrameView should have an isMainFrameView()
https://bugs.webkit.org/show_bug.cgi?id=119435
Reviewed by Simon Fraser.
No new tests, just refactoring.
* page/FrameView.cpp:
(WebCore::FrameView::FrameView):
(WebCore::FrameView::isMainFrameView):
(WebCore::FrameView::setFrameRect):
(WebCore::FrameView::createScrollbar):
(WebCore::FrameView::applyOverflowToViewport):
(WebCore::FrameView::setHeaderHeight):
(WebCore::FrameView::setFooterHeight):
(WebCore::FrameView::minimumScrollPosition):
(WebCore::FrameView::maximumScrollPosition):
(WebCore::FrameView::performPostLayoutTasks):
(WebCore::FrameView::sendResizeEventIfNeeded):
(WebCore::FrameView::pagination):
(WebCore::FrameView::visibleContentScaleFactor):
(WebCore::FrameView::setVisibleScrollerThumbRect):
(WebCore::FrameView::scrollbarStyleChanged):
(WebCore::FrameView::paintScrollCorner):
(WebCore::FrameView::paintScrollbar):
(WebCore::FrameView::paintOverhangAreas):
* page/FrameView.h:
Add isMainFrameView and adopt it wherever we were previously checking if
the FrameView's frame was the same as its page's main frame.
2013-08-15 Andy Estes <aestes@apple.com>
<https://webkit.org/b/119853> REGRESSION (r139343): WebKit crashes when canceling a load inside webView:resource:didFinishLoadingFromDataSource:
Reviewed by Brady Eidson.
A client implementing webView:resource:didFinishLoadingFromDataSource:
might decide to call stopLoading: for the identifier that just finished
loading. If this happens we re-enter the loader and attempt to cancel a
load that has already finished and been removed from the set of active
loaders. Prevent this by clearing DocumentLoader's
m_identifierForLoadWithoutResourceLoader before calling
dispatchDidFinishLoading().
New API test: WebKit1.StopLoadingFromDidFinishLoading.
* loader/DocumentLoader.cpp:
(WebCore::DocumentLoader::finishedLoading): Set
m_identifierForLoadWithoutResourceLoader to 0 before calling
dispatchDidFinishLoading().
2013-08-15 Eric Carlson <eric.carlson@apple.com>
[Mac] Remove "legacy" media UI
https://bugs.webkit.org/show_bug.cgi?id=119752
Reviewed by Jer Noble.
* WebCore.exp.in: Remove _wkMediaControllerThemeAvailable.
* platform/mac/WebCoreSystemInterface.h: Update for API change.
* platform/mac/WebCoreSystemInterface.mm: Ditto.
* rendering/RenderThemeMac.h: Don't override hasOwnDisabledStateHandlingFor.
* rendering/RenderThemeMac.mm:
(WebCore::RenderThemeMac::adjustMediaSliderThumbSize): Remove code to deal with legacy theme.
(WebCore::getUnzoomedRectAndAdjustCurrentContext): Ditto.
(WebCore::RenderThemeMac::paintMediaFullscreenButton): wkDrawMediaUIPart doesn't need to know
the current theme.
(WebCore::RenderThemeMac::paintMediaMuteButton): Ditto.
(WebCore::RenderThemeMac::paintMediaPlayButton): Ditto.
(WebCore::RenderThemeMac::paintMediaSeekBackButton): Ditto.
(WebCore::RenderThemeMac::paintMediaSeekForwardButton): Ditto.
(WebCore::RenderThemeMac::paintMediaSliderTrack): Ditto.
(WebCore::RenderThemeMac::paintMediaSliderThumb): Ditto.
(WebCore::RenderThemeMac::paintMediaRewindButton): Ditto.
(WebCore::RenderThemeMac::paintMediaReturnToRealtimeButton): Ditto.
(WebCore::RenderThemeMac::paintMediaControlsBackground): Ditto.
(WebCore::RenderThemeMac::paintMediaCurrentTime): Ditto.
(WebCore::RenderThemeMac::paintMediaTimeRemaining): Ditto.
(WebCore::RenderThemeMac::paintMediaVolumeSliderContainer): Ditto.
(WebCore::RenderThemeMac::paintMediaVolumeSliderTrack): Ditto.
(WebCore::RenderThemeMac::paintMediaVolumeSliderThumb): Ditto.
(WebCore::RenderThemeMac::paintMediaFullScreenVolumeSliderTrack): Ditto.
(WebCore::RenderThemeMac::paintMediaFullScreenVolumeSliderThumb): Ditto.
(WebCore::RenderThemeMac::extraMediaControlsStyleSheet): We only have one theme.
(WebCore::RenderThemeMac::extraFullScreenStyleSheet): Ditto.
(WebCore::RenderThemeMac::usesMediaControlStatusDisplay): Ditto.
2013-08-15 Antti Koivisto <antti@apple.com>
<https://webkit.org/b/119834> Remove ElementShadow
Reviewed by Anders Carlsson.
It is 1:1 with ShadowRoot and has virtually no functionality. What little there is can be moved to ShadowRoot or Element.
* CMakeLists.txt:
* GNUmakefile.list.am:
* Target.pri:
* WebCore.exp.in:
* WebCore.xcodeproj/project.pbxproj:
* css/StyleResolver.cpp:
(WebCore::StyleResolver::locateCousinList):
* css/StyleScopeResolver.cpp:
(WebCore::StyleScopeResolver::styleSharingCandidateMatchesHostRules):
(WebCore::StyleScopeResolver::matchHostRules):
* dom/ComposedShadowTreeWalker.cpp:
(WebCore::nodeCanBeDistributed):
(WebCore::ComposedShadowTreeWalker::traverseChild):
* dom/ContainerNode.cpp:
(WebCore::childAttachedAllowedWhenAttachingChildren):
* dom/ContainerNodeAlgorithms.cpp:
(WebCore::ChildNodeInsertionNotifier::notifyDescendantInsertedIntoDocument):
(WebCore::ChildNodeRemovalNotifier::notifyDescendantRemovedFromDocument):
(WebCore::ChildNodeRemovalNotifier::notifyDescendantRemovedFromTree):
(WebCore::assertConnectedSubrameCountIsConsistent):
* dom/ContainerNodeAlgorithms.h:
(WebCore::ChildFrameDisconnector::collectFrameOwners):
* dom/DOMAllInOne.cpp:
* dom/Document.cpp:
* dom/Element.cpp:
(WebCore::Element::~Element):
(WebCore::Element::attach):
(WebCore::Element::detach):
(WebCore::Element::shadowRoot):
(WebCore::Element::didAffectSelector):
(WebCore::Element::addShadowRoot):
(WebCore::Element::removeShadowRoot):
Move addShadowRoot and removeShadowRoot here from ElementShadow.
(WebCore::Element::createShadowRoot):
(WebCore::Element::authorShadowRoot):
(WebCore::Element::userAgentShadowRoot):
(WebCore::Element::ensureUserAgentShadowRoot):
(WebCore::Element::childrenChanged):
(WebCore::Element::removeAllEventListeners):
* dom/Element.h:
(WebCore::isShadowHost):
* dom/ElementRareData.h:
(WebCore::ElementRareData::clearShadowRoot):
(WebCore::ElementRareData::shadowRoot):
(WebCore::ElementRareData::setShadowRoot):
(WebCore::ElementRareData::~ElementRareData):
* dom/ElementShadow.cpp: Removed.
* dom/ElementShadow.h: Removed.
* dom/EventDispatcher.cpp:
* dom/EventPathWalker.cpp:
(WebCore::EventPathWalker::moveToParent):
* dom/Node.cpp:
(WebCore::Node::needsShadowTreeWalkerSlow):
* dom/NodeRenderingContext.cpp:
* dom/NodeRenderingContext.h:
* dom/ShadowRoot.cpp:
(WebCore::ShadowRoot::attach):
(WebCore::ShadowRoot::detach):
Move attached() tests from ElementShadow.
(WebCore::ShadowRoot::childrenChanged):
(WebCore::ShadowRoot::removeAllEventListeners):
Move here from ElementShadow.
* dom/ShadowRoot.h:
(WebCore::Node::shadowRoot):
* dom/TreeScopeAdopter.cpp:
* html/ColorInputType.cpp:
(WebCore::ColorInputType::createShadowSubtree):
* html/FileInputType.cpp:
(WebCore::FileInputType::createShadowSubtree):
(WebCore::FileInputType::disabledAttributeChanged):
(WebCore::FileInputType::multipleAttributeChanged):
* html/HTMLFormControlElement.cpp:
* html/HTMLImageElement.cpp:
(WebCore::HTMLImageElement::canStartSelection):
* html/HTMLInputElement.cpp:
(WebCore::HTMLInputElement::updateType):
* html/HTMLKeygenElement.cpp:
* html/HTMLMediaElement.cpp:
* html/HTMLTextAreaElement.cpp:
* html/InputType.cpp:
* html/RangeInputType.cpp:
(WebCore::RangeInputType::handleMouseDownEvent):
(WebCore::RangeInputType::createShadowSubtree):
* html/TextFieldInputType.cpp:
(WebCore::TextFieldInputType::createShadowSubtree):
* html/ValidationMessage.cpp:
* html/shadow/ContentDistributor.cpp:
(WebCore::ContentDistributor::distribute):
(WebCore::ContentDistributor::ensureDistribution):
* html/shadow/ContentDistributor.h:
(WebCore::ContentDistributor::isValid):
* html/shadow/InsertionPoint.cpp:
(WebCore::InsertionPoint::childrenChanged):
(WebCore::InsertionPoint::insertedInto):
(WebCore::InsertionPoint::removedFrom):
(WebCore::resolveReprojection):
* html/shadow/InsertionPoint.h:
(WebCore::shadowRootOfParentForDistribution):
* html/shadow/SliderThumbElement.cpp:
* inspector/InspectorDOMAgent.cpp:
(WebCore::InspectorDOMAgent::unbind):
(WebCore::InspectorDOMAgent::buildObjectForNode):
* page/FocusController.cpp:
(WebCore::FocusNavigationScope::focusNavigationScopeOwnedByShadowHost):
* rendering/RenderFileUploadControl.cpp:
(WebCore::RenderFileUploadControl::uploadButton):
* rendering/RenderTheme.cpp:
* style/StyleResolveTree.cpp:
(WebCore::Style::resolveTree):
* svg/SVGTRefElement.cpp:
(WebCore::SVGTRefElement::updateReferencedText):
(WebCore::SVGTRefElement::detachTarget):
* svg/SVGUseElement.cpp:
(WebCore::SVGUseElement::clearResourceReferences):
(WebCore::SVGUseElement::buildShadowAndInstanceTree):
(WebCore::SVGUseElement::buildShadowTree):
* testing/Internals.cpp:
(WebCore::Internals::ensureShadowRoot):
(WebCore::Internals::shadowRoot):
2013-08-15 Allan Sandfeld Jensen <allan.jensen@digia.com>
[Qt] memory leak in WebCore::FontCache::getLastResortFallbackFont
https://bugs.webkit.org/show_bug.cgi?id=118532
Reviewed by Jocelyn Turcotte.
We don't need to allocate FontPlatformData on the heap
since getCachedFontData makes a deep copy anyway.
* platform/graphics/qt/FontCacheQt.cpp:
(WebCore::FontCache::getLastResortFallbackFont):
2013-08-15 Rob Buis <rwlbuis@webkit.org>
ASSERTION FAILED: !m_adoptionIsRequired in void WebCore::TreeShared<NodeType>::ref()
https://bugs.webkit.org/show_bug.cgi?id=116979
Reviewed by Antti Koivisto.
Make sure adoptRef is called before calling setPseudo, for all progress shadow elements.
* html/shadow/ProgressShadowElement.cpp:
(WebCore::ProgressInnerElement::ProgressInnerElement):
(WebCore::ProgressBarElement::ProgressBarElement):
(WebCore::ProgressValueElement::ProgressValueElement):
* html/shadow/ProgressShadowElement.h:
(WebCore::ProgressInnerElement::create):
(WebCore::ProgressBarElement::create):
(WebCore::ProgressValueElement::create):
2013-08-14 Ryuan Choi <ryuan.choi@samsung.com>
<https://webkit.org/b/119786> [EFL] decoration of search type is different from other platforms
Reviewed by Gyuyoung Kim.
Other platforms except EFL port draw a magnifying icon for
-webkit-search-results-button and -webkit-search-results-decoration in search field,
but Efl port draws it for -webkit-search-decoration.
This patch makes Efl port draw icon in first two cases like other ports.
Tests: fast/css/input-search-padding.html
fast/css/text-input-with-webkit-border-radius.html
fast/css/text-overflow-input.html
fast/forms/box-shadow-override.html
fast/forms/control-restrict-line-height.html
fast/forms/input-appearance-height.html
fast/forms/placeholder-position.html
fast/forms/placeholder-pseudo-style.html
fast/forms/search-cancel-button-style-sharing.html
fast/forms/search-display-none-cancel-button.html
fast/forms/search-rtl.html
fast/forms/search-vertical-alignment.html
fast/forms/searchfield-heights.html
fast/repaint/search-field-cancel.html
* platform/efl/DefaultTheme/widget/search/cancel/search_cancel.edc:
Moved results_button alias to search_decoration.edc
* platform/efl/DefaultTheme/widget/search/decoration/search_decoration.edc:
* platform/efl/RenderThemeEfl.cpp:
Updated size of ResultsButtonStyle and ResultsDecorationStyle to show icon.
In addition, removed adjustSearchFieldResultsButtonStyle and paintSearchFieldDecoration.
(WebCore::toEdjeGroup): Removed decoration group.
(WebCore::RenderThemeEfl::adjustSearchFieldResultsButtonStyle):
(WebCore::RenderThemeEfl::adjustSearchFieldResultsDecorationStyle):
* platform/efl/RenderThemeEfl.h:
2013-08-14 Gyuyoung Kim <gyuyoung.kim@samsung.com>
[CSS] Introduce new structure to pass image orientation values.
https://bugs.webkit.org/show_bug.cgi?id=119418
Reviewed by Beth Dakin.
Add a ImageOrientationDescription struct in order to reduce count of argument for
image orientation.
No new tests, no behavior change.
* html/HTMLCanvasElement.cpp:
(WebCore::HTMLCanvasElement::paint):
* page/DragController.cpp:
(WebCore::DragController::doImageDrag):
* page/Frame.cpp:
(WebCore::Frame::nodeImage):
(WebCore::Frame::dragImageForSelection):
* platform/DragImage.h:
* platform/blackberry/DragImageBlackBerry.cpp:
(WebCore::createDragImageFromImage):
* platform/efl/DragImageEfl.cpp:
(WebCore::createDragImageFromImage):
* platform/graphics/BitmapImage.cpp:
(WebCore::BitmapImage::updateSize):
* platform/graphics/BitmapImage.h:
* platform/graphics/GraphicsContext.cpp:
(WebCore::GraphicsContext::drawImage):
* platform/graphics/GraphicsContext.h:
* platform/graphics/Image.cpp:
(WebCore::Image::draw):
* platform/graphics/Image.h:
* platform/graphics/ImageOrientation.h:
(WebCore::ImageOrientationDescription::ImageOrientationDescription):
(WebCore::ImageOrientationDescription::respectImageOrientation):
(WebCore::ImageOrientationDescription::imageOrientation):
* platform/graphics/ImageSource.cpp:
(WebCore::ImageSource::size):
(WebCore::ImageSource::frameSizeAtIndex):
* platform/graphics/ImageSource.h:
* platform/graphics/blackberry/ImageBlackBerry.cpp:
(WebCore::BitmapImage::draw):
* platform/graphics/cairo/BitmapImageCairo.cpp:
(WebCore::BitmapImage::draw):
* platform/graphics/cairo/ImageBufferCairo.cpp:
(WebCore::ImageBuffer::draw):
* platform/graphics/cg/BitmapImageCG.cpp:
(WebCore::BitmapImage::draw):
* platform/graphics/cg/ImageSourceCG.cpp:
(WebCore::ImageSource::frameSizeAtIndex):
(WebCore::ImageSource::size):
(WebCore::ImageSource::frameBytesAtIndex):
* platform/graphics/gstreamer/MediaPlayerPrivateGStreamerBase.cpp:
(WebCore::MediaPlayerPrivateGStreamerBase::paint):
* platform/graphics/qt/ImageBufferQt.cpp:
(WebCore::ImageBuffer::draw):
* platform/graphics/wince/ImageBufferWinCE.cpp:
(WebCore::ImageBuffer::draw):
* platform/gtk/ClipboardGtk.cpp:
(WebCore::Clipboard::createDragImage):
* platform/gtk/DragImageGtk.cpp:
(WebCore::createDragImageFromImage):
* platform/mac/DragImageMac.mm:
(WebCore::createDragImageFromImage):
* platform/qt/ClipboardQt.cpp:
(WebCore::Clipboard::createDragImage):
* platform/qt/DragImageQt.cpp:
(WebCore::createDragImageFromImage):
* platform/win/ClipboardWin.cpp:
(WebCore::Clipboard::createDragImage):
* platform/win/DragImageCGWin.cpp:
(WebCore::createDragImageFromImage):
* platform/win/DragImageCairoWin.cpp:
(WebCore::createDragImageFromImage):
* rendering/RenderEmbeddedObject.cpp:
(WebCore::RenderEmbeddedObject::paintSnapshotImage):
* rendering/RenderImage.cpp:
(WebCore::RenderImage::paintReplaced):
(WebCore::RenderImage::paintIntoRect):
* rendering/RenderSnapshottedPlugIn.cpp:
(WebCore::RenderSnapshottedPlugIn::paintSnapshot):
2013-08-14 Sam Weinig <sam@webkit.org>
Update binding test results. Follow up fix for <https://webkit.org/b/119664>
* bindings/scripts/test/JS/JSTestCallback.cpp:
(WebCore::JSTestCallback::JSTestCallback):
* bindings/scripts/test/JS/JSTestMediaQueryListListener.cpp:
(WebCore::jsTestMediaQueryListListenerPrototypeFunctionMethod):
2013-08-14 Joseph Pecoraro <pecoraro@apple.com>
<https://webkit.org/b/119810> [Mac] No AutoreleasePool leaks when dragging image out of WebView
Reviewed by Dan Bernstein.
This code was just running a block of code asynchronously using a
pthread. Convert this to use a dispatch block, which does provide
an autorelease pool so there are no leaks and ends up much simpler.
* platform/mac/FileSystemMac.mm:
(WebCore::setMetadataURL):
2013-08-14 Tim Horton <timothy_horton@apple.com>
Un-inline dataLog dumpers for IntSize and IntPoint
https://bugs.webkit.org/show_bug.cgi?id=119697
Reviewed by Sam Weinig.
Avoid regressing build performance by moving IntSize::dump and IntPoint::dump elsewhere.
* CMakeLists.txt:
* GNUmakefile.list.am:
* Target.pri:
* WebCore.vcxproj/WebCore.vcxproj:
* WebCore.vcxproj/WebCore.vcxproj.filters:
* WebCore.xcodeproj/project.pbxproj:
* platform/graphics/IntPoint.cpp: Added.
(WebCore::IntPoint::dump):
* platform/graphics/IntPoint.h:
* platform/graphics/IntSize.cpp: Added.
(WebCore::IntSize::dump):
* platform/graphics/IntSize.h:
2013-08-14 Chris Fleizach <cfleizach@apple.com>
<https://webkit.org/b/119824> AX: WKView does not become first responder when the voiceover cursor lands on it
Reviewed by Tim Horton.
VoiceOver lands on Scroll views by default. It expects that the scroll view will be able to handle the focus calls.
We should forward scroll view focus requests to the web area to handle, which will trigger a becomeFirstResponder on WKView.
There's not a great way to test this unfortunately, since it requires having focus comes from outside the webview into the webview.
* accessibility/AccessibilityScrollView.cpp:
(WebCore::AccessibilityScrollView::canSetFocusAttribute):
(WebCore::AccessibilityScrollView::isFocused):
(WebCore::AccessibilityScrollView::setFocused):
* accessibility/AccessibilityScrollView.h:
2013-08-14 Hans Muller <hmuller@adobe.com>
[CSS Exclusions] Minimal support for using an image to define a shape
https://bugs.webkit.org/show_bug.cgi?id=116643
Reviewed by Alexandru Chiculita.
This is a first small step towards supporting CSS shapes defined by an
image URL and a alpha channel threshold. To keep the patch as small as
possible, there are many limitations and remaining work items. For
example images are currently restricted to same-origin, although CORS
should be supported. See https://bugs.webkit.org/show_bug.cgi?id=116348
for the current list.
Test: fast/exclusions/shape-inside/shape-inside-image-001.html
Test: fast/exclusions/shape-inside/shape-inside-image-002.html
* CMakeLists.txt:
* GNUmakefile.list.am:
* Target.pri:
* WebCore.vcxproj/WebCore.vcxproj:
* WebCore.xcodeproj/project.pbxproj:
* rendering/RenderBlock.cpp:
(WebCore::RenderBlock::imageChanged): When the image has finished loading, request a layout.
* rendering/RenderBlock.h:
* rendering/RenderObject.cpp:
(WebCore::RenderObject::setStyle): Add notify clients for shape images.
(WebCore::RenderObject::updateShapeImage):
(WebCore::removeShapeImageClient):
(WebCore::RenderObject::arenaDelete): Remove notify clients for shape images.
* rendering/RenderObject.h:
* rendering/shapes/RasterShape.cpp: Added. A Shape defined by thresholding an image's alpha channel.
(WebCore::RasterShapeIntervals::bounds):
(WebCore::RasterShapeIntervals::addInterval): Add a single run to the shape.
(WebCore::alignedRect):
(WebCore::RasterShapeIntervals::getIntervals): Return the shape's runs that fall within a horizonal box.
(WebCore::RasterShape::marginIntervals): Internal representation of the shape with shape-margin factored in. Currently only a stub.
(WebCore::RasterShape::paddingIntervals): Internal representation of the shape with shape-padding factored in. Currently only a stub.
(WebCore::RasterShape::getExcludedIntervals):
(WebCore::RasterShape::getIncludedIntervals):
(WebCore::RasterShape::firstIncludedIntervalLogicalTop):
* rendering/shapes/RasterShape.h:
(WebCore::RasterShapeIntervals::RasterShapeIntervals): Internal run length encoded representation of a RasterShape.
(WebCore::RasterShapeIntervals::isEmpty):
(WebCore::RasterShape::RasterShape):
* rendering/shapes/Shape.cpp:
(WebCore::Shape::createShape): Support for creating a Shape based on a RasterShapeIntervals object.
* rendering/shapes/Shape.h:
* rendering/shapes/ShapeInfo.cpp:
(WebCore::::computedShape): Added support for the Image ShapeValue type.
* rendering/shapes/ShapeInsideInfo.cpp:
(WebCore::ShapeInsideInfo::isEnabledFor): Added support for the Image ShapeValue type.
* rendering/shapes/ShapeOutsideInfo.cpp:
(WebCore::ShapeOutsideInfo::isEnabledFor): Added support for the Image ShapeValue type.
* rendering/style/ShapeValue.h:
(WebCore::ShapeValue::isImageValid): True if the shape's image is ready to be be processed.
2013-08-14 Alexandru Chiculita <achicu@adobe.com>
[CSS Regions] RenderRegions should have a RenderLayer+Backing when they contain a Composited RenderLayer
https://bugs.webkit.org/show_bug.cgi?id=117365
Reviewed by David Hyatt.
After the RenderFlowThread has a new layout we need to check if any of the children layers
had been moved to a new render region. We are only checking for the first level of layers,
as they are the only ones supported right now. Also, added code to make Regions require a layer
based on the layers that fit in their clipping area.
Tests: fast/regions/layers/dynamic-layer-added-with-no-layout.html
fast/regions/layers/dynamic-layer-removed-with-no-layout.html
fast/regions/layers/float-region-promoted-to-layer.html
fast/regions/layers/regions-promoted-to-layers-horizontal-bt.html
fast/regions/layers/regions-promoted-to-layers-vertical-lr.html
fast/regions/layers/regions-promoted-to-layers-vertical-rl.html
fast/regions/layers/regions-promoted-to-layers.html
* rendering/FlowThreadController.cpp:
(WebCore::FlowThreadController::updateRenderFlowThreadLayersIfNeeded): Iterate on all the flow threads and updateLayerToRegionMappings if needed.
* rendering/FlowThreadController.h:
* rendering/RenderBlock.cpp:
(WebCore::RenderBlock::updateLocalFloatingObjectsForPaintingContainer): Checks if the FloatingObject
needs to be painted by the current block or not.
(WebCore::RenderBlock::updateFloatingObjectsPaintingContainer): Helper function to lookup what is the right
container that would need to paint a FloatingObject.
(WebCore::RenderBlock::updateAllDescendantsFloatingObjectsPaintingContainer):
* rendering/RenderBlock.h:
* rendering/RenderBox.cpp:
(WebCore::RenderBox::outermostBlockContainingFloatingObject): Looks up the ancestor RenderBlock that contains all
the FloatingObjects of a float.
(WebCore::RenderBox::removeFloatingOrPositionedChildFromBlockLists): Extracted the code for outermostBlockContainingFloatingObject
into its own method.
(WebCore::RenderBox::updatePaintingContainerForFloatingObject): Helper method to update the "m_shouldPaint" flag
of all the FloatingObjects created for a floating RenderObject. Normally, that flag is maintained during layout,
but we need to patch it for the floating RenderRegions after the layout is already finished.
(WebCore::RenderBox::updateLayerIfNeeded): Overwrite of the RenderLayerModelObject::updateLayerIfNeeded that is also
calling updatePaintingContainerForFloatingObject if a new layer was created or destroyed.
* rendering/RenderBox.h:
* rendering/RenderFlowThread.cpp:
(WebCore::RenderFlowThread::layout): Added code to call updateLayerToRegionMappings when needed.
(WebCore::RenderFlowThread::regionForCompositedLayer): Looks up the first RenderRegion to display a specific layer.
It only cares about the top most point of the element and ignores transforms.
(WebCore::RenderFlowThread::updateRegionForRenderLayer): Helper method to update the mapped region of a layer.
(WebCore::RenderFlowThread::updateLayerToRegionMappings): Iterates all the first level layers of the flow thread
and updates the region. Will return true if there was any change.
* rendering/RenderFlowThread.h:
* rendering/RenderLayer.cpp:
(WebCore::RenderLayer::dirtyZOrderLists): When new layers are added or removed we need to update the layer map in the flow thread.
(WebCore::RenderLayer::dirtyNormalFlowList):
(WebCore::RenderLayer::shouldBeNormalFlowOnly): CSS Regions might become layers because they contain RenderLayers,
but they should not become stacking contexts for that reason. This will prevent the RenderRegions from rendering
in front of other layers.
(WebCore::RenderLayer::shouldBeSelfPaintingLayer):
* rendering/RenderLayerCompositor.cpp:
(WebCore::RenderLayerCompositor::updateCompositingLayers): Call updateRenderFlowThreadLayersIfNeeded when there's a layer hierarchy update.
(WebCore::RenderLayerCompositor::updateRenderFlowThreadLayersIfNeeded): Update the render flow thread layer maps when they are dirty.
* rendering/RenderLayerCompositor.h:
* rendering/RenderLayer.h:
(WebCore::RenderLayer::isDirtyRenderFlowThread): Used to check if the RenderLayers had changed their order,
so that we can update the list of layers associated with a region. In a following patch we will need to
rebuild the composited layers.
* rendering/RenderLayerModelObject.cpp:
(WebCore::RenderLayerModelObject::updateLayerIfNeeded): Adds or removes a layer when the "requiresLayer" changes
after the styleDidChange already happened. This is needed for Regions as we only know if they still require a layer,
only after the content of the flow thread is computed.
* rendering/RenderLayerModelObject.h:
* rendering/RenderRegion.cpp:
(WebCore::RenderRegion::RenderRegion):
(WebCore::RenderRegion::setRequiresLayerForCompositing):
* rendering/RenderRegion.h:
(WebCore::RenderRegion::requiresLayer):
* rendering/RenderTreeAsText.cpp:
(WebCore::writeRenderRegionList): Updated the output to print the fact that the layer has a layer.
2013-08-14 Bem Jones-Bey <bjonesbe@adobe.com>
Finish making FloatingObject a real class with private members
https://bugs.webkit.org/show_bug.cgi?id=119807
This is a port from Blink of
http://src.chromium.org/viewvc/blink?view=revision&revision=155964
Original patch by Eric Seidel.
From his comments on the Blink change:
Previously FloatingObject was in a half-done state where it had
accessors for many members, but also many members were public.
This CL makes all members private and adds the necessary remaining
accessors.
Reviewed by David Hyatt.
No new tests, no behavior change.
* rendering/RenderBlock.cpp:
(WebCore::RenderBlock::deleteLineBoxTree):
(WebCore::RenderBlock::addOverflowFromFloats):
(WebCore::RenderBlock::repaintOverhangingFloats):
(WebCore::RenderBlock::paintFloats):
(WebCore::RenderBlock::selectionGaps):
(WebCore::RenderBlock::insertFloatingObject):
(WebCore::RenderBlock::removeFloatingObject):
(WebCore::RenderBlock::removeFloatingObjectsBelow):
(WebCore::RenderBlock::positionNewFloats):
(WebCore::RenderBlock::clearFloats):
(WebCore::RenderBlock::addOverhangingFloats):
(WebCore::RenderBlock::addIntrudingFloats):
(WebCore::RenderBlock::hitTestFloats):
(WebCore::RenderBlock::adjustForBorderFit):
* rendering/RenderBlock.h:
(WebCore::RenderBlock::FloatingObject::paginationStrut):
(WebCore::RenderBlock::FloatingObject::setPaginationStrut):
(WebCore::RenderBlock::FloatingObject::setRenderer):
(WebCore::RenderBlock::FloatingObject::originatingLine):
(WebCore::RenderBlock::FloatingObject::setOriginatingLine):
(WebCore::RenderBlock::FloatingObjectHashFunctions::hash):
(WebCore::RenderBlock::FloatingObjectHashFunctions::equal):
(WebCore::RenderBlock::FloatingObjectHashTranslator::equal):
* rendering/RenderBlockLineLayout.cpp:
(WebCore::RenderBlock::appendFloatingObjectToLastLine):
(WebCore::RenderBlock::layoutRunsAndFloatsInRange):
(WebCore::RenderBlock::linkToEndLineIfNeeded):
(WebCore::RenderBlock::determineStartPosition):
(WebCore::RenderBlock::positionNewFloatOnLine):
2013-08-14 Rob Buis <rwlbuis@webkit.org>
Assertion failure in RenderObject::drawLineForBoxSide
https://bugs.webkit.org/show_bug.cgi?id=108187
Reviewed by David Hyatt.
Don't draw the outline if the rectangle to draw is empty.
Test: fast/css/outline-negative.html
* rendering/RenderInline.cpp:
(WebCore::RenderInline::paintOutlineForLine):
2013-08-13 Chris Fleizach <cfleizach@apple.com>
AX: Headings not longer have an AXTitle if they have a link as the only child
https://bugs.webkit.org/show_bug.cgi?id=119699
Reviewed by Anders Carlsson.
Normally, focusable content is not incuded when looking at the visible text of an element.
One case where we need an exception is with headings, where there is usually link content inside the heading
that we want to be used as the visible text.
Test: accessibility/heading-title-includes-links.html
* accessibility/AccessibilityNodeObject.cpp:
(WebCore::AccessibilityNodeObject::visibleText):
(WebCore::shouldUseAccessiblityObjectInnerText):
(WebCore::AccessibilityNodeObject::title):
* accessibility/AccessibilityNodeObject.h:
* accessibility/AccessibilityObject.h:
(WebCore::AccessibilityTextUnderElementMode::AccessibilityTextUnderElementMode):
(WebCore::AccessibilityObject::textUnderElement):
* accessibility/AccessibilityRenderObject.cpp:
(WebCore::AccessibilityRenderObject::textUnderElement):
* accessibility/AccessibilityRenderObject.h:
2013-08-14 Christophe Dumez <ch.dumez@sisa.samsung.com>
Move id attribute to parent Element interface
https://bugs.webkit.org/show_bug.cgi?id=119706
Reviewed by Ryosuke Niwa.
Move id attribute from SVGElement / HTMLElement to their Element parent
interface to match the latest DOM specification and avoid duplication:
http://dom.spec.whatwg.org/#dom-element-id
There is no web-exposed behavior change because we haven't moved
properties from instances to their prototype, as per the Web IDL
specification (http://dev.w3.org/2006/webapi/WebIDL/#es-attributes).
Firefox already exposes the id property of Element's prototype.
This patch also drops the comment about returning the empty string when
no id is present (introduced in http://trac.webkit.org/changeset/4417).
This comment is redundant since the id property is already marked to
"reflect" the id attribute. Returning the empty string when the
attribute is not present is the normal behavior when reflecting:
http://www.whatwg.org/specs/web-apps/current-work/multipage/common-dom-interfaces.html#reflect
No new test, no web-exposed behavior change.
* dom/Element.idl:
* html/HTMLElement.idl:
* svg/SVGElement.idl:
2013-08-14 Arpita Bahuguna <a.bah@samsung.com>
createAttribute/setAttributeNode does not properly normalize case
https://bugs.webkit.org/show_bug.cgi?id=90341
Reviewed by Darin Adler.
setAttributeNode() verifies for existing attributes in a case sensitive
manner. Thus, it would add another attribute if specified in a case
different from the existing one. Instead, like setAttribute(), it too
should modify the existing attribute's value.
Tests: fast/dom/Element/setAttributeNode-case-insensitivity-xhtml.xhtml
fast/dom/Element/setAttributeNode-case-insensitivity.html
* dom/Element.cpp:
(WebCore::Element::setAttributeNode):
Passing the second param (shouldIgnoreAttributeCase) to
findAttributeIndexByNameForAttributeNode() method. We are now letting
findAttributeIndexByNameForAttributeNode() handle the case-sensitive/insensitive
checking.
(WebCore::ElementData::findAttributeIndexByNameForAttributeNode):
* dom/Element.h:
Added shouldIgnoreAttributeCase boolean param to the method. It passes
this on to QualifiedName::matchesIgnoringCaseForLocalName() method.
* dom/QualifiedName.h:
(WebCore::QualifiedName::matchesIgnoringCaseForLocalName):
New method added for doing a case-insensitive comparison based on the
shouldIgnoreCase param passed to this method.
2013-08-14 Gabor Abraham <abrhm@inf.u-szeged.hu>
[CMake] Fix building with bison-3.0.
https://bugs.webkit.org/show_bug.cgi?id=119788
Reviewed by Zoltan Herczeg.
No new tests, just build fix.
* CMakeLists.txt:
2013-08-14 Rob Buis <rwlbuis@webkit.org>
ASSERTION FAILED: resultAnimationElement->m_animatedType in WebCore::SVGAnimateElement::calculateAnimatedValue
https://bugs.webkit.org/show_bug.cgi?id=119748
Reviewed by Dirk Schulze.
Avoid animation when attributeType="CSS" is used on an animateTransform.
Tests: svg/animations/animateTransform-translate-attributetype-auto.html
svg/animations/animateTransform-translate-invalid-attributetype.html
* svg/SVGAnimateTransformElement.cpp:
(WebCore::SVGAnimateTransformElement::hasValidAttributeType):
2013-08-14 Antti Koivisto <antti@apple.com>
Try to fix Qt build.
Not reviewed.
* xml/parser/XMLDocumentParserQt.cpp:
(WebCore::XMLDocumentParser::parseProcessingInstruction):
(WebCore::XMLDocumentParser::parseCdata):
(WebCore::XMLDocumentParser::parseComment):
2013-08-13 Antti Koivisto <antti@apple.com>
Remove Node::attach() and ContainerNode::attach()
https://bugs.webkit.org/show_bug.cgi?id=119698
Reviewed by Andreas Kling.
Currently attach() is a virtual function on Node. However only Elements have style and so a corresponding
independent render object. Attaching should be made Element level concept.
This patch merges Node::attach() and ContainerNode::attach() to Element::attach(). Other related functions
(detach(), reattach(), etc) move similarly.
Next step here is to make attach non-virtual in common case and move it out from the DOM tree.
* dom/ContainerNode.cpp:
(WebCore::attachChild):
(WebCore::detachChild):
Temporary helpers. Further refactoring should get rid of these.
(WebCore::ContainerNode::takeAllChildrenFrom):
(WebCore::ContainerNode::removeBetween):
(WebCore::updateTreeAfterInsertion):
* dom/ContainerNode.h:
* dom/Document.cpp:
(WebCore::Document::attach):
(WebCore::Document::detach):
Copy the relevant parts of the code from base class attach/detach here. It is not much.
* dom/Document.h:
* dom/Element.cpp:
(WebCore::Element::~Element):
Node destructor no longer detaches.
(WebCore::Element::attachChildren):
(WebCore::Element::attach):
Combine Node::attach(), ContainerNode::attach() and Element::attach().
(WebCore::Element::detachChildren):
(WebCore::Element::detach):
Combine Node::detach(), ContainerNode::detach() and Element::detach().
(WebCore::Element::reattach):
(WebCore::Element::reattachIfAttached):
(WebCore::Element::lazyReattach):
(WebCore::Element::lazyAttach):
This stuff moves from ContainerNode/Node.
* dom/Element.h:
(WebCore::Element::AttachContext::AttachContext):
* dom/ElementShadow.cpp:
(WebCore::ElementShadow::removeShadowRoot):
(WebCore::ElementShadow::attach):
(WebCore::ElementShadow::detach):
* dom/ElementShadow.h:
* dom/Node.cpp:
(WebCore::Node::~Node):
Assert that we are not attached at this point.
(WebCore::Node::markAncestorsWithChildNeedsStyleRecalc):
* dom/Node.h:
(WebCore::Node::setAttached):
(WebCore::Node::setStyleChange):
Make available.
* dom/NodeRenderingContext.cpp:
(WebCore::NodeRenderingContext::NodeRenderingContext):
* dom/NodeRenderingContext.h:
* dom/ShadowRoot.cpp:
(WebCore::ShadowRoot::attach):
(WebCore::ShadowRoot::detach):
* dom/ShadowRoot.h:
* dom/Text.cpp:
(WebCore::Text::~Text):
Node destructor no longer detaches. Add destructor.
(WebCore::Text::createTextRenderersForSiblingsAfterAttachIfNeeded):
Factor the code that updates sibling text renderers after attach into a function.
(WebCore::Text::attachText):
(WebCore::Text::detachText):
Text::attachText/detachText replace virtual Node::attach/detach. They do the part of the work text nodes actually ended up doing.
(WebCore::Text::updateTextRenderer):
* dom/Text.h:
* html/HTMLViewSourceDocument.cpp:
(WebCore::HTMLViewSourceDocument::addText):
* html/PluginDocument.cpp:
(WebCore::PluginDocument::detach):
* html/PluginDocument.h:
* html/parser/HTMLConstructionSite.cpp:
(WebCore::executeTask):
* html/shadow/ContentDistributor.cpp:
(WebCore::ContentDistributor::invalidateDistribution):
* html/shadow/InsertionPoint.cpp:
(WebCore::InsertionPoint::attach):
(WebCore::InsertionPoint::detach):
* loader/PlaceholderDocument.cpp:
(WebCore::PlaceholderDocument::attach):
* loader/PlaceholderDocument.h:
* style/StyleResolveTree.cpp:
(WebCore::Style::resolveLocal):
(WebCore::Style::updateTextStyle):
* xml/parser/XMLDocumentParser.cpp:
(WebCore::XMLDocumentParser::exitText):
* xml/parser/XMLDocumentParserLibxml2.cpp:
(WebCore::XMLDocumentParser::processingInstruction):
(WebCore::XMLDocumentParser::cdataBlock):
(WebCore::XMLDocumentParser::comment):
No need to attach non-rendered nodes.
2013-08-14 Allan Sandfeld Jensen <allan.jensen@digia.com>
ASSERT(m_frame->view() == this) fails
https://bugs.webkit.org/show_bug.cgi?id=119015
Reviewed by Simon Fraser.
Introduced the method fixedLayoutSizeChanged and made it chack if the view
is attached to the frame before issuing contentsResized.
* page/FrameView.cpp:
(WebCore::FrameView::fixedLayoutSizeChanged):
* page/FrameView.h:
* platform/ScrollView.cpp:
(WebCore::ScrollView::setFixedLayoutSize):
(WebCore::ScrollView::setUseFixedLayout):
(WebCore::ScrollView::fixedLayoutSizeChanged):
* platform/ScrollView.h:
2013-08-13 Sergio Villar Senin <svillar@igalia.com>
[CSS Grid Layout] Align our grid-line handling with the updated specification
https://bugs.webkit.org/show_bug.cgi?id=113546
Reviewed by Andreas Kling.
From Blink r148091 by <jchaffraix@chromium.org>
This change makes us match the updated specification by making
grid line numbers to always resolve against the
grid-{column|row}-start edge (the previous code would resolve
grid-{column|row}-end grid lines against the grid-{column|row}-end
edge).
To keep feature parity, negative numbers resolve against the
grid-{column|row}-end edge of the 'explicit grid'.
Test: fast/css-grid-layout/grid-item-negative-integer-explicit-grid-resolution.html
* rendering/RenderGrid.cpp:
(WebCore::estimatedGridSizeForPosition):
(WebCore::RenderGrid::explicitGridColumnCount): New utility function.
(WebCore::RenderGrid::explicitGridRowCount): Ditto.
(WebCore::RenderGrid::maximumIndexInDirection): Use explicitGridXXXCount().
(WebCore::RenderGrid::resolveGridPositionsFromStyle): Check that row-end > row-start.
(WebCore::RenderGrid::resolveGridPositionFromStyle): Clamp negative values to the first line.
* rendering/RenderGrid.h:
* rendering/style/GridPosition.h:
2013-08-14 Gyuyoung Kim <gyuyoung.kim@samsung.com>
Add toSVGTextPathElement(), and use it
https://bugs.webkit.org/show_bug.cgi?id=119783
Reviewed by Ryosuke Niwa.
As a step to clean-up static_cast<SVGXXX>, static_cast<SVGTextPathElement*> can
be changed with toSVGTextPathElement().
* rendering/svg/RenderSVGTextPath.cpp:
(WebCore::RenderSVGTextPath::layoutPath):
(WebCore::RenderSVGTextPath::startOffset):
(WebCore::RenderSVGTextPath::exactAlignment):
(WebCore::RenderSVGTextPath::stretchMethod):
* svg/SVGTextPathElement.h:
(WebCore::toSVGTextPathElement):
2013-08-14 Jinwoo Jeong <jw00.jeong@samsung.com>
FEComponentTransfer could be faster.
https://bugs.webkit.org/show_bug.cgi?id=119671
Reviewed by Christophe Dumez.
Use direct writing to target data instead of calling Uint8ClampedArray::set() function.
This change reduces at least 80% time in the loop of that function.
The Uint8ClampedArray::set() function has index checking code, value checking code and value casting code.
But the index is managed by for loop condition, the value is generated by transferFunction.
And the value is already defined as unsigned char.
Thus all works in Uint8ClampedArray::set() function is redundant.
Removing the call to Uint8ClampedArray::set() function does not reduce stability but improves performance.
* platform/graphics/filters/FEComponentTransfer.cpp:
(WebCore::FEComponentTransfer::platformApplySoftware):
2013-08-13 Gyuyoung Kim <gyuyoung.kim@samsung.com>
The length of scheme is at least five characters even when the scheme has 'web+' prefix
https://bugs.webkit.org/show_bug.cgi?id=119779
Reviewed by Ryosuke Niwa.
The content-scheme handler specification requires that it is SecurityError if the length of
scheme isn't five characters at least, including 'web+' prefix. Thus, we need to check the length
of scheme on the 'web+' scheme.
Spec: http://www.whatwg.org/specs/web-apps/current-work/#custom-handlers
No new tests, just modify existing tests.
* Modules/navigatorcontentutils/NavigatorContentUtils.cpp:
(WebCore::verifyProtocolHandlerScheme):
2013-08-13 Filip Pizlo <fpizlo@apple.com>
Foo::s_info should be Foo::info(), so that you can change how the s_info is actually linked
https://bugs.webkit.org/show_bug.cgi?id=119770
Reviewed by Mark Hahnenberg.
No new tests because no new behavior.
* bindings/js/IDBBindingUtilities.cpp:
(WebCore::createIDBKeyFromValue):
* bindings/js/JSAttrCustom.cpp:
(WebCore::JSAttr::visitChildren):
* bindings/js/JSAudioTrackCustom.cpp:
(WebCore::JSAudioTrack::visitChildren):
* bindings/js/JSAudioTrackListCustom.cpp:
(WebCore::JSAudioTrackList::visitChildren):
* bindings/js/JSBlobCustom.cpp:
(WebCore::JSBlobConstructor::constructJSBlob):
* bindings/js/JSCSSRuleCustom.cpp:
(WebCore::JSCSSRule::visitChildren):
* bindings/js/JSCSSStyleDeclarationCustom.cpp:
(WebCore::JSCSSStyleDeclaration::visitChildren):
(WebCore::JSCSSStyleDeclaration::getOwnPropertyNames):
* bindings/js/JSCanvasRenderingContext2DCustom.cpp:
(WebCore::toHTMLCanvasStyle):
* bindings/js/JSCanvasRenderingContextCustom.cpp:
(WebCore::JSCanvasRenderingContext::visitChildren):
* bindings/js/JSDOMBinding.cpp:
(WebCore::valueToDate):
* bindings/js/JSDOMBinding.h:
(WebCore::DOMConstructorObject::createStructure):
(WebCore::getDOMStructure):
(WebCore::toRefPtrNativeArray):
(WebCore::getStaticValueSlotEntryWithoutCaching):
* bindings/js/JSDOMFormDataCustom.cpp:
(WebCore::toHTMLFormElement):
(WebCore::JSDOMFormData::append):
* bindings/js/JSDOMGlobalObject.cpp:
(WebCore::JSDOMGlobalObject::finishCreation):
(WebCore::JSDOMGlobalObject::scriptExecutionContext):
(WebCore::JSDOMGlobalObject::visitChildren):
* bindings/js/JSDOMGlobalObject.h:
(WebCore::JSDOMGlobalObject::info):
(WebCore::JSDOMGlobalObject::createStructure):
(WebCore::getDOMConstructor):
* bindings/js/JSDOMStringListCustom.cpp:
(WebCore::toDOMStringList):
* bindings/js/JSDOMWindowBase.cpp:
(WebCore::JSDOMWindowBase::finishCreation):
(WebCore::toJSDOMWindow):
* bindings/js/JSDOMWindowBase.h:
(WebCore::JSDOMWindowBase::createStructure):
* bindings/js/JSDOMWindowCustom.cpp:
(WebCore::JSDOMWindow::visitChildren):
(WebCore::JSDOMWindow::getOwnPropertySlot):
(WebCore::JSDOMWindow::getOwnPropertyDescriptor):
(WebCore::toDOMWindow):
* bindings/js/JSDOMWindowShell.cpp:
(WebCore::JSDOMWindowShell::finishCreation):
* bindings/js/JSDOMWindowShell.h:
(WebCore::JSDOMWindowShell::createStructure):
* bindings/js/JSEventTargetCustom.cpp:
(WebCore::toEventTarget):
* bindings/js/JSHistoryCustom.cpp:
(WebCore::JSHistory::getOwnPropertySlotDelegate):
(WebCore::JSHistory::getOwnPropertyDescriptorDelegate):
* bindings/js/JSImageConstructor.cpp:
(WebCore::JSImageConstructor::finishCreation):
* bindings/js/JSImageConstructor.h:
(WebCore::JSImageConstructor::createStructure):
* bindings/js/JSInjectedScriptHostCustom.cpp:
(WebCore::JSInjectedScriptHost::isHTMLAllCollection):
(WebCore::JSInjectedScriptHost::type):
(WebCore::JSInjectedScriptHost::functionDetails):
* bindings/js/JSInspectorFrontendHostCustom.cpp:
(WebCore::populateContextMenuItems):
* bindings/js/JSLocationCustom.cpp:
(WebCore::JSLocation::getOwnPropertySlotDelegate):
(WebCore::JSLocation::getOwnPropertyDescriptorDelegate):
(WebCore::JSLocation::putDelegate):
* bindings/js/JSMessageChannelCustom.cpp:
(WebCore::JSMessageChannel::visitChildren):
* bindings/js/JSMessagePortCustom.cpp:
(WebCore::JSMessagePort::visitChildren):
* bindings/js/JSNodeCustom.cpp:
(WebCore::JSNode::pushEventHandlerScope):
(WebCore::JSNode::visitChildren):
* bindings/js/JSNodeFilterCustom.cpp:
(WebCore::JSNodeFilter::visitChildren):
(WebCore::toNodeFilter):
* bindings/js/JSNodeIteratorCustom.cpp:
(WebCore::JSNodeIterator::visitChildren):
* bindings/js/JSPluginElementFunctions.h:
(WebCore::pluginElementCustomGetOwnPropertySlot):
(WebCore::pluginElementCustomGetOwnPropertyDescriptor):
* bindings/js/JSSVGElementInstanceCustom.cpp:
(WebCore::JSSVGElementInstance::visitChildren):
* bindings/js/JSSharedWorkerCustom.cpp:
(WebCore::JSSharedWorker::visitChildren):
* bindings/js/JSStyleSheetCustom.cpp:
(WebCore::JSStyleSheet::visitChildren):
* bindings/js/JSTextTrackCueCustom.cpp:
(WebCore::JSTextTrackCue::visitChildren):
* bindings/js/JSTextTrackCustom.cpp:
(WebCore::JSTextTrack::visitChildren):
* bindings/js/JSTextTrackListCustom.cpp:
(WebCore::JSTextTrackList::visitChildren):
* bindings/js/JSTrackCustom.cpp:
(WebCore::toTrack):
* bindings/js/JSTreeWalkerCustom.cpp:
(WebCore::JSTreeWalker::visitChildren):
* bindings/js/JSVideoTrackCustom.cpp:
(WebCore::JSVideoTrack::visitChildren):
* bindings/js/JSVideoTrackListCustom.cpp:
(WebCore::JSVideoTrackList::visitChildren):
* bindings/js/JSWebGLRenderingContextCustom.cpp:
(WebCore::JSWebGLRenderingContext::visitChildren):
(WebCore::JSWebGLRenderingContext::getAttachedShaders):
(WebCore::JSWebGLRenderingContext::getProgramParameter):
(WebCore::JSWebGLRenderingContext::getShaderParameter):
(WebCore::JSWebGLRenderingContext::getUniform):
(WebCore::dataFunctionf):
(WebCore::dataFunctioni):
(WebCore::dataFunctionMatrix):
* bindings/js/JSWorkerGlobalScopeBase.cpp:
(WebCore::JSWorkerGlobalScopeBase::finishCreation):
(WebCore::toJSDedicatedWorkerGlobalScope):
(WebCore::toJSSharedWorkerGlobalScope):
* bindings/js/JSWorkerGlobalScopeBase.h:
(WebCore::JSWorkerGlobalScopeBase::createStructure):
* bindings/js/JSWorkerGlobalScopeCustom.cpp:
(WebCore::JSWorkerGlobalScope::visitChildren):
* bindings/js/JSXMLHttpRequestCustom.cpp:
(WebCore::JSXMLHttpRequest::visitChildren):
(WebCore::JSXMLHttpRequest::send):
* bindings/js/JSXPathResultCustom.cpp:
(WebCore::JSXPathResult::visitChildren):
* bindings/js/ScriptDebugServer.cpp:
(WebCore::ScriptDebugServer::dispatchDidPause):
* bindings/js/ScriptState.cpp:
(WebCore::domWindowFromScriptState):
(WebCore::scriptExecutionContextFromScriptState):
* bindings/js/SerializedScriptValue.cpp:
(WebCore::CloneSerializer::isArray):
(WebCore::CloneSerializer::dumpArrayBufferView):
(WebCore::CloneSerializer::dumpIfTerminal):
(WebCore::CloneSerializer::serialize):
(WebCore::CloneDeserializer::CloneDeserializer):
(WebCore::CloneDeserializer::readArrayBufferView):
* bindings/objc/DOM.mm:
(+[DOMNode _nodeFromJSWrapper:]):
* bindings/objc/DOMUtility.mm:
(JSC::createDOMWrapper):
* bindings/objc/WebScriptObject.mm:
(+[WebScriptObject _convertValueToObjcValue:JSC::originRootObject:rootObject:]):
* bindings/scripts/CodeGeneratorJS.pm:
(GenerateGetOwnPropertySlotBody):
(GenerateGetOwnPropertyDescriptorBody):
(GenerateHeader):
(GenerateParametersCheckExpression):
(GenerateImplementation):
(GenerateParametersCheck):
(GenerateConstructorDeclaration):
(GenerateConstructorHelperMethods):
* bindings/scripts/test/JS/JSFloat64Array.cpp:
(WebCore::JSFloat64ArrayConstructor::finishCreation):
(WebCore::JSFloat64Array::finishCreation):
(WebCore::JSFloat64Array::getOwnPropertySlot):
(WebCore::JSFloat64Array::getOwnPropertyDescriptor):
(WebCore::JSFloat64Array::getOwnPropertySlotByIndex):
(WebCore::JSFloat64Array::put):
(WebCore::JSFloat64Array::putByIndex):
(WebCore::JSFloat64Array::getOwnPropertyNames):
(WebCore::jsFloat64ArrayPrototypeFunctionFoo):
(WebCore::jsFloat64ArrayPrototypeFunctionSet):
(WebCore::JSFloat64Array::getByIndex):
(WebCore::toFloat64Array):
* bindings/scripts/test/JS/JSFloat64Array.h:
(WebCore::JSFloat64Array::createStructure):
(WebCore::JSFloat64ArrayPrototype::createStructure):
(WebCore::JSFloat64ArrayConstructor::createStructure):
* bindings/scripts/test/JS/JSTestActiveDOMObject.cpp:
(WebCore::JSTestActiveDOMObjectConstructor::finishCreation):
(WebCore::JSTestActiveDOMObject::finishCreation):
(WebCore::JSTestActiveDOMObject::getOwnPropertySlot):
(WebCore::JSTestActiveDOMObject::getOwnPropertyDescriptor):
(WebCore::jsTestActiveDOMObjectPrototypeFunctionExcitingFunction):
(WebCore::jsTestActiveDOMObjectPrototypeFunctionPostMessage):
(WebCore::toTestActiveDOMObject):
* bindings/scripts/test/JS/JSTestActiveDOMObject.h:
(WebCore::JSTestActiveDOMObject::createStructure):
(WebCore::JSTestActiveDOMObjectPrototype::createStructure):
(WebCore::JSTestActiveDOMObjectConstructor::createStructure):
* bindings/scripts/test/JS/JSTestCustomNamedGetter.cpp:
(WebCore::JSTestCustomNamedGetterConstructor::finishCreation):
(WebCore::JSTestCustomNamedGetter::finishCreation):
(WebCore::JSTestCustomNamedGetter::getOwnPropertySlot):
(WebCore::JSTestCustomNamedGetter::getOwnPropertyDescriptor):
(WebCore::JSTestCustomNamedGetter::getOwnPropertySlotByIndex):
(WebCore::jsTestCustomNamedGetterPrototypeFunctionAnotherFunction):
(WebCore::toTestCustomNamedGetter):
* bindings/scripts/test/JS/JSTestCustomNamedGetter.h:
(WebCore::JSTestCustomNamedGetter::createStructure):
(WebCore::JSTestCustomNamedGetterPrototype::createStructure):
(WebCore::JSTestCustomNamedGetterConstructor::createStructure):
* bindings/scripts/test/JS/JSTestEventConstructor.cpp:
(WebCore::JSTestEventConstructorConstructor::finishCreation):
(WebCore::JSTestEventConstructor::finishCreation):
(WebCore::JSTestEventConstructor::getOwnPropertySlot):
(WebCore::JSTestEventConstructor::getOwnPropertyDescriptor):
(WebCore::toTestEventConstructor):
* bindings/scripts/test/JS/JSTestEventConstructor.h:
(WebCore::JSTestEventConstructor::createStructure):
(WebCore::JSTestEventConstructorPrototype::createStructure):
(WebCore::JSTestEventConstructorConstructor::createStructure):
* bindings/scripts/test/JS/JSTestEventTarget.cpp:
(WebCore::JSTestEventTargetConstructor::finishCreation):
(WebCore::JSTestEventTarget::finishCreation):
(WebCore::JSTestEventTarget::getOwnPropertySlot):
(WebCore::JSTestEventTarget::getOwnPropertyDescriptor):
(WebCore::JSTestEventTarget::getOwnPropertySlotByIndex):
(WebCore::JSTestEventTarget::getOwnPropertyNames):
(WebCore::jsTestEventTargetPrototypeFunctionItem):
(WebCore::jsTestEventTargetPrototypeFunctionAddEventListener):
(WebCore::jsTestEventTargetPrototypeFunctionRemoveEventListener):
(WebCore::jsTestEventTargetPrototypeFunctionDispatchEvent):
(WebCore::JSTestEventTarget::visitChildren):
(WebCore::JSTestEventTarget::indexGetter):
(WebCore::toTestEventTarget):
* bindings/scripts/test/JS/JSTestEventTarget.h:
(WebCore::JSTestEventTarget::createStructure):
(WebCore::JSTestEventTargetPrototype::createStructure):
(WebCore::JSTestEventTargetConstructor::createStructure):
* bindings/scripts/test/JS/JSTestException.cpp:
(WebCore::JSTestExceptionConstructor::finishCreation):
(WebCore::JSTestException::finishCreation):
(WebCore::JSTestException::getOwnPropertySlot):
(WebCore::JSTestException::getOwnPropertyDescriptor):
(WebCore::toTestException):
* bindings/scripts/test/JS/JSTestException.h:
(WebCore::JSTestException::createStructure):
(WebCore::JSTestExceptionPrototype::createStructure):
(WebCore::JSTestExceptionConstructor::createStructure):
* bindings/scripts/test/JS/JSTestInterface.cpp:
(WebCore::JSTestInterfaceConstructor::finishCreation):
(WebCore::JSTestInterface::finishCreation):
(WebCore::JSTestInterface::getOwnPropertySlot):
(WebCore::JSTestInterface::getOwnPropertyDescriptor):
(WebCore::JSTestInterface::put):
(WebCore::JSTestInterface::putByIndex):
(WebCore::jsTestInterfacePrototypeFunctionImplementsMethod1):
(WebCore::jsTestInterfacePrototypeFunctionImplementsMethod2):
(WebCore::jsTestInterfacePrototypeFunctionImplementsMethod3):
(WebCore::jsTestInterfacePrototypeFunctionSupplementalMethod1):
(WebCore::jsTestInterfacePrototypeFunctionSupplementalMethod2):
(WebCore::jsTestInterfacePrototypeFunctionSupplementalMethod3):
(WebCore::toTestInterface):
* bindings/scripts/test/JS/JSTestInterface.h:
(WebCore::JSTestInterface::createStructure):
(WebCore::JSTestInterfacePrototype::createStructure):
(WebCore::JSTestInterfaceConstructor::createStructure):
* bindings/scripts/test/JS/JSTestMediaQueryListListener.cpp:
(WebCore::JSTestMediaQueryListListenerConstructor::finishCreation):
(WebCore::JSTestMediaQueryListListener::finishCreation):
(WebCore::JSTestMediaQueryListListener::getOwnPropertySlot):
(WebCore::JSTestMediaQueryListListener::getOwnPropertyDescriptor):
(WebCore::jsTestMediaQueryListListenerPrototypeFunctionMethod):
(WebCore::toTestMediaQueryListListener):
* bindings/scripts/test/JS/JSTestMediaQueryListListener.h:
(WebCore::JSTestMediaQueryListListener::createStructure):
(WebCore::JSTestMediaQueryListListenerPrototype::createStructure):
(WebCore::JSTestMediaQueryListListenerConstructor::createStructure):
* bindings/scripts/test/JS/JSTestNamedConstructor.cpp:
(WebCore::JSTestNamedConstructorConstructor::finishCreation):
(WebCore::JSTestNamedConstructorNamedConstructor::finishCreation):
(WebCore::JSTestNamedConstructor::finishCreation):
(WebCore::JSTestNamedConstructor::getOwnPropertySlot):
(WebCore::JSTestNamedConstructor::getOwnPropertyDescriptor):
(WebCore::toTestNamedConstructor):
* bindings/scripts/test/JS/JSTestNamedConstructor.h:
(WebCore::JSTestNamedConstructor::createStructure):
(WebCore::JSTestNamedConstructorPrototype::createStructure):
(WebCore::JSTestNamedConstructorConstructor::createStructure):
(WebCore::JSTestNamedConstructorNamedConstructor::createStructure):
* bindings/scripts/test/JS/JSTestNode.cpp:
(WebCore::JSTestNodeConstructor::finishCreation):
(WebCore::JSTestNode::finishCreation):
(WebCore::JSTestNode::getOwnPropertySlot):
(WebCore::JSTestNode::getOwnPropertyDescriptor):
(WebCore::JSTestNode::visitChildren):
* bindings/scripts/test/JS/JSTestNode.h:
(WebCore::JSTestNode::createStructure):
(WebCore::JSTestNodePrototype::createStructure):
(WebCore::JSTestNodeConstructor::createStructure):
* bindings/scripts/test/JS/JSTestObj.cpp:
(WebCore::JSTestObjConstructor::finishCreation):
(WebCore::JSTestObj::finishCreation):
(WebCore::JSTestObj::getOwnPropertySlot):
(WebCore::JSTestObj::getOwnPropertyDescriptor):
(WebCore::JSTestObj::put):
(WebCore::jsTestObjPrototypeFunctionVoidMethod):
(WebCore::jsTestObjPrototypeFunctionVoidMethodWithArgs):
(WebCore::jsTestObjPrototypeFunctionByteMethod):
(WebCore::jsTestObjPrototypeFunctionByteMethodWithArgs):
(WebCore::jsTestObjPrototypeFunctionOctetMethod):
(WebCore::jsTestObjPrototypeFunctionOctetMethodWithArgs):
(WebCore::jsTestObjPrototypeFunctionLongMethod):
(WebCore::jsTestObjPrototypeFunctionLongMethodWithArgs):
(WebCore::jsTestObjPrototypeFunctionObjMethod):
(WebCore::jsTestObjPrototypeFunctionObjMethodWithArgs):
(WebCore::jsTestObjPrototypeFunctionMethodWithSequenceArg):
(WebCore::jsTestObjPrototypeFunctionMethodReturningSequence):
(WebCore::jsTestObjPrototypeFunctionMethodWithEnumArg):
(WebCore::jsTestObjPrototypeFunctionMethodThatRequiresAllArgsAndThrows):
(WebCore::jsTestObjPrototypeFunctionSerializedValue):
(WebCore::jsTestObjPrototypeFunctionOptionsObject):
(WebCore::jsTestObjPrototypeFunctionMethodWithException):
(WebCore::jsTestObjPrototypeFunctionCustomMethod):
(WebCore::jsTestObjPrototypeFunctionCustomMethodWithArgs):
(WebCore::jsTestObjPrototypeFunctionAddEventListener):
(WebCore::jsTestObjPrototypeFunctionRemoveEventListener):
(WebCore::jsTestObjPrototypeFunctionWithScriptStateVoid):
(WebCore::jsTestObjPrototypeFunctionWithScriptStateObj):
(WebCore::jsTestObjPrototypeFunctionWithScriptStateVoidException):
(WebCore::jsTestObjPrototypeFunctionWithScriptStateObjException):
(WebCore::jsTestObjPrototypeFunctionWithScriptExecutionContext):
(WebCore::jsTestObjPrototypeFunctionWithScriptExecutionContextAndScriptState):
(WebCore::jsTestObjPrototypeFunctionWithScriptExecutionContextAndScriptStateObjException):
(WebCore::jsTestObjPrototypeFunctionWithScriptExecutionContextAndScriptStateWithSpaces):
(WebCore::jsTestObjPrototypeFunctionWithScriptArgumentsAndCallStack):
(WebCore::jsTestObjPrototypeFunctionMethodWithOptionalArg):
(WebCore::jsTestObjPrototypeFunctionMethodWithNonOptionalArgAndOptionalArg):
(WebCore::jsTestObjPrototypeFunctionMethodWithNonOptionalArgAndTwoOptionalArgs):
(WebCore::jsTestObjPrototypeFunctionMethodWithOptionalString):
(WebCore::jsTestObjPrototypeFunctionMethodWithOptionalStringIsUndefined):
(WebCore::jsTestObjPrototypeFunctionMethodWithOptionalStringIsNullString):
(WebCore::jsTestObjPrototypeFunctionMethodWithCallbackArg):
(WebCore::jsTestObjPrototypeFunctionMethodWithNonCallbackArgAndCallbackArg):
(WebCore::jsTestObjPrototypeFunctionMethodWithCallbackAndOptionalArg):
(WebCore::jsTestObjPrototypeFunctionConditionalMethod1):
(WebCore::jsTestObjPrototypeFunctionConditionalMethod2):
(WebCore::jsTestObjPrototypeFunctionConditionalMethod3):
(WebCore::jsTestObjPrototypeFunctionOverloadedMethod1):
(WebCore::jsTestObjPrototypeFunctionOverloadedMethod2):
(WebCore::jsTestObjPrototypeFunctionOverloadedMethod3):
(WebCore::jsTestObjPrototypeFunctionOverloadedMethod4):
(WebCore::jsTestObjPrototypeFunctionOverloadedMethod5):
(WebCore::jsTestObjPrototypeFunctionOverloadedMethod6):
(WebCore::jsTestObjPrototypeFunctionOverloadedMethod7):
(WebCore::jsTestObjPrototypeFunctionOverloadedMethod8):
(WebCore::jsTestObjPrototypeFunctionOverloadedMethod9):
(WebCore::jsTestObjPrototypeFunctionOverloadedMethod10):
(WebCore::jsTestObjPrototypeFunctionOverloadedMethod11):
(WebCore::jsTestObjPrototypeFunctionOverloadedMethod):
(WebCore::jsTestObjPrototypeFunctionClassMethodWithClamp):
(WebCore::jsTestObjPrototypeFunctionMethodWithUnsignedLongSequence):
(WebCore::jsTestObjPrototypeFunctionStringArrayFunction):
(WebCore::jsTestObjPrototypeFunctionDomStringListFunction):
(WebCore::jsTestObjPrototypeFunctionGetSVGDocument):
(WebCore::jsTestObjPrototypeFunctionConvert1):
(WebCore::jsTestObjPrototypeFunctionConvert2):
(WebCore::jsTestObjPrototypeFunctionConvert4):
(WebCore::jsTestObjPrototypeFunctionConvert5):
(WebCore::jsTestObjPrototypeFunctionMutablePointFunction):
(WebCore::jsTestObjPrototypeFunctionImmutablePointFunction):
(WebCore::jsTestObjPrototypeFunctionOrange):
(WebCore::jsTestObjPrototypeFunctionStrictFunction):
(WebCore::jsTestObjPrototypeFunctionVariadicStringMethod):
(WebCore::jsTestObjPrototypeFunctionVariadicDoubleMethod):
(WebCore::jsTestObjPrototypeFunctionVariadicNodeMethod):
(WebCore::JSTestObj::visitChildren):
(WebCore::toTestObj):
* bindings/scripts/test/JS/JSTestObj.h:
(WebCore::JSTestObj::createStructure):
(WebCore::JSTestObjPrototype::createStructure):
(WebCore::JSTestObjConstructor::createStructure):
* bindings/scripts/test/JS/JSTestOverloadedConstructors.cpp:
(WebCore::JSTestOverloadedConstructorsConstructor::constructJSTestOverloadedConstructors):
(WebCore::JSTestOverloadedConstructorsConstructor::finishCreation):
(WebCore::JSTestOverloadedConstructors::finishCreation):
(WebCore::JSTestOverloadedConstructors::getOwnPropertySlot):
(WebCore::JSTestOverloadedConstructors::getOwnPropertyDescriptor):
(WebCore::toTestOverloadedConstructors):
* bindings/scripts/test/JS/JSTestOverloadedConstructors.h:
(WebCore::JSTestOverloadedConstructors::createStructure):
(WebCore::JSTestOverloadedConstructorsPrototype::createStructure):
(WebCore::JSTestOverloadedConstructorsConstructor::createStructure):
* bindings/scripts/test/JS/JSTestSerializedScriptValueInterface.cpp:
(WebCore::JSTestSerializedScriptValueInterfaceConstructor::finishCreation):
(WebCore::JSTestSerializedScriptValueInterface::finishCreation):
(WebCore::JSTestSerializedScriptValueInterface::getOwnPropertySlot):
(WebCore::JSTestSerializedScriptValueInterface::getOwnPropertyDescriptor):
(WebCore::JSTestSerializedScriptValueInterface::put):
(WebCore::JSTestSerializedScriptValueInterface::visitChildren):
(WebCore::toTestSerializedScriptValueInterface):
* bindings/scripts/test/JS/JSTestSerializedScriptValueInterface.h:
(WebCore::JSTestSerializedScriptValueInterface::createStructure):
(WebCore::JSTestSerializedScriptValueInterfacePrototype::createStructure):
(WebCore::JSTestSerializedScriptValueInterfaceConstructor::createStructure):
* bindings/scripts/test/JS/JSTestTypedefs.cpp:
(WebCore::JSTestTypedefsConstructor::finishCreation):
(WebCore::JSTestTypedefs::finishCreation):
(WebCore::JSTestTypedefs::getOwnPropertySlot):
(WebCore::JSTestTypedefs::getOwnPropertyDescriptor):
(WebCore::JSTestTypedefs::put):
(WebCore::jsTestTypedefsPrototypeFunctionFunc):
(WebCore::jsTestTypedefsPrototypeFunctionSetShadow):
(WebCore::jsTestTypedefsPrototypeFunctionMethodWithSequenceArg):
(WebCore::jsTestTypedefsPrototypeFunctionNullableArrayArg):
(WebCore::jsTestTypedefsPrototypeFunctionFuncWithClamp):
(WebCore::jsTestTypedefsPrototypeFunctionImmutablePointFunction):
(WebCore::jsTestTypedefsPrototypeFunctionStringArrayFunction):
(WebCore::jsTestTypedefsPrototypeFunctionStringArrayFunction2):
(WebCore::jsTestTypedefsPrototypeFunctionMethodWithException):
(WebCore::toTestTypedefs):
* bindings/scripts/test/JS/JSTestTypedefs.h:
(WebCore::JSTestTypedefs::createStructure):
(WebCore::JSTestTypedefsPrototype::createStructure):
(WebCore::JSTestTypedefsConstructor::createStructure):
* bridge/c/CRuntimeObject.cpp:
(JSC::Bindings::CRuntimeObject::finishCreation):
* bridge/c/CRuntimeObject.h:
(JSC::Bindings::CRuntimeObject::createStructure):
* bridge/c/c_instance.cpp:
(JSC::Bindings::CRuntimeMethod::createStructure):
(JSC::Bindings::CRuntimeMethod::finishCreation):
(JSC::Bindings::CInstance::invokeMethod):
* bridge/c/c_utility.cpp:
(JSC::Bindings::convertValueToNPVariant):
* bridge/objc/ObjCRuntimeObject.h:
(JSC::Bindings::ObjCRuntimeObject::createStructure):
* bridge/objc/objc_instance.mm:
(ObjCRuntimeMethod::finishCreation):
(ObjcInstance::invokeMethod):
* bridge/objc/objc_runtime.h:
(JSC::Bindings::ObjcFallbackObjectImp::createStructure):
* bridge/objc/objc_runtime.mm:
(JSC::Bindings::ObjcFallbackObjectImp::finishCreation):
(JSC::Bindings::callObjCFallbackObject):
* bridge/qt/qt_instance.cpp:
(JSC::Bindings::QtRuntimeObject::createStructure):
(JSC::Bindings::QtInstance::getInstance):
* bridge/qt/qt_pixmapruntime.cpp:
(JSC::Bindings::assignToHTMLImageElement):
(JSC::Bindings::QtPixmapRuntime::toQt):
* bridge/qt/qt_runtime.cpp:
(JSC::Bindings::isJSUint8Array):
(JSC::Bindings::isJSArray):
(JSC::Bindings::isJSDate):
(JSC::Bindings::isQtObject):
(JSC::Bindings::unwrapBoxedPrimitive):
(JSC::Bindings::convertQVariantToValue):
* bridge/runtime_array.cpp:
(JSC::RuntimeArray::finishCreation):
* bridge/runtime_array.h:
(JSC::RuntimeArray::createStructure):
* bridge/runtime_method.cpp:
(JSC::RuntimeMethod::finishCreation):
(JSC::callRuntimeMethod):
* bridge/runtime_method.h:
(JSC::RuntimeMethod::createStructure):
* bridge/runtime_object.cpp:
(JSC::Bindings::RuntimeObject::finishCreation):
(JSC::Bindings::callRuntimeObject):
(JSC::Bindings::callRuntimeConstructor):
* bridge/runtime_object.h:
(JSC::Bindings::RuntimeObject::createStructure):
2013-08-13 Ryosuke Niwa <rniwa@webkit.org>
REGRESSION(r150187): Safari fails to render allrecipe.com comment popups
https://bugs.webkit.org/show_bug.cgi?id=119780
Reviewed by Benjamin Poulain.
The bug was caused by SelectorDataList::executeFastPathForIdSelector not verifying that
elements found by getAllElementsById are descendents of rootNode when there are multiple
elements of the same id. This resulted in querySelector and querySelectorAll of an element
returning nodes outside of the element.
Fixed the bug by checking this condition when we have multiple elements of the same id.
Test: fast/selectors/querySelector-id-with-multiple-elements-with-same-id.html
* dom/SelectorQuery.cpp:
(WebCore::SelectorDataList::executeFastPathForIdSelector):
2013-08-12 Ryosuke Niwa <rniwa@webkit.org>
Fix orphan needsLayout state in RenderTextControlSingleLine
https://bugs.webkit.org/show_bug.cgi?id=119726
Reviewed by Kent Tamura.
Merge https://chromium.googlesource.com/chromium/blink/+/c0aec52ef348b2be0c882f8646fe3cf537831f59
We should mark the renderer for containerElement, which wraps innerTextElement and innerBlockElement
in cases of input[type=search] and input[type=number], dirty.
* rendering/RenderTextControlSingleLine.cpp:
(WebCore::setNeedsLayoutOnAncestors):
(WebCore::RenderTextControlSingleLine::layout):
2013-08-13 Sam Weinig <sam@webkit.org>
[Re-land] Cleanup MediaQueryListListener
https://bugs.webkit.org/show_bug.cgi?id=119664
Reviewed by Andreas Kling.
Make MediaQueryListListener a proper WebIDL callback.
* CMakeLists.txt:
* DerivedSources.cpp:
* DerivedSources.make:
* DerivedSources.pri:
* GNUmakefile.list.am:
* Target.pri:
* WebCore.vcxproj/WebCore.vcxproj:
* WebCore.vcxproj/WebCore.vcxproj.filters:
* WebCore.xcodeproj/project.pbxproj:
Update project files.
* bindings/scripts/CodeGeneratorJS.pm:
(GenerateCallbackHeader):
(GenerateCallbackImplementation):
(JSValueToNative):
* bindings/scripts/IDLAttributes.txt:
Add support for CallbackNeedsOperatorEqual, which adds an operator==.
* css/MediaAllInOne.cpp:
Remove MediaQueryListListener.cpp.
* css/MediaQueryListListener.cpp:
Removed.
* css/MediaQueryListListener.h:
(WebCore::MediaQueryListListener::~MediaQueryListListener):
(WebCore::MediaQueryListListener::MediaQueryListListener):
* css/MediaQueryListListener.idl:
Convert to a proper WebIDL callback.
* css/MediaQueryMatcher.cpp:
(WebCore::MediaQueryMatcher::Listener::evaluate):
(WebCore::MediaQueryMatcher::styleResolverChanged):
* css/MediaQueryMatcher.h:
Remove all traces of the ScriptState.
2013-08-13 Dean Jackson <dino@apple.com>
<https://webkit.org/b/119776> Don't use ScriptProfiler to find canvases for instrumentation
Reviewed by Joseph Pecoraro.
InspectorCanvasAgent::findFramesWithUninstrumentedCanvases uses a ScriptProfiler to walk the tree
looking for canvas elements. This is currently not implemented in JSC, but we can do this directly
with DOM methods. We're only looking for Canvas elements that have a context, so there isn't a need
for this abstract walking object.
* html/HTMLCanvasElement.h: Add new helpers to cast to <canvas>.
(WebCore::isHTMLCanvasElement):
(WebCore::toHTMLCanvasElement):
* inspector/InspectorCanvasAgent.cpp:
(WebCore::InspectorCanvasAgent::findFramesWithUninstrumentedCanvases): Simply walk
the frame tree and use getElementsByTagName to find canvas elements.
* bindings/js/bindings/js/ScriptProfiler.h: Removed unused method.
2013-08-13 Brent Fulgham <bfulgham@apple.com>
[Windows] Windows is incorrectly using a LayerTypeTiledBackingLayer
https://bugs.webkit.org/show_bug.cgi?id=119772
Reviewed by Simon Fraser.
* platform/graphics/ca/GraphicsLayerCA.cpp:
(WebCore::GraphicsLayerCA::swapFromOrToTiledLayer): Ensure that we use
the correct (supported) tiled layer type for Windows.
* platform/graphics/ca/win/PlatformCALayerWin.cpp:
(PlatformCALayer::PlatformCALayer): Add an assertion to notify us if
we introduce this mistake again in the future.
2013-08-13 Anders Carlsson <andersca@apple.com>
<https://webkit.org/b/119771> Use NeverDestroyed for smart pointer slot static locals
Reviewed by Andreas Kling.
This is preparation for making it a hard error to use DEFINE_STATIC_LOCAL with smart pointer types.
* dom/UserTypingGestureIndicator.cpp:
(WebCore::focusedNode):
* page/mac/EventHandlerMac.mm:
(WebCore::currentNSEventSlot):
* platform/network/cf/NetworkStorageSessionCFNet.cpp:
(WebCore::defaultNetworkStorageSession):
(WebCore::cookieStorageOverride):
2013-08-13 Anders Carlsson <andersca@apple.com>
Stop using DEFINE_STATIC_LOCAL with RefPtr
https://bugs.webkit.org/show_bug.cgi?id=119769
Reviewed by Andreas Kling.
No need to waste heap memory allocating RefPtr, just store the raw pointers directly.
* dom/ContextFeatures.cpp:
(WebCore::ContextFeatures::defaultSwitch):
* dom/DocumentMarker.cpp:
(WebCore::DocumentMarkerTextMatch::instanceFor):
* editing/EditingStyle.cpp:
(WebCore::StyleChange::extractTextStyles):
* html/FTPDirectoryDocument.cpp:
(WebCore::FTPDirectoryDocumentParser::loadDocumentTemplate):
* html/HTMLPlugInImageElement.cpp:
(WebCore::HTMLPlugInImageElement::didAddUserAgentShadowRoot):
* html/track/TextTrack.cpp:
(WebCore::TextTrack::captionMenuOffItem):
(WebCore::TextTrack::captionMenuAutomaticItem):
* loader/icon/IconDatabase.cpp:
(WebCore::loadDefaultIconRecord):
* platform/graphics/Image.cpp:
(WebCore::Image::nullImage):
* platform/graphics/PlatformTextTrack.h:
(WebCore::PlatformTextTrack::captionMenuOffItem):
(WebCore::PlatformTextTrack::captionMenuAutomaticItem):
* rendering/style/RenderStyle.cpp:
(WebCore::RenderStyle::initialShapeInside):
* testing/MockCDM.cpp:
(WebCore::initDataPrefix):
(WebCore::keyPrefix):
(WebCore::keyRequest):
2013-08-13 Anders Carlsson <andersca@apple.com>
Stop using DEFINE_STATIC_LOCAL with RetainPtr
https://bugs.webkit.org/show_bug.cgi?id=119765
Reviewed by Jessie Berlin.
No need to waste heap memory allocating RetainPtrs, just store the raw pointers directly.
* platform/graphics/mac/ColorMac.mm:
(WebCore::nsColor):
* platform/graphics/mac/GraphicsContextMac.mm:
(WebCore::makePatternColor):
(WebCore::GraphicsContext::drawLineForDocumentMarker):
* platform/graphics/mac/SimpleFontDataMac.mm:
(WebCore::webFallbackFontFamily):
2013-08-13 Commit Queue <commit-queue@webkit.org>
Unreviewed, rolling out r153925.
http://trac.webkit.org/changeset/153925
https://bugs.webkit.org/show_bug.cgi?id=119768
broke fast/media/media-query-list-07.html (Requested by kling
on #webkit).
* CMakeLists.txt:
* DerivedSources.cpp:
* DerivedSources.make:
* DerivedSources.pri:
* GNUmakefile.list.am:
* Target.pri:
* WebCore.vcxproj/WebCore.vcxproj:
* WebCore.vcxproj/WebCore.vcxproj.filters:
* WebCore.xcodeproj/project.pbxproj:
* bindings/scripts/CodeGeneratorJS.pm:
(GenerateCallbackHeader):
(GenerateCallbackImplementation):
(JSValueToNative):
* bindings/scripts/IDLAttributes.txt:
* bindings/scripts/test/JS/JSTestCallback.cpp:
(WebCore::JSTestCallback::JSTestCallback):
* bindings/scripts/test/JS/JSTestMediaQueryListListener.cpp:
(WebCore::jsTestMediaQueryListListenerPrototypeFunctionMethod):
* css/MediaAllInOne.cpp:
* css/MediaQueryListListener.cpp: Copied from Source/WebCore/css/MediaQueryListListener.idl.
(WebCore::MediaQueryListListener::queryChanged):
* css/MediaQueryListListener.h:
(WebCore::MediaQueryListListener::create):
(WebCore::MediaQueryListListener::operator==):
(WebCore::MediaQueryListListener::MediaQueryListListener):
* css/MediaQueryListListener.idl:
* css/MediaQueryMatcher.cpp:
(WebCore::MediaQueryMatcher::Listener::evaluate):
(WebCore::MediaQueryMatcher::styleResolverChanged):
* css/MediaQueryMatcher.h:
2013-08-13 Simon Fraser <simon.fraser@apple.com>
Every scroll causes additional layer tree work because of flatteningLayer->removeFromParent();
https://bugs.webkit.org/show_bug.cgi?id=119551
Reviewed by Dean Jackson.
Only re-parent the flattening layer if we had to update our
layer configuration (reparenting is necessary then to get
the correct sibling ordering), or if it was parented in some
other layer.
This avoid unnecessary flushing of state to CA.
* rendering/RenderLayerBacking.cpp:
(WebCore::RenderLayerBacking::updateGraphicsLayerConfiguration):
2013-08-13 Robert Hogan <robert@webkit.org>
Section's collapsed borders painted in wrong place in rtl tables
https://bugs.webkit.org/show_bug.cgi?id=119691
Reviewed by Darin Adler.
Table row-groups can be RTL too, so look to the section rather than the
table when deciding the direction of a row. The section will inherit the
table's direction if it doesn't override it.
Test: fast/table/paint-collapsed-borders-rtl-section.html
* rendering/RenderTableCell.cpp:
(WebCore::RenderTableCell::hasStartBorderAdjoiningTable):
(WebCore::RenderTableCell::hasEndBorderAdjoiningTable):
2013-08-13 Christophe Dumez <ch.dumez@sisa.samsung.com>
NodeList.item() does not behave according to specification
https://bugs.webkit.org/show_bug.cgi?id=119722
Reviewed by Darin Adler.
Make NodeList.item() indexed getter behave according to specification:
http://dom.spec.whatwg.org/#nodelist
Namely, we no longer throw if the index is negative (meaning the
[IsIndex] extended attribute is dropped) and the argument is now
mandatory.
This behavior is consistent with both IE10 and Firefox and since
recently Blink.
Test: fast/dom/nodelist-item-parameter.html
* dom/NodeList.idl:
2013-08-13 Anders Carlsson <andersca@apple.com>
Fix build.
* WebCore.exp.in:
2013-08-13 Allan Sandfeld Jensen <allan.jensen@digia.com>
REGRESSION(SUBPIXEL_LAYOUT) Composited layers can cause one pixel shifts
https://bugs.webkit.org/show_bug.cgi?id=115304
Reviewed by David Hyatt.
Accelerated layers can cause blocks at subpixel offsets to shift because
accumulated subpixel offsets are lost between each layers.
To solve this layer bounds are now calculated in LayoutUnits, and their
subpixel offset saved so it can be used to ensure correct pixel-snapping
during painting.
Test: fast/sub-pixel/sub-pixel-composited-layers.html
* WebCore.exp.in:
* inspector/InspectorLayerTreeAgent.cpp:
(WebCore::InspectorLayerTreeAgent::buildObjectForLayer):
* platform/graphics/LayoutPoint.h:
(WebCore::LayoutPoint::fraction):
* rendering/RenderLayer.cpp:
(WebCore::RenderLayer::setupClipPath):
(WebCore::RenderLayer::setupFilters):
(WebCore::RenderLayer::paintLayerContents):
(WebCore::RenderLayer::calculateLayerBounds):
* rendering/RenderLayer.h:
* rendering/RenderLayerBacking.cpp:
(WebCore::RenderLayerBacking::updateCompositedBounds):
(WebCore::RenderLayerBacking::updateAfterWidgetResize):
(WebCore::RenderLayerBacking::updateGraphicsLayerGeometry):
(WebCore::RenderLayerBacking::resetContentsRect):
(WebCore::RenderLayerBacking::contentOffsetInCompostingLayer):
(WebCore::RenderLayerBacking::contentsBox):
(WebCore::RenderLayerBacking::backgroundBox):
(WebCore::RenderLayerBacking::paintIntoLayer):
(WebCore::RenderLayerBacking::paintContents):
(WebCore::RenderLayerBacking::compositedBounds):
(WebCore::RenderLayerBacking::setCompositedBounds):
* rendering/RenderLayerBacking.h:
* rendering/RenderLayerCompositor.cpp:
(WebCore::RenderLayerCompositor::logLayerInfo):
(WebCore::RenderLayerCompositor::calculateCompositedBounds):
* rendering/RenderLayerCompositor.h:
* rendering/RenderTreeAsText.cpp:
(WebCore::operator<<):
* rendering/RenderTreeAsText.h:
2013-08-13 peavo@outlook.com <peavo@outlook.com>
[Curl] Possible infinite loop while downloading.
https://bugs.webkit.org/show_bug.cgi?id=119744
Reviewed by Darin Adler.
If adding/removing curl handles fails, the download thread
can end up in an endless loop trying to update the curl handle list.
* platform/network/curl/CurlDownload.cpp:
(WebCore::CurlDownloadManager::updateHandleList): Avoid infinite loop by ignoring return value.
2013-08-13 Christophe Dumez <ch.dumez@sisa.samsung.com>
HTMLSelectElement.item() does not behave according to specification
https://bugs.webkit.org/show_bug.cgi?id=119738
Reviewed by Darin Adler.
Make HTMLSelectElement.item() behave according to specification:
http://www.w3.org/TR/html51/forms.html#dom-select-item
http://dom.spec.whatwg.org/#dom-htmlcollection-item
Namely, we no longer throw if the offset argument is negative. Also,
the argument is now mandatory.
IE10, Firefox and Blink do not throw when HTMLSelectElement.item() is
called with a negative value (as per the specification).
The argument is mandatory in Firefox and Blink, but optional in IE10
(it returns null when called without argument). This looks like a bug
in IE because other item() getters' argument is usually mandatory in IE
(e.g. NodeList.item()).
Test: fast/dom/HTMLSelectElement/select-element-item-argument.html
* html/HTMLSelectElement.idl:
2013-08-13 Christophe Dumez <ch.dumez@sisa.samsung.com>
On request error, always fire events on the XMLHttpRequestUpload before the XMLHttpRequest
https://bugs.webkit.org/show_bug.cgi?id=119714
Reviewed by Alexey Proskuryakov.
On request error, fire events on the XMLHttpRequestUpload object before the XMLHttpRequest
object as per the latest specification:
http://xhr.spec.whatwg.org/#request-error
This specification change was made in Sept 2010:
http://dev.w3.org/cvsweb/2006/webapi/XMLHttpRequest-2/Overview.src.html.diff?r1=1.138;r2=1.139;f=h
It addresses the following comment:
http://lists.w3.org/Archives/Public/public-webapps/2010JulSep/0777.html
IE10 and since recently Blink behave according to specification but WebKit was firing the
events on the XMLHttpRequest object BEFORE the XMLHttpRequestUpload object in case of
'network error' or 'abort error'. WebKit was however behaving according to specification
in case of 'timeout error', which was inconsistent.
Test: http/tests/xmlhttprequest/upload-request-error-event-order.html
* xml/XMLHttpRequest.cpp:
(WebCore::XMLHttpRequest::networkError):
(WebCore::XMLHttpRequest::abortError):
2013-08-13 Christophe Dumez <ch.dumez@sisa.samsung.com>
Simplify RadioNodeList's anonymous indexed getter
https://bugs.webkit.org/show_bug.cgi?id=119725
Reviewed by Darin Adler.
Simplify RadioNodeList's anonymous indexed getter by dropping [IsIndex]
IDL extended attribute from its parameter and making it mandatory.
This change has strictly no impact on the generated bindings code
but it simplifies the IDL.
No new test, no behavior change.
* html/RadioNodeList.idl:
2013-08-13 Danilo Cesar Lemes de Paula <danilo.cesar@collabora.co.uk>
[GTK] close the volume slider when the media control panel is hidden
https://bugs.webkit.org/show_bug.cgi?id=119062
Reviewed by Gustavo Noronha Silva.
It's not obvious how to close the volume slider on webkitGtk.
The volume slider should close if the control panel is hidden.
* html/shadow/MediaControlsGtk.cpp:
(WebCore::MediaControlsGtk::makeTransparent):
* html/shadow/MediaControlsGtk.h:
2013-08-13 Commit Queue <commit-queue@webkit.org>
Unreviewed, rolling out r152563.
http://trac.webkit.org/changeset/152563
https://bugs.webkit.org/show_bug.cgi?id=119740
causes random crashes (Requested by carewolf on #webkit).
* platform/graphics/qt/FontCacheQt.cpp:
(WebCore::FontCache::getLastResortFallbackFont):
2013-08-13 Andrei Bucur <abucur@adobe.com>
Unreviewed.
Fix the build after http://trac.webkit.org/changeset/153990.
* rendering/RenderBlock.cpp:
(WebCore::RenderBlock::updateShapesBeforeBlockLayout): Add the default return value if CSS Shapes are disabled.
2013-08-13 Andrei Bucur <abucur@adobe.com>
[CSS Regions] Compute correct region ranges for boxes
https://bugs.webkit.org/show_bug.cgi?id=116296
Reviewed by David Hyatt.
The patch extends the region ranges implementation with the following behavior:
- the range of a box is always included in the range of its containing block (even for floats); this will simplify how overflow
is propagated to the regions and it should later change on a case by case basis.
- if the range of a box is not correctly estimated before the layout it will be marked for relayout; this is necessary to correctly
position boxes that overflow naturally, like floats.
- all the boxes have a range now, not only the blocks.
- regionAtBlockOffset can clamp to a box.
- an unsplittable box has a region range of a single region, the one where the box top falls into.
When the layout of a child box starts it tries to give an estimate based on the maximal height of the box. After the layout,
if the estimation was wrong, the box is relaid out. For example, if a block with a float is laid out in a region but the float
overflows in the next region a relayout is needed for the float so it can be positioned relative to the containing block
region (this step can be optimized by making a layout pass only for the children that don't have the region range enclosed in the
containing block range).
Tests: fast/regions/bottom-overflow-out-of-first-region-absolute.html
fast/regions/float-pushed-width-change-2.html
fast/regions/scrollable-paragraph-unsplittable.html
* rendering/RenderBlock.cpp:
(WebCore::RenderBlock::updateShapesBeforeBlockLayout): Doesn't do anything for regions now.
(WebCore::RenderBlock::updateShapesAfterBlockLayout): Doesn't do anything for regions now.
(WebCore::RenderBlock::relayoutToAvoidWidows): The layout to avoid widows. Widows use the line index to determine the break point,
not the RootLineBox pointer as before. This is necessary to prevent stale pointers in further layouts.
(WebCore::RenderBlock::layoutBlock):
(WebCore::RenderBlock::layoutBlockChild):
(WebCore::RenderBlock::layoutPositionedObjects):
(WebCore::RenderBlock::markForPaginationRelayoutIfNeeded): Relayout for widows during layoutBlock(). Don't wait to exit the block layout.
(WebCore::RenderBlock::positionNewFloats):
(WebCore::RenderBlock::hasNextPage):
(WebCore::RenderBlock::applyBeforeBreak):
(WebCore::RenderBlock::applyAfterBreak):
(WebCore::RenderBlock::setPageBreak):
(WebCore::RenderBlock::updateMinimumPageHeight):
(WebCore::RenderBlock::regionAtBlockOffset): This function can now clamp at a box.
(WebCore::RenderBlock::computeRegionRangeForBoxChild): Calculate the box region range using the box height.
(WebCore::RenderBlock::estimateRegionRangeForBoxChild): Estimate the box region range using a huge height for the box.
(WebCore::RenderBlock::updateRegionRangeForBoxChild): Determine the final region range of a box.
* rendering/RenderBlock.h:
(WebCore::RenderBlock::logicalWidthForChild):
(WebCore::RenderBlock::logicalHeightForChild):
(WebCore::RenderBlock::logicalTopForChild):
* rendering/RenderBlockLineLayout.cpp:
(WebCore::RenderBlock::layoutInlineChildren):
* rendering/RenderBox.cpp:
(WebCore::RenderBox::clampToStartAndEndRegions):
(WebCore::RenderBox::borderBoxRectInRegion):
* rendering/RenderBox.h:
* rendering/RenderDeprecatedFlexibleBox.cpp:
(WebCore::RenderDeprecatedFlexibleBox::layoutBlock):
* rendering/RenderFlexibleBox.cpp:
(WebCore::RenderFlexibleBox::layoutBlock):
* rendering/RenderFlowThread.cpp:
(WebCore::RenderFlowThread::validateRegions):
(WebCore::RenderFlowThread::regionAtBlockOffset):
(WebCore::RenderFlowThread::adjustedPositionRelativeToOffsetParent):
(WebCore::RenderFlowThread::pageLogicalTopForOffset):
(WebCore::RenderFlowThread::pageLogicalWidthForOffset):
(WebCore::RenderFlowThread::pageLogicalHeightForOffset):
(WebCore::RenderFlowThread::pageRemainingLogicalHeightForOffset):
(WebCore::RenderFlowThread::mapFromFlowToRegion):
(WebCore::RenderFlowThread::logicalWidthChangedInRegionsForBlock):
(WebCore::RenderFlowThread::clearRenderObjectCustomStyle):
(WebCore::RenderFlowThread::clearRenderBoxRegionInfoAndCustomStyle):
(WebCore::RenderFlowThread::setRegionRangeForBox):
(WebCore::RenderFlowThread::applyBreakAfterContent):
(WebCore::RenderFlowThread::addForcedRegionBreak):
* rendering/RenderFlowThread.h:
* rendering/RenderGrid.cpp:
(WebCore::RenderGrid::layoutBlock):
* rendering/RenderMultiColumnFlowThread.cpp:
(WebCore::RenderMultiColumnFlowThread::setPageBreak):
(WebCore::RenderMultiColumnFlowThread::updateMinimumPageHeight):
* rendering/RenderMultiColumnFlowThread.h:
2013-08-13 Ryosuke Niwa <rniwa@webkit.org>
One more speculative Windows build fix after r153978.
* page/win/DragControllerWin.cpp:
2013-08-13 Gyuyoung Kim <gyuyoung.kim@samsung.com>
Update scheme list according to latest specification
https://bugs.webkit.org/show_bug.cgi?id=119510
Reviewed by Christophe Dumez.
New schemes are added to it additionally. Those are bitcoin, im, ircs and wtai.
As additional work, scheme order is listed to be sync with spec.
Spec: http://www.w3.org/html/wg/drafts/html/master/webappapis.html#custom-handlers
Test: fast/dom/register-protocol-handler.html
fast/dom/unregister-protocol-handler.html
* Modules/navigatorcontentutils/NavigatorContentUtils.cpp:
(WebCore::initProtocolHandlerWhitelist):
2013-08-13 Ryosuke Niwa <rniwa@webkit.org>
Yet another Windows build fix attempt after r153978.
* page/win/DragControllerWin.cpp:
(WebCore::DragController::declareAndWriteDragImage):
2013-08-13 Ryosuke Niwa <rniwa@webkit.org>
Another Windows build fix attempt after r153978.
* page/win/DragControllerWin.cpp:
2013-08-12 Ryosuke Niwa <rniwa@webkit.org>
Windows build fix attempt after r153978.
* page/win/DragControllerWin.cpp:
2013-08-12 Zan Dobersek <zdobersek@igalia.com>
ASSERTION FAILED: type() == Percent in WebCore::Length::percent
https://bugs.webkit.org/show_bug.cgi?id=116715
Reviewed by Darin Adler.
Allow the Calculated type in the Length::percent method that returns the Length's
float value. This reflects the changes in r110148 that adjusted the Length::isPercent
method to return true for Length objects of either Percent or Calculated type.
Test: fast/css/calculated-length-as-percent-crash.html
* platform/Length.h:
(WebCore::Length::percent): Assert that Length::isPercent is true when Length::percent
is called, ensuring the Length's type is either Percent or Calculated.
2013-06-16 Darin Adler <darin@apple.com>
Move Clipboard::declareAndWriteDragImage to DragController
https://bugs.webkit.org/show_bug.cgi?id=117683
Reviewed by Brent Fulgham.
* dom/Clipboard.h: Removed declareAndWriteDragImage.
* page/DragController.cpp:
(WebCore::selectImageBeforeDragging): Half of the old prepareClipboardForImageDrag
is now refactored into this function.
(WebCore::DragController::startDrag): Where we called prepareClipboardForImageDrag,
instead call selectImageBeforeDragging and declareAndWriteDragImage. This is needed
because declareAndWriteDragImage needs to be a member function, for Mac at least.
* page/DragController.h: Added declareAndWriteDragImage.
* page/efl/DragControllerEfl.cpp:
(WebCore::DragController::declareAndWriteDragImage): Added empty placeholder.
It would be better to delete this file rather than having these placeholders.
I don't think EFL actually has drag support, and it makes work to have to keep
source files up to date that are really unused.
* page/gtk/DragControllerGtk.cpp:
(WebCore::DragController::declareAndWriteDragImage): Added. Calls Pasteboard::writeImage.
* page/mac/DragControllerMac.mm:
(WebCore::DragController::declareAndWriteDragImage): Added. Calls to DragClient, which
does the work.
* page/qt/DragControllerQt.cpp:
(WebCore::DragController::declareAndWriteDragImage): Added. Calls Pasteboard::writeImage.
* page/win/DragControllerWin.cpp:
(WebCore::DragController::declareAndWriteDragImage): Added. Uses Pasteboard functions to
do the work.
* platform/Clipboard.h: Changed the pasteboard function to return a non-const reference.
For now, it's not clear what const will mean for pasteboards, and it's currently not
possible to write to a const pasteboard, which we need to do in the new
DragController::declareAndWriteDragImage functions.
* platform/Pasteboard.h: Added a new writeMarkup function, implemented only for Windows
at this time.
* platform/efl/ClipboardEfl.cpp: Deleted declareAndWriteDragImage.
* platform/gtk/ClipboardGtk.cpp: Ditto.
* platform/ios/ClipboardIOS.h: Ditto.
* platform/ios/ClipboardIOS.mm: Ditto.
* platform/mac/ClipboardMac.mm: Ditto.
* platform/qt/ClipboardQt.cpp: Ditto.
* platform/win/ClipboardWin.cpp: Ditto.
* platform/win/PasteboardWin.cpp:
(WebCore::Pasteboard::writePlainTextToDataObject): Took out a pointless line of code.
(WebCore::Pasteboard::writeMarkup): Added. Currently implemented only for Windows.
This factors out a significant piece of DragController::declareAndWriteDragImage,
and will probably be handy for other platforms later.
2013-08-12 Ryosuke Niwa <rniwa@webkit.org>
Fix NULL de-refernce in HTMLAnchorElement::sendPings when settings doesn't exist
https://bugs.webkit.org/show_bug.cgi?id=119716
Reviewed by Darin Adler.
Merge https://chromium.googlesource.com/chromium/blink/+/d5783da353ab783e9994b8fbecd91880be5192a1
No new tests since the test in the Blink change doesn't reproduce crash on WebKit.
* html/HTMLAnchorElement.cpp:
(WebCore::HTMLAnchorElement::sendPings):
2013-08-12 Seokju Kwon <seokju@webkit.org>
Use the correct preprocessor in shouldRepaintFixedBackgroundsOnScroll()
https://bugs.webkit.org/show_bug.cgi?id=119710
Reviewed by Darin Adler.
No behavior change, no new tests needed.
* rendering/RenderObject.cpp: Remove unused parameter warning.
(WebCore::shouldRepaintFixedBackgroundsOnScroll):
2013-08-12 Alexey Proskuryakov <ap@apple.com>
http/tests/security/sandboxed-iframe-invalid.html is flaky on Mac
https://bugs.webkit.org/show_bug.cgi?id=85522
Reviewed by Andy Estes.
Drive-by FIXMEs and trivial fixes for WebCore issues I noticed while working
on this bug. No behavior change expected.
* loader/FrameLoader.cpp:
(WebCore::FrameLoader::submitForm):
(WebCore::FrameLoader::findFrameForNavigation):
* loader/NavigationScheduler.cpp:
(WebCore::ScheduledFormSubmission::fire):
2013-08-13 Ryosuke Niwa <rniwa@webkit.org>
Fix variable name |end| -> |size| in EventTarget::fireEventListeners
https://bugs.webkit.org/show_bug.cgi?id=119715
Reviewed by Benjamin Poulain.
Merge https://chromium.googlesource.com/chromium/blink/+/f58b017539c48059bb2b88d18ee0ee3d14decb01
and also fix variable names in FiringEventIterator.
* dom/EventTarget.cpp:
(WebCore::EventTarget::removeEventListener):
(WebCore::EventTarget::fireEventListeners):
(WebCore::EventTarget::removeAllEventListeners):
* dom/EventTarget.h:
(WebCore::FiringEventIterator::FiringEventIterator):
2013-08-12 Ryosuke Niwa <rniwa@webkit.org>
Encapsulate access to documentNamedItemMap and windowNamedItemMap
https://bugs.webkit.org/show_bug.cgi?id=119701
Reviewed by Darin Adler.
Encapsulate m_documentNamedItem and m_windowNamedItem by adding various methods on HTMLDocument.
This will help us doing more refactorings in the future.
* bindings/js/JSDOMWindowCustom.cpp:
(WebCore::namedItemGetter):
(WebCore::JSDOMWindow::getOwnPropertySlot):
(WebCore::JSDOMWindow::getOwnPropertySlotByIndex):
(WebCore::JSDOMWindow::getOwnPropertyDescriptor):
* bindings/js/JSHTMLDocumentCustom.cpp:
(WebCore::JSHTMLDocument::canGetItemsForName):
(WebCore::JSHTMLDocument::nameGetter):
* dom/Element.cpp:
(WebCore::Element::updateNameForDocument):
(WebCore::Element::updateIdForDocument):
* html/HTMLDocument.cpp:
(WebCore::HTMLDocument::addDocumentNamedItem): Added.
(WebCore::HTMLDocument::removeDocumentNamedItem): Added.
(WebCore::HTMLDocument::addWindowNamedItem): Added.
(WebCore::HTMLDocument::removeWindowNamedItem): Added.
* html/HTMLDocument.h:
(WebCore::HTMLDocument::documentNamedItem): Added.
(WebCore::HTMLDocument::hasDocumentNamedItem): Added.
(WebCore::HTMLDocument::documentNamedItemContainsMultipleElements): Added.
(WebCore::HTMLDocument::windowNamedItem): Added.
(WebCore::HTMLDocument::hasWindowNamedItem): Added.
(WebCore::HTMLDocument::windowNamedItemContainsMultipleElements): Added.
* html/HTMLImageElement.cpp:
(WebCore::HTMLImageElement::parseAttribute):
* html/HTMLObjectElement.cpp:
(WebCore::HTMLObjectElement::updateDocNamedItem):
2013-08-12 Patrick Gansterer <paroga@webkit.org>
[CMake] Use the correct list of files when compiling ANGLESupport on Windows
https://bugs.webkit.org/show_bug.cgi?id=119439
Reviewed by Gyuyoung Kim.
* CMakeLists.txt: Use ossource_win.cpp instead of ossource_posix.cpp on Windows platforms.
2013-08-12 Arnaud Renevier <a.renevier@samsung.com>
[cairo] memory corruption with putImageData and accelerated canvas.
https://bugs.webkit.org/show_bug.cgi?id=118621
Reviewed by Martin Robinson.
When we have an accelerated imageBuffer, and we putByteArray with a
non zero destPoint, we create temporary surface of sourceSize. Then,
we write to image data with an offset. This results in an out of bound
write.
In order to avoid that, we use a 0 offset when writing data.
In addition, we also create image with the minimal needed size in
getImageData, and also use a 0 offset. This decrease data transfer
between cpu and gpu
Instead of the map/unmap mechanism, perform an explicit surface copy
when needed. This change also removes an unneeded glReadPixels at the
start of putByteArray
Add two parameters to copyRectFromOneSurfaceToAnother: destination
offset, and cairo drawing operator.
No new tests. Accelerated canvas is not enabled for testing yet.
* platform/graphics/cairo/CairoUtilities.cpp:
(WebCore::copyRectFromOneSurfaceToAnother):
* platform/graphics/cairo/CairoUtilities.h:
* platform/graphics/cairo/ImageBufferCairo.cpp:
(WebCore::copySurfaceToImageAndAdjustRect):
(WebCore::getImageData):
(WebCore::ImageBuffer::putByteArray):
2013-08-12 Ryosuke Niwa <rniwa@webkit.org>
Use const AtomicStringImpl* in DocumentOrderedMap
https://bugs.webkit.org/show_bug.cgi?id=119700
Reviewed by Benjamin Poulain.
Use const AtomicStringImpl* in DocumentOrderedMap. It caught at least one bug that HTMLNameCollection'
subclasses' nodeMatches were taking const AtomicString& instead of AtomicStringImpl*. This was forcing
DocumentOrderedMap::getElementByWindowNamedItem and DocumentOrderedMap::getElementByDocumentNamedItem
to create temporary AtomicStrings.
* dom/DocumentOrderedMap.cpp:
(WebCore::keyMatchesId):
(WebCore::keyMatchesName):
(WebCore::keyMatchesMapName):
(WebCore::keyMatchesLowercasedMapName):
(WebCore::keyMatchesLabelForAttribute):
(WebCore::keyMatchesWindowNamedItem):
(WebCore::keyMatchesDocumentNamedItem):
(WebCore::DocumentOrderedMap::add):
(WebCore::DocumentOrderedMap::remove):
(WebCore::DocumentOrderedMap::get):
(WebCore::DocumentOrderedMap::getElementById):
(WebCore::DocumentOrderedMap::getElementByName):
(WebCore::DocumentOrderedMap::getElementByMapName):
(WebCore::DocumentOrderedMap::getElementByLowercasedMapName):
(WebCore::DocumentOrderedMap::getElementByLabelForAttribute):
(WebCore::DocumentOrderedMap::getElementByWindowNamedItem):
(WebCore::DocumentOrderedMap::getElementByDocumentNamedItem):
(WebCore::DocumentOrderedMap::getAllElementsById):
* dom/DocumentOrderedMap.h:
(WebCore::DocumentOrderedMap::containsSingle):
(WebCore::DocumentOrderedMap::contains):
(WebCore::DocumentOrderedMap::containsMultiple):
* html/HTMLNameCollection.cpp:
(WebCore::WindowNameCollection::nodeMatches):
(WebCore::DocumentNameCollection::nodeMatches):
* html/HTMLNameCollection.h:
(WebCore::WindowNameCollection::nodeMatches):
(WebCore::DocumentNameCollection::nodeMatches):
2013-08-12 Beth Dakin <bdakin@apple.com>
The LayoutMilestones didLayout callback should only fire for the main frame
https://bugs.webkit.org/show_bug.cgi?id=119457
Reviewed by Sam Weinig.
This patch makes it so that FrameLoader::didLayout(LayoutMilestones) is only ever
called for the main frame. Technically this will change existing API for
didFirstVisuallyNonEmptyLayoutInFrame and didFirstLayoutInFrame. Clients used to
be able to register for those callbacks for any frame they wanted, however, now
they will only ever get the callback when it applies to the main frame. We think
that this is acceptable since we dont know of any clients that ever used those
APIs for a non-main frame. This change also makes nothing but sense for the
didLayout(LayoutMilestones) callback, since that is a Page-level concept, so it
should only fire for the main frame.
Only call didLayout for the main frame.
* dom/Document.cpp:
(WebCore::Document::setVisualUpdatesAllowed):
Assert that this is the main frame.
* loader/FrameLoader.cpp:
(WebCore::FrameLoader::didLayout):
Only call didLayout for the main frame.
* page/FrameView.cpp:
(WebCore::FrameView::performPostLayoutTasks):
2013-08-12 Christophe Dumez <ch.dumez@sisa.samsung.com>
Define DOM_KEY_LOCATION_* constants on KeyboardEvent
https://bugs.webkit.org/show_bug.cgi?id=119341
Reviewed by Ryosuke Niwa.
Add support for the DOM_KEY_LOCATION_* constants on KeyboardEvent as per
the specification:
http://www.w3.org/TR/DOM-Level-3-Events/#events-KeyboardEvent
Those constants are already supported by IE10, Firefox 22 and since
recently Blink.
Note that the following constants are not supported / exposed yet:
DOM_KEY_LOCATION_MOBILE and DOM_KEY_LOCATION_JOYSTICK.
Test: fast/events/keyboardevent-location-constants.html
* dom/KeyboardEvent.cpp:
(WebCore::keyLocationCode):
(WebCore::KeyboardEvent::KeyboardEvent):
* dom/KeyboardEvent.h:
* dom/KeyboardEvent.idl:
2013-08-12 Tim Horton <timothy_horton@apple.com>
dataLog dumpers for WebCore's basic geometry types
https://bugs.webkit.org/show_bug.cgi?id=119636
Reviewed by Filip Pizlo.
* platform/graphics/FloatPoint.cpp:
(WebCore::FloatPoint::dump):
* platform/graphics/FloatPoint.h:
* platform/graphics/FloatRect.cpp:
(WebCore::FloatRect::dump):
* platform/graphics/FloatRect.h:
* platform/graphics/FloatSize.cpp:
(WebCore::FloatSize::dump):
* platform/graphics/FloatSize.h:
* platform/graphics/IntPoint.h:
(WebCore::IntPoint::dump):
* platform/graphics/IntRect.cpp:
(WebCore::IntRect::dump):
* platform/graphics/IntRect.h:
* platform/graphics/IntSize.h:
(WebCore::IntSize::dump):
2013-08-12 Dean Jackson <dino@apple.com>
Shadows don't support viewport units
https://bugs.webkit.org/show_bug.cgi?id=119649
Reviewed by Darin Adler.
We don't yet support viewport units in shadows, so
fail parsing if we see one. The bug to fix this
completely is: https://webkit.org/b/119650
Test: fast/css/shadow-viewport-units.html
* css/CSSParser.cpp:
(WebCore::CSSParser::parseShadow): Fail if we get one of
vh, vw, vmin, vmax.
2013-08-12 peavo@outlook.com <peavo@outlook.com>
[Curl] Cookie is not set when url string is unicode.
https://bugs.webkit.org/show_bug.cgi?id=119545
Reviewed by Brent Fulgham.
When the method setCookiesFromDOM is called with an unicode url parameter, the cookie is not correctly set.
We need to convert the cookie string to 8 bit, before passing it to the Curl api function.
* platform/network/curl/CookieJarCurl.cpp:
(WebCore::setCookiesFromDOM): Convert cookie string to 8 bit, if needed.
2013-08-12 Eric Carlson <eric.carlson@apple.com>
Revert r153912 because it broke some track tests.
Rubber-stamped by Antti Koivisto.
* platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
(WebCore::MediaPlayerPrivateAVFoundationObjC::tracksChanged):
(WebCore::MediaPlayerPrivateAVFoundationObjC::languageOfPrimaryAudioTrack):
2013-08-12 Antti Koivisto <antti@apple.com>
Add ElementTraversal::next/previousSibling
https://bugs.webkit.org/show_bug.cgi?id=119681
Reviewed by Andreas Kling.
Add nextSibling/previousSibling/lastWithin to ElementTraversal namespace.
- Use them to replace internal use of Element::next/previousElementSibling DOM API for traversal.
- Replace some Node::nextSibling() usage with ElementTraversal::nextSibling() for tighter code.
- Replace ElementTraversal::nextSkippingChildren where it is used to traverse over immediate children only.
* css/SelectorChecker.cpp:
(WebCore::isFirstChildElement):
(WebCore::isLastChildElement):
(WebCore::isFirstOfType):
(WebCore::isLastOfType):
(WebCore::countElementsBefore):
(WebCore::countElementsOfTypeBefore):
(WebCore::countElementsAfter):
(WebCore::countElementsOfTypeAfter):
* dom/Element.cpp:
(WebCore::Element::lastElementChild):
(WebCore::Element::previousElementSibling):
(WebCore::Element::nextElementSibling):
* dom/Element.h:
* dom/ElementTraversal.h:
(WebCore::ElementTraversal::lastElementWithinTemplate):
(WebCore::ElementTraversal::lastWithin):
(WebCore::ElementTraversal::traverseNextSiblingElementTemplate):
(WebCore::ElementTraversal::nextSibling):
(WebCore::ElementTraversal::traversePreviousSiblingElementTemplate):
(WebCore::ElementTraversal::previousSibling):
* editing/ApplyStyleCommand.cpp:
(WebCore::isSpanWithoutAttributesOrUnstyledStyleSpan):
(WebCore::ApplyStyleCommand::cleanupUnstyledAppleStyleSpans):
* editing/CompositeEditCommand.cpp:
(WebCore::CompositeEditCommand::breakOutOfEmptyListItem):
* editing/IndentOutdentCommand.cpp:
(WebCore::IndentOutdentCommand::tryIndentingAsListItem):
* editing/InsertListCommand.cpp:
(WebCore::InsertListCommand::mergeWithNeighboringLists):
* editing/markup.cpp:
(WebCore::createContextualFragment):
* html/HTMLCollection.cpp:
(WebCore::firstMatchingChildElement):
(WebCore::nextMatchingSiblingElement):
(WebCore::HTMLCollection::traverseNextElement):
(WebCore::HTMLCollection::traverseForwardToOffset):
* html/HTMLFieldSetElement.cpp:
(WebCore::HTMLFieldSetElement::childrenChanged):
(WebCore::HTMLFieldSetElement::legend):
* html/HTMLMediaElement.cpp:
(WebCore::HTMLMediaElement::finishParsingChildren):
* html/HTMLObjectElement.cpp:
(WebCore::HTMLObjectElement::containsJavaApplet):
* rendering/FilterEffectRenderer.cpp:
(WebCore::FilterEffectRenderer::buildReferenceFilter):
* style/StyleResolveTree.cpp:
(WebCore::Style::resolveTree):
* svg/SVGStyledElement.cpp:
(WebCore::SVGStyledElement::title):
2013-08-12 Allan Sandfeld Jensen <allan.jensen@digia.com>
[Qt] Add Support for canvas blend modes
https://bugs.webkit.org/show_bug.cgi?id=100072
Reviewed by Jocelyn Turcotte.
Implement basic support for the blend-modes supported by QPainter.
Covered by existing tests.
* platform/graphics/qt/GraphicsContextQt.cpp:
(WebCore::toQtCompositionMode):
(WebCore::GraphicsContext::setPlatformCompositeOperation):
* platform/graphics/qt/ImageBufferQt.cpp:
(WebCore::ImageBuffer::draw):
* platform/graphics/qt/ImageQt.cpp:
(WebCore::BitmapImage::draw):
* platform/graphics/qt/StillImageQt.cpp:
(WebCore::StillImage::draw):
2013-08-12 Gabor Abraham <abrhm@inf.u-szeged.hu>
Buildfix for !ENABLE(SVG). Fix warning by adding guard after r153901:
void WebCore::addString(WebCore::FeatureSet&, const char*)'
defined but not used [-Werror=unused-function]
Reviewed by Csaba Osztrogonác.
* dom/DOMImplementation.cpp:
2013-08-12 Antti Koivisto <antti@apple.com>
Move ElementTraversal to ElementTraversal.h
https://bugs.webkit.org/show_bug.cgi?id=119678
Rubber-stamped by Andreas Kling.
Move ElementTraversal namespace from NodeTraversal.h to a correctly named file.
* GNUmakefile.list.am:
* Target.pri:
* WebCore.vcxproj/WebCore.vcxproj:
* WebCore.xcodeproj/project.pbxproj:
* accessibility/AccessibilityRenderObject.cpp:
* css/StyleInvalidationAnalysis.cpp:
* dom/Document.cpp:
* dom/DocumentOrderedMap.cpp:
* dom/Element.cpp:
* dom/ElementTraversal.h: Added.
(WebCore::ElementTraversal::firstElementWithinTemplate):
(WebCore::ElementTraversal::firstWithin):
(WebCore::ElementTraversal::traverseNextElementTemplate):
(WebCore::ElementTraversal::next):
(WebCore::ElementTraversal::traverseNextElementSkippingChildrenTemplate):
(WebCore::ElementTraversal::nextSkippingChildren):
(WebCore::ElementTraversal::previousIncludingPseudo):
(WebCore::ElementTraversal::nextIncludingPseudo):
(WebCore::ElementTraversal::nextIncludingPseudoSkippingChildren):
(WebCore::ElementTraversal::pseudoAwarePreviousSibling):
* dom/Node.cpp:
* dom/NodeTraversal.h:
* dom/SelectorQuery.cpp:
* dom/TreeScope.cpp:
* dom/VisitedLinkState.cpp:
* editing/FrameSelection.cpp:
* editing/markup.cpp:
* html/HTMLCollection.cpp:
* html/HTMLFieldSetElement.cpp:
* html/HTMLFormElement.cpp:
* html/HTMLLabelElement.cpp:
* html/HTMLLegendElement.cpp:
* html/HTMLMapElement.cpp:
* html/HTMLObjectElement.cpp:
* html/HTMLSelectElement.cpp:
* html/shadow/ContentDistributor.cpp:
* page/FocusController.cpp:
* rendering/RenderCounter.cpp:
* rendering/RenderListItem.cpp:
* svg/SVGSVGElement.cpp:
* svg/SVGStyledElement.cpp:
* svg/SVGUseElement.cpp:
* svg/animation/SMILTimeContainer.cpp:
* svg/graphics/SVGImage.cpp:
2013-08-12 Antti Koivisto <antti@apple.com>
Move some Document recalcStyle code to StyleResolveTree
https://bugs.webkit.org/show_bug.cgi?id=119676
Reviewed by Andreas Kling.
Move the code that resolves the document and child styles to Style::resolveTree(Document*).
* dom/Document.cpp:
(WebCore::Document::recalcStyle):
* style/StyleResolveTree.cpp:
(WebCore::Style::resolveTree):
* style/StyleResolveTree.h:
2013-08-12 Allan Sandfeld Jensen <allan.jensen@digia.com>
Resource leak related to gstreamer and videos
https://bugs.webkit.org/show_bug.cgi?id=109350
Reviewed by Eric Carlson.
Since active DOM object are only stopped once and can not be restarted, we can
unreference the media player there, instead of waiting for garbage collection.
If the r152778 is rolled back, this also breaks a circular reference between
GStreamer and WebKit which prevented garbage collecting from triggering.
* html/HTMLMediaElement.cpp:
(WebCore::HTMLMediaElement::stop):
2013-08-12 Gabor Rapcsanyi <rgabor@webkit.org>
[Qt] Unreviewed buildfix for webaudio.
* Target.pri: Add missing files
2013-08-12 Andreas Kling <akling@apple.com>
Some build juice for the Windows bots after r153926 + r153927.
* html/shadow/MediaControlElements.cpp:
* platform/graphics/win/MediaPlayerPrivateQuickTimeVisualContext.cpp:
(WebCore::MediaPlayerPrivateQuickTimeVisualContext::supportsFullscreen):
(WebCore::MediaPlayerPrivateQuickTimeVisualContext::setUpCookiesForQuickTime):
2013-08-11 Sam Weinig <sam@webkit.org>
Move RenderMathMLSpace.h/cpp to the right group in the Xcode project.
Reviewed by Dean Jackson.
* WebCore.xcodeproj/project.pbxproj:
2013-08-11 Andreas Kling <akling@apple.com>
Make Page::settings() return a reference.
<http://webkit.org/b/119662>
Reviewed by Anders Carlsson.
...and remove some pointless null checks that were exposed by doing this.
2013-08-11 Andreas Kling <akling@apple.com>
Make some things that return never-null pointers return references instead.
<http://webkit.org/b/119660>
Reviewed by Antti Koivisto.
These functions never return null anyway, so remove any ambiguity by letting
them return references instead of pointers.
- Node::ensureRareData()
- Element::ensureUniqueElementData()
- Element::ensureShadow()
- Element::ensureUserAgentShadowRoot()
- StyledElement::ensureMutableInlineStyle()
- NodeRareData::ensureNodeLists()
- NodeRareData::ensureMutationObserverData()
- EventTarget::ensureEventTargetData()
- Document::ensureStyleResolver()
- Document::selectorQueryCache()
- Document::mediaQueryMatcher()
- FlowThreadController::ensureRenderFlowThreadWithName()
- HTMLTrackElement::ensureTrack()
- SVGElement::ensureSVGRareData()
- AnimationControllerPrivate::ensureCompositeAnimation()
2013-08-11 Sam Weinig <sam@webkit.org>
Cleanup MediaQueryListListener
https://bugs.webkit.org/show_bug.cgi?id=119664
Reviewed by Andreas Kling.
Make MediaQueryListListener a proper WebIDL callback.
* CMakeLists.txt:
* DerivedSources.cpp:
* DerivedSources.make:
* DerivedSources.pri:
* GNUmakefile.list.am:
* Target.pri:
* WebCore.vcxproj/WebCore.vcxproj:
* WebCore.vcxproj/WebCore.vcxproj.filters:
* WebCore.xcodeproj/project.pbxproj:
Update project files.
* bindings/scripts/CodeGeneratorJS.pm:
(GenerateCallbackHeader):
(GenerateCallbackImplementation):
(JSValueToNative):
* bindings/scripts/IDLAttributes.txt:
Add support for CallbackNeedsOperatorEqual, which adds an operator==.
* css/MediaAllInOne.cpp:
Remove MediaQueryListListener.cpp.
* css/MediaQueryListListener.cpp:
Removed.
* css/MediaQueryListListener.h:
(WebCore::MediaQueryListListener::~MediaQueryListListener):
(WebCore::MediaQueryListListener::MediaQueryListListener):
* css/MediaQueryListListener.idl:
Convert to a proper WebIDL callback.
* css/MediaQueryMatcher.cpp:
(WebCore::MediaQueryMatcher::Listener::evaluate):
(WebCore::MediaQueryMatcher::styleResolverChanged):
* css/MediaQueryMatcher.h:
Remove all traces of the ScriptState.
2013-08-11 Carlos Garcia Campos <cgarcia@igalia.com>
Unreviewed. Fix make distcheck.
* GNUmakefile.list.am: Remove unexistent header file.
2013-08-09 Gustavo Noronha Silva <gns@gnome.org>
[GObject] Wrap KeyboardEvent
https://bugs.webkit.org/show_bug.cgi?id=119651
Reviewed by Christophe Dumez.
This exposes KeyboardEvent to our GObject API. It is required for handling
keyboard events, such as keydown, keypress, and so on.
* bindings/gobject/GNUmakefile.am:
* bindings/gobject/WebKitDOMPrivate.cpp:
(WebKit::wrap): make sure we create a WebKitDOMKeyboardEvent for a DOM event that
is a KeyboardEvent.
* bindings/scripts/CodeGeneratorGObject.pm:
(GetBaseClass): make WebKitDOMEvent be WebKitDOMKeyboardEvent's parent, like we do
for WebKitDOMMouseEvent.
* dom/KeyboardEvent.idl: generate a single initialization method.
2013-08-09 Jer Noble <jer.noble@apple.com>
Crash in com.apple.WebKit.WebContent at com.apple.MediaToolbox.
https://bugs.webkit.org/show_bug.cgi?id=119645
Reviewed by Eric Carlson.
Work around crash caused by <rdar://problem/14688471> by releasing
m_request as soon as keys have been added to it.
* Modules/encryptedmedia/CDMPrivateAVFoundation.mm:
(WebCore::CDMSessionAVFoundation::update):
2013-08-09 Anders Carlsson <andersca@apple.com>
Artifacts seen sometimes with layer backed WebKit1 plug-in
https://bugs.webkit.org/show_bug.cgi?id=119647
<rdar://problem/14002715>
Reviewed by Beth Dakin.
Don't try to paint layer backed views - they will be painted by Core Animation.
* platform/mac/WidgetMac.mm:
(WebCore::Widget::paint):
2013-08-09 Rob Buis <rwlbuis@webkit.org>
ASSERTION FAILED: stroke->opacity != other->stroke->opacity in WebCore::SVGRenderStyle::diff
https://bugs.webkit.org/show_bug.cgi?id=119623
Reviewed by Dirk Schulze.
Include all the stroke attributes in the style diff comparison, the visited links ones were missing.
Test: svg/animations/animate-stroke-crasher.html
* rendering/style/SVGRenderStyle.cpp:
(WebCore::SVGRenderStyle::diff):
2013-08-09 Alexey Proskuryakov <ap@apple.com>
REGRESSION (r142755): window.open creates an invisible window when width and height are 0
https://bugs.webkit.org/show_bug.cgi?id=119633
Reviewed by Darin Adler.
Test: fast/dom/Window/open-zero-size-as-default.html
Relying on each WebKit to refuse setting size to zero was fragile - because this
required each one to have the check, and because by the time the client was called,
the initially zero size was not necessarily zero.
* loader/FrameLoader.cpp: (WebCore::createWindow): When sizes are zero, keep the
size the window was created with, because that's the default one by definition.
* page/DOMWindow.cpp: (WebCore::DOMWindow::adjustWindowRect): It's too late to
check for zero size now, it's been mangled to adjust for the difference between
window and viewport size.
2013-08-09 Eric Carlson <eric.carlson@apple.com>
[Mac] some track language tags are not recognized
https://bugs.webkit.org/show_bug.cgi?id=119643
Reviewed by Dean Jackson.
* platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
(WebCore::MediaPlayerPrivateAVFoundationObjC::tracksChanged): Always call languageOfPrimaryAudioTrack(),
a track may have changed so we may have a new language.
(WebCore::MediaPlayerPrivateAVFoundationObjC::languageOfPrimaryAudioTrack): Call [AVAssetTrack languageCode]
if [AVAssetTrack extendedLanguageTag] returns NULL in case the media file has an old
QuickTime language code.
2013-08-09 Dean Jackson <dino@apple.com>
Captions menu needs to reset text-align
https://bugs.webkit.org/show_bug.cgi?id=119637
Reviewed by Eric Carlson.
Reset the text-align property on the menu so that it
doesn't get the inherited value. The full fix for all
controls is http://webkit.org/b/116100.
* css/mediaControlsQuickTime.css:
(video::-webkit-media-controls-closed-captions-container):
2013-08-09 Beth Dakin <bdakin@apple.com>
AX: Not able to use arrow keys to read text in a WK2 app
https://bugs.webkit.org/show_bug.cgi?id=119605
-and corresponding-
<rdar://problem/14281275>
Reviewed by Darin Adler.
This code from defaultKeyboardEventHandler() is the magic that makes this AX
functionality work. This patch moves that into a separate function so that we can
call it from WK2.
* WebCore.exp.in:
* page/EventHandler.cpp:
(WebCore::EventHandler::handleKeyboardSelectionMovementForAccessibility):
(WebCore::EventHandler::defaultKeyboardEventHandler):
* page/EventHandler.h:
2013-08-09 Antti Koivisto <antti@apple.com>
Move static StyleResolver functions to Style namespace
https://bugs.webkit.org/show_bug.cgi?id=119629
Reviewed by Sam Weinig and Andreas Kling.
- Move static font size computation functions to StyleFontSizeFunctions.h/.cpp
- Move StyleResolver::styleForDocument to Style::resolveForDocument
* WebCore.xcodeproj/project.pbxproj:
* css/DeprecatedStyleBuilder.cpp:
(WebCore::ApplyPropertyFontFamily::applyInitialValue):
(WebCore::ApplyPropertyFontFamily::applyValue):
(WebCore::ApplyPropertyFontSize::applyInitialValue):
(WebCore::ApplyPropertyFontSize::applyValue):
* css/StyleResolver.cpp:
(WebCore::StyleResolver::adjustRenderStyle):
(WebCore::checkForOrientationChange):
(WebCore::StyleResolver::applyProperty):
(WebCore::StyleResolver::checkForGenericFamilyChange):
(WebCore::StyleResolver::initializeFontStyle):
(WebCore::StyleResolver::setFontSize):
* css/StyleResolver.h:
* dom/Document.cpp:
(WebCore::Document::recalcStyle):
* editing/EditingStyle.cpp:
(WebCore::legacyFontSizeFromCSSValue):
* html/HTMLLinkElement.cpp:
(WebCore::HTMLLinkElement::process):
* rendering/style/RenderStyle.cpp:
(WebCore::RenderStyle::getFontAndGlyphOrientation):
Moved from StyleResolver.cpp so it can be used by Style::resolveForDocument().
This depends on RenderStyle only so it is a natural member function.
* rendering/style/RenderStyle.h:
* rendering/svg/RenderSVGInlineText.cpp:
(WebCore::RenderSVGInlineText::computeNewScaledFontForStyle):
* style/StyleFontSizeFunctions.cpp: Copied from Source/WebCore/css/StyleResolver.cpp.
(WebCore::Style::computedFontSizeFromSpecifiedSize):
(WebCore::Style::computedFontSizeFromSpecifiedSizeForSVGInlineText):
(WebCore::Style::fontSizeForKeyword):
(WebCore::Style::legacyFontSizeForPixelSize):
* style/StyleFontSizeFunctions.h: Added.
* style/StyleResolveForDocument.cpp: Added.
(WebCore::Style::resolveForDocument):
* style/StyleResolveForDocument.h: Added.
2013-08-09 Christophe Dumez <ch.dumez@sisa.samsung.com>
Add support for KeyboardEvent.location attribute
https://bugs.webkit.org/show_bug.cgi?id=119326
Reviewed by Benjamin Poulain.
Add support for KeyboardEvent.location attribute as per the latest specification:
http://dev.w3.org/2006/webapi/DOM-Level-3-Events/html/DOM3-Events.html#events-KeyboardEvent
IE10, Firefox 22 and recently Blink all support KeyboardEvent.location already.
The deprecated 'keyLocation' attribute was not removed to maintain backward
compatibility.
No new tests, covered by existing tests.
* bindings/objc/PublicDOMInterfaces.h:
* bindings/scripts/CodeGeneratorJS.pm:
(GenerateConstructorDefinition):
* dom/KeyboardEvent.cpp:
(WebCore::KeyboardEventInit::KeyboardEventInit):
(WebCore::KeyboardEvent::KeyboardEvent):
(WebCore::KeyboardEvent::initKeyboardEvent):
* dom/KeyboardEvent.h:
(WebCore::KeyboardEvent::location):
* dom/KeyboardEvent.idl:
2013-08-09 Christophe Dumez <ch.dumez@sisa.samsung.com>
Make atob() throw an InvalidCharacterError on excess padding characters
https://bugs.webkit.org/show_bug.cgi?id=118898
Reviewed by Darin Adler.
According to the latest specification, window.atob() should throw an
InvalidCharacterError on excess padding characters:
http://www.whatwg.org/specs/web-apps/current-work/multipage/webappapis.html#dom-windowbase64-atob
This behavior is consistent with both Firefox, IE10 and recently Blink.
No new tests, already covered by:
fast/dom/Window/atob-btoa.html
* page/DOMWindow.cpp:
(WebCore::DOMWindow::atob):
2013-08-09 Christophe Dumez <ch.dumez@sisa.samsung.com>
Make DOMImplementation::hasFeature() behave according to specification
https://bugs.webkit.org/show_bug.cgi?id=119329
Reviewed by Ryosuke Niwa.
Make DOMImplementation::hasFeature() behave according to the latest specification:
http://dom.spec.whatwg.org/#dom-domimplementation-hasfeature
Specifically, the function should now return true unconditionally for any non-SVG feature.
This behavior is consistent with Firefox and since recently Blink.
hasFeature() originally would report whether the user agent claimed to support a
given DOM feature, but experience proved it was not nearly as reliable or granular
as simply checking whether the desired interfaces, attributes, or methods existed.
As such, it should no longer be used, but continues to exist (and simply returns
true) so that old pages don't stop working.
No new tests, covered by existing tests.
* dom/DOMImplementation.cpp:
(WebCore::isSupportedSVG10Feature):
(WebCore::isSupportedSVG11Feature):
(WebCore::DOMImplementation::hasFeature):
2013-08-09 Alejandro G. Castro <alex@igalia.com>
[GTK] [EFL] Enable tiled shadow blur for the inset shadows.
https://bugs.webkit.org/show_bug.cgi?id=119078
Reviewed by Martin Robinson.
Already covered in the tests.
* platform/graphics/GraphicsContext.cpp:
* platform/graphics/cairo/GraphicsContextCairo.cpp:
(WebCore::fillCurrentCairoPath): Added to allow fill the path
without the shadow.
(WebCore::shadowAndFillCurrentCairoPath):
(WebCore::GraphicsContext::fillRectWithRoundedHole): Added cairo
implementation.
2013-08-09 Jakob Petsovits <jpetsovits@blackberry.com>
[BlackBerry] Don't release the canvas Drawable, flush it directly instead.
https://bugs.webkit.org/show_bug.cgi?id=119589
https://jira.bbqnx.net/browse/BRWSR-12531
JIRA 444857
Reviewed by George Staikos.
The previous code here used releaseBufferDrawable() to
flush painted ImageBuffer contents, but then proceeded
to use that released Drawable for further painting
without ever locking a new one.
In an implementation that actually releases the Drawable
rather than keeping it around and just flushing it,
this will wreak havoc as bad as black screens or crashes.
As a solution that doesn't require the ImageBuffer object
to swap out its m_canvas member for a new Drawable, we can
access the PlatformGraphicsContext::flush() method directly
to achieve the same effect as was previously intended by
calling releaseBufferDrawable(). All it needs is letting
the canvas layer know about the Drawable so it can call
that flush() method by itself.
No new tests, verified by not crashing with an aforementioned
implementation of releaseBufferDrawable().
* platform/graphics/blackberry/CanvasLayerWebKitThread.cpp:
(WebCore::CanvasLayerCompositingThreadClient::CanvasLayerCompositingThreadClient):
(WebCore::CanvasLayerCompositingThreadClient::commitPendingTextureUploads):
(WebCore::CanvasLayerWebKitThread::CanvasLayerWebKitThread):
* platform/graphics/blackberry/CanvasLayerWebKitThread.h:
(WebCore::CanvasLayerWebKitThread::create):
* platform/graphics/blackberry/ImageBufferBlackBerry.cpp:
(WebCore::ImageBuffer::ImageBuffer):
(WebCore::ImageBuffer::~ImageBuffer):
2013-08-08 Allan Sandfeld Jensen <allan.jensen@digia.com>
[Qt][WK2] Composited and transformed links asserts in tap highlight
https://bugs.webkit.org/show_bug.cgi?id=94345
Reviewed by Jocelyn Turcotte.
Use a mapping that does not assert when hitting transforms. We still skip
transforms that produces non-rectangular areas.
* page/GestureTapHighlighter.cpp:
2013-08-09 Gabor Abraham <abrhm@inf.u-szeged.hu>
Buildfix. Fix warning after r153887:
control reaches end of non-void function [-Werror=return-type]
Reviewed by Csaba Osztrogonác.
* svg/SVGAnimateElement.cpp:
(WebCore::SVGAnimateElement::animatedPropertyTypeSupportsAddition):
2013-08-09 Bruno de Oliveira Abinader <bruno.d@partner.samsung.com>
Text decorations should be listed as non-inheritable
https://bugs.webkit.org/show_bug.cgi?id=119608
Reviewed by Andreas Kling.
Both "text-decoration" specs (CSS 2.1, CSS 3) and "text-decoration-line"
spec (CSS 3) states these properties are not inherited (w/ exceptions,
which are currently handled by -in-effect property), however those were
listed as inherited for no reason - thus preserving behavior as shown by
layout test results.
Backported from Blink: https://codereview.chromium.org/20751008
Updated getComputedStyle tests for both 'text-decoration' and
'text-decoration-line' properties to check that both are not implicitly
inherited.
* css/CSSProperty.cpp:
(WebCore::CSSProperty::isInheritedProperty):
2013-08-09 Andreas Kling <akling@apple.com>
I wish we had a Windows EWS. :(
* css/ElementRuleCollector.cpp:
(WebCore::ElementRuleCollector::doCollectMatchingRulesForList): No range-based for today.
2013-08-09 Rob Buis <rwlbuis@webkit.org>
ASSERT_NOT_REACHED() touched in WebCore::SVGAnimatedStringAnimator::addAnimatedTypes
https://bugs.webkit.org/show_bug.cgi?id=113224
Reviewed by Darin Adler.
Do not perform from-by animations for non-additive attributes.
Test: svg/animations/non-additive-type-from-by-animation.html
* svg/SVGAnimateElement.cpp:
(WebCore::SVGAnimateElement::calculateFromAndByValues):
(WebCore::SVGAnimateElement::animatedPropertyTypeSupportsAddition):
(WebCore::SVGAnimateElement::isAdditive):
* svg/SVGAnimateElement.h:
2013-08-09 Rob Buis <rwlbuis@webkit.org>
ASSERT(m_type == toSVGTransform.type())
https://bugs.webkit.org/show_bug.cgi?id=113217
Reviewed by Darin Adler.
For to animations clear the transform list while animating and reset to it after the animation is done.
This matches Firefox and Opera 12 behavior.
Tests: svg/animations/animateTransform-to-scale-expected.svg
svg/animations/animateTransform-to-scale.svg
* svg/SVGAnimatedTransformList.cpp:
(WebCore::SVGAnimatedTransformListAnimator::calculateAnimatedValue):
2013-08-09 Arunprasad Rajkumar <arurajku@cisco.com>
[Qt] QtWebKit should allow sending domain specific keycode to HTML applications
https://bugs.webkit.org/show_bug.cgi?id=118445
Reviewed by Allan Sandfeld Jensen.
No new test required, it is covered by QtWebKit API test.
This fix allows sending QKeyEvent::nativeVirtualKey as the DOM KeyboardEvent keyCode value instead
of Windows virtual key code. It can be enabled/disabled using "_q_useNativeVirtualKeyAsDOMKey"
dynamic property present in QWebPage.
* platform/PlatformKeyboardEvent.h:
(WebCore::PlatformKeyboardEvent::PlatformKeyboardEvent):
* platform/qt/PlatformKeyboardEventQt.cpp:
(WebCore::PlatformKeyboardEvent::PlatformKeyboardEvent):
(WebCore::PlatformKeyboardEvent::disambiguateKeyDownEvent):
2013-08-09 Renata Hodovan <reni@webkit.org>
Missing NULL check in ApplyStyleCommand::applyInlineStyleToNodeRange()
https://bugs.webkit.org/show_bug.cgi?id=119570
Reviewed by Ryosuke Niwa.
The m_mutableStyleSet of EditingStyle can be NULL in ApplyStyleCommand::applyInlineStyleToNodeRange but
this scenario was not checked earlier.
Test: editing/execCommand/null-style-crash.html
* css/StylePropertySet.cpp:
(WebCore::MutableStylePropertySet::mergeAndOverrideOnConflict):
* css/StylePropertySet.h:
* css/ViewportStyleResolver.cpp:
(WebCore::ViewportStyleResolver::addViewportRule):
* editing/ApplyStyleCommand.cpp:
(WebCore::ApplyStyleCommand::applyInlineStyleToNodeRange):
* editing/EditingStyle.cpp:
(WebCore::styleFromMatchedRulesForElement):
(WebCore::EditingStyle::mergeStyleFromRules):
(WebCore::EditingStyle::mergeStyleFromRulesForSerialization):
2013-08-09 Andreas Kling <akling@apple.com>
ElementRuleCollector: Use range-based for syntax in rule collection loop.
<http://webkit.org/b/119617>
<rdar://problem/14695311>
Reviewed by Antti Koivisto.
* css/ElementRuleCollector.cpp:
(WebCore::ElementRuleCollector::doCollectMatchingRulesForList):
2013-08-09 Andreas Kling <akling@apple.com>
StyleRule*::properties() should return const references.
<http://webkit.org/b/119596>
Reviewed by Antti Koivisto.
Make StyleRule::properties() & friends return const-references instead of
pointers. This exposed some pointless null checking, since rules should
always have properties.
All rule objects that contain properties now require a StylePropertySet at
the time of construction instead having you call setProperties() later.
The only rules that could ever have null properties were the default-inserted
animation keyframe rules for 0% and 100% that we'd conjure up if the author
didn't provide them. Now they just have an empty property set instead.
* css/CSSFontFaceRule.cpp:
(WebCore::CSSFontFaceRule::cssText):
* css/CSSFontSelector.cpp:
(WebCore::CSSFontSelector::addFontFaceRule):
* css/CSSPageRule.cpp:
(WebCore::CSSPageRule::cssText):
* css/CSSParser.cpp:
(WebCore::CSSParser::createFilterRule):
(WebCore::CSSParser::createStyleRule):
(WebCore::CSSParser::createFontFaceRule):
(WebCore::CSSParser::rewriteSpecifiers):
* css/CSSStyleRule.cpp:
(WebCore::CSSStyleRule::cssText):
* css/ElementRuleCollector.cpp:
(WebCore::leftToRightDeclaration):
(WebCore::rightToLeftDeclaration):
(WebCore::ElementRuleCollector::addElementStyleProperties):
(WebCore::ElementRuleCollector::doCollectMatchingRulesForList):
* css/PageRuleCollector.cpp:
(WebCore::PageRuleCollector::matchPageRulesForList):
* css/StylePropertySet.cpp:
(WebCore::MutableStylePropertySet::mergeAndOverrideOnConflict):
* css/StylePropertySet.h:
* css/StyleResolver.cpp:
(WebCore::StyleResolver::MatchResult::addMatchedProperties):
(WebCore::StyleResolver::styleForKeyframe):
(WebCore::StyleResolver::keyframeStylesForAnimation):
* css/StyleResolver.h:
* css/StyleRule.cpp:
(WebCore::StyleRule::StyleRule):
(WebCore::StyleRule::create):
(WebCore::StyleRulePage::StyleRulePage):
(WebCore::StyleRuleFontFace::StyleRuleFontFace):
(WebCore::StyleRuleViewport::StyleRuleViewport):
(WebCore::StyleRuleViewport::mutableProperties):
(WebCore::StyleRuleFilter::StyleRuleFilter):
* css/StyleRule.h:
(WebCore::StyleRule::create):
(WebCore::StyleRule::properties):
(WebCore::StyleRuleFontFace::create):
(WebCore::StyleRuleFontFace::properties):
(WebCore::StyleRulePage::create):
(WebCore::StyleRulePage::properties):
(WebCore::StyleRuleViewport::create):
(WebCore::StyleRuleViewport::properties):
(WebCore::StyleRuleFilter::create):
(WebCore::StyleRuleFilter::properties):
* css/StyleSheetContents.cpp:
(WebCore::StyleSheetContents::addSubresourceStyleURLs):
(WebCore::childRulesHaveFailedOrCanceledSubresources):
* css/WebKitCSSFilterRule.cpp:
(WebCore::WebKitCSSFilterRule::cssText):
* css/WebKitCSSKeyframeRule.cpp:
(WebCore::StyleKeyframe::StyleKeyframe):
(WebCore::StyleKeyframe::mutableProperties):
* css/WebKitCSSKeyframeRule.h:
(WebCore::StyleKeyframe::create):
(WebCore::StyleKeyframe::properties):
* css/WebKitCSSViewportRule.cpp:
(WebCore::WebKitCSSViewportRule::cssText):
* editing/ApplyStyleCommand.cpp:
(WebCore::ApplyStyleCommand::applyInlineStyleToNodeRange):
* editing/EditingStyle.cpp:
(WebCore::EditingStyle::mergeStyleFromRules):
(WebCore::EditingStyle::mergeStyleFromRulesForSerialization):
* inspector/InspectorStyleSheet.cpp:
(WebCore::InspectorStyleSheet::revalidateStyle):
* page/PageSerializer.cpp:
(WebCore::PageSerializer::retrieveResourcesForRule):
* svg/SVGFontFaceElement.cpp:
(WebCore::SVGFontFaceElement::SVGFontFaceElement):
(WebCore::SVGFontFaceElement::fontFamily):
(WebCore::SVGFontFaceElement::rebuildFontFace):
2013-08-09 Julien Brianceau <jbrianceau@nds.com>
[Qt] Fix build (broken by changeset r153826).
https://bugs.webkit.org/show_bug.cgi?id=119616
Reviewed by Andreas Kling.
* xml/parser/XMLDocumentParserQt.cpp:
(WebCore::XMLDocumentParser::XMLDocumentParser):
2013-08-08 Tim Horton <timothy_horton@apple.com>
navigator.plugins has plugins in it when plugins are disabled
https://bugs.webkit.org/show_bug.cgi?id=119607
<rdar://problem/14678030>
Reviewed by Anders Carlsson.
Test: plugins/navigator-plugins-disabled.html
* page/Settings.cpp:
(WebCore::Settings::setPluginsEnabled):
Refresh the plugin database when plugins are enabled or disabled.
This is necessary to ensure that navigator.plugins will have the
correct set of plugins after dynamically changing whether plugins
are enabled, which makes the test for this patch possible (but it
makes sense in the browser as well).
2013-08-08 Timothy Hatcher <timothy@apple.com>
Allow SVG images to be drawn into canvas without tainting.
https://bugs.webkit.org/show_bug.cgi?id=119492
Reviewed by Darin Adler.
Tests: svg/as-image/svg-canvas-not-tainted.html
svg/as-image/svg-canvas-link-not-colored.html
svg/as-image/svg-canvas-xhtml-tainted.html
* html/HTMLAnchorElement.cpp:
(WebCore::HTMLAnchorElement::parseAttribute): Call shouldProhibitLinks.
(WebCore::shouldProhibitLinks): Added.
* html/HTMLAnchorElement.h:
* html/HTMLImageElement.cpp:
(WebCore::HTMLImageElement::parseAttribute): Call shouldProhibitLinks.
* rendering/svg/RenderSVGRoot.cpp:
(WebCore::RenderSVGRoot::isEmbeddedThroughSVGImage): Use isInSVGImage.
* svg/SVGAElement.cpp:
(WebCore::SVGAElement::svgAttributeChanged): Call shouldProhibitLinks.
* svg/graphics/SVGImage.cpp:
(WebCore::SVGImage::hasSingleSecurityOrigin): Added.
(WebCore::isInSVGImage): Added.
* svg/graphics/SVGImage.h:
2013-08-08 Simon Fraser <simon.fraser@apple.com>
Fix ASSERT(m_contentsSolidColor.isValid()) assertion on iOS at nytimes.com
https://bugs.webkit.org/show_bug.cgi?id=119603
Reviewed by Dean Jackson.
On iOS it's possible for a GraphicsLayer to transition between having
a solid background color, and containing media. This happens on nytimes.com
when playing video.
In this case, GraphicsLayerCA::updateContentsColorLayer() would assert
because m_contentsLayer had been already set up to contain media, but
it would be trying to update the color.
Fix by bailing from all the updateContents* functions if there is no
contents layer, or that layer exists for a different purpose.
* platform/graphics/ca/GraphicsLayerCA.cpp:
(WebCore::GraphicsLayerCA::updateContentsMediaLayer):
(WebCore::GraphicsLayerCA::updateContentsCanvasLayer):
(WebCore::GraphicsLayerCA::updateContentsColorLayer):
2013-08-08 Commit Queue <commit-queue@webkit.org>
Unreviewed, rolling out r153847.
http://trac.webkit.org/changeset/153847
https://bugs.webkit.org/show_bug.cgi?id=119609
caused new SVG animation test failures (Requested by smfr on
#webkit).
* svg/SVGAnimateElement.cpp:
(WebCore::SVGAnimateElement::calculateFromAndByValues):
2013-08-08 Simon Fraser <simon.fraser@apple.com>
Kill updateStyleForAllDocuments()
https://bugs.webkit.org/show_bug.cgi?id=118093
Reviewed by Geoff Garen.
We should never have to eagerly update style, especially for all documents
that the process knows about. The WebKit model is to update style when
required for layout etc, not to update it eagerly.
This is historical code whose origins are lost in the mists of KHTML.
r42384 makes it possible to do away with this eager updating, and
r55568 removed some calls. Discussion in bug 32580 suggests that
form control code still need this, but tests still pass without it.
* bindings/js/JSCallbackData.cpp:
(WebCore::JSCallbackData::invokeCallback):
* bindings/js/JSCustomXPathNSResolver.cpp:
(WebCore::JSCustomXPathNSResolver::lookupNamespaceURI):
* dom/Document.cpp:
(WebCore::Document::scheduleStyleRecalc):
(WebCore::Document::unscheduleStyleRecalc):
* dom/Document.h:
* dom/Element.cpp:
(WebCore::Element::setActive):
2013-08-08 Jer Noble <jer.noble@apple.com>
[EME] MediaKey APIs should be prefixed.
https://bugs.webkit.org/show_bug.cgi?id=119606
Reviewed by Anders Carlsson.
No new tests; updated exsisting tests with new names.
Prefix all new classes with "WebKit" and new methods on existing unprefixed
classes with "webkit"
* Modules/encryptedmedia/MediaKeyMessageEvent.idl: MediaKeyMessageEvent -> WebKitMediaKeyMessageEvent
* Modules/encryptedmedia/MediaKeySession.idl: MediaKeySession -> WebKitMediaKeySession
* Modules/encryptedmedia/MediaKeys.idl: MediaKeys -> WebKitMediaKeys
* html/HTMLMediaElement.idl: keys -> webkitKeys, setMediaKeys -> webkitSetMediaKeys
* html/MediaKeyError.idl: MediaKeyError -> WebKitMediaKeyError
2013-08-08 Jer Noble <jer.noble@apple.com>
[EME] setMediaKeys function as defined in the EME specification does not work
https://bugs.webkit.org/show_bug.cgi?id=119597
Reviewed by Anders Carlsson.
No new tests; updated media/encrypted-media/encrypted-media-v2-syntax.html
Rename the mediaKeys attribute 'keys' and make readonly, and add an explicit
setMediaKeys() method in HTMLMediaElement's IDL.
* html/HTMLMediaElement.h:
(WebCore::HTMLMediaElement::keys):
* html/HTMLMediaElement.idl:
2013-08-06 Sam Weinig <sam@webkit.org>
Hashing SecurityOrigin's can lead to trouble if you mutate them :(
https://bugs.webkit.org/show_bug.cgi?id=119533
<rdar://problem/12978338>
Reviewed by Andreas Kling.
We are getting into trouble in the following circumstance:
- You have a HashMap<RefPtr<SecurityOrigin>, Value> map.
- You add security origin A (http, www.webkit.org, 80) to the map.
- You mutate security origin A by domain relaxation, so that it has the domain webkit.org.
- You add security origin B (http, www.webkit.org, 80) to the map.
- You mutate security origin B by domain relaxation, so that it has the domain webkit.org.
You now have two identical keys in the map.
- Add few more items to the map causing a rehash.
- When you try to add A and B back into the map, you will have a collision, because they now equal each other.
We should probably stop using SecurityOrigins as keys in HashMaps (and move to using a non-mutable SecurityOriginTuple,
or something), but for now, we can just only use the scheme / host / port part for equality, which is what all the users
really want.
* page/SecurityOriginHash.h:
(WebCore::SecurityOriginHash::equal):
Switch to using isSameSchemeHostPort() for SecurityOriginHash::equal().
2013-08-08 Rob Buis <rwlbuis@webkit.org>
ASSERT_NOT_REACHED() touched in WebCore::SVGAnimatedStringAnimator::addAnimatedTypes
https://bugs.webkit.org/show_bug.cgi?id=113224
Reviewed by Dirk Schulze.
Do not perform from-by animations for non-additive attributes.
Test: svg/animations/non-additive-type-from-by-animation.html
* svg/SVGAnimateElement.cpp:
(WebCore::SVGAnimateElement::calculateFromAndByValues):
2013-08-08 Brent Fulgham <bfulgham@apple.com>
[Windows] Improper Caption Button Displayed to Users
https://bugs.webkit.org/show_bug.cgi?id=119593
Reviewed by Eric Carlson.
Remove the custom drawing code for the Windows port, and
have it render using the CSS/SVG markup like we do on OS X.
* rendering/RenderThemeWin.cpp: Remove drawing code.
* rendering/RenderThemeWin.h: Remove declaration.
2013-08-08 Alex Christensen <achristensen@apple.com>
Work towards WebGL on AppleWin port.
https://bugs.webkit.org/show_bug.cgi?id=119562
Reviewed by Brent Fulgham.
* WebCore.vcxproj/WebCore.vcxproj:
Build GLContext.cpp and GraphicsContext3DPrivate.cpp on AppleWin port.
* WebCore.vcxproj/WebCore.vcxproj.filters:
Moved GLContext and GraphicsContext3DPrivate from Cairo filter to graphics.
* platform/graphics/GraphicsContext3D.h:
Added m_webGLLayer for AppleWin port.
* platform/graphics/GraphicsContext3DPrivate.cpp:
Protected inclusion of PlatformContextCairo.h in USE(CAIRO) macro for non-cairo ports.
* platform/graphics/win/GraphicsContext3DWin.cpp:
Removed stub GraphicsContext3DPrivate implementation in favor of GraphicsContext3DPrivate.cpp.
(WebCore::GraphicsContext3D::GraphicsContext3D):
Added GraphicsContext3DPrivate and PlatformCALayer initialization.
(WebCore::GraphicsContext3D::makeContextCurrent):
(WebCore::GraphicsContext3D::platformGraphicsContext3D):
Added implementation based on Cairo ports' to be refactored soon.
(WebCore::GraphicsContext3D::platformLayer):
Return PlatformCALayer's PlatformLayer instead of 0.
2013-08-08 Jer Noble <jer.noble@apple.com>
[EME] Implement MediaKeys.isTypeSupported()
https://bugs.webkit.org/show_bug.cgi?id=119586
Reviewed by Eric Carlson.
Test: media/encrypted-media/encrypted-media-is-type-supported.html
The EME spec has removed the extra keySystem parameter from
HTMLMediaElement.canPlayType() in favor of a new isTypeSupported()
method on MediaKeys.
To implement this method, the CDMFactory needs to know whether the
registered CDM supports the specified mime type. CDMs must register
this new factory method, which requires changes to CDMPrivateAVFoundation
and MockCDM.
Add the new MediaKeys.isTypeSupported() method:
* Modules/encryptedmedia/MediaKeys.cpp:
(WebCore::MediaKeys::isTypeSupported):
* Modules/encryptedmedia/MediaKeys.h:
* Modules/encryptedmedia/MediaKeys.idl:
Add the new factory CDMSupportsKeySystemAndMimeType method:
* Modules/encryptedmedia/CDM.cpp:
(WebCore::CDMFactory::CDMFactory): Now takes a third parameter.
(WebCore::installedCDMFactories): When adding the AVFoundation CDM, pass its new method.
(WebCore::CDM::registerCDMFactory): Now takes a third parameter.
(WebCore::CDM::keySystemSupportsMimeType): Added.
* Modules/encryptedmedia/CDM.h:
* WebCore.exp.in:
Register this new method with the factory for all concrete CDMs:
* Modules/encryptedmedia/CDMPrivateAVFoundation.h:
* Modules/encryptedmedia/CDMPrivateAVFoundation.mm:
(WebCore::CDMPrivateAVFoundation::supportsKeySystem):
(WebCore::CDMPrivateAVFoundation::supportsKeySystemAndMimeType):
* testing/Internals.cpp:
(WebCore::Internals::initializeMockCDM):
* testing/MockCDM.cpp:
(WebCore::MockCDM::supportsKeySystem):
(WebCore::MockCDM::supportsKeySystemAndMimeType):
* testing/MockCDM.h:
2013-08-08 Rob Buis <rwlbuis@webkit.org>
Crash in WTF::RefPtr<WebCore::SpaceSplitStringData>::operator UnspecifiedBoolType
https://bugs.webkit.org/show_bug.cgi?id=118839
Reviewed by Darin Adler.
Take into account that elementData() can be null in classAttributeChanged.
Test: svg/animations/classAttributeSettingCrash.html
* dom/Element.cpp:
(WebCore::Element::classAttributeChanged):
2013-08-08 Robert Hogan <robert@webkit.org>
REGRESSION(r147019): Page has extra space
https://bugs.webkit.org/show_bug.cgi?id=119424
Reviewed by David Hyatt.
Clear the overflow rect before recomputing it in table sections.
No new tests: the reduction uses jquery and I was unable to simulate the reduction without it.
* rendering/RenderTableSection.cpp:
(WebCore::RenderTableSection::layoutRows):
(WebCore::RenderTableSection::computeOverflowFromCells):
2013-08-08 Andreas Kling <akling@apple.com>
Inserting multiple rules into an empty style sheet should avoid style recalc if possible.
<http://webkit.org/b/119568>
Reviewed by Antti Koivisto.
As a follow-up to <http://webkit.org/b/119475>, where I added a hack for inserting
a single rule into an empty style sheet, this broadens the optimization to support
any number of rules.
This optimizes the scenario where a style sheet is added to the DOM and then populated
rule-by-rule via CSSOM insertRule()/addRule() calls. Previously we'd do a full style
recalc for this case, but now we'll treat it the same as a full sheet added at once.
* css/CSSStyleSheet.h:
* css/CSSStyleSheet.cpp:
(WebCore::CSSStyleSheet::willMutateRules):
Made willMutateRules() return whether the style sheet contents were cloned by the
copy-on-write mechanism.
* dom/Document.h:
(WebCore::CSSStyleSheet::didMutateRules):
(WebCore::CSSStyleSheet::insertRule):
Replaced the InsertionIntoEmptySheet mutation type by a general RuleInsertion.
The mutation callback checks if we're inserting into a rule that's not (yet) part
of the document's active sheet set. In that case, we defer doing the style sheet
until all the insertions are done (or something forces us to style+layout.)
Note that this optimization only happens if the style sheet had a single client.
Shared style sheets that just got cloned before mutation may have pointers into
them from the Document's StyleResolver, so we're forced to do an immediate sheet
update in that case.
(WebCore::CSSStyleSheet::RuleMutationScope::RuleMutationScope):
(WebCore::CSSStyleSheet::RuleMutationScope::~RuleMutationScope):
Moved these out-of-line.
(WebCore::CSSStyleSheet::didMutateRuleFromCSSStyleDeclaration):
* css/PropertySetCSSStyleDeclaration.cpp:
(WebCore::StyleRuleCSSStyleDeclaration::didMutate):
Made a separate mutation callback for CSSStyleDeclaration since its needs are
so simple compared to the mutation callback from CSSStyleSheet. Seems better
than adding yet another mode to the enum.
* dom/Document.cpp:
(WebCore::Document::Document):
(WebCore::Document::recalcStyle):
(WebCore::Document::styleResolverChanged):
(WebCore::Document::optimizedStyleSheetUpdateTimerFired):
(WebCore::Document::scheduleOptimizedStyleSheetUpdate):
Added mechanism to defer doing a RecalcStyleIfNeeded.
(WebCore::Document::updateStyleIfNeeded):
Synchronize the optimized style sheet update if there's one scheduled.
This ensures that stuff like layout-dependent property access won't operate
on stale style.
* dom/DocumentStyleSheetCollection.h:
(WebCore::DocumentStyleSheetCollection::pendingUpdateType):
(WebCore::DocumentStyleSheetCollection::setPendingUpdateType):
(WebCore::DocumentStyleSheetCollection::flushPendingUpdates):
* dom/DocumentStyleSheetCollection.cpp:
(WebCore::DocumentStyleSheetCollection::DocumentStyleSheetCollection):
(WebCore::DocumentStyleSheetCollection::updateActiveStyleSheets):
Have DSSC track the kind of style sheet update it needs to do (instead of just
a boolean "needs update.") This is used by Document::recalcStyle() to make sure
the right kind of update happens if there's one scheduled.
(WebCore::DocumentStyleSheetCollection::activeStyleSheetsContains):
Added helper to check if a CSSStyleSheet is part of the active set.
2013-08-08 Allan Sandfeld Jensen <allan.jensen@digia.com>
[WK1] NPStream::headers not initialized
https://bugs.webkit.org/show_bug.cgi?id=119574
Reviewed by Alexey Proskuryakov.
Initialize the header field. According to user feedback that should solve some
cases of random crashes when loading plugins on Mac and Windows.
* plugins/PluginStream.cpp:
(WebCore::PluginStream::PluginStream):
2013-08-08 Andreas Kling <akling@apple.com>
Element: Modernize attribute storage accessor functions.
<http://webkit.org/b/119578>
Reviewed by Antti Koivisto.
Rename these functions to more WebKit-style names.
- const Attribute* attributeItem(index) => const Attribute& attributeAt(index)
- const Attribute* getAttributeItem(name) => const Attribute* findAttributeByName(name)
- unsigned getAttributeItemIndex(name) => unsigned findAttributeIndexByName(name)
Note that attributeAt() now returns a reference instead of a pointer. That's right.
* css/SelectorChecker.cpp:
(WebCore::attributeValueMatches):
(WebCore::anyAttributeMatches):
* css/SelectorChecker.h:
(WebCore::SelectorChecker::checkExactAttribute):
* dom/Attr.cpp:
(WebCore::Attr::elementAttribute):
* dom/DatasetDOMStringMap.cpp:
(WebCore::DatasetDOMStringMap::getNames):
(WebCore::DatasetDOMStringMap::item):
(WebCore::DatasetDOMStringMap::contains):
* dom/Element.cpp:
(WebCore::Element::detachAttribute):
(WebCore::Element::removeAttribute):
(WebCore::Element::getAttribute):
(WebCore::Element::setAttribute):
(WebCore::Element::setSynchronizedLazyAttribute):
(WebCore::Element::setAttributeInternal):
(WebCore::Element::setAttributeNode):
(WebCore::Element::removeAttributeNode):
(WebCore::Element::removeAttributeInternal):
(WebCore::Element::getAttributeNode):
(WebCore::Element::getAttributeNodeNS):
(WebCore::Element::hasAttribute):
(WebCore::Element::hasAttributeNS):
(WebCore::Element::computeInheritedLanguage):
(WebCore::Element::normalizeAttributes):
(WebCore::Element::getURLAttribute):
(WebCore::Element::getNonEmptyURLAttribute):
(WebCore::Element::detachAllAttrNodesFromElement):
(WebCore::Element::cloneAttributesFromElement):
(WebCore::ElementData::isEquivalent):
(WebCore::ElementData::findAttributeIndexByNameSlowCase):
(WebCore::ElementData::findAttributeIndexByNameForAttributeNode):
(WebCore::UniqueElementData::findAttributeByName):
(WebCore::UniqueElementData::attributeAt):
* dom/Element.h:
(WebCore::Element::findAttributeIndexByName):
(WebCore::Element::fastHasAttribute):
(WebCore::Element::fastGetAttribute):
(WebCore::Element::attributeAt):
(WebCore::Element::findAttributeByName):
(WebCore::ElementData::findAttributeByName):
(WebCore::ElementData::findAttributeIndexByName):
(WebCore::ElementData::attributeAt):
* dom/NamedNodeMap.cpp:
(WebCore::NamedNodeMap::removeNamedItem):
(WebCore::NamedNodeMap::removeNamedItemNS):
(WebCore::NamedNodeMap::item):
* dom/Node.cpp:
(WebCore::Node::dumpStatistics):
(WebCore::Node::isDefaultNamespace):
(WebCore::Node::lookupNamespaceURI):
(WebCore::Node::lookupNamespacePrefix):
(WebCore::Node::compareDocumentPosition):
* dom/StyledElement.cpp:
(WebCore::StyledElement::makePresentationAttributeCacheKey):
(WebCore::StyledElement::rebuildPresentationAttributeStyle):
* editing/MarkupAccumulator.cpp:
(WebCore::MarkupAccumulator::appendElement):
* editing/markup.cpp:
(WebCore::completeURLs):
(WebCore::StyledMarkupAccumulator::appendElement):
* html/HTMLEmbedElement.cpp:
(WebCore::HTMLEmbedElement::parametersForPlugin):
* html/HTMLInputElement.cpp:
(WebCore::HTMLInputElement::updateType):
* html/HTMLObjectElement.cpp:
(WebCore::HTMLObjectElement::parametersForPlugin):
* html/HTMLSelectElement.cpp:
(WebCore::HTMLSelectElement::parseAttribute):
* html/parser/HTMLConstructionSite.cpp:
(WebCore::HTMLConstructionSite::mergeAttributesFromTokenIntoElement):
* inspector/DOMPatchSupport.cpp:
(WebCore::DOMPatchSupport::innerPatchNode):
(WebCore::DOMPatchSupport::createDigest):
* inspector/InspectorDOMAgent.cpp:
(WebCore::InspectorDOMAgent::setAttributesAsText):
(WebCore::InspectorDOMAgent::performSearch):
(WebCore::InspectorDOMAgent::buildArrayForElementAttributes):
* page/PageSerializer.cpp:
(WebCore::isCharsetSpecifyingNode):
* svg/SVGStyledElement.cpp:
(WebCore::SVGStyledElement::getPresentationAttribute):
* xml/XPathFunctions.cpp:
(WebCore::XPath::FunLang::evaluate):
* xml/XPathNodeSet.cpp:
(WebCore::XPath::NodeSet::traversalSort):
* xml/XPathStep.cpp:
(WebCore::XPath::Step::nodesInAxis):
* xml/parser/XMLDocumentParserLibxml2.cpp:
(WebCore::XMLDocumentParser::XMLDocumentParser):
* xml/parser/XMLDocumentParserQt.cpp:
(WebCore::XMLDocumentParser::XMLDocumentParser):
2013-08-08 Mark Lam <mark.lam@apple.com>
Restoring use of StackIterator instead of Interpreter::getStacktrace().
https://bugs.webkit.org/show_bug.cgi?id=119575.
Reviewed by Oliver Hunt.
No new tests.
* bindings/js/ScriptCallStackFactory.cpp:
(WebCore::createScriptCallStack):
2013-08-08 Zalan Bujtas <zalan@apple.com>
REGRESSION (r121551) Incorrect handling of invalid media query list.
https://bugs.webkit.org/show_bug.cgi?id=119164
Reviewed by Antti Koivisto.
Differentiate between syntactically invalid media queries and media queries with empty expressions.
Introduce a dedicated function for valid, but empty expression queries, so that passing NULL MediaQuerySet
object to CSSParser::createMediaRule() can indicate invalid media query.
Test: fast/media/invalid-media-query-list.html
* css/CSSGrammar.y.in:
* css/CSSParser.cpp:
(WebCore::CSSParser::createMediaRule):
(WebCore::CSSParser::createEmptyMediaRule):
* css/CSSParser.h:
2013-08-08 Gyuyoung Kim <gyuyoung.kim@samsung.com>
Introduce toSVGMPathElement(), and use it
https://bugs.webkit.org/show_bug.cgi?id=119566
Reviewed by Andreas Kling.
As a step to change static_cast with toSVGXXX, static_cast<SVGMPathElement*> can
be changed with toSVGMPathElement().
* svg/SVGAnimateMotionElement.cpp:
(WebCore::SVGAnimateMotionElement::updateAnimationPath):
* svg/SVGMPathElement.h:
(WebCore::toSVGMPathElement):
* svg/SVGPathElement.cpp:
(WebCore::SVGPathElement::invalidateMPathDependencies):
2013-08-08 Antti Koivisto <antti@apple.com>
Move more style recalc code to StyleResolveTree.cpp
https://bugs.webkit.org/show_bug.cgi?id=119553
Reviewed by Andreas Kling.
* css/StyleResolver.cpp:
* css/StyleResolver.h:
Remove now unused StyleResolver::styleForText.
* dom/ElementShadow.cpp:
* dom/ElementShadow.h:
Remove ElementShadow::recalcStyle.
* dom/ShadowRoot.cpp:
(WebCore::ShadowRoot::setResetStyleInheritance):
Use Style::resolveTree instead of ElementShadow::recalcStyle.
* dom/ShadowRoot.h:
Remove ShadowRoot::recalcStyle.
* dom/Text.cpp:
* dom/Text.h:
Remove Text::recalcTextStyle.
* style/StyleResolveTree.cpp:
(WebCore::Style::updateTextStyle):
Moved from Text::recalcTextStyle. Speed up by just setting the parent style on common case.
(WebCore::Style::resolveShadowTree):
Moved from ShadowRoot::recalcStyle.
Simplified to cover only cases that can occur with the current shadow DOM support.
(WebCore::Style::resolveTree):
2013-08-08 Andreas Kling <akling@apple.com>
REGRESSION(r139282): Old caret sometimes gets "stuck" (not repainted) in contenteditable elements.
<http://webkit.org/b/119520>
<rdar://problem/14658929>
Reviewed by Simon Fraser.
When computing a new caret rect, don't forget to repaint the old rect if the caret jumped
from one node to another.
We were being a little too clever, assuming that oldRect==newRect meant that no repaint was
necessary, but moving from (0,0) in one node to (0,0) in another would cause a ghost caret
in the old node.
Test: fast/repaint/caret-jump-between-nodes.html
* editing/FrameSelection.cpp:
(WebCore::FrameSelection::recomputeCaretRect):
Fall through all the way down to caret repaints if the selection's new anchor node is not
the same as m_previousCaretNode.
2013-08-07 Andrei Bucur <abucur@adobe.com>
[CSS Regions] Propagate overflow from the flow thread to the first and last region
https://bugs.webkit.org/show_bug.cgi?id=118526
Reviewed by David Hyatt.
The patch implements layout overflow propagation for the first and last regions. The approach
taken is triggering a simple layout on the regions after the named flows are laid out
that extracts the layout overflow from the flow thread and adds it to the regions.
The process is based on adding two new layout phases: the overflow phase and the final phase.
The overflow phase is set after the flow threads are laid out and it marks the regions as
needing to extract the overflow from the flow thread. In case there are blocks with auto overflow
it's possible the overflow to create scrollbars that shrink the regions. In this case the flow
thread is relaid out and set in the final phase, forcing the regions to recollect the layout
overflow. In theory this would be an N-step layout because scrollbars can force content to change
regions and create overflow for other blocks (and thus creating more scrollbars). For now, we are
limiting this to the first pass by inserting this new final layout phase.
A short description of the processing model for a document:
- layout the document (all the flow threads should be in the constrained layout phase after this step)
- reverse iterate through the flow threads and mark the regions for simplified layout (we need to
reverse iterate so the overflow can correctly propagate with nested regions)
- if the layout changes the size of a region, invalidate the flow thread and when laying it out mark
it as needing a new pass
- make a secondary pass through the flow threads that changed after scrollbars have been added and
recompute the overflow for their regions; mark the flow threads in the final phase (flow threads can't
be invalidated in the final phase)
- after the overflow was propagated update all the flow threads in the normal layout phase
There are some issues with the patch:
- the simplified layout doesn't compute correct overflow values for inline blocks
- the layout overflow from the flow thread doesn't take the region size into account
The first issue is not related to regions and will be fixed in a future patch. The second issue
will be fixed when box overflow will be region bound.
Tests: fast/regions/overflow-scrollable-1.html
fast/regions/overflow-scrollable-2.html
fast/regions/overflow-scrollable-3.html
fast/regions/overflow-scrollable-fit-complex.html
fast/regions/overflow-scrollable-fit.html
fast/regions/overflow-scrollable-nested.html
* rendering/FlowThreadController.cpp: Flow threads layout driver functions.
(WebCore::FlowThreadController::updateFlowThreadsNeedingLayout):
(WebCore::FlowThreadController::updateFlowThreadsIntoConstrainedPhase):
(WebCore::FlowThreadController::updateFlowThreadsIntoOverflowPhase):
(WebCore::FlowThreadController::updateFlowThreadsIntoMeasureContentPhase):
(WebCore::FlowThreadController::updateFlowThreadsIntoFinalPhase):
* rendering/FlowThreadController.h:
* rendering/RenderBlock.cpp:
(WebCore::RenderBlock::simplifiedNormalFlowLayout):
* rendering/RenderFlowThread.cpp:
(WebCore::RenderFlowThread::RenderFlowThread):
(WebCore::RenderFlowThread::invalidateRegions):
(WebCore::RenderFlowThread::validateRegions):
(WebCore::RenderFlowThread::layout):
(WebCore::RenderFlowThread::firstRegion): This getter should work even though the region chain is invalid.
(WebCore::RenderFlowThread::lastRegion): This getter should work even though the region chain is invalid.
(WebCore::RenderFlowThread::initializeRegionsComputedAutoHeight):
(WebCore::RenderFlowThread::markRegionsForOverflowLayoutIfNeeded): If the flow thread has no overflow do nothing.
(WebCore::RenderFlowThread::updateRegionsFlowThreadPortionRect):
(WebCore::RenderFlowThread::addForcedRegionBreak):
* rendering/RenderFlowThread.h:
* rendering/RenderMultiColumnSet.cpp:
(WebCore::RenderMultiColumnSet::flowThreadPortionOverflowRect):
* rendering/RenderRegion.cpp:
(WebCore::RenderRegion::pageLogicalHeight):
(WebCore::RenderRegion::maxPageLogicalHeight):
(WebCore::RenderRegion::logicalHeightOfAllFlowThreadContent):
(WebCore::RenderRegion::flowThreadPortionOverflowRect):
(WebCore::RenderRegion::overflowRectForFlowThreadPortion): Used to get the flow thread visual or layout overflow.
(WebCore::RenderRegion::layoutBlock):
(WebCore::RenderRegion::computeOverflowFromFlowThread):
(WebCore::RenderRegion::updateLogicalHeight):
* rendering/RenderRegion.h:
* rendering/RenderView.cpp:
(WebCore::RenderView::layoutContentToComputeOverflowInRegions):
(WebCore::RenderView::layout):
* rendering/RenderView.h:
2013-08-07 Simon Fraser <simon.fraser@apple.com>
Avoid spurious "all repaint" layouts when scrolling WebViews on Retina displays
https://bugs.webkit.org/show_bug.cgi?id=119564
Reviewed by Beth Dakin.
When scrolling WebViews on Macs with Retina displays, AppKit uses
device pixels for the scroll offset, so [scrollView() documentVisibleRect]
can return a CGRect with non-integral origin. This rect is used by layout,
via layoutSize(), to decide whether the view size changed, which prompts
a full repaint. However, FrameView gets a value which has been rounded
by enclosingIntRect(), which increases the height or width by 1px if the
y or x offset is on a half-pixel, causing spurious full repaints.
Fix by plumbing through platformVisibleContentSize(), which just
gets the size of the -documentVisibleRect.
* page/FrameView.cpp:
(WebCore::FrameView::layout): Don't get layoutHeight and layoutWidth
separately, since that is two calls down into platformVisibleContentSize.
* platform/ScrollView.cpp:
(WebCore::ScrollView::unscaledVisibleContentSize):
(WebCore::ScrollView::platformVisibleContentSize):
* platform/ScrollView.h:
* platform/mac/ScrollViewMac.mm:
(WebCore::ScrollView::platformVisibleContentSize):
2013-08-07 Simon Fraser <simon.fraser@apple.com>
Be more aggressive about sending fake mouse events less frequently
https://bugs.webkit.org/show_bug.cgi?id=119563
<rdar://problem/14669029>
Reviewed by Tim Horton.
r109151 added code that throttles back the fake mouse events that we
send during scrolling, but in such a way that a page could take up to
100ms to handle a single mousemove, and we'd still send fake mousemove
events every 100ms. This could cause serious scrolling stutter.
Fix by changing when we drop back to sending events every 250ms, rather than every
100ms: if the slowest mousemove takes 10ms or more (less than one frame), drop back
to a 250ms fake move interval.
* page/EventHandler.cpp:
(WebCore::EventHandler::dispatchFakeMouseMoveEventSoon):
2013-08-07 Adenilson Cavalcanti <cavalcantii@gmail.com>
[rendering] Implement PaintInfo interfaces
https://bugs.webkit.org/show_bug.cgi?id=119388
Reviewed by Benjamin Poulain.
In discussion in IRC, it was decided to remove this comment since implementing such change
would have a vast impact on rendering classes.
* rendering/PaintInfo.h:
2013-08-07 Dean Jackson <dino@apple.com>
Don't remove contents layer from its parent unless necessary
https://bugs.webkit.org/show_bug.cgi?id=119560
Reviewed by Simon Fraser.
RenderLayerBacking::updateInternalHierarchy() is called in some
instances where there doesn't need to be a complete reparenting of the
the m_graphicsLayer. For example, on OS X when the user changes the
scrollbar styles to/from always visible. We don't need to always
remove the graphics layer from its parent - any reparenting does that
automatically.
Unfortunately we can't trigger this situation in an automated test.
* rendering/RenderLayerBacking.cpp:
(WebCore::RenderLayerBacking::updateInternalHierarchy): Don't call removeFromParent().
2013-08-07 Tim Horton <timothy_horton@apple.com>
Fall out of simple image layer optimization if the image has EXIF rotation
https://bugs.webkit.org/show_bug.cgi?id=119535
<rdar://problem/14071174>
Reviewed by Simon Fraser.
Test: fast/images/exif-orientation-composited.html
* platform/graphics/BitmapImage.cpp:
(WebCore::BitmapImage::frameOrientationAtIndex):
Ensure that the frame is cached if we're requesting the orientation,
so we can acquire orientation information at any given time.
* platform/mac/DragImageMac.mm:
(WebCore::createDragImageFromImage):
* platform/graphics/BitmapImage.h:
Rename currentFrameOrientation to frameOrientationForCurrentFrame to match
the similarly-behaving nativeImageForCurrentFrame.
* platform/graphics/Image.h:
(WebCore::Image::orientationForCurrentFrame): Added. Virtual, overriden by BitmapImage.
* rendering/RenderLayerBacking.cpp:
(WebCore::RenderLayerBacking::isDirectlyCompositedImage):
If the given image has a non-default image orientation, don't use direct compositing.
2013-08-07 Antti Koivisto <antti@apple.com>
fast/frames/seamless/seamless-custom-font-pruning-crash.html asserts
https://bugs.webkit.org/show_bug.cgi?id=119557
Rubber-stamped by Eric Carlson.
Pass Style::Detach style change to seamless document as Style::Force. Style::resolveTree does not expect to be called with Detach.
* html/HTMLIFrameElement.cpp:
(WebCore::HTMLIFrameElement::didRecalcStyle):
2013-08-07 Andre Moreira Magalhaes <andre.magalhaes@collabora.co.uk>
Disable HTTP request "Accept-Encoding:" header field on gstreamer source element to avoid receiving the wrong size when retrieving data
https://bugs.webkit.org/show_bug.cgi?id=115354
Reviewed by Philippe Normand.
The default value for the HTTP "Accept-Encoding:" header field in the request allows
compressed data to be received on requests.
While this works fine for most cases, it can break the webkit source that needs to rely on the
the proper data size when receiving the response (even though the received data is already
uncompressed the size reported in ResourceResponse::expectedContentLength() is the same
represented by the HTTP header field "Content-Length" which is the size of the compressed data).
This patch disables the HTTP "Accept-Encoding:" header field when using the request
as we don't want the received response to be encoded in any way, as we need to rely on the proper
size of the returned data on ResourceHandle::didReceiveResponse().
* platform/graphics/gstreamer/WebKitWebSourceGStreamer.cpp:
(webKitWebSrcStart):
* platform/network/soup/ResourceRequest.h:
(ResourceRequestBase):
(WebCore::ResourceRequest::acceptEncoding):
(WebCore::ResourceRequest::setAcceptEncoding):
(WebCore::ResourceRequest::ResourceRequestBase):
* platform/network/soup/ResourceRequestSoup.cpp:
(WebCore::ResourceRequest::updateSoupMessage):
(WebCore::ResourceRequest::toSoupMessage):
2013-08-07 Allan Sandfeld Jensen <allan.jensen@digia.com>
[Qt] REGRESSION(r) Two pixel result fail after r153522
https://bugs.webkit.org/show_bug.cgi?id=119392
Reviewed by Jocelyn Turcotte.
Consider scaling transform on the painter to determine final destination size.
Covered by existing tests.
* platform/graphics/qt/ImageQt.cpp:
(WebCore::prescaleImageIfRequired):
(WebCore::BitmapImage::draw):
2013-08-07 Antti Koivisto <antti@apple.com>
2.5% regression on page cycler moz
https://bugs.webkit.org/show_bug.cgi?id=102822
Reviewed by Andreas Kling.
DocumentStyleSheetCollection::invalidateInjectedStyleSheetCache() triggers a style recalc for quirks mode
documents in the beginning of document parsing via Document::setCompatibilityMode. This often coalesces
with style recalc triggered by stylesheet loading. However on very simple documents it can generate genuinely
unnecessary work.
* dom/DocumentStyleSheetCollection.cpp:
(WebCore::DocumentStyleSheetCollection::invalidateInjectedStyleSheetCache):
Check that we actually have cached injected stylesheets before triggering style recalc.
* page/PageGroup.cpp:
(WebCore::PageGroup::addUserStyleSheetToWorld):
(WebCore::PageGroup::removeUserStyleSheetFromWorld):
(WebCore::PageGroup::removeUserStyleSheetsFromWorld):
(WebCore::PageGroup::removeAllUserContent):
Fix a misspelling.
(WebCore::PageGroup::invalidateInjectedStyleSheetCacheInAllFrames):
Always invalidate style when user sheets change since we don't do that in
DocumentStyleSheetCollection::invalidateInjectedStyleSheetCache anymore.
* page/PageGroup.h:
2013-08-07 Andre Moreira Magalhaes <andre.magalhaes@collabora.co.uk>
Do no check seek offset against internal size on gstreamer source element
https://bugs.webkit.org/show_bug.cgi?id=116533
Reviewed by Philippe Normand.
The internal size on gstreamer source element may be wrong in case the received size in
didReceiveResponse is not accurate. Lets just try to seek and let it fail if necessary.
* platform/graphics/gstreamer/WebKitWebSourceGStreamer.cpp:
(webKitWebSrcSeekDataCb):
2013-08-07 Antti Koivisto <antti@apple.com>
Create WebCore/style and move StyleResolveTree there
https://bugs.webkit.org/show_bug.cgi?id=119543
Reviewed by Andreas Kling.
WebCore/css is bloated. We should move the internal style representation and the style resolver
related code to a directory of their own. CSS language related code including parser and
CSSOM stays under css.
Things named StyleFoo should generally move under WebCore/style. They should also be moved to
the Style namespace at the same time.
* CMakeLists.txt:
* GNUmakefile.am:
* GNUmakefile.list.am:
* WebCore.pri:
* Target.pri:
* WebCore.vcxproj/WebCore.vcxproj:
* WebCore.vcxproj/WebCoreCommon.props:
* WebCore.vcxproj/copyForwardingHeaders.cmd:
* WebCore.xcodeproj/project.pbxproj:
* css/StyleResolveTree.cpp: Removed.
* css/StyleResolveTree.h: Removed.
* style: Added.
* style/StyleResolveTree.cpp: Copied from Source/WebCore/css/StyleResolveTree.cpp.
* style/StyleResolveTree.h: Copied from Source/WebCore/css/StyleResolveTree.h.
2013-08-07 Antti Koivisto <antti@apple.com>
Move style recalculation out from Element
https://bugs.webkit.org/show_bug.cgi?id=119497
Reviewed by Andreas Kling.
Element currently does too much. Element::recalcStyle() and the related functions can be turned into
standalone functions that operate on DOM tree. This will also give more freedom for future refactoring,
for example making style recalculation non-recursive.
* WebCore.xcodeproj/project.pbxproj:
* css/StyleResolveTree.cpp: Added.
(WebCore::Style::determineChange):
- moved and renamed from Node::diff
- factored to use early return style
- simplifield the null input logic
(WebCore::Style::pseudoStyleCacheIsInvalid):
- moved from Element::pseudoStyleCacheIsInvalid
- narrowed to take RenderObject rather than operate on Element
(WebCore::Style::resolveLocal):
- split from Element::recalcStyle
- factored to use early return style
(WebCore::Style::resolveTree):
- moved and renamed from Element::recalcStyle
* css/StyleResolveTree.h: Added.
- introcuduce Style namespace for style related classes and functions
- move and rename Node::StyleChange -> Style::Change
* css/StyleResolver.h:
(WebCore::StyleResolverParentPusher::StyleResolverParentPusher):
(WebCore::StyleResolverParentPusher::push):
(WebCore::StyleResolverParentPusher::~StyleResolverParentPusher):
Moved this stack helper to StyleResolver.h for now since it is needed by both
StyleRecalculation and Element.
* dom/Document.cpp:
(WebCore::Document::recalcStyle):
(WebCore::Document::updateStyleIfNeeded):
(WebCore::Document::updateLayoutIgnorePendingStylesheets):
(WebCore::Document::attach):
(WebCore::Document::styleResolverChanged):
(WebCore::Document::webkitWillEnterFullScreenForElement):
* dom/Document.h:
* dom/Element.cpp:
(WebCore::shouldIgnoreAttributeCase):
(WebCore::Element::updatePseudoElement):
(WebCore::Element::resetComputedStyle):
(WebCore::Element::willRecalcStyle):
(WebCore::Element::didRecalcStyle):
* dom/Element.h:
- remove Element::recalcStyle
- make a few private functions needed by StyleRecalculation public
* dom/ElementShadow.cpp:
(WebCore::ElementShadow::recalcStyle):
* dom/ElementShadow.h:
* dom/Node.cpp:
* dom/Node.h:
- remove Node::StyleChange
- remove Node::diff
* dom/PseudoElement.cpp:
(WebCore::PseudoElement::didRecalcStyle):
* dom/PseudoElement.h:
* dom/ShadowRoot.cpp:
(WebCore::ShadowRoot::recalcStyle):
(WebCore::ShadowRoot::setResetStyleInheritance):
* dom/ShadowRoot.h:
* dom/Text.cpp:
(WebCore::Text::recalcTextStyle):
* dom/Text.h:
* html/HTMLFormControlElement.cpp:
(WebCore::HTMLFormControlElement::didRecalcStyle):
* html/HTMLFormControlElement.h:
* html/HTMLFrameSetElement.cpp:
(WebCore::HTMLFrameSetElement::willRecalcStyle):
* html/HTMLFrameSetElement.h:
* html/HTMLIFrameElement.cpp:
(WebCore::HTMLIFrameElement::didRecalcStyle):
* html/HTMLIFrameElement.h:
* html/HTMLMediaElement.cpp:
(WebCore::HTMLMediaElement::didRecalcStyle):
* html/HTMLMediaElement.h:
* html/HTMLOptionElement.cpp:
(WebCore::HTMLOptionElement::didRecalcStyle):
* html/HTMLOptionElement.h:
* html/HTMLPlugInImageElement.cpp:
(WebCore::HTMLPlugInImageElement::willRecalcStyle):
(WebCore::HTMLPlugInImageElement::documentWillSuspendForPageCache):
(WebCore::HTMLPlugInImageElement::documentDidResumeFromPageCache):
* html/HTMLPlugInImageElement.h:
* inspector/InspectorOverlay.cpp:
(WebCore::InspectorOverlay::update):
* loader/DocumentWriter.cpp:
(WebCore::DocumentWriter::reportDataReceived):
* page/Frame.cpp:
(WebCore::Frame::setPageAndTextZoomFactors):
* page/Page.cpp:
(WebCore::Page::setPageScaleFactor):
* rendering/RenderBlock.cpp:
(WebCore::RenderBlock::updateFirstLetterStyle):
* svg/SVGElement.cpp:
(WebCore::SVGElement::willRecalcStyle):
* svg/SVGElement.h:
* svg/SVGUseElement.cpp:
(WebCore::SVGUseElement::willRecalcStyle):
* svg/SVGUseElement.h:
2013-08-07 Mihnea Ovidenie <mihnea@adobe.com>
[CSSRegions] Wrong auto-height region computation for nested named flows
https://bugs.webkit.org/show_bug.cgi?id=119517
Reviewed by David Hyatt.
Test: fast/regions/abspos-autoheight-nested-region.html
In the case of an (inner) auto-height region that is absolutely positioned in a named flow that is displayed in an (outer) auto-height region,
when we are doing the layout for the named flow we need to add a "forced region break" also for the case of simplified layout, otherwise
the outer auto-height region will not get the chance to compute its auto-height, ending up with a huge value that was used to initialize
the auto-height computed value before the start of the layout algorithm.
* rendering/RenderBlock.cpp:
(WebCore::RenderBlock::simplifiedLayout):
2013-08-06 Stephanie Lewis <slewis@apple.com>
Update Order Files for Safari
<rdar://problem/14517392>
Unreviewed.
No change in functionality.
* WebCore.order:
2013-08-04 Sam Weinig <sam@webkit.org>
Remove support for HTML5 Microdata
https://bugs.webkit.org/show_bug.cgi?id=119480
Reviewed by Anders Carlsson.
* CMakeLists.txt:
* Configurations/FeatureDefines.xcconfig:
* DerivedSources.cpp:
* DerivedSources.make:
* DerivedSources.pri:
* GNUmakefile.list.am:
* Target.pri:
* UseJSC.cmake:
* WebCore.vcxproj/WebCore.vcxproj:
* WebCore.vcxproj/WebCore.vcxproj.filters:
* WebCore.xcodeproj/project.pbxproj:
* bindings/gobject/GNUmakefile.am:
* bindings/js/JSBindingsAllInOne.cpp:
* bindings/js/JSHTMLCollectionCustom.cpp:
(WebCore::JSHTMLCollection::nameGetter):
* bindings/js/JSHTMLElementCustom.cpp:
* bindings/js/JSMicroDataItemValueCustom.cpp: Removed.
* bindings/scripts/CodeGeneratorJS.pm:
(GenerateImplementation):
* dom/Document.cpp:
* dom/Document.h:
* dom/Document.idl:
* dom/Element.cpp:
(WebCore::Element::ensureCachedHTMLCollection):
* dom/LiveNodeList.cpp:
(WebCore::LiveNodeListBase::rootNode):
(WebCore::LiveNodeListBase::invalidateCache):
(WebCore::LiveNodeList::namedItem):
* dom/LiveNodeList.h:
(WebCore::LiveNodeListBase::shouldInvalidateTypeOnAttributeChange):
* dom/MicroDataItemList.cpp: Removed.
* dom/MicroDataItemList.h: Removed.
* dom/Node.cpp:
* dom/Node.h:
* dom/NodeRareData.cpp:
* dom/NodeRareData.h:
* dom/PropertyNodeList.cpp: Removed.
* dom/PropertyNodeList.h: Removed.
* dom/PropertyNodeList.idl: Removed.
* html/CollectionType.h:
* html/HTMLAnchorElement.cpp:
* html/HTMLAnchorElement.h:
* html/HTMLAreaElement.cpp:
* html/HTMLAreaElement.h:
* html/HTMLCollection.cpp:
(WebCore::shouldOnlyIncludeDirectChildren):
(WebCore::rootTypeFromCollectionType):
(WebCore::invalidationTypeExcludingIdAndNameAttributes):
(WebCore::isMatchingElement):
(WebCore::LiveNodeListBase::item):
* html/HTMLElement.cpp:
(WebCore::HTMLElement::parseAttribute):
(WebCore::HTMLElement::isURLAttribute):
* html/HTMLElement.h:
* html/HTMLElement.idl:
* html/HTMLEmbedElement.cpp:
* html/HTMLEmbedElement.h:
* html/HTMLIFrameElement.cpp:
* html/HTMLIFrameElement.h:
* html/HTMLImageElement.cpp:
* html/HTMLImageElement.h:
* html/HTMLLinkElement.cpp:
* html/HTMLLinkElement.h:
* html/HTMLMediaElement.cpp:
* html/HTMLMediaElement.h:
* html/HTMLMetaElement.cpp:
* html/HTMLMetaElement.h:
* html/HTMLObjectElement.cpp:
* html/HTMLObjectElement.h:
* html/HTMLPropertiesCollection.cpp: Removed.
* html/HTMLPropertiesCollection.h: Removed.
* html/HTMLPropertiesCollection.idl: Removed.
* html/HTMLSourceElement.cpp:
* html/HTMLSourceElement.h:
* html/HTMLTrackElement.cpp:
* html/HTMLTrackElement.h:
* html/MicroDataAttributeTokenList.cpp: Removed.
* html/MicroDataAttributeTokenList.h: Removed.
* html/MicroDataItemValue.cpp: Removed.
* html/MicroDataItemValue.h: Removed.
* html/MicroDataItemValue.idl: Removed.
2013-08-06 Tim Horton <timothy_horton@apple.com>
Remove PlatformCALayer::contentsTransform and ::setContentsTransform
https://bugs.webkit.org/show_bug.cgi?id=119529
Reviewed by Sam Weinig.
No new tests, removing dead code.
These methods are not used and are currently unimplemented.
* platform/graphics/ca/PlatformCALayer.h:
* platform/graphics/ca/mac/PlatformCALayerMac.mm:
* platform/graphics/ca/win/PlatformCALayerWin.cpp:
2013-08-06 Alex Christensen <achristensen@apple.com>
Moved GraphicsContext3DPrivate out of cairo directory to be used by the AppleWin port.
https://bugs.webkit.org/show_bug.cgi?id=119525
Reviewed by Dean Jackson.
* GNUmakefile.list.am:
* PlatformGTK.cmake:
* WebCore.vcxproj/WebCore.vcxproj:
* WebCore.vcxproj/WebCore.vcxproj.filters:
Changed location of GraphicsContext3DPrivate.cpp and GraphicsContext3DPrivate.h.
* platform/graphics/GraphicsContext3DPrivate.cpp: Copied from WebCore/platform/graphics/cairo/GraphicsContext3DPrivate.cpp.
* platform/graphics/GraphicsContext3DPrivate.h: Copied from WebCore/platform/graphics/cairo/GraphicsContext3DPrivate.h.
* platform/graphics/cairo/GraphicsContext3DPrivate.cpp: Removed.
* platform/graphics/cairo/GraphicsContext3DPrivate.h: Removed.
2013-08-06 Brent Fulgham <bfulgham@apple.com>
[Windows] Unreviewed build correction after r153754 and r153757.
* page/animation/CSSPropertyAnimation.cpp:
(WebCore::blendFunc): Don't force std::remainder, since we are using our own
custom implementation on Windows.
2013-08-06 Brent Fulgham <bfulgham@apple.com>
Improper Calculation of In-band Cue Colors
https://bugs.webkit.org/show_bug.cgi?id=119523
Reviewed by Eric Carlson.
* platform/graphics/avfoundation/InbandTextTrackPrivateAVF.cpp:
(WebCore::makeRGBA32FromARGBCFArray): Remove redundant multiplication by
255. The internal conversion logic already converts to bytes.
2013-08-06 Rob Buis <rwlbuis@webkit.org>
Speculative build fix after r153754.
* page/animation/CSSPropertyAnimation.cpp:
(WebCore::blendFunc):
2013-07-23 David Farler <dfarler@apple.com>
Provide optional OTHER_CFLAGS, OTHER_CPPFLAGS, OTHER_LDFLAGS additions for building with ASAN
https://bugs.webkit.org/show_bug.cgi?id=117762
Reviewed by Mark Rowe.
No new tests necessary.
* Configurations/DebugRelease.xcconfig:
Add ASAN_OTHER_CFLAGS, CPLUSPLUSFLAGS, LDFLAGS.
* Configurations/WebCore.xcconfig:
Add ASAN_OTHER_LDFLAGS.
* Configurations/WebCoreTestShim.xcconfig:
Add ASAN_OTHER_LDFLAGS.
* Configurations/WebCoreTestSupport.xcconfig:
Add ASAN_OTHER_LDFLAGS.
* WebCore.xcodeproj/project.pbxproj:
Don't use ASAN for build tools.
2013-08-05 Rob Buis <rwlbuis@webkit.org>
SVG stroke-dasharray is not animatable
https://bugs.webkit.org/show_bug.cgi?id=118574
Reviewed by Dirk Schulze.
Make stroke-dasharray a property that can be animated using CSS transitions.
* page/animation/CSSPropertyAnimation.cpp:
(WebCore::blendFunc):
(WebCore::CSSPropertyAnimation::ensurePropertyMap):
* rendering/style/RenderStyle.h:
2013-08-06 Sergio Villar Senin <svillar@igalia.com>
[CSS Grid Layout] Allow defining named grid lines on the grid element
https://bugs.webkit.org/show_bug.cgi?id=118255
Reviewed by Andreas Kling.
From Blink r149798 by <jchaffraix@chromium.org>
This change adds parsing, style resolution and getComputedStyle
support for named grid lines at the grid element level
(i.e. extends our <track-list> support). Per the specification, we
allow multiple grid lines with the same name.
To fully support resolving the grid lines to a position on our
grid, we need to add the parsing at the grid item's level (which
means extending our <grid-line> support). This will be done in a
follow-up change.
Test: fast/css-grid-layout/named-grid-line-get-set.html
* css/CSSComputedStyleDeclaration.cpp:
(WebCore::addValuesForNamedGridLinesAtIndex):
(WebCore::valueForGridTrackList):
(WebCore::ComputedStyleExtractor::propertyValue):
* css/CSSParser.cpp:
(WebCore::CSSParser::parseGridTrackList):
* css/StyleResolver.cpp:
(WebCore::createGridTrackList):
(WebCore::StyleResolver::applyProperty):
* rendering/style/RenderStyle.h:
* rendering/style/StyleGridData.cpp:
(WebCore::StyleGridData::StyleGridData):
* rendering/style/StyleGridData.h:
(WebCore::StyleGridData::operator==):
2013-08-06 Allan Sandfeld Jensen <allan.jensen@digia.com>
[Qt] Fix minimal build.
Unreviewed build fix.
Fix build witt XSLT disabled
* xml/parser/XMLDocumentParserLibxml2.cpp:
(WebCore::hasNoStyleInformation):
2013-08-06 Zan Dobersek <zdobersek@igalia.com>
webkit-gtk fails to build with bison-3.0
https://bugs.webkit.org/show_bug.cgi?id=119373
Reviewed by Gustavo Noronha Silva.
* GNUmakefile.am: Remove rules for generating ANGLE's glslang source files with Bison.
2013-06-26 Sergio Villar Senin <svillar@igalia.com>
[CSS Grid Layout] Add support for parsing <grid-line> that includes a 'span'
https://bugs.webkit.org/show_bug.cgi?id=118051
Reviewed by Andreas Kling.
From Blink r148766 by <jchaffraix@chromium.org>
This adds the parsing, style resolution and getComputedStyle bits
to our code. The rendering code was not made aware of the new type
of GridPosition yet.
* css/CSSComputedStyleDeclaration.cpp:
(WebCore::valueForGridPosition):
* css/CSSParser.cpp:
(WebCore::CSSParser::parseValue):
(WebCore::CSSParser::parseGridPosition):
* css/CSSParser.h:
* css/CSSValueKeywords.in:
* css/StyleResolver.cpp:
(WebCore::StyleResolver::adjustRenderStyle):
(WebCore::StyleResolver::adjustGridItemPosition):
(WebCore::createGridPosition):
* css/StyleResolver.h:
* rendering/RenderGrid.cpp:
(WebCore::RenderGrid::resolveGridPositionFromStyle):
* rendering/style/GridPosition.h:
(WebCore::GridPosition::isInteger):
(WebCore::GridPosition::isSpan):
(WebCore::GridPosition::setSpanPosition):
(WebCore::GridPosition::spanPosition):
2013-06-25 Sergio Villar Senin <svillar@igalia.com>
[CSS Grid Layout] Rename grid placement properties
https://bugs.webkit.org/show_bug.cgi?id=117878
Reviewed by Andreas Kling.
Renamed the grid placement properties to match the latest version
of the spec. The new names are -webkit-grid-column-{start|end} and
-webkit-grid-row-{start|end}.
No new tests needed as we're just renaming some properties,
functionality already covered by existing tests in
fast/css-grid-layout.
* css/CSSComputedStyleDeclaration.cpp:
(WebCore::ComputedStyleExtractor::propertyValue):
* css/CSSParser.cpp:
(WebCore::CSSParser::parseValue):
* css/CSSProperty.cpp:
(WebCore::CSSProperty::isInheritedProperty):
* css/CSSPropertyNames.in:
* css/StylePropertyShorthand.cpp:
(WebCore::webkitGridColumnShorthand):
(WebCore::webkitGridRowShorthand):
* css/StyleResolver.cpp:
(WebCore::StyleResolver::applyProperty):
* rendering/RenderGrid.cpp:
(WebCore::RenderGrid::maximumIndexInDirection):
(WebCore::RenderGrid::resolveGridPositionsFromStyle):
(WebCore::RenderGrid::resolveGridPositionFromStyle):
* rendering/RenderGrid.h:
* rendering/style/RenderStyle.h:
* rendering/style/StyleGridItemData.cpp:
(WebCore::StyleGridItemData::StyleGridItemData):
* rendering/style/StyleGridItemData.h:
(WebCore::StyleGridItemData::operator==):
2013-08-05 Przemyslaw Szymanski <p.szymanski3@samsung.com>
[WebGL] validateRenderingState method name change
https://bugs.webkit.org/show_bug.cgi?id=119485
According to validateRenderingState method functionality its name should be
changed. This method validates only vertex attributes.
Reviewed by Dean Jackson.
No new tests. Covered by existing tests. No changes in functionality.
* html/canvas/WebGLRenderingContext.cpp:
(WebCore::WebGLRenderingContext::validateVertexAttributes):
(WebCore::WebGLRenderingContext::drawArrays):
(WebCore::WebGLRenderingContext::drawElements):
* html/canvas/WebGLRenderingContext.h:
2013-07-27 Mark Rowe <mrowe@apple.com>
Logging should be configurable using human-readable channel names rather than crazy bitmasks
<http://webkit.org/b/119031>
Implement shared logic for initializing logging channels based on human-readable channel names in WTF,
and rework the WebCore, WebKit and WebKit2 logging initialization on top of it.
Logging channels may now be enabled by providing a comma-separated list of channel names, with the special
"all" name enabling all channels. Channel names prefixed with a leading "-" will result in the named channel
being disabled. For instance, specifying "all,-history,-loading" will result in all logging channels except
for history and loading being enabled.
For OS X developers, this also changes the name of the user defaults used to enable logging. This is done to allow
the old user defaults to remain set for those people that need to switch between version of WebKit before and
after this change. Where the old user default keys were WebCoreLogLevel, WebKitLogLevel and WebKit2LogLevel,
the new user default keys are WebCoreLogging, WebKitLogging and WebKit2Logging.
For GTK developers, this changes the separator used in the WEBKIT_DEBUG environment variable to a comma for
consistency with the other platforms and to enable more code sharing.
While doing this work I've also taken the opportunity to eliminate the need to touch multiple files when
adding a new logging channel. Now only the header in the relevant project needs to be updated.
Reviewed by Sam Weinig.
* GNUmakefile.list.am: Remove the now-unused InitializeLogging.h
* Target.pri: Ditto.
* WebCore.xcodeproj/project.pbxproj: Ditto.
* platform/InitializeLogging.h: Removed. Ditto.
* platform/Logging.cpp: Use WEBCORE_LOG_CHANNELS to define all of the channels.
(WebCore::logChannelByName): Renamed to match our naming conventions. Calls through to the new WTF function
to find a log channel rather than repeating the names of the log channels a further two times each.
(WebCore::initializeLoggingChannelsIfNecessary): Pass the channels and the log level string to the new
WTF function that handles the initialization.
* platform/Logging.h: Declare a WEBCORE_LOG_CHANNELS macro that can be used to apply a preprocessor macro
across the set of all logging channels. Use this macro to declare the logging channels.
* platform/blackberry/LoggingBlackBerry.cpp:
(WebCore::logLevelString): Pull the value out of the WEBKIT_DEBUG environment variable.
* platform/efl/LoggingEfl.cpp:
(WebCore::logLevelString): Pull the value out of the WEBKIT_DEBUG environment variable, and then prepend
NotYetImplemented to it so that that channel will be enabled by default.
* platform/graphics/gstreamer/MediaPlayerPrivateGStreamerBase.cpp:
(WebCore::MediaPlayerPrivateGStreamerBase::createVideoSink): Accommodate the rename to logChannelByName.
* platform/gtk/LoggingGtk.cpp:
(WebCore::logLevelString): Pull the value out of the WEBKIT_DEBUG environment variable, and then prepend
NotYetImplemented to it so that that channel will be enabled by default.
* platform/mac/LoggingMac.mm:
(WebCore::logLevelString): Pull the value out of the WebCoreLogging user default key.
* platform/qt/LoggingQt.cpp:
(WebCore::logLevelString): Pull the value out of the QT_WEBKIT_LOG environment variable, and then prepend
NotYetImplemented to it so that the channel will be enabled by default.
* platform/win/LoggingWin.cpp:
(WebCore::logLevelString): Pull the value out of the WebCoreLogging environment variable.
2013-08-05 Ryosuke Niwa <rniwa@webkit.org>
Editor::updateMarkersForWordsAffectedByEditing(bool) shouldn't compute start and end of words when there are nor markers
https://bugs.webkit.org/show_bug.cgi?id=119501
Reviewed by Enrica Casucci.
Exit early in updateMarkersForWordsAffectedByEditing before calling startOfWord and endOfWord if there are no document markers.
* dom/DocumentMarkerController.h:
(WebCore::DocumentMarkerController::hasMarkers): Added.
* editing/Editor.cpp:
(WebCore::Editor::updateMarkersForWordsAffectedByEditing):
2013-08-05 Dean Jackson <dino@apple.com>
Update HTMLPreloadScanner to handle img srcset
https://bugs.webkit.org/show_bug.cgi?id=119360
Reviewed by Sam Weinig.
This patch is a merge of similar patches from Yoav Weiss <yoav@yoav.ws>
and Dean Jackson.
Test: fast/preloader/image-srcset.html
* html/HTMLImageElement.cpp:
(WebCore::HTMLImageElement::parseAttribute): Move srcset parsing into
HTMLParserIdioms, and call it when we hit src or srcset.
* html/HTMLImageElement.h: Remove code that was moved to HTMLParserIdioms.
* html/parser/HTMLDocumentParser.cpp:
(WebCore::HTMLDocumentParser::pumpTokenizer): Pass device scale into preloader.
(WebCore::HTMLDocumentParser::insert):
* html/parser/HTMLPreloadScanner.cpp:
(WebCore::TokenPreloadScanner::StartTagScanner::StartTagScanner): Takes device scale as a parameter.
(WebCore::TokenPreloadScanner::StartTagScanner::processAttributes): Resolve between src and srcSet if necessary.
(WebCore::TokenPreloadScanner::StartTagScanner::processAttribute): Add support for srcset attribute.
(WebCore::TokenPreloadScanner::StartTagScanner::setUrlToLoad): New flag to indicate if we should
replace any existing value.
(WebCore::TokenPreloadScanner::TokenPreloadScanner): Takes device scale.
(WebCore::TokenPreloadScanner::scanCommon): Pass device scale.
(WebCore::HTMLPreloadScanner::HTMLPreloadScanner):
* html/parser/HTMLPreloadScanner.h: New attribute to constructor for device scale. New member
variable on TokenPreloadScanner that holds the srcset value.
* html/parser/HTMLParserIdioms.cpp:
(WebCore::ImageWithScale::operator==): Used for sorting.
(WebCore::compareByScaleFactor): Used for sorting.
(WebCore::bestFitSourceForImageAttributes): New method that takes the code from HTMLImageElement
for parsing src and srcset attributes, and finding the best match.
* html/parser/HTMLParserIdioms.h:
2013-08-05 Oliver Hunt <oliver@apple.com>
Move TypedArray implementation into JSC
https://bugs.webkit.org/show_bug.cgi?id=119489
Reviewed by Filip Pizlo.
Update WebCore for new location of TypedArray implementation.
* ForwardingHeaders/runtime/ArrayBuffer.h: Added.
* ForwardingHeaders/runtime/ArrayBufferView.h: Added.
* ForwardingHeaders/runtime/Float32Array.h: Added.
* ForwardingHeaders/runtime/Float64Array.h: Added.
* ForwardingHeaders/runtime/Int16Array.h: Added.
* ForwardingHeaders/runtime/Int32Array.h: Added.
* ForwardingHeaders/runtime/Int8Array.h: Added.
* ForwardingHeaders/runtime/IntegralTypedArrayBase.h: Added.
* ForwardingHeaders/runtime/TypedArrayBase.h: Added.
* ForwardingHeaders/runtime/Uint16Array.h: Added.
* ForwardingHeaders/runtime/Uint32Array.h: Added.
* ForwardingHeaders/runtime/Uint8Array.h: Added.
* ForwardingHeaders/runtime/Uint8ClampedArray.h: Added.
* Modules/webaudio/AnalyserNode.h:
(WebCore::AnalyserNode::getFloatFrequencyData):
(WebCore::AnalyserNode::getByteFrequencyData):
(WebCore::AnalyserNode::getByteTimeDomainData):
* Modules/webaudio/AsyncAudioDecoder.cpp:
* Modules/webaudio/AsyncAudioDecoder.h:
(WebCore::AsyncAudioDecoder::DecodingTask::audioData):
* Modules/webaudio/AudioBuffer.h:
* Modules/webaudio/AudioContext.cpp:
* Modules/webaudio/AudioParam.h:
* Modules/webaudio/AudioParamTimeline.h:
* Modules/webaudio/PeriodicWave.h:
* Modules/webaudio/RealtimeAnalyser.cpp:
* Modules/webaudio/RealtimeAnalyser.h:
* Modules/webaudio/ScriptProcessorNode.cpp:
* Modules/webaudio/WaveShaperProcessor.h:
* Modules/websockets/ThreadableWebSocketChannel.h:
* Modules/websockets/WebSocket.cpp:
* Modules/websockets/WebSocket.h:
* Modules/websockets/WebSocketChannel.cpp:
* Modules/websockets/WebSocketChannel.h:
* Modules/websockets/WorkerThreadableWebSocketChannel.cpp:
* Modules/websockets/WorkerThreadableWebSocketChannel.h:
* WebCore.exp.in:
* bindings/js/JSArrayBufferCustom.cpp:
* bindings/js/JSArrayBufferViewHelper.h:
* bindings/js/JSAudioContextCustom.cpp:
* bindings/js/JSCryptoCustom.cpp:
* bindings/js/JSDictionary.h:
* bindings/js/JSFileReaderCustom.cpp:
* bindings/js/JSWebGLRenderingContextCustom.cpp:
* bindings/js/JSXMLHttpRequestCustom.cpp:
* bindings/js/SerializedScriptValue.cpp:
(WebCore::SerializedScriptValue::transferArrayBuffers):
* bindings/js/SerializedScriptValue.h:
* bindings/scripts/CodeGeneratorJS.pm:
(AddIncludesForType):
(GenerateHeader):
(NativeToJSValue):
* dom/MessageEvent.h:
* fileapi/FileReader.cpp:
* fileapi/FileReader.h:
* fileapi/FileReaderLoader.cpp:
* fileapi/FileReaderLoader.h:
* fileapi/FileReaderSync.cpp:
* fileapi/FileReaderSync.h:
* fileapi/WebKitBlobBuilder.cpp:
* fileapi/WebKitBlobBuilder.h:
* html/HTMLMediaElement.cpp:
* html/ImageData.h:
* html/canvas/ArrayBuffer.idl:
* html/canvas/ArrayBufferView.idl:
* html/canvas/CanvasRenderingContext2D.cpp:
* html/canvas/DataView.h:
* html/canvas/Float32Array.idl:
* html/canvas/Float64Array.idl:
* html/canvas/Int16Array.idl:
* html/canvas/Int32Array.idl:
* html/canvas/Int8Array.idl:
* html/canvas/Uint16Array.idl:
* html/canvas/Uint32Array.idl:
* html/canvas/Uint8Array.idl:
* html/canvas/Uint8ClampedArray.idl:
* html/canvas/WebGLBuffer.h:
(WebCore::WebGLBuffer::elementArrayBuffer):
* html/canvas/WebGLGetInfo.cpp:
* html/canvas/WebGLGetInfo.h:
* html/canvas/WebGLRenderingContext.cpp:
* html/canvas/WebGLRenderingContext.h:
* inspector/InspectorMemoryAgent.cpp:
* page/Crypto.cpp:
* page/Crypto.h:
* platform/graphics/GraphicsContext3D.cpp:
* platform/graphics/ImageBuffer.h:
* platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
* platform/graphics/cg/ImageBufferDataCG.h:
* platform/graphics/filters/FEBlend.cpp:
* platform/graphics/filters/FEColorMatrix.cpp:
* platform/graphics/filters/FEComponentTransfer.cpp:
* platform/graphics/filters/FEComposite.cpp:
* platform/graphics/filters/FEConvolveMatrix.cpp:
* platform/graphics/filters/FECustomFilter.cpp:
* platform/graphics/filters/FEDisplacementMap.cpp:
* platform/graphics/filters/FEDropShadow.cpp:
* platform/graphics/filters/FEGaussianBlur.cpp:
* platform/graphics/filters/FELighting.h:
* platform/graphics/filters/FEMorphology.cpp:
* platform/graphics/filters/FETurbulence.cpp:
* platform/graphics/filters/FilterEffect.cpp:
* platform/graphics/filters/FilterEffect.h:
* platform/graphics/mac/GraphicsContext3DMac.mm:
* platform/graphics/opengl/GraphicsContext3DOpenGLCommon.cpp:
* testing/Internals.h:
* xml/XMLHttpRequest.cpp:
* xml/XMLHttpRequest.h:
(WebCore::XMLHttpRequest::optionalResponseArrayBuffer):
2013-08-05 Alexey Proskuryakov <ap@apple.com>
<rdar://problem/14637103> REGRESSION (r153060?): Microphone appears in the way
of text when dictating an e-mail
https://bugs.webkit.org/show_bug.cgi?id=119496
Reviewed by Ryosuke Niwa.
Test: platform/mac/editing/input/firstrectforcharacterrange-caret-in-br.html
* rendering/RenderObject.cpp: (WebCore::RenderObject::absoluteBoundingBoxRectForRange):
FloatRect::unite() doesn't preserve empty rects, which we need here.
We alrady handle the case of collapsed range in Editor::firstRectForRange(), and
this is similar, but we can't currently cover both with one simple fix.
2013-08-05 Morten Stenshorne <mstensho@opera.com>
Region based columns not painted correctly in non-default writing-modes
https://bugs.webkit.org/show_bug.cgi?id=118506
Reviewed by David Hyatt.
The column translation offset was calculated incorrectly.
The dirty rect intersection check was also wrong.
Added some documentation, to make it clear what's going on.
Tests: fast/multicol/newmulticol/hide-box-horizontal-bt.html
fast/multicol/newmulticol/hide-box-vertical-lr.html
fast/multicol/newmulticol/hide-box-vertical-rl.html
* rendering/RenderMultiColumnSet.cpp:
(WebCore::RenderMultiColumnSet::collectLayerFragments):
2013-08-05 Morten Stenshorne <mstensho@opera.com>
Region based columns not clipped properly
https://bugs.webkit.org/show_bug.cgi?id=118499
Reviewed by David Hyatt.
Need to call RenderRegion::overflowRectForFlowThreadPortion() first,
and THEN clip in the column gaps. overflowRectForFlowThreadPortion()
expands the logical left and right to the flow thread's overflow
rectangle, effectively defeating inline direction clipping completely.
Tests: fast/multicol/newmulticol/clipping-overflow-hidden.html
fast/multicol/newmulticol/clipping-top-overflow.html
fast/multicol/newmulticol/clipping.html
* rendering/RenderMultiColumnSet.cpp:
(WebCore::RenderMultiColumnSet::flowThreadPortionOverflowRect):
2013-08-05 Vivek Galatage <vivek.vg@samsung.com>
XMLTreeViewer should be created only in the XML viewer mode
https://bugs.webkit.org/show_bug.cgi?id=119483
Reviewed by Alexey Proskuryakov.
XMLTreeViewer is created even for the XSL transform which is avoided by the patch.
The XMLTreeViewer::hasNoStyleInformation() is moved to XMLDocumentParserLibxml2.cpp
as static inline method as XMLTreeViewer should not have the responsibility for it.
Also removes an unnecessary conditional check while deciding for XML viewer mode.
Blink patch review links:
https://codereview.chromium.org/19552003/
https://codereview.chromium.org/22150003/
No new tests as the patch is about code refactoring.
* xml/XMLTreeViewer.cpp:
* xml/XMLTreeViewer.h:
* xml/parser/XMLDocumentParserLibxml2.cpp:
(WebCore::hasNoStyleInformation):
(WebCore::XMLDocumentParser::doEnd):
2013-08-03 Jer Noble <jer.noble@apple.com>
Loading a video with a custom URL scheme will result in stalling playback
https://bugs.webkit.org/show_bug.cgi?id=119469
Reviewed by Eric Carlson.
Break the assumption that only one AVAssetResourceRequest will be outstanding simultaneously
by storing a HashMap of AVAssetResourceRequests and their resulting WebCoreAVFResourceLoader.
When loading is stopped (due to completion or error), notify the MediaPlayerPrivateAVFoundation
parent so that the map can be emptied.
* platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.h:
* platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
(WebCore::MediaPlayerPrivateAVFoundationObjC::shouldWaitForLoadingOfResource): Store the request
in m_resourceLoaderMap.
(WebCore::MediaPlayerPrivateAVFoundationObjC::didCancelLoadingRequest): Pull the request from
m_resourceLoaderMap.
(WebCore::MediaPlayerPrivateAVFoundationObjC::didStopLoadingRequest): Remove the requset from
m_resourceLoaderMap.
* platform/graphics/avfoundation/objc/WebCoreAVFResourceLoader.h:
* platform/graphics/avfoundation/objc/WebCoreAVFResourceLoader.mm:
(WebCore::WebCoreAVFResourceLoader::create): Return a PassRefPtr, rather than a PassOwnPtr.
(WebCore::WebCoreAVFResourceLoader::stopLoading): Call didStopLoadingRequest.
2013-08-05 Abhijeet Kandalkar <abhijeet.k@samsung.com>
Spatial Navigation should avoid unwanted calculation while deciding focus candidate.
https://bugs.webkit.org/show_bug.cgi?id=117265
Reviewed by Antonio Gomes.
Spatial Navigation should consider only those nodes as candidate which are exactly in the focus-direction.
e.g. If we are moving down then the nodes that are above CURRENT focused node should be considered as invalid.
Added isValidCandidate() which checks whether node is exactly in the focus-direction.
Test: fast/spatial-navigation/snav-search-optimization.html
* page/FocusController.cpp:
(WebCore::FocusController::findFocusCandidateInContainer):
(WebCore::FocusController::advanceFocusDirectionally):
* page/Page.cpp:
(WebCore::Page::Page):
* page/Page.h:
(WebCore::Page::setLastSpatialNavigationCandidateCount):
(WebCore::Page::lastSpatialNavigationCandidateCount):
* page/SpatialNavigation.cpp:
(WebCore::isValidCandidate):
* page/SpatialNavigation.h:
* testing/Internals.cpp:
(WebCore::Internals::lastSpatialNavigationCandidateCount):
* testing/Internals.h:
* testing/Internals.idl:
2013-08-05 Mihai Tica <mitica@adobe.com>
[CSS Background Blending] Specifying background-image and background-color
with opaque image doesn't trigger blending. The fix consists of adding a
check whether blend mode is set in hasOpaqueImage.
https://bugs.webkit.org/show_bug.cgi?id=119434
Reviewed by Dirk Schulze.
Test: css3/compositing/background-blend-mode-separate-layer-declaration.html
* rendering/style/FillLayer.cpp:
(WebCore::FillLayer::hasOpaqueImage):
2013-08-04 Zalan Bujtas <zalan@apple.com>
Background doesn't fully repaint when body has margins.
https://bugs.webkit.org/show_bug.cgi?id=119033
Reviewed by Simon Fraser.
Ensure that background-color changes do not leave unpainted areas when
body has margins.
Both <body> and <html> background-color get propagated up to the viewport.
If <body> has background-color attribute set, while <html> doesn't, the color is
applied not only on the <body> but on both the <html> and the viewport. However,
it's not enough to mark the RenderView dirty because with tiles backing on,
there could be areas outside of the viewport that need repaint. By marking
the RenderView's graphics layer dirty instead, we ensure that all the related
tiles get marked dirty too and the new background color covers all areas.
Manual test added. When forcing top-level composition on (even with embedded iframe to
make sure we don't do paintsIntoWindow rendering), the test case execution changes so much,
that the repaint rects don't reflect the functionality difference anymore.
* page/FrameView.cpp:
(WebCore::FrameView::reset):
(WebCore::FrameView::layout):
* page/FrameView.h:
(WebCore::FrameView::needsFullRepaint):
* rendering/RenderBox.cpp:
(WebCore::RenderBox::styleWillChange):
* rendering/RenderObjectChildList.cpp:
(WebCore::RenderObjectChildList::removeChildNode):
* rendering/RenderView.cpp:
(WebCore::RenderView::repaintRootContents):
(WebCore::RenderView::repaintViewAndCompositedLayers):
* rendering/RenderView.h:
2013-08-04 Andreas Kling <akling@apple.com>
Document needn't expose its active element.
<http://webkit.org/b/119466>
Reviewed by Antonio Gomes.
The Document::m_activeElement pointer is only used inside updateHoverActiveState(),
so we can remove the activeElement()/setActiveElement() accessors.
* dom/Document.h:
* dom/Document.cpp:
(WebCore::Document::updateHoverActiveState):
2013-08-04 Andreas Kling <akling@apple.com>
Inserting a rule into an empty style sheet shouldn't trigger style recalc unless necessary.
<http://webkit.org/b/119475>
<rdar://problem/14643481>
Reviewed by Antti Koivisto.
This is kind of a cheesy optimization, but it turns out that the use case is quite common.
The pattern goes like this:
(1) Create <style> element.
(2) Add it to the document's <head>.
(3) .addRule() one rule through the CSSOM API.
Prior to this patch, (3) would always cause a full (deferred) style recalc.
Now that we exclude empty style sheets from the document's (effective) active set,
we can piggyback on the style invalidation analysis when transitioning from an empty
sheet to a single-rule sheet.
In other words, add a special code path for the first rule insertion into an empty,
in-document style sheet to minimize the amount of invalidation that happens.
* css/CSSStyleSheet.cpp:
(WebCore::CSSStyleSheet::didMutateRules):
(WebCore::CSSStyleSheet::insertRule):
* css/CSSStyleSheet.h:
(WebCore::CSSStyleSheet::RuleMutationScope::RuleMutationScope):
(WebCore::CSSStyleSheet::RuleMutationScope::~RuleMutationScope):
2013-08-04 Claudio Saavedra <csaavedra@igalia.com>
[GTK] Fix a C++11 warning.
Rubber-stamped by Martin Robinson.
* platform/gtk/FileSystemGtk.cpp:
(WebCore::sharedResourcesPath): Fix a C++11 warning.
2013-08-04 Diego Pino Garcia <dpino@igalia.com>
[GTK] Remove legacy hack in CodeGeneratorGObject.pm
https://bugs.webkit.org/show_bug.cgi?id=117545
Reviewed by Carlos Garcia Campos.
There's a checking that sets gtype to uint in case it's ushort. gtype
is a value obtained from GetGValueTypeName(), which never returns
ushort.
* bindings/scripts/CodeGeneratorGObject.pm:
(GenerateProperty): remove unnecessary glitch
2013-08-04 Andreas Kling <akling@apple.com>
[Mac] Disable screen font substitution at WebCore-level in OS X 10.9+
<http://webkit.org/b/119474>
<rdar://problem/14643349>
Reviewed by Dan Bernstein.
Disable screen font substitution by default in Settings so internal WebCore clients
such as SVG-as-image will get the right default setting.
* page/Settings.cpp:
(WebCore::Settings::Settings):
(WebCore::Settings::shouldEnableScreenFontSubstitutionByDefault):
(WebCore::Settings::setScreenFontSubstitutionEnabled):
* page/Settings.h:
(WebCore::Settings::screenFontSubstitutionEnabled):
* page/Settings.in:
* page/mac/SettingsMac.mm:
(WebCore::Settings::shouldEnableScreenFontSubstitutionByDefault):
2013-08-03 Tim Horton <timothy_horton@apple.com>
Refine the unavailable plug-in indicator
https://bugs.webkit.org/show_bug.cgi?id=119400
<rdar://problem/14616012>
Reviewed by Oliver Hunt.
Add a border, flip the text and background colors, and make the indicator
much higher contrast, to be more visible on a variety of sites.
Also, refine the arrow to be less blocky and inlaid inside a circle.
* rendering/RenderEmbeddedObject.cpp:
(WebCore::replacementTextRoundedRectPressedColor):
(WebCore::replacementTextRoundedRectColor):
(WebCore::replacementTextColor):
(WebCore::unavailablePluginBorderColor):
(WebCore::drawReplacementArrow):
(WebCore::RenderEmbeddedObject::paintReplaced):
(WebCore::RenderEmbeddedObject::getReplacementTextGeometry):
(WebCore::RenderEmbeddedObject::unavailablePluginIndicatorBounds):
(WebCore::RenderEmbeddedObject::isInUnavailablePluginIndicator):
* rendering/RenderEmbeddedObject.h:
2013-08-03 Yoav Weiss <yoav@yoav.ws>
PreloadScanner preloads external CSS with non-matching media attribute
https://bugs.webkit.org/show_bug.cgi?id=106198
Reviewed by Dean Jackson.
Test: http/tests/loading/preload-css-test.html
* html/parser/HTMLPreloadScanner.cpp:
Remove m_linkMediaAttributeIsScreen
Remove MediaQueryEvaluator calls
Add m_mediaAttribute that gets the value of the "media" attribute
Pass m_mediaAttribute to PreloadRequest
(WebCore::TokenPreloadScanner::StartTagScanner::StartTagScanner):
(WebCore::TokenPreloadScanner::StartTagScanner::createPreloadRequest):
(WebCore::TokenPreloadScanner::StartTagScanner::processAttribute):
(WebCore::TokenPreloadScanner::StartTagScanner::resourceType):
(WebCore::TokenPreloadScanner::StartTagScanner::shouldPreload):
* html/parser/HTMLResourcePreloader.cpp:
Add MediaQueryEvaluator calls to see if "media" matches
Perform preload only to resource with a matching media (if media exists)
(WebCore::PreloadRequest::isSafeToSendToAnotherThread):
(WebCore::mediaAttributeMatches):
(WebCore::HTMLResourcePreloader::preload):
* html/parser/HTMLResourcePreloader.h:
Add a constructor with a mediaAttribute value
Add m_mediaAttribute & its getter.
(WebCore::PreloadRequest::create):
(WebCore::PreloadRequest::media):
(WebCore::PreloadRequest::PreloadRequest):
2013-08-03 Andreas Kling <akling@apple.com>
RenderBoxModelObject::firstLetterRemainingText should be a RenderTextFragment*.
<http://webkit.org/b/119181>
Reviewed by Sam Weinig.
De-generalize this code a bit since we know that the firstLetterRemainingText() is always
going to be a RenderTextFragment.
* rendering/RenderBoxModelObject.h:
* rendering/RenderBoxModelObject.cpp:
(WebCore::RenderBoxModelObject::firstLetterRemainingText):
(WebCore::RenderBoxModelObject::setFirstLetterRemainingText):
Make these two deal in RenderTextFragment*.
* rendering/RenderBlock.cpp:
(WebCore::RenderBlock::updateFirstLetterStyle):
Tighten up some pointer types so we don't have to cast as much.
2013-08-02 Gyuyoung Kim <gyuyoung.kim@samsung.com>
Introduce toSVGMaskElement(), and use it
https://bugs.webkit.org/show_bug.cgi?id=119443
Reviewed by Andreas Kling.
As a step to change static_cast with toSVGXXX, static_cast<SVGMaskElement*> can
be changed with toSVGMaskElement().
Blink merge from https://src.chromium.org/viewvc/blink?view=rev&revision=155432
* rendering/svg/RenderSVGResourceMasker.cpp:
(WebCore::RenderSVGResourceMasker::applyResource):
(WebCore::RenderSVGResourceMasker::resourceBoundingBox):
* rendering/svg/RenderSVGResourceMasker.h:
* svg/SVGMaskElement.h:
(WebCore::toSVGMaskElement):
2013-08-02 Benjamin Poulain <bpoulain@apple.com>
REGRESSION (r153005): Crash in SpaceSplitString::spaceSplitStringContainsValue on Facebook
https://bugs.webkit.org/show_bug.cgi?id=119384
Reviewed by Alexey Proskuryakov.
When removing the "rel" attribute from HTMLAnchorElement, we parse the attribute for no value.
Following r153005, we no longer checked for null String, which caused a crash in that case.
Creating a SpaceSplitString from a null string causes the SpaceSplitString to be null. In that case
SpaceSplitString::contains() would always return false.
This patch modify SpaceSplitString::spaceSplitStringContainsValue() to follow the exact same
behavior.
Test: fast/dom/HTMLAnchorElement/remove-rel-attribute.html
* dom/SpaceSplitString.cpp:
(WebCore::SpaceSplitString::spaceSplitStringContainsValue):
2013-08-02 Dean Jackson <dino@apple.com>
Force elements with perspective or preserve-3d to disallow direct composited backgrounds
https://bugs.webkit.org/show_bug.cgi?id=119462
<rdar://problem/14607548>
Reviewed by Simon Fraser.
Bug 119461 (http://wkb.ug/119461) describes how a directly composited
background color can intersect with its children. It's not clear exactly
what the best way to fix that is, but for the moment we should disallow
any element that has perspective or a preserve-3d transform style from
getting a directly composited background.
Test: compositing/background-color/no-composited-background-color-when-perspective.html
* rendering/RenderLayerBacking.cpp:
(WebCore::hasPerspectiveOrPreserves3D): New static helper.
(WebCore::supportsDirectBoxDecorationsComposition): Return false if the above function is true.
2013-08-02 Oliver Hunt <oliver@apple.com>
Update binding test results
* bindings/scripts/test/JS/JSFloat64Array.cpp:
(WebCore::JSFloat64Array::getOwnPropertySlot):
(WebCore::JSFloat64Array::getOwnPropertySlotByIndex):
* bindings/scripts/test/JS/JSTestCustomNamedGetter.cpp:
(WebCore::JSTestCustomNamedGetter::getOwnPropertyDescriptor):
* bindings/scripts/test/JS/JSTestEventTarget.cpp:
(WebCore::JSTestEventTarget::getOwnPropertyDescriptor):
2013-08-02 Gavin Barraclough <barraclough@apple.com>
Remove no-arguments constructor to PropertySlot
https://bugs.webkit.org/show_bug.cgi?id=119460
Reviewed by Geoff Garen.
This constructor was unsafe if getValue is subsequently called,
and the property is a getter. Simplest to just remove it.
* bindings/js/JSDOMWindowCustom.cpp:
(WebCore::JSDOMWindow::getOwnPropertyDescriptor):
(WebCore::DialogHandler::returnValue):
* bindings/js/JSHistoryCustom.cpp:
(WebCore::JSHistory::getOwnPropertyDescriptorDelegate):
* bindings/js/JSLocationCustom.cpp:
(WebCore::JSLocation::getOwnPropertyDescriptorDelegate):
* bindings/js/JSPluginElementFunctions.cpp:
(WebCore::runtimeObjectCustomGetOwnPropertyDescriptor):
* bindings/js/JSStorageCustom.cpp:
(WebCore::JSStorage::deleteProperty):
(WebCore::JSStorage::putDelegate):
* bindings/scripts/CodeGeneratorJS.pm:
(GenerateGetOwnPropertyDescriptorBody):
* bridge/runtime_array.cpp:
(JSC::RuntimeArray::getOwnPropertyDescriptor):
* bridge/runtime_method.cpp:
(JSC::RuntimeMethod::getOwnPropertyDescriptor):
* bridge/runtime_object.cpp:
(JSC::Bindings::RuntimeObject::getOwnPropertyDescriptor):
2013-08-02 Andreas Kling <akling@apple.com>
Removing a <link> element with an empty stylesheet shouldn't trigger style recalc.
<http://webkit.org/b/119442>
<rdar://problem/14631785>
Reviewed by Antti Koivisto.
Let Document decide whether or not to do a style recalc after a <link> element is removed.
This avoids unnecessary work when removing a <link> that refers to an empty style sheet.
Some Facebook pages have a <link rel="stylesheet" href="data:text/css;base64,"> that gets
removed during the initial page load, causing style recalc.
* html/HTMLLinkElement.cpp:
(WebCore::HTMLLinkElement::removedFrom):
Use DeferRecalcStyleIfNeeded. Since the style sheet is being removed, it will either
cause a recalc (because it's no longer in the set of active sheets) or do nothing.
2013-08-02 Patrick Gansterer <paroga@webkit.org>
Remove WebCore folder from include statements
https://bugs.webkit.org/show_bug.cgi?id=119438
Reviewed by Darin Adler.
This aligns the style of the changed files with the other WebCore code.
* platform/network/curl/CurlDownload.cpp:
* platform/network/curl/CurlDownload.h:
2013-08-02 Ryosuke Niwa <rniwa@webkit.org>
FormAssociatedElement shouldn't create out-of-tree FormAttributeTargetObserver
https://bugs.webkit.org/show_bug.cgi?id=119309
Reviewed by Kent Tamura.
Merge https://chromium.googlesource.com/chromium/blink/+/6fbdcbf311de539107bc28711b3f7a527176e97b.
I'm not merging the test since the attached test case only works when the shadow DOM API is enabled.
* html/FormAssociatedElement.cpp:
(WebCore::FormAssociatedElement::formAttributeChanged):
(WebCore::FormAssociatedElement::resetFormAttributeTargetObserver):
2013-08-02 Christophe Dumez <ch.dumez@sisa.samsung.com>
compareDocumentPosition() should report PRECEDING or FOLLOWING information even if nodes are disconnected
https://bugs.webkit.org/show_bug.cgi?id=119316
Reviewed by Ryosuke Niwa.
As per the latest specification, compareDocumentPosition() should report PRECEDING or FOLLOWING
information even if nodes are disconnected:
- http://dom.spec.whatwg.org/#dom-node-comparedocumentposition
This behavior is consistent with both IE10, Firefox 22 and since recently Blink.
No new tests, covered by existing tests.
* dom/Node.cpp:
(WebCore::compareDetachedElementsPosition):
(WebCore::Node::compareDocumentPosition):
2013-08-02 Simon Fraser <simon.fraser@apple.com>
Revert r153632, since it caused fast/forms/change-form-element-document-crash.html
to assert.
* html/FormAssociatedElement.cpp:
(WebCore::FormAssociatedElement::formAttributeChanged):
(WebCore::FormAssociatedElement::resetFormAttributeTargetObserver):
2013-08-02 Mario Sanchez Prada <mario.prada@samsung.com>
Implement atk_text_get_text_*_offset for WORD
https://bugs.webkit.org/show_bug.cgi?id=114871
Reviewed by Martin Robinson.
Re-implement this functions without using GailTextUtil nor Pango.
* accessibility/atk/WebKitAccessibleInterfaceText.cpp:
(textForObject): Made the parameter a const, to avoid warnings.
(getSelectionOffsetsForObject): Add special cases for END boundaries.
(emptyTextSelectionAtOffset): Convenience function to be used in
early returns from functions returning both text and offsets.
(webkitAccessibleTextGetChar): Use emptyTextSelectionAtOffset(),
and remove checks that are now done outside of this function, in
webkitAccessibleTextGetTextForOffset().
(nextWordStartPosition): Helper function to reliably find the
start of the next word as and user would do it by navigating with
Ctrl and the arrows (considering spaces and punctuation).
(previousWordEndPosition): Similar to nextWordStartPosition, but
written to help find the end of the previous one.
(wordAtPositionForAtkBoundary): Helper function to find the word
at a given position considering values of AtkTextBoundary.
(numberOfReplacedElementsBeforeOffset): Helper function to help
figure out how many embedded objects we have exposed for an
AtkText object, used to adjust offsets coming from outside.
(webkitAccessibleTextGetWordForBoundary): New function,
implementing atk_text_get_text_*_offset for WORD.
(webkitAccessibleTextGetTextForOffset): Replace usage of Gail for
WORD boundaries with webkitAccessibleTextGetWordForBoundary().
Also, moved the initialization of the start and end offsets to the
bottom, into the gail/pango section, since those values will be
from now on initialized in getSelectionOffsetsForObject().
(webkitAccessibleTextGetSelection): Removed the initialization of
the start and end offsets, since those values will be from now on
initialized in getSelectionOffsetsForObject().
2013-08-02 Zoltan Arvai <zarvai@inf.u-szeged.hu>
Buildfix for !ENABLE(SVG) platforms after r153581.
https://bugs.webkit.org/show_bug.cgi?id=119444
Reviewed by Andreas Kling.
Adding missing guards.
* css/StylePropertyShorthand.cpp:
(WebCore::matchingShorthandsForLonghand):
* css/StylePropertyShorthand.h:
2013-08-02 Brady Eidson <beidson@apple.com>
REGRESSION (r130783): Scrolling is broken going back to a cached page from a page that still has outstanding subresources.
<rdar://problem/14601124> and https://bugs.webkit.org/show_bug.cgi?id=119416
Reviewed by Darin Adler.
Test: http/tests/loading/unfinished-load-back-to-cached-page-callbacks.html
* loader/DocumentLoader.cpp:
(WebCore::DocumentLoader::stopLoading): Always explicitly cancel the Document parser when stopLoading is called.
2013-08-02 Antoine Quint <graouts@apple.com>
<input type="search"> doesn't correctly handle the "size" attribute
https://bugs.webkit.org/show_bug.cgi?id=119174
We weren't taking into account the decorations for search fields (results and close buttons)
when computing the preferred logical width for these fields based on the "size" attribute
and as a result we would not guarantee that we could show the number of characters set by
the "size" attribute.
To make the process of reporting extra width due to decorations cleaner, we add a new decorationWidth()
method for InputType subclasses to override and called through HTMLInputElement::decorationWidth()
and have NumberInputType and SearchInputType return custom decoration widths.
Reviewed by Darin Adler.
Test: fast/forms/search/search-size-with-decorations.html
* html/HTMLInputElement.cpp:
(WebCore::HTMLInputElement::decorationWidth):
* html/HTMLInputElement.h:
* html/InputType.cpp:
(WebCore::InputType::decorationWidth):
* html/InputType.h:
Expose a new method to get the width for the input's decoration through the InputType.
* html/NumberInputType.cpp:
(WebCore::NumberInputType::decorationWidth):
* html/NumberInputType.h:
Override InputType::decorationWidth() to return the decoration width for a number input
using the same code previously used in RenderTextControlSingleLine::preferredContentLogicalWidth().
* html/SearchInputType.cpp:
(WebCore::SearchInputType::sizeShouldIncludeDecoration):
Override InputType::sizeShouldIncludeDecoration() to return true since search fields
have custom decoration adding to the size of the field.
(WebCore::SearchInputType::decorationWidth):
Return the combined size of the results and cancel buttons, as available.
* html/SearchInputType.h:
* rendering/RenderTextControlSingleLine.cpp:
(WebCore::RenderTextControlSingleLine::preferredContentLogicalWidth):
Remove the code specific to NumberInputType (which was moved to InputType::decorationWidth())
and replace it with a call to HTMLInputElement::decorationWidth() since this method will now
return the extra decoration width for an input element should it have any.
2013-08-02 Patrick Gansterer <paroga@webkit.org>
[WIN] Fix build without precompiled header.
* accessibility/win/AccessibilityObjectWrapperWin.h: Added missing include.
* rendering/RenderThemeWin.cpp: Ditto.
2013-08-02 Byungwoo Lee <bw80.lee@samsung.com>
Remove redundant call of argsList->current() from loops in CSSParser.
https://bugs.webkit.org/show_bug.cgi?id=119432
Reviewed by Christophe Dumez.
while loops in CSSParser call argList->current() function at the start
of each iteration, but this is redundant because argsList->next() at
the end of the iteration calls the argList->current() and returns the
result.
Blink merge from https://src.chromium.org/viewvc/blink?view=rev&revision=155402
* css/CSSParser.cpp:
(WebCore::CSSParser::parseMixFunction):
(WebCore::CSSParser::parseCustomFilterFunctionWithInlineSyntax):
2013-08-01 Andreas Kling <akling@apple.com>
Removing an empty style sheet shouldn't trigger style recalc.
<http://webkit.org/b/119428>
<rdar://problem/14629045>
Reviewed by Antti Koivisto.
Teach DocumentStyleSheetCollection to filter out empty style sheets when deciding whether
or not to trigger a style recalc. We can then be clever when an empty style sheet is removed
from the document, and avoid causing extra work.
Some pages use this pattern:
(1) Create a <style> element.
(2) Add it to the document's <head> element.
(3) Insert some CSS as a text child of the <style> element.
Since the <style> element is already inside the document at (3), we had to treat this as an
old style sheet being removed, even though it was just an empty sheet of nothing.
With this patch, Document gains enough smarts to know that removing/adding an empty sheet
won't affect layout/rendering in any meaningful way, thus a style recalc can be avoided.
* dom/Document.h:
* dom/Document.cpp:
(WebCore::Document::styleResolverChanged):
Add a DeferRecalcStyleIfNeeded mode to styleResolverChanged().
* css/CSSStyleSheet.h:
* css/CSSStyleSheet.cpp:
(WebCore::CSSStyleSheet::clearOwnerNode):
Use DeferRecalcStyleIfNeeded when saying bye from a CSSStyleSheet and let Document decide
if removing the sheet should trigger style recalc instead of always assuming it should.
* dom/DocumentStyleSheetCollection.cpp:
(WebCore::filterEnabledNonemptyCSSStyleSheets):
(WebCore::DocumentStyleSheetCollection::updateActiveStyleSheets):
Exclude empty sheets from the activeAuthorStyleSheets() collection. They are still
visible through CSSOM's document.styleSheets.
2013-08-02 Zalan Bujtas <zalan@apple.com>
Frame flattening: Change the logic on whether resize event needs to be dispatched.
https://bugs.webkit.org/show_bug.cgi?id=119394
Reviewed by Simon Fraser.
http://trac.webkit.org/changeset/149287 changed the logic so that resize events are
sent out from FrameView::setFrameRect() too. Checking whether frame flattening is
enabled is sufficient enough to ensure that no extra resize events are dispatched.
Test: fast/frames/flattening/iframe-flattening-resize-event-count.html
* page/FrameView.cpp:
(WebCore::FrameView::FrameView):
(WebCore::FrameView::setFrameRect):
(WebCore::FrameView::frameFlatteningEnabled):
(WebCore::FrameView::supportsFrameFlattening):
(WebCore::FrameView::avoidScrollbarCreation):
(WebCore::FrameView::calculateScrollbarModesForLayout):
(WebCore::FrameView::layout):
(WebCore::FrameView::isInChildFrameWithFrameFlattening):
* page/FrameView.h:
* rendering/RenderFrameBase.cpp:
(WebCore::RenderFrameBase::layoutWithFlattening):
2013-08-01 Commit Queue <commit-queue@webkit.org>
Unreviewed, rolling out r153608.
http://trac.webkit.org/changeset/153608
https://bugs.webkit.org/show_bug.cgi?id=119425
Snorkled fast/multicol/overflow-content-expected.html
(Requested by kling on #webkit).
* css/StyleResolver.cpp:
(WebCore::StyleResolver::applyMatchedProperties):
2013-08-01 Ruth Fong <ruth_fong@apple.com>
[Forms: color] <input type='color'> popover color well implementation
<rdar://problem/14411008> and https://bugs.webkit.org/show_bug.cgi?id=119356
Reviewed by Benjamin Poulain.
* Configurations/FeatureDefines.xcconfig: Added and enabled INPUT_TYPE_COLOR_POPOVER.
2013-07-31 Ryosuke Niwa <rniwa@webkit.org>
FormAssociatedElement shouldn't create out-of-tree FormAttributeTargetObserver
https://bugs.webkit.org/show_bug.cgi?id=119309
Reviewed by Kent Tamura.
Merge https://chromium.googlesource.com/chromium/blink/+/6fbdcbf311de539107bc28711b3f7a527176e97b.
I'm not merging the test since the attached test case only works when the shadow DOM API is enabled.
* html/FormAssociatedElement.cpp:
(WebCore::FormAssociatedElement::formAttributeChanged):
(WebCore::FormAssociatedElement::resetFormAttributeTargetObserver):
2013-08-01 Rob Buis <rwlbuis@webkit.org>
selectors should match attribute name with case sensitivity based on element & document type
https://bugs.webkit.org/show_bug.cgi?id=71152
Reviewed by Darin Adler.
Support case-sensitive attribute name selecting for non HTML. In order to do this we have to
store the attribute name in the selector as-is when css parsing, and get the lowercase localName
on demand for case-insensitive matching. The only time we want case-insensitive matching is when
we try to match a HTML element in a HTML document.
Tests: fast/dom/SelectorAPI/attrname-case-insensitive.html
fast/dom/SelectorAPI/attrname-case-sensitive.xhtml
svg/css/case-sensitive-attrname-selectors.html
* css/CSSGrammar.y.in: do not lowercase attribute selector name.
* css/CSSParserValues.h:
(WebCore::CSSParserSelector::setAttribute):
* css/CSSSelector.cpp:
(WebCore::CSSSelector::setAttribute):
* css/CSSSelector.h: allow access to lowered version of attribute localName if needed.
(WebCore::CSSSelector::attributeCanonicalLocalName):
* css/SelectorChecker.cpp:
(WebCore::anyAttributeMatches): do only case-insensitive matching for HTML.
(WebCore::SelectorChecker::checkOne):
* css/SelectorChecker.h:
(WebCore::SelectorChecker::checkExactAttribute): do only case-insensitive matching for HTML.
* css/SelectorCheckerFastPath.cpp:
(WebCore::HTMLNames::checkExactAttributeValue):
* css/SelectorCheckerFastPath.h:
(WebCore::SelectorCheckerFastPath::matchesRightmostAttributeSelector):
* dom/Attribute.h:
(WebCore::Attribute::matches): use more convenient parameters.
2013-08-01 Brent Fulgham <bfulgham@apple.com>
[Windows] WebKit1 Fullscreen Video Play is Broken
https://bugs.webkit.org/show_bug.cgi?id=119415
Reviewed by Jer Noble.
* platform/graphics/avfoundation/cf/AVFoundationCFSoftLinking.h: Add
call for ACFPlayerLayerSetFrame
* platform/graphics/avfoundation/cf/MediaPlayerPrivateAVFoundationCF.cpp:
(WebCore::MediaPlayerPrivateAVFoundationCF::platformSetVisible):
Tear down video player when leaving Fullscreen mode and not using
the newer Fullscreen feature.
(WebCore::AVFWrapper::disconnectAndDeleteAVFWrapper):
Disconnect from notifications for AVCFPlayerItemPresentationSizeChangedNotification,
AVCFPlayerItemDuratoinChangedNotification, and disconnect any
LegibleOutput items added to the player item.
(WebCore::AVFWrapper::createPlayerItem): Add notifications for
AVCFPlayerItemPresentationSizeChanged.
(WebCore::LayerClient::platformCALayerLayoutSublayersOfLayer): Notify
the AVCFPLayerLayer when the display size has changed.
* platform/graphics/ca/win/CACFLayerTreeHost.h:
(WebCore::CACFLayerTreeHost::manualCreateRenderer): Added.
* platform/graphics/ca/win/WKCACFViewLayerTreeHost.h:
(WebCore::WKCACFViewLayerTreeHost::manualCreateRenderer): Added.
* platform/graphics/win/MediaPlayerPrivateFullscreenWindow.cpp:
(WebCore::MediaPlayerPrivateFullscreenWindow::createWindow): Minor
cleanups.
(WebCore::MediaPlayerPrivateFullscreenWindow::setRootChildLayer):
Make sure a Direct3D renderer is created when building the full screen
window for Video playback.
2013-08-01 Dean Jackson <dino@apple.com>
srcset algorithm breaks base64 src attributes
https://bugs.webkit.org/show_bug.cgi?id=119413
Reviewed by Darin Adler.
Base64 encoded src attributes typically have a COMMA
character which was breaking in the candidate matching
algorithm. Make sure to handle that case, and to unescape
any incoming URLs.
Slight cleanup of the srcset matching algorithm. The
candidates are now gathered from a single update
method. I've renamed the methods in the process.
This means we now reparse the srcset attribute if
only the src changes, but I think the code is
cleaner this way.
Tests: fast/hidpi/image-srcset-data-src.html
fast/hidpi/image-srcset-data-srcset.html
fast/hidpi/image-srcset-nomodifier.html
fast/hidpi/image-srcset-viewport-modifiers.html
* html/HTMLImageElement.cpp:
(WebCore::HTMLImageElement::HTMLImageElement): No need to initialise m_bestFitImageURL.
(WebCore::HTMLImageElement::imageSourceURL): Use isEmpty() rather than checking for nullAtom.
(WebCore::HTMLImageElement::determineBestImageForScaleFactor): New renamed method that selects the best
candidate for the image source.
(WebCore::HTMLImageElement::collectImageCandidatesFromSrcSet): Gather the srcset images. Changes include
simplifying the whitespace and skipping candidates that we don't yet support.
(WebCore::HTMLImageElement::collectImageCandidateFromSrc): Add the src attribute to the list of candidates.
(WebCore::HTMLImageElement::parseAttribute): Now both attributes call determineBestImageForScaleFactor.
* html/HTMLImageElement.h: No need for m_srcImageIndex any more.
2013-08-01 Romain Perier <romain.perier@gmail.com>
Implement img element's srcset attribute
https://bugs.webkit.org/show_bug.cgi?id=110252
Reviewed by Dean Jackson.
Tests: fast/hidpi/image-srcset-simple.html
fast/hidpi/image-srcset-src-selection.html
fast/hidpi/image-srcset-simple.html
fast/hidpi/image-srcset-src-selection.html
fast/hidpi/image-srcset-only-src-attribute.html
fast/hidpi/image-srcset-same-alternative-for-both-attributes.html
fast/hidpi/image-srcset-invalid-inputs.html
fast/hidpi/image-srcset-invalid-inputs-except-one.html
fast/hidpi/image-srcset-invalid-inputs-correct-src.html
fast/hidpi/image-srcset-change-dynamically-from-js.html
fast/hidpi/image-srcset-remove-dynamically-from-js.html
* html/HTMLAttributeNames.in: Add srcset attribute.
* html/HTMLImageElement.cpp:
(WebCore::HTMLImageElement::HTMLImageElement):
Adding initialization for new variables member.
(WebCore::HTMLImageElement::imageSourceURL):
Override this method to return the choosen image transparently to the ImageLoader.
(WebCore::HTMLImageElement::updateBestImageForScaleFactor):
New method to select the good image candidate dependending on the scale factor. This method is separated from
parsing because it will be useful for selecting a new image candidate on the fly if the device scale factor changes.
(WebCore::HTMLImageElement::updateImagesFromSrcSet):
New method for parsing the srcset attribute and build a list of images with the corresponding scale factor.
(WebCore::HTMLImageElement::parseAttribute):
Adding support for processing the image candidates, select the good one and call ImageLoader for rendering.
* html/HTMLImageElement.h:
- Adding new methods declarations.
- Adding new type definition.
- Adding new variable member to store the URL of the choosen image.
- Adding new variable member to store the index of the src image.
- Adding new Vector to store the list of images after parsing.
* html/HTMLImageElement.idl: Adding srcset attribute for the differents existing bidings.
2013-08-01 Filip Pizlo <fpizlo@apple.com>
DFG optimizations don't handle neutered arrays properly
https://bugs.webkit.org/show_bug.cgi?id=119409
Reviewed by Mark Hahnenberg and Oliver Hunt.
Test: fast/js/dfg-typed-array-neuter.
* bindings/js/SerializedScriptValue.cpp:
(WebCore::neuterView):
(WebCore::SerializedScriptValue::transferArrayBuffers):
(WebCore::SerializedScriptValue::create):
* bindings/js/SerializedScriptValue.h:
2013-08-01 Morten Stenshorne <mstensho@opera.com>
REGRESSION (Safari 6 - ToT): Incorrectly assumes that RenderStyle data can be shared
https://bugs.webkit.org/show_bug.cgi?id=113058
Before sharing CSS properties with an element in the cache, we need to
check that the new element is suitable for this, just like we check
elements before inserting them into the cache.
Reviewed by Andreas Kling.
Test: fast/css/identical-logical-height-decl.html
* css/StyleResolver.cpp:
(WebCore::StyleResolver::applyMatchedProperties):
2013-08-01 Mark Lam <mark.lam@apple.com>
Fixed expected test results for run-bindings-tests after r153532, r153537.
https://bugs.webkit.org/show_bug.cgi?id=119410.
Reviewed by Simon Fraser.
No new tests.
* bindings/scripts/test/JS/JSFloat64Array.cpp:
(WebCore::JSFloat64ArrayConstructor::getOwnPropertySlot):
(WebCore::JSFloat64ArrayPrototype::getOwnPropertySlot):
(WebCore::JSFloat64Array::getOwnPropertySlot):
(WebCore::JSFloat64Array::getOwnPropertySlotByIndex):
* bindings/scripts/test/JS/JSFloat64Array.h:
* bindings/scripts/test/JS/JSTestActiveDOMObject.cpp:
(WebCore::JSTestActiveDOMObjectConstructor::getOwnPropertySlot):
(WebCore::JSTestActiveDOMObjectPrototype::getOwnPropertySlot):
(WebCore::JSTestActiveDOMObject::getOwnPropertySlot):
* bindings/scripts/test/JS/JSTestActiveDOMObject.h:
* bindings/scripts/test/JS/JSTestCustomNamedGetter.cpp:
(WebCore::JSTestCustomNamedGetterConstructor::getOwnPropertySlot):
(WebCore::JSTestCustomNamedGetterPrototype::getOwnPropertySlot):
(WebCore::JSTestCustomNamedGetter::getOwnPropertySlot):
(WebCore::JSTestCustomNamedGetter::getOwnPropertySlotByIndex):
* bindings/scripts/test/JS/JSTestCustomNamedGetter.h:
* bindings/scripts/test/JS/JSTestEventConstructor.cpp:
(WebCore::JSTestEventConstructorConstructor::getOwnPropertySlot):
(WebCore::JSTestEventConstructor::getOwnPropertySlot):
* bindings/scripts/test/JS/JSTestEventConstructor.h:
* bindings/scripts/test/JS/JSTestEventTarget.cpp:
(WebCore::JSTestEventTargetConstructor::getOwnPropertySlot):
(WebCore::JSTestEventTargetPrototype::getOwnPropertySlot):
(WebCore::JSTestEventTarget::getOwnPropertySlot):
(WebCore::JSTestEventTarget::getOwnPropertySlotByIndex):
* bindings/scripts/test/JS/JSTestEventTarget.h:
* bindings/scripts/test/JS/JSTestException.cpp:
(WebCore::JSTestExceptionConstructor::getOwnPropertySlot):
(WebCore::JSTestException::getOwnPropertySlot):
* bindings/scripts/test/JS/JSTestException.h:
* bindings/scripts/test/JS/JSTestInterface.cpp:
(WebCore::JSTestInterfaceConstructor::getOwnPropertySlot):
(WebCore::JSTestInterfacePrototype::getOwnPropertySlot):
(WebCore::JSTestInterface::getOwnPropertySlot):
* bindings/scripts/test/JS/JSTestInterface.h:
* bindings/scripts/test/JS/JSTestMediaQueryListListener.cpp:
(WebCore::JSTestMediaQueryListListenerConstructor::getOwnPropertySlot):
(WebCore::JSTestMediaQueryListListenerPrototype::getOwnPropertySlot):
(WebCore::JSTestMediaQueryListListener::getOwnPropertySlot):
* bindings/scripts/test/JS/JSTestMediaQueryListListener.h:
* bindings/scripts/test/JS/JSTestNamedConstructor.cpp:
(WebCore::JSTestNamedConstructorConstructor::getOwnPropertySlot):
(WebCore::JSTestNamedConstructor::getOwnPropertySlot):
* bindings/scripts/test/JS/JSTestNamedConstructor.h:
* bindings/scripts/test/JS/JSTestNode.cpp:
(WebCore::JSTestNodeConstructor::getOwnPropertySlot):
(WebCore::JSTestNode::getOwnPropertySlot):
* bindings/scripts/test/JS/JSTestNode.h:
* bindings/scripts/test/JS/JSTestObj.cpp:
(WebCore::JSTestObjConstructor::getOwnPropertySlot):
(WebCore::JSTestObjPrototype::getOwnPropertySlot):
(WebCore::JSTestObj::getOwnPropertySlot):
* bindings/scripts/test/JS/JSTestObj.h:
* bindings/scripts/test/JS/JSTestOverloadedConstructors.cpp:
(WebCore::JSTestOverloadedConstructorsConstructor::getOwnPropertySlot):
(WebCore::JSTestOverloadedConstructors::getOwnPropertySlot):
* bindings/scripts/test/JS/JSTestOverloadedConstructors.h:
* bindings/scripts/test/JS/JSTestSerializedScriptValueInterface.cpp:
(WebCore::JSTestSerializedScriptValueInterfaceConstructor::getOwnPropertySlot):
(WebCore::JSTestSerializedScriptValueInterface::getOwnPropertySlot):
* bindings/scripts/test/JS/JSTestSerializedScriptValueInterface.h:
* bindings/scripts/test/JS/JSTestTypedefs.cpp:
(WebCore::JSTestTypedefsConstructor::getOwnPropertySlot):
(WebCore::JSTestTypedefsPrototype::getOwnPropertySlot):
(WebCore::JSTestTypedefs::getOwnPropertySlot):
* bindings/scripts/test/JS/JSTestTypedefs.h:
2013-08-01 Alex Christensen <achristensen@apple.com>
Copy eglplatform.h to be found by Windows WebGL build.
https://bugs.webkit.org/show_bug.cgi?id=119299
Reviewed by Brent Fulgham.
* WebCore.vcxproj/WebCorePreBuild.cmd: Copy eglplatform.h.
2013-08-01 Jer Noble <jer.noble@apple.com>
Crash in WebCore:  WebCore::AudioSession::beganAudioInterruption + 62
https://bugs.webkit.org/show_bug.cgi?id=119406
Reviewed by Eric Carlson.
Unregister for AudioSession interruption events when being destroyed.
* platform/audio/ios/AudioDestinationIOS.cpp:
(WebCore::AudioDestinationIOS::~AudioDestinationIOS):
2013-08-01 Andreas Kling <akling@apple.com>
Layout should force a StyleResolver rebuild if there isn't one at all.
<http://webkit.org/b/119378>
Reviewed by Antti Koivisto.
We can't tell if viewport-dependent media queries have been invalidated at layout,
unless we have a StyleResolver to ask about this.
In case there isn't one, take the same path as we would with an invalidated query
instead of relying on ensureStyleResolver() to build it.
* page/FrameView.cpp:
(WebCore::FrameView::layout):
2013-08-01 Jacky Jiang <zhajiang@blackberry.com>
[BlackBerry] Crash at absoluteClippedOverflowRect() in PluginView::calculateClipRect()
https://bugs.webkit.org/show_bug.cgi?id=119401
Reviewed by George Staikos.
JIRA 462881
The renderer of the PluginView's element has been detached due to transition
to a new load. We should return an empty contentRect if there even isn't
a renderer. This is a speculative fix based on the stack trace provided.
* plugins/blackberry/PluginViewBlackBerry.cpp:
(WebCore::PluginView::calculateClipRect):
2013-08-01 Tim Horton <timothy_horton@apple.com>
Unavailable plug-in indicator arrow should be inside the rounded rect, not in its own circle
https://bugs.webkit.org/show_bug.cgi?id=119400
<rdar://problem/14616012>
Reviewed by Anders Carlsson.
* rendering/RenderEmbeddedObject.cpp:
(WebCore::RenderEmbeddedObject::getReplacementTextGeometry):
Shift the arrow in by 9px, and make the text's rounded rect include it,
instead of having the arrow in a separate circle.
2013-08-01 Patrick Gansterer <paroga@webkit.org>
Merge FrameWinCE into FrameWin
https://bugs.webkit.org/show_bug.cgi?id=117988
Reviewed by Brent Fulgham.
Reuse the code from FrameWin.cpp instead of duplicating it.
* PlatformWinCE.cmake:
* page/win/FrameGdiWin.cpp: Added.
(WebCore::imageFromRect):
* page/wince/FrameWinCE.cpp: Removed.
2013-08-01 Alex Christensen <achristensen@apple.com>
Made OESTextureHalfFloat work on Windows.
https://bugs.webkit.org/show_bug.cgi?id=119298
Reviewed by Christophe Dumez.
* DerivedSources.cpp: Added JSOESTextureHalfFloat.cpp inside of #if ENABLE(WEBGL).
* WebCore.vcxproj/WebCore.vcxproj:
* WebCore.vcxproj/WebCore.vcxproj.filters:
Added JSOESTextureHalfFloat.cpp and JSOESTextureHalfFloat.h.
* html/canvas/OESTextureHalfFloat.idl: Added newline to end of file.
* html/canvas/WebGLObject.cpp: Removed unused #includes.
2013-08-01 Patrick Gansterer <paroga@webkit.org>
Rearrange the code of FrameWin
https://bugs.webkit.org/show_bug.cgi?id=117984
Reviewed by Brent Fulgham.
Move code from the CG implementation into the general file so we can
share the code with Windows CE port in a next step. In a first step
it only shares more code between the CG and Cairo implementations.
Also use OwnPtr instead of plain pointers to make ownership more clear.
* page/win/FrameCGWin.cpp:
(WebCore::imageFromRect):
* page/win/FrameCairoWin.cpp:
(WebCore::imageFromRect):
* page/win/FrameWin.cpp:
(WebCore::imageFromSelection):
(WebCore::Frame::dragImageForSelection):
(WebCore::Frame::nodeImage):
* page/win/FrameWin.h:
2013-08-01 Andrei Parvu <parvu@adobe.com>
mask-repeat: round bug
Added the round functionality to -webkit-mask-repeat and background-repeat. The tile size of the
image is scaled so that the image can fit a whole number of times in the background.
https://bugs.webkit.org/show_bug.cgi?id=119080
Reviewed by Dirk Schulze.
Tests: css3/masking/mask-repeat-round-auto1.html
css3/masking/mask-repeat-round-auto2.html
css3/masking/mask-repeat-round-border.html
css3/masking/mask-repeat-round-content.html
css3/masking/mask-repeat-round-padding.html
css3/background/background-repeat-round-auto1.html
css3/background/background-repeat-round-auto2.html
css3/background/background-repeat-round-border.html
css3/background/background-repeat-round-content.html
css3/background/background-repeat-round-padding.html
* rendering/RenderBoxModelObject.cpp:
(WebCore::RenderBoxModelObject::calculateBackgroundImageGeometry):
2013-08-01 Alexis Menard <alexis@webkit.org>
Reduce CSSProperty's StylePropertyMetadata memory footprint by half when used inside a ImmutableStylePropertySet.
https://bugs.webkit.org/show_bug.cgi?id=117715
Reviewed by Andreas Kling.
Today CSSProperty holds its metadata in the following way :
--------------------------------------------------------------------------------------------
| m_propertyID : 14 We use 14 bits because CSSPropertyIDs start at 1001. |
| m_shorthandID : 14 id of the shorthand this property was set, 0 if not part of a shorthand|
| m_important : 1 |
| m_implicit : 1 |
| m_inherited : 1 |
--------------------------------------------------------------------------------------------
The proposal to decrease the memory footprint on CSSProperty's metadata
only stand when stored inside ImmutableStylePropertySet which uses a custom
way to allocate and lay out the StylePropertyMetadata and the CSSValues in
memory because the idea behind is that the content will not change.
The MutableStylePropertySet uses a regular vector to retrieve, remove
and modify the CSSProperties. ImmutableStylePropertySet is used by default
when parsing up until someone start to access the CSSOM like
div.style which will convert the immutable to a mutable set. It is also good
to note that a CSSProperty is created for every single statement inside a block
in a stylesheet so we do have quite a bunch around. Another consideration is
that the only client to the m_shorthandID is the inspector which uses it
to group the longhands into a shorthand drop down list.
The new proposal is the following one :
- Reduce m_propertyID to 10 bits by not starting the CSSPropertyIDs from
1001 but rather 0 (or 3 as two are hardcoded CSSPropertyInvalid and CSSPropertyVariable).
- Use the fact that we statically know which longhand belong to which shorthand. So
we create a static mapping between longhands and shorthands.
Here is the new layout :
------------------------------------------------------------------------------
| m_propertyID : 10 (up to 1024 properties), we have less than 400 today |
| m_isSetFromShorthand : 1 and then use the mapping in StylePropertyShorthand |
| m_indexInShorthandsVector : 2 |
| m_important : 1 (unchanged) |
| m_implicit : 1 (unchanged) |
| m_inherited : 1 (unchanged) |
------------------------------------------------------------------------------
it was set from using the new code in StylePropertyShorthand.
- m_indexInShorthandsVector : 2 bits, unfortunately there are few longhands which belong to multiple
shorthands so we need to store which was this longhand was part at parsing time. Notice
that it does not store the CSSPropertyID of the matching shorthand but rather its position
in the vector of matching shorthands. CSSProperty::m_shorthandID() method make it transparent
for call sites and return the actual CSSPropertyID of the shorthand. So far 2 bits seems
enough as there is only few longhands with ambiguity and they belong to 3 shorthands.
Profiling the benchmark with Intel Vtune to find out the performance regression
showed that copying uint16_t, so StylePropertyMetadata, is not
a fast operation in term of assembly code and has a big penalty on Windows
MSVC over unsigned for example. The latter produces a much faster code
when using unsigned over uint16_t (45% difference in the benchmark).
The patch avoid the copies of StylePropertyMetadata when applicable (by using const ref).
The second part of the fix is avoiding the conversion from an int (enum) to
an uint16_t in a tight loop such as StylePropertySet::findPropertyIndex
(which is the hotspot of the benchmark).
On my Windows 7 64 bits Core i5 machine CSSPropertySetterGetter results are :
- avg : 2714 runs/s with the patch
- avg : 2696 runs/s without the patch
According to Andreas Kling this patch save up ~1.8Mb on membuster.
No new tests : refactor, old ones should cover.
* css/CSSComputedStyleDeclaration.cpp:
(WebCore::ComputedStyleExtractor::getBackgroundShorthandValue):
* css/CSSParser.cpp:
(WebCore::CSSParser::addPropertyWithPrefixingVariant):
(WebCore::CSSParser::addProperty):
* css/CSSProperty.cpp:
(WebCore::StylePropertyMetadata::shorthandID):
(WebCore::borderDirections):
* css/CSSProperty.h:
(WebCore::StylePropertyMetadata::StylePropertyMetadata): Use uint16_t type for bitfields so sizeof() returns 2 bytes.
(WebCore::CSSProperty::CSSProperty):
(WebCore::CSSProperty::isSetFromShorthand):
(WebCore::CSSProperty::shorthandID):
* css/StylePropertySet.cpp:
(WebCore::ImmutableStylePropertySet::ImmutableStylePropertySet):
(WebCore::getIndexInShorthandVectorForPrefixingVariant):
(WebCore::MutableStylePropertySet::appendPrefixingVariantProperty):
(WebCore::MutableStylePropertySet::setPrefixingVariantProperty):
* css/StylePropertySet.h:
(WebCore::StylePropertySet::PropertyReference::shorthandID):
* css/StylePropertyShorthand.cpp:
(WebCore::backgroundShorthand):
(WebCore::backgroundPositionShorthand):
(WebCore::backgroundRepeatShorthand):
(WebCore::borderShorthand):
(WebCore::borderAbridgedShorthand):
(WebCore::borderBottomShorthand):
(WebCore::borderColorShorthand):
(WebCore::borderImageShorthand):
(WebCore::borderLeftShorthand):
(WebCore::borderRadiusShorthand):
(WebCore::webkitBorderRadiusShorthand):
(WebCore::borderRightShorthand):
(WebCore::borderSpacingShorthand):
(WebCore::borderStyleShorthand):
(WebCore::borderTopShorthand):
(WebCore::borderWidthShorthand):
(WebCore::listStyleShorthand):
(WebCore::fontShorthand):
(WebCore::marginShorthand):
(WebCore::markerShorthand):
(WebCore::outlineShorthand):
(WebCore::overflowShorthand):
(WebCore::paddingShorthand):
(WebCore::transitionShorthand):
(WebCore::webkitAnimationShorthand):
(WebCore::webkitAnimationShorthandForParsing):
(WebCore::webkitBorderAfterShorthand):
(WebCore::webkitBorderBeforeShorthand):
(WebCore::webkitBorderEndShorthand):
(WebCore::webkitBorderStartShorthand):
(WebCore::webkitColumnsShorthand):
(WebCore::webkitColumnRuleShorthand):
(WebCore::webkitFlexFlowShorthand):
(WebCore::webkitFlexShorthand):
(WebCore::webkitMarginCollapseShorthand):
(WebCore::webkitGridColumnShorthand):
(WebCore::webkitGridRowShorthand):
(WebCore::webkitMarqueeShorthand):
(WebCore::webkitMaskShorthand):
(WebCore::webkitMaskPositionShorthand):
(WebCore::webkitMaskRepeatShorthand):
(WebCore::webkitTextEmphasisShorthand):
(WebCore::webkitTextStrokeShorthand):
(WebCore::webkitTransitionShorthand):
(WebCore::webkitTransformOriginShorthand):
(WebCore::widthShorthand):
(WebCore::heightShorthand):
(WebCore::matchingShorthandsForLonghand):
(WebCore::indexOfShorthandForLonghand):
* css/StylePropertyShorthand.h:
(WebCore::StylePropertyShorthand::StylePropertyShorthand):
(WebCore::StylePropertyShorthand::id):
* css/makeprop.pl:
2013-07-31 Andreas Kling <akling@apple.com>
FINALize StyleSheet subclasses.
<http://webkit.org/b/119370>
Reviewed by Anders Carlsson.
CSSStyleSheet and XSLStyleSheet have no further subclasses so make them final.
* css/CSSStyleSheet.h:
* xml/XSLStyleSheet.h:
2013-07-31 Gyuyoung Kim <gyuyoung.kim@samsung.com>
Introduce toSVGFontFaceElement, and use it
https://bugs.webkit.org/show_bug.cgi?id=119330
Reviewed by Andreas Kling.
As a step to change static_cast with toSVGXXX, static_cast<SVGFontFaceElement*> can
be changed with toSVGFontFaceElement().
Blink merge from https://src.chromium.org/viewvc/blink?view=rev&revision=155082
* css/CSSFontFaceSource.cpp:
(WebCore::CSSFontFaceSource::getFontData):
* svg/SVGFontFaceElement.h:
(WebCore::toSVGFontFaceElement):
* svg/SVGFontFaceFormatElement.cpp:
(WebCore::SVGFontFaceFormatElement::childrenChanged):
* svg/SVGFontFaceSrcElement.cpp:
(WebCore::SVGFontFaceSrcElement::childrenChanged):
* svg/SVGFontFaceUriElement.cpp:
(WebCore::SVGFontFaceUriElement::childrenChanged):
2013-07-31 Gyuyoung Kim <gyuyoung.kim@samsung.com>
Introduce toSVGSMILElement, and use it
https://bugs.webkit.org/show_bug.cgi?id=119260
Reviewed by Darin Adler.
As a step to change static_cast with toSVGXXX, static_cast<SVGSMILElement*> can
be changed with toSVGSMILElement().
Blink merge from https://src.chromium.org/viewvc/blink?view=rev&revision=155048
* svg/SVGAElement.cpp:
(WebCore::SVGAElement::defaultEventHandler):
* svg/animation/SMILTimeContainer.cpp:
(WebCore::SMILTimeContainer::updateDocumentOrderIndexes):
* svg/animation/SVGSMILElement.cpp:
(WebCore::SVGSMILElement::connectConditions):
(WebCore::SVGSMILElement::disconnectConditions):
* svg/animation/SVGSMILElement.h:
(WebCore::toSVGSMILElement):
2013-07-31 Ryosuke Niwa <rniwa@webkit.org>
Reuse of XMLHttpRequests causes character corruption in response text
https://bugs.webkit.org/show_bug.cgi?id=119358
Reviewed by Anders Carlsson.
Merge https://chromium.googlesource.com/chromium/blink/+/6496e7bb9a0b46bc79032b86d5993b25f127a4cb
Test: http/tests/xmlhttprequest/reopen-encoding.html
* xml/XMLHttpRequest.cpp:
(WebCore::XMLHttpRequest::clearResponseBuffers):
(WebCore::XMLHttpRequest::didFinishLoading):
2013-07-31 Alexey Proskuryakov <ap@apple.com>
Make ActiveDOMObject overrides private
https://bugs.webkit.org/show_bug.cgi?id=119352
Reviewed by Sam Weinig.
There is no need to call these through derived classes. And it's quite harmful for
anyone except for ScriptExecutionContext to call suspend/resume in particular -
ScriptExecutionContext won't know, and it will try to manage the state on its own.
* Modules/filesystem/DOMFileSystem.h:
* Modules/filesystem/FileWriter.h:
* Modules/geolocation/Geolocation.h:
* Modules/indexeddb/IDBDatabase.h:
* Modules/indexeddb/IDBRequest.h:
* Modules/indexeddb/IDBTransaction.h:
* Modules/mediasource/MediaSource.h:
* Modules/notifications/Notification.h:
* Modules/notifications/NotificationCenter.h:
* Modules/websockets/WebSocket.h:
* fileapi/FileReader.h:
* html/HTMLMediaElement.h:
* html/canvas/WebGLRenderingContext.h:
* page/DOMTimer.h:
* page/EventSource.h:
* page/SuspendableTimer.h:
* workers/AbstractWorker.h:
* xml/XMLHttpRequest.h:
2013-07-31 Tim Horton <timothy_horton@apple.com>
Remove didFinishLoad order quirk
https://bugs.webkit.org/show_bug.cgi?id=119354
<rdar://problem/11510686>
Reviewed by Alexey Proskuryakov.
* loader/FrameLoader.cpp:
(WebCore::FrameLoader::checkLoadCompleteForThisFrame):
Remove the quirk.
* page/Settings.in:
Remove the setting controlling the quirk.
2013-07-31 Kwang Yul Seo <skyul@company100.net>
Replace CRASH() on overflow with Checked<>
https://bugs.webkit.org/show_bug.cgi?id=119327
Reviewed by Oliver Hunt.
Use a checked type that allows us to automate bound checks. We use a
non-recording Checked<> to keep the behavior.
No behavior change, no new tests needed.
* dom/Text.cpp:
(WebCore::Text::wholeText):
* platform/audio/AudioArray.h:
(WebCore::AudioArray::allocate):
2013-07-31 Kwang Yul Seo <skyul@company100.net>
Use emptyString instead of String("")
https://bugs.webkit.org/show_bug.cgi?id=119335
Reviewed by Darin Adler.
Use emptyString() instead of String("") because it is better style and
faster. This is a followup to r116908, removing all occurrences of
String("") from WebKit.
No behavior change, no new tests needed.
* platform/graphics/blackberry/LayerAnimation.h:
(WebCore::LayerAnimation::name):
* platform/mac/PlatformEventFactoryMac.mm:
(WebCore::textFromEvent):
(WebCore::unmodifiedTextFromEvent):
(WebCore::keyIdentifierForKeyEvent):
2013-07-31 Ruth Fong <ruth_fong@apple.com>
<input type=color> Mac UI behaviour
<rdar://problem/10269922> and https://bugs.webkit.org/show_bug.cgi?id=61276
Reviewed by Brady Eidson.
This patch turns on INPUT_TYPE_COLOR and implements it using the native
Mac color panel.
No new tests added.
Currently, there are no automated ways to test the types of changes made in this patch. (i.e. checking
which color is being displayed in the color panel, checking which color element is currently
associated to the color panel, checking the state of color elements after directing away and
being directed back to its page, etc.)
* Configurations/FeatureDefines.xcconfig: Enabled INPUT_TYPE_COLOR.
* WebCore.exp.in:
* WebCore.xcodeproj/project.pbxproj:
* html/ColorInputType.cpp:
(WebCore::ColorInputType::handleDOMActivateEvent): Reattaches the color picker if
a color picker has already been shown for an element
(WebCore::ColorInputType::shouldResetOnDocumentActivation): Always returns true, needed to
detach the color picker when caching a page.
* html/ColorInputType.h:
* html/HTMLInputElement.cpp:
(WebCore::HTMLInputElement::documentDidResumeFromPageCache): For <input type='color'>,
don't reset the element.
(WebCore::HTMLInputElement::documentWillSuspendForPageCache): For <input type='color'>, call detach().
* html/HTMLInputElement.h:
* platform/ColorChooser.h:
(WebCore::ColorChooser::reattachColorChooser): Added definition.
2013-07-30 Gavin Barraclough <barraclough@apple.com>
Some cleanup in JSValue::get
https://bugs.webkit.org/show_bug.cgi?id=119343
Reviewed by Geoff Garen.
* WebCore.exp.in:
* bindings/js/JSDOMWindowCustom.cpp:
(WebCore::JSDOMWindow::getOwnPropertySlot):
(WebCore::JSDOMWindow::getOwnPropertySlotByIndex):
* bindings/scripts/CodeGeneratorJS.pm:
(GenerateHeader):
(GenerateImplementation):
(GenerateConstructorDeclaration):
(GenerateConstructorHelperMethods):
* bridge/objc/objc_runtime.h:
* bridge/objc/objc_runtime.mm:
(JSC::Bindings::ObjcFallbackObjectImp::getOwnPropertySlot):
* bridge/runtime_array.cpp:
(JSC::RuntimeArray::getOwnPropertySlot):
(JSC::RuntimeArray::getOwnPropertySlotByIndex):
* bridge/runtime_array.h:
* bridge/runtime_method.cpp:
(JSC::RuntimeMethod::getOwnPropertySlot):
* bridge/runtime_method.h:
* bridge/runtime_object.cpp:
(JSC::Bindings::RuntimeObject::getOwnPropertySlot):
* bridge/runtime_object.h:
- getOwnPropertySlot, JSCell -> JSObject
2013-07-31 Alexey Proskuryakov <ap@apple.com>
REGRESSION (r153406): DOM intervals are not properly restarted when resumed
https://bugs.webkit.org/show_bug.cgi?id=119345
Reviewed by Sam Weinig.
* page/SuspendableTimer.cpp: (WebCore::SuspendableTimer::suspend): Call base class
version of repeatInterval(), not our version that will just return the current value
of m_savedRepeatInterval in this situation.
2013-07-31 Ryosuke Niwa <rniwa@webkit.org>
Avoid calling nextRenderer() in some cases
https://bugs.webkit.org/show_bug.cgi?id=119313
Reviewed by Andreas Kling.
Merge https://chromium.googlesource.com/chromium/blink/+/3207cfda52082f4fd6a04c7819c18a980de58beb.
* dom/Text.cpp:
(WebCore::Text::textRendererIsNeeded):
2013-07-31 Ryosuke Niwa <rniwa@webkit.org>
Convert most callers of setInlineStyleProperty passing strings to enums or doubles instead
https://bugs.webkit.org/show_bug.cgi?id=119304
Reviewed by Andreas Kling.
Merge https://chromium.googlesource.com/chromium/blink/+/8157dd9381716759f183fabbfed29c52962be746
* editing/DeleteButtonController.cpp:
(WebCore::DeleteButtonController::createDeletionUI):
(WebCore::DeleteButtonController::show):
* html/HTMLTextFormControlElement.cpp:
(WebCore::HTMLTextFormControlElement::updatePlaceholderVisibility):
* html/ImageDocument.cpp:
(WebCore::ImageDocument::resizeImageToFit):
(WebCore::ImageDocument::restoreImageSize):
(WebCore::ImageDocument::windowSizeChanged):
* html/shadow/MediaControlElements.cpp:
(WebCore::MediaControlTextTrackContainerElement::updateDisplay):
(WebCore::MediaControlTextTrackContainerElement::updateTimerFired):
* html/track/TextTrackCue.cpp:
(WebCore::TextTrackCue::setFontSize):
* html/track/TextTrackCueGeneric.cpp:
(WebCore::TextTrackCueGenericBoxElement::applyCSSProperties):
(WebCore::TextTrackCueGeneric::setFontSize):
* rendering/RenderLayer.cpp:
(WebCore::RenderLayer::resize):
2013-07-31 Jae Hyun Park <jae.park@company100.net>
[Coordinated Graphics] Use m_ prefix only for member variable
https://bugs.webkit.org/show_bug.cgi?id=119250
Reviewed by Noam Rosenthal.
WebKit coding style suggests to use m_ prefix only for data members.
This patch also removes unnecessary copy by passing const-reference
parameter values.
* platform/graphics/texmap/coordinated/CoordinatedCustomFilterProgram.h:
(WebCore::CoordinatedCustomFilterProgram::create):
2013-07-31 Allan Sandfeld Jensen <allan.jensen@digia.com>
[Qt] Images are down-scaled badly
https://bugs.webkit.org/show_bug.cgi?id=119263
Reviewed by Jocelyn Turcotte.
QPainter only does bilinear filtering, which means it will downscaling beyond
0.5x will start skipping pixel and start to degrade the end result. Scaling in
QImage and QPixmap however uses a better but much more expensive sampling that
counts all pixels.
To get the high quality downscaling we must therefore prescale the images before
painting them. To avoid a performance impact on repeated paints the prescaled
image are saved in the QPixmapCache.
* platform/graphics/qt/ImageQt.cpp:
(WebCore::BitmapImage::draw):
2013-07-31 Grzegorz Czajkowski <g.czajkowski@samsung.com>
Remove guessesVector param from isUngrammatical
https://bugs.webkit.org/show_bug.cgi?id=119241
Reviewed by Ryosuke Niwa.
TextCheckingHelper::isUngrammatical(Vector<String>& guessesVector) doesn't return
guesses for ungrammatical phrases through its parameter.
Editor::isSelectionUngrammatical() uses it to check whether the selection
is ungrammatical.
r71009 showed that isUngrammatical(Vector<String>& guessesVector) had not supported
grammar guesses.
The grammar guesses can be retrieved by guessesForMisspelledOrUngrammaticalRange
when UNIFIED_TEXT_CHECKING is on.
No new tests, this is dead code due to no WebKit port implements grammar using
legacy text checker.
* WebCore.exp.in: Removed __ZN7WebCore6Editor32guessesForUngrammaticalSelectionEv.
* editing/Editor.cpp:
(WebCore::Editor::isSelectionUngrammatical):
(WebCore::Editor::guessesForMisspelledOrUngrammatical):
* editing/Editor.h: Removed guessesForUngrammaticalSelection. Dead code.
* editing/TextCheckingHelper.cpp:
(WebCore::TextCheckingHelper::isUngrammatical):
* editing/TextCheckingHelper.h:
2013-07-31 Grzegorz Czajkowski <g.czajkowski@samsung.com>
Unnecessary const_cast<TextCheckingHelper*>(this)->findFirstBadGrammar
https://bugs.webkit.org/show_bug.cgi?id=119244
Reviewed by Ryosuke Niwa.
Added missing const modifier to findFirstBadGrammar (and findFirstGrammarDetail
respectively) to call it in 'isUngrammatical() const' without const casting.
No new tests, no behavior change.
* editing/TextCheckingHelper.cpp:
(WebCore::TextCheckingHelper::findFirstGrammarDetail):
(WebCore::TextCheckingHelper::findFirstBadGrammar):
Added const.
(WebCore::TextCheckingHelper::isUngrammatical):
Now const_cast can be removed.
* editing/TextCheckingHelper.h:
2013-07-30 Grzegorz Czajkowski <g.czajkowski@samsung.com>
findFirstGrammarDetail doesn't need to be exposed.
https://bugs.webkit.org/show_bug.cgi?id=119249
Reviewed by Darin Adler.
Make TextCheckingHelper::findFirstGrammarDetail private.
Remove badGrammarPhraseLength param. It's not used any longer.
No new tests, no behavior change.
* editing/TextCheckingHelper.cpp:
(WebCore::TextCheckingHelper::findFirstGrammarDetail):
(WebCore::TextCheckingHelper::findFirstBadGrammar):
* editing/TextCheckingHelper.h:
2013-07-30 Tim Horton <timothy_horton@apple.com>
DHTML drag can result in a null-deref under WebDragClient::startDrag
https://bugs.webkit.org/show_bug.cgi?id=119297
<rdar://problem/14213012>
Reviewed by Simon Fraser.
Test: fast/events/setDragImage-in-document-element-crash.html
* page/mac/FrameSnapshottingMac.mm:
(WebCore::snapshotDragImage):
We shouldn't waste time painting an empty image, nor should we return
an image with no size.
2013-07-30 Pravin D <pravind@samsung.com>
Dotted borders render w/ artifacts and sometimes as solid lines
https://bugs.webkit.org/show_bug.cgi?id=3964
Reviewed by Elliott Sprehn.
While drawing the dotted border, the common borders are drawn by the cells sharing them. The dotted borders
become(tend) solid when the starting and the end points of the border drawn by the two cells don't match. This
fixes the same.
Test: fast/table/border-collapsing/dotted-collapsed-border.html
* rendering/RenderTableCell.cpp:
(WebCore::RenderTableCell::alignLeftRightBorderPaintRect):
(WebCore::RenderTableCell::alignTopBottomBorderPaintRect):
Helper function to decide if border's start point requires any adjustment.
(WebCore::RenderTableCell::paintCollapsedBorders):
Added logic to handle dotted borders so that they do not become solid.
* rendering/RenderTableCell.h:
Helper function declarations.
2013-07-30 Vani Hegde <vani.hegde@samsung.com>
Gmail reply email - Bold and Italic style get stuck
https://bugs.webkit.org/show_bug.cgi?id=118185
Reviewed by Ryosuke Niwa.
When bold/italic style is applied to a content with mixed editability,
style is applied appropriately for the first time.
But after this, style toggling does not work any more. Same behavior
can be observed when the content on which style is applied contains
text node without renderer (Ex: text node corresponding to tab/space etc)
When bold/italic style is applied on a selection, we actually apply the
style only for text nodes that have renderers and also are contenteditable.
Similarly during style toggling, to check whether a style has been already
applied on a selection
Tests: editing/style/toggle-style-bold-italic-mixed-editability.html
editing/style/toggle-style-bold-italic.html
* editing/EditingStyle.cpp:
(WebCore::EditingStyle::triStateOfStyle):
A particular selection on which style is applied may contain text nodes
without renderers(text nodes corresponding to tab/space) or text nodes
that are not contenteditable. We do not apply style to such text nodes.
Hence, even during style toggling we should not consider the styles
present in such nodes.
2013-07-30 Rob Buis <rwlbuis@webkit.org>
XMLSerializer should reset default namespace when necessary
https://bugs.webkit.org/show_bug.cgi?id=16739
XMLSerializer's handling of namespaces seems to be pretty broken
https://bugs.webkit.org/show_bug.cgi?id=106531
Reviewed by Ryosuke Niwa.
Write out empty default namespace declaration if the element is not in any namespace, as
described in http://www.whatwg.org/specs/web-apps/current-work/multipage/the-xhtml-syntax.html#xml-fragment-serialization-algorithm.
Tests: fast/dom/XMLSerializer-element-empty-namespace.html
fast/dom/XMLSerializer-element-empty-namespace2.html
* editing/MarkupAccumulator.cpp:
(WebCore::MarkupAccumulator::appendNamespace):
(WebCore::MarkupAccumulator::appendOpenTag):
* editing/MarkupAccumulator.h:
2013-07-30 Chris Fleizach <cfleizach@apple.com>
Don't post accessibility notification on object in detached document.
https://bugs.webkit.org/show_bug.cgi?id=119286
Reviewed by Ryosuke Niwa.
Merge https://chromium.googlesource.com/chromium/blink/+/ef9fc9e70202dcf33e5cf2f0f0a2135945ffe17e%5E%21/#F0
Don't post accessibility notification on object in detached document.
This can happen if an accessibility notification is queued on a node,
then that node is reparented to a different document that's not attached
anywhere before the accessibility notification is fired.
* accessibility/AXObjectCache.cpp:
(WebCore::AXObjectCache::notificationPostTimerFired):
2013-07-30 Andy Estes <aestes@apple.com>
Content filter replacement data uses the encoding from the blocked page's response headers
https://bugs.webkit.org/show_bug.cgi?id=119237
Reviewed by Darin Adler.
When a document specifies an encoding in an HTTP response header, or
when the embedder specifies an override encoding, and the content filter
blocks the document, we interpret the content filter's replacement data
using this encoding. This might be the wrong.
Forget about encodings determined from these sources. The replacement
data will specify an encoding in a <meta charset>, so let that be used
instead.
No new tests. We don't currently have a mechanism for testing the
content filter from WebKit.
* loader/DocumentLoader.cpp:
(WebCore::DocumentLoader::commitData): Pretend as if no encoding is
specified if the content filter blocked the load.
(WebCore::DocumentLoader::dataReceived): Stopped calling commitLoad()
before early-returning if the content filter needs more data. This isn't
necessary.
2013-07-30 Christophe Dumez <ch.dumez@sisa.samsung.com>
Add 'colno' attribute to ErrorEvent interface
https://bugs.webkit.org/show_bug.cgi?id=119257
Reviewed by Darin Adler.
Add 'colno' attribute to ErrorEvent interface to match the latest specification:
http://www.whatwg.org/specs/web-apps/current-work/multipage/webappapis.html#errorevent
The 'colno' attribute is already supported by IE10 and Blink.
No new tests, covered by existing tests.
* dom/ErrorEvent.cpp:
(WebCore::ErrorEventInit::ErrorEventInit):
(WebCore::ErrorEvent::ErrorEvent):
* dom/ErrorEvent.h:
* dom/ErrorEvent.idl:
2013-07-30 Andreas Kling <akling@apple.com>
Inactive style sheets should not trigger style recalc when loaded.
<http://webkit.org/b/119236>
<rdar://problem/14588132>
Reviewed by Antti Koivisto.
Style sheets that are either alternate sheets or are excluded by their media query should not trigger
a full style recalc when they finish loading, since the end result will not be observably different.
The sheets are still inspectable through document.styleSheets.
Changed enums from Blocking/NonBlocking to ActiveSheet/InactiveSheet to clarify what's going on.
* html/HTMLLinkElement.h:
* html/HTMLLinkElement.cpp:
(WebCore::HTMLLinkElement::HTMLLinkElement):
(WebCore::HTMLLinkElement::setDisabledState):
(WebCore::HTMLLinkElement::process):
(WebCore::HTMLLinkElement::startLoadingDynamicSheet):
(WebCore::HTMLLinkElement::addPendingSheet):
(WebCore::HTMLLinkElement::removePendingSheet):
2013-07-30 Tim Horton <timothy_horton@apple.com>
Fix typo in enum name ("SelectionInSnaphot" -> "SelectionInSnapshot")
https://bugs.webkit.org/show_bug.cgi?id=119275
Reviewed by Simon Fraser.
* WebCore.exp.in:
* page/FrameView.cpp:
(WebCore::FrameView::paintContentsForSnapshot):
* page/FrameView.h:
Fix typo.
2013-07-30 Alex Christensen <achristensen@apple.com>
Compile fix for WebGL on 32-bit Windows.
https://bugs.webkit.org/show_bug.cgi?id=119235
Reviewed by Darin Adler.
* platform/graphics/GLContext.cpp:
Created GLNativeWindowType typedef.
(WebCore::GLContext::createContextForWindow):
* platform/graphics/GLContext.h:
Replaced uint64_t with GLNativeWindowType.
2013-07-30 Patrick Gansterer <paroga@webkit.org>
[WIN] Remove dependency on CoreFoundation from DownloadBundle
https://bugs.webkit.org/show_bug.cgi?id=119247
Reviewed by Anders Carlsson.
* platform/network/cf/DownloadBundle.h:
* platform/network/curl/DownloadBundle.h:
* platform/network/win/DownloadBundleWin.cpp:
(WebCore::DownloadBundle::magicNumber):
(WebCore::DownloadBundle::appendResumeData):
(WebCore::DownloadBundle::extractResumeData):
2013-07-30 Patrick Gansterer <paroga@webkit.org>
Move WindowsExtras.h from WebCore to WTF
https://bugs.webkit.org/show_bug.cgi?id=118125
Reviewed by Anders Carlsson.
Move it to WTF to be able to use the functions in WTF too.
* platform/PlatformKeyboardEvent.h:
* platform/PlatformMouseEvent.h:
* platform/PlatformWheelEvent.h:
* platform/graphics/win/MediaPlayerPrivateFullscreenWindow.h:
* platform/win/MIMETypeRegistryWin.cpp:
* platform/win/PasteboardWin.cpp:
* platform/win/PopupMenuWin.cpp:
* platform/win/RunLoopWin.cpp:
* platform/win/SharedTimerWin.cpp:
* platform/win/WindowMessageListener.h:
* plugins/win/PluginDatabaseWin.cpp:
2013-07-30 Christophe Dumez <ch.dumez@sisa.samsung.com>
Pass column as 4th argument to WorkerGlobalScope.onerror and Window.onerror handlers
https://bugs.webkit.org/show_bug.cgi?id=119251
Reviewed by Geoffrey Garen.
As per the latest specification, the WorkerGlobalScope.onerror and Window.onerror event
handlers should be given the column as fourth argument:
http://www.whatwg.org/specs/web-apps/current-work/multipage/workers.html#workerglobalscope
http://www.whatwg.org/specs/web-apps/current-work/multipage/webappapis.html#onerroreventhandler
The column argument is already supported by IE10 and Blink.
No new tests, covered by existing tests.
* bindings/js/JSErrorHandler.cpp:
(WebCore::JSErrorHandler::handleEvent):
* bindings/js/WorkerScriptController.cpp:
(WebCore::WorkerScriptController::evaluate):
* dom/ErrorEvent.cpp:
(WebCore::ErrorEvent::ErrorEvent):
* dom/ErrorEvent.h:
(WebCore::ErrorEvent::create):
(WebCore::ErrorEvent::colno):
* dom/ScriptExecutionContext.cpp:
(WebCore::ScriptExecutionContext::sanitizeScriptError):
(WebCore::ScriptExecutionContext::reportException):
(WebCore::ScriptExecutionContext::dispatchErrorEvent):
* dom/ScriptExecutionContext.h:
* workers/WorkerMessagingProxy.cpp:
(WebCore::WorkerExceptionTask::performTask):
2013-07-30 Patrick Gansterer <paroga@webkit.org>
Use OwnPtr in RenderThemeWin and ScrollbarThemeWin
https://bugs.webkit.org/show_bug.cgi?id=117978
Reviewed by Brent Fulgham.
Use OwnPtr to avoid manual deletion of objects.
* platform/win/ScrollbarThemeWin.cpp:
(WebCore::ScrollbarThemeWin::paintTrackPiece):
* rendering/RenderThemeWin.cpp:
(WebCore::drawControl):
2013-07-30 Alex Christensen <achristensen@apple.com>
Added include directories to Visual Studio for WebGL.
https://bugs.webkit.org/show_bug.cgi?id=119161
Reviewed by Brent Fulgham.
* WebCore.vcxproj/WebCoreCommon.props: Added more include directories.
2013-07-30 Commit Queue <commit-queue@webkit.org>
Unreviewed, rolling out r151957 and r152531.
http://trac.webkit.org/changeset/151957
http://trac.webkit.org/changeset/152531
https://bugs.webkit.org/show_bug.cgi?id=119267
They revealed a bug on Mac I can't fix (Requested by Ossy on
#webkit).
* platform/graphics/BitmapImage.cpp:
(WebCore::BitmapImage::frameIsCompleteAtIndex):
(WebCore::BitmapImage::frameDurationAtIndex):
* platform/graphics/ImageSource.cpp:
(WebCore::ImageSource::frameDurationAtIndex):
(WebCore::ImageSource::frameHasAlphaAtIndex):
(WebCore::ImageSource::frameIsCompleteAtIndex):
* platform/graphics/ImageSource.h:
* platform/graphics/cairo/GraphicsContext3DCairo.cpp:
(WebCore::GraphicsContext3D::ImageExtractor::extractImage):
* platform/graphics/cg/ImageSourceCG.cpp:
(WebCore::ImageSource::frameIsCompleteAtIndex):
(WebCore::ImageSource::frameDurationAtIndex):
(WebCore::ImageSource::frameHasAlphaAtIndex):
* platform/graphics/efl/GraphicsContext3DEfl.cpp:
(WebCore::GraphicsContext3D::ImageExtractor::extractImage):
* platform/image-decoders/ImageDecoder.cpp:
(WebCore::ImageDecoder::frameHasAlphaAtIndex):
* platform/image-decoders/ImageDecoder.h:
* platform/image-decoders/gif/GIFImageDecoder.cpp:
(WebCore::GIFImageDecoder::haveDecodedRow):
(WebCore::GIFImageDecoder::gifComplete):
(WebCore::GIFImageDecoder::decode):
(WebCore::GIFImageDecoder::initFrameBuffer):
* platform/image-decoders/gif/GIFImageDecoder.h:
* platform/image-decoders/gif/GIFImageReader.h:
(GIFImageReader::frameContext):
2013-07-30 Kwang Yul Seo <skyul@company100.net>
Remove using namespace std from SpatialNavigation
https://bugs.webkit.org/show_bug.cgi?id=119242
Reviewed by Antonio Gomes.
"using namespace" statements in headers are dangerous and should be
avoided. check-webkit-style has been changed to flag them as an error
since r152719. Use explicit std:: qualifiers instead.
No behavior change, no new tests needed.
* page/SpatialNavigation.cpp:
(WebCore::scrollInDirection):
* page/SpatialNavigation.h:
(WebCore::maxDistance):
2013-07-30 Simon Hausmann <simon.hausmann@digia.com>
[Qt][Win] Extend disabling of whole-program-optimizations to MSVC 2012
https://bugs.webkit.org/show_bug.cgi?id=119238
Reviewed by Jocelyn Turcotte.
As suggested in https://bugreports.qt-project.org/browse/QTBUG-20556,
the WebKit build with MSVC 2012 is affected by the same size
limitations.
* WebCore.pri:
2013-07-30 Allan Sandfeld Jensen <allan.jensen@digia.com>
REGRESION(r151091) ASSERTION FAILED: m_readableData || m_writableData
https://bugs.webkit.org/show_bug.cgi?id=119142
Reviewed by Jocelyn Turcotte.
Remove invalid assert.
Covered by existing tests.
* platform/qt/PasteboardQt.cpp:
(WebCore::Pasteboard::readData):
2013-07-29 Carlos Garcia Campos <cgarcia@igalia.com>
Unreviewed. Fix make distcheck.
* GNUmakefile.list.am: Add missing header file to compilation.
2013-07-29 Kwang Yul Seo <skyul@company100.net>
[Gtk] Improve string use in PasteboardGtk
https://bugs.webkit.org/show_bug.cgi?id=119204
Reviewed by Martin Robinson.
Use emptyString() instead of "" and use ASCIILiteral where appropriate.
No behavior change, no new tests needed.
* platform/gtk/PasteboardGtk.cpp:
(WebCore::Pasteboard::documentFragment):
Use emptyString() instead of "".
(WebCore::Pasteboard::types):
Use ASCIILiteral where appropriate.
2013-07-29 Simon Fraser <simon.fraser@apple.com>
Page count can be incorrect if there is a pending style recalc
https://bugs.webkit.org/show_bug.cgi?id=119232
Reviewed by Beth Dakin.
If style is changed in a way that schedules a style recalc on the Document,
and then Page::pageCount() is called, we may give the wrong answer because
the existing code only checked FrameView::needsLayout(), not whether a style
recale was pending.
Fix by having Page::pageCount() call updateLayoutIgnorePendingStylesheets()
as we do for other properties that require layer, and are exposed to JS
or via API.
* page/Page.cpp:
(WebCore::Page::pageCount):
2013-07-29 Alex Christensen <achristensen@apple.com>
Moved GLContext.cpp and .h out of cairo directory to be used by non-cairo ports.
https://bugs.webkit.org/show_bug.cgi?id=119223
Reviewed by Kenneth Rohde Christiansen.
* GNUmakefile.list.am:
* PlatformGTK.cmake:
* WebCore.vcxproj/WebCore.vcxproj:
* WebCore.vcxproj/WebCore.vcxproj.filters:
Changed location of GLContext.cpp and GLContext.h.
* platform/graphics/GLContext.cpp: Copied from WebCore/platform/graphics/cairo/GLContext.cpp.
* platform/graphics/GLContext.h: Copied from WebCore/platform/graphics/cairo/GLContext.h.
* platform/graphics/cairo/GLContext.cpp: Removed.
* platform/graphics/cairo/GLContext.h: Removed.
2013-07-29 Jer Noble <jer.noble@apple.com>
TextTrackRepresentation captions often disappear then appear again.
https://bugs.webkit.org/show_bug.cgi?id=119228
Reviewed by Simon Fraser.
Calling updateTextTrackDisplay() will cause the entire DOM subtree containing the active cues
to be torn down and rebuilt. Only call into this method when text tracks have actually changed.
Add an enum parameter to configureTextTrackDisplay() which allows the caller to specify that
method should assume that the list of visible text tracks has changed, forcing a call to
updateTextTrackDisplay().
* html/HTMLMediaElement.cpp:
(WebCore::HTMLMediaElement::updateActiveTextTrackCues): Remove the unnecessary call to updateTextTrackDisplay().
(WebCore::HTMLMediaElement::textTrackModeChanged): Pass AssumeVisibleTextTracksChanged to configureTextTrackDisplay().
(WebCore::HTMLMediaElement::configureTextTrackDisplay): Check the passed flags and exit early only if
AssumeVisibleTextTracksChanged is not set.
* html/HTMLMediaElement.h:
2013-07-26 Ryosuke Niwa <rniwa@webkit.org>
Fix crash due to unexpected Node deletion during MutationObserver registration book-keeping
https://bugs.webkit.org/show_bug.cgi?id=119124
Reviewed by Sam Weinig.
Merge https://chromium.googlesource.com/chromium/blink/+/b6afb927695b3acf2c75c25f05e99682660993e2
No new tests since I could not reproduce the crash with the test attached in the Blink change.
The bug was caused by Node::unregisterMutationObserver removing the MutationObserverRegistration
that holds the last ref to the node. Avoid that by explicitly allocating a local RefPtr to the node
in MutationObserverRegistration::unregister. Also rename it to unregisterAndDelete to clarify
the semantics and make it a static member function to be even safer.
* dom/MutationObserver.cpp:
(WebCore::MutationObserver::disconnect):
* dom/MutationObserverRegistration.cpp:
(WebCore::MutationObserverRegistration::unregisterAndDelete):
* dom/MutationObserverRegistration.h:
2013-07-29 Alex Christensen <achristensen@apple.com>
Moved GLTransportSurface.h and .cpp out of efl-specific directory.
https://bugs.webkit.org/show_bug.cgi?id=119163
Reviewed by Alexis Menard.
* PlatformEfl.cmake: Changed directory of GLTransportSurface.cpp.
* platform/graphics/surfaces/GLTransportSurface.cpp: Copied from WebCore/platform/graphics/surfaces/efl/GLTransportSurface.cpp.
* platform/graphics/surfaces/GLTransportSurface.h: Copied from WebCore/platform/graphics/surfaces/efl/GLTransportSurface.h.
* platform/graphics/surfaces/efl/GLTransportSurface.cpp: Removed.
* platform/graphics/surfaces/efl/GLTransportSurface.h: Removed.
2013-07-29 Alex Christensen <achristensen@apple.com>
Speculative implementation of missing GraphicsContext3D methods on Windows.
https://bugs.webkit.org/show_bug.cgi?id=119167
Reviewed by Dean Jackson.
* WebCore.vcxproj/WebCore.vcxproj:
* WebCore.vcxproj/WebCore.vcxproj.filters:
* platform/graphics/win/GraphicsContext3DWin.cpp: Added.
(WebCore::GraphicsContext3DPrivate::GraphicsContext3DPrivate):
(WebCore::GraphicsContext3DPrivate::~GraphicsContext3DPrivate):
(WebCore::GraphicsContext3D::create):
(WebCore::GraphicsContext3D::GraphicsContext3D):
(WebCore::GraphicsContext3D::~GraphicsContext3D):
(WebCore::GraphicsContext3D::setContextLostCallback):
(WebCore::GraphicsContext3D::setErrorMessageCallback):
(WebCore::GraphicsContext3D::makeContextCurrent):
(WebCore::GraphicsContext3D::platformGraphicsContext3D):
(WebCore::GraphicsContext3D::platformTexture):
(WebCore::GraphicsContext3D::isGLES2Compliant):
(WebCore::GraphicsContext3D::platformLayer):
2013-07-29 Dean Jackson <dino@apple.com>
Max IOSurfaceDimension should be an inclusive upper bound
https://bugs.webkit.org/show_bug.cgi?id=119206
<rdar://problem/14555311>
Reviewed by Simon Fraser.
The maxIOSurfaceDimension value should be an inclusive upper bound.
Change the greater than or equal to into a greater than. This will
allow canvas elements of this dimension to be accelerated.
* platform/graphics/cg/ImageBufferCG.cpp:
(WebCore::ImageBuffer::ImageBuffer): Change >= to >
2013-07-29 Renata Hodovan <reni@webkit.org>
ASSERT_NOT_REACHED was touched in WebCore::SVGAnimatedType::valueAsString
https://bugs.webkit.org/show_bug.cgi?id=118744
Reviewed by Philip Rogers.
If we have an <animateTransform> tag that sets the attributeName and attributeType
properties however they are not consistent and we shouldn't try to apply it.
It is already checked and catched in SVGAnimateElement::resetAnimatedType() but
DontApplyAnimation case isn't handled properly. The patch forces an early return
in this case.
Test: svg/animations/attributeNameAndAttributeTypeMissmatch.svg
* svg/SVGAnimateElement.cpp:
(WebCore::SVGAnimateElement::resetAnimatedType):
2013-07-29 Allan Sandfeld Jensen <allan.jensen@digia.com>
REGRESSION(148300) GIFs not reanimated after resumeActiveDOMObjectAndAnimations
https://bugs.webkit.org/show_bug.cgi?id=119217
Reviewed by Tim Horton.
Commit 148300 introduced a new better was of restarting GIF animations after
they have been suspended. Unfortunately the method was not activated when a page
is resumed but only when it is returning from background.
This fixes GIF animations that are stopped during user interaction on Qt and other
platforms using suspendActiveDOMObjectAndAnimations.
* page/Frame.cpp:
(WebCore::Frame::resumeActiveDOMObjectsAndAnimations):
2013-07-29 Alex Christensen <achristensen@apple.com>
Made EGL useable by non-cairo ports.
https://bugs.webkit.org/show_bug.cgi?id=119177
Reviewed by Brent Fulgham.
* platform/graphics/cairo/GLContext.h:
* platform/graphics/egl/GLContextEGL.cpp:
(WebCore::GLContextEGL::GLContextEGL):
* platform/graphics/egl/GLContextEGL.h:
Protected Cairo-specific code with #if USE(CAIRO)
2013-07-29 Sergio Correia <sergio.correia@openbossa.org>
CoordinatedGraphics: Add API to get and set the active state of a WebView
https://bugs.webkit.org/show_bug.cgi?id=119067
Reviewed by Noam Rosenthal.
Added a method to return whether a scene is active or not.
No new tests, no behavior change.
* platform/graphics/texmap/coordinated/CoordinatedGraphicsScene.h:
(WebCore::CoordinatedGraphicsScene::isActive): Added method to return the
active state of the scene.
2013-07-29 Mario Sanchez Prada <mario.prada@samsung.com>
[ATK] Issues with edge cases when getting offsets for a text range in AtkText
https://bugs.webkit.org/show_bug.cgi?id=118908
Reviewed by Martin Robinson.
Reimplement getSelectionOffsetsForObject() just in term of
Positions instead of using ranges, which makes it simpler and
works better. Also, make sure we use the right Node as reference
for the accessibility object by getting the proper one both for
text control objects (e.g. input, text area) and normal ones.
* accessibility/atk/WebKitAccessibleInterfaceText.cpp:
(getNodeForAccessibilityObject): New helper function to ensure we
always get the relevant object from the DOM tree for a given
accessibility object, in the context of the implementation of
AtkText, so it works both with Text Controls and other elements.
(getSelectionOffsetsForObject): Rewritten this function in terms
of VisiblePositions and avoiding weird operations with ranges, so
we have more control to fine tune the results and give more
accurate ones. Besides, now it works better with edge cases.
2013-07-29 Zan Dobersek <zdobersek@igalia.com>
Clean up DragImage
https://bugs.webkit.org/show_bug.cgi?id=118981
Reviewed by Anders Carlsson.
* dom/Clipboard.h: Add forward declaration for the Range class. This was not necessary until now as the forward
declaration was introduced in the DragImage header, from where it's being removed due to not being required in that class.
* page/Frame.h: Ditto.
* platform/DragImage.cpp: Remove the unnecessary DragController and FontRenderingMode header inclusions.
The latter is already included in the header.
* platform/DragImage.h: Remove the forward declaration for the Range class - it's not used by the DragImage class at all.
2013-07-29 Kwang Yul Seo <skyul@company100.net>
[EFL] Improve string use in ErrorsEfl
https://bugs.webkit.org/show_bug.cgi?id=119207
Reviewed by Christophe Dumez.
Use ASCIILiteral for constant strings becoming WTFStrings.
No behavior change.
* platform/efl/ErrorsEfl.cpp:
(WebCore::cancelledError):
(WebCore::blockedError):
(WebCore::cannotShowURLError):
(WebCore::interruptedForPolicyChangeError):
(WebCore::cannotShowMIMETypeError):
(WebCore::fileDoesNotExistError):
(WebCore::pluginWillHandleLoadError):
(WebCore::downloadCancelledByUserError):
(WebCore::printerNotFoundError):
(WebCore::invalidPageRangeToPrint):
2013-07-28 Andreas Kling <akling@apple.com>
Don't update the text track override CSS every time a media element is created.
<http://webkit.org/b/119199>
<rdar://problem/14572855>
Reviewed by Darin Adler.
We should only have to update the CSS if the accessibility caption preferences are changed.
This was forcing a full style recalc in every Document any time a media element is instantiated.
* page/CaptionUserPreferencesMediaAF.cpp:
(WebCore::CaptionUserPreferencesMediaAF::setInterestedInCaptionPreferenceChanges):
2013-07-28 Andy Estes <aestes@apple.com>
Stop exporting Widget::frameRectsChanged()
https://bugs.webkit.org/show_bug.cgi?id=119196
Reviewed by Darin Adler.
The definition is inlined in a private header, so there's no need to
export a symbol to link against. On the Mac, since we compile with
-fvisibility-inlines-hidden, removing the symbol from the export file
silences an ld warning about exporting a hidden symbol.
* WebCore.exp.in: Removed __ZN7WebCore6Widget17frameRectsChangedEv.
2013-07-28 Sam Weinig <sam@webkit.org>
Clean up CSSPrimitiveValue::equals a bit
https://bugs.webkit.org/show_bug.cgi?id=119195
Reviewed by Andreas Kling.
* css/CSSPrimitiveValue.cpp:
(WebCore::CSSPrimitiveValue::equals):
This should not change behavior, but is quite a bit clearer.
2013-07-27 Ryuan Choi <ryuan.choi@samsung.com>
[EFL] Bump required version of EFL to 1.7
https://bugs.webkit.org/show_bug.cgi?id=119144
Reviewed by Christophe Dumez.
* platform/efl/FileSystemEfl.cpp: Removed workaround code which was fixed at Eina 1.7
(WebCore::listDirectory):
2013-07-27 Jacky Jiang <zhajiang@blackberry.com>
Replace all uses of GraphicsLayer::create function with the one that takes a GraphicsLayerFactory
https://bugs.webkit.org/show_bug.cgi?id=119186
Reviewed by Anders Carlsson.
Remove GraphicsLayer::create(GraphicsLayerClient*) function since it's
been deprecated by r130072.
* WebCore.exp.in:
* WebCore.order:
* platform/graphics/GraphicsLayer.h:
* platform/graphics/blackberry/GraphicsLayerBlackBerry.cpp:
* platform/graphics/ca/GraphicsLayerCA.cpp:
* platform/graphics/texmap/GraphicsLayerTextureMapper.cpp:
2013-07-27 Alexey Proskuryakov <ap@apple.com>
HTMLParserScheduler gets into an inconsistent state when suspended for reasons
other than WillDeferLoading
https://bugs.webkit.org/show_bug.cgi?id=119172
Reviewed by Sam Weinig.
When loading is not deferred, even a suspended parser will be processing new data
from network, potentially starting its next chunk timer.
Limit suspending to when we can actually enforce it.
Here is what happens for each ReasonForSuspension:
- JavaScriptDebuggerPaused: continuing to parse is probably wrong, but in practice,
this is unlikely to happen while debugging, and wasn't properly prevented before
this patch anyway.
- WillDeferLoading: No change in behavior.
- DocumentWillBecomeInactive: This is about page cache, and documents are only allowed
to be cached when fully loaded.
- PageWillBeSuspended: This appears to be part of Frame::suspendActiveDOMObjectsAndAnimations()
implementation, I'm guessing that it is appropriate to continue loading.
* dom/Document.cpp:
(WebCore::Document::suspendScheduledTasks):
(WebCore::Document::resumeScheduledTasks):
Only suspend/resume parsing when loading is deferred. This is not expressed directly,
but it's important to do this to avoid executing JS behind alerts and other modal dialogs.
* html/parser/HTMLParserScheduler.h: Added m_suspended member variable for assertions.
* html/parser/HTMLParserScheduler.cpp:
(WebCore::HTMLParserScheduler::HTMLParserScheduler):
(WebCore::HTMLParserScheduler::continueNextChunkTimerFired):
(WebCore::HTMLParserScheduler::scheduleForResume):
(WebCore::HTMLParserScheduler::suspend):
(WebCore::HTMLParserScheduler::resume):
Update m_suspended and assert as appropriate. No behavior changes for release mode.
* page/Frame.cpp: (WebCore::Frame::suspendActiveDOMObjectsAndAnimations):
Added a FIXME.
2013-07-27 Alexey Proskuryakov <ap@apple.com>
Make SuspendableTimer safer
https://bugs.webkit.org/show_bug.cgi?id=119127
Reviewed by Sam Weinig.
SuspendableTimer now enforces that it stays suspended until resumed (or until stopped
and started again). To ensure this, TimerBase is now a private base class, and parts of
its interface that clients use are reimplemented with suspend/resume in mind.
Derived classes are still allowed to override TimerBase virtual functions (notably
fired() and alignedFireTime()).
* dom/DocumentEventQueue.cpp:
(WebCore::DocumentEventQueueTimer): Removed an extraneous WTF_MAKE_NONCOPYABLE,
TimerBase has it already.
(WebCore::DocumentEventQueueTimer::create): Use our normal create() pattern.
(WebCore::DocumentEventQueue::DocumentEventQueue): Made the constructor private, accordingly.
(WebCore::DocumentEventQueue::cancelEvent): Use SuspendableTimer::cancel(), which
is a new name to disambiguate TimerBase::stop() and ActiveDOMObject::stop().
(WebCore::DocumentEventQueue::close): Ditto.
* page/DOMTimer.cpp:
(WebCore::DOMTimer::fired): Now that SuspendableTimer knows whether it's currently
suspended, assert that it's not.
(WebCore::DOMTimer::didStop): Separated ActiveDOMObject::stop() implementation from
additional cleanup, allowing for better SuspendableTimer encapsulation.
* page/DOMTimer.h: Added FINAL and OVVERIDE specifiers as appropriate.
* page/SuspendableTimer.h: Added FINAL (and OVERRIDE) qualifiers to ActiveDOMObject
methods. A derived class that wants to override current behavior is most likely not
a timer, and thus shouldn't be a derived class.
(WebCore::SuspendableTimer::isActive): SuspendableTimer with a next fire time is
active even if suspended, we shouldn't overwrite its saved data thinking that it's
inactive.
(WebCore::SuspendableTimer::isSuspended): Exposed to clients (m_suspended is no
longer debug only).
* page/SuspendableTimer.cpp:
(WebCore::SuspendableTimer::SuspendableTimer): Updated for new variable names.
(WebCore::SuspendableTimer::stop): This is ActiveDOMObject::stop(), which is called
before final destruction. We don't track this state directly, but can approximate
with setting m_suspended, so even if someone tries to start the timer afterwards,
it won't fire.
(WebCore::SuspendableTimer::suspend): Updated for new names.
(WebCore::SuspendableTimer::resume): Ditto.
(WebCore::SuspendableTimer::didStop): No-op default implementation for client hook.
(WebCore::SuspendableTimer::cancel): Equivalent of TimerBase::stop(), which also
works when suspended.
(WebCore::SuspendableTimer::startRepeating): Replacement for TimerBase function with
the same name, which works correctly when suspended. We don't want to actually start
the timer in this case.
(WebCore::SuspendableTimer::startOneShot): Ditto.
(WebCore::SuspendableTimer::repeatInterval): Ditto.
(WebCore::SuspendableTimer::augmentFireInterval): Ditto.
(WebCore::SuspendableTimer::augmentRepeatInterval): Ditto.
2013-07-27 Sam Weinig <sam@webkit.org>
Add assertions for CSSPrimitiveValue's m_value.valueID accessor
https://bugs.webkit.org/show_bug.cgi?id=119180
Reviewed by Andreas Kling.
* css/CSSPrimitiveValueMappings.h:
(WebCore::CSSPrimitiveValue::operator CSSReflectionDirection):
(WebCore::CSSPrimitiveValue::operator ColumnSpan):
(WebCore::CSSPrimitiveValue::operator PrintColorAdjust):
(WebCore::CSSPrimitiveValue::operator EBorderStyle):
(WebCore::CSSPrimitiveValue::operator OutlineIsAuto):
(WebCore::CSSPrimitiveValue::operator CompositeOperator):
(WebCore::CSSPrimitiveValue::operator ControlPart):
(WebCore::CSSPrimitiveValue::operator EBackfaceVisibility):
(WebCore::CSSPrimitiveValue::operator EFillAttachment):
(WebCore::CSSPrimitiveValue::operator EFillBox):
(WebCore::CSSPrimitiveValue::operator EFillRepeat):
(WebCore::CSSPrimitiveValue::operator EBoxPack):
(WebCore::CSSPrimitiveValue::operator EBoxAlignment):
(WebCore::CSSPrimitiveValue::operator EBoxDecorationBreak):
(WebCore::CSSPrimitiveValue::operator BackgroundEdgeOrigin):
(WebCore::CSSPrimitiveValue::operator EBoxSizing):
(WebCore::CSSPrimitiveValue::operator EBoxDirection):
(WebCore::CSSPrimitiveValue::operator EBoxLines):
(WebCore::CSSPrimitiveValue::operator EBoxOrient):
(WebCore::CSSPrimitiveValue::operator ECaptionSide):
(WebCore::CSSPrimitiveValue::operator EClear):
(WebCore::CSSPrimitiveValue::operator ECursor):
(WebCore::CSSPrimitiveValue::operator CursorVisibility):
(WebCore::CSSPrimitiveValue::operator EDisplay):
(WebCore::CSSPrimitiveValue::operator EEmptyCell):
(WebCore::CSSPrimitiveValue::operator EAlignItems):
(WebCore::CSSPrimitiveValue::operator EJustifyContent):
(WebCore::CSSPrimitiveValue::operator EFlexDirection):
(WebCore::CSSPrimitiveValue::operator EAlignContent):
(WebCore::CSSPrimitiveValue::operator EFlexWrap):
(WebCore::CSSPrimitiveValue::operator EFloat):
(WebCore::CSSPrimitiveValue::operator LineBreak):
(WebCore::CSSPrimitiveValue::operator EListStylePosition):
(WebCore::CSSPrimitiveValue::operator EListStyleType):
(WebCore::CSSPrimitiveValue::operator EMarginCollapse):
(WebCore::CSSPrimitiveValue::operator EMarqueeBehavior):
(WebCore::CSSPrimitiveValue::operator RegionFragment):
(WebCore::CSSPrimitiveValue::operator EMarqueeDirection):
(WebCore::CSSPrimitiveValue::operator ENBSPMode):
(WebCore::CSSPrimitiveValue::operator EOverflow):
(WebCore::CSSPrimitiveValue::operator EPageBreak):
(WebCore::CSSPrimitiveValue::operator EPosition):
(WebCore::CSSPrimitiveValue::operator EResize):
(WebCore::CSSPrimitiveValue::operator ETableLayout):
(WebCore::CSSPrimitiveValue::operator ETextAlign):
(WebCore::CSSPrimitiveValue::operator TextAlignLast):
(WebCore::CSSPrimitiveValue::operator TextJustify):
(WebCore::CSSPrimitiveValue::operator TextDecoration):
(WebCore::CSSPrimitiveValue::operator TextDecorationStyle):
(WebCore::CSSPrimitiveValue::operator TextUnderlinePosition):
(WebCore::CSSPrimitiveValue::operator ETextSecurity):
(WebCore::CSSPrimitiveValue::operator ETextTransform):
(WebCore::CSSPrimitiveValue::operator EUnicodeBidi):
(WebCore::CSSPrimitiveValue::operator EUserDrag):
(WebCore::CSSPrimitiveValue::operator EUserModify):
(WebCore::CSSPrimitiveValue::operator EUserSelect):
(WebCore::CSSPrimitiveValue::operator EVerticalAlign):
(WebCore::CSSPrimitiveValue::operator EVisibility):
(WebCore::CSSPrimitiveValue::operator EWhiteSpace):
(WebCore::CSSPrimitiveValue::operator EWordBreak):
(WebCore::CSSPrimitiveValue::operator EOverflowWrap):
(WebCore::CSSPrimitiveValue::operator TextDirection):
(WebCore::CSSPrimitiveValue::operator WritingMode):
(WebCore::CSSPrimitiveValue::operator TextCombine):
(WebCore::CSSPrimitiveValue::operator RubyPosition):
(WebCore::CSSPrimitiveValue::operator TextEmphasisPosition):
(WebCore::CSSPrimitiveValue::operator TextOverflow):
(WebCore::CSSPrimitiveValue::operator TextEmphasisFill):
(WebCore::CSSPrimitiveValue::operator TextEmphasisMark):
(WebCore::CSSPrimitiveValue::operator TextOrientation):
(WebCore::CSSPrimitiveValue::operator EPointerEvents):
(WebCore::CSSPrimitiveValue::operator FontDescription::Kerning):
(WebCore::CSSPrimitiveValue::operator FontSmoothingMode):
(WebCore::CSSPrimitiveValue::operator FontWeight):
(WebCore::CSSPrimitiveValue::operator FontItalic):
(WebCore::CSSPrimitiveValue::operator FontSmallCaps):
(WebCore::CSSPrimitiveValue::operator TextRenderingMode):
(WebCore::CSSPrimitiveValue::operator ColorSpace):
(WebCore::CSSPrimitiveValue::operator Hyphens):
(WebCore::CSSPrimitiveValue::operator LineSnap):
(WebCore::CSSPrimitiveValue::operator LineAlign):
(WebCore::CSSPrimitiveValue::operator Order):
(WebCore::CSSPrimitiveValue::operator ESpeak):
(WebCore::CSSPrimitiveValue::operator BlendMode):
(WebCore::CSSPrimitiveValue::operator LineCap):
(WebCore::CSSPrimitiveValue::operator LineJoin):
(WebCore::CSSPrimitiveValue::operator WindRule):
(WebCore::CSSPrimitiveValue::operator EAlignmentBaseline):
(WebCore::CSSPrimitiveValue::operator EBorderCollapse):
(WebCore::CSSPrimitiveValue::operator EBorderFit):
(WebCore::CSSPrimitiveValue::operator EImageRendering):
(WebCore::CSSPrimitiveValue::operator ETransformStyle3D):
(WebCore::CSSPrimitiveValue::operator ColumnAxis):
(WebCore::CSSPrimitiveValue::operator ColumnProgression):
(WebCore::CSSPrimitiveValue::operator WrapFlow):
(WebCore::CSSPrimitiveValue::operator WrapThrough):
(WebCore::CSSPrimitiveValue::operator GridAutoFlow):
(WebCore::CSSPrimitiveValue::operator EBufferedRendering):
(WebCore::CSSPrimitiveValue::operator EColorInterpolation):
(WebCore::CSSPrimitiveValue::operator EColorRendering):
(WebCore::CSSPrimitiveValue::operator EDominantBaseline):
(WebCore::CSSPrimitiveValue::operator EShapeRendering):
(WebCore::CSSPrimitiveValue::operator ETextAnchor):
(WebCore::CSSPrimitiveValue::operator SVGWritingMode):
(WebCore::CSSPrimitiveValue::operator EVectorEffect):
(WebCore::CSSPrimitiveValue::operator EMaskType):
Assert that the CSSPrimitiveValue is holding a CSSValueID before accessing it.
2013-07-26 Sam Weinig <sam@webkit.org>
Stop pretending to support <string> for text-align.
https://bugs.webkit.org/show_bug.cgi?id=119107
Reviewed by Andreas Kling.
Test: fast/css/text-align-string-crash.html
* css/CSSParser.cpp:
(WebCore::CSSParser::parseValue):
Stop pretending to support <string> for text-align.
* css/DeprecatedStyleBuilder.cpp:
(WebCore::ApplyPropertyTextAlign::applyValue):
ASSERT that only value IDs get passed.
2013-07-26 Gyuyoung Kim <gyuyoung.kim@samsung.com>
Introduce toSVGRectElement(), use it
https://bugs.webkit.org/show_bug.cgi?id=119126
Reviewed by Andreas Kling.
As a step to change static_cast with toSVGXXX, static_cast<SVGRectElement*> can
be changed with toSVGRectElement().
No new tests, no behavior change.
* rendering/svg/RenderSVGRect.cpp:
(WebCore::RenderSVGRect::updateShapeFromElement):
* rendering/svg/SVGPathData.cpp:
(WebCore::updatePathFromRectElement):
* rendering/svg/SVGRenderTreeAsText.cpp:
(WebCore::operator<<):
* svg/SVGRectElement.h:
(WebCore::toSVGRectElement):
2013-07-26 Yongjun Zhang <yongjun_zhang@apple.com>
With frame flattening on, too many resize events fired if document is resized in onresize handler.
https://bugs.webkit.org/show_bug.cgi?id=119075
Reviewed by Simon Fraser.
With http://trac.webkit.org/changeset/149287, WebCore also sends resize event in FrameView::setFrameRect. When
flattening an iframe, setFrameRect could be called multiple times from RenderFrameBase::layoutWithFlattening and
we could get multiple resize events. This patch adds a flag in FrameView to disallow sending resize events if
we are inside layoutWithFlattening. The resize event will be sent in performPostLayoutTasks after the iframe
is done laying out.
Manually tested by verifying the rendering slowness in www.hi-pda.com is fixed when frame flattening is enabled.
* page/FrameView.cpp:
(WebCore::FrameView::FrameView):
(WebCore::FrameView::setFrameRect):
* page/FrameView.h:
(WebCore::FrameView::setResizeEventAllowed):
(WebCore::FrameView::resizeEventAllowed):
* rendering/RenderFrameBase.cpp:
(WebCore::RenderFrameBase::layoutWithFlattening):
2013-07-26 Dean Jackson <dino@apple.com>
Allow new transitions to run even when controller is suspended
https://bugs.webkit.org/show_bug.cgi?id=119171
<rdar://problem/14511404>
Reviewed by Simon Fraser.
Expose a new property on AnimationController that allows newly created
animations to run even if the controller says it is suspended. See WebKit
ChangeLog for more details.
Test: transitions/created-while-suspended.html
* WebCore.exp.in: Export the new methods so WebView can use them.
* page/animation/AnimationController.cpp:
(WebCore::AnimationControllerPrivate::AnimationControllerPrivate): Initialize new flag to false.
(WebCore::AnimationControllerPrivate::startAnimationsIfNotSuspended): Check new flag is not true.
(WebCore::AnimationControllerPrivate::setAllowsNewAnimationsWhileSuspended): Expose setter.
(WebCore::AnimationController::allowsNewAnimationsWhileSuspended): "Public" getter.
(WebCore::AnimationController::setAllowsNewAnimationsWhileSuspended): "Public" setter.
* page/animation/AnimationController.h:
* page/animation/AnimationControllerPrivate.h:
(WebCore::AnimationControllerPrivate::allowsNewAnimationsWhileSuspended):
* page/animation/CompositeAnimation.cpp:
(WebCore::CompositeAnimation::CompositeAnimation): Only suspend if new flag is false. Everything else
relies on the m_suspended flag, so the real code change is this one line.
2013-07-26 Brent Fulgham <bfulgham@apple.com>
[Windows] Unreviewed build fix.
* platform/graphics/avfoundation/cf/MediaPlayerPrivateAVFoundationCF.cpp:
(WebCore::createMetadataKeyNames): Do not include Media Selection
synbols when building without Media Selection API.
2013-07-26 Oliver Hunt <oliver@apple.com>
REGRESSION(FTL?): Crashes in plugin tests
https://bugs.webkit.org/show_bug.cgi?id=119141
Reviewed by Michael Saboff.
Getting the correct semantics to appease the inspector is fairly
awful with the iterator system. For the time being lets just revert
to requesting a full stack trace as we did in the past.
* bindings/js/ScriptCallStackFactory.cpp:
(WebCore::createScriptCallStack):
2013-07-26 Brent Fulgham <bfulgham@apple.com>
[Windows] Unreviewed build fix.
Correct build when targeting a release that does not have the AVCF
Legible Output infrastructure.
* platform/graphics/avfoundation/cf/AVFoundationCFSoftLinking.h: Exclude
a soft-link target when the API doesn't exist.
* platform/graphics/avfoundation/cf/MediaPlayerPrivateAVFoundationCF.cpp:
Correct include options for non-Legible Output supporting environments.
(WebCore::MediaPlayerPrivateAVFoundationCF::processLegacyClosedCaptionsTracks):
Prevent build failure when building with legacy caption support.
2013-07-26 Andreas Kling <akling@apple.com>
Apply FINAL to the RenderObject hierarchy.
<http://webkit.org/b/115977>
Mostly from Blink r148795 by <cevans@chromium.org>
<http://src.chromium.org/viewvc/blink?view=revision&revision=148795>
* rendering/: Beat things with the FINAL stick.
* WebCore.exp.in: Export a now-needed symbol.
2013-07-26 Tim Horton <timothy_horton@apple.com>
Add a mode where autosizing fixes the FrameView height to at least the WKView height
https://bugs.webkit.org/show_bug.cgi?id=119104
<rdar://problem/14549021>
Reviewed by Anders Carlsson.
* WebCore.exp.in: Export FrameView::setAutoSizeFixedMinimumHeight.
* page/FrameView.cpp:
(WebCore::FrameView::FrameView):
Initialize m_autoSizeFixedMinimumHeight to 0.
(WebCore::FrameView::autoSizeIfEnabled):
Increase the FrameView height to m_autoSizeFixedMinimumHeight if necessary,
and do another layout. Store the computed intrinsic content size.
(WebCore::FrameView::setAutoSizeFixedMinimumHeight): Added.
* page/FrameView.h:
(WebCore::FrameView::autoSizingIntrinsicContentSize): Added.
2013-07-26 Brent Fulgham <bfulgham@apple.com>
[Windows] Remove workarounds now that rdar://problem/14390466 is fixed.
https://bugs.webkit.org/show_bug.cgi?id=119150
Reviewed by Anders Carlsson.
* platform/graphics/avfoundation/cf/MediaPlayerPrivateAVFoundationCF.cpp:
(WebCore::AVFWrapper::createPlayer): Remove workaround to add legible output
after player is created.
(WebCore::AVFWrapper::createPlayerItem): Remove workaround to delay adding
legible output until player is created.
(WebCore::AVFWrapper::platformLayer): Get rid of unused temporary.
2013-07-26 Brent Fulgham <bfulgham@apple.com>
[Windows] Unreviewed gardening.
* WebCore.vcxproj/WebCore.vcxproj: Add missing header file to ease code viewing.
* WebCore.vcxproj/WebCore.vcxproj.filters: Ditto.
2013-07-26 Arvid Nilsson <anilsson@rim.com>
[BlackBerry] LayerTiler fails to render layer after waking up
https://bugs.webkit.org/show_bug.cgi?id=119146
Reviewed by George Staikos.
When the application is backgrounded, all tiles are freed up to
release memory back to the system. We also mark the contents as dirty
in LayerTiler::deleteTextures() so tiles will be repopulated when
waking up again.
The problem was caused by an optimization to avoid re-rendering tiles
repeatedly until the UI thread catches up with the fact that we have
indeed rendered those tiles (which will happen when the UI thread next
composites a frame).
When contents are dirty, we're not supposed to perform this
optimization (i.e. we're not supposed to skip rendering) because the
appearance of the layer has changed, so we do need to render those
tiles. Unfortunately, the code that was supposed to forget the list of
tiles rendered was in a conditional, "if (frontVisibility)", which
happened to be false sometimes when the app woke up again. So we ended
up perpetually skipping those render jobs, and the UI thread kept
yelling at us to render them.
Fixed by unconditionally dropping the list of tiles rendered when
contents are dirty.
This can't be detected without pixel tests, which BB DRT currently
doesn't support.
JIRA 452460
* platform/graphics/blackberry/LayerTiler.cpp:
(WebCore::LayerVisibility::clearTilesRendered):
(WebCore::LayerTiler::updateTextureContentsIfNeeded):
2013-07-25 Ryosuke Niwa <rniwa@webkit.org>
Remove unused HTMLTextFormControlElement::textRendererAfterUpdateLayout
https://bugs.webkit.org/show_bug.cgi?id=119121
Reviewed by Andreas Kling.
Merge https://chromium.googlesource.com/chromium/blink/+/3255ce725711707fe1fd18be91a6d06789517220.
* html/HTMLTextFormControlElement.cpp:
* html/HTMLTextFormControlElement.h:
2013-07-25 Ryosuke Niwa <rniwa@webkit.org>
Fix document leak when selection is created inside the document
https://bugs.webkit.org/show_bug.cgi?id=119122
Reviewed by Andreas Kling.
Merge https://chromium.googlesource.com/chromium/blink/+/b908cb4c8da93316d787de31c93f2a43de332a10
The bug was caused by FrameSelection::m_previousCaretNode holding onto a Node, leaking its document.
Fixed the bug by explicitly clearing it in FrameSelection::prepareForDestruction.
Test: editing/selection/leak-document-with-selection-inside.html
* editing/FrameSelection.cpp:
(WebCore::FrameSelection::prepareForDestruction):
2013-07-25 Andreas Kling <akling@apple.com>
ChromeClient::focusedNodeChanged() should be focusedElementChanged().
<http://webkit.org/b/119110>
Reviewed by Anders Carlsson.
Because only Elements can be focused.
* dom/Document.cpp:
(WebCore::Document::setFocusedElement):
* loader/EmptyClients.h:
(WebCore::EmptyChromeClient::focusedElementChanged):
* page/Chrome.cpp:
(WebCore::Chrome::focusedElementChanged):
* page/Chrome.h:
* page/ChromeClient.h:
2013-07-25 Kwang Yul Seo <skyul@company100.net>
[WK2][Soup] Add private browsing support
https://bugs.webkit.org/show_bug.cgi?id=118657
Reviewed by Gustavo Noronha Silva.
Support private browsing by adding a method to create a private
browsing soup session. This private browsing session uses a
non-persistent cookie jar and does not use the disk cache feature.
No new tests. Covered by existing private browsing tests.
* platform/network/NetworkStorageSession.h:
(WebCore::NetworkStorageSession::isPrivateBrowsingSession):
Add USE(SOUP) guard to isPrivateBrowsingSession() and m_isPrivate.
* platform/network/ResourceHandle.h:
Add a factory method to create a private browsing session for soup.
* platform/network/soup/CookieJarSoup.cpp:
(WebCore::createPrivateBrowsingCookieJar):
* platform/network/soup/CookieJarSoup.h:
Add a method to create a non-persistent cookie jar for private browsing.
* platform/network/soup/NetworkStorageSessionSoup.cpp:
(WebCore::NetworkStorageSession::NetworkStorageSession):
Initialize m_isPrivate to false.
(WebCore::NetworkStorageSession::createPrivateBrowsingSession):
Implement the method by invoking ResourceHandle::createPrivateBrowsingSession.
* platform/network/soup/ResourceHandleSoup.cpp:
(WebCore::createSoupSession):
Extract common soup session creation code so that both defaultSession
and createPrivateBrowsingSession can use this function to create a soup
session.
(WebCore::ResourceHandle::defaultSession):
Change to use createSoupSession.
(WebCore::ResourceHandle::createPrivateBrowsingSession):
Create a session which uses a non-persistent cookie jar.
2013-07-25 Tim Horton <timothy_horton@apple.com>
Null check m_frame in maximum and minimumScrollPosition
https://bugs.webkit.org/show_bug.cgi?id=119109
<rdar://problem/14545393>
Reviewed by Darin Adler.
* page/FrameView.cpp:
(WebCore::FrameView::minimumScrollPosition):
(WebCore::FrameView::maximumScrollPosition):
Null-check m_frame (and move the early-return after the clamp-to-0
as the revert in r152911 should have).
2013-07-25 Anders Carlsson <andersca@apple.com>
Localizable.strings generated by extract-localizable-strings should be UTF-8
https://bugs.webkit.org/show_bug.cgi?id=119106
Reviewed by Mark Rowe.
* English.lproj/Localizable.strings:
Re-encode this as UTF-8 and remove the BOM.
* WebCore.xcodeproj/project.pbxproj:
Set the file encoding of Localizable.strings to UTF-8.
2013-07-25 Ryosuke Niwa <rniwa@webkit.org>
Don't force layout when querying a fixed or non-box margin/padding property
https://bugs.webkit.org/show_bug.cgi?id=118032
Reviewed by David Hyatt.
Merge https://chromium.googlesource.com/chromium/blink/+/66427d0825fcc2975bd50220cdcaa2504d6f36e5.
This patch avoids layout in ComputedStyleExtractor::propertyValue for margin and padding properties
when they are of fixed length. According to the Blink patch's author, this improves the page load
time of economist.com by 27%.
The actual code change is significantly different from the original Blink patch since we've done
some refactorins in r152938 and r153067 to make this change more self-contained.
Test: fast/css/computed-width-without-renderer.html
* css/CSSComputedStyleDeclaration.cpp:
(WebCore::zoomAdjustedPaddingOrMarginPixelValue):
(WebCore::paddingOrMarginIsRendererDependent):
(WebCore::isLayoutDependent):
(WebCore::ComputedStyleExtractor::propertyValue):
2013-07-25 Sam Weinig <sam@webkit.org>
-[WebHTMLView attributedSubstringForProposedRange:actualRange:] does not include strikethrough attribute in the returned attributed string
https://bugs.webkit.org/show_bug.cgi?id=119099
<rdar://problem/13439291>
Reviewed by Enrica Casucci.
Tests:
API Test: AttributedStringTest_Strikethrough
* platform/mac/HTMLConverter.mm:
(+[WebHTMLConverter editingAttributedStringFromRange:]):
Set the NSStrikethroughStyleAttributeName attribute when text-decoration: line-through is seen.
2013-07-25 Pratik Solanki <psolanki@apple.com>
Unreviewed build fix after r153333.
* platform/network/cf/ResourceResponseCFNet.cpp: Remove toTimeT since it is no longer called.
2013-07-25 Christophe Dumez <ch.dumez@sisa.samsung.com>
Unreviewed EFL build fix after r153315.
Fix build error after we started compiling with c++0x support
in r153315.
* platform/efl/RenderThemeEfl.cpp:
(WebCore::toEdjeGroup):
2013-07-25 Anders Carlsson <andersca@apple.com>
Remove lastModifiedDate from ResourceResponse
https://bugs.webkit.org/show_bug.cgi?id=119092
Reviewed by Andreas Kling.
Computing m_lastResponseDate is costly on some platforms and we already have a better way to
get the last response time, so convert the two call sites that used to call ResourceresponseBase::lastModifiedDate()
over to using lastModified() instead.
* platform/network/ResourceResponseBase.cpp:
(WebCore::ResourceResponseBase::ResourceResponseBase):
(WebCore::ResourceResponseBase::adopt):
(WebCore::ResourceResponseBase::copyData):
* platform/network/ResourceResponseBase.h:
* platform/network/cf/ResourceResponseCFNet.cpp:
(WebCore::ResourceResponse::platformLazyInit):
* plugins/PluginStream.cpp:
(WebCore::lastModifiedDate):
(WebCore::PluginStream::startStream):
2013-07-25 Yi Shen <max.hong.shen@gmail.com>
Optimize the thread locks for API Shims
https://bugs.webkit.org/show_bug.cgi?id=118573
Reviewed by Geoffrey Garen.
Remove the thread lock from API Shims if the VM has an exclusive thread (e.g. the VM
only used by WebCore's main thread).
No new tests required since no functionality changed.
* bindings/js/JSDOMWindowBase.cpp:
(WebCore::JSDOMWindowBase::commonVM):
2013-07-25 Bear Travis <betravis@adobe.com>
[CSS Shapes] Shape methods and member variables should be guarded with the CSS_SHAPES flag
https://bugs.webkit.org/show_bug.cgi?id=117277
Reviewed by Alexandru Chiculita.
This patch adds some compile guards that were missing from the RenderStyle and
StyleRareNonInheritedData files. When the compile guard caused parameters to
not be used, the parameters were marked using UNUSED_PARAM.
* css/CSSPropertyNames.in: Inserting a line to trigger build.
* rendering/RenderBlock.cpp:
(WebCore::shapeInfoRequiresRelayout):
(WebCore::RenderBlock::updateRegionsAndShapesBeforeChildLayout):
(WebCore::RenderBlock::logicalRightFloatOffsetForLine):
* rendering/RenderBox.cpp:
(WebCore::isCandidateForOpaquenessTest):
* rendering/RenderBox.h:
* rendering/RenderObject.h:
* rendering/style/RenderStyle.cpp:
(WebCore::RenderStyle::changeRequiresLayout):
(WebCore::RenderStyle::changeRequiresRepaint):
* rendering/style/RenderStyle.h:
* rendering/style/StyleRareNonInheritedData.cpp:
(WebCore::StyleRareNonInheritedData::StyleRareNonInheritedData):
(WebCore::StyleRareNonInheritedData::operator==):
* rendering/style/StyleRareNonInheritedData.h:
2013-07-24 Gyuyoung Kim <gyuyoung.kim@samsung.com>
Introduce toSVGPatternElement(), use it
https://bugs.webkit.org/show_bug.cgi?id=119013
Reviewed by Andreas Kling.
As a step to change static_cast with toSVGXXX, static_cast<SVGPatternElement*> can
be changed with toSVGPatternElement().
Merge from https://src.chromium.org/viewvc/blink?view=rev&revision=154734
* rendering/svg/RenderSVGResourcePattern.cpp:
(WebCore::RenderSVGResourcePattern::buildPattern):
* rendering/svg/SVGRenderTreeAsText.cpp:
(WebCore::writeSVGResourceContainer):
* rendering/svg/SVGResources.cpp:
(WebCore::targetReferenceFromResource):
* svg/SVGPatternElement.h:
(WebCore::toSVGPatternElement):
2013-06-21 Mark Lam <mark.lam@apple.com>
Fixed broken build: updated to match SmallStrings changes in r151864.
Not reviewed.
No new tests.
* bindings/js/JSDOMBinding.h:
(WebCore::jsStringWithCache):
2013-06-15 Filip Pizlo <fpizlo@apple.com>
Concurrent JIT shouldn't try to recompute the CodeBlockHash as part of debug dumps, since doing so may fail if dealing with a CachedScript that doesn't have its script string handy
https://bugs.webkit.org/show_bug.cgi?id=117676
Reviewed by Sam Weinig.
Remove the broken hack for the concurrent JIT, since now the concurrent JIT won't use this code anymore.
No new tests because no new behavior.
* loader/cache/CachedScript.cpp:
(WebCore::CachedScript::script):
2013-06-10 Mark Lam <mark.lam@apple.com>
Introducing the StackIterator class.
https://bugs.webkit.org/show_bug.cgi?id=117390.
Reviewed by Geoffrey Garen.
No new tests.
* ForwardingHeaders/interpreter/StackIterator.h: Added.
* bindings/js/JSXMLHttpRequestCustom.cpp:
(WebCore::JSXMLHttpRequest::send):
* bindings/js/ScriptCallStackFactory.cpp:
(WebCore::createScriptCallStack):
2013-06-09 Filip Pizlo <fpizlo@apple.com>
Unreviewed, fix build. Use at() instead of operator[] because of ambiguity on some compilers.
* page/CaptionUserPreferencesMac.mm:
(WebCore::languageIdentifier):
2013-05-27 Filip Pizlo <fpizlo@apple.com>
testRunner should be able to tell you if a function is DFG compiled
https://bugs.webkit.org/show_bug.cgi?id=116847
Reviewed by Mark Hahnenberg.
Bail early if we're in the compilation thread. This is only relevant for
debug dumps.
No new tests becase no new behavior.
* loader/cache/CachedScript.cpp:
(WebCore::CachedScript::script):
2013-05-25 Mark Lam <mark.lam@apple.com>
Remove Interpreter::retrieveLastCaller().
https://bugs.webkit.org/show_bug.cgi?id=116753.
Reviewed by Geoffrey Garen.
This is part of the refactoring effort to get rid of functions walking
the JS stack in their own way.
No new tests.
* bindings/js/JSXMLHttpRequestCustom.cpp:
(WebCore::JSXMLHttpRequest::send):
* bindings/js/ScriptCallStackFactory.cpp:
(WebCore::createScriptCallStack):
2013-05-05 Geoffrey Garen <ggaren@apple.com>
Rolled back in r149527 with crash fixed.
Reviewed by Oliver Hunt.
Rationalized 'this' value conversion
https://bugs.webkit.org/show_bug.cgi?id=115542
2013-04-29 Filip Pizlo <fpizlo@apple.com>
fourthTier: String::utf8() should also be available as StringImpl::utf8() so that you don't have to ref() a StringImpl just to get its utf8()
https://bugs.webkit.org/show_bug.cgi?id=115393
Reviewed by Geoffrey Garen.
No new tests because no new behavior.
* Modules/websockets/WebSocket.cpp:
(WebCore::WebSocket::close):
* Modules/websockets/WebSocketChannel.cpp:
(WebCore::WebSocketChannel::send):
* html/MediaFragmentURIParser.cpp:
(WebCore::MediaFragmentURIParser::parseFragments):
2013-07-24 Simon Fraser <simon.fraser@apple.com>
[iOS] Captions are clipped in documents using pagination
https://bugs.webkit.org/show_bug.cgi?id=119072
Reviewed by Beth Dakin.
MediaControlTextTrackContainerElement::createTextTrackRepresentationImage() is called
to paint captions into a layer used for fullscreen video. It did the painting using
a subtree paint, but starting at the root RenderView's layer. This is problematic,
because the caption painting is subject to clipping for columns, and any enclosing
overflow:hidden container.
Fix this by starting the paint at the MediaControlTextTrackContainerElement's
renderer's layer. By doing this we don't have to worry about an offset, so no
translation is required.
Also make sure we update layer before grabbing the renderer (in case layout
destroys it).
* html/shadow/MediaControlElements.cpp:
(WebCore::MediaControlTextTrackContainerElement::createTextTrackRepresentationImage):
2013-07-24 Simon Fraser <simon.fraser@apple.com>
REGRESSION (r152335): Mac Pro title occluded in MobileSafari; can't scroll page
https://bugs.webkit.org/show_bug.cgi?id=119066
<rdar://problem/14499184>
Reviewed by Daniel Bates.
Following <http://trac.webkit.org/changeset/152335> (bug #118337) we set
the z-index to 0 on every element with CSS "overflow: scroll" and
"-webkit-overflow-scrolling: touch" regardless of whether the element has
non-auto z-index. Instead we should only set the z-index to 0 for such elements
that have an auto z-index.
* css/StyleResolver.cpp:
(WebCore::StyleResolver::adjustRenderStyle):
2013-07-24 Ryosuke Niwa <rniwa@webkit.org>
Use-after-free in ApplyStyleCommand::removeInlineStyle
https://bugs.webkit.org/show_bug.cgi?id=118627
Reviewed by Oliver Hunt.
Merge https://chromium.googlesource.com/chromium/blink/+/b6471d077e012b05ccba14d0ce8e6d616106c8e6
Unfortunately, there is no test case for this bug.
* editing/ApplyStyleCommand.cpp:
(WebCore::ApplyStyleCommand::removeInlineStyle):
2013-07-24 Zan Dobersek <zdobersek@igalia.com>
Remove CheckedInt, use Checked<T, RecordOverflow> instead
https://bugs.webkit.org/show_bug.cgi?id=119022
Reviewed by Oliver Hunt.
Following the cleanup in r153062, the CheckedInt uses are replaced with
using the Checked<T, RecordOverflow> class. The CheckedInt header is not
used anywhere anymore and is thus removed.
* GNUmakefile.list.am:
* WebCore.xcodeproj/project.pbxproj:
* html/canvas/CheckedInt.h: Removed.
* html/canvas/DataView.cpp:
(WebCore::DataView::create):
* html/canvas/WebGLBuffer.cpp:
(WebCore::WebGLBuffer::associateBufferSubDataImpl):
* html/canvas/WebGLRenderingContext.cpp:
(WebCore::WebGLRenderingContext::drawArrays):
2013-07-24 Andreas Kling <akling@apple.com>
RenderMenuList computes the width of its longest option twice.
<http://webkit.org/b/119046>
<rdar://problem/14534679>
Reviewed by Darin Adler.
Rename the RenderMenuList::m_optionsChanged flag to m_needsOptionsWidthUpdate,
and make sure it gets cleared after we do a width computation in response to font changes.
* rendering/RenderMenuList.cpp:
(WebCore::RenderMenuList::styleDidChange):
2013-07-24 Zan Dobersek <zdobersek@igalia.com>
Make KURL::hasPath private
https://bugs.webkit.org/show_bug.cgi?id=118279
Reviewed by Darin Adler.
* platform/KURL.h: The KURL::hasPath method is not used outside of the KURL class, so it is made private.
2013-07-24 Jessie Berlin <jberlin@apple.com>
Remove WKPageGetPlugInInformation - it is not used anymore
https://bugs.webkit.org/show_bug.cgi?id=119047
Rubber-stamped by Alexey Proskuryakov.
Revert r152328, which added a key used only in the callback info for
WKPageGetPlugInInformation.
* WebCore.exp.in:
2013-07-24 Robert Hogan <robert@webkit.org>
Border drawing incorrect when using both border-collapse: collapse and overflow: hidden on a table
https://bugs.webkit.org/show_bug.cgi?id=18305
Reviewed by David Hyatt.
overflowClipRect() clips out the table's half of a collapsed border when there is an overflow clip
on the table. This prevents the table's half of the border ever getting painted.
To fix this, clip to the border box of tables when we're in the paint phase that gets the sections to draw the collapsed borders
or when we're self painting. This will allow the table's half of the border to get painted. In the case where the table is self
painting we ensure that content gets clipped to cell's side of the collapsed border by ensuring the clip passed to child layers
from the table clips to the inside of the collapsed border.
It's worth noting that a table's collapsed borders are painted by the table's layer using functions in
RenderTableSection and RenderTableCell. So if a table section has a self-painting layer this patch still works, because
the borders aren't painted by the section's layer.
Tests: fast/table/overflow-table-collapsed-borders-cell-painting-table-self-painting-layer.html
fast/table/overflow-table-collapsed-borders-cell-painting.html
fast/table/overflow-table-collapsed-borders-section-layer-painting.html
fast/table/overflow-table-collapsed-borders-section-layer-table-self-painting-layer.html
fast/table/overflow-table-collapsed-borders-section-self-painting-layer-painting.html
fast/table/overflow-table-collapsed-borders-section-self-painting-layer-table-self-painting-layer.html
fast/table/table-overflow.html
* rendering/RenderBox.cpp:
(WebCore::RenderBox::pushContentsClip):
(WebCore::RenderBox::overflowClipRect):
* rendering/RenderBox.h:
(WebCore::RenderBox::overflowClipRectForChildLayers):
* rendering/RenderLayer.cpp:
(WebCore::RenderLayer::calculateClipRects):
* rendering/RenderTable.cpp:
(WebCore::RenderTable::overflowClipRect):
* rendering/RenderTable.h:
(WebCore::RenderTable::overflowClipRectForChildLayers):
2013-07-24 Frédéric Wang <fred.wang@free.fr>
Graphical elements inside mphantom should not be visible.
https://bugs.webkit.org/show_bug.cgi?id=116600.
Reviewed by Chris Fleizach.
Test: mathml/presentation/phantom.html
* rendering/mathml/RenderMathMLFraction.cpp:
(WebCore::RenderMathMLFraction::paint): don't paint the fraction bar when the visibility is not "visible"
* rendering/mathml/RenderMathMLRoot.cpp:
(WebCore::RenderMathMLRoot::paint): don't paint the radical symbol when the visibility is not "visible"
2013-07-24 Brendan Long <b.long@cablelabs.com>
WebVTTParser's identifier buffering can ignore subsequent lines
https://bugs.webkit.org/show_bug.cgi?id=118483
Reviewed by Eric Carlson.
No new tests since this bug can't be reproduced in layout tests.
* html/track/WebVTTParser.cpp:
(WebCore::WebVTTParser::parseBytes): Only buffer the identifier if we haven't read an entire line.
2013-07-23 Andreas Kling <akling@apple.com>
REGRESSION(r150867): FrameView auto-sizing + delegate denied image load may cause StyleResolver to re-enter itself.
<rdar://problem/14324895>
<http://webkit.org/b/119023>
Reviewed by Simon Fraser.
The bug happened when FrameView::autoSizeIfEnabled() was getting called below FrameLoader::checkCompleted()
triggered by an incorrect loadDone() callback originating in SubresourceLoader::didCancel().
* css/StyleResolver.cpp:
(WebCore::StyleResolver::loadPendingResources):
Add an assertion that this function is not getting re-entered. If a similar bug occurs
in the future, this will help the lucky person debugging.
* loader/SubresourceLoader.cpp:
(WebCore::SubresourceLoader::didCancel):
Don't notifyDone() if the SubresourceLoader is in Uninitialized state.
2013-07-23 Tim Horton <timothy_horton@apple.com>
Pixel-snap the unavailable plugin indicator arrow for maximum sharpness
https://bugs.webkit.org/show_bug.cgi?id=119024
<rdar://problem/14523331>
Reviewed by Anders Carlsson.
* rendering/RenderEmbeddedObject.cpp:
(WebCore::addReplacementArrowPath):
(WebCore::RenderEmbeddedObject::getReplacementTextGeometry):
Pixel-snap the unavailable plugin indicator arrow. Snapping directions
were chosen by eye/symmetry to look best on 1x and 2x devices at
1x and 2x page scale.
2013-07-19 Ryosuke Niwa <rniwa@webkit.org>
The computed values of fix length padding should be subpixel precision like margin
https://bugs.webkit.org/show_bug.cgi?id=118936
Reviewed by Simon Fraser.
The bug was caused by ComputedStyleExtractor::propertyValue always returning the used value
for padding. Fixed the bug by returning the computed value when they're of fixed length.
This aligns the behaviors of getComputedStyle(~).padding~ with getComputedStyle(~).margin~,
which had been fixed in r102149. While the current CSSOM specification says getComputedStyle
should return the used values for margins when display property is set to anything but none,
new behavior matches that of Chrome, Firefox, and Internet Explorer.
Also extracted zoomAdjustedPaddingOrMarginPixelValue to reduce the code duplication.
Test: fast/css/getComputedStyle/getComputedStyle-padding-margin-subpixel-length.html
* css/CSSComputedStyleDeclaration.cpp:
(WebCore::zoomAdjustedPaddingOrMarginPixelValue): Extracted.
(WebCore::ComputedStyleExtractor::propertyValue):
2013-07-23 Alex Christensen <achristensen@apple.com>
Updated ANGLE to latest git commit (047373aa3eb408be62be52ade840fa5f11e72337).
https://bugs.webkit.org/show_bug.cgi?id=118550
Reviewed by Dean Jackson.
* CMakeLists.txt: Renamed DetectRecursion to DetectCallDepth and added Uniform.cpp.
2013-07-23 Zan Dobersek <zdobersek@igalia.com>
Use Checked<uint32_t, RecordOverflow> instead of CheckedInt in GraphicsContext3D
https://bugs.webkit.org/show_bug.cgi?id=118988
Reviewed by Oliver Hunt.
Use the WTF's Checked class, with uint32_t as the numeric type and RecordOverflow as the overflow handler,
instead of the CheckedInt class. This removes a layering violation that's occurring due to including the CheckedInt
header that's currently located in the WebCore layer (alongside the HTML canvas code in Source/WebCore/html/canvas).
* platform/graphics/GraphicsContext3D.cpp:
(WebCore::GraphicsContext3D::computeImageSizeInBytes):
2013-07-23 Zalan Bujtas <zalan@apple.com>
REGRESSION(r152313): Links in certain twitter postings don't warp correctly on page
https://bugs.webkit.org/show_bug.cgi?id=118435
Reviewed by David Hyatt.
When we find an empty inline in the middle of the word, prefer breaking it before
instead of after to match other browsers' rendering.
Test: fast/text/whitespace/inline-whitespace-wrapping-12.html
* rendering/RenderBlockLineLayout.cpp:
(WebCore::canBreakAtThisPosition):
2013-07-23 Alexey Proskuryakov <ap@apple.com>
Dictionary hotkey does not work on vertical text
https://bugs.webkit.org/show_bug.cgi?id=118993
<rdar://problem/14478260>
Reviewed by Enrica Casucci.
Test: platform/mac/editing/input/firstrectforcharacterrange-vertical.html
* editing/Editor.cpp:
(WebCore::collapseCaretWidth): A helper function.
(WebCore::Editor::firstRectForRange): Many changes:
- use RenderObject::absoluteBoundingBoxRectForRange() in regular case, because
that's more direct that getting caret rects and computing bounding rect from those.
- handle collapsed ranges separately, because absoluteBoundingBoxRectForRange()
doesn't provide the needed result, and because it can be done faster.
- wherever we use carets to compute the result, account for vertical text (in a hackish
way, as we don't have layout information at Editor level).
* rendering/RenderBlock.cpp: (WebCore::RenderBlock::localCaretRect): Removed
dead code.
2013-07-23 Bem Jones-Bey <bjonesbe@adobe.com>
[CSS Shapes] New positioning model: Borders
https://bugs.webkit.org/show_bug.cgi?id=118822
Reviewed by Dean Jackson.
Converting to the shape coordinate system was not properly accounting
for borders and padding. This has been fixed and a new convienence
method added because of the added complexity of the conversion.
Test: csswg/submitted/shapes/shape-outside/shape-outside-floats-square-border-000.html
* rendering/RenderBlock.cpp:
(WebCore::RenderBlock::logicalLeftFloatOffsetForLine): Update to use
computeSegmentsForContainingBlockLine to do the coordinate
conversion.
(WebCore::RenderBlock::logicalRightFloatOffsetForLine): Ditto.
* rendering/RenderBlockLineLayout.cpp:
(WebCore::LineWidth::shrinkAvailableWidthForNewFloatIfNeeded): Ditto.
* rendering/shapes/ShapeOutsideInfo.cpp:
(WebCore::ShapeOutsideInfo::computeSegmentsForContainingBlockLine):
Add new method to do the coordinate conversion from the containing
block coordinate system to the coordinate system of the shape so
that the segments can be correctly calculated.
2013-07-23 Allan Sandfeld Jensen <allan.jensen@digia.com>
Remove deprecated and unused compositing settings
https://bugs.webkit.org/show_bug.cgi?id=119014
Reviewed by Andreas Kling.
* page/Settings.in:
2013-07-23 Tim Horton <timothy_horton@apple.com>
Add a test for plug-in unavailability indicator obscurity detection
https://bugs.webkit.org/show_bug.cgi?id=119007
Reviewed by Anders Carlsson.
Test: plugins/unavailable-plugin-indicator-obscurity.html
Expose the ability to test whether the unavailable plugin indicator
is obscured via the internals object.
* testing/Internals.cpp:
(WebCore::Internals::isPluginUnavailabilityIndicatorObscured):
* testing/Internals.h:
* testing/Internals.idl:
Expose RenderEmbeddedObject::isReplacementObscured as
internals.isPluginUnavailabilityIndicatorObscured for testing purposes.
2013-07-23 Zan Dobersek <zdobersek@igalia.com>
[Soup] Clean up header inclusions in ResourceRequest(Soup), SocketStreamHandle
https://bugs.webkit.org/show_bug.cgi?id=118984
Reviewed by Darin Adler.
Execute a minor cleanup of the header inclusions in Soup-specific ResourceRequestSoup.cpp, ResourceRequest.h
and SocketStreamHandle.h source files. The inclusions are sorted into proper order, with blank lines and unnecessary
reinclusions removed.
* platform/network/soup/ResourceRequest.h:
* platform/network/soup/ResourceRequestSoup.cpp:
* platform/network/soup/SocketStreamHandle.h:
2013-07-23 Zan Dobersek <zdobersek@igalia.com>
[Soup] Remove unnecessary header inclusions in ResourceHandleSoup.cpp
https://bugs.webkit.org/show_bug.cgi?id=118983
Reviewed by Martin Robinson.
Remove inclusions of the CachedResourceLoader, ChromeClient, Frame and Page headers. These are not
necessary (anymore) and only prevent the source file to be built independently of WebCore, as it should be.
* platform/network/soup/ResourceHandleSoup.cpp:
2013-07-23 Zan Dobersek <zdobersek@igalia.com>
Remove unnecessary header inclusions in GraphicsContext3D.cpp, GraphicsContext3DOpenGLCommon.cpp
https://bugs.webkit.org/show_bug.cgi?id=118989
Reviewed by Darin Adler.
* platform/graphics/GraphicsContext3D.cpp: Remove the unnecessary DrawingBuffer header inclusion.
* platform/graphics/opengl/GraphicsContext3DOpenGLCommon.cpp: Remove the unnecessary
CanvasRenderingContext and WebGLObject header inclusions.
2013-07-23 Zan Dobersek <zdobersek@igalia.com>
Remove the topDocumentURL member of the GraphicsContext3D::Attributes struct
https://bugs.webkit.org/show_bug.cgi?id=118987
Reviewed by Darin Adler.
Remove the topDocumentURL member that currently resides in the GraphicsContext3D::Attributes struct.
It's not used anywhere and only has one place where it is set, in WebGLRenderingContext::create.
* html/canvas/WebGLRenderingContext.cpp:
(WebCore::WebGLRenderingContext::create):
* platform/graphics/GraphicsContext3D.h:
2013-07-23 Zan Dobersek <zdobersek@igalia.com>
Remove unused DrawingBuffer::paintRenderingResultsToImageData
https://bugs.webkit.org/show_bug.cgi?id=118986
Reviewed by Darin Adler.
Remove the paintRenderingResultsToImageData method of the DrawingBuffer class. It is not used anywhere
and also introduces a nasty layering violation by including and operating with the ImageData class.
* platform/graphics/gpu/DrawingBuffer.cpp:
* platform/graphics/gpu/DrawingBuffer.h:
2013-07-23 Zan Dobersek <zdobersek@igalia.com>
Remove unnecessary includes in FormDataBuilder.cpp
https://bugs.webkit.org/show_bug.cgi?id=118991
Reviewed by Darin Adler.
* platform/network/FormDataBuilder.cpp: Remove the Frame and FrameLoader header inclusions,
nothing these two headers provide is used in this source file.
2013-07-23 Zan Dobersek <zdobersek@igalia.com>
Fix the style of the ContentDispositionType enum definition
https://bugs.webkit.org/show_bug.cgi?id=118990
Reviewed by Darin Adler.
* platform/network/HTTPParsers.h: Align the style of the ContentDispositionType enumeration
definition with the other enumeration definitions in the HTTPParsers header, using the
'enum Name { ... }' style instead of a typedef.
2013-07-23 Zan Dobersek <zdobersek@igalia.com>
[GTK] Mock GDK_IS_X11_DISPLAY macro can be redefined unnecessarily
https://bugs.webkit.org/show_bug.cgi?id=118980
Reviewed by Martin Robinson.
* platform/gtk/GtkVersioning.h: Only define the GDK_IS_X11_DISPLAY macro when using the GTK+ 2 API version
as that's the only supported configuration where the macro is not defined. Definining it only if it's not
yet defined at the time of inclusion of this header can cause redefinitions in GTK+ headers that are normally
included later.
2013-07-22 Beth Dakin <bdakin@apple.com>
StickyPositionConstraints should store the constrainingRectAtLastLayout
https://bugs.webkit.org/show_bug.cgi?id=118999
Reviewed by Simon Fraser.
Much like how FixedPositionConstraints store a viewportRectAtLastLayout,
StickyConstraints should store a constrainingRectAtLastLayout. We'll need this to
get sticky right in overflow areas once overflow areas scroll on the scrolling
thread.
* page/scrolling/ScrollingConstraints.h:
(WebCore::StickyPositionViewportConstraints::StickyPositionViewportConstraints):
(WebCore::StickyPositionViewportConstraints::constrainingRectAtLastLayout):
(WebCore::StickyPositionViewportConstraints::setConstrainingRectAtLastLayout):
* rendering/RenderBoxModelObject.cpp:
(WebCore::RenderBoxModelObject::computeStickyPositionConstraints):
2013-07-22 Santosh Mahto <santosh.ma@samsung.com>
DateInputType constructor initiate incorrect base class
https://bugs.webkit.org/show_bug.cgi?id=118962
Reviewed by Gyuyoung Kim.
No new test required since solving code error
* html/DateInputType.cpp:
(WebCore::DateInputType::DateInputType):
Corrected the base class instantiation in constructor.
2013-07-22 Tim Horton <timothy_horton@apple.com>
Plug-in unavailability indicator should not be displayed if a blocked plugin's indicator is clipped
https://bugs.webkit.org/show_bug.cgi?id=118998
<rdar://problem/14511268>
Reviewed by Anders Carlsson.
* html/HTMLEmbedElement.cpp:
(WebCore::HTMLEmbedElement::updateWidget):
* html/HTMLObjectElement.cpp:
(WebCore::HTMLObjectElement::updateWidget):
* html/HTMLPlugInElement.cpp:
(WebCore::HTMLPlugInElement::defaultEventHandler):
(WebCore::HTMLPlugInElement::supportsFocus):
* html/HTMLPlugInImageElement.cpp:
(WebCore::HTMLPlugInImageElement::updateWidgetIfNecessary):
* loader/SubframeLoader.cpp:
(WebCore::SubframeLoader::createJavaAppletWidget):
(WebCore::SubframeLoader::loadPlugin):
* page/FrameView.cpp:
(WebCore::FrameView::updateWidget):
Rename showsUnavailablePluginIndicator to isPluginUnavailable, since being unavailable
and actually showing the indicator are two totally different things.
* WebCore.exp.in: Expose setUnavailablePluginIndicatorIsHidden.
* rendering/RenderEmbeddedObject.cpp:
(WebCore::RenderEmbeddedObject::RenderEmbeddedObject):
Rename m_showsUnavailablePluginIndicator to m_isPluginUnavailable.
Add m_isUnavailablePluginIndicatorHidden, defaulting to false.
(WebCore::RenderEmbeddedObject::setPluginUnavailabilityReasonWithDescription):
Set m_isPluginUnavailable when we get an unavailability reason.
(WebCore::RenderEmbeddedObject::paint):
(WebCore::RenderEmbeddedObject::setUnavailablePluginIndicatorIsHidden): Added.
* rendering/RenderEmbeddedObject.h:
(WebCore::RenderEmbeddedObject::isPluginUnavailable): Added.
(WebCore::RenderEmbeddedObject::showsUnavailablePluginIndicator):
Repurpose "showsUnavailablePluginIndicator" to actually represent whether
the indicator is displayed (i.e. the plugin is unavailable, and the
indicator is not hidden).
2013-07-22 Tim Horton <timothy_horton@apple.com>
RenderEmbeddedObject::isReplacementObscured should include the arrow in its area-of-interest
https://bugs.webkit.org/show_bug.cgi?id=118995
<rdar://problem/14516421>
Reviewed by Anders Carlsson.
* rendering/RenderEmbeddedObject.cpp:
(WebCore::RenderEmbeddedObject::unavailablePluginIndicatorBounds):
Rename method from replacementTextRect to unavailablePluginIndicatorBounds for accuracy.
Use the bounding box of the indicator's path, which includes the rounded rect behind
the text as well as the arrow button.
(WebCore::RenderEmbeddedObject::isReplacementObscured):
* rendering/RenderEmbeddedObject.h:
2013-07-22 Tim Horton <timothy_horton@apple.com>
<applet> plugins are instantiated post-attach (instead of post-layout like for object and embed)
https://bugs.webkit.org/show_bug.cgi?id=118994
<rdar://problem/14511232>
Reviewed by Anders Carlsson.
Make <applet> consistent with <object> and <embed>, deferring plugin
instantiation to post-layout, so that layout is up-to-date if anything
needs it (like RenderEmbeddedObject::isReplacementObscured) during creation.
* html/HTMLAppletElement.cpp:
(WebCore::HTMLAppletElement::updateWidget):
Copy code from HTMLObjectElement/HTMLEmbedElement that defers plugin
creation until post-layout tasks. Java is always an NPAPI plugin, so
we should always defer if requested.
2013-07-22 Benjamin Poulain <benjamin@webkit.org>
Do not allocate 2 AtomicString just to do a comparison in HTMLAnchorElement::setRel()
https://bugs.webkit.org/show_bug.cgi?id=118941
Reviewed by Gavin Barraclough.
Currently, the only type of link relation supported by HTMLAnchorElement is RelationNoReferrer.
To find the value, we create a SpaceSplitString with the input value of the attribute (which
create one or more AtomicString depending on the input). Then we create a new AtomicString for
the literal "noreferrer". Finally, we compare the pointers and throw away all the AtomicStrings.
This causes a lot of memory operations for something really simple.
This patch adds a little helper method to SpaceSplitString to find a literal in the input. The only
allocation happens if we need to foldCase(). The following operations are done without allocating
new buffer and without hashing the input.
* dom/SpaceSplitString.cpp:
(WebCore::tokenizeSpaceSplitString):
(WebCore::AppendTokenToVectorTokenProcessor::AppendTokenToVectorTokenProcessor):
(WebCore::AppendTokenToVectorTokenProcessor::processToken):
(WebCore::SpaceSplitStringData::createVector):
(WebCore::TokenIsEqualToCStringTokenProcessor::TokenIsEqualToCStringTokenProcessor):
(WebCore::TokenIsEqualToCStringTokenProcessor::processToken):
(WebCore::TokenIsEqualToCStringTokenProcessor::referenceStringWasFound):
(WebCore::SpaceSplitString::spaceSplitStringContainsValue):
* dom/SpaceSplitString.h:
(WebCore::SpaceSplitString::spaceSplitStringContainsValue):
* html/HTMLAnchorElement.cpp:
(WebCore::HTMLAnchorElement::setRel):
2013-07-22 Zalan Bujtas <zalan@apple.com>
segfault in RenderLayerCompositor when the iframe's position attribute is changed and it embeds <object>.
https://bugs.webkit.org/show_bug.cgi?id=118965
Reviewed by Simon Fraser.
Do not change the composition state unless we can reliably figure out the iframe's size.
If the renderer is not yet attached, its size is not computable.
Test: compositing/iframes/iframe-position-absolute-with-padding-percentage-crash.html
* rendering/RenderLayerCompositor.cpp:
(WebCore::RenderLayerCompositor::requiresCompositingForFrame):
2013-07-22 Chris Fleizach <cfleizach@apple.com>
AX: VoiceOver only read the first column in a safari table
https://bugs.webkit.org/show_bug.cgi?id=118992
Reviewed by Tim Horton.
In case the first section has fewer columns than the rest of the table, the AXTable was only reporting the number of
columns for the first section. We need to take the max number of columns out of all sections.
Test: accessibility/table-with-mismatch-column-count-in-initial-section.html
* accessibility/AccessibilityTable.cpp:
(WebCore::AccessibilityTable::addChildren):
2013-07-22 Beth Dakin <bdakin@apple.com>
StickyPositionContraints should not need to change to account for a RenderLayer's
scrollOffset
https://bugs.webkit.org/show_bug.cgi?id=118958
-and corresponding-
<rdar://problem/12469203>
Reviewed by Simon Fraser.
Before this patch, to get sticky offsets right in overflow areas, the
StickyPositionConstraints changed on every scroll to factor it in. This will be a
problem once we can scroll overflow areas on the scrolling thread. The constraints
should never have to change to account for the scroll position. This patch fixes
that issue by changing the StickyPositionViewportConstraintss containerBlockRect
and stickyBoxRect to be in a coordinate space that is relative to the scrolling
ancestor rather than being absolute. This patch also removes absolute from those
variable names since they are no longer absolute.
A few re-names in the StickyPositionViewportConstraints class. The parameter to
computeStickyOffset() used to be called viewportRect, and is now called
constrainingRect. m_absoluteStickyBoxRect is now m_stickyBoxRect, and
m_absoluteContainingBlockRect is now m_containingBlockRect. And finally,
layerPositionForViewportRect() is now layerPositionForConstrainingRect()
* page/scrolling/ScrollingConstraints.cpp:
(WebCore::StickyPositionViewportConstraints::computeStickyOffset):
(WebCore::StickyPositionViewportConstraints::layerPositionForConstrainingRect):
* page/scrolling/ScrollingConstraints.h:
(WebCore::StickyPositionViewportConstraints::StickyPositionViewportConstraints):
(WebCore::StickyPositionViewportConstraints::containingBlockRect):
(WebCore::StickyPositionViewportConstraints::setContainingBlockRect):
(WebCore::StickyPositionViewportConstraints::stickyBoxRect):
(WebCore::StickyPositionViewportConstraints::setStickyBoxRect):
(WebCore::StickyPositionViewportConstraints::operator==):
Accounting for the re-names.
* page/scrolling/ScrollingStateStickyNode.cpp:
(WebCore::ScrollingStateStickyNode::syncLayerPositionForViewportRect):
(WebCore::ScrollingStateStickyNode::dumpProperties):
* page/scrolling/mac/ScrollingTreeStickyNode.mm:
(WebCore::ScrollingTreeStickyNode::parentScrollPositionDidChange):
Compute all values relative to the scrolling ancestor. This requires some juggling
in the overflow case to factor border and padding in or out.
* rendering/RenderBoxModelObject.cpp:
(WebCore::RenderBoxModelObject::computeStickyPositionConstraints):
This is where the scrollOffset should be factored in.
(WebCore::RenderBoxModelObject::stickyPositionOffset):
2013-07-22 Dean Jackson <dino@apple.com>
PlugIn content can disappear after restarting
https://bugs.webkit.org/show_bug.cgi?id=118982
Reviewed by Simon Fraser.
When a snapshotted plug-in is restarted, we inserted its compositing
layer back into the tree, but didn't recalculate style. This meant
that a subsequent compositing tree operation (such as any hardware
animation) could cause the content to disappear.
* html/HTMLPlugInImageElement.cpp:
(WebCore::HTMLPlugInImageElement::setDisplayState): Force a style recalc.
(WebCore::HTMLPlugInImageElement::removeSnapshotTimerFired): Ditto.
2013-07-22 Zalan Bujtas <zalan@apple.com>
REGRESSION(r152227) Images with compositing layer don't show up unless the containing window is resized.
https://bugs.webkit.org/show_bug.cgi?id=118951
Reviewed by Simon Fraser.
Ensure that the content rect is initialized when the image is set on the graphics layer.
RenderLayerBacking::updateGraphicsLayerGeometry() only updates the contents rect when
the associated graphics layer has a content layer. Since the image gets committed
on the graphics layer after the update calls, the contents rect is left uninitialized.
Test: compositing/images/positioned-image-content-rect.html
* rendering/RenderLayerBacking.cpp:
(WebCore::RenderLayerBacking::updateImageContents):
2013-07-22 Diego Pino Garcia <dpino@igalia.com>
[Old Web Inspector] When right-clicking on a DataGrid column, show editing menu option as "Edit <columnName>" instead of just "Edit"
https://bugs.webkit.org/show_bug.cgi?id=118971
Reviewed by Timothy Hatcher.
* English.lproj/localizedStrings.js:
* inspector/front-end/DataGrid.js: Change "Edit" for "Edit <columnTitle>"
(WebInspector.DataGrid.prototype._contextMenuInDataTable):
2013-07-22 Alex Christensen <achristensen@apple.com>
Added assembly files to Windows 64-bit builds.
https://bugs.webkit.org/show_bug.cgi?id=118931
Reviewed by Brent Fulgham.
* WebCore.vcxproj/WebCore.vcxproj: Added PaintHooks.asm for x64 and enabled MASM.
* WebCore.vcxproj/WebCore.vcxproj.filters: Added PaintHooks.asm.
2013-07-22 Jakob Petsovits <jpetsovits@blackberry.com>
[BlackBerry] Fix WebGL to a 2D canvas copies.
https://bugs.webkit.org/show_bug.cgi?id=118921
https://jira.bbqnx.net/browse/BRWSR-12714
JIRA 449577
Reviewed by George Staikos.
The transform here was converted incorrectly when it
replaced the pixel copy that was there before.
As a true draw transformation, it doesn't need the "- 1"
modification that pixel copies often require.
Fixes existing webgl/conformance/canvas tests.
* platform/graphics/blackberry/GraphicsContext3DBlackBerry.cpp:
(WebCore::GraphicsContext3D::paintToCanvas):
2013-07-22 peavo@outlook.com <peavo@outlook.com>
[Curl] Download fails for certain urls.
https://bugs.webkit.org/show_bug.cgi?id=118468
Reviewed by Brent Fulgham.
The current Curl download implementation has a few shortcomings:
1) Downloading from secure locations fails. We need to provide Curl with the path to a certificate file (.pem file).
2) Cookies are not set in the download request. We need to give Curl the path to the cookie file.
3) When a normal load is converted to a download, some of the headers from the original request is not sent (e.g. Referer, User agent).
* platform/network/curl/CurlDownload.cpp:
(WebCore::CurlDownload::CurlDownload): Initialize custom headers member.
(WebCore::CurlDownload::~CurlDownload): Free custom headers member.
(WebCore::CurlDownload::init): Set certificate and cookie file path.
(WebCore::CurlDownload::closeFile): Check file handle against value for invalid platform handle.
(WebCore::CurlDownload::writeDataToFile): Added utility method to write download data to file.
(WebCore::CurlDownload::addHeaders): Added utility method to add headers to request.
(WebCore::CurlDownload::didReceiveData): Use writeDataToFile utility method.
* platform/network/curl/CurlDownload.h:
Put class in WebCore namespace.
Added method to init download from resource handle, request, and response object.
Added utility method to write download data to file.
Added utility method to add headers to request.
Added custom headers member.
2013-07-22 Eric Carlson <eric.carlson@apple.com>
[iOS] captions sometimes positioned incorrectly after fullscreen state change
https://bugs.webkit.org/show_bug.cgi?id=118912
Reviewed by Jer Noble.
* html/shadow/MediaControlElements.cpp:
(WebCore::MediaControlTextTrackContainerElement::updateDisplay): Call clearTextTrackRepresentation.
(WebCore::MediaControlTextTrackContainerElement::updateTimerFired): Call updateDisplay so
cues are re-rendered with the updated size.
(WebCore::MediaControlTextTrackContainerElement::clearTextTrackRepresentation): Cleanup the
text track representation.
(WebCore::MediaControlTextTrackContainerElement::enteredFullscreen): New, force cues to be updated.
(WebCore::MediaControlTextTrackContainerElement::exitedFullscreen): Ditto.
* html/shadow/MediaControlElements.h:
* html/shadow/MediaControls.cpp:
(WebCore::MediaControls::enteredFullscreen): Call MediaControlTextTrackContainerElement::enteredFullscreen.
(WebCore::MediaControls::exitedFullscreen): Call MediaControlTextTrackContainerElement::exitedFullscreen.
2013-07-22 Allan Sandfeld Jensen <allan.jensen@digia.com>
[Qt][WK1] Support direct painting without GraphicsSurface
https://bugs.webkit.org/show_bug.cgi?id=118302
Reviewed by Jocelyn Turcotte.
Configure the WebGL OpenGL context to share texture with
the HostWindow OpenGL if available, and paint accelerated
using the the now shared textures.
This should return the performance without GraphicsSurface
on the WK1 code path to what it was before r135995 (28/11 2012).
* platform/graphics/qt/GraphicsContext3DQt.cpp:
(WebCore::GraphicsContext3DPrivate::GraphicsContext3DPrivate):
(WebCore::GraphicsContext3DPrivate::paintToTextureMapper):
2013-07-22 Gyuyoung Kim <gyuyoung.kim@samsung.com>
Introduce toSVGUseElement(), use it
https://bugs.webkit.org/show_bug.cgi?id=118942
Reviewed by Allan Sandfeld Jensen.
As a step to change static_cast with toSVGXXX, static_cast<SVGUseElement*> can
be changed with toSVGUseElement().
No new tests, no behavior change.
* dom/EventRetargeter.h:
(WebCore::EventRetargeter::eventTargetRespectingTargetRules):
* page/EventHandler.cpp:
(WebCore::instanceAssociatedWithShadowTreeElement):
* rendering/svg/RenderSVGResourceClipper.cpp:
(WebCore::RenderSVGResourceClipper::drawContentIntoMaskImage):
* rendering/svg/RenderSVGTransformableContainer.cpp:
(WebCore::RenderSVGTransformableContainer::calculateLocalTransform):
* svg/SVGStyledElement.cpp:
(WebCore::SVGStyledElement::title):
* svg/SVGUseElement.cpp:
(WebCore::dumpInstanceTree):
(WebCore::SVGUseElement::buildInstanceTree):
(WebCore::SVGUseElement::expandUseElementsInShadowTree):
* svg/SVGUseElement.h:
(WebCore::toSVGUseElement):
2013-07-22 Gyuyoung Kim <gyuyoung.kim@samsung.com>
Use toSVGPathElement() instead of static_cast<>
https://bugs.webkit.org/show_bug.cgi?id=118960
Reviewed by Allan Sandfeld Jensen.
Though there is toSVGPathElement(), some files still use static_cast<SVGPathElement*>.
To remove all static_cast<> use, we need to change argument from SVGElement to Element.
Merge from https://src.chromium.org/viewvc/blink?view=rev&revision=154621
No new tests, no behavior change.
* rendering/svg/RenderSVGTextPath.cpp:
(WebCore::RenderSVGTextPath::layoutPath):
* rendering/svg/SVGPathData.cpp:
(WebCore::updatePathFromPathElement):
* rendering/svg/SVGRenderTreeAsText.cpp:
(WebCore::operator<<):
* svg/SVGMPathElement.cpp:
(WebCore::SVGMPathElement::pathElement):
* svg/SVGPathElement.h:
(WebCore::toSVGPathElement):
* svg/SVGPathSegList.cpp:
(WebCore::SVGPathSegList::commitChange):
* svg/properties/SVGAnimatedPathSegListPropertyTearOff.h:
(WebCore::SVGAnimatedPathSegListPropertyTearOff::animValDidChange):
* svg/properties/SVGPathSegListPropertyTearOff.cpp:
(WebCore::SVGPathSegListPropertyTearOff::contextElement):
2013-07-11 Allan Sandfeld Jensen <allan.jensen@digia.com>
[Qt] Implement more of DOM3 KeyEvent key-identifiers
https://bugs.webkit.org/show_bug.cgi?id=118566
Reviewed by Jocelyn Turcotte.
Implemented as many of the key values from http://www.w3.org/TR/DOM-Level-3-Events/#key-values-list
as Qt keycodes support.
Also corrected the mapping of the Menu key, which was confused because MENU
is also the ancient Microsoft speak for the Alt keys.
* platform/qt/PlatformKeyboardEventQt.cpp:
(WebCore::keyIdentifierForQtKeyCode):
2013-07-21 Gyuyoung Kim <gyuyoung.kim@samsung.com>
Introduce toSVGGradientElement(), use it
https://bugs.webkit.org/show_bug.cgi?id=118943
Reviewed by Andreas Kling.
As a step to change static_cast with toSVGXXX, static_cast<SVGGradientElement*> can
be changed with toSVGGradientElement().
No new tests, no behavior change.
* rendering/svg/RenderSVGGradientStop.cpp:
(WebCore::RenderSVGGradientStop::gradientElement):
* rendering/svg/RenderSVGResourceGradient.cpp:
(WebCore::RenderSVGResourceGradient::applyResource):
* rendering/svg/SVGResources.cpp:
(WebCore::targetReferenceFromResource):
* svg/SVGGradientElement.h:
(WebCore::toSVGGradientElement):
* svg/SVGLinearGradientElement.cpp:
(WebCore::SVGLinearGradientElement::collectGradientAttributes):
* svg/SVGRadialGradientElement.cpp:
(WebCore::SVGRadialGradientElement::collectGradientAttributes):
2013-07-21 Andreas Kling <akling@apple.com>
KURL creates duplicate strings when completing data: URIs.
<http://webkit.org/b/118952>
<rdar://problem/14504480>
Reviewed by Anders Carlsson.
When checking if the original URL input string can be reused, compare against the part
of the parsing buffer that we would actually return, not the entire buffer.
632 kB progression on <http://www.nytimes.com/>
Test: KURLTest.KURLDataURIStringSharing
* platform/KURL.cpp:
(WebCore::KURL::parse):
2013-07-20 Benjamin Poulain <benjamin@webkit.org>
Add ASCIILiteral() on strings allocated often enough to appear in my Instruments
https://bugs.webkit.org/show_bug.cgi?id=118937
Reviewed by Alexey Proskuryakov.
* html/BaseCheckableInputType.cpp:
(WebCore::BaseCheckableInputType::saveFormControlState):
(WebCore::BaseCheckableInputType::fallbackValue):
* html/HTMLTextFormControlElement.cpp:
(WebCore::HTMLTextFormControlElement::updatePlaceholderVisibility):
* inspector/InspectorApplicationCacheAgent.cpp:
(WebCore::InspectorApplicationCacheAgent::InspectorApplicationCacheAgent):
* loader/cache/CachedScript.cpp:
(WebCore::CachedScript::CachedScript):
* platform/network/ResourceRequestBase.h:
(WebCore::ResourceRequestBase::ResourceRequestBase):
2013-07-20 Dean Jackson <dino@apple.com>
Updated ANGLE is leaking like a sieve
https://bugs.webkit.org/show_bug.cgi?id=118939
Rollout 152863, r152821, r152929 and r152755.
* CMakeLists.txt:
2013-07-19 Jer Noble <jer.noble@apple.com>
Pagination: Do not paint the baseBackgroundColor if asked to skipRootBackground.
https://bugs.webkit.org/show_bug.cgi?id=118933
Reviewed by Simon Fraser.
Captions rendered through TextTrackRepresentation are rendered with a background
color when in paginated views. Do not fill the paint area with the
baseBackgroundColor when the paint flags include SkipRootBackground.
* rendering/RenderView.cpp:
(WebCore::RenderView::paint):
2013-07-19 Brady Eidson <beidson@apple.com>
Pages should not be able to abuse users inside beforeunload handlers.
<rdar://problem/14475779> and https://bugs.webkit.org/show_bug.cgi?id=118871.
Reviewed by Alexey Proskuryakov.
Tests: fast/loader/show-only-one-beforeunload-dialog.html
http/tests/misc/iframe-beforeunload-dialog-matching-ancestor-securityorigin.html
http/tests/misc/iframe-beforeunload-dialog-not-matching-ancestor-securityorigin.html
* loader/FrameLoader.cpp:
(WebCore::FrameLoader::FrameLoader):
(WebCore::FrameLoader::shouldClose):
(WebCore::FrameLoader::handleBeforeUnloadEvent):
(WebCore::FrameLoader::shouldCloseFiringBeforeUnloadEvent): Renamed from fireBeforeUnloadEvent.
Add logic to enforce "1 beforeunload dialog per navigation" as well as "iframes can only show beforeunload
dialogs if their entire ancestry's security origins match the navigating frame."
* loader/FrameLoader.h:
* loader/FrameLoader.h:
Add the ability for Page to know when any frame is dispatching beforeunload:
* page/Page.cpp:
(WebCore::Page::Page):
(WebCore::Page::incrementFrameHandlingBeforeUnloadEventCount):
(WebCore::Page::decrementFrameHandlingBeforeUnloadEventCount):
(WebCore::Page::isAnyFrameHandlingBeforeUnloadEvent):
* page/Page.h:
* page/DOMWindow.cpp:
(WebCore::DOMWindow::print): Disallow if any frame is in beforeunload dispatch.
(WebCore::DOMWindow::alert): Ditto.
(WebCore::DOMWindow::confirm): Ditto.
(WebCore::DOMWindow::prompt): Ditto.
(WebCore::DOMWindow::showModalDialog): Ditto.
2013-07-19 Chris Fleizach <cfleizach@apple.com>
AX: VoiceOver not detecting misspelled words don't work in all cases
https://bugs.webkit.org/show_bug.cgi?id=118924
Reviewed by Tim Horton.
VoiceOver is now looking for a new misspelled attribute.
* accessibility/mac/WebAccessibilityObjectWrapperMac.mm:
(AXAttributeStringSetSpelling):
(AXAttributedStringAppendText):
2013-07-19 Ryosuke Niwa <rniwa@webkit.org>
Extract computeRenderStyleForProperty and nodeOrItsAncestorNeedsStyleRecalc from ComputedStyleExtractor::propertyValue
https://bugs.webkit.org/show_bug.cgi?id=118930
Reviewed by Andreas Kling.
Extracted two functions as a preparation to fix bugs 118032 and 118618.
* css/CSSComputedStyleDeclaration.cpp:
(WebCore::nodeOrItsAncestorNeedsStyleRecalc):
(WebCore::computeRenderStyleForProperty):
(WebCore::ComputedStyleExtractor::propertyValue):
2013-07-19 Andreas Kling <akling@apple.com>
Cache style declaration CSSOM wrappers directly on MutableStylePropertySet.
<http://webkit.org/b/118883>
Reviewed by Gavin Barraclough
Merge https://chromium.googlesource.com/chromium/blink/+/183bcd51eb0e79cab930cf46695df05dc793630f
From Blink r153700 by <ager@chromium.org>:
In my measurements the mapping is adding more overhead than just having a field
in all MutableStylePropertySet objects. So this saves memory and makes access
faster.
* css/StylePropertySet.cpp:
(WebCore::MutableStylePropertySet::MutableStylePropertySet):
(WebCore::MutableStylePropertySet::~MutableStylePropertySet):
(WebCore::StylePropertySet::hasCSSOMWrapper):
(WebCore::MutableStylePropertySet::cssStyleDeclaration):
(WebCore::MutableStylePropertySet::ensureCSSStyleDeclaration):
(WebCore::MutableStylePropertySet::ensureInlineCSSStyleDeclaration):
* css/StylePropertySet.h:
(WebCore::StylePropertySet::StylePropertySet):
2013-07-19 Brent Fulgham <bfulgham@apple.com>
[Windows] Avoid passing addresses of temporaries to Windows API.
https://bugs.webkit.org/show_bug.cgi?id=118917
Reviewed by Anders Carlsson.
The temporary Vector returned by String::charactersWithNullTermination
was going out of scope before its first use, causing Windows API to
receive garbage memory.
* platform/win/ContextMenuWin.cpp:
(WebCore::ContextMenu::createPlatformContextMenuFromItems):
* platform/win/PasteboardWin.cpp:
(WebCore::createGlobalHDropContent):
* platform/win/SSLKeyGeneratorWin.cpp:
(WebCore::WebCore::signedPublicKeyAndChallengeString):
2013-07-19 Zoltan Horvath <zoltan@webkit.org>
[CSS Shapes] Remove lineWithinShapeBounds() from ShapeInfo since it's no longer used
https://bugs.webkit.org/show_bug.cgi?id=118913
Reviewed by Andreas Kling.
No new tests, no behavior change.
* rendering/shapes/ShapeInfo.h: Remove lineWithinShapeBounds().
2013-07-19 Alex Christensen <achristensen@apple.com>
Added x64 configuration to Visual Studio build.
https://bugs.webkit.org/show_bug.cgi?id=118888
Reviewed by Brent Fulgham.
* WebCore.vcxproj/QTMovieWin/QTMovieWin.vcxproj:
* WebCore.vcxproj/WebCore.vcxproj:
* WebCore.vcxproj/WebCoreGenerated.vcxproj:
* WebCore.vcxproj/WebCoreTestSupport.vcxproj:
2013-07-19 Abhijeet Kandalkar <abhijeet.k@samsung.com>
Spatial Navigation handling of space key in <select> appears to confuse listIndex and optionIndex.
https://bugs.webkit.org/show_bug.cgi?id=99525
HTMLSelect Element inherently contains the logic to focus option node and thus, implementing an explicit logic to find the focus index is not required.
Reviewed by Joseph Pecoraro.
Test: fast/spatial-navigation/snav-multiple-select-optgroup.html
* html/HTMLSelectElement.cpp:
(WebCore::HTMLSelectElement::listBoxDefaultEventHandler):
* page/SpatialNavigation.cpp:
(WebCore::canScrollInDirection):
* rendering/RenderListBox.cpp:
(WebCore::RenderListBox::addFocusRingRects):
2013-07-19 David Hyatt <hyatt@apple.com>
OSX: ePub: Unable to select text in vertical Japanese book
https://bugs.webkit.org/show_bug.cgi?id=118864
<rdar://problem/14109351>
Reviewed by Dan Bernstein and Sam Weinig.
This patch fixes all of the various writing-mode and pagination combinations
so that the columns are painted in the correct location. The code that sets up
the initial painting translation offset in the block direction and that advances
that offset has been pulled into two helper functions, initialBlockOffsetForPainting
and blockDeltaForPaintingNextColumn, and that code is now shared by the four call
sites that need it (painting and hit testing in RenderBlock and painting and hit testing
in RenderLayer).
This patch also backs out the maximumScrollPosition change, since it only occurred because
of incorrect sizing of the RenderView, and this sizing issue has now been corrected by
ensuring that computeLogicalHeight() always makes sure you are the size of the viewport
and does not shrink you to the column height.
There was also a race condition that caused pagination to be incorrect if layout occurred
before the html/body renderer that set the writing-mode were available. When this happened,
the writing mode got propagated up to the view, but the column styles didn't get
adjusted to compensate for the writing mode change.
Added tests for every pagination and writing-mode combination in fast/multicol/pagination.
* css/StyleResolver.cpp:
(WebCore::StyleResolver::styleForDocument):
(WebCore::StyleResolver::adjustRenderStyle):
Move setStylesForPaginationMode into RenderStyle and make it a member function. This is
necessary so that the style can be adjusted dynamically to fix the race condition mentioned
above.
* page/FrameView.cpp:
(WebCore::FrameView::maximumScrollPosition):
Back out this change since the symptom it was fixing only occurred because the logical
height of the view was being set incorrectly.
* rendering/RenderBlock.cpp:
(WebCore::RenderBlock::checkForPaginationLogicalHeightChange):
Patch the column code that sets up the initial page height to use the pagination API's
page height rather than the viewport logical height. This allows the view to still match
the viewport in dimensions rather than being incorrectly sized to the column height.
(WebCore::RenderBlock::initialBlockOffsetForPainting):
(WebCore::RenderBlock::blockDeltaForPaintingNextColumn):
Two new helper functions used to set up the block direction paint/hit testing translation.
The major bug fix that occurred in this code is that the old block axis code didn't handle
reversal correctly and it also used physical coordinates to try to determine the translation
offset, when you really need to use logical coordinates in the original writing mode coordinate
system to determine the offset.
(WebCore::RenderBlock::paintColumnContents):
Patched to call the new helper functions.
(WebCore::ColumnRectIterator::ColumnRectIterator):
(WebCore::ColumnRectIterator::adjust):
(WebCore::ColumnRectIterator::update):
Patched to call the new helper functions.
* rendering/RenderBlock.h:
Add the two new helper functions to the RenderBlock header.
* rendering/RenderBox.cpp:
(WebCore::RenderBox::styleDidChange):
If the writing mode of the html/body propagates to the viewport and changes its writing mode,
also change our column styles to match if we're in paginated mode.
(WebCore::RenderBox::computeLogicalHeight):
(WebCore::RenderBox::computePercentageLogicalHeight):
Call the new pageOrViewLogicalHeight function on RenderView instead of
RenderBox::viewLogicalHeightForPercentages (which is now removed).
* rendering/RenderLayer.cpp:
(WebCore::RenderLayer::paintChildLayerIntoColumns):
(WebCore::RenderLayer::hitTestChildLayerColumns):
Patched to use the two new helper functions for block direction paint offset setup and
advancement.
* rendering/RenderView.cpp:
(WebCore::RenderView::pageOrViewLogicalHeight):
New helper function that does what viewLogicalHeightForPercentages used to do but also
handles returning the page length for block axis column progression. Again, this is to
allow the view to retain its correct size (matching the viewport).
(WebCore::RenderView::viewLogicalHeight):
Back out the code that made the view grow or shrink to the size of the Pagination API page
length when the progression was block axis. This was the source of most of the scroll origin
and scrolling issues.
* rendering/RenderView.h:
Add the new pageOrViewLogicalHeight() function.
* rendering/style/RenderStyle.cpp:
(WebCore::RenderStyle::setColumnStylesFromPaginationMode):
This is the old StyleResolver function for setting up the column styles. It's in RenderStyle
now so that it can be called at any time to change a style rather than only at style resolution
time.
* rendering/style/RenderStyle.h:
Declaration of the setColumnStylesFromPaginationMode function.
2013-07-19 peavo@outlook.com <peavo@outlook.com>
[Curl] Http response code 401 (Authentication required) is not handled.
https://bugs.webkit.org/show_bug.cgi?id=118849
Reviewed by Brent Fulgham.
The current Curl implementation does not handle a 401 response.
When receiving http code 401, we need to give a notification that authorization is required, by calling the appropriate notification method.
This gives a WebKit client the possibility to present a password dialog to the user.
In response to this, we should provide Curl with the given username and password, so another request can be sent with the given credentials.
* platform/network/ResourceHandle.h:
Added method to check if credential storage should be used.
* platform/network/ResourceHandleInternal.h:
Added member to keep track of number of authentication failures.
(WebCore::ResourceHandleInternal::ResourceHandleInternal):
* platform/network/curl/ResourceHandleCurl.cpp:
(WebCore::ResourceHandle::shouldUseCredentialStorage):
Added method to check if credential storage should be used.
(WebCore::ResourceHandle::didReceiveAuthenticationChallenge):
Implement method; notify client when authentication is required.
(WebCore::ResourceHandle::receivedCredential):
Implement method; provide Curl with password and username when available.
(WebCore::ResourceHandle::receivedRequestToContinueWithoutCredential):
Implement method; reset Curl username and password.
(WebCore::ResourceHandle::receivedCancellation):
Implement method; notify client that authorization has been cancelled.
* platform/network/curl/ResourceHandleManager.cpp:
(WebCore::isHttpAuthentication):
Added function to check if http code is an 'Authorization required' code.
(WebCore::getProtectionSpace):
Added function to initialize a protection space object from a Curl handle and a response object.
(WebCore::headerCallback):
Notify client when authorization is required.
(WebCore::ResourceHandleManager::applyAuthenticationToRequest):
Added method to set Curl username and password.
(WebCore::ResourceHandleManager::initializeHandle):
Use method to set Curl username and password.
* platform/network/curl/ResourceHandleManager.h:
Added method to set Curl username and password.
2013-07-19 Radu Stavila <stavila@adobe.com>
Hover doesn't work for block elements inside a href element
https://bugs.webkit.org/show_bug.cgi?id=118907
Reviewed by David Hyatt.
Added test for hovering block elements inside a href element.
Test: fast/css/hover-display-block.html
* rendering/RenderObject.cpp:
(WebCore::RenderObject::hoverAncestor):
2013-07-19 Zoltan Horvath <zoltan@webkit.org>
[CSS Shapes] Clear overflowing line's segments in pushShapeContentOverflowBelowTheContentBox
https://bugs.webkit.org/show_bug.cgi?id=118002
Reviewed by David Hyatt.
When the last line in the shape overlaps with the shape bottom boundaries we need to clear the computed segments. (We need to compute
the segments anyway, since shape-outside's code uses the same code path to determine its segments and the line containing is not a
requirement in that case.) Rather then doing the job in RenderBlock::LineBreaker::nextLineBreak I moved the functionality to its correct
place to pushShapeContentOverflowBelowTheContentBox. Now all the overflow related functionality is located in one function. I fixed the
corresponding layout test.
Tests: I modified shape-inside-overflow.html.
* rendering/RenderBlockLineLayout.cpp:
(WebCore::pushShapeContentOverflowBelowTheContentBox): Remove segments if line overlaps with the shape's boundaries.
(WebCore::RenderBlock::LineBreaker::nextLineBreak): Move segments clear logic to pushShapeContentOverflowBelowContentBox.
2013-07-19 Geoffrey Garen <ggaren@apple.com>
TrailingObjects shouldn't shrink vector capacity in a loop
https://bugs.webkit.org/show_bug.cgi?id=118322
Reviewed by Darin Adler.
This seems to take about 3% off the profile of loading a large text file.
* rendering/RenderBlockLineLayout.cpp:
(WebCore::TrailingObjects::clear): clear() has the built-in side effect
of throwing away existing capacity. Use shrink(0) to indicate that we
want to keep our existing capacity.
2013-07-19 Diego Pino Garcia <dpino@igalia.com>
[GTK] Merge decamelizations fix ups in the GObject DOM bindings code generator
https://bugs.webkit.org/show_bug.cgi?id=117543
Reviewed by Carlos Garcia Campos.
Ensure that all the code that calls to decamelize() applies the same fix ups
Now all functions that need to decamelize a string should simply call
to decamelize(). This function calls to FixUpDecamelize to apply some
fix ups.
* bindings/scripts/CodeGeneratorGObject.pm:
(decamelize): decamelizes a string and applies fix ups
(FixUpDecamelize): applies a series of fix ups to a decamelized string
(GetParentGObjType): moved fix ups to FixUpDecamelize()
(GenerateProperties): simply call to decamelize
(GenerateHeader): simply call to decamelize
(GetGReturnMacro): simply call to decamelize
(GenerateFunction): simply call to decamelize
(GenerateCFile): simply call to decamelize
(GenerateEventTargetIface): simply call to decamelize
2013-07-19 Kwang Yul Seo <skyul@company100.net>
Unreviewed.
Fix an assertion failure which causes debug bots to fail.
* platform/network/NetworkStateNotifier.cpp:
(WebCore::NetworkStateNotifier::addNetworkStateChangeListener):
2013-07-19 Miguel Gomez <magomez@igalia.com>
[GTK] media/video-seek-multiple.html is failing
https://bugs.webkit.org/show_bug.cgi?id=117580
Reviewed by Philippe Normand.
When receiving several seek calls in a row, ensure that the final position
is the one requested in the last call received.
Already covered in test media/video-seek-multiple.html
* platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:
(WebCore::MediaPlayerPrivateGStreamer::seek):
2013-07-19 Kangil Han <kangil.han@samsung.com>
Use explicit HTMLFrameElementBase cast and introduce toHTMLFrameElementBase
https://bugs.webkit.org/show_bug.cgi?id=118873
Reviewed by Ryosuke Niwa.
It should be HTMLFrameElementBase that embraces both HTMLFrameElement and HTMLIFrameElement.
This also makes correct toFooElement possible.
Next, to avoid direct use of static_cast, this patch introduces toHTMLFrameElementBase for code cleanup.
* editing/FrameSelection.cpp:
(WebCore::scanForForm):
* html/HTMLBodyElement.cpp:
(WebCore::HTMLBodyElement::didNotifySubtreeInsertions):
* html/HTMLFrameElementBase.h:
(WebCore::toHTMLFrameElementBase):
* loader/SubframeLoader.cpp:
(WebCore::SubframeLoader::loadSubframe):
* page/EventHandler.cpp:
(WebCore::targetIsFrame):
* page/FrameView.cpp:
(WebCore::FrameView::init):
* rendering/RenderFrameBase.cpp:
(WebCore::RenderFrameBase::layoutWithFlattening):
* rendering/RenderLayer.cpp:
(WebCore::frameElementAndViewPermitScroll):
(WebCore::RenderLayer::scrollRectToVisible):
2013-07-18 Christophe Dumez <ch.dumez@sisa.samsung.com>
Bindings generation tests are failing
https://bugs.webkit.org/show_bug.cgi?id=118877
Reviewed by Kentaro Hara.
I inadvertently removed the wrong part of the if statement
in r152845, causing hasAttribute() to be used unconditionally
for reflected boolean attributes instead of fastHasAttribute().
This patch fixes the issue.
No new tests, covered by bindings tests.
* bindings/scripts/CodeGenerator.pm:
(GetterExpression):
2013-07-18 Kwang Yul Seo <skyul@company100.net>
WorkerGlobalScope should support onoffline/ononline event handlers
https://bugs.webkit.org/show_bug.cgi?id=118832
Reviewed by Alexey Proskuryakov.
HTML5 spec says that WorkerGlobalScope should support
onoffline/ononline event handlers as stated in
http://www.whatwg.org/specs/web-apps/current-work/multipage/offline.html#event-offline
Modified NetworkStateNotifier to support multiple callbacks and added a
callback to dispatch offline and online events to WorkerGlobalScope
when network state is changed.
No new test because the current test infrastructure does not provide a
mock network state notifier.
* page/Page.cpp:
(WebCore::networkStateChanged):
Change the function to take an additional argument, isOnLine so that we
can remove a call to NetworkStateNotifier::onLine().
(WebCore::Page::Page):
Use NetworkStateNotifier::addNetworkStateChangeListener which
allows us to add multiple callbacks.
* platform/network/NetworkStateNotifier.cpp:
(WebCore::NetworkStateNotifier::addNetworkStateChangeListener):
Replace NetworkStateNotifier::setNetworkStateChangedFunction with
NetworkStateNotifier::addNetworkStateChangeListener.
(WebCore::NetworkStateNotifier::notifyNetworkStateChange):
A helper method to notify all registered network state change
callbacks.
* platform/network/NetworkStateNotifier.h:
(WebCore::NetworkStateNotifier::NetworkStateNotifier):
* platform/network/blackberry/NetworkStateNotifierBlackBerry.cpp:
(WebCore::NetworkStateNotifier::NetworkStateNotifier):
(WebCore::NetworkStateNotifier::networkStateChange):
* platform/network/efl/NetworkStateNotifierEfl.cpp:
(WebCore::NetworkStateNotifier::networkInterfaceChanged):
(WebCore::NetworkStateNotifier::NetworkStateNotifier):
* platform/network/mac/NetworkStateNotifierMac.cpp:
(WebCore::NetworkStateNotifier::networkStateChangeTimerFired):
(WebCore::NetworkStateNotifier::NetworkStateNotifier):
* platform/network/qt/NetworkStateNotifierQt.cpp:
(WebCore::NetworkStateNotifier::updateState):
(WebCore::NetworkStateNotifier::NetworkStateNotifier):
* platform/network/win/NetworkStateNotifierWin.cpp:
(WebCore::NetworkStateNotifier::addressChanged):
(WebCore::NetworkStateNotifier::NetworkStateNotifier):
Replace m_networkStateChangedFunction() with notifyNetworkStateChange().
* workers/Worker.cpp:
(WebCore::networkStateChanged):
Notify network state change by iterating all Workers.
(WebCore::Worker::Worker):
Initialize allWorkers and add networkStateChanged to
NetworkStateNotifier in first invocation. Add this Worker to
allWorkers.
(WebCore::Worker::~Worker):
Remove this Worker from allWorkers.
(WebCore::Worker::notifyNetworkStateChange):
* workers/Worker.h:
* workers/WorkerGlobalScope.h:
Add onoffline and ononline event handlers.
* workers/WorkerGlobalScope.idl:
Add onoffline and ononline event handlers
* workers/WorkerGlobalScopeProxy.h:
* workers/WorkerMessagingProxy.cpp:
(WebCore::NotifyNetworkStateChangeTask::create):
(WebCore::NotifyNetworkStateChangeTask::NotifyNetworkStateChangeTask):
(WebCore::NotifyNetworkStateChangeTask::performTask):
A subclass of ScriptExecutionContext::Task to dispatch offline and
online events to WorkerGlobalScope.
(WebCore::WorkerMessagingProxy::notifyNetworkStateChange):
Notify network state change using ScriptExecutionContext::postTask to
dispatch events across threads.
* workers/WorkerMessagingProxy.h:
2013-07-18 Ryosuke Niwa <rniwa@webkit.org>
Build fix after r152876.
* platform/graphics/avfoundation/MediaPlayerPrivateAVFoundation.cpp:
(WebCore::MediaPlayerPrivateAVFoundation::processNewAndRemovedTextTracks):
2013-07-18 Brent Fulgham <bfulgham@apple.com>
[Media] Share more code between Mac and Windows implementation files.
https://bugs.webkit.org/show_bug.cgi?id=118801
Reviewed by Eric Carlson.
* platform/graphics/avfoundation/MediaPlayerPrivateAVFoundation.cpp:
(WebCore::MediaPlayerPrivateAVFoundation::clearTextTracks): Move
implementation from ObjC file to parent file.
(WebCore::MediaPlayerPrivateAVFoundation::processNewAndRemovedTextTracks):
Ditto.
* platform/graphics/avfoundation/MediaPlayerPrivateAVFoundation.h:
Remove duplicate implementation.
* platform/graphics/avfoundation/cf/MediaPlayerPrivateAVFoundationCF.cpp:
Ditto.
* platform/graphics/avfoundation/cf/MediaPlayerPrivateAVFoundationCF.h:
Ditto.
* platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.h:
Ditto.
* platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
Ditto.
2013-07-18 Alex Christensen <achristensen@apple.com>
Fixed compile errors for non-Cairo platforms using EGL.
https://bugs.webkit.org/show_bug.cgi?id=118536
Reviewed by Brent Fulgham.
* platform/graphics/egl/GLContextEGL.cpp: Added #if USE(CAIRO) around cairo.h.
(WebCore::GLContextEGL::~GLContextEGL): Added #if USE(CAIRO) around cairo_device_destroy call.
2013-07-18 Jer Noble <jer.noble@apple.com>
New PDFPlugin doesn't support WebKitOmitPDFSupport, acts as if Plug-ins are off
https://bugs.webkit.org/show_bug.cgi?id=118858
Reviewed by Eric Carlson.
Expand the scope of rejecting non video/ or audio/ MIME types when
filling the MIME type cache.
* platform/graphics/mac/MediaPlayerPrivateQTKit.mm:
(WebCore::shouldRejectMIMEType): Added utility function.
2013-07-17 Brent Fulgham <bfulgham@apple.com>
[Windows] Support in-band text tracks.
https://bugs.webkit.org/show_bug.cgi?id=103770
Reviewed by Eric Carlson.
Existing media tests cover these features.
* WebCore.vcxproj/WebCore.vcxproj: Add new files for Windows captions
* WebCore.vcxproj/WebCore.vcxproj.filters: ditto.
* config.h: Make sure proper buid flags are turned on when building
with AVCF_LEGIBLE_OUTPUT.
* page/CaptionUserPreferencesMediaAF.cpp: Revise to reduce soft linking
duplication between Mac and Windows.
* platform/graphics/avfoundation/InbandTextTrackPrivateAVF.cpp: Update
to support Windows platform by removing compiler guards and adding
Windows declarations for soft-link functions.
* platform/graphics/avfoundation/InbandTextTrackPrivateAVF.h: Ditto.
* platform/graphics/avfoundation/MediaPlayerPrivateAVFoundation.cpp:
Remove build guards preventing Windows from using LegibleOutput
features.
(WebCore::MediaPlayerPrivateAVFoundation::MediaPlayerPrivateAVFoundation):
(WebCore::MediaPlayerPrivateAVFoundation::seek):
(WebCore::MediaPlayerPrivateAVFoundation::seekCompleted):
(WebCore::MediaPlayerPrivateAVFoundation::dispatchNotification):
(WebCore::MediaPlayerPrivateAVFoundation::trackModeChanged):
* platform/graphics/avfoundation/MediaPlayerPrivateAVFoundation.h:
(WebCore::MediaPlayerPrivateAVFoundation::contentsNeedsDisplay): Ditto
* platform/graphics/avfoundation/cf/AVFoundationCFSoftLinking.h:
Add new LegibleOutput support functions, and try to reduce duplication
between Windows and Mac soft link declarations.
* platform/graphics/avfoundation/cf/CoreMediaSoftLinking.h: Ditto.
* platform/graphics/avfoundation/cf/InbandTextTrackPrivateAVCF.cpp: Added.
(WebCore::InbandTextTrackPrivateAVCF::InbandTextTrackPrivateAVCF):
(WebCore::InbandTextTrackPrivateAVCF::disconnect):
(WebCore::InbandTextTrackPrivateAVCF::kind):
(WebCore::InbandTextTrackPrivateAVCF::isClosedCaptions):
(WebCore::InbandTextTrackPrivateAVCF::isSDH):
(WebCore::InbandTextTrackPrivateAVCF::containsOnlyForcedSubtitles):
(WebCore::InbandTextTrackPrivateAVCF::isMainProgramContent):
(WebCore::InbandTextTrackPrivateAVCF::isEasyToRead):
(WebCore::InbandTextTrackPrivateAVCF::label):
(WebCore::InbandTextTrackPrivateAVCF::language):
(WebCore::InbandTextTrackPrivateAVCF::isDefault):
* platform/graphics/avfoundation/cf/InbandTextTrackPrivateAVCF.h: Added.
(WebCore::InbandTextTrackPrivateAVCF::create):
(WebCore::InbandTextTrackPrivateAVCF::~InbandTextTrackPrivateAVCF):
(WebCore::InbandTextTrackPrivateAVCF::mediaSelectionOption):
* platform/graphics/avfoundation/cf/InbandTextTrackPrivateLegacyAVCF.cpp: Added.
(WebCore::InbandTextTrackPrivateLegacyAVCF::InbandTextTrackPrivateLegacyAVCF):
(WebCore::InbandTextTrackPrivateLegacyAVCF::disconnect):
(WebCore::InbandTextTrackPrivateLegacyAVCF::kind):
(WebCore::InbandTextTrackPrivateLegacyAVCF::isClosedCaptions):
(WebCore::InbandTextTrackPrivateLegacyAVCF::containsOnlyForcedSubtitles):
(WebCore::InbandTextTrackPrivateLegacyAVCF::isMainProgramContent):
(WebCore::InbandTextTrackPrivateLegacyAVCF::isEasyToRead):
(WebCore::InbandTextTrackPrivateLegacyAVCF::label):
(WebCore::InbandTextTrackPrivateLegacyAVCF::language):
* platform/graphics/avfoundation/cf/InbandTextTrackPrivateLegacyAVCF.h: Added.
(WebCore::InbandTextTrackPrivateLegacyAVCF::create):
(WebCore::InbandTextTrackPrivateLegacyAVCF::~InbandTextTrackPrivateLegacyAVCF):
(WebCore::InbandTextTrackPrivateLegacyAVCF::avPlayerItemTrack):
* platform/graphics/avfoundation/cf/MediaPlayerPrivateAVFoundationCF.cpp:
Update to support LegibleOutput features for the Windows port.
(WebCore::AVFWrapper::currentTrack): Added.
(WebCore::AVFWrapper::legibleOutput): Added.
(WebCore::createMetadataKeyNames): Added missing key names.
(WebCore::avLegibleOutput): Added.
(WebCore::safeMediaSelectionGroupForLegibleMedia): Added.
(WebCore::MediaPlayerPrivateAVFoundationCF::cancelLoad): Clear text
tracks when cancelling.
(WebCore::MediaPlayerPrivateAVFoundationCF::setCurrentTrack): Added.
(WebCore::MediaPlayerPrivateAVFoundationCF::currentTrack): Added.
(WebCore::MediaPlayerPrivateAVFoundationCF::platformDuration): Revised
to match logic in Objective C implementation.
(WebCore::MediaPlayerPrivateAVFoundationCF::currentTime): Revised
to match logic in Objective C implementation.
(WebCore::MediaPlayerPrivateAVFoundationCF::paintCurrentFrameInContext):
Check presence of metadata before proceeding. Revised to match logic
in Objective C implementation.
(WebCore::MediaPlayerPrivateAVFoundationCF::paint): Ditto.
(WebCore::MediaPlayerPrivateAVFoundationCF::tracksChanged): Update for
in-band text tracks.
(WebCore::MediaPlayerPrivateAVFoundationCF::clearTextTracks): Added.
(WebCore::MediaPlayerPrivateAVFoundationCF::processLegacyClosedCaptionsTracks):
Added.
(WebCore::MediaPlayerPrivateAVFoundationCF::processNewAndRemovedTextTracks):
Added.
(WebCore::MediaPlayerPrivateAVFoundationCF::processMediaSelectionOptions):
Added.
(WebCore::AVFWrapper::setCurrentTrack): Added.
(WebCore::MediaPlayerPrivateAVFoundationCF::languageOfPrimaryAudioTrack):
Added.
(WebCore::AVFWrapper::AVFWrapper): Add new initializers.
(WebCore::AVFWrapper::~AVFWrapper): Clean up text track information.
(WebCore::AVFWrapper::createPlayer): Add Legible Output support.
(WebCore::AVFWrapper::createPlayerItem): Ditto.
(WebCore::LegibleOutputData::LegibleOutputData): Added.
(WebCore::AVFWrapper::processCue): Added.
(WebCore::AVFWrapper::legibleOutputCallback): Added.
(WebCore::AVFWrapper::safeMediaSelectionGroupForLegibleMedia): Added.
* platform/graphics/avfoundation/cf/MediaPlayerPrivateAVFoundationCF.h:
Update to support LegibleOutput features for the Windows port.
* platform/win/SoftLinking.h: Change signature of variable accessor
to match Mac so reduce duplicate code.
2013-07-18 Christophe Dumez <ch.dumez@sisa.samsung.com>
Make atob() / btoa() argument non optional
https://bugs.webkit.org/show_bug.cgi?id=118844
Reviewed by Kentaro Hara.
According to the latest specification, the argument to atob() / btoa()
should not be optional:
http://www.whatwg.org/specs/web-apps/current-work/multipage/webappapis.html#windowbase64
This patch makes WebKit behave according to the specification. The argument
is also mandatory in Firefox, IE10 and Blink.
atob() / btoa() are also moved to their own WindowBase64 interface which
the Window interface implements. This does not change the behavior but
this is closer to the specification and it will make exposing those
methods to workers easier later on.
No new tests, already covered by:
fast/dom/Window/atob-btoa.html
* CMakeLists.txt:
* DerivedSources.make:
* DerivedSources.pri:
* GNUmakefile.list.am:
* page/DOMWindow.idl:
* page/WindowBase64.idl: Added.
2013-07-18 Antoine Quint <graouts@apple.com>
Crash in WebCore::createMarkup()
https://bugs.webkit.org/show_bug.cgi?id=118847
Reviewed by Ryosuke Niwa.
Also check that we have a containingBlock() for the renderer() so that we
may safely call node() on it.
* editing/markup.cpp:
(WebCore::highestAncestorToWrapMarkup):
2013-07-18 Praveen R Jadhav <praveen.j@samsung.com>
Only the first call to 'stop' method of AudioBufferSourceNode must be entertained.
https://bugs.webkit.org/show_bug.cgi?id=118776
Reviewed by Jer Noble.
Subsequent calls to 'stop' for a AudioSourceBufferNode throws an exception.
End time set by first 'stop' method is used for processing.
No new tests. audiobuffersource-exception.html is updated.
* Modules/webaudio/AudioScheduledSourceNode.cpp:
(WebCore::AudioScheduledSourceNode::stop):
2013-07-18 Christophe Dumez <ch.dumez@sisa.samsung.com>
Simplify SVG animated type handling in the JSC bindings generator
https://bugs.webkit.org/show_bug.cgi?id=118845
Reviewed by Kentaro Hara.
Simplify IsSVGAnimatedType subroutine in the bindings generator so that
we no longer need to hardcode SVG animated types. Also remove the
CanUseFastAttribute subroutine as it is equivalent to IsSVGAnimatedType.
This allows us to simplify the GetterExpression subroutine so that
we can use fastHasAttribute() unconditionally for boolean type.
No new tests, no behavior change.
* bindings/scripts/CodeGenerator.pm:
(IsSVGAnimatedType):
(GetterExpression):
2013-07-18 Christophe Dumez <ch.dumez@sisa.samsung.com>
Use [ImplementedAs] instead of special casing in the bindings generators
https://bugs.webkit.org/show_bug.cgi?id=118848
Reviewed by Kentaro Hara.
In several instances, special casing were used in the bindings generator to avoid
name clashes in the implementation. The [ImplementedBy] IDL extended attribute is
meant to solve this issue so we now use it instead.
No new tests, no behavior change.
* bindings/scripts/CodeGenerator.pm:
(WK_ucfirst):
(AttributeNameForGetterAndSetter):
* bindings/scripts/CodeGeneratorJS.pm:
(GenerateImplementation):
(NativeToJSValue):
* bindings/scripts/CodeGeneratorObjC.pm:
(GenerateHeader):
(GenerateImplementation):
* svg/SVGAElement.idl:
* svg/SVGFECompositeElement.cpp:
(WebCore::SVGFECompositeElement::SVGFECompositeElement):
(WebCore::SVGFECompositeElement::parseAttribute):
(WebCore::SVGFECompositeElement::setFilterEffectAttribute):
(WebCore::SVGFECompositeElement::build):
* svg/SVGFECompositeElement.h:
* svg/SVGFECompositeElement.idl:
* svg/SVGFEMorphologyElement.cpp:
(WebCore::SVGFEMorphologyElement::SVGFEMorphologyElement):
(WebCore::SVGFEMorphologyElement::parseAttribute):
(WebCore::SVGFEMorphologyElement::setFilterEffectAttribute):
(WebCore::SVGFEMorphologyElement::build):
* svg/SVGFEMorphologyElement.h:
* svg/SVGFEMorphologyElement.idl:
* svg/SVGTransform.cpp:
(WebCore::SVGTransform::updateSVGMatrix):
* svg/SVGTransform.h:
* svg/SVGTransform.idl:
2013-07-18 Zalan Bujtas <zalan@apple.com>
Incorrect calculated width for mspace.
https://bugs.webkit.org/show_bug.cgi?id=118601
Reviewed by Chris Fleizach.
Use intrinsic logical widths to size <mspace> properly.
This patch also fixes an assert on isPreferredLogicalHeightDirty() which occurs
while layouting <mspace>. The assert fix is required, so that the sizing can be
fixed.
Test: mathml/presentation/mspace-prefered-width.html
* rendering/mathml/RenderMathMLBlock.cpp:
(WebCore::parseMathMLLength): switch to LayoutUnits.
(WebCore::parseMathMLNamedSpace): switch to LayoutUnits.
* rendering/mathml/RenderMathMLBlock.h:
* rendering/mathml/RenderMathMLFraction.cpp:
(WebCore::RenderMathMLFraction::updateFromElement):
* rendering/mathml/RenderMathMLFraction.h:
* rendering/mathml/RenderMathMLSpace.cpp:
(WebCore::RenderMathMLSpace::computeIntrinsicLogicalWidths):
* rendering/mathml/RenderMathMLSpace.h:
2013-07-18 Ryosuke Niwa <rniwa@webkit.org>
willWriteSelectionToPasteboard and willPerformDragSourceAction editing callbacks are not called for drag and drop
https://bugs.webkit.org/show_bug.cgi?id=118828
Reviewed by Gavin Barraclough.
Call these two callbacks when we start a drag and drop.
No new tests for now but we should start logging these callbacks in DRT and WTR's EditorClients.
* page/DragController.cpp:
(WebCore::DragController::startDrag):
2013-07-18 Santosh Mahto <santosh.ma@samsung.com>
ASSERTION FAILED: !listItems().size() || m_activeSelectionAnchorIndex >= 0 in WebCore::HTMLSelectElement::updateListBoxSelection
https://bugs.webkit.org/show_bug.cgi?id=118591
Reviewed by Kent Tamura.
Test: fast/forms/select/selectall-command-crash.html
* html/HTMLSelectElement.cpp:
(WebCore::HTMLSelectElement::selectAll):
We should return this function if activeSelectionAnchorIndex is not valid index
2013-07-18 Ryuan Choi <ryuan.choi@samsung.com>
[EFL] Refactor spin.edc not to use offset
https://bugs.webkit.org/show_bug.cgi?id=118830
Reviewed by Gyuyoung Kim.
EDJE allows offset to specify the pixel based position,
but it's not good way if you want to locate object like arrow top or bottom.
Instead, this patch uses align property.
* platform/efl/DefaultTheme/widget/spinner/spinner.edc:
2013-07-18 Nick Diego Yamane <nick.yamane@openbossa.org>
[gstreamer] Avoid calls to g_slist_index in webKitWebAudioSrcLoop()
https://bugs.webkit.org/show_bug.cgi?id=118827
Reviewed by Philippe Normand.
webKitWebAudioSrcLoop() currently calls g_slist_index for each element
to get its index in a list it's iterating over. g_list_index function uses
a sequential search to find that element, which is clearly unecessary.
This patch adds a local variable to store the current index and use it
instead of calling g_slist_index function.
No new tests, no behavior changes.
* platform/audio/gstreamer/WebKitWebAudioSourceGStreamer.cpp:
(webKitWebAudioSrcLoop):
2013-07-17 Gyuyoung Kim <gyuyoung.kim@samsung.com>
Introduce toSVGInlineFlowBox() and use it
https://bugs.webkit.org/show_bug.cgi?id=118794
Reviewed by Andreas Kling.
As a step to change static_cast with toSVGXXX, static_cast<SVGInlineFlowBox*> can
be changed with toSVGInlineFlowBox().
Blink merge from https://src.chromium.org/viewvc/blink?view=rev&revision=154385
No new tests, no behavior change.
* rendering/svg/SVGInlineFlowBox.cpp:
(WebCore::SVGInlineFlowBox::paintSelectionBackground):
* rendering/svg/SVGInlineFlowBox.h:
(WebCore::toSVGInlineFlowBox):
* rendering/svg/SVGRootInlineBox.cpp:
(WebCore::SVGRootInlineBox::paint):
(WebCore::SVGRootInlineBox::layoutCharactersInTextBoxes):
(WebCore::SVGRootInlineBox::layoutChildBoxes):
2013-07-17 Gyuyoung Kim <gyuyoung.kim@samsung.com>
Use toSVGMarkerElement() instead of static_cast<>
https://bugs.webkit.org/show_bug.cgi?id=118800
Reviewed by Andreas Kling.
Though there is toSVGMarkerElement(), some files still use static_cast<SVGMarkerElement*>.
To remove all static_cast<> use, we need to change argument from SVGElement to Node.
No new tests, no behavior changes.
* rendering/svg/RenderSVGResourceMarker.cpp:
(WebCore::RenderSVGResourceMarker::referencePoint):
(WebCore::RenderSVGResourceMarker::angle):
(WebCore::RenderSVGResourceMarker::markerTransformation):
(WebCore::RenderSVGResourceMarker::viewportTransform):
(WebCore::RenderSVGResourceMarker::calcViewport):
* rendering/svg/RenderSVGResourceMarker.h:
(WebCore::RenderSVGResourceMarker::markerUnits):
* svg/SVGMarkerElement.h:
(WebCore::toSVGMarkerElement):
2013-07-17 Jacky Jiang <zhajiang@blackberry.com>
Dereference null pointer crash in Length::decrementCalculatedRef()
https://bugs.webkit.org/show_bug.cgi?id=118686
Reviewed by Simon Fraser.
Length(Calculated) won't insert any CalculationValue to CalculationValueHandleMap;
therefore, we dereference null CalculationValue pointer when the temporary
Length object goes out of the scope.
Length(Calculated) is not allowed as it doesn't make sense that we construct
a Calculated Length object with uninitialized calc expression.
The code just wants to blend with zero. To fix the bug, we can just blend
with Length(0, Fixed) here as we currently can blend different type units
and zero has the same behavior regardless of unit.
Test: transitions/transition-transform-translate-calculated-length-crash.html
* platform/graphics/transforms/TranslateTransformOperation.cpp:
(WebCore::TranslateTransformOperation::blend):
2013-07-17 Tim Horton <timothy_horton@apple.com>
Update blocked/missing plug-in UI
https://bugs.webkit.org/show_bug.cgi?id=118347
<rdar://problem/14209318>
Reviewed by Sam Weinig.
* WebCore.exp.in:
Export RenderEmbeddedObject::setPluginUnavailabilityReasonWithDescription.
* rendering/RenderEmbeddedObject.cpp:
(WebCore::replacementTextRoundedRectPressedColor):
(WebCore::replacementTextRoundedRectColor):
(WebCore::replacementTextColor):
Change colors to new design and add some more constants.
(WebCore::shouldUnavailablePluginMessageBeButton): Added.
(WebCore::RenderEmbeddedObject::setPluginUnavailabilityReasonWithDescription): Added.
(WebCore::RenderEmbeddedObject::setPluginUnavailabilityReason):
Call through to the -WithDescription variant.
(WebCore::RenderEmbeddedObject::paintReplaced):
Fill the background, and otherwise match the new design.
(WebCore::addReplacementArrowPath):
Add an arrow to the given path, inside the given rect.
(WebCore::RenderEmbeddedObject::getReplacementTextGeometry):
Add a 1px padding to the bottom of the text.
Add a circle and an arrow into the indicator as per the new design.
(WebCore::RenderEmbeddedObject::isInUnavailablePluginIndicator):
Hit-test the indicator arrow as well; otherwise, the fact that the arrow
is a hole in the path means it won't be hit.
* rendering/RenderEmbeddedObject.h:
2013-07-17 Commit Queue <commit-queue@webkit.org>
Unreviewed, rolling out r152701, r152703, r152739, r152754,
and r152756.
http://trac.webkit.org/changeset/152701
http://trac.webkit.org/changeset/152703
http://trac.webkit.org/changeset/152739
http://trac.webkit.org/changeset/152754
http://trac.webkit.org/changeset/152756
https://bugs.webkit.org/show_bug.cgi?id=118821
this was a buggy fix and we're going to try something
different (Requested by thorton on #webkit).
* CMakeLists.txt:
* DerivedSources.make:
* DerivedSources.pri:
* GNUmakefile.am:
* WebCore.exp.in:
* WebCore.vcxproj/WebCore.vcxproj:
* WebCore.vcxproj/WebCore.vcxproj.filters:
* WebCore.xcodeproj/project.pbxproj:
* css/CSSDefaultStyleSheets.cpp:
(WebCore::CSSDefaultStyleSheets::ensureDefaultStyleSheetsForElement):
* css/unavailablePlugIns.css: Removed.
* dom/EventListener.h:
* html/HTMLAppletElement.cpp:
(WebCore::HTMLAppletElement::updateWidget):
* html/HTMLPlugInElement.cpp:
(WebCore::HTMLPlugInElement::defaultEventHandler):
* html/HTMLPlugInImageElement.cpp:
(WebCore::HTMLPlugInImageElement::didAddUserAgentShadowRoot):
* loader/SubframeLoader.cpp:
(WebCore::SubframeLoader::createJavaAppletWidget):
* page/ChromeClient.h:
(WebCore::ChromeClient::shouldUnavailablePluginMessageBeButton):
* rendering/RenderEmbeddedObject.cpp:
(WebCore::replacementTextRoundedRectPressedColor):
(WebCore::RenderEmbeddedObject::RenderEmbeddedObject):
(WebCore::RenderEmbeddedObject::setPluginUnavailabilityReason):
(WebCore::RenderEmbeddedObject::setUnavailablePluginIndicatorIsPressed):
(WebCore::RenderEmbeddedObject::paint):
(WebCore::RenderEmbeddedObject::paintReplaced):
(WebCore::RenderEmbeddedObject::getReplacementTextGeometry):
(WebCore::RenderEmbeddedObject::replacementTextRect):
(WebCore::RenderEmbeddedObject::isReplacementObscured):
(WebCore::RenderEmbeddedObject::layout):
(WebCore::RenderEmbeddedObject::isInUnavailablePluginIndicator):
(WebCore::shouldUnavailablePluginMessageBeButton):
(WebCore::RenderEmbeddedObject::handleUnavailablePluginIndicatorEvent):
(WebCore::RenderEmbeddedObject::getCursor):
(WebCore::RenderEmbeddedObject::canHaveChildren):
* rendering/RenderEmbeddedObject.h:
* rendering/RenderWidget.h:
2013-07-17 Simon Fraser <simon.fraser@apple.com>
Optimize RenderLayerCompositor's OverlapMap
https://bugs.webkit.org/show_bug.cgi?id=118764
Reviewed by Tim Horton.
Overlap stack items can have RectLists with hundreds of rectangles.
This makes the linear search in OverlapMap::overlapsLayers() very slow.
Optimize by storing the bounding rect of the list of rects, and doing an early
check on that. This reduces time spent in RenderLayer::scrollTo() by 13% in some
content with lots of layers inside an overflow:scroll.
* rendering/RenderLayerCompositor.cpp:
(WebCore::RenderLayerCompositor::OverlapMap::overlapsLayers):
(WebCore::RenderLayerCompositor::OverlapMap::popCompositingContainer):
(WebCore::RenderLayerCompositor::OverlapMap::RectList::append):
(WebCore::RenderLayerCompositor::OverlapMap::RectList::intersects):
2013-07-17 Bem Jones-Bey <bjonesbe@adobe.com>
[CSS Shapes] Port refactoring of shape-outside code from Blink
https://bugs.webkit.org/show_bug.cgi?id=118757
Reviewed by Dean Jackson.
Refactor the left and right offset methods to reduce the number of
arguments by splitting the methods into smaller methods. This
refactoring was requested as part of porting support for stacked
floats with shape-outside to Blink.
Also add a variable when calling computeSegmentsForLine to make it
more readable and easier to follow the coordinate system change.
No new tests, no behavior change.
* rendering/RenderBlock.cpp:
(WebCore::RenderBlock::computeLogicalLocationForFloat): Update to use
the refactored IgnoringShapeOutside methods.
(WebCore::RenderBlock::logicalLeftFloatOffsetForLine): New method to
compute the offset contributed by left floats.
(WebCore::RenderBlock::adjustLogicalLeftOffsetForLine): New method to
compute misc adjustments to the left offset.
(WebCore::RenderBlock::logicalRightFloatOffsetForLine): New method to
compute the offset contributed by right floats.
(WebCore::RenderBlock::adjustLogicalRightOffsetForLine): New method to
compute misc adjustments to the right offset.
* rendering/RenderBlock.h:
(WebCore::RenderBlock::logicalRightOffsetForLine): Implement original
method in terms of the float offset computation method and the
offset adjustment method. This method takes into account the
shape-outside on any floats when computing the offset.
(WebCore::RenderBlock::logicalLeftOffsetForLine): Ditto.
(WebCore::RenderBlock::logicalRightOffsetForLineIgnoringShapeOutside):
Compute the right offset as if there was no shape-outside on any
of the floats.
(WebCore::RenderBlock::logicalLeftOffsetForLineIgnoringShapeOutside):
Compute the left offset as if there was no shape-outside on any
of the floats.
* rendering/RenderBlockLineLayout.cpp:
(WebCore::LineWidth::shrinkAvailableWidthForNewFloatIfNeeded): Update
to use a variable to make the calls to computeSegmentsForLine more
explicit about the coordinate system conversion.
2013-07-17 Zalan Bujtas <zalan@apple.com>
Wrong linebox height, when block element parent has vertical-align property defined.
https://bugs.webkit.org/show_bug.cgi?id=118245
Reviewed by David Hyatt.
Do not push the current element to the next, when it is still considered empty, even with
some object(s) in front. Behave as if it was actually empty.
Inline elements like <span></span> generate such lines.
Test: fast/css/empty-span-with-parent-div-and-vertical-align.html
* rendering/RenderBlockLineLayout.cpp:
(WebCore::RenderBlock::LineBreaker::nextSegmentBreak):
2013-07-17 Andreas Kling <akling@apple.com>
CSS selector list splitting should be by component, not by selector.
<http://webkit.org/b/118761>
<rdar://problem/14421609>
Reviewed by Antti Koivisto.
Test (amended): fast/css/rule-selector-overflow.html
* css/CSSSelectorList.h:
* css/CSSSelectorList.cpp:
(WebCore::CSSSelectorList::CSSSelectorList):
(WebCore::CSSSelectorList::componentCount):
* css/CSSStyleRule.cpp:
(WebCore::CSSStyleRule::setSelectorText):
Renamed CSSSelectorList::length() to componentCount() and made it public.
* css/RuleSet.h:
maximumSelectorCount => maximumSelectorComponentCount
* css/StyleRule.cpp:
(WebCore::StyleRule::splitIntoMultipleRulesWithMaximumSelectorComponentCount):
Make the splits after accumulating 'maximumSelectorComponentCount' components.
* css/StyleRule.h:
* css/StyleSheetContents.cpp:
(WebCore::StyleSheetContents::parserAppendRule):
splitIntoMultipleRulesWithMaximumSelectorCount => splitIntoMultipleRulesWithMaximumSelectorComponentCount
2013-07-17 Rob Buis <rwlbuis@webkit.org>
[Mac] REGRESSION(r152685): svg/custom/xlink-prefix-in-attributes.html failed unexpectedly
https://bugs.webkit.org/show_bug.cgi?id=118701
Reviewed by Ryosuke Niwa.
Use the computed attribute prefix, otherwise href being in xlink namespace but not having any prefix
will cause outputting the xlink namespace in appendNamespace.
Patch fixes svg/custom/xlink-prefix-in-attributes.html.
* editing/MarkupAccumulator.cpp:
(WebCore::MarkupAccumulator::appendAttribute):
2013-07-17 Chris Fleizach <cfleizach@apple.com>
Regression: columnheader/rowheader roles not exposed correctly
https://bugs.webkit.org/show_bug.cgi?id=113628
Reviewed by Tim Horton.
When we determine the row and column headers we look at the ARIA role being returned, but
since TableCell overrides the determineAccessibilityRole method, the ARIA role is never set.
Test: platform/mac/accessibility/aria-columnrowheaders.html
* accessibility/AccessibilityTableCell.cpp:
(WebCore::AccessibilityTableCell::determineAccessibilityRole):
2013-07-17 Christophe Dumez <ch.dumez@sisa.samsung.com>
Get rid of SVGPoint special case from the bindings generator
https://bugs.webkit.org/show_bug.cgi?id=118783
Reviewed by Kentaro Hara.
Get rid of SVGPoint special case from the bindings generator by adding a
new SVGPoint.h header that contains a typedef to FloatPoint.
Also use SVGPoint type in the implementation API for consistency with
the IDL.
No new tests, no behavior change.
* bindings/scripts/CodeGenerator.pm:
(SkipIncludeHeader):
* bindings/scripts/test/JS/JSTestObj.cpp:
(WebCore::jsTestObjMutablePoint):
(WebCore::jsTestObjImmutablePoint):
(WebCore::setJSTestObjMutablePoint):
(WebCore::setJSTestObjImmutablePoint):
(WebCore::jsTestObjPrototypeFunctionMutablePointFunction):
(WebCore::jsTestObjPrototypeFunctionImmutablePointFunction):
* bindings/scripts/test/JS/JSTestTypedefs.cpp:
(WebCore::jsTestTypedefsPrototypeFunctionImmutablePointFunction):
* bindings/scripts/test/ObjC/DOMTestObj.mm:
(-[DOMTestObj mutablePoint]):
(-[DOMTestObj immutablePoint]):
(-[DOMTestObj mutablePointFunction]):
(-[DOMTestObj immutablePointFunction]):
* bindings/scripts/test/ObjC/DOMTestTypedefs.mm:
(-[DOMTestTypedefs immutablePointFunction]):
* rendering/svg/RenderSVGRoot.cpp:
(WebCore::RenderSVGRoot::buildLocalToBorderBoxTransform):
* rendering/svg/SVGTextQuery.cpp:
(WebCore::SVGTextQuery::startPositionOfCharacter):
(WebCore::SVGTextQuery::endPositionOfCharacter):
(WebCore::SVGTextQuery::characterNumberAtPosition):
* rendering/svg/SVGTextQuery.h:
* svg/SVGPathElement.cpp:
(WebCore::SVGPathElement::getPointAtLength):
* svg/SVGPathElement.h:
* svg/SVGPathTraversalStateBuilder.cpp:
(WebCore::SVGPathTraversalStateBuilder::currentPoint):
* svg/SVGPathTraversalStateBuilder.h:
* svg/SVGPathUtilities.cpp:
(WebCore::getPointAtLengthOfSVGPathByteStream):
* svg/SVGPathUtilities.h:
* svg/SVGPoint.h: Added.
* svg/SVGPointList.cpp:
(WebCore::SVGPointList::valueAsString):
* svg/SVGPointList.h:
* svg/SVGSVGElement.cpp:
(WebCore::SVGSVGElement::createSVGPoint):
* svg/SVGSVGElement.h:
* svg/SVGTextContentElement.cpp:
(WebCore::SVGTextContentElement::getStartPositionOfChar):
(WebCore::SVGTextContentElement::getEndPositionOfChar):
(WebCore::SVGTextContentElement::getCharNumAtPosition):
* svg/SVGTextContentElement.h:
* svg/SVGZoomEvent.cpp:
(WebCore::SVGZoomEvent::previousTranslate):
(WebCore::SVGZoomEvent::newTranslate):
* svg/SVGZoomEvent.h:
2013-07-17 Carlos Garcia Campos <cgarcia@igalia.com>
[GStreamer] webkitwebsrc: use SubResourceLoader
https://bugs.webkit.org/show_bug.cgi?id=73743
Reviewed by Philippe Normand.
* GNUmakefile.list.am: Add new files to compilation.
* PlatformEfl.cmake: Ditto.
* PlatformGTK.cmake: Ditto.
* loader/SubresourceLoader.h: Add getOrCreateReadBuffer() when
using SOUP.
* loader/cache/CachedRawResource.h:
* loader/cache/CachedRawResourceClient.h:
(WebCore::CachedRawResourceClient::getOrCreateReadBuffer): Added
to allow the client to allocate the read buffer.
* loader/cache/CachedResource.h:
(WebCore::CachedResource::getOrCreateReadBuffer):
* loader/soup/CachedRawResourceSoup.cpp: Added.
(WebCore::CachedRawResource::getOrCreateReadBuffer): Iterate the
clients until one returns a valid read buffer or return NULL to
fallback to the default read buffer.
* loader/soup/SubresourceLoaderSoup.cpp: Added.
(WebCore::SubresourceLoader::getOrCreateReadBuffer): Call
CachedResource::getOrCreateReadBuffer().
* platform/graphics/gstreamer/WebKitWebSourceGStreamer.cpp:
(StreamingClient): Make this a CachedRawResourceClient.
(_WebKitWebSrcPrivate): Remove frame and resourceHandle and add a
cached resource handle.
(webKitWebSrcDispose): Clear the player pointer.
(webKitWebSrcStop): Remove the client from the cached resource.
(webKitWebSrcStart): Use CachedResourceLoader to schedule a
CachedRawResource load for the media without buffering the data.
(webKitWebSrcNeedDataMainCb): Call CachedResource::setDefersLoading.
(webKitWebSrcEnoughDataMainCb): Ditto.
(webKitWebSrcSetMediaPlayer): Simply update the player pointer.
(StreamingClient::responseReceived): Update to the
CachedRawResourceClient API.
(StreamingClient::dataReceived): Ditto.
(StreamingClient::getOrCreateReadBuffer): Ditto.
(StreamingClient::notifyFinished): Ditto.
2013-07-17 Kwang Yul Seo <skyul@company100.net>
Remove unused member variable m_domURL from WorkerGlobalScope
https://bugs.webkit.org/show_bug.cgi?id=118784
Reviewed by Christophe Dumez.
WorkerContext::webkitURL() was removed in r107082, and this was the
only place where the member variable |m_domURL| in WorkerContext was
mutated. This variable is no longer needed and so it should be removed.
No behavior change.
* workers/WorkerGlobalScope.h:
2013-07-17 Mihai Maerean <mmaerean@adobe.com>
ASSERTION FAILED: layoutState->m_renderer == this in WebCore::RenderBlock::offsetFromLogicalTopOfFirstPage
https://bugs.webkit.org/show_bug.cgi?id=118587
Reviewed by David Hyatt.
The fix consists in not calling containingBlockLogicalHeightForPositioned for flow threads (in
RenderBox::availableLogicalHeightUsing) as it gets to handle the RenderView as it would have been flowed into
the flow thread.
Test: fast/regions/crash-div-outside-body-vertical-rl.html
* rendering/RenderBox.cpp:
(WebCore::RenderBox::availableLogicalHeightUsing):
2013-07-17 Kangil Han <kangil.han@samsung.com>
Use toHTMLMediaElement
https://bugs.webkit.org/show_bug.cgi?id=118727
Reviewed by Ryosuke Niwa.
To avoid direct use of static_cast, this patch uses toHTMLMediaElement for code cleanup.
* bindings/js/JSHTMLMediaElementCustom.cpp:
(WebCore::JSHTMLMediaElement::setController):
* html/HTMLMediaElement.h:
(WebCore::toHTMLMediaElement):
* html/HTMLSourceElement.cpp:
(WebCore::HTMLSourceElement::insertedInto):
(WebCore::HTMLSourceElement::removedFrom):
* html/HTMLTrackElement.cpp:
(WebCore::HTMLTrackElement::removedFrom):
(WebCore::HTMLTrackElement::mediaElement):
* html/shadow/MediaControlElementTypes.cpp:
(WebCore::toParentMediaElement):
* loader/SubframeLoader.cpp:
(WebCore::SubframeLoader::loadMediaPlayerProxyPlugin):
* page/FrameView.cpp:
(WebCore::FrameView::updateWidget):
* platform/efl/RenderThemeEfl.cpp:
(WebCore::RenderThemeEfl::paintMediaFullscreenButton):
(WebCore::RenderThemeEfl::paintMediaMuteButton):
(WebCore::RenderThemeEfl::paintMediaToggleClosedCaptionsButton):
* platform/graphics/wince/MediaPlayerProxy.cpp:
(WebCore::WebMediaPlayerProxy::initEngine):
(WebCore::WebMediaPlayerProxy::element):
* platform/gtk/RenderThemeGtk.cpp:
(WebCore::getMediaElementFromRenderObject):
* rendering/HitTestResult.cpp:
(WebCore::HitTestResult::mediaElement):
* rendering/RenderLayerBacking.cpp:
(WebCore::RenderLayerBacking::updateGraphicsLayerConfiguration):
* rendering/RenderLayerCompositor.cpp:
(WebCore::RenderLayerCompositor::requiresCompositingForVideo):
* rendering/RenderMedia.cpp:
(WebCore::RenderMedia::mediaElement):
* rendering/RenderThemeMac.mm:
(WebCore::RenderThemeMac::paintMediaSliderTrack):
* rendering/RenderThemeWinCE.cpp:
(WebCore::mediaElementParent):
* testing/Internals.cpp:
(WebCore::Internals::simulateAudioInterruption):
2013-07-16 Ryuan Choi <ryuan.choi@samsung.com>
Remove Platform(EFL) guard from Widget::frameRectsChanged
https://bugs.webkit.org/show_bug.cgi?id=118782
Reviewed by Christophe Dumez.
Since r58487, Widget::frameRectsChanged was moved to cpp and guarded.
But we can move back to header because WebKit/Efl refactored related code in r145710.
No new tests, refactoring.
* platform/Widget.cpp: Removed platform guard and move frameRectsChangd() back to header.
* platform/Widget.h:
(WebCore::Widget::frameRectsChanged):
* platform/efl/WidgetEfl.cpp:
2013-07-16 Alex Christensen <achristensen@apple.com>
Update ANGLE to r2426.
https://bugs.webkit.org/show_bug.cgi?id=118550
Reviewed by Dean Jackson.
* CMakeLists.txt: Renamed DetectRecursion to DetectCallDepth and added builtin_symbol_table.
2013-07-16 Tim Horton <timothy_horton@apple.com>
Many crashes loading Java applets after r152701
https://bugs.webkit.org/show_bug.cgi?id=118760
<rdar://problem/14462836>
Reviewed by Dean Jackson.
* html/HTMLAppletElement.cpp:
(WebCore::HTMLAppletElement::updateWidget):
Re-acquire the renderer after calling createJavaAppletWidget,
because it can cause reattach, leaving our renderer pointer stale.
* loader/SubframeLoader.cpp:
(WebCore::SubframeLoader::createJavaAppletWidget):
Null-check renderer, as element->renderEmbeddedObject() can very clearly
return null in some cases.
2013-07-16 Pratik Solanki <psolanki@apple.com>
Missing break in WebGLRenderingContext::validateCompressedTexFuncData()
https://bugs.webkit.org/show_bug.cgi?id=118742
Reviewed by Ryosuke Niwa.
* html/canvas/WebGLRenderingContext.cpp:
(WebCore::WebGLRenderingContext::validateCompressedTexFuncData):
2013-07-16 Andreas Kling <akling@apple.com>
Atomicize HTMLAnchorElement.hash before passing it to JS.
<http://webkit.org/b/118748>
<rdar://problem/14459780>
Reviewed by Sam Weinig.
Instead of generating a unique string from '#' + the URL hash every time HTMLAnchorElement.hash
is queried, turn it into an AtomicString. This prevents massive memory usage in scripts that
fetch .hash a lot.
Reduces memory consumption by 4.65 MB when viewing the full HTML5 spec at <http://whatwg.org/c>
* html/HTMLAnchorElement.cpp:
(WebCore::HTMLAnchorElement::hash):
2013-07-16 Brendan Long <b.long@cablelabs.com>
Make WebVTTParser return cue data instead of cue DOM objects
https://bugs.webkit.org/show_bug.cgi?id=118687
Reviewed by Eric Carlson.
No new tests because this doesn't change functionality.
* html/track/InbandTextTrack.cpp:
Make TextTrackCueMap handle WebVTTCues instead of just generic cues.
m_dataToCueMap and m_cueToDataMap were renamed m_genericDataToCueMap
and m_genericCueToDataMap. The cue maps were turned into pointers so we
only allocate the ones we need.
(WebCore::TextTrackCueMap::TextTrackCueMap): Initialize maps to 0.
(WebCore::TextTrackCueMap::~TextTrackCueMap): Delete allocated maps.
(WebCore::TextTrackCueMap::add): Changed to allocate cue maps as needed, and added WebVTT version.
(WebCore::TextTrackCueMap::find): Checked to check if cue maps are allocated, and added WebVTT version.
(WebCore::TextTrackCueMap::findGenericData): Changed to accept TextTrackCue instead of TextTrackCueGeneric.
(WebCore::TextTrackCueMap::findWebVTTData): Same as findGenericData, except for WebVTTCueData.
(WebCore::TextTrackCueMap::remove): Accept TextTrackCue instead of TextTrackCueGeneric, and look in both maps.
(WebCore::InbandTextTrack::addWebVTTCue): Added, based on addGenericCue.
(WebCore::InbandTextTrack::removeWebVTTCue): Added, almost identical to removeGenericCue.
(WebCore::InbandTextTrack::removeCue): m_cueMap.remove() takes a TextTrackCue now so it can remove both types of cue.
(WebCore::InbandTextTrack::willRemoveTextTrackPrivate): Use ASSERT_UNUSED instead of UNUSED_PARAM + ASSERT.
* html/track/InbandTextTrack.h: Add new functions above, change maps to pointers and add maps for holding WebVTT cues.
* html/track/WebVTTParser.cpp:
(WebCore::WebVTTParser::getNewCues): Return WebVTTCueData instead of TextTrackCue.
(WebCore::WebVTTParser::createNewCue): Create WebVTTCueData instead of TextTrackCue.
* html/track/WebVTTParser.h: Add WebVTTCueData class, based on GenericCueData.
The following functions are just constructors, destructors, getters, or setters.
(WebCore::WebVTTCueData::create):
(WebCore::WebVTTCueData::~WebVTTCueData):
(WebCore::WebVTTCueData::startTime):
(WebCore::WebVTTCueData::setStartTime):
(WebCore::WebVTTCueData::endTime):
(WebCore::WebVTTCueData::setEndTime):
(WebCore::WebVTTCueData::id):
(WebCore::WebVTTCueData::setId):
(WebCore::WebVTTCueData::content):
(WebCore::WebVTTCueData::setContent):
(WebCore::WebVTTCueData::settings):
(WebCore::WebVTTCueData::setSettings):
(WebCore::WebVTTCueData::WebVTTCueData):
* loader/TextTrackLoader.cpp:
(WebCore::TextTrackLoader::getNewCues): Convert WebVTTCueData to TextTrackCue when we get them.
* platform/graphics/InbandTextTrackPrivateClient.h: Add addWebVTTCue and removeWebVTTCue functions to the interface.
2013-07-16 Tim Horton <timothy_horton@apple.com>
Use the correct cursor value for the unavailable plugin indicator
https://bugs.webkit.org/show_bug.cgi?id=118747
<rdar://problem/14456498>
Reviewed by Dean Jackson.
CSS says "pointer" is the hand cursor, not "hand".
* css/unavailablePlugIns.css:
(object::-webkit-unavailable-plugin-content > div):
(object::-webkit-unavailable-plugin-content > div > span):
2013-07-16 Simon Fraser <simon.fraser@apple.com>
Protect against the LayerFlushController being deleted inside its flushLayers() callback
https://bugs.webkit.org/show_bug.cgi?id=118741
Reviewed by Tim Horton.
It's possible (especially on iOS) for the LayerFlushController to be destroyed
inside its callback, via -[WebView _close]. Protect against this by making
it refcounted, and holding a ref across the callback.
Due to the odd relationship in which LayerFlushController owns its LayerFlushScheduler
by value, we achieve this by allowing subclasses of LayerFlushScheduler
to override runLoopObserverCallback(). WebViewLayerFlushScheduler uses the
override to protect the owner of the LayerFlushScheduler, which is the
LayerFlushController, when the callback is firing.
* WebCore.exp.in:
* platform/graphics/ca/LayerFlushScheduler.h: Make runLoopObserverCallback() and the dtor virtual.
2013-07-16 Christophe Dumez <ch.dumez@sisa.samsung.com>
Get rid of multiple inheritance support from the bindings generators
https://bugs.webkit.org/show_bug.cgi?id=118353
Reviewed by Kentaro Hara.
Remove multiple inheritance support from the bindings generators (except
the ObjC one which still needs it for now). Multiple inheritance is no
longer supported in Web IDL and it makes the scripts more complex than
they needs to be.
Multiple inheritance support is no longer needed now that our SVG
interfaces have been updated to use the simpler SVG2 inheritance model
and use Web IDL 'implements' statements.
Note that the IDL parser still support multiple inheritance for now in
order not to break the ObjC bindings generator.
No new tests, no behavior change.
* bindings/scripts/CodeGenerator.pm:
* bindings/scripts/CodeGeneratorCPP.pm:
(GetParentImplClassName):
(GetParent):
(GenerateImplementation):
* bindings/scripts/CodeGeneratorGObject.pm:
(GetParentClassName):
(GetParentImplClassName):
(GetParentGObjType):
* bindings/scripts/CodeGeneratorJS.pm:
(GetParentClassName):
(GenerateHeader):
(GenerateImplementation):
(GenerateConstructorDefinition):
* bindings/scripts/CodeGeneratorObjC.pm:
(AddMethodsConstantsAndAttributesFromParentInterfaces):
(GenerateImplementation):
* bindings/scripts/IDLParser.pm:
(parseInterface):
(parseException):
(parseInheritance):
2013-07-16 Eric Carlson <eric.carlson@apple.com>
HTMLMediaElement should not add cues for disabled text tracks
https://bugs.webkit.org/show_bug.cgi?id=118682
Reviewed by Ryosuke Niwa.
Merge https://src.chromium.org/viewvc/blink?view=rev&revision=153810
Tests: media/track/track-disabled-addcue.html
media/track/track-disabled.html
* html/HTMLMediaElement.cpp:
(WebCore::HTMLMediaElement::textTrackAddCues): Do nothing if the track is disabled.
(WebCore::HTMLMediaElement::textTrackAddCue): Ditto.
2013-07-16 Krzysztof Czech <k.czech@ymail.com>
[ATK] Adds support for aria-haspopup property.
https://bugs.webkit.org/show_bug.cgi?id=117834
Reviewed by Christophe Dumez.
Adds support for aria-haspopup property.
Tests: accessibility/element-haspopup.html
accessibility/popup-button-title.html
* accessibility/atk/WebKitAccessibleWrapperAtk.cpp:
(webkitAccessibleGetAttributes):
2013-07-16 Víctor Manuel Jáquez Leal <vjaquez@igalia.com>
[texmap][GStreamer] upload onto the texture only the buffer to be painted
https://bugs.webkit.org/show_bug.cgi?id=118471
Reviewed by Philippe Normand.
Right now all the buffers are uploaded onto the texture. With this
logic pose situations where buffers that will not be painted are
uploaded.
This patch uploads only the buffers that are going to be shown.
With this approach, the buffers may arrive before a GraphicsLayer is
set, so we should be more cautious with GraphicsLayerTextureMapper's
client.
No new tests, covered by existing tests.
* platform/graphics/gstreamer/MediaPlayerPrivateGStreamerBase.cpp:
(WebCore::MediaPlayerPrivateGStreamerBase::MediaPlayerPrivateGStreamerBase):
(WebCore::MediaPlayerPrivateGStreamerBase::updateTexture):
(WebCore::MediaPlayerPrivateGStreamerBase::triggerRepaint):
(WebCore::MediaPlayerPrivateGStreamerBase::paint):
(WebCore::MediaPlayerPrivateGStreamerBase::paintToTextureMapper):
* platform/graphics/gstreamer/MediaPlayerPrivateGStreamerBase.h:
* platform/graphics/texmap/GraphicsLayerTextureMapper.cpp:
(WebCore::GraphicsLayerTextureMapper::~GraphicsLayerTextureMapper):
(WebCore::GraphicsLayerTextureMapper::setContentsToMedia):
2013-07-16 Víctor Manuel Jáquez Leal <vjaquez@igalia.com>
[GStreamer] verify and log the received caps in the video sink
https://bugs.webkit.org/show_bug.cgi?id=118559
Reviewed by Philippe Normand.
Verify the correctness of the received caps in the video sink, and
also log them for debugging purposes.
No new tests, no behavior change.
* platform/graphics/gstreamer/VideoSinkGStreamer.cpp:
(webkitVideoSinkSetCaps):
2013-07-16 Kangil Han <kangil.han@samsung.com>
Use toHTMLSelectElement and dismiss isHTMLSelectElement
https://bugs.webkit.org/show_bug.cgi?id=118714
Reviewed by Ryosuke Niwa.
To avoid direct use of static_cast, this patch introduces toHTMLIFrameElement for code cleanup.
Additionally, this patch removes isHTMLSelectElement because not all element subclasses can be checked by a combination of tag names.
* html/HTMLSelectElement.h:
(WebCore::toHTMLSelectElement):
* testing/Internals.cpp:
(WebCore::Internals::isSelectPopupVisible):
2013-07-15 Yuta Kitamura <yutak@chromium.org>
Fix a crash in Range::processContents().
NULL ptr in WebCore::Range::processAncestorsAndTheirSiblings
https://bugs.webkit.org/show_bug.cgi?id=77614
Reviewed by Ryosuke Niwa.
This change is ported from Blink revision 153483:
https://src.chromium.org/viewvc/blink?revision=153483&view=revision
This crash can be initiated by calling Range.detach() while deleteContents()
is processing the same range. Range::processContents() should save the state
of the range since mutation events can change the state of the range.
Test: fast/dom/Range/detach-range-during-deletecontents.html
* dom/Range.cpp:
(WebCore::Range::processContents):
* dom/RangeBoundaryPoint.h:
(WebCore::RangeBoundaryPoint::RangeBoundaryPoint):
2013-07-15 Ryosuke Niwa <rniwa@webkit.org>
Input element that becomes visible during a simulated click event from an associated label element doesn't get focused
https://bugs.webkit.org/show_bug.cgi?id=118700
Reviewed by Kent Tamura.
Inspired by https://chromium.googlesource.com/chromium/blink/+/6435f70d53403b250e261a914f30d55142f81476.
The bug was caused by isMouseFocusable() check in HTMLLabelElement::defaultEventHandler not updating the layout even
though the call to dispatchSimulatedClick may have dirtied the render tree.
Explicitly update the layout so that we have up-to-date render tree.
Test: fast/forms/label/label-becomes-visible-while-clicking-on-label.html
* html/HTMLLabelElement.cpp:
(WebCore::HTMLLabelElement::defaultEventHandler):
2013-07-15 Kangil Han <kangil.han@samsung.com>
Introduce toHTMLIFrameElement
https://bugs.webkit.org/show_bug.cgi?id=118672
Reviewed by Ryosuke Niwa.
To avoid direct use of static_cast, this patch introduces toHTMLIFrameElement for code cleanup.
* bindings/js/JSHTMLDocumentCustom.cpp:
(WebCore::JSHTMLDocument::nameGetter):
* css/StyleResolver.cpp:
(WebCore::StyleResolver::adjustRenderStyle):
* dom/Document.cpp:
(WebCore::Document::seamlessParentIFrame):
* html/HTMLIFrameElement.h:
(WebCore::toHTMLIFrameElement):
* rendering/RenderEmbeddedObject.cpp:
(WebCore::RenderEmbeddedObject::viewCleared):
* rendering/RenderIFrame.cpp:
(WebCore::RenderIFrame::isSeamless):
(WebCore::RenderIFrame::flattenFrame):
2013-07-15 Chris Rogers <crogers@google.com>
Add support for WaveShaperNode.oversample
https://bugs.webkit.org/show_bug.cgi?id=117435
Reviewed by Kenneth Russell.
Adapted from Blink:
https://codereview.chromium.org/15619003/
Please see specification for details:
https://dvcs.w3.org/hg/audio/raw-file/tip/webaudio/specification.html#WaveShaperNode
.oversample specifies what type of oversampling (if any) should be used when applying the shaping curve.
The default value is "none", meaning the curve will be applied directly to the input samples.
A value of "2x" or "4x" can improve the quality of the processing by avoiding some aliasing,
with the "4x" value yielding the highest quality.
Tests: webaudio/waveshaper-oversample-2x.html
webaudio/waveshaper-oversample-4x.html
* CMakeLists.txt:
* GNUmakefile.list.am:
* Modules/webaudio/WaveShaperDSPKernel.cpp:
(WebCore::WaveShaperDSPKernel::WaveShaperDSPKernel):
(WebCore::WaveShaperDSPKernel::lazyInitializeOversampling):
(WebCore::WaveShaperDSPKernel::process):
(WebCore::WaveShaperDSPKernel::processCurve):
(WebCore::WaveShaperDSPKernel::processCurve2x):
(WebCore::WaveShaperDSPKernel::processCurve4x):
(WebCore::WaveShaperDSPKernel::reset):
(WebCore::WaveShaperDSPKernel::latencyTime):
* Modules/webaudio/WaveShaperDSPKernel.h:
* Modules/webaudio/WaveShaperNode.cpp:
(WebCore::WaveShaperNode::WaveShaperNode):
(WebCore::WaveShaperNode::setOversample):
(WebCore::WaveShaperNode::oversample):
* Modules/webaudio/WaveShaperNode.h:
(WebCore::WaveShaperNode::latency):
* Modules/webaudio/WaveShaperNode.idl:
* Modules/webaudio/WaveShaperProcessor.cpp:
(WebCore::WaveShaperProcessor::WaveShaperProcessor):
(WebCore::WaveShaperProcessor::setOversample):
* Modules/webaudio/WaveShaperProcessor.h:
(WebCore::WaveShaperProcessor::oversample):
* WebCore.xcodeproj/project.pbxproj:
* platform/audio/DownSampler.cpp: Added.
(WebCore::DownSampler::DownSampler):
(WebCore::DownSampler::initializeKernel):
(WebCore::DownSampler::process):
(WebCore::DownSampler::reset):
(WebCore::DownSampler::latencyFrames):
* platform/audio/DownSampler.h: Added.
* platform/audio/UpSampler.cpp: Added.
(WebCore::UpSampler::UpSampler):
(WebCore::UpSampler::initializeKernel):
(WebCore::UpSampler::process):
(WebCore::UpSampler::reset):
(WebCore::UpSampler::latencyFrames):
* platform/audio/UpSampler.h: Added.
2013-07-15 Tim Horton <timothy_horton@apple.com>
Update blocked/missing plug-in UI
https://bugs.webkit.org/show_bug.cgi?id=118347
<rdar://problem/14209318>
Reviewed by Sam Weinig.
Patch by Anders Carlsson, Antoine Quint, Sam Weinig, and myself.
* CMakeLists.txt:
* DerivedSources.make:
* DerivedSources.pri:
* GNUmakefile.am:
* WebCore.exp.in:
* WebCore.vcxproj/WebCore.vcxproj:
* WebCore.vcxproj/WebCore.vcxproj.filters:
* WebCore.xcodeproj/project.pbxproj:
* css/CSSDefaultStyleSheets.cpp:
* css/unavailablePlugIns.css: Added.
Add new Source/WebCore/css/unavailablePlugIns.css stylesheet.
* dom/EventListener.h:
New event listener type to support the creation of an event listener
for the label and icon for missing / blocked plug-in UI.
* html/HTMLPlugInElement.cpp:
(WebCore::HTMLPlugInElement::defaultEventHandler):
Remove explicit event handling since we're now using a DOM event handler
on the label and icon in the shadow root.
* html/HTMLPlugInImageElement.cpp:
(WebCore::HTMLPlugInImageElement::didAddUserAgentShadowRoot):
Don't populate the shadow root with plugin snapshotting elements
if we're not planning on showing a snapshot, because this means that
the shadow root was created for the unavailable plugin indicator instead.
* page/ChromeClient.h:
(WebCore::ChromeClient::shouldUnavailablePluginMessageIncludeButton):
* rendering/RenderEmbeddedObject.cpp:
(WebCore::RenderEmbeddedObject::RenderEmbeddedObject):
(WebCore::shouldUnavailablePluginMessageIncludeButton):
Rename from shouldUnavailablePluginMessageBeButton to
shouldUnavailablePluginMessageIncludeButton for accuracy.
(WebCore::RenderEmbeddedObject::setPluginUnavailabilityReasonDescription):
Set custom text to be displayed in the unavailability indicator.
(WebCore::RenderEmbeddedObject::setPluginUnavailabilityReason):
(WebCore::RenderEmbeddedObject::handleUnavailablePluginButtonClickEvent):
(WebCore::RenderEmbeddedObject::willBeDestroyed):
(WebCore::RenderEmbeddedObject::isReplacementObscured):
(WebCore::RenderEmbeddedObjectEventListener::handleEvent):
(WebCore::RenderEmbeddedObjectEventListener::operator==):
Remove the old code used to render the missing / blocked plug-in UI in C++ in favor
of populating a shadow root in setPluginUnavailabilityReason(). We add a DOM event
listener in the shadow root to eventually call into unavailablePluginButtonClicked()
on the ChromeClient.
(WebCore::RenderEmbeddedObject::paint):
(WebCore::RenderEmbeddedObject::layout):
Paint and lay out UA shadow root children.
(WebCore::RenderEmbeddedObject::canHaveChildren):
canHaveChildren can use the existence of a UA shadow root to decide
whether a RenderEmbeddedObject can have children.
* rendering/RenderEmbeddedObject.h:
(WebCore::RenderEmbeddedObjectEventListener::create):
(WebCore::RenderEmbeddedObjectEventListener::cast):
(WebCore::RenderEmbeddedObjectEventListener::RenderEmbeddedObjectEventListener):
Create the new event listener class necessary to handle events in the shadow root.
(WebCore::RenderEmbeddedObject::pluginUnavailabilityReasonDescription): Added.
* rendering/RenderWidget.h:
Promote willBeDestroyed() to be public so we may override it in the RenderEmbeddedObject subclass.
2013-07-15 Andreas Kling <akling@apple.com>
Pack WebCore::Font slightly better.
<http://webkit.org/b/118681>
<rdar://problem/14446014>
Reviewed by Sam Weinig.
Knock 8 bytes off of Font by packing the members better. Reduces memory consumption by 429 kB when
viewing the full HTML5 spec at <http://whatwg.org/c>
* platform/graphics/Font.h:
(WebCore::Font::typesettingFeatures):
2013-07-15 Rob Buis <rwlbuis@webkit.org>
XMLSerializer doesn't include namespaces on nodes in HTML documents
https://bugs.webkit.org/show_bug.cgi?id=16496
Reviewed by Ryosuke Niwa.
Introduce a xml fragment serialization mode as indicated by
http://html5.org/specs/dom-parsing.html#xmlserializer (commit 00b84d2). In this mode
the XML fragment serialization algorithm is respected, the changes in this patch do the following:
- elements are self-closing if otherwise this would lead to invalid xml syntax.
- the resulting xml is XML namespace-well-formed (http://www.w3.org/TR/xml-names11/#Conformance).
This is achieved by always, when in xml fragment serialization mode, attempting to write out the element/attribute namespace,
preventing using the XML namespace as a default namespace and special casing the use of element's in XML namespace by using the xml prefix.
The chosen approach matches FireFox 25 behavior.
Test: fast/dom/dom-serialize-namespace.html
* WebCore.order: Adapt to changed createMarkup signature.
* editing/MarkupAccumulator.cpp:
(WebCore::MarkupAccumulator::MarkupAccumulator):
(WebCore::MarkupAccumulator::serializeNodesWithNamespaces): makes sure xml namespace/prefix is known so it is never used in namespace declarations.
(WebCore::MarkupAccumulator::appendNamespace): Avoid adding namespace declarations that do not differ from current default namespace.
(WebCore::MarkupAccumulator::appendOpenTag): Print xml prefix if the element's namespace is XML to avoid conflicts.
(WebCore::MarkupAccumulator::appendAttribute):
(WebCore::MarkupAccumulator::shouldAddNamespaceAttribute): Also take into account xmlns attributes with no namespace.
(WebCore::MarkupAccumulator::shouldSelfClose): Force self-closing to create well-formed XML elements.
* editing/MarkupAccumulator.h: Use EFragmentSerialization.
(WebCore::MarkupAccumulator::inXMLFragmentSerialization):
* editing/markup.cpp:
(WebCore::createMarkup):
* editing/markup.h: Add EFragmentSerialization enum.
* xml/XMLSerializer.cpp:
(WebCore::XMLSerializer::serializeToString):
2013-07-15 Ryosuke Niwa <rniwa@webkit.org>
MediaFragmentURIParser::parseFragments shouldn't upconvert 8-bit string
https://bugs.webkit.org/show_bug.cgi?id=118692
Reviewed by Michael Saboff.
Merge https://chromium.googlesource.com/chromium/blink/+/2aa17cc56a807f7e05d386d6eb66cda25e6b0542.
* html/MediaFragmentURIParser.cpp:
(WebCore::MediaFragmentURIParser::parseFragments):
2013-07-15 Kwang Yul Seo <skyul@company100.net>
NetworkStorageSession::createDefaultSession is only implemented by Soup
https://bugs.webkit.org/show_bug.cgi?id=118679
Reviewed by Alexey Proskuryakov.
Remove NetworkStorageSession::createDefaultSession() because
NetworkStorageSession::defaultStorageSession() returns the default
session.
No new tests, no behavior change.
* platform/network/NetworkStorageSession.h:
* platform/network/soup/NetworkStorageSessionSoup.cpp:
2013-07-15 Ryosuke Niwa <rniwa@webkit.org>
compositionstart event should contain the text to be replaced
https://bugs.webkit.org/show_bug.cgi?id=118684
Reviewed by Alexey Proskuryakov.
Merge https://chromium.googlesource.com/chromium/blink/+/9e04f728a95ad7d4783b1d31c3cdc1412dd6cc4d.
DOM3 level 3 specifies compositionstart event's data to be the text to be replaced.
http://www.w3.org/TR/DOM-Level-3-Events/#event-type-compositionstart
According to the author of the Blink change, IE10 on Windows and Firefox22 on Linux confirms
to the specified behavior.
Test: fast/events/ime-composition-events-001.html
* editing/Editor.cpp:
(WebCore::Editor::setComposition):
2013-07-15 Ryosuke Niwa <rniwa@webkit.org>
xmlDocPtrForString shouldn't upconvert 8-bit string
https://bugs.webkit.org/show_bug.cgi?id=118693
Reviewed by Michael Saboff.
Merge https://chromium.googlesource.com/chromium/blink/+/5d9b240db74591c3689415c7b7c5180fadb379e9
Prior to this changeset, we were upconverting the entire XML document.
Let xmllib2 parse a document as iso-8859-1 when it's a 8-bit string.
* xml/parser/XMLDocumentParserLibxml2.cpp:
(WebCore::nativeEndianUTF16Encoding):
(WebCore::xmlDocPtrForString):
2013-07-15 Roger Fong <roger_fong@apple.com>
Replace WKCACFTypes include with d3d9 include.
Rubberstamped by Eric Carlson.
* platform/graphics/avfoundation/cf/MediaPlayerPrivateAVFoundationCF.cpp:
2013-07-15 Antoine Quint <graouts@apple.com>
Text with "text-overflow:ellipsis" and an SVG font do not render correctly
https://bugs.webkit.org/show_bug.cgi?id=118669
Reviewed by David Kilzer.
Partial runs may be routed through the complex path in several Font functions. While incomplete,
we can check for a non-NULL run.renderingContext() and exempt runs that have it from being forced
down the complex path. A more thorough fix is already tracked by http://webkit.org/b/100050.
Adding a new testcase which is a copy of svg/text/text-overflow-ellipsis-svgfont.html with kerning
and ligatures turned on explicitly since DRT runs with those off by default and this option is required
to be on for the issue to reproduce.
Fix courtesy of Dan Bernstein.
Test: svg/text/text-overflow-ellipsis-svgfont-kerning-ligatures.html
* platform/graphics/Font.cpp:
(WebCore::Font::drawText):
(WebCore::Font::drawEmphasisMarks):
(WebCore::Font::selectionRectForText):
2013-07-15 peavo@outlook.com <peavo@outlook.com>
[Curl] Download does not replace existing file.
https://bugs.webkit.org/show_bug.cgi?id=118356
Reviewed by Brent Fulgham.
If the download target file already exists, it is not replaced after the download has finished.
At this point, the user would have already approved to replace the file, so it should be replaced.
* platform/network/curl/CurlDownload.cpp:
(CurlDownload::moveFileToDestination): Move file and replace it if it already exists.
If the new file is on a different volume, do a copy/delete operation.
2013-07-15 Luciano Wolf <luciano.wolf@openbossa.org>
[CoordinatedGraphics] Crash at CoordinatedGraphicsScene::updateImageBacking
https://bugs.webkit.org/show_bug.cgi?id=118613
The operations of creating/removing/updating/clearing weren't in the
right sequence. Changing the order solves the issue because when an image is
replaced the old one is deleted before the new one is created, and IDs are
not unique in cairo (they're based on the image pointer).
Reviewed by Noam Rosenthal.
* platform/graphics/texmap/coordinated/CoordinatedGraphicsScene.cpp:
(WebCore::CoordinatedGraphicsScene::syncImageBackings):
2013-07-15 Brian Holt <brian.holt@samsung.com>
[ATK] Leak: Leak in WebKitAccessibleTextGetText
https://bugs.webkit.org/show_bug.cgi?id=118596
Reviewed by Carlos Garcia Campos.
Fixed memory leak.
* accessibility/atk/WebKitAccessibleInterfaceText.cpp:
(getGailTextUtilForAtk):
2013-07-14 Jon Lee <jonlee@apple.com>
Origins with invalid ports are not marked as unique (118652)
https://bugs.webkit.org/show_bug.cgi?id=118652
<rdar://problem/14437753>
Reviewed by Sam Weinig.
* page/SecurityOrigin.cpp:
(WebCore::SecurityOrigin::create): Return a unique origin if the port is out of range.
2013-07-14 Ryosuke Niwa <rniwa@webkit.org>
Another Qt build fix attempt after r152619.
* dom/QualifiedName.cpp:
(WebCore::QualifiedName::toString):
2013-07-14 Ryosuke Niwa <rniwa@webkit.org>
Qt build fix attempt after r152619.
* dom/QualifiedName.cpp:
(WebCore::QualifiedName::toString):
2013-07-14 Ryosuke Niwa <rniwa@webkit.org>
Mac build fix attempt after r152615.
* svg/SVGFilterElement.h:
2013-07-14 Ryosuke Niwa <rniwa@webkit.org>
Modernize QualifiedName by wrapping gNameCache in a function and using more early exits
https://bugs.webkit.org/show_bug.cgi?id=118299
Reviewed by Andreas Kling.
Address Ben's review comment.
* dom/QualifiedName.cpp:
(WebCore::QualifiedName::toString):
2013-07-14 Ryosuke Niwa <rniwa@webkit.org>
HTMLTextFormControlElement::valueWithHardLineBreaks shouldn't upconvert 8-bit string
https://bugs.webkit.org/show_bug.cgi?id=118631
Reviewed by Andreas Kling.
Merge https://chromium.googlesource.com/chromium/blink/+/2c7c70a7bd3d61bfbf97de95c459ec9f40b46e31.
* html/HTMLTextFormControlElement.cpp:
(WebCore::HTMLTextFormControlElement::valueWithHardLineBreaks):
2013-07-14 Gyuyoung Kim <gyuyoung.kim@samsung.com>
Add toSVGFilterElement() and use it.
https://bugs.webkit.org/show_bug.cgi?id=118653
Reviewed by Ryosuke Niwa.
We can use toSVGFilterElement() instead of using static_cast<..> to improve readability.
Blink also uses it.
No new tests, no behavior change.
* rendering/svg/RenderSVGResourceFilter.cpp:
(WebCore::RenderSVGResourceFilter::buildPrimitives):
(WebCore::RenderSVGResourceFilter::applyResource):
(WebCore::RenderSVGResourceFilter::resourceBoundingBox):
* rendering/svg/RenderSVGResourceFilter.h:
(WebCore::RenderSVGResourceFilter::filterUnits):
(WebCore::RenderSVGResourceFilter::primitiveUnits):
* rendering/svg/SVGResources.cpp:
(WebCore::targetReferenceFromResource):
* svg/SVGFilterElement.h:
(WebCore::toSVGFilterElement):
2013-07-14 Kangil Han <kangil.han@samsung.com>
Introduce toHTMLVideoElement
https://bugs.webkit.org/show_bug.cgi?id=118582
Reviewed by Ryosuke Niwa.
To avoid direct use of static_cast, this patch introduces toHTMLVideoElement.
* html/HTMLMediaElement.cpp:
(WebCore::HTMLMediaElement::getPluginProxyParams):
* html/HTMLVideoElement.h:
(WebCore::toHTMLVideoElement):
* html/MediaDocument.cpp:
(WebCore::MediaDocumentParser::createDocumentStructure):
(WebCore::descendentVideoElement):
(WebCore::ancestorVideoElement):
* html/shadow/MediaControlElements.cpp:
(WebCore::MediaControlTextTrackContainerElement::updateDisplay):
* rendering/HitTestResult.cpp:
(WebCore::HitTestResult::enterFullscreenForVideo):
* rendering/RenderVideo.cpp:
(WebCore::RenderVideo::videoElement):
2013-07-13 Commit Queue <commit-queue@webkit.org>
Unreviewed, rolling out r151978.
http://trac.webkit.org/changeset/151978
https://bugs.webkit.org/show_bug.cgi?id=118651
Caused regressions at least 3 websites (Requested by rniwa on
#webkit).
* bindings/js/JSDOMBinding.cpp:
* bindings/js/JSDOMBinding.h:
* bindings/scripts/CodeGeneratorJS.pm:
(GetNativeTypeFromSignature):
(JSValueToNative):
* bindings/scripts/IDLAttributes.txt:
* bindings/scripts/test/JS/JSTestObj.cpp:
(WebCore::setJSTestObjReflectedStringAttr):
(WebCore::setJSTestObjReflectedURLAttr):
(WebCore::setJSTestObjReflectedCustomURLAttr):
* dom/Document.idl:
* dom/Element.idl:
* dom/Node.idl:
2013-07-13 Joone Hur <joone.hur@intel.com>
Caret should respect text background color
https://bugs.webkit.org/show_bug.cgi?id=117493
Reviewed by Ryosuke Niwa.
This patch allows the caret to become visible in the black background
by getting the caret color from the color of the element containing
the text, not the parent element that has the contentEditable attribute.
Test: editing/caret/caret-color.html
* editing/FrameSelection.cpp:
(WebCore::CaretBase::paintCaret):
2013-07-13 Ryosuke Niwa <rniwa@webkit.org>
Avoid upconverting strings in various places in WebCore
https://bugs.webkit.org/show_bug.cgi?id=118632
Reviewed by Andreas Kling.
Avoid calling String::characters() in various places since it upconverts 8-bit strings to 16-bit strings.
Merge
https://chromium.googlesource.com/chromium/blink/+/a6162e2ad7c7870e22445d3c463d17e7ac871e80
https://chromium.googlesource.com/chromium/blink/+/18095209b3f467758b83894e7b14f813f6953f81
https://chromium.googlesource.com/chromium/blink/+/fefcf2b95d55f24c60fd2e95978cf4544f3c92ca
https://chromium.googlesource.com/chromium/blink/+/8e0527b0fb33998318aedfd74b3511025f7ff294
https://chromium.googlesource.com/chromium/blink/+/feaf798b04597b0849b4000fc305264895d3eac5
https://chromium.googlesource.com/chromium/blink/+/bd1a49103a6e07b1023d2c742d8217769efbffb4
* css/CSSParser.cpp:
(WebCore::CSSParser::setupParser):
(WebCore::CSSParser::parseImageSet):
(WebCore::CSSParser::rewriteSpecifiers):
* css/CSSParserValues.h:
(WebCore::CSSParserString::init):
(WebCore::CSSParserString::clear):
* dom/DatasetDOMStringMap.cpp:
(WebCore::isValidAttributeName):
(WebCore::convertAttributeNameToPropertyName):
(WebCore::propertyNameMatchesAttributeName):
(WebCore::isValidPropertyName):
(WebCore::convertPropertyNameToAttributeName):
* dom/Range.cpp:
(WebCore::Range::toString):
* dom/SecurityContext.cpp:
(WebCore::SecurityContext::parseSandboxPolicy):
* html/canvas/CanvasRenderingContext2D.cpp:
(WebCore::CanvasRenderingContext2D::measureText):
* html/track/TextTrackCue.cpp:
(WebCore::TextTrackCue::markFutureAndPastNodes):
2013-07-13 Ryosuke Niwa <rniwa@webkit.org>
parseHTMLInteger shouldn't upconvert 8-bit string
https://bugs.webkit.org/show_bug.cgi?id=118629
Reviewed by Sam Weinig.
Merge https://chromium.googlesource.com/chromium/blink/+/e0ebab23e0c16b49dc90c9c39b8bbbf4f243a01e.
* html/parser/HTMLParserIdioms.cpp:
(WebCore::parseHTMLInteger):
2013-07-12 Eric Carlson <eric.carlson@apple.com>
[iOS] TextTrackRepresentation not cleared when captions are disabled
https://bugs.webkit.org/show_bug.cgi?id=118623
Reviewed by Dean Jackson.
* html/shadow/MediaControlElements.cpp:
(WebCore::MediaControlTextTrackContainerElement::updateDisplay): Do not return immediately
when captions are disabled so the necessary cleanup happens.
2013-07-12 Brent Fulgham <bfulgham@apple.com>
[Windows] Attempt to satisfy the Open Source Windows bots.
* DerivedSources.make: Restore the HAVE_AVCF macro detection.
* config.h: Return to using HAVE_AVCF to activate AVFoundation code.
2013-07-12 peavo@outlook.com <peavo@outlook.com>
[WinCairo] Compile fix.
https://bugs.webkit.org/show_bug.cgi?id=118461
Reviewed by Brent Fulgham.
* config.h: Only enable AVFOUNDATION for Windows if CoreGraphics is used.
2013-07-12 Oleg Beletski <oleg.beletski@gmail.com>
[EFL] --minimal build fails while linking libwebcore_efl.so
https://bugs.webkit.org/show_bug.cgi?id=118549
Reviewed by Christophe Dumez.
* CMakeLists.txt:
Moving file plugins/PluginPackage.cpp to ENABLE_NETSCAPE_PLUGIN_API block.
2013-07-12 Allan Sandfeld Jensen <allan.jensen@digia.com>
Insufficient viewport repaints when FrameView::paintsEntireContents
https://bugs.webkit.org/show_bug.cgi?id=118562
Reviewed by Simon Fraser.
When the frameview paints entire content, the visualOverflowRect of RenderView
should be the same as the layoutOverflowRect.
This affects the requested repaints on resize of the frameview.
* rendering/RenderView.cpp:
(WebCore::RenderView::visualOverflowRect):
* rendering/RenderView.h:
2013-07-10 Roger Fong <roger_fong@apple.com>
Plugins that don't support snapshotting should not all autostart.
https://bugs.webkit.org/show_bug.cgi?id=118572
<rdar://problem/14324391>.
Reviewed by Dean Jackson.
Test: plugins/snapshotting/quicktime-plugin-snapshotted.html
* html/HTMLPlugInImageElement.cpp:
(WebCore::HTMLPlugInImageElement::didAddUserAgentShadowRoot): Pass in information about whether or not a snapshot exists
to the shadow dom.
* plugins/PluginViewBase.h:
(WebCore::PluginViewBase::shouldNotAddLayer): This method determines whether or not we should add the plugin's layer to the tree.
It should not be added if the plugin is in it's snapshotted state but does not actually support snapshotting.
* rendering/RenderLayerBacking.cpp:
(WebCore::RenderLayerBacking::updateGraphicsLayerConfiguration): We should only add the layer to the tree when the plugin
is actually playing. Otherwise we run into an issue where the contents of the layer initially appear on the screen briefly
on page load before we display the substitute for a plugin that doesn't support snapshotting.
2013-07-11 Dan Bernstein <mitz@apple.com>
[mac] No API for getting the page visibility state of a WebView
https://bugs.webkit.org/show_bug.cgi?id=118578
Reviewed by Simon Fraser.
* WebCore.exp.in: Export WebCore::Page::visibilityState().
2013-07-11 Mario Sanchez Prada <mario.prada@samsung.com>
[GTK] Layout Test accessibility/deleting-iframe-destroys-axcache.html, platform/gtk/accessibility/replaced-objects-in-anonymous-blocks.html are failing
https://bugs.webkit.org/show_bug.cgi?id=118552
Reviewed by Chris Fleizach.
Do not assume always that we have a RenderText renderer when
calling to toRenderText(), since we might be executing that part
of the code due to have requested to include all the children.
* accessibility/AccessibilityRenderObject.cpp:
(WebCore::AccessibilityRenderObject::textUnderElement): Add
missing guard for RenderText, needed after r152537.
2013-07-11 Andrei Bucur <abucur@adobe.com>
[CSS Regions] In a region chain with auto-height regions, lines get their length based only on the first region
https://bugs.webkit.org/show_bug.cgi?id=118531
Reviewed by Alexandru Chiculita.
When computing the height a flow thread it's possible to overflow the maximum LayoutUnit and obtain a negative value.
This leads to invalid results during layout when computing the region range and the RenderBoxRegion info for the
descendant boxes of the flow thread.
This issue appears especially during the auto-height algorithm because it initializes the auto-height regions
height with the LayoutUnit::max() / 2 value. Summing two such regions overflows and results in a negative value.
The fix clamps the maximum height of the flow thread to LayoutUnit::max() / 2. This doesn't affect the auto-height
algorithm because regionAtBlockOffset() will still return the correct values as the auto-height regions content
is established and their height updated.
Tests: fast/regions/autoheight-correct-region-for-lines-2.html
fast/regions/autoheight-correct-region-for-lines.html
* rendering/RenderBlock.cpp:
(WebCore::RenderBlock::updateRegionsAndShapesBeforeChildLayout):
* rendering/RenderFlowThread.cpp:
(WebCore::RenderFlowThread::computeLogicalHeight):
(WebCore::RenderFlowThread::setRegionRangeForBox):
(WebCore::RenderFlowThread::updateRegionsFlowThreadPortionRect):
* rendering/RenderFlowThread.h:
* rendering/RenderRegion.cpp:
(WebCore::RenderRegion::maxPageLogicalHeight):
2013-07-11 Timothy Hatcher <timothy@apple.com>
Revert r152267 and soft link WebInspectorUI.framework again.
https://bugs.webkit.org/show_bug.cgi?id=118544
Reviewed by David Kilzer.
* platform/mac/SoftLinking.h: Rename SOFT_LINK_STAGED_FRAMEWORK_OPTIONAL
to SOFT_LINK_STAGED_FRAMEWORK and ASSERT since we don't want to silently
fail anymore when using this macro.
2013-07-11 Jae Hyun Park <jae.park@company100.net>
[Coordinated Graphics] Parameter of commitSceneState should be const
https://bugs.webkit.org/show_bug.cgi?id=118564
Reviewed by Noam Rosenthal.
Parameter of commitSceneState should be const as there should not be any
modifications to the passed CoordinatedGraphicsState.
* platform/graphics/texmap/coordinated/CompositingCoordinator.h:
2013-07-11 Radu Stavila <stavila@adobe.com>
NamedFlowCollection getters should follow the same pattern as HTMLCollection
https://bugs.webkit.org/show_bug.cgi?id=118561
Reviewed by Christophe Dumez.
Modified item and namedItem methods from DOMNamedFlowCollection to return null instead of undefined.
https://www.w3.org/Bugs/Public/show_bug.cgi?id=22617
Completely removed the TreatReturnedNullObjectAs attribute as it was only used by the DOMNamedFlowCollection interface.
Test: fast/regions/webkit-named-flow-collection-empty-getters.html
* bindings/scripts/CodeGeneratorJS.pm:
(GenerateImplementationFunctionCall):
* bindings/scripts/IDLAttributes.txt:
* bindings/scripts/test/CPP/WebDOMTestObj.cpp:
(WebDOMTestObj::treatReturnedNullObjectAsUndefined):
* bindings/scripts/test/CPP/WebDOMTestObj.h:
* bindings/scripts/test/GObject/WebKitDOMTestObj.cpp:
(webkit_dom_test_obj_treat_returned_null_object_as_undefined):
* bindings/scripts/test/GObject/WebKitDOMTestObj.h:
* bindings/scripts/test/JS/JSTestObj.cpp:
(WebCore::jsTestObjPrototypeFunctionTreatReturnedNullObjectAsUndefined):
* bindings/scripts/test/JS/JSTestObj.h:
* bindings/scripts/test/ObjC/DOMTestObj.h:
* bindings/scripts/test/ObjC/DOMTestObj.mm:
(-[DOMTestObj treatReturnedNullObjectAsUndefined]):
* bindings/scripts/test/TestObj.idl:
* dom/DOMNamedFlowCollection.idl:
2013-07-11 Andreas Kling <akling@apple.com>
Revert r149313: Don't check for @media rules affected by viewport changes in every layout.
<rdar://problem/14277905>
Rubber-stamped by Antti Koivisto.
This changed caused more harm than good. setFrameRect() is not the only path in FrameView
that can cause media queries to need invalidation.
* page/FrameView.cpp:
(WebCore::FrameView::setFrameRect):
(WebCore::FrameView::layout):
2013-07-11 Kangil Han <kangil.han@samsung.com>
Introduce isHTMLTitleElement and toHTMLTitleElement
https://bugs.webkit.org/show_bug.cgi?id=118558
Reviewed by Andreas Kling.
To enhance readability, this patch introduces isHTMLTitleElement and toHTMLTitleElement.
This also helps out to reduce duplicated use of static_cast.
* dom/Document.cpp:
(WebCore::Document::setTitle):
(WebCore::Document::removeTitle):
* editing/ReplaceSelectionCommand.cpp:
(WebCore::removeHeadContents):
* html/HTMLTitleElement.h:
(WebCore::isHTMLTitleElement):
(WebCore::toHTMLTitleElement):
2013-07-11 Patrick Gansterer <paroga@webkit.org>
Remove unused Windows CE files
https://bugs.webkit.org/show_bug.cgi?id=118557
Reviewed by Andreas Kling.
* platform/wince/CursorWinCE.cpp: Removed.
* platform/wince/PasteboardWinCE.cpp: Removed.
* platform/wince/SearchPopupMenuWinCE.cpp: Removed.
2013-07-11 Christophe Dumez <ch.dumez@sisa.samsung.com>
Get rid of SVGPathSeg* special casing in the bindings generator
https://bugs.webkit.org/show_bug.cgi?id=118525
Reviewed by Kentaro Hara.
Have one header per SVGPathSeg* type so that we no longer need special casing
for them in the JSC bindings generator.
No new tests, no behavior change.
* GNUmakefile.list.am:
* Target.pri:
* WebCore.vcxproj/WebCore.vcxproj:
* WebCore.vcxproj/WebCore.vcxproj.filters:
* WebCore.xcodeproj/project.pbxproj:
* bindings/js/JSSVGPathSegCustom.cpp:
* bindings/scripts/CodeGeneratorJS.pm:
(AddIncludesForType):
(NativeToJSValue):
* svg/SVGPathElement.cpp:
* svg/SVGPathSegArc.h:
* svg/SVGPathSegArcAbs.h: Added.
(WebCore::SVGPathSegArcAbs::create):
(WebCore::SVGPathSegArcAbs::SVGPathSegArcAbs):
(WebCore::SVGPathSegArcAbs::pathSegType):
(WebCore::SVGPathSegArcAbs::pathSegTypeAsLetter):
* svg/SVGPathSegArcRel.h: Added.
(WebCore::SVGPathSegArcRel::create):
(WebCore::SVGPathSegArcRel::SVGPathSegArcRel):
(WebCore::SVGPathSegArcRel::pathSegType):
(WebCore::SVGPathSegArcRel::pathSegTypeAsLetter):
* svg/SVGPathSegCurvetoCubic.h:
* svg/SVGPathSegCurvetoCubicAbs.h: Added.
(WebCore::SVGPathSegCurvetoCubicAbs::create):
(WebCore::SVGPathSegCurvetoCubicAbs::SVGPathSegCurvetoCubicAbs):
(WebCore::SVGPathSegCurvetoCubicAbs::pathSegType):
(WebCore::SVGPathSegCurvetoCubicAbs::pathSegTypeAsLetter):
* svg/SVGPathSegCurvetoCubicRel.h: Added.
(WebCore::SVGPathSegCurvetoCubicRel::create):
(WebCore::SVGPathSegCurvetoCubicRel::SVGPathSegCurvetoCubicRel):
(WebCore::SVGPathSegCurvetoCubicRel::pathSegType):
(WebCore::SVGPathSegCurvetoCubicRel::pathSegTypeAsLetter):
* svg/SVGPathSegCurvetoCubicSmooth.h:
* svg/SVGPathSegCurvetoCubicSmoothAbs.h: Copied from Source/WebCore/svg/SVGPathSegCurvetoCubicSmooth.h.
(WebCore::SVGPathSegCurvetoCubicSmoothAbs::create):
(WebCore::SVGPathSegCurvetoCubicSmoothAbs::SVGPathSegCurvetoCubicSmoothAbs):
(WebCore::SVGPathSegCurvetoCubicSmoothAbs::pathSegType):
(WebCore::SVGPathSegCurvetoCubicSmoothAbs::pathSegTypeAsLetter):
* svg/SVGPathSegCurvetoCubicSmoothRel.h: Copied from Source/WebCore/svg/SVGPathSegCurvetoCubicSmooth.h.
(WebCore::SVGPathSegCurvetoCubicSmoothRel::create):
(WebCore::SVGPathSegCurvetoCubicSmoothRel::SVGPathSegCurvetoCubicSmoothRel):
(WebCore::SVGPathSegCurvetoCubicSmoothRel::pathSegType):
(WebCore::SVGPathSegCurvetoCubicSmoothRel::pathSegTypeAsLetter):
* svg/SVGPathSegCurvetoQuadratic.h:
* svg/SVGPathSegCurvetoQuadraticAbs.h: Copied from Source/WebCore/svg/SVGPathSegCurvetoQuadratic.h.
(WebCore::SVGPathSegCurvetoQuadraticAbs::create):
(WebCore::SVGPathSegCurvetoQuadraticAbs::SVGPathSegCurvetoQuadraticAbs):
(WebCore::SVGPathSegCurvetoQuadraticAbs::pathSegType):
(WebCore::SVGPathSegCurvetoQuadraticAbs::pathSegTypeAsLetter):
* svg/SVGPathSegCurvetoQuadraticRel.h: Copied from Source/WebCore/svg/SVGPathSegCurvetoQuadratic.h.
(WebCore::SVGPathSegCurvetoQuadraticRel::create):
(WebCore::SVGPathSegCurvetoQuadraticRel::SVGPathSegCurvetoQuadraticRel):
(WebCore::SVGPathSegCurvetoQuadraticRel::pathSegType):
(WebCore::SVGPathSegCurvetoQuadraticRel::pathSegTypeAsLetter):
* svg/SVGPathSegCurvetoQuadraticSmoothAbs.h: Copied from Source/WebCore/svg/SVGPathSegCurvetoQuadraticSmooth.h.
(WebCore::SVGPathSegCurvetoQuadraticSmoothAbs::create):
(WebCore::SVGPathSegCurvetoQuadraticSmoothAbs::SVGPathSegCurvetoQuadraticSmoothAbs):
(WebCore::SVGPathSegCurvetoQuadraticSmoothAbs::pathSegType):
(WebCore::SVGPathSegCurvetoQuadraticSmoothAbs::pathSegTypeAsLetter):
* svg/SVGPathSegCurvetoQuadraticSmoothRel.h: Renamed from Source/WebCore/svg/SVGPathSegCurvetoQuadraticSmooth.h.
(WebCore::SVGPathSegCurvetoQuadraticSmoothRel::create):
(WebCore::SVGPathSegCurvetoQuadraticSmoothRel::SVGPathSegCurvetoQuadraticSmoothRel):
(WebCore::SVGPathSegCurvetoQuadraticSmoothRel::pathSegType):
(WebCore::SVGPathSegCurvetoQuadraticSmoothRel::pathSegTypeAsLetter):
* svg/SVGPathSegLinetoAbs.h: Copied from Source/WebCore/svg/SVGPathSegLineto.h.
(WebCore::SVGPathSegLinetoAbs::create):
(WebCore::SVGPathSegLinetoAbs::SVGPathSegLinetoAbs):
(WebCore::SVGPathSegLinetoAbs::pathSegType):
(WebCore::SVGPathSegLinetoAbs::pathSegTypeAsLetter):
* svg/SVGPathSegLinetoHorizontal.h:
* svg/SVGPathSegLinetoHorizontalAbs.h: Copied from Source/WebCore/svg/SVGPathSegLinetoHorizontal.h.
(WebCore::SVGPathSegLinetoHorizontalAbs::create):
(WebCore::SVGPathSegLinetoHorizontalAbs::SVGPathSegLinetoHorizontalAbs):
(WebCore::SVGPathSegLinetoHorizontalAbs::pathSegType):
(WebCore::SVGPathSegLinetoHorizontalAbs::pathSegTypeAsLetter):
* svg/SVGPathSegLinetoHorizontalRel.h: Copied from Source/WebCore/svg/SVGPathSegLinetoHorizontal.h.
(WebCore::SVGPathSegLinetoHorizontalRel::create):
(WebCore::SVGPathSegLinetoHorizontalRel::SVGPathSegLinetoHorizontalRel):
(WebCore::SVGPathSegLinetoHorizontalRel::pathSegType):
(WebCore::SVGPathSegLinetoHorizontalRel::pathSegTypeAsLetter):
* svg/SVGPathSegLinetoRel.h: Renamed from Source/WebCore/svg/SVGPathSegLineto.h.
(WebCore::SVGPathSegLinetoRel::create):
(WebCore::SVGPathSegLinetoRel::SVGPathSegLinetoRel):
(WebCore::SVGPathSegLinetoRel::pathSegType):
(WebCore::SVGPathSegLinetoRel::pathSegTypeAsLetter):
* svg/SVGPathSegLinetoVertical.h:
* svg/SVGPathSegLinetoVerticalAbs.h: Copied from Source/WebCore/svg/SVGPathSegLinetoVertical.h.
(WebCore::SVGPathSegLinetoVerticalAbs::create):
(WebCore::SVGPathSegLinetoVerticalAbs::SVGPathSegLinetoVerticalAbs):
(WebCore::SVGPathSegLinetoVerticalAbs::pathSegType):
(WebCore::SVGPathSegLinetoVerticalAbs::pathSegTypeAsLetter):
* svg/SVGPathSegLinetoVerticalRel.h: Copied from Source/WebCore/svg/SVGPathSegLinetoVertical.h.
(WebCore::SVGPathSegLinetoVerticalRel::create):
(WebCore::SVGPathSegLinetoVerticalRel::SVGPathSegLinetoVerticalRel):
(WebCore::SVGPathSegLinetoVerticalRel::pathSegType):
(WebCore::SVGPathSegLinetoVerticalRel::pathSegTypeAsLetter):
* svg/SVGPathSegListBuilder.cpp:
* svg/SVGPathSegMovetoAbs.h: Copied from Source/WebCore/svg/SVGPathSegMoveto.h.
(WebCore::SVGPathSegMovetoAbs::create):
(WebCore::SVGPathSegMovetoAbs::SVGPathSegMovetoAbs):
(WebCore::SVGPathSegMovetoAbs::pathSegType):
(WebCore::SVGPathSegMovetoAbs::pathSegTypeAsLetter):
* svg/SVGPathSegMovetoRel.h: Renamed from Source/WebCore/svg/SVGPathSegMoveto.h.
(WebCore::SVGPathSegMovetoRel::create):
(WebCore::SVGPathSegMovetoRel::SVGPathSegMovetoRel):
(WebCore::SVGPathSegMovetoRel::pathSegType):
(WebCore::SVGPathSegMovetoRel::pathSegTypeAsLetter):
2013-07-11 Patrick Gansterer <paroga@webkit.org>
Build fix for WinCE after r152426.
* config.h:
2013-07-11 Fabienne Semeria <fsemeria@nds.com>
[Qt] memory leak in WebCore::FontCache::getLastResortFallbackFont
https://bugs.webkit.org/show_bug.cgi?id=118532
Reviewed by Allan Sandfeld Jensen.
* platform/graphics/qt/FontCacheQt.cpp:
(WebCore::FontCache::getLastResortFallbackFont):
2013-07-11 Mario Sanchez Prada <mario.prada@samsung.com>
[ATK] Refactor code for translating offsets between WebCore a11y and ATK
https://bugs.webkit.org/show_bug.cgi?id=118179
Reviewed by Chris Fleizach.
Encapsulate better and make more clear the translation of offsets
between our ATK implementation and WebCore's accessibility layer.
Values for offsets can differ sometimes between those two worlds
due to some extra flattening we need to do in ATK based ports to
properly expose the accessibility hierarchy to ATs, which
sometimes means adding extra text elements in the exposed text
through the AtkText interface (e.g. list items markers).
* accessibility/atk/WebKitAccessibleInterfaceText.cpp:
(offsetAdjustmentForListItem): Helper function to refactor code
needed to translate offsets from WebCore to ATK worlds. Currently
related to considering list item markers in LTR text only.
(webCoreOffsetToAtkOffset): Convenience function for code
readability purposes. It just calls offsetAdjustmentForListItem.
(atkOffsetToWebCoreOffset): Likewise.
(getSelectionOffsetsForObject): Use webCoreOffsetToAtkOffset.
(webkitAccessibleTextGetCaretOffset): Use webCoreOffsetToAtkOffset
to translate an offset from WebCore to ATK before returning it.
(webkitAccessibleTextSetSelection): Use atkOffsetToWebCoreOffset
to translate an offset from WebCore to ATK before using it.
(webkitAccessibleTextSetCaretOffset): Likewise.
2013-07-10 Sam Weinig <sam@webkit.org>
Range.getClientRects() not working correctly for partially contained vertically styled text nodes
<rdar://problem/14305675>
https://bugs.webkit.org/show_bug.cgi?id=118447
Reviewed by David Hyatt.
Original patch by Mac Murrett, tweaked by me.
Test: fast/dom/Range/getClientRects-vertical.html
* rendering/RenderText.cpp:
(WebCore::localQuadForTextBox):
Use the physical accessors rather than the logical ones to get the correct metrics.
2013-07-10 Christophe Dumez <ch.dumez@sisa.samsung.com>
Reduce number of header includes in SVG
https://bugs.webkit.org/show_bug.cgi?id=118474
Reviewed by Rob Buis.
Reduce number of header includes in SVG. In particular, SVGAnimatedPropertyMacros.h
no longer brings SVGElement.h header include. This means that the SVGElement
class can now have animated properties.
This patch is a prerequirement to merge SVGStyledElement into SVGElement.
No new tests, no behavior change.
* CMakeLists.txt:
* GNUmakefile.list.am:
* Target.pri:
* WebCore.vcxproj/WebCore.vcxproj:
* WebCore.vcxproj/WebCore.vcxproj.filters:
* WebCore.xcodeproj/project.pbxproj:
* svg/GradientAttributes.h:
* svg/SVGAllInOne.cpp:
* svg/SVGAnimateMotionElement.cpp:
* svg/SVGAnimateMotionElement.h:
* svg/SVGAnimatedTypeAnimator.cpp: Added.
(WebCore::SVGElementAnimatedProperties::SVGElementAnimatedProperties):
(WebCore::SVGAnimatedTypeAnimator::SVGAnimatedTypeAnimator):
(WebCore::SVGAnimatedTypeAnimator::~SVGAnimatedTypeAnimator):
(WebCore::SVGAnimatedTypeAnimator::calculateFromAndToValues):
(WebCore::SVGAnimatedTypeAnimator::calculateFromAndByValues):
(WebCore::SVGAnimatedTypeAnimator::findAnimatedPropertiesForAttributeName):
* svg/SVGAnimatedTypeAnimator.h:
* svg/SVGAnimationElement.h:
* svg/SVGCursorElement.cpp:
* svg/SVGDocumentExtensions.h:
* svg/SVGElement.cpp:
* svg/SVGElementInstanceList.cpp:
* svg/SVGElementInstanceList.h:
* svg/SVGElementRareData.h:
* svg/SVGFEImageElement.cpp:
* svg/SVGFilterElement.cpp:
* svg/SVGFitToViewBox.h:
* svg/SVGFontData.cpp:
* svg/SVGFontData.h:
* svg/SVGFontElement.h:
* svg/SVGForeignObjectElement.cpp:
* svg/SVGGlyphMap.h:
* svg/SVGGradientElement.cpp:
* svg/SVGMPathElement.cpp:
* svg/SVGMPathElement.h:
* svg/SVGPathBlender.cpp:
* svg/SVGPathBlender.h:
* svg/SVGPathBuilder.cpp:
* svg/SVGPathBuilder.h:
* svg/SVGPathParser.cpp:
* svg/SVGPathParser.h:
* svg/SVGPathSegListBuilder.h:
* svg/SVGPathTraversalStateBuilder.cpp:
* svg/SVGPathTraversalStateBuilder.h:
* svg/SVGPathUtilities.h:
* svg/SVGPatternElement.cpp:
* svg/SVGPointList.h:
* svg/SVGScriptElement.cpp:
* svg/SVGStyledElement.h:
* svg/SVGTests.h:
* svg/SVGTextElement.h:
* svg/SVGTextPathElement.cpp:
* svg/SVGTransformable.h:
* svg/SVGURIReference.cpp:
* svg/SVGURIReference.h:
* svg/SVGVKernElement.cpp:
* svg/SVGVKernElement.h:
* svg/SVGZoomAndPan.h:
* svg/properties/SVGAnimatedProperty.cpp: Added.
(WebCore::SVGAnimatedProperty::SVGAnimatedProperty):
(WebCore::SVGAnimatedProperty::~SVGAnimatedProperty):
(WebCore::SVGAnimatedProperty::commitChange):
(WebCore::SVGAnimatedProperty::animatedPropertyCache):
* svg/properties/SVGAnimatedProperty.h:
* svg/properties/SVGAnimatedPropertyMacros.h:
(WebCore::SVGSynchronizableAnimatedProperty::synchronize):
* svg/properties/SVGAnimatedStaticPropertyTearOff.h:
* svg/properties/SVGListProperty.h:
2013-07-10 Dominique Leuenberger <dimstar@opensuse.org>
Fix build against GTK+ 2.0
https://bugs.webkit.org/show_bug.cgi?id=117895
Reviewed by Martin Robinson.
GTK2 build fails for undefined GDK_IS_X11_DISPLAY
GTK 2.0 does define GDK_WINDOWING_X11,but GDK_IS_X11_DISPLAY is not
present in GTK+ 2.0. A dummy defines is sufficient, as GTK 2.0 is not
that multiple backend aware anyway...
* platform/gtk/GtkVersioning.h: Define GDK_IS_X11_DISPLAY for GTK+ 2.0
and compatibility for gtk_widget_get_preferred_size()
* plugins/gtk/gtk2xtbin.c: Include config.h
2013-07-10 Tim Horton <timothy_horton@apple.com>
Deferring layer flushes can cause painting without layout being done
https://bugs.webkit.org/show_bug.cgi?id=118493
Reviewed by Simon Fraser.
r147797 added a mechanism for the TileController to inform RenderLayerCompositor
that it had performed an action (setNeedsDisplay, etc.) that would cause CoreAnimation
to call back into us to paint in this runloop, and that it shouldn't throttle the next
layer flush.
However, if tiles were created and left unparented (because the TileController was
out-of-window), when they are later parented, we failed to inform RenderLayerCompositor
that they were about to call back for painting, and so it would happily throttle the
next layer flush, and layout would be out of date, and garbage and corruption could result.
To resolve this, rework the logic surrounding parenting existing-but-unparented tiles
to ensure that they get added to the TileController's dirtyRect.
No new tests; the bug only reproduces under specific timing circumstances, and
manifests itself as an assertion failure or garbage on the screen, so it's quite
hard to make a workable test.
* platform/graphics/ca/mac/TileController.mm:
(WebCore::TileController::revalidateTiles):
- Factor out the code to parent unparented tiles so that it is shared between the
created-new-tile and reparenting-existing-tile cases.
- Keep track of whether we updated the frame of a pre-existing tile.
- If the tile is dirty and needed to be parented (because either it's new
or hadn't been parented before), add it to the dirty rect list.
- If the tile changed size, add it to the dirty rect list.
(WebCore::TileController::ensureTilesForRect):
Ditto everything from revalidateTiles.
(WebCore::TileController::createTileLayer):
- Explicitly mark fresh tiles as needing display, so that we can depend on
[WebTileLayer needsDisplay] in revalidateTiles to tell us that it's dirty.
2013-07-10 Eric Carlson <eric.carlson@apple.com>
[Mac] every enabled text track should be listed in the track menu
https://bugs.webkit.org/show_bug.cgi?id=118477
Reviewed by Jer Noble.
Test: media/video-controls-captions-trackmenu-includes-enabled-track.html
* html/shadow/MediaControlElements.cpp:
(WebCore::MediaControlClosedCaptionsTrackListElement::updateDisplay): Don't select the
"Off" menu item if a track is enabled.
* page/CaptionUserPreferencesMediaAF.cpp:
(WebCore::CaptionUserPreferencesMediaAF::sortedTrackListForMenu): Always include a track
that is showing in the menu. Add more diagnostic logging.
2013-07-10 Christophe Dumez <ch.dumez@sisa.samsung.com>
Remove ElementTimeControl and expose SVGAnimationElement
https://bugs.webkit.org/show_bug.cgi?id=118349
Reviewed by Rob Buis.
Remove ElementTimeControl IDL interface and move its attributes
to the SVGAnimationElement IDL interface as per the latest SVG2
specification:
https://svgwg.org/svg2-draft/animate.html#InterfaceSVGAnimationElement
Also remove [NoInterfaceObject] IDL extended attribute from
SVGAnimationElement as it is not present in the specification.
This is one step towards removing IDL multiple inheritance in SVG and
complying with the latest SVG2 specification.
No new tests, covered by existing test cases.
* DerivedSources.make:
* GNUmakefile.list.am:
* WebCore.vcxproj/WebCore.vcxproj:
* WebCore.vcxproj/WebCore.vcxproj.filters:
* WebCore.xcodeproj/project.pbxproj:
* bindings/scripts/CodeGeneratorObjC.pm:
* svg/ElementTimeControl.h: Removed.
* svg/ElementTimeControl.idl: Removed.
* svg/SVGAnimationElement.h:
* svg/SVGAnimationElement.idl:
2013-07-10 Arnaud Renevier <a.renevier@sisa.samsung.com>
Web Inspector: "Always enable" profiling does not work
https://bugs.webkit.org/show_bug.cgi?id=118487
Enable profiler when loading panel if profiler is enabled in inspector
settings.
Reviewed by Timothy Hatcher.
* inspector/front-end/ProfilesPanel.js:
2013-07-09 Roger Fong <roger_fong@apple.com>
HTMLPluginElement's state should be Playing before firing mouse click event.
https://bugs.webkit.org/show_bug.cgi?id=118398.
<rdar://problem/14262126>
Reviewed by Dean Jackson.
Test: plugins/snapshotting/plugin-receives-click-event.html
* html/HTMLPlugInImageElement.cpp:
(WebCore::HTMLPlugInImageElement::simulatedMouseClickTimerFired):
The defaultEventHandler returns early if the state is not Playing.
This is because we only want the plugin to deal with user interaction normally if the
plugin is actually enabled (not being snapshotted).
When we click on the snapshotted plugin to start it, we mimic what would happen to the plugin
normally by dispatching another click event on top of where we just clicked.
However, we were sending the click event before setting the state to Playing which meant that our
simulated click was not being handled.
We should be setting this state before sending the click, not after.
2013-07-10 Nick Diego Yamane <nick.yamane@openbossa.org>
Fix a bug in MediaStreamDescriptor::removeVideoComponent
https://bugs.webkit.org/show_bug.cgi?id=118446
Reviewed by Eric Carlson.
MediaStreamDescriptor::removeVideoComponent is currently trying to
remove the 'videoComponent' from the wrong vector.
* platform/mediastream/MediaStreamDescriptor.h:
(WebCore::MediaStreamDescriptor::removeVideoComponent):
2013-07-10 Mario Sanchez Prada <mario.prada@samsung.com>
AX: Allow requesting the full plain text for an object with textUnderElement()
https://bugs.webkit.org/show_bug.cgi?id=105214
Reviewed by Chris Fleizach.
Allow specifying different function modes for textUnderElement(),
so we can effectively ask for the "normal" result (e.g to retrieve
test to be exposed as the 'title') or for the full text under the
element (without omitting any child in the subtree). This is
needed for the implementation of atk_text_get_text() in GTK/EFL.
* accessibility/AccessibilityObject.h: Add new enumeration to
specify the different modes for textUnderElement().
(WebCore::AccessibilityObject::textUnderElement): Added parameter.
* accessibility/AccessibilityNodeObject.cpp:
(WebCore::shouldUseAccessiblityObjectInnerText): Always return
'true' when using the "include all children" mode.
(WebCore::AccessibilityNodeObject::textUnderElement): Updated call
to shouldUseAccessiblityObjectInnerText().
* accessibility/AccessibilityNodeObject.h:
* accessibility/AccessibilityRenderObject.cpp:
(WebCore::AccessibilityRenderObject::textUnderElement): Removed
GTK specific code and expand the usage of text iterators beyond
text render objects, using it also when in the "include all
children" mode.
* accessibility/AccessibilityRenderObject.h:
* accessibility/atk/AccessibilityObjectAtk.cpp:
(WebCore::AccessibilityObject::getLengthForTextRange): Updated
call to textUnderElement(), preserving the previous behavior.
* accessibility/atk/WebKitAccessibleInterfaceText.cpp:
(webkitAccessibleTextGetText): Updated call to textUnderElement(),
using the "include all children" mode.
2013-07-10 Sergio Correia <sergio.correia@openbossa.org>
Remove the meshType from CoordinatedCustomFilterOperation
https://bugs.webkit.org/show_bug.cgi?id=118529
Reviewed by Noam Rosenthal.
Following the removal of the meshType from CustomFilterOperation in r149153,
remove also the meshType from CoordinatedCustomFilterOperation.
No new tests, no new functionality.
* platform/graphics/texmap/coordinated/CoordinatedCustomFilterOperation.h:
(WebCore::CoordinatedCustomFilterOperation::create): Remove unused meshType parameter.
(WebCore::CoordinatedCustomFilterOperation::CoordinatedCustomFilterOperation): Ditto.
Ditto.
2013-07-10 James Craig <james@cookiecrook.com>
AX: AccessibilityNodeObject::supportsRequiredAttribute() should switch on CellRole
https://bugs.webkit.org/show_bug.cgi?id=117817
Reviewed by Chris Fleizach.
CellRole supports the required attribute now for accessibility, according to ARIA spec.
Updated existing test coverage.
* accessibility/AccessibilityNodeObject.cpp:
(WebCore::AccessibilityNodeObject::supportsRequiredAttribute):
2013-07-10 Csaba Osztrogonác <ossy@webkit.org>
REGRESSION(r151957): WebGL textures do not show
https://bugs.webkit.org/show_bug.cgi?id=118464
Reviewed by Christophe Dumez.
After r151957 decoder.frameIsCompleteAtIndex(0) doesn't trigger image decoding,
we have to call decoder.createFrameAtIndex(0) explicitly to ensure it.
* platform/graphics/cairo/GraphicsContext3DCairo.cpp:
(WebCore::GraphicsContext3D::ImageExtractor::extractImage):
* platform/graphics/efl/GraphicsContext3DEfl.cpp:
(WebCore::GraphicsContext3D::ImageExtractor::extractImage):
2013-07-10 Karol Świniarski <k.swiniarsk2@samsung.com>
Change recently ratified extensions prefixes from WEBKIT_WEBGL_ to WEBGL_
https://bugs.webkit.org/show_bug.cgi?id=117786
Reviewed by Dean Jackson.
According to WebGL's revision 10, extensions should be named: WEBGL_lose_context,
WEBGL_depth_texture, WEBGL_compressed_texture_s3tc.
No new tests. Covered by existing tests:
LayoutTests/webgl/conformance/extensions/get-extension.html
LayoutTests/webgl/conformance/context/context-lost.html
LayoutTests/webgl/conformance/extensions/webgl-depth-texture.html
LayoutTests/webgl/conformance/extensions/webgl-compressed-texture-s3tc.html
* html/canvas/WebGLRenderingContext.cpp:
(WebCore::WebGLRenderingContext::getExtension):
(WebCore::WebGLRenderingContext::getSupportedExtensions):
2013-07-09 Byungwoo Lee <bw80.lee@samsung.com>
Unreviewed build fix.
* svg/SVGImageElement.cpp:
(WebCore::SVGImageElement::SVGImageElement):
2013-07-09 Gyuyoung Kim <gyuyoung.kim@samsung.com>
Introduce isSVGFontElement() and isSVGImageElement(), use them
https://bugs.webkit.org/show_bug.cgi?id=118504
Reviewed by Benjamin Poulain.
Let's use isFoo() to enhance readibility in svg element classes along with html's.
No new tests, there is no behavior changes.
* loader/cache/CachedFont.cpp:
(WebCore::CachedFont::getSVGFontById):
* rendering/HitTestResult.cpp:
(WebCore::HitTestResult::absoluteImageURL):
* svg/SVGAnimateMotionElement.cpp:
(WebCore::SVGAnimateMotionElement::hasValidAttributeType):
* svg/SVGElement.cpp:
(WebCore::SVGElement::viewportElement):
* svg/SVGFontElement.cpp:
(WebCore::SVGFontElement::SVGFontElement):
* svg/SVGFontElement.h:
(WebCore::toSVGFontElement):
(WebCore::isSVGFontElement):
* svg/SVGFontFaceElement.cpp:
(WebCore::SVGFontFaceElement::associatedFontElement):
(WebCore::SVGFontFaceElement::rebuildFontFace):
* svg/SVGGlyphElement.cpp:
(WebCore::SVGGlyphElement::invalidateGlyphCache):
* svg/SVGHKernElement.cpp:
(WebCore::SVGHKernElement::insertedInto):
(WebCore::SVGHKernElement::removedFrom):
* svg/SVGImageElement.cpp:
(WebCore::SVGImageElement::SVGImageElement):
* svg/SVGImageElement.h:
(WebCore::toSVGImageElement):
(WebCore::isSVGImageElement):
* svg/SVGLocatable.cpp:
(WebCore::isViewportElement):
* svg/SVGVKernElement.cpp:
(WebCore::SVGVKernElement::insertedInto):
(WebCore::SVGVKernElement::removedFrom):
2013-07-09 Ryuan Choi <ryuan.choi@samsung.com>
[EFL] Add ewk_view_device_pixel_ratio_set
https://bugs.webkit.org/show_bug.cgi?id=118521
Reviewed by Gyuyoung Kim.
No new tests, covered by existing tests.
* dom/ViewportArguments.cpp: Remove PLATFORM(EFL) not to use deprecatedTargetDPI
* dom/ViewportArguments.h: Ditto.
* platform/efl/EflScreenUtilities.cpp: Removed getDPI() which is not used anymore.
* platform/efl/EflScreenUtilities.h: Ditto.
2013-07-09 James Craig <james@cookiecrook.com>
@readonly and @aria-readonly="false" are not exposed correctly to accessibility
https://bugs.webkit.org/show_bug.cgi?id=118475
Reviewed by Chris Fleizach.
Account for implicit and explicit @readonly/@aria-readonly mismatches. Updated existing test coverage.
* accessibility/AccessibilityRenderObject.cpp:
(WebCore::AccessibilityRenderObject::canSetValueAttribute):
2013-07-09 Jer Noble <jer.noble@apple.com>
Reviewed by Simon Fraser.
Remember the scroll position and restore after exiting full-screen mode.
https://bugs.webkit.org/show_bug.cgi?id=61956
No new tests, adds a client callback used by WebKit and WebKit2 win.
* platform/graphics/win/FullScreenController.cpp:
(FullScreenController::enterFullScreen):
(FullScreenController::exitFullScreen):
* platform/graphics/win/FullScreenControllerClient.h:
2013-07-09 Jeff Miller <jeffm@apple.com>
AuthenticationMac.mm does not handle NSURLAuthenticationMethodNegotiate in WebCore::mac()
https://bugs.webkit.org/show_bug.cgi?id=118518
Reviewed by Alexey Proskuryakov.
* platform/network/mac/AuthenticationMac.mm:
(WebCore::mac):
Map ProtectionSpaceAuthenticationSchemeNegotiate to NSURLAuthenticationMethodNegotiate.
2013-07-09 Jeff Miller <jeffm@apple.com>
AuthenticationMac.mm does not handle NSURLAuthenticationMethodNegotiate
https://bugs.webkit.org/show_bug.cgi?id=118517
Reviewed by Brady Eidson.
* platform/network/mac/AuthenticationMac.mm:
(WebCore::core):
Map "NSURLAuthenticationMethodNegotiate" to ProtectionSpaceAuthenticationSchemeNegotiate.
2013-07-09 peavo@outlook.com <peavo@outlook.com>
[Windows] Compile fix.
https://bugs.webkit.org/show_bug.cgi?id=106558
Reviewed by Brent Fulgham.
On Windows, dispatch.h needs to be included before certain CFNetwork headers.
* WebCorePrefix.h: Include dispatch.h.
2013-07-09 Mark Lam <mark.lam@apple.com>
Fix 30% JSBench regression (caused by adding column numbers to stack traces).
https://bugs.webkit.org/show_bug.cgi?id=118481.
Reviewed by Mark Hahnenberg and Geoffrey Garen.
Test: fast/js/line-column-numbers.html
Updated the bindings to use StackFrame::computeLineAndColumn(). The old
StackFrame::line() and StackFrame::column() has been removed. The new
algorithm always computes the 2 values together anyway. Hence it is more
efficient to return them as a pair instead of doing the same computation
twice for each half of the result.
* bindings/js/ScriptCallStackFactory.cpp:
(WebCore::createScriptCallStack):
(WebCore::createScriptCallStackFromException):
* bindings/js/ScriptSourceCode.h:
(WebCore::ScriptSourceCode::ScriptSourceCode):
2013-07-09 Gyuyoung Kim <gyuyoung.kim@samsung.com>
Use toSVGFontElement() instead of static_cast<SVGFontElement*>
https://bugs.webkit.org/show_bug.cgi?id=118496
Reviewed by Andreas Kling.
As a step to change static_cast with toXXX, static_cast<SVGFontElement*> can
be changed with toSVGFontElement().
Blink merge from https://src.chromium.org/viewvc/blink?view=rev&revision=153761
* svg/SVGFontElement.h:
(WebCore::toSVGFontElement):
* svg/SVGFontFaceElement.cpp:
(WebCore::SVGFontFaceElement::rebuildFontFace):
* svg/SVGGlyphElement.cpp:
(WebCore::SVGGlyphElement::invalidateGlyphCache):
* svg/SVGHKernElement.cpp:
(WebCore::SVGHKernElement::insertedInto):
(WebCore::SVGHKernElement::removedFrom):
* svg/SVGVKernElement.cpp:
(WebCore::SVGVKernElement::insertedInto):
(WebCore::SVGVKernElement::removedFrom):
2013-07-09 Christophe Dumez <ch.dumez@sisa.samsung.com>
Remove support for [PassThisToCallback] extended attribute
https://bugs.webkit.org/show_bug.cgi?id=118391
Reviewed by Kentaro Hara.
The [PassThisToCallback] Webkit-specific IDL extended attribute is supported
by the JSC bindings generator but is no longer used. The attribute is not
even documented.
We can therefore drop support for this from the generator to simplify the
code.
No new tests, no behavior change.
* bindings/scripts/CodeGeneratorJS.pm:
(GenerateCallbackImplementation):
* bindings/scripts/IDLAttributes.txt:
* bindings/scripts/test/JS/JSTestCallback.cpp:
(WebCore::JSTestCallback::callbackRequiresThisToPass):
* bindings/scripts/test/TestCallback.idl:
2013-07-09 Praveen R Jadhav <praveen.j@samsung.com>
Update Exception handling in WebAudio.
https://bugs.webkit.org/show_bug.cgi?id=118405.
Reviewed by Chris Rogers.
AudioBufferSourceNode, OscillatorNode and AnalyserNode don't
propagate exception mentioned in WebAudio spec.
Code updated to throw DOM exception as expected.
Tests: webaudio/analyser-exception.html
webaudio/audiobuffersource-exception.html
* Modules/webaudio/AnalyserNode.cpp:
(WebCore::AnalyserNode::setFftSize):
(WebCore::AnalyserNode::setMinDecibels):
(WebCore::AnalyserNode::setMaxDecibels):
(WebCore::AnalyserNode::setSmoothingTimeConstant):
* Modules/webaudio/AnalyserNode.h:
* Modules/webaudio/AnalyserNode.idl:
* Modules/webaudio/AudioBufferSourceNode.cpp:
(WebCore::AudioBufferSourceNode::startGrain):
(WebCore::AudioBufferSourceNode::noteGrainOn):
* Modules/webaudio/AudioBufferSourceNode.h:
* Modules/webaudio/AudioBufferSourceNode.idl:
* Modules/webaudio/AudioContext.cpp:
(WebCore::AudioContext::createBuffer):
(WebCore::AudioContext::createScriptProcessor):
(WebCore::AudioContext::createPeriodicWave):
* Modules/webaudio/AudioScheduledSourceNode.cpp:
(WebCore::AudioScheduledSourceNode::start):
(WebCore::AudioScheduledSourceNode::stop):
(WebCore::AudioScheduledSourceNode::noteOn):
(WebCore::AudioScheduledSourceNode::noteOff):
* Modules/webaudio/AudioScheduledSourceNode.h:
* Modules/webaudio/OscillatorNode.idl:
2013-07-08 Martin Robinson <mrobinson@igalia.com>
[CSS Grid Layout] Rename grid-{rows|columns} to grid-definition-{rows|columns}
https://bugs.webkit.org/show_bug.cgi?id=103336
Reviewed by Tony Chang.
Rename -webkit-grid-{rows|columns} to -webkit-grid-definition-{rows|columns}.
The latest version of the spec has renamed these properties.
* css/CSSComputedStyleDeclaration.cpp:
(WebCore::CSSComputedStyleDeclaration::getPropertyCSSValue): Handle the new names.
* css/CSSParser.cpp:
(WebCore::CSSParser::parseValue): Ditto.
* css/CSSProperty.cpp:
(WebCore::CSSProperty::isInheritedProperty): Ditto.
* css/CSSPropertyNames.in: Add support for the new names.
* css/StyleResolver.cpp:
(WebCore::StyleResolver::applyProperty): Handle the new names.
2013-07-08 Enrica Casucci <enrica@apple.com>
DeleteSelectionCommand does not handle correctly deletion with two consecutive BR element.
https://bugs.webkit.org/show_bug.cgi?id=118457
<rdar://problem/14160912>
Reviewed by Simon Fraser.
In DeleteSelectionCommand::handleSpecialCareBRDelete we did not
handle correctly the case where we had <br><br> in the markup and
nothing was being deleted. We should consider this like
the case where the <br> is on the line by itself and remove it.
Test: editing/deleting/delete-image-followed-by-two-br.html
* editing/DeleteSelectionCommand.cpp:
(WebCore::DeleteSelectionCommand::handleSpecialCaseBRDelete):
2013-07-08 Radu Stavila <stavila@adobe.com>
NamedFlowCollection getters should return undefined when there's no NamedFlow
https://bugs.webkit.org/show_bug.cgi?id=118463
Reviewed by Christophe Dumez.
Added new TreatReturnedNullObjectAs attribute for generated methods and set it to Undefined
for the item and namedItem methods of DOMNamedFlowCollection.
Test: fast/regions/webkit-named-flow-collection-undefined.html
* bindings/scripts/CodeGeneratorJS.pm:
(GenerateImplementationFunctionCall):
* bindings/scripts/IDLAttributes.txt:
* bindings/scripts/test/CPP/WebDOMTestObj.cpp:
(WebDOMTestObj::treatReturnedNullObjectAsUndefined):
* bindings/scripts/test/CPP/WebDOMTestObj.h:
* bindings/scripts/test/GObject/WebKitDOMTestObj.cpp:
(webkit_dom_test_obj_treat_returned_null_object_as_undefined):
* bindings/scripts/test/GObject/WebKitDOMTestObj.h:
* bindings/scripts/test/JS/JSTestObj.cpp:
(WebCore::jsTestObjPrototypeFunctionTreatReturnedNullObjectAsUndefined):
* bindings/scripts/test/JS/JSTestObj.h:
* bindings/scripts/test/ObjC/DOMTestObj.h:
* bindings/scripts/test/ObjC/DOMTestObj.mm:
(-[DOMTestObj treatReturnedNullObjectAsUndefined]):
* bindings/scripts/test/TestObj.idl:
* dom/DOMNamedFlowCollection.idl:
2013-07-06 Changhun Kang <temoochin@company100.net>
Remove unused variables in FocusCandidate.
https://bugs.webkit.org/show_bug.cgi?id=118449
Reviewed by Antonio Gomes.
The variables for parent in FocusCandidate are not used anymore.
No new tests. No change in behavior.
* page/SpatialNavigation.cpp:
(WebCore::FocusCandidate::FocusCandidate):
* page/SpatialNavigation.h:
(WebCore::FocusCandidate::FocusCandidate):
2013-07-08 Chris Fleizach <cfleizach@apple.com>
AX: iOS: SVG paths are not offset by the parent bounding box
https://bugs.webkit.org/show_bug.cgi?id=118433
The path for SVG shapes is in terms of its parent's view space. We need to offset
the path by that amount so that it's in the right location.
Reviewed by Tim Horton.
* accessibility/AccessibilityRenderObject.cpp:
(WebCore::AccessibilityRenderObject::elementPath):
2013-07-08 Carlos Garcia Campos <cgarcia@igalia.com>
Unreviewed. Fix make distcheck.
* GNUmakefile.list.am: Add missing header files.
2013-07-08 Ruth Fong <ruth_fong@apple.com>
Fix TextTrackCue::cueIndex() to handle the null case of TextTrack::cues(() properly
https://bugs.webkit.org/show_bug.cgi?id=117815
<rdar://problem/14211041>
Reviewed by Eric Carlson.
Merge https://src.chromium.org/viewvc/blink?revision=153206&view=revision
No new tests, only behavior change is preventing a crash in the release build.
cueIndex() is only used for sorting cues, so returning an invalidCueIndex in the case
where track()->cues() is null makes sense and won't modify behavior.
* html/track/TextTrackCue.cpp:
(WebCore::TextTrackCue::cueIndex):
2013-07-08 Commit Queue <commit-queue@webkit.org>
Unreviewed, rolling out r152416.
http://trac.webkit.org/changeset/152416
https://bugs.webkit.org/show_bug.cgi?id=118476
Wrong fix for the bug (Requested by ap on #webkit).
* platform/text/TextEncodingRegistry.cpp:
(WebCore::newTextCodec):
2013-07-08 Andreas Kling <akling@apple.com>
REGRESSION(r125294): A style rule with more than 8192 selectors can cause style corruption.
<http://webkit.org/b/118369>
<rdar://problem/14291428>
Reviewed by Antti Koivisto.
Add a semi-hard cap of 8192 selectors per CSS rule. Rules with longer selector lists will be split into
multiple rules (with 8192 selectors per rule.) The style properties are shared behind the scenes
so it's all pretty efficient.
This does generate a different CSSOM for gigantic selector lists, I've added a test to document this.
Note that setting CSSStyleRule.selectorText with over 8192 selectors will now fail, the splitting into
multiple rules only happens when parsing full style sheets.
Test: fast/css/rule-selector-overflow.html
* css/CSSSelectorList.cpp:
(WebCore::CSSSelectorList::selectorCount):
Add a helper to count the number of selectors in a list (not the number of raw selector components.)
* css/RuleSet.h:
* css/CSSStyleRule.cpp:
(WebCore::CSSStyleRule::setSelectorText):
Add RuleData::maximumSelectorCount constant and cap CSSStyleRule.selectorText to that many selectors.
* css/CSSSelectorList.h:
(WebCore::CSSSelectorList::adoptSelectorArray):
* css/StyleRule.cpp:
(WebCore::StyleRule::create):
(WebCore::StyleRule::splitIntoMultipleRulesWithMaximumSelectorCount):
* css/StyleRule.h:
(WebCore::StyleRule::parserAdoptSelectorArray):
* css/StyleSheetContents.cpp:
(WebCore::StyleSheetContents::parserAppendRule):
The meat of this change. Split rules with >8K selectors into multiple rules with 8K selectors in each.
* css/StyleRule.h:
(WebCore::toStyleRule):
Added a toStyleRule() helper for good measure.
2013-07-08 Christophe Dumez <ch.dumez@sisa.samsung.com>
Introduce DECLARE_FORWARDING_ATTRIBUTE_EVENT_LISTENER() macro
https://bugs.webkit.org/show_bug.cgi?id=118408
Reviewed by Philip Rogers.
Split DEFINE_FORWARDING_ATTRIBUTE_EVENT_LISTENER() macro into separate
DECLARE and DEFINE macros to reduce the number of header includes in
SVG.
No new tests, no behavior change.
* dom/EventTarget.h:
* svg/SVGElementInstance.cpp:
(WebCore::SVGElementInstance::create):
(WebCore::SVGElementInstance::toNode):
(WebCore::SVGElementInstance::ownerDocument):
* svg/SVGElementInstance.h:
2013-07-08 Jae Hyun Park <jae.park@company100.net>
[Coordinated Graphics] Rename variables in UpdateAtlas
https://bugs.webkit.org/show_bug.cgi?id=118403
Reviewed by Noam Rosenthal.
As of r149292, non-composited contents layer was removed from
CoordinatedGraphics. So, the variables should be renamed for
clarification.
* platform/graphics/texmap/coordinated/CompositingCoordinator.cpp:
(WebCore::CompositingCoordinator::releaseInactiveAtlasesTimerFired):
2013-07-08 Ádám Kallai <kadam@inf.u-szeged.hu>
[Qt] Incremental build fix after r145712.
https://bugs.webkit.org/show_bug.cgi?id=112576.
Reviewed by Jocelyn Turcotte.
* DerivedSources.pri: Added dependence to INSPECTOR_JSON.
* inspector/front-end/WebKit.qrc: Added missing JS file.
2013-07-08 Kihong Kwon <kihong.kwon@samsung.com>
vibrate function have to return boolean value.
https://bugs.webkit.org/show_bug.cgi?id=118288
Reviewed by Gyuyoung Kim.
According to latest Vibration API which is LC, vibrate() needs to return boolean value
and exception code is removed also. In addition, remove condition for canceling vibration
can be called when visibility state is hidden.
http://www.w3.org/TR/vibration/
No new tests. vibration/navigator-vibration.html is changed.
* Modules/vibration/NavigatorVibration.cpp:
(WebCore::NavigatorVibration::vibrate):
* Modules/vibration/NavigatorVibration.h:
* Modules/vibration/NavigatorVibration.idl:
* Modules/vibration/Vibration.cpp:
(WebCore::Vibration::vibrate):
* Modules/vibration/Vibration.h:
2013-07-07 Kangil Han <kangil.han@samsung.com>
Adopt is/toHTMLTableElement for code cleanup
https://bugs.webkit.org/show_bug.cgi?id=118393
Reviewed by Andreas Kling.
To enhance readability, this patch adopts is/toHTMLTableElement.
This also helps out to reduce duplicated use of static_cast.
* accessibility/AccessibilityRenderObject.cpp:
(WebCore::AccessibilityRenderObject::determineAccessibilityRole):
* accessibility/AccessibilityTable.cpp:
(WebCore::AccessibilityTable::isDataTable):
(WebCore::AccessibilityTable::isTableExposableThroughAccessibility):
(WebCore::AccessibilityTable::title):
* accessibility/atk/WebKitAccessibleInterfaceTable.cpp:
(webkitAccessibleTableGetCaption):
* accessibility/atk/WebKitAccessibleWrapperAtk.cpp:
(webkitAccessibleGetDescription):
* css/StyleResolver.cpp:
(WebCore::StyleResolver::adjustRenderStyle):
* dom/Position.cpp:
(WebCore::endsOfNodeAreVisuallyDistinctPositions):
* editing/DeleteSelectionCommand.cpp:
(WebCore::DeleteSelectionCommand::handleGeneralDelete):
* editing/InsertLineBreakCommand.cpp:
(WebCore::InsertLineBreakCommand::doApply):
* editing/htmlediting.cpp:
(WebCore::isNonTableCellHTMLBlockElement):
* editing/markup.cpp:
(WebCore::ancestorToRetainStructureAndAppearanceForBlock):
* html/FTPDirectoryDocument.cpp:
(WebCore::FTPDirectoryDocumentParser::loadDocumentTemplate):
(WebCore::FTPDirectoryDocumentParser::createBasicDocument):
* html/HTMLFormElement.cpp:
(WebCore::HTMLFormElement::rendererIsNeeded):
* html/HTMLTableElement.h:
(WebCore::isHTMLTableElement):
(WebCore::toHTMLTableElement):
* html/HTMLTablePartElement.cpp:
(WebCore::HTMLTablePartElement::findParentTable):
* html/HTMLTableRowElement.cpp:
(WebCore::HTMLTableRowElement::rowIndex):
* html/HTMLTableRowsCollection.cpp:
(WebCore::HTMLTableRowsCollection::HTMLTableRowsCollection):
(WebCore::HTMLTableRowsCollection::virtualItemAfter):
* html/parser/HTMLElementStack.cpp:
(WebCore::HTMLNames::isScopeMarker):
(WebCore::HTMLNames::isTableScopeMarker):
* html/parser/HTMLTreeBuilder.cpp:
(WebCore::HTMLTreeBuilder::resetInsertionModeAppropriately):
(WebCore::HTMLTreeBuilder::processCharacterBuffer):
* platform/mac/HTMLConverter.mm:
(-[WebHTMLConverter _computedStringForNode:property:]):
* rendering/RenderObject.cpp:
(WebCore::RenderObject::offsetParent):
* rendering/RenderTable.cpp:
(WebCore::RenderTable::convertStyleLogicalWidthToComputedWidth):
(WebCore::RenderTable::convertStyleLogicalHeightToComputedHeight):
2013-07-06 Rob Buis <rbuis@rim.com>
createElement("image") creates an HTMLImageElement, although this hack should exist in parser only
https://bugs.webkit.org/show_bug.cgi?id=88360
Reviewed by Sam Weinig.
Create a HTMLElement when using createElement('image'), but keep the HTML5 parser constructing HTMLImageelement for it.
* html/HTMLTagNames.in:
2013-07-06 Christophe Dumez <ch.dumez@sisa.samsung.com>
Stop hardcoding interfaces that have indexed getters returning strings
https://bugs.webkit.org/show_bug.cgi?id=118414
Reviewed by Kentaro Hara.
Stop hardcoding the names of interfaces that have indexed getters returning
strings in the bindings generator. Now that we use the latest Web IDL indexed
getter, more information is provided in the IDL files and the generator is
able to figure out if the indexed getter is returning a DOMString on its own.
No new tests, no behavior change.
* bindings/scripts/CodeGeneratorJS.pm:
(GenerateGetOwnPropertySlotBody):
(GenerateImplementation):
2013-07-05 Tim Horton <timothy_horton@apple.com>
Tons of crashes on bots after r152425
https://bugs.webkit.org/show_bug.cgi?id=118440
<rdar://problem/14366772>
Reviewed by Sam Weinig.
Null-check the frame's page and early return. It's OK to do this
because it only happens when we're being torn down.
* page/FrameView.cpp:
(WebCore::FrameView::minimumScrollPosition):
(WebCore::FrameView::maximumScrollPosition):
2013-07-05 Tim Horton <timothy_horton@apple.com>
Fix r152265: FrameView's pagination mode is only one of two, and the logic was totally wrong
https://bugs.webkit.org/show_bug.cgi?id=118439
<rdar://problem/14366120>
Reviewed by Anders Carlsson.
* page/FrameView.cpp:
(WebCore::FrameView::maximumScrollPosition):
- Test both Page and FrameView's pagination modes.
- *Don't* clamp negatives to zero if we are paginated with scroll offset set,
like the original changelog claimed, but the code did the opposite.
- Don't clamp in *all* pagination modes; with 'direction: RTL' it's still possible
to have a negative maximum position in LTR/TB pagination modes.
2013-07-05 Sam Weinig <sam@webkit.org>
WKPageFindStringMatches with kWKFindOptionsBackwards still doesn't work
<rdar://problem/13881024>
https://bugs.webkit.org/show_bug.cgi?id=118436
Reviewed by Tim Horton.
* page/Page.cpp:
(WebCore::Page::findStringMatchingRanges):
- When searching backwards, use END_TO_START rather than START_TO_END.
- If there is no selection and we are searching backwards, we now select the last item,
not the first.
2013-07-05 Tullio Lucena <tullio.lucena@openbossa.org>
Nix upstreaming - Adding Nix render theme files
https://bugs.webkit.org/show_bug.cgi?id=118368
Reviewed by Benjamin Poulain.
All files related to render theme stuff.
No new tests. They will be uploaded on another patch during the upstreaming process.
* platform/nix/RenderThemeNix.cpp: Added.
* platform/nix/RenderThemeNix.h: Added.
* platform/nix/ScrollbarThemeNix.cpp: Added.
* platform/nix/ScrollbarThemeNix.h: Added.
2013-07-05 Brent Fulgham <bfulgham@apple.com>
[Windows] Identify OS-level at build-time.
https://bugs.webkit.org/show_bug.cgi?id=118428
Reviewed by Anders Carlsson.
* DerivedSources.make: Activate legible output features if present.
* WebCorePrefix.h: Activate MSVC 2010 workarounds for CGFloat if
building with VS2010.
* config.h: Activate legible output features if present.
2013-07-05 Tim Horton <timothy_horton@apple.com>
[wk2] Add API to lock the scroll position at the top or bottom of the page
https://bugs.webkit.org/show_bug.cgi?id=118429
<rdar://problem/14120323>
Reviewed by Anders Carlsson.
Test (API): WebKit2.ScrollPinningBehaviors
* WebCore.exp.in:
Expose FrameView::setScrollPinningBehavior.
* page/FrameView.cpp:
(WebCore::FrameView::FrameView):
Our pinning behavior should be DoNotPin by default.
* page/FrameView.cpp:
(WebCore::FrameView::minimumScrollPosition):
(WebCore::FrameView::maximumScrollPosition):
* page/scrolling/mac/ScrollingTreeScrollingNodeMac.mm:
(WebCore::ScrollingTreeScrollingNodeMac::minimumScrollPosition):
(WebCore::ScrollingTreeScrollingNodeMac::maximumScrollPosition):
Fix the minimum scroll position's vertical location to the maximum if
we're pinned to the bottom, and vice-versa if we're pinned to the top.
(WebCore::FrameView::setScrollPinningBehavior): Added.
If scroll pinning behavior has changed, inform ScrollingCoordinator
and update scrollbars (which will also re-pin the scroll position).
* page/FrameView.h:
Override minimumScrollPosition, add setScrollPinningBehavior,
and storage for m_scrollPinningBehavior.
* page/scrolling/ScrollingCoordinator.h:
(WebCore::ScrollingCoordinator::setScrollPinningBehavior): Added.
* page/scrolling/ScrollingTree.cpp:
(WebCore::ScrollingTree::ScrollingTree):
Our pinning behavior should be DoNotPin by default.
(WebCore::ScrollingTree::setScrollPinningBehavior):
(WebCore::ScrollingTree::scrollPinningBehavior):
Getter/setter for m_scrollPinningBehavior, scrolling-thread-safe.
* page/scrolling/ScrollingTree.h:
* page/scrolling/mac/ScrollingCoordinatorMac.h:
* page/scrolling/mac/ScrollingCoordinatorMac.mm:
(WebCore::ScrollingCoordinatorMac::setScrollPinningBehavior):
Inform ScrollingTree of the scroll pinning behavior change.
* platform/ScrollTypes.h:
Add ScrollPinningBehavior enum.
2013-07-05 Zalan Bujtas <zalan@apple.com>
iframe constrained by max-width in full screen
https://bugs.webkit.org/show_bug.cgi?id=118250
Reviewed by Antti Koivisto.
Ensure that contents inside iframe can go full screen properly.
Set max-width and max-height values to the default 'none', so that iframes are not
constrained when entering full screen.
Test: fullscreen/full-screen-iframe-with-max-width-height.html
* css/fullscreen.css:
(iframe:-webkit-full-screen):
2013-07-05 Eric Carlson <eric.carlson@apple.com>
[Mac] .webkitClosedCaptionsVisible doesn't work with "Automatic" caption mode
https://bugs.webkit.org/show_bug.cgi?id=118319
Reviewed by Jer Noble.
Track when captions are enabled with the old 'webkitClosedCaptionsVisible' attribute and
consider that when determining which track should be enabled.
Test: media/track/track-legacyapi-with-automatic-mode.html
* html/HTMLMediaElement.cpp:
(WebCore::HTMLMediaElement::HTMLMediaElement): Initialize m_webkitLegacyClosedCaptionOverride.
(WebCore::HTMLMediaElement::setWebkitClosedCaptionsVisible): Set m_webkitLegacyClosedCaptionOverride.
(WebCore::HTMLMediaElement::webkitClosedCaptionsVisible): Return m_webkitLegacyClosedCaptionOverride.
* html/HTMLMediaElement.h:
* page/CaptionUserPreferencesMediaAF.cpp:
(WebCore::CaptionUserPreferencesMediaAF::textTrackSelectionScore): Don't apply "automatic"
logic when captions were enabled with .webkitClosedCaptionsVisible.
2013-07-05 Benjamin Dupont <bdupont@nds.com>
Segmentation fault occurred when ICU data library doesn't embed the expected encoding.
https://bugs.webkit.org/show_bug.cgi?id=118410
Reviewed by Allan Sandfeld Jensen.
* platform/text/TextEncodingRegistry.cpp:
(WebCore::newTextCodec):
2013-07-05 Denis Nomiyama <d.nomiyama@samsung.com>
[GTK] fast/text/font-kerning.html fails
https://bugs.webkit.org/show_bug.cgi?id=76048
Reviewed by Martin Robinson.
Added kerning to the list of features for hb_shade() according to FontDescription::kerning().
Removed font-kerning.html from gtk/TestExpectations, which was failing before this fix.
* platform/graphics/harfbuzz/HarfBuzzFace.cpp:
(WebCore):
* platform/graphics/harfbuzz/HarfBuzzFace.h:
(HarfBuzzFace):
* platform/graphics/harfbuzz/HarfBuzzShaper.cpp:
(WebCore::HarfBuzzShaper::setFontFeatures):
2013-07-05 Gwang Yoon Hwang <ryumiel@company100.net>
Build fix GTK after r152404.
https://bugs.webkit.org/show_bug.cgi?id=118407
Reviewed by Christophe Dumez.
* GNUmakefile.list.am:
2013-07-04 Christophe Dumez <ch.dumez@sisa.samsung.com>
Have SVGTextContentElement inherit SVGGraphicsElement
https://bugs.webkit.org/show_bug.cgi?id=118351
Reviewed by Dirk Schulze.
Have SVGTextContentElement inherit SVGGraphicsElement instead of
SVGStyledElement in order to match the latest SVG2 specification:
https://svgwg.org/svg2-draft/text.html#InterfaceSVGTextContentElement
This patch also removes the SVGTransformable and SVGLocatable IDL
interfaces as they are no longer needed (were merged into
SVGGraphicsElement in the latest specification).
This is one step towards getting rid of multiple inheritance in
SVG, and complying with the latest SVG2 specification.
No new tests, covered by existing tests.
* DerivedSources.make:
* WebCore.xcodeproj/project.pbxproj:
* bindings/scripts/CodeGeneratorJS.pm:
(GetGnuVTableOffsetForType):
* bindings/scripts/CodeGeneratorObjC.pm:
* svg/SVGAnimateMotionElement.cpp:
(WebCore::SVGAnimateMotionElement::hasValidAttributeType):
* svg/SVGElement.cpp:
(WebCore::SVGElement::getBoundingBox):
* svg/SVGLocatable.idl: Removed.
* svg/SVGTextContentElement.cpp:
(WebCore::SVGTextContentElement::SVGTextContentElement):
(WebCore::SVGTextContentElement::isSupportedAttribute):
(WebCore::SVGTextContentElement::isPresentationAttribute):
(WebCore::SVGTextContentElement::collectStyleForPresentationAttribute):
(WebCore::SVGTextContentElement::parseAttribute):
(WebCore::SVGTextContentElement::svgAttributeChanged):
* svg/SVGTextContentElement.h:
* svg/SVGTextContentElement.idl:
* svg/SVGTextElement.cpp:
(WebCore::SVGTextElement::SVGTextElement):
(WebCore::SVGTextElement::animatedLocalTransform):
* svg/SVGTextElement.h:
* svg/SVGTextElement.idl:
* svg/SVGTransformable.idl: Removed.
2013-07-03 Gavin Barraclough <barraclough@apple.com>
Remove PageThrottler::m_activeThrottleBlockers
https://bugs.webkit.org/show_bug.cgi?id=118375
Reviewed by Mark Rowe.
This is simply m_activityTokens.size().
Also, fold preventThrottling into addActivityToken & allowThrottling into removeActivityToken
(these should no longer be called directly, and should not be public).
* page/PageThrottler.cpp:
(WebCore::PageThrottler::PageThrottler):
- removed m_activeThrottleBlockers
(WebCore::PageThrottler::startThrottleHysteresisTimer):
- m_activeThrottleBlockers -> m_activityTokens.size()
(WebCore::PageThrottler::throttleHysteresisTimerFired):
- m_activeThrottleBlockers -> m_activityTokens.size()
(WebCore::PageThrottler::addActivityToken):
- added functionality from preventThrottling
(WebCore::PageThrottler::removeActivityToken):
- added functionality from allowThrottling
* page/PageThrottler.h:
- removed preventThrottling, allowThrottling, and m_activeThrottleBlockers.
2013-07-01 Antti Koivisto <antti@apple.com>
Take document height into account when determining when it is considered visually non-empy
https://bugs.webkit.org/show_bug.cgi?id=118272
Reviewed by Darin Adler.
The current visually non-empy mechanism takes into account only the amount of contents in renderers.
Add a simple layout dependency so that we don't consider page non-empty until the document height
exceed a (low) height threshold (or the load completes).
* page/FrameView.cpp:
(WebCore::FrameView::performPostLayoutTasks):
Don't send layout callbacks until we have actually some content.
(WebCore::FrameView::qualifiesAsVisuallyNonEmpty):
(WebCore::FrameView::updateIsVisuallyNonEmpty):
Factor into functions.
* page/FrameView.h:
(WebCore::FrameView::incrementVisuallyNonEmptyCharacterCount):
(WebCore::FrameView::incrementVisuallyNonEmptyPixelCount):
* rendering/RenderEmbeddedObject.cpp:
(WebCore::RenderEmbeddedObject::RenderEmbeddedObject):
* rendering/RenderHTMLCanvas.cpp:
(WebCore::RenderHTMLCanvas::RenderHTMLCanvas):
The size is not known but the estimate provided here is always bigger than the threshold so
the functionality is unchanged.
2013-07-04 Christophe Dumez <ch.dumez@sisa.samsung.com>
Unreviewed build fix after r152399.
Add missing header include for SVGNames.h.
* svg/SVGImageElement.h:
2013-07-04 Gyuyoung Kim <gyuyoung.kim@samsung.com>
Change static_cast<SVGImageElement*> with toSVGImageElement
https://bugs.webkit.org/show_bug.cgi?id=118387
Reviewed by Andreas Kling.
As a step to change static_cast with toXXX, static_cast<SVGImageElement*> can
be changed with toSVGImageElement().
Blink merge from https://src.chromium.org/viewvc/blink?view=rev&revision=153557
* rendering/svg/RenderSVGImage.cpp:
(WebCore::RenderSVGImage::updateImageViewport):
(WebCore::RenderSVGImage::layout):
(WebCore::RenderSVGImage::paintForeground):
* svg/SVGImageElement.h:
(WebCore::toSVGImageElement):
* svg/SVGImageLoader.cpp:
(WebCore::SVGImageLoader::dispatchLoadEvent):
2013-07-04 Brian Holt <brian.holt@samsung.com>
[GTK] Leak: Free PangoFontDescription* in RenderThemeGtk3
https://bugs.webkit.org/show_bug.cgi?id=118386
Reviewed by Carlos Garcia Campos.
Free PangoFontDescription* allocated by gtk_style_context_get (transfer full).
* platform/gtk/RenderThemeGtk3.cpp:
(WebCore::spinButtonArrowSize):
2013-07-04 Brian Holt <brian.holt@samsung.com>
[ATK] Leak: AtkAttributeSet* should be freed
https://bugs.webkit.org/show_bug.cgi?id=118307
Reviewed by Christophe Dumez.
Use AtkAttributeSet* instead of GSList*.
* accessibility/atk/WebKitAccessibleWrapperAtk.cpp:
(webkitAccessibleGetObjectLocale):
2013-07-04 Mario Sanchez Prada <mario.prada@samsung.com>
[ATK] Do not expose '\n' for wrapped lines with ATK_TEXT_BOUNDARY_CHAR
https://bugs.webkit.org/show_bug.cgi?id=118359
Reviewed by Carlos Garcia Campos.
Do not expose a '\n' character for every visual line break.
* accessibility/atk/WebKitAccessibleInterfaceText.cpp:
(webkitAccessibleTextGetChar): Removed wrong code.
2013-07-04 Patrick Gansterer <paroga@webkit.org>
Port FileSystemWin.cpp to WinCE
https://bugs.webkit.org/show_bug.cgi?id=117935
Reviewed by Brent Fulgham.
Add #if !OS(WINCE) around a few lines of the code, so it can be used by the WinCE port too.
* PlatformWinCE.cmake:
* platform/win/FileSystemWin.cpp:
(WebCore::storageDirectory):
* platform/wince/FileSystemWinCE.cpp: Removed.
2013-07-04 Balazs Kelemen <b.kelemen@samsung.com>
[GStreamer] support preload="metadata"
https://bugs.webkit.org/show_bug.cgi?id=116817
Reviewed by Eric Carlson.
Add appropriate behavior for preload="metadata". Delay enabling download buffering
until playback is started in this case. This behavior fits with the standard quite
well and this is the most exact match we can get (at least without adding too much
extra complexity). What matters mostly is that we can avoid loading the media
before playback but we have the first frame and the metadata.
Test: media/video-load-preload-metadata.html
* platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:
(WebCore::MediaPlayerPrivateGStreamer::prepareToPlay): Set |m_preload| to |Auto|
so we will start download buffering if we did not start it yet.
(WebCore::MediaPlayerPrivateGStreamer::play): Ditto.
(MediaPlayerPrivateGStreamer::setDownloadBuffering): Only start download
buffering if |m_preload == Auto|. Also make sure we don't clear the download
flag once we started downloading because it would result in not well defined
behavior and it does not really makes sense.
(MediaPlayerPrivateGStreamer::setPreload): Set download buffering accordingly.
2013-07-03 Jae Hyun Park <jae.park@company100.net>
[Coordinated Graphics] Don't use && operator in ASSERT
https://bugs.webkit.org/show_bug.cgi?id=118377
Reviewed by Noam Rosenthal.
We don't use && opeartor in ASSERT because it's impossible to know which
condition caused the assertion.
* platform/graphics/texmap/coordinated/CoordinatedBackingStore.cpp:
(WebCore::CoordinatedBackingStoreTile::swapBuffers):
* platform/graphics/texmap/coordinated/CoordinatedGraphicsLayer.cpp:
(WebCore::CoordinatedGraphicsLayer::~CoordinatedGraphicsLayer):
2013-07-03 KyungTae Kim <ktf.kim@samsung.com>
[EFL] Support some more editing keyboard events
https://bugs.webkit.org/show_bug.cgi?id=118346
Reviewed by Gyuyoung Kim.
For editable contents, support the shortcuts for copy, page, cut, select all, undo and redo.
* platform/efl/EflKeyboardUtilities.cpp:
2013-07-03 Chris Fleizach <cfleizach@apple.com>
AX: Items the img aria role aren't inserting an object replacement character
https://bugs.webkit.org/show_bug.cgi?id=118259
Reviewed by Tim Horton.
VoiceOver relies on object replacement characters being emitted when asking for selected text.
This has worked if a real <img> is used, but if role="img" is used on a <div>, for example,
no emission is performed, which leads to missed elements in text.
Test: platform/mac/accessibility/aria-image-emits-object-replacement.html
* editing/TextIterator.cpp:
(WebCore::isRendererReplacedElement):
(WebCore::TextIterator::advance):
2013-07-03 Kangil Han <kangil.han@samsung.com>
Adopt is/toHTMLMapElement for code cleanup
https://bugs.webkit.org/show_bug.cgi?id=118235
Reviewed by Andreas Kling.
To enhance readability, this patch adopts is/toHTMLMapElement.
This also helps out to reduce duplicated use of static_cast.
* accessibility/AccessibilityRenderObject.cpp:
(WebCore::AccessibilityRenderObject::getDocumentLinks):
(WebCore::AccessibilityRenderObject::accessibilityImageMapHitTest):
* dom/DocumentOrderedMap.cpp:
(WebCore::keyMatchesMapName):
(WebCore::keyMatchesLowercasedMapName):
* dom/TreeScope.cpp:
(WebCore::TreeScope::getImageMap):
* html/HTMLAreaElement.cpp:
(WebCore::HTMLAreaElement::imageElement):
* html/HTMLMapElement.h:
(WebCore::isHTMLMapElement):
(WebCore::toHTMLMapElement):
2013-07-03 Brent Fulgham <bfulgham@apple.com>
[Windows] Unreviewed build correction after r15283.
* WebCorePrefix.h: Remove include directive for CGFloat.h, as it
is not present in all Windows build environments.
2013-07-03 Brent Fulgham <bfulgham@apple.com>
[Windows] Exclude unsupported QuartzCore Features.
https://bugs.webkit.org/show_bug.cgi?id=118374
Reviewed by Anders Carlsson.
* WebCore.vcxproj/WebCoreCG.props: Exclude a few non-Windows
concepts from the QuartzCore headers.
2013-07-03 Gavin Barraclough <barraclough@apple.com>
Simplify PageThrottler ownership.
https://bugs.webkit.org/show_bug.cgi?id=118372
Reviewed by Sam Weinig.
* page/Page.cpp:
(WebCore::Page::~Page):
- 'clearPage' method removed - just clear the own pointer.
* page/Page.h:
- make m_pageThrottler an OwnPtr.
* page/PageThrottler.cpp:
(WebCore::PageThrottler::~PageThrottler):
- moved 'setThrottled(false)' from 'clearPage' (removed).
(WebCore::PageThrottler::throttlePage):
(WebCore::PageThrottler::unthrottlePage):
- no need to check 'm_page'
* page/PageThrottler.h:
(WebCore::PageThrottler::create):
- create a PassOwnPtr, not PassRefPtr.
2013-07-03 Brent Fulgham <bfulgham@apple.com>
[Windows] Updates to support changes in CoreGraphics libraries.
https://bugs.webkit.org/show_bug.cgi?id=118373
Reviewed by Anders Carlsson.
* WebCorePrefix.h: Include definitions for isnan/round/roundf for versions of
Visual Studio that do not provide them natively.
2013-07-03 Gordon Sheridan <gordon_sheridan@apple.com>
Implement mechanism to detect (partially) hidden blocked plugins.
https://bugs.webkit.org/show_bug.cgi?id=117998
Reviewed by Dean Jackson.
* rendering/RenderEmbeddedObject.cpp:
(WebCore::RenderEmbeddedObject::replacementTextRect):
Added private method for calculating the size of the replacement text for blocked plugins.
(WebCore::RenderEmbeddedObject::isReplacementObscured):
Added public method to determine if the EMBED element used for a blocked plugin is inaccessible to the user.
* rendering/RenderEmbeddedObject.h:
Declare the two new methods mentioned above.
* WebCore.exp.in:
Export RenderEmbeddedObject::isReplacementObscured().
2013-07-03 Jessie Berlin <jberlin@apple.com>
Speculative build fix after r152340.
* WebCore.exp.in:
2013-07-03 Kangil Han <kangil.han@samsung.com>
Append overloading function for isFooElement
https://bugs.webkit.org/show_bug.cgi?id=118334
Reviewed by Antti Koivisto.
Node::hasTagName needs additional isElementNode() check when it is triggered.
So conversion from Element* to Node* in isFooElement should be avoided.
Therefore, to support both Node* and Element* as an argument of isFooElement,
this patch appends overloading inline function.
* css/CSSStyleSheet.cpp:
(WebCore::isAcceptableCSSStyleSheetParent):
* css/StyleScopeResolver.cpp:
(WebCore::StyleScopeResolver::scopeFor):
* dom/Node.cpp:
(WebCore::Node::numberOfScopedHTMLStyleChildren):
* html/HTMLAnchorElement.h:
(WebCore::isHTMLAnchorElement):
* html/HTMLAreaElement.h:
(WebCore::isHTMLAreaElement):
* html/HTMLAudioElement.h:
(WebCore::isHTMLAudioElement):
* html/HTMLFormElement.h:
(WebCore::isHTMLFormElement):
* html/HTMLImageElement.h:
(WebCore::isHTMLImageElement):
* html/HTMLInputElement.h:
(WebCore::isHTMLInputElement):
* html/HTMLLabelElement.h:
(WebCore::isHTMLLabelElement):
* html/HTMLOptGroupElement.h:
(WebCore::isHTMLOptGroupElement):
* html/HTMLOptionElement.h:
(WebCore::isHTMLOptionElement):
* html/HTMLStyleElement.h:
(WebCore::isHTMLStyleElement):
(WebCore::toHTMLStyleElement):
* html/HTMLTextAreaElement.h:
(WebCore::isHTMLTextAreaElement):
2013-07-03 Balazs Kelemen <b.kelemen@samsung.com>
Gif: zero filling should use memset instead of setRGBA for every pixel
https://bugs.webkit.org/show_bug.cgi?id=118350
Reviewed by Allan Sandfeld Jensen.
No new tests. Actually it is not covered by existing tests. Surprisingly we haven't got pixel
tests for animated images. Given that this patch is pretty trivial I don't think it's worth the
cost to start introducing such tests.
I added a manual test: animated-gif-dispose-background.html.
GIFImageDecoder::initializeFrameBuffer use a loop to fill a subrect with tranparent pixels.
This is extremely ineffecient. The use case for this code path is not frequent on the web
but it's still better to fix it.
* platform/image-decoders/ImageDecoder.cpp:
(WebCore::ImageFrame::zeroFillFrameRect):
* platform/image-decoders/ImageDecoder.h:
* platform/image-decoders/gif/GIFImageDecoder.cpp:
(WebCore::GIFImageDecoder::initFrameBuffer):
Fixed indentation in addition.
2013-07-03 Przemyslaw Szymanski <p.szymanski3@samsung.com>
TextureUnit code optimization
https://bugs.webkit.org/show_bug.cgi?id=117868
Reviewed by Noam Rosenthal.
According to OpenGL ES 2.0 specification it is not possible to use both
texture2D and textureCubeMap in one texture unit.
This patch reduces amount of code, slightly increases rendering performance
and makes WebKit more consistent with OpenGL.
No new tests. Covered by existing tests:
LayoutTests/webgl/conformance/textures/tex-image-webgl.html
LayoutTests/webgl/conformance/textures/texture-complete.html
* html/canvas/WebGLRenderingContext.cpp:
(WebCore::WebGLRenderingContext::~WebGLRenderingContext):
(WebCore::WebGLRenderingContext::reshape):
(WebCore::WebGLRenderingContext::bindTexture):
(WebCore::WebGLRenderingContext::deleteTexture):
(WebCore::WebGLRenderingContext::getParameter):
(WebCore::WebGLRenderingContext::handleNPOTTextures):
(WebCore::WebGLRenderingContext::validateTextureBinding):
(WebCore::WebGLRenderingContext::restoreCurrentTexture2D):
* html/canvas/WebGLRenderingContext.h:
2013-07-03 Christophe Dumez <ch.dumez@sisa.samsung.com>
Stop inheriting SVGFilterPrimitiveStandardAttributes in SVG
https://bugs.webkit.org/show_bug.cgi?id=118305
Reviewed by Kentaro Hara.
Stop inheriting SVGFilterPrimitiveStandardAttributes in SVG and use
Web IDL implements instead to get rid of multiple inheritance and
follow the latest specification:
- http://www.w3.org/TR/filter-effects/#DOMInterfaces
No new tests, no behavior change.
* CMakeLists.txt:
* DerivedSources.pri:
* GNUmakefile.list.am:
* svg/SVGFEBlendElement.idl:
* svg/SVGFEColorMatrixElement.idl:
* svg/SVGFEComponentTransferElement.idl:
* svg/SVGFECompositeElement.idl:
* svg/SVGFEConvolveMatrixElement.idl:
* svg/SVGFEDiffuseLightingElement.idl:
* svg/SVGFEDisplacementMapElement.idl:
* svg/SVGFEDropShadowElement.idl:
* svg/SVGFEFloodElement.idl:
* svg/SVGFEGaussianBlurElement.idl:
* svg/SVGFEImageElement.idl:
* svg/SVGFEMergeElement.idl:
* svg/SVGFEMorphologyElement.idl:
* svg/SVGFEOffsetElement.idl:
* svg/SVGFESpecularLightingElement.idl:
* svg/SVGFETileElement.idl:
* svg/SVGFETurbulenceElement.idl:
2013-07-03 Zalan Bujtas <zalan@apple.com>
H&R Block 2010 Help window can not be reopened.
https://bugs.webkit.org/show_bug.cgi?id=118342
Reviewed by Antti Koivisto.
http://trac.webkit.org/changeset/118916 changed the window.focus() behaviour so that
only the opener can (re)focus() a particular window.
H&R Block app relies on the relaxed window.focus() rules.
* WebCore.exp.in:
* platform/RuntimeApplicationChecks.cpp:
(WebCore::applicationIsHRBlock):
* platform/RuntimeApplicationChecks.h:
2013-07-03 Zan Dobersek <zdobersek@igalia.com>
Further build fixing for build configurations that disable CSS regions support.
* dom/PseudoElement.h: Wrap shouldMoveToFlowThread override into the ENABLE(CSS_REGIONS) build guard.
2013-07-03 Zan Dobersek <zdobersek@igalia.com>
Unreviewed build fix after r152320 and r152345 for build configurations that enable
SVG support but disable CSS regions support.
* svg/SVGElement.cpp: Wrap shouldMoveToFlowThread override into the ENABLE(CSS_REGIONS) build guard.
* svg/SVGElement.h: Ditto.
2013-07-03 Radu Stavila <stavila@adobe.com>
[CSS Regions] Improve implementation of elements in region being flowed to another flow thread
https://bugs.webkit.org/show_bug.cgi?id=118300
Based on patch by Zoltán Árvai <zarvai@inf.u-szeged.hu>
Reviewed by Csaba Osztrogonác.
Fixed CSS_REGIONS guard.
* dom/Element.h:
* dom/NodeRenderingContext.cpp:
(WebCore::NodeRenderingContext::elementInsideRegionNeedsRenderer):
(WebCore::NodeRenderingContext::moveToFlowThreadIfNeeded):
2013-07-03 Christophe Dumez <ch.dumez@sisa.samsung.com>
Move SVGTests attributes parsing to SVGGraphicsElement
https://bugs.webkit.org/show_bug.cgi?id=118292
Reviewed by Darin Adler.
Move SVGTests attributes parsing to SVGGraphicsElement instead of doing
this in each of its subclasses. SVGGraphicsElement is now the one
subclassing SVGTests after r152167.
No new tests, no behavior change.
* svg/SVGAElement.cpp:
(WebCore::SVGAElement::isSupportedAttribute):
(WebCore::SVGAElement::parseAttribute):
* svg/SVGCircleElement.cpp:
(WebCore::SVGCircleElement::isSupportedAttribute):
(WebCore::SVGCircleElement::parseAttribute):
(WebCore::SVGCircleElement::svgAttributeChanged):
* svg/SVGClipPathElement.cpp:
(WebCore::SVGClipPathElement::isSupportedAttribute):
(WebCore::SVGClipPathElement::parseAttribute):
* svg/SVGEllipseElement.cpp:
(WebCore::SVGEllipseElement::isSupportedAttribute):
(WebCore::SVGEllipseElement::parseAttribute):
(WebCore::SVGEllipseElement::svgAttributeChanged):
* svg/SVGForeignObjectElement.cpp:
(WebCore::SVGForeignObjectElement::isSupportedAttribute):
(WebCore::SVGForeignObjectElement::parseAttribute):
(WebCore::SVGForeignObjectElement::svgAttributeChanged):
* svg/SVGGElement.cpp:
(WebCore::SVGGElement::isSupportedAttribute):
(WebCore::SVGGElement::parseAttribute):
(WebCore::SVGGElement::svgAttributeChanged):
* svg/SVGGraphicsElement.cpp:
(WebCore::SVGGraphicsElement::isSupportedAttribute):
(WebCore::SVGGraphicsElement::parseAttribute):
(WebCore::SVGGraphicsElement::svgAttributeChanged):
* svg/SVGImageElement.cpp:
(WebCore::SVGImageElement::isSupportedAttribute):
(WebCore::SVGImageElement::parseAttribute):
(WebCore::SVGImageElement::svgAttributeChanged):
* svg/SVGLineElement.cpp:
(WebCore::SVGLineElement::isSupportedAttribute):
(WebCore::SVGLineElement::parseAttribute):
(WebCore::SVGLineElement::svgAttributeChanged):
* svg/SVGPathElement.cpp:
(WebCore::SVGPathElement::isSupportedAttribute):
(WebCore::SVGPathElement::parseAttribute):
(WebCore::SVGPathElement::svgAttributeChanged):
* svg/SVGPolyElement.cpp:
(WebCore::SVGPolyElement::isSupportedAttribute):
(WebCore::SVGPolyElement::parseAttribute):
(WebCore::SVGPolyElement::svgAttributeChanged):
* svg/SVGRectElement.cpp:
(WebCore::SVGRectElement::isSupportedAttribute):
(WebCore::SVGRectElement::parseAttribute):
(WebCore::SVGRectElement::svgAttributeChanged):
* svg/SVGSVGElement.cpp:
(WebCore::SVGSVGElement::parseAttribute):
(WebCore::SVGSVGElement::svgAttributeChanged): Fall back to calling
SVGGraphicsElement::svgAttributeChanged() instead of
SVGStyledElement::svgAttributeChanged() as SVGGraphicsElement is the
parent class and it takes care of parsing SVGTests attributes now.
* svg/SVGUseElement.cpp:
(WebCore::SVGUseElement::isSupportedAttribute):
(WebCore::SVGUseElement::parseAttribute):
(WebCore::SVGUseElement::svgAttributeChanged):
2013-07-02 Ryosuke Niwa <rniwa@webkit.org>
Modernize QualifiedName by wrapping gNameCache in a function and using more early exits
https://bugs.webkit.org/show_bug.cgi?id=118299
Reviewed by Andreas Kling.
Did cleanups.
* dom/QualifiedName.cpp:
(WebCore::qualifiedNameCache): Added to wrap gNameCache.
(WebCore::QualifiedName::QualifiedName):
(WebCore::QualifiedName::QualifiedNameImpl::~QualifiedNameImpl):
(WebCore::QualifiedName::toString): Use early exit and StringBuilder.
(WebCore::QualifiedName::init): Use early exit.
2013-07-02 Simon Fraser <simon.fraser@apple.com>
Don't set z-index: 0 on lots of elements with -webkit-overflow-scrolling: touch
https://bugs.webkit.org/show_bug.cgi?id=118337
Reviewed by Benjamin Poulain.
-webkit-overflow-scrolling: touch is an inherited property that, on iOS, controls
the behavior of overflow scrolling content, and causes overflow scrolling elements
to become CSS stacking contexts.
However, the code was too aggressive in setting style->setZIndex(0), doing so
for any element with overflow != hidden. Since the default for overflow is visible,
that meant almost every element.
Previously, this didn't really matter. However, since r125693, any renderer with non-auto
z-index gets a RenderLayer, and that RenderLayer will become a stacking context. The result
was too many RenderLayers and incorrect stacking context behavior.
Fix by ensuring that -webkit-overflow-scrolling: touch only affects elements which
are actually scrollable.
Also move the code that does this to below the code that adjust overflow style
for different elements.
* css/StyleResolver.cpp:
(WebCore::isScrollableOverflow):
(WebCore::StyleResolver::adjustRenderStyle):
2013-07-02 Commit Queue <commit-queue@webkit.org>
Unreviewed, rolling out r152318.
http://trac.webkit.org/changeset/152318
https://bugs.webkit.org/show_bug.cgi?id=118333
This patch broke media/track/track-automatic-subtitles.html on
Mac (Requested by dfarler on #webkit).
* page/CaptionUserPreferencesMediaAF.cpp:
(WebCore::CaptionUserPreferencesMediaAF::textTrackSelectionScore):
2013-07-02 Ruth Fong <ruth_fong@apple.com>
Change event should not be dispatched by clicking a scrollbar of select listbox
https://bugs.webkit.org/show_bug.cgi?id=118019
<rdar://problem/14297760>
Reviewed by Dean Jackson.
Test: fast/forms/select/listbox-click-on-scrollbar.html
Merge the following:
http://src.chromium.org/viewvc/blink?view=revision&revision=151689
https://chromium.googlesource.com/chromium/blink/+/492549b0fcaa58a85aa0797446b62985a263704f
Previously, a select element with the multiple attribute would dispatch
an onChanged event when the scrollbar is clicked. This patch corrects this
issue by only calling listBoxOnChange(), which fires the onChanged event,
when an actual option is clicked.
* html/HTMLSelectElement.cpp:
(WebCore::HTMLSelectElement::childrenChanged): Updated to clear the list
of selected items when when an <option> element is added to/deleted from its <select> element.
(Without this addition, if a option was selected, and then JavaScript was used to modify
the <select> element, and then the scrollbar was clicked, an onChanged event would fire
because it remembers the previously selected option.)
(WebCore::HTMLSelectElement::listBoxOnChange):
(WebCore::HTMLSelectElement::listBoxDefaultEventHandler): Updated to
only call listBoxOnChange() if at least one option is selected.
2013-07-02 Alex Christensen <achristensen@apple.com>
Preparing Windows WebGL build system.
https://bugs.webkit.org/show_bug.cgi?id=118325
Reviewed by Brent Fulgham.
* WebCore.vcxproj/WebCore.vcxproj: Added EGL files, removed unused GraphicsContext3DOpenGL.cpp.
* WebCore.vcxproj/WebCore.vcxproj.filters: Added EGL filter and files, removed unused GraphicsContext3DOpenGL.cpp.
2013-07-02 Jessie Berlin <jberlin@apple.com>
The callback for WKPageGetPlugInInformation needs info about whether or not there are any
non-playing instances of the plug-in on the page
https://bugs.webkit.org/show_bug.cgi?id=118330
Reviewed by Anders Carlsson.
* WebCore.exp.in:
Expose a symbol so it can be used in WebKit2.
2013-07-02 Alex Christensen <achristensen@apple.com>
Added getProcAddress implementation for Windows in OpenGLShims.
https://bugs.webkit.org/show_bug.cgi?id=118312
Reviewed by Brent Fulgham.
* platform/graphics/OpenGLShims.cpp:
(WebCore::getProcAddress): Added for Windows.
2013-07-02 Jer Noble <jer.noble@apple.com>
media/unsupported-rtsp.html is failing
https://bugs.webkit.org/show_bug.cgi?id=118327
Reviewed by Eric Carlson.
Fixes the media/unsupported-rtsp.html test.
Set the contentType field of contentInformationRequest in order to trigger AVFoundation to
notice that loading failed and generate an error.
* platform/graphics/avfoundation/objc/WebCoreAVFResourceLoader.mm:
(WebCore::WebCoreAVFResourceLoader::notifyFinished):
2013-07-02 Alex Christensen <achristensen@apple.com>
Fixed compile error in non-X11 platforms using EGL.
https://bugs.webkit.org/show_bug.cgi?id=118323
Reviewed by Brent Fulgham.
* platform/graphics/egl/GLContextEGL.cpp:
(WebCore::GLContextEGL::createPixmapContext): Put all X11-specific code into #if PLATFORM(X11).
2013-07-02 Radu Stavila <stavila@adobe.com>
[CSS Regions] Improve implementation of elements in region being flowed to another flow thread
https://bugs.webkit.org/show_bug.cgi?id=118300
Reviewed by David Hyatt.
Methods that must be const have been turned back into const. Code has been better organized.
Performance is better. Tests have been added to.
* dom/Element.cpp:
(WebCore::Element::detach):
(WebCore::Element::setIsInsideRegion):
(WebCore::Element::isInsideRegion):
(WebCore::Element::shouldMoveToFlowThread):
* dom/Element.h:
* dom/ElementRareData.h:
(WebCore::ElementRareData::isInsideRegion):
(WebCore::ElementRareData::setIsInsideRegion):
(WebCore::ElementRareData::ElementRareData):
* dom/Node.cpp:
(WebCore::Node::isRegisteredWithNamedFlow):
* dom/Node.h:
* dom/NodeRenderingContext.cpp:
(WebCore::NodeRenderingContext::parentRenderer):
(WebCore::NodeRenderingContext::shouldCreateRenderer):
(WebCore::NodeRenderingContext::elementInsideRegionNeedsRenderer):
(WebCore::NodeRenderingContext::moveToFlowThreadIfNeeded):
(WebCore::NodeRenderingContext::createRendererForElementIfNeeded):
* dom/NodeRenderingContext.h:
* dom/PseudoElement.h:
* dom/Text.cpp:
(WebCore::Text::textRendererIsNeeded):
* dom/Text.h:
* rendering/FlowThreadController.cpp:
(WebCore::FlowThreadController::unregisterNamedFlowContentNode):
(WebCore::FlowThreadController::isContentNodeRegisteredWithAnyNamedFlow):
* rendering/FlowThreadController.h:
* rendering/RenderObject.h:
* rendering/RenderRegion.h:
* svg/SVGElement.cpp:
(WebCore::SVGElement::shouldMoveToFlowThread):
* svg/SVGElement.h:
2013-07-02 Eric Carlson <eric.carlson@apple.com>
[Mac] .webkitClosedCaptionsVisible doesn't work with "Automatic" caption mode
https://bugs.webkit.org/show_bug.cgi?id=118319
Reviewed by Darin Adler.
Test: media/track/track-legacyapi-with-automatic-mode.html
* page/CaptionUserPreferencesMediaAF.cpp:
(WebCore::CaptionUserPreferencesMediaAF::textTrackSelectionScore): Don't apply "automatic"
logic when captions were enabled with .webkitClosedCaptionsVisible.
2013-07-02 Anders Carlsson <andersca@apple.com>
Always flip the coordinate system before drawing NSViews from Widget::paint
https://bugs.webkit.org/show_bug.cgi?id=118318
<rdar://problem/13895483>
Reviewed by Beth Dakin.
Undo the change that would not flip on 10.9; turns out the bug was in AppKit. Also remove the
_hasCanDrawSubviewsIntoLayerOrAncestor workaround since drawing works correctly now.
Also, pass flipped:NO when creating the NSGraphicsContext to indicate that the graphics context
is unflipped as far as AppKit knows (since we flipped it earlier).
* platform/mac/WidgetMac.mm:
(WebCore::Widget::paint):
2013-06-26 Robert Hogan <robert@webkit.org>
empty inlines should not affect line-wrapping
https://bugs.webkit.org/show_bug.cgi?id=25638
Reviewed by David Hyatt.
Don't break on empty inlines if we're in the middle of a word. I took this opportunity to
refactor the series of checks we perform to establish if we can break at the current position.
Test: fast/text/whitespace/inline-whitespace-wrapping-11.html
* rendering/RenderBlockLineLayout.cpp:
(WebCore::textBeginsWithBreakablePosition):
(WebCore::canBreakAtThisPosition):
(WebCore::RenderBlock::LineBreaker::nextSegmentBreak):
2013-07-02 Jae Hyun Park <jae.park@company100.net>
Implement CoordinatedSurface for Threaded Coordinated Graphics
https://bugs.webkit.org/show_bug.cgi?id=109661
Reviewed by Noam Rosenthal.
This is a preparation patch for Threaded Coordianted Graphics.
This patch implements ThreadSafeCoordinatedSurface using ImageBuffer as a
backend. Also, this patch moves common implementation to CoordinatedSurface to
prevent duplication of code.
* platform/graphics/texmap/coordinated/CoordinatedSurface.cpp:
(WebCore::CoordinatedSurface::CoordinatedSurface):
* platform/graphics/texmap/coordinated/CoordinatedSurface.h:
(WebCore::CoordinatedSurface::size):
(WebCore::CoordinatedSurface::flags):
* platform/graphics/texmap/coordinated/ThreadSafeCoordinatedSurface.cpp: Added.
(WebCore::ThreadSafeCoordinatedSurface::create):
(WebCore::ThreadSafeCoordinatedSurface::ThreadSafeCoordinatedSurface):
(WebCore::ThreadSafeCoordinatedSurface::~ThreadSafeCoordinatedSurface):
(WebCore::ThreadSafeCoordinatedSurface::paintToSurface):
(WebCore::ThreadSafeCoordinatedSurface::copyToTexture):
* platform/graphics/texmap/coordinated/ThreadSafeCoordinatedSurface.h: Added.
2013-07-02 Geoffrey Garen <ggaren@apple.com>
plainText() is O(N^2)
https://bugs.webkit.org/show_bug.cgi?id=118282
<rdar://problem/14284360>
Reviewed by Alexey Proskuryakov.
* editing/TextIterator.cpp:
(WebCore::plainText): Linear growth for a vector data type is O(N^2).
Don't do that. Luckily, StringBuilder does the right thing automatically,
so we can just delete code.
2013-07-02 Tim Horton <timothy_horton@apple.com>
constrainScrollPositionForOverhang needs to handle scrollOrigin correctly
https://bugs.webkit.org/show_bug.cgi?id=118176
<rdar://problem/14301271>
Reviewed by Anders Carlsson.
Test: compositing/geometry/fixed-position-flipped-writing-mode.html
WebCore makes use of constrainScrollPositionForOverhang not only for
constraining fixed- and sticky-positioned elements to the viewport, but
also for clamping the tile cache's visible rect.
Therefore, constrainScrollPositionForOverhang needs to correctly take
the scrollOrigin into account. The easiest way I saw to do this was to
reimplement the function in terms of a pair of rect intersections
between a virtual scrollable "viewport" and the document (with a bit
of complication from headers and footers).
The first intersection is performed, then if the viewport doesn't fit,
it is pushed down and to the right, from the origin. Next, we intersect
again, this time pushing the rect up by the amount it overflowed the document
rect from the bottom right. This performs effectively the same constraint
as previously, but handles the scrollOrigin correctly and is also somewhat
easier to read and understand (with pictures).
* page/scrolling/mac/ScrollingTreeScrollingNodeMac.mm:
(WebCore::ScrollingTreeScrollingNodeMac::setScrollLayerPosition):
Subtract the scrollOrigin out of the offset passed to scrollOffsetForFixedPosition,
it's expecting an offset without the origin included.
* platform/ScrollableArea.cpp:
(WebCore::ScrollableArea::constrainScrollPositionForOverhang):
Reimplement the function as described above.
2013-07-02 Christophe Dumez <ch.dumez@sisa.samsung.com>
Remove SVGStyledLocatableElement class
https://bugs.webkit.org/show_bug.cgi?id=118283
Reviewed by Dirk Schulze.
Remove SVGStyledLocatableElement class and have SVGGraphicsElement
inherit SVGStyledElement directly instead. SVGStyledLocatableElement
is no longer needed and according to the specification, SVGGraphicsElement
should inherit SVGStyledElement (actually SVGElement once we merge
SVGStyledElement into SVGElement).
No new tests, no behavior change.
* CMakeLists.txt:
* GNUmakefile.list.am:
* Target.pri:
* WebCore.order:
* WebCore.vcxproj/WebCore.vcxproj:
* WebCore.vcxproj/WebCore.vcxproj.filters:
* WebCore.xcodeproj/project.pbxproj:
* bindings/scripts/CodeGeneratorJS.pm:
(GetGnuVTableOffsetForType):
* svg/SVGAllInOne.cpp:
* svg/SVGElement.cpp:
(WebCore::SVGElement::getBoundingBox):
* svg/SVGElement.h:
* svg/SVGGraphicsElement.cpp:
(WebCore::SVGGraphicsElement::SVGGraphicsElement):
(WebCore::SVGGraphicsElement::parseAttribute):
(WebCore::SVGGraphicsElement::svgAttributeChanged):
* svg/SVGGraphicsElement.h:
* svg/SVGLocatable.cpp:
(WebCore::SVGLocatable::getTransformToElement):
* svg/SVGStyledElement.cpp:
(WebCore::SVGStyledElement::localCoordinateSpaceTransform):
* svg/SVGStyledLocatableElement.cpp: Removed.
* svg/SVGStyledLocatableElement.h: Removed.
2013-07-02 peavo@outlook.com <peavo@outlook.com>
[Curl] Crash after download.
https://bugs.webkit.org/show_bug.cgi?id=118303
Reviewed by Brent Fulgham.
We need to make sure that the Curl easy handle is removed from the Curl multi handle before it's freed.
* platform/network/curl/CurlDownload.cpp:
(CurlDownloadManager::updateHandleList): Use addToCurl() and removeFromCurl() methods.
(CurlDownloadManager::addToCurl): Add method to add easy handle to multi handle.
(CurlDownloadManager::removeFromCurl): Add method to remove easy handle from multi handle, and then delete the handle.
(CurlDownloadManager::downloadThread): Use removeFromCurl() method.
(CurlDownload::~CurlDownload):
* platform/network/curl/CurlDownload.h: Avoid deleting Curl easy handle in destructor.
2013-07-02 Radu Stavila <stavila@adobe.com>
[CSSRegions] No other SVG elements except the SVGRoot must have RegionInfo objects attached
https://bugs.webkit.org/show_bug.cgi?id=118295
Reviewed by Antti Koivisto.
Only the SVGRoot element can be collected in a named flow. As such, no SVG element below the root should
be attached to a RenderBoxRegionInfo object.
A larger patch's test (https://bugs.webkit.org/show_bug.cgi?id=118300) is failing because of this.
This change will be covered by that test.
* rendering/RenderBoxModelObject.h:
(WebCore::RenderBoxModelObject::canHaveBoxInfoInRegion):
* rendering/RenderObject.h:
(WebCore::RenderObject::isRenderSVGBlock):
* rendering/svg/RenderSVGBlock.h:
2013-07-02 Kangil Han <kangil.han@samsung.com>
is/toHTMLStyleElement should use Element* for its argument
https://bugs.webkit.org/show_bug.cgi?id=118286
Reviewed by Andreas Kling.
To reduce unnecessary call of isElementNode(), this patch replaces argument
of is/toHTMLStyleElement from Node* to Element*. Plus, use Element::hasTagName
in collectActiveStyleSheets function for minor code refactoring since
its cost is cheaper than Node::hasTagName.
* css/CSSStyleSheet.cpp:
(WebCore::isAcceptableCSSStyleSheetParent):
* css/StyleScopeResolver.cpp:
(WebCore::StyleScopeResolver::scopeFor):
* dom/DocumentStyleSheetCollection.cpp:
(WebCore::DocumentStyleSheetCollection::collectActiveStyleSheets):
* dom/Node.cpp:
(WebCore::Node::numberOfScopedHTMLStyleChildren):
* html/HTMLStyleElement.h:
(WebCore::isHTMLStyleElement):
(WebCore::toHTMLStyleElement):
2013-07-02 Ryosuke Niwa <rniwa@webkit.org>
Unexpose EditingPropertiesToInclude in EditingStyle.h after r151772
https://bugs.webkit.org/show_bug.cgi?id=118271
Reviewed by Andreas Kling.
Don't expose EditingPropertiesToInclude in EditingStyle.h and do other cleanups as described below.
No new tests since there should be no behavioral change.
* editing/EditingStyle.cpp:
(WebCore::copyEditingProperties): Use newly defined numAllEditingProperties and numInheritableEditingProperties
instead of a magic number of 2.
(WebCore::copyPropertiesFromComputedStyle): Renamed from editingStyleFromComputedStyle. It now takes ComputedStyleExtractor and
PropertiesToInclude instead of Node* and EditingPropertiesToInclude and handles AllProperties. Also added a helper that takes Node*.
(WebCore::EditingStyle::init): Calls copyPropertiesFromComputedStyle. Unfortunately, we need to special-case EditingPropertiesInEffect
and not set background-color and text-decoration. This is required probably due to a bug elsewhere.
(WebCore::EditingStyle::removeStyleAddedByNode):
(WebCore::EditingStyle::removeStyleConflictingWithStyleOfNode):
(WebCore::extractEditingProperties): Renamed from EditingStyle::removeAllButEditingProperties; takes PropertiesToInclude instead of
EditingPropertiesToInclude since the only caller of this function, EditingStyle::mergeInlineAndImplicitStyleOfElement, was converting
the type.
(WebCore::EditingStyle::mergeInlineAndImplicitStyleOfElement):
* editing/EditingStyle.h:
2013-07-02 Gyuyoung Kim <gyuyoung.kim@samsung.com>
Introduce toSVGInlineTextBox
https://bugs.webkit.org/show_bug.cgi?id=118289
Reviewed by Andreas Kling.
As a step to change static_cast with toXXX, static_cast<SVGInlineTextBox*> can
be changed with toSVGInlineTextBox().
Blink merge from https://src.chromium.org/viewvc/blink?view=rev&revision=153345
* rendering/svg/RenderSVGInlineText.cpp:
(WebCore::RenderSVGInlineText::positionForPoint):
* rendering/svg/SVGInlineFlowBox.cpp:
(WebCore::SVGInlineFlowBox::paintSelectionBackground):
(WebCore::SVGInlineFlowBox::paint):
(WebCore::SVGInlineFlowBox::computeTextMatchMarkerRectForRenderer):
* rendering/svg/SVGInlineTextBox.h:
(WebCore::toSVGInlineTextBox):
* rendering/svg/SVGRenderTreeAsText.cpp:
(WebCore::writeSVGInlineTextBoxes):
* rendering/svg/SVGRootInlineBox.cpp:
(WebCore::SVGRootInlineBox::paint):
(WebCore::SVGRootInlineBox::layoutCharactersInTextBoxes):
(WebCore::SVGRootInlineBox::layoutChildBoxes):
(WebCore::reverseInlineBoxRangeAndValueListsIfNeeded):
* rendering/svg/SVGTextQuery.cpp:
(WebCore::SVGTextQuery::collectTextBoxesInFlowBox):
2013-07-02 Christophe Dumez <ch.dumez@sisa.samsung.com>
Simplify SVGTextContentElement::elementFromRenderer()
https://bugs.webkit.org/show_bug.cgi?id=118284
Reviewed by Andreas Kling.
Simplify SVGTextContentElement::elementFromRenderer() by leveraging
SVGElement::isTextContent() methods instead of explicitly checking
for tag names.
No new tests, no behavior change.
* svg/SVGTextContentElement.cpp:
(WebCore::SVGTextContentElement::elementFromRenderer):
2013-07-02 Csaba Osztrogonác <ossy@webkit.org>
Fix cast-align warnings in WebCore/platform/graphics/texmap/TextureMapperGL.cpp
https://bugs.webkit.org/show_bug.cgi?id=118249
Reviewed by Allan Sandfeld Jensen.
* platform/graphics/texmap/TextureMapperGL.cpp:
(WebCore::BitmapTextureGL::updateContents):
2013-07-02 Allan Sandfeld Jensen <allan.jensen@digia.com>
[Qt][WK1] Support WebGL with EGL on Linux
https://bugs.webkit.org/show_bug.cgi?id=118251
Reviewed by Kenneth Rohde Christiansen.
Let GraphicsContext3D work without a GraphicsSurface.
* Target.pri:
* platform/graphics/OpenGLShims.cpp:
(WebCore::getProcAddress):
* platform/graphics/qt/GraphicsContext3DQt.cpp:
(WebCore::GraphicsContext3DPrivate::GraphicsContext3DPrivate):
(WebCore::GraphicsContext3DPrivate::paintToTextureMapper):
2013-07-02 Catalin Badea <badea@adobe.com>
[CSS-Regions] OverrideLogicalHeight used by both regions and flexbox
https://bugs.webkit.org/show_bug.cgi?id=118057
Reviewed by David Hyatt.
Remove the use of overrideLogicalContentHeight() from regions and
use a local variable instead. The change was needed to avoid
overlapping with flexbox containers.
Test: fast/regions/autoheight-flexbox.html
* rendering/RenderFlowThread.cpp:
(WebCore::RenderFlowThread::validateRegions):
(WebCore::RenderFlowThread::layout):
(WebCore::RenderFlowThread::applyBreakAfterContent):
(WebCore::RenderFlowThread::initializeRegionsComputedAutoHeight):
(WebCore::RenderFlowThread::updateRegionsFlowThreadPortionRect):
(WebCore::RenderFlowThread::addForcedRegionBreak):
* rendering/RenderFlowThread.h:
* rendering/RenderRegion.cpp:
(WebCore::RenderRegion::RenderRegion):
(WebCore::RenderRegion::pageLogicalHeight):
(WebCore::RenderRegion::logicalHeightOfAllFlowThreadContent):
(WebCore::RenderRegion::updateRegionHasAutoLogicalHeightFlag):
(WebCore::RenderRegion::layoutBlock):
(WebCore::RenderRegion::updateLogicalHeight):
* rendering/RenderRegion.h:
(WebCore::RenderRegion::computedAutoHeight):
(WebCore::RenderRegion::setComputedAutoHeight):
(WebCore::RenderRegion::clearComputedAutoHeight):
(WebCore::RenderRegion::hasComputedAutoHeight):
* rendering/RenderView.cpp:
2013-07-01 Alex Christensen <achristensen@apple.com>
Windows should be included in the list of platforms that can use OpenGL ES 2.
https://bugs.webkit.org/show_bug.cgi?id=118264
Reviewed by Dean Jackson.
* platform/graphics/GraphicsContext3D.h: Added PLATFORM(WIN) to platforms using OpenGL ES 2.
2013-07-01 Gustavo Noronha Silva <gustavo.noronha@collabora.com>
[GTK] Remove unsupported AC backends
https://bugs.webkit.org/show_bug.cgi?id=117362
Reviewed by Martin Robinson.
* GNUmakefile.am:
* GNUmakefile.list.am:
* Source/WebCore/platform/graphics/PlatformLayer.h: Removed mentions of clutter
and the texmap cairo backend.
* platform/graphics/clutter/DrawingBufferClutter.cpp: Removed.
* platform/graphics/clutter/GraphicsContext3DClutter.cpp: Removed.
* platform/graphics/clutter/GraphicsContext3DPrivate.cpp: Removed.
* platform/graphics/clutter/GraphicsContext3DPrivate.h: Removed.
* platform/graphics/clutter/GraphicsLayerActor.cpp: Removed.
* platform/graphics/clutter/GraphicsLayerActor.h: Removed.
* platform/graphics/clutter/GraphicsLayerClutter.cpp: Removed.
* platform/graphics/clutter/GraphicsLayerClutter.h: Removed.
* platform/graphics/clutter/PlatformClutterAnimation.cpp: Removed.
* platform/graphics/clutter/PlatformClutterAnimation.h: Removed.
* platform/graphics/clutter/PlatformClutterLayerClient.h: Removed.
* platform/graphics/clutter/TransformationMatrixClutter.cpp: Removed.
* Source/WebCore/platform/graphics/transforms/TransformationMatrix.h: Removed cogl
matrix type conversion.
2013-07-01 Alex Christensen <achristensen@apple.com>
DrawingBuffer constructor and destructor were not defined for Windows.
I moved duplicate code from Cairo and Qt to DrawingBuffer.cpp to be used by Qt, Cairo, and Windows.
https://bugs.webkit.org/show_bug.cgi?id=118262
Reviewed by Dean Jackson.
* platform/graphics/cairo/DrawingBufferCairo.cpp: Removed duplicate DrawingBuffer constructor and destructor.
* platform/graphics/gpu/DrawingBuffer.cpp:
(WebCore::DrawingBuffer::DrawingBuffer):
(WebCore::DrawingBuffer::~DrawingBuffer): Moved from Cairo and Qt implementation.
* platform/graphics/gpu/qt/DrawingBufferQt.cpp: Removed duplicate DrawingBuffer constructor and destructor.
2013-07-01 Alex Christensen <achristensen@apple.com>
Fixed unreachable return when GLX or EGL are used with WebGL.
https://bugs.webkit.org/show_bug.cgi?id=118263
Reviewed by Noam Rosenthal.
* platform/graphics/opengl/GLPlatformContext.cpp:
(WebCore::createOffScreenContext): Fixed unreachable return.
2013-07-01 Tim Horton <timothy_horton@apple.com>
Maximum scroll position can be negative in some cases
https://bugs.webkit.org/show_bug.cgi?id=118175
<rdar://problem/14301217>
Reviewed by Anders Carlsson.
Test (API): WebKit2.ResizeReversePaginatedWebView
* page/FrameView.cpp:
(WebCore::FrameView::maximumScrollPosition):
* page/FrameView.h:
Override maximumScrollPosition() in FrameView and don't clamp to zero if
a reverse pagination mode is enabled, as it is possible (and common) to
have a negative maximum scroll position with reverse pagination.
* platform/ScrollView.cpp:
(WebCore::ScrollView::updateScrollbars):
Drive-by adoption of toIntSize().
2013-07-01 Alex Christensen <achristensen@apple.com>
Removed all references to DrawingBuffer methods unused since the removal of Chromium:
DrawingBuffer::prepareBackBuffer,
DrawingBuffer::requiresCopyFromBackToFrontBuffer, and
DrawingBuffer::clearPlatformLayer.
https://bugs.webkit.org/show_bug.cgi?id=118257
Reviewed by Darin Adler.
* platform/graphics/blackberry/DrawingBufferBlackBerry.cpp:
(WebCore::DrawingBuffer::platformLayer):
* platform/graphics/cairo/DrawingBufferCairo.cpp:
(WebCore::DrawingBuffer::paintCompositedResultsToCanvas):
* platform/graphics/clutter/DrawingBufferClutter.cpp:
(WebCore::DrawingBuffer::paintCompositedResultsToCanvas):
* platform/graphics/gpu/DrawingBuffer.cpp:
(WebCore::DrawingBuffer::clear):
* platform/graphics/gpu/DrawingBuffer.h:
* platform/graphics/gpu/mac/DrawingBufferMac.mm:
(WebCore::DrawingBuffer::frontColorBuffer):
* platform/graphics/gpu/qt/DrawingBufferQt.cpp:
(WebCore::DrawingBuffer::paintCompositedResultsToCanvas):
2013-07-01 Jochen Eisinger <jochen@chromium.org>
Remove support for consumable user gestures
https://bugs.webkit.org/show_bug.cgi?id=118247
Reviewed by Geoffrey Garen.
The features was not enabled on any port, and is meanwhile broken, so we
should delete it.
No new tests, just deleting dead code.
* accessibility/AccessibilityNodeObject.cpp:
(WebCore::AccessibilityNodeObject::increment):
(WebCore::AccessibilityNodeObject::decrement):
* accessibility/AccessibilityObject.cpp:
(WebCore::AccessibilityObject::press):
* bindings/ScriptControllerBase.cpp:
(WebCore::ScriptController::executeScript):
* bindings/js/ScriptController.cpp:
(WebCore::ScriptController::executeScriptInWorld):
* dom/UserGestureIndicator.cpp:
(WebCore::isDefinite):
(WebCore::UserGestureIndicator::UserGestureIndicator):
(WebCore::UserGestureIndicator::~UserGestureIndicator):
* dom/UserGestureIndicator.h:
(WebCore::UserGestureIndicator::processingUserGesture):
* inspector/InspectorFrontendClientLocal.cpp:
(WebCore::InspectorFrontendClientLocal::openInNewTab):
* inspector/InspectorFrontendHost.cpp:
(WebCore::FrontendMenuProvider::contextMenuItemSelected):
* inspector/InspectorPageAgent.cpp:
(WebCore::InspectorPageAgent::navigate):
* loader/NavigationScheduler.cpp:
(WebCore::ScheduledURLNavigation::fire):
(WebCore::ScheduledURLNavigation::didStartTimer):
(WebCore::ScheduledRedirect::fire):
(WebCore::ScheduledRefresh::fire):
(WebCore::ScheduledHistoryNavigation::fire):
(WebCore::ScheduledFormSubmission::fire):
(WebCore::ScheduledFormSubmission::didStartTimer):
* page/DOMTimer.cpp:
(WebCore::DOMTimer::DOMTimer):
(WebCore::DOMTimer::fired):
* page/DOMTimer.h:
* page/DOMWindow.cpp:
(WebCore::DOMWindow::showModalDialog):
* page/EventHandler.cpp:
(WebCore::EventHandler::clear):
(WebCore::EventHandler::handleMousePressEvent):
(WebCore::EventHandler::handleMouseReleaseEvent):
* page/EventHandler.h:
* rendering/HitTestResult.cpp:
(WebCore::HitTestResult::toggleMediaFullscreenState):
(WebCore::HitTestResult::enterFullscreenForVideo):
2013-07-01 Frédéric Wang <fred.wang@free.fr>
Add Support for mspace element
https://bugs.webkit.org/show_bug.cgi?id=115610
Reviewed by Chris Fleizach.
This patch adds basic support for the MathML mspace element. This is
important to let people control spacing of mathematical formulas.
Attributes width, height and depth are implemented. For the moment,
only nonnegative width are accepted.
* CMakeLists.txt: add references to the RenderMathMLSpace files.
* GNUmakefile.list.am: ditto.
* Target.pri: ditto.
* WebCore.vcxproj/WebCore.vcxproj: ditto.
* WebCore.vcxproj/WebCore.vcxproj.filters: ditto.
* WebCore.xcodeproj/project.pbxproj: ditto.
* css/mathml.css:
(mtable[columnlines="dashed"] > mtr > mtd + mtd): remove the obsolete linebreaking rule.
* mathml/MathMLTextElement.cpp:
(WebCore::MathMLTextElement::createRenderer): map mspaceTag to RenderMathMLSpace.
* mathml/mathattrs.in: add width, height and depth attributes
* mathml/mathtags.in: add mspace element
* rendering/mathml/RenderMathMLBlock.cpp:
(WebCore::parseMathMLLength): fix int to float conversion.
* rendering/mathml/RenderMathMLBlock.h: declare isRenderMathMLSpace.
(WebCore::RenderMathMLBlock::isRenderMathMLSpace):
* rendering/mathml/RenderMathMLSpace.cpp: Added.
(WebCore::RenderMathMLSpace::RenderMathMLSpace):
(WebCore::RenderMathMLSpace::isChildAllowed):
(WebCore::RenderMathMLSpace::computePreferredLogicalWidths):
(WebCore::RenderMathMLSpace::updateFromElement):
(WebCore::RenderMathMLSpace::updateLogicalWidth):
(WebCore::RenderMathMLSpace::updateLogicalHeight):
(WebCore::RenderMathMLSpace::layout):
(WebCore::RenderMathMLSpace::styleDidChange):
(WebCore::RenderMathMLSpace::firstLineBoxBaseline):
* rendering/mathml/RenderMathMLSpace.h: Added.
(WebCore::RenderMathMLSpace::isRenderMathMLSpace):
(WebCore::RenderMathMLSpace::renderName):
(WebCore::toRenderMathMLSpace):
2013-06-27 Jer Noble <jer.noble@apple.com>
Audio in apps which embed WebViews is corrupted.
https://bugs.webkit.org/show_bug.cgi?id=118163
Reviewed by Maciej Stachowiak.
Add a preference, which defaults to off, which controls whether the
AudioSessionManager will switch to a large audio buffer setting for
power-savings during <video> playback.
* WebCore.exp.in:
* page/Settings.cpp:
(WebCore::Settings::setLowPowerVideoAudioBufferSizeEnabled): Added. Simple setter.
* page/Settings.h:
(WebCore::Settings::lowPowerVideoAudioBufferSizeEnabled): Added. Simple getter.
* platform/audio/mac/AudioSessionManagerMac.cpp:
(AudioSessionManager::updateSessionState): Only set the large audio buffer
size if lowPowerVideoAudioBufferSize is enabled.
2013-07-01 Brian Holt <brian.holt@samsung.com>
[ATK] Leak: leaks in WebKitAccessibleInterfaceText
https://bugs.webkit.org/show_bug.cgi?id=118248
Fixed memory leaks.
Reviewed by Christophe Dumez.
* accessibility/atk/WebKitAccessibleInterfaceText.cpp:
(getPangoLayoutForAtk):
(webkitAccessibleTextGetText):
2013-07-01 Roger Fong <roger_fong@apple.com>
Unreviewed. Make WebCore.make copy over QTMovieWin DLL's and PDB's.
<rdar://problem/14321403>
* WebCore.vcxproj/WebCore.make:
2013-07-01 peavo@outlook.com <peavo@outlook.com>
[Win] Crash when scrolling page with images.
https://bugs.webkit.org/show_bug.cgi?id=117832
Reviewed by Brent Fulgham.
Avoid access violation by returning early from method if image frame doesn't have pixel data.
* platform/image-decoders/ImageDecoder.h:
(WebCore::ImageFrame::hasPixelData): Added method to check if frame has pixel data.
* platform/image-decoders/gif/GIFImageDecoder.cpp:
(WebCore::GIFImageDecoder::haveDecodedRow): Early return if frame doesn't have pixel data.
2013-07-01 Noam Rosenthal <noam@webkit.org>
Avoid calling RenderLayerBacking::resetContentsRect() if possible
https://bugs.webkit.org/show_bug.cgi?id=118217
Reviewed by Simon Fraser.
Call resetContentsRect() only if the layer has a contentsLayer.
Otherwise the contentsRect is redundant for the GraphicsLayer.
No new tests - optimization only. This is covered by plenty of existing
tests in webgl/ and compositing/.
* platform/graphics/texmap/GraphicsLayerTextureMapper.h:
(WebCore::GraphicsLayerTextureMapper::hasContentsLayer):
* platform/graphics/texmap/coordinated/CoordinatedGraphicsLayer.h:
Added hasContentsLayer calls for TextureMapper/CoordinatedGraphics
* rendering/RenderLayerBacking.cpp:
(WebCore::RenderLayerBacking::updateGraphicsLayerGeometry):
2013-07-01 Allan Sandfeld Jensen <allan.jensen@digia.com>
[Qt] Avoid creating a QWindow for offscreen GraphicsContext3D
https://bugs.webkit.org/show_bug.cgi?id=118244
Reviewed by Noam Rosenthal.
In Qt 5.0 we had to create invisible windows, but in Qt 5.1
we can now create specific offscreen surfaces.
* platform/graphics/qt/GraphicsContext3DQt.cpp:
(WebCore::GraphicsContext3DPrivate::GraphicsContext3DPrivate):
2013-07-01 Allan Sandfeld Jensen <allan.jensen@digia.com>
[Qt] Remove long unused Qt4 forward definitions
Unreviewed cleanu-up.
* platform/graphics/GraphicsContext3D.h:
2013-07-01 Antti Koivisto <antti@apple.com>
Use DeferrableOneShotTimer for deleting decoded data
https://bugs.webkit.org/show_bug.cgi?id=118150
Reviewed by Andreas Kling.
Adam Barth pointed out that the virtual function for overriding the default delay doesn't work
as expected from base class constructor.
* loader/cache/CachedResource.cpp:
(WebCore::deadDecodedDataDeletionIntervalForResourceType):
(WebCore::CachedResource::CachedResource):
Use static function instead of calling a virtual.
* loader/cache/CachedResource.h:
* loader/cache/CachedScript.cpp:
* loader/cache/CachedScript.h:
2013-07-01 Kangil Han <kangil.han@samsung.com>
Adopt toHTMLTextAreaElement for code cleanup
https://bugs.webkit.org/show_bug.cgi?id=118226
Reviewed by Andreas Kling.
To enhance readability, this patch adopts toHTMLTextAreaElement.
This also helps out to reduce duplicated use of static_cast.
* accessibility/AccessibilityNodeObject.cpp:
(WebCore::AccessibilityNodeObject::determineAccessibilityRole):
(WebCore::AccessibilityNodeObject::isNativeTextControl):
(WebCore::AccessibilityNodeObject::isReadOnly):
(WebCore::AccessibilityNodeObject::text):
* accessibility/AccessibilityRenderObject.cpp:
(WebCore::AccessibilityRenderObject::setValue):
* css/StyleResolver.cpp:
(WebCore::StyleResolver::adjustRenderStyle):
* editing/markup.cpp:
(WebCore::StyledMarkupAccumulator::appendText):
* html/HTMLFormControlElement.cpp:
(WebCore::shouldAutofocus):
* html/HTMLTextAreaElement.h:
(WebCore::toHTMLTextAreaElement):
* page/FocusController.cpp:
(WebCore::clearSelectionIfNeeded):
* rendering/HitTestResult.cpp:
(WebCore::HitTestResult::isContentEditable):
* rendering/RenderBox.cpp:
(WebCore::RenderBox::sizesLogicalWidthToFitContent):
* rendering/RenderTextControlMultiLine.cpp:
(WebCore::RenderTextControlMultiLine::~RenderTextControlMultiLine):
(WebCore::RenderTextControlMultiLine::preferredContentLogicalWidth):
(WebCore::RenderTextControlMultiLine::computeControlLogicalHeight):
* testing/Internals.cpp:
(WebCore::Internals::wasLastChangeUserEdit):
2013-07-01 Kwang Yul Seo <skyul@company100.net>
Add missing string headers that are used when LOG_DISABLED is 0.
https://bugs.webkit.org/show_bug.cgi?id=118227
Reviewed by Andreas Kling.
Build fix for LOG_DISABLED=0.
No new tests, no behavior change.
* html/track/InbandTextTrack.cpp:
* rendering/RenderLayerCompositor.cpp:
2013-06-29 Simon Fraser <simon.fraser@apple.com>
Avoid calling into Objective-C every time we get the scrollbar width
https://bugs.webkit.org/show_bug.cgi?id=118216
Reviewed by Geoffrey Garen.
Profiling shows that calling Scrollbar::isOverlayScrollbar() is somewhat
expensive, because it calls down into Objective-C. Fix by caching in
ScrollbarThemeMac whether we're using overlay scrollbars. We update this
cache on creation, and when preferences change; ScrollAnimatorMac::updateScrollerStyle()
is the function that gets called when the user changes the setting in System Preferences.
* platform/ScrollbarTheme.h:
(WebCore::ScrollbarTheme::usesOverlayScrollbarsChanged):
* platform/mac/ScrollAnimatorMac.mm:
(WebCore::ScrollAnimatorMac::updateScrollerStyle):
* platform/mac/ScrollbarThemeMac.h:
* platform/mac/ScrollbarThemeMac.mm:
(WebCore::ScrollbarThemeMac::preferencesChanged):
(WebCore::ScrollbarThemeMac::usesOverlayScrollbars):
(WebCore::ScrollbarThemeMac::usesOverlayScrollbarsChanged):
2013-06-29 Simon Fraser <simon.fraser@apple.com>
Avoid calling isSimpleContainerCompositingLayer() an extra time
https://bugs.webkit.org/show_bug.cgi?id=118218
Reviewed by Tim Horton.
containsPaintedContent() called isSimpleContainerCompositingLayer(), which
is not particularly cheap. But the caller already has this information,
so pass it in.
* rendering/RenderLayerBacking.cpp:
(WebCore::RenderLayerBacking::updateDrawsContent):
(WebCore::RenderLayerBacking::containsPaintedContent):
* rendering/RenderLayerBacking.h:
2013-06-29 Simon Fraser <simon.fraser@apple.com>
Avoid doing work in RenderBox::outlineBoundsForRepaint() when the repaintContainer is this
https://bugs.webkit.org/show_bug.cgi?id=118215
Reviewed by Tim Horton.
When the RenderGeometryMap code path was added, RenderBox::outlineBoundsForRepaint()
actually got slower if no coordinate mapping was needed. So avoid doing work when
we can, including avoiding the FloatQuad construction.
Speeds up scrolling overflow:scroll areas with large numbers of layer children.
* rendering/RenderBox.cpp:
(WebCore::RenderBox::outlineBoundsForRepaint):
2013-06-29 Kangil Han <kangil.han@samsung.com>
Adopt is/toHTMLOptGroupElement for code cleanup
https://bugs.webkit.org/show_bug.cgi?id=118213
Reviewed by Andreas Kling.
To enhance readability, this patch adopts is/toHTMLOptGroupElement.
This also helps out to reduce duplicated use of static_cast.
* accessibility/AccessibilityListBoxOption.cpp:
(WebCore::AccessibilityListBoxOption::isEnabled):
(WebCore::AccessibilityListBoxOption::stringValue):
(WebCore::AccessibilityListBoxOption::listBoxOptionParentNode):
* css/SelectorChecker.cpp:
(WebCore::SelectorChecker::checkOne):
* css/StyleResolver.cpp:
(WebCore::StyleResolver::canShareStyleWithElement):
* html/HTMLOptGroupElement.h:
(WebCore::isHTMLOptGroupElement):
(WebCore::toHTMLOptGroupElement):
* html/HTMLOptionElement.cpp:
(WebCore::HTMLOptionElement::textIndentedToRespectGroupLabel):
(WebCore::HTMLOptionElement::isDisabledFormControl):
* html/HTMLSelectElement.cpp:
(WebCore::HTMLSelectElement::childShouldCreateRenderer):
(WebCore::HTMLSelectElement::recalcListItems):
* html/parser/HTMLConstructionSite.cpp:
(WebCore::hasImpliedEndTag):
* html/parser/HTMLElementStack.cpp:
(WebCore::HTMLNames::isSelectScopeMarker):
* html/parser/HTMLTreeBuilder.cpp:
(WebCore::HTMLTreeBuilder::processStartTag):
(WebCore::HTMLTreeBuilder::processEndTag):
* rendering/RenderListBox.cpp:
(WebCore::RenderListBox::updateFromElement):
(WebCore::RenderListBox::paintItemForeground):
* rendering/RenderMenuList.cpp:
(WebCore::RenderMenuList::itemText):
(WebCore::RenderMenuList::itemIsEnabled):
(WebCore::RenderMenuList::itemIsLabel):
2013-06-29 ChangSeok Oh <changseok.oh@collabora.com>
Build fix for unguarded SVGGraphicsElement
https://bugs.webkit.org/show_bug.cgi?id=118214
Reviewed by Christophe Dumez.
Add the SVG condition to SVGGraphicsElement.idl
No new tests required since no functionality changed.
* svg/SVGGraphicsElement.idl:
2013-06-29 Kangil Han <kangil.han@samsung.com>
Adopt is/toHTMLOptionElement for code cleanup
https://bugs.webkit.org/show_bug.cgi?id=118212
Reviewed by Andreas Kling.
To enhance readability, this patch adopts is/toHTMLOptionElement.
This also helps out to reduce duplicated use of static_cast.
* accessibility/AccessibilityListBoxOption.cpp:
(WebCore::AccessibilityListBoxOption::isSelected):
(WebCore::AccessibilityListBoxOption::canSetSelectedAttribute):
(WebCore::AccessibilityListBoxOption::stringValue):
(WebCore::AccessibilityListBoxOption::listBoxOptionParentNode):
* accessibility/AccessibilityMenuListOption.cpp:
(WebCore::AccessibilityMenuListOption::setElement):
(WebCore::AccessibilityMenuListOption::isEnabled):
(WebCore::AccessibilityMenuListOption::isSelected):
(WebCore::AccessibilityMenuListOption::setSelected):
(WebCore::AccessibilityMenuListOption::stringValue):
* accessibility/AccessibilityMenuListPopup.cpp:
(WebCore::AccessibilityMenuListPopup::menuListOptionAccessibilityObject):
* accessibility/AccessibilityRenderObject.cpp:
(WebCore::AccessibilityRenderObject::accessibilityHitTest):
* css/SelectorChecker.cpp:
(WebCore::SelectorChecker::checkOne):
* css/StyleResolver.cpp:
(WebCore::StyleResolver::canShareStyleWithElement):
* html/HTMLCollection.cpp:
(WebCore::isMatchingElement):
* html/HTMLOptionElement.cpp:
(WebCore::HTMLOptionElement::index):
* html/HTMLOptionElement.h:
(WebCore::isHTMLOptionElement):
(WebCore::toHTMLOptionElement):
* html/HTMLOptionsCollection.cpp:
(WebCore::HTMLOptionsCollection::add):
* html/HTMLSelectElement.cpp:
(WebCore::HTMLSelectElement::hasPlaceholderLabelOption):
(WebCore::HTMLSelectElement::value):
(WebCore::HTMLSelectElement::setValue):
(WebCore::HTMLSelectElement::childShouldCreateRenderer):
(WebCore::HTMLSelectElement::nextValidIndex):
(WebCore::HTMLSelectElement::saveLastSelection):
(WebCore::HTMLSelectElement::setActiveSelectionAnchorIndex):
(WebCore::HTMLSelectElement::updateListBoxSelection):
(WebCore::HTMLSelectElement::listBoxOnChange):
(WebCore::HTMLSelectElement::recalcListItems):
(WebCore::HTMLSelectElement::selectedIndex):
(WebCore::HTMLSelectElement::selectOption):
(WebCore::HTMLSelectElement::optionToListIndex):
(WebCore::HTMLSelectElement::listToOptionIndex):
(WebCore::HTMLSelectElement::deselectItemsWithoutValidation):
(WebCore::HTMLSelectElement::saveFormControlState):
(WebCore::HTMLSelectElement::searchOptionsForValue):
(WebCore::HTMLSelectElement::restoreFormControlState):
(WebCore::HTMLSelectElement::appendFormData):
(WebCore::HTMLSelectElement::reset):
(WebCore::HTMLSelectElement::updateSelectedState):
(WebCore::HTMLSelectElement::lastSelectedListIndex):
(WebCore::HTMLSelectElement::optionAtIndex):
(WebCore::HTMLSelectElement::accessKeySetSelectedIndex):
(WebCore::HTMLSelectElement::length):
* html/parser/HTMLConstructionSite.cpp:
(WebCore::hasImpliedEndTag):
* html/parser/HTMLElementStack.cpp:
(WebCore::HTMLNames::isSelectScopeMarker):
* html/parser/HTMLTreeBuilder.cpp:
(WebCore::HTMLTreeBuilder::processStartTagForInBody):
(WebCore::HTMLTreeBuilder::processStartTag):
(WebCore::HTMLTreeBuilder::processEndTag):
* rendering/RenderListBox.cpp:
(WebCore::RenderListBox::updateFromElement):
(WebCore::RenderListBox::addFocusRingRects):
(WebCore::RenderListBox::paintItemForeground):
(WebCore::RenderListBox::paintItemBackground):
* rendering/RenderMenuList.cpp:
(WebCore::RenderMenuList::updateOptionsWidth):
(WebCore::RenderMenuList::setTextFromOption):
(WebCore::RenderMenuList::itemText):
(WebCore::RenderMenuList::itemIsEnabled):
(WebCore::RenderMenuList::itemIsSelected):
* rendering/RenderTheme.cpp:
(WebCore::RenderTheme::paintSliderTicks):
2013-06-29 Carlos Garcia Campos <cgarcia@igalia.com>
REGRESSION(151586): multipart/x-mixed-replace images are broken
https://bugs.webkit.org/show_bug.cgi?id=118169
Reviewed by Alexey Proskuryakov.
When loading multipart content the resource data will change as
the next part is loaded, so we need to make a copy of the data
before sending it to the resource.
* loader/SubresourceLoader.cpp:
(WebCore::SubresourceLoader::didReceiveResponse):
2013-06-28 Eric Carlson <eric.carlson@apple.com>
[Mac] adopt new AVFoundation caption API
https://bugs.webkit.org/show_bug.cgi?id=118207
Reviewed by Dean Jackson.
No new tests, I was not able to come up with a reliable layout test.
* platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.h:
* platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
(WebCore::MediaPlayerPrivateAVFoundationObjC::flushCues): New, call currentTrack->resetCueValues().
(-[WebCoreAVFMovieObserver outputSequenceWasFlushed:]): New delegate method.
2013-06-28 Kangil Han <kangil.han@samsung.com>
Adopt is/toHTMLImageElement for code cleanup
https://bugs.webkit.org/show_bug.cgi?id=118182
Reviewed by Andreas Kling.
To enhance readability, this patch adopts is/toHTMLImageElement.
This also helps out to reduce duplicated use of static_cast.
* accessibility/AccessibilityNodeObject.cpp:
(WebCore::AccessibilityNodeObject::isNativeImage):
* accessibility/AccessibilityRenderObject.cpp:
(WebCore::AccessibilityRenderObject::url):
* bindings/js/JSNodeCustom.cpp:
(WebCore::isReachableFromDOM):
* bridge/qt/qt_pixmapruntime.cpp:
(JSC::Bindings::assignToHTMLImageElement):
(JSC::Bindings::QtPixmapRuntime::toQt):
* dom/Clipboard.cpp:
(WebCore::Clipboard::setDragImage):
* dom/Node.cpp:
(WebCore::Node::enclosingLinkEventParentOrSelf):
* editing/Editor.cpp:
(WebCore::imageElementFromImageDocument):
* html/HTMLAnchorElement.cpp:
(WebCore::appendServerMapMousePosition):
* html/HTMLImageElement.h:
(WebCore::isHTMLImageElement):
(WebCore::toHTMLImageElement):
* html/HTMLMapElement.cpp:
(WebCore::HTMLMapElement::imageElement):
* html/HTMLNameCollection.cpp:
(WebCore::WindowNameCollection::nodeMatchesIfNameAttributeMatch):
(WebCore::DocumentNameCollection::nodeMatchesIfIdAttributeMatch):
(WebCore::DocumentNameCollection::nodeMatchesIfNameAttributeMatch):
(WebCore::DocumentNameCollection::nodeMatches):
* page/DragController.cpp:
(WebCore::DragController::draggableElement):
* page/PageSerializer.cpp:
(WebCore::PageSerializer::serializeFrame):
* platform/gtk/PasteboardGtk.cpp:
(WebCore::getURLForImageNode):
* platform/mac/HTMLConverter.mm:
(+[WebHTMLConverter editingAttributedStringFromRange:]):
* rendering/HitTestResult.cpp:
(WebCore::HitTestResult::altDisplayString):
(WebCore::HitTestResult::absoluteImageURL):
* rendering/RenderImage.cpp:
(WebCore::RenderImage::paintIntoRect):
(WebCore::RenderImage::imageMap):
(WebCore::RenderImage::updateAltText):
* rendering/RenderObject.cpp:
(WebCore::RenderObject::shouldRespectImageOrientation):
2013-06-28 Gavin Barraclough <barraclough@apple.com>
PageThrottler::shouldThrottleTimers is wrong.
https://bugs.webkit.org/show_bug.cgi?id=118210
Reviewed by Anders Carlson.
m_throttleState == PageNotThrottledState
-> page NOT throttled, so should NOT throttle timers
m_throttleState != PageNotThrottledState
-> page NOT NOT throttled, so should throttle timers
This needs cleaning up, but for now, 1 character fix.
* page/PageThrottler.h:
(WebCore::PageThrottler::shouldThrottleTimers):
== -> !=
2013-06-28 Ryosuke Niwa <rniwa@webkit.org>
An element with -webkit-user-select: all should be selected on single click
https://bugs.webkit.org/show_bug.cgi?id=117864
Reviewed by Darin Adler.
Set m_mouseDownMayStartSelect true even when the node cannot start selection
if the node was inside an element with -webkit-user-select: all.
Test: editing/selection/user-select-all-with-single-click.html
* page/EventHandler.cpp:
(WebCore::canMouseDownStartSelect):
2013-06-28 Ryosuke Niwa <rniwa@webkit.org>
Remove unused attachChildrenLazily method and make attach/detachChildren private
https://bugs.webkit.org/show_bug.cgi?id=118016
Reviewed by Darin Adler.
Merge https://chromium.googlesource.com/chromium/blink/+/009520dc31c9458e0cf71cf212fa5688c4ca68b0
No one should be manually trying to attach or detach all their children so there's
no reason for these methods to be public.
In doing this I realized that attachChildrenLazily is not used and can be removed.
I also realized that we were detaching all our children before the ShadowRoots which
is sad since the InsertionPoints will call detach() on them as well, and then when we
call ContainerNode::detach at the end of Element::detach we'll go detach them again!
This patch makes it so we only go through and detach them twice instead of three times.
In the future we should figure out a way to only do this once.
* dom/ContainerNode.h:
* dom/Element.cpp:
(WebCore::Element::detach):
2013-06-28 Alexey Proskuryakov <ap@apple.com>
[Mac] Crash when loading is stopped from -didReceiveResponse
https://bugs.webkit.org/show_bug.cgi?id=118209
<rdar://problem/14259249>
Reviewed by Brady Eidson.
Test: TestWebKitAPI/Tests/mac/StopLoadingFromDidReceiveResponse.mm.
* loader/SubresourceLoader.cpp: (WebCore::SubresourceLoader::didReceiveResponse):
Added yet another check for reachedTerminalState().
2013-06-28 Beth Dakin <bdakin@apple.com>
Cached pages don't update their backing scale factor when it changes
https://bugs.webkit.org/show_bug.cgi?id=118206
-and-
<rdar://problem/14261627>
Reviewed by Tim Horton.
It is not sufficient to mark pages in the PageCache as needing a full style
recalc. We also need to ensure that the RenderLayerCompositors for the CachesPages
get updated.
Keep track of whether device scale has been updated with
m_needsDeviceScaleChanged. If that has been marked true, then restore() will call
Frame::deviceOrPageScaleFactorChanged().
* history/CachedPage.cpp:
(WebCore::CachedPage::CachedPage):
(WebCore::CachedPage::restore):
* history/CachedPage.h:
(WebCore::CachedPage::markForDeviceScaleChanged):
Propagate markForDeviceScaleChanged() to all of the CachedPages.
* history/PageCache.cpp:
(WebCore::PageCache::markPagesForDeviceScaleChanged):
* history/PageCache.h:
Call PageCache::markPagesForDeviceScaleChanged()
* page/Page.cpp:
(WebCore::Page::setDeviceScaleFactor):
2013-06-28 Alex Christensen <achristensen@apple.com>
Added template parameters to std::min to fix compile errors in Visual Studio x64.
https://bugs.webkit.org/show_bug.cgi?id=118204
Reviewed by Geoffrey Garen.
* platform/win/PasteboardWin.cpp:
(WebCore::Pasteboard::writeURLToDataObject): Added <unsigned> to std::min.
(WebCore::createGlobalImageFileDescriptor): Added <int> to std::min.
2013-06-28 Alex Christensen <achristensen@apple.com>
Added WebGL files to Windows build.
https://bugs.webkit.org/show_bug.cgi?id=118200
Reviewed by Brent Fulgham.
* WebCore.vcxproj/WebCore.vcxproj: Added WebGL files, removed unused GraphicsContext3DOpenGLES.cpp.
* WebCore.vcxproj/WebCore.vcxproj.filters: Added WebGL files, removed unused GraphicsContext3DOpenGLES.cpp.
* platform/graphics/cairo/GLContext.cpp: Only include GLContextEGL.h or GLContextGLX.h if they're needed.
* platform/graphics/cg/GraphicsContext3DCG.cpp: Only include GraphicsContext3DNEON.h if it's needed.
2013-06-28 Ryosuke Niwa <rniwa@webkit.org>
-webkit-line-break: after-white-space sometimes truncates DOM on copy & paste
https://bugs.webkit.org/show_bug.cgi?id=118164
Reviewed by Sam Weinig.
We can't assume that all subsequent ancestors contain exactly one child since they could have been
added in the first if statement matching: currentNode->parentNode() != rootNode && isRemovableBlock(currentNode)
Exit early when we encounter such an ancestor since removing its ancestor (that contains multiple children
some of which aren't in nodesToRemove) can clobber more nodes than we're allowed to remove.
Test: editing/pasteboard/simplfiying-markup-should-not-strip-content.html
* editing/SimplifyMarkupCommand.cpp:
(WebCore::SimplifyMarkupCommand::doApply):
(WebCore::SimplifyMarkupCommand::pruneSubsequentAncestorsToRemove):
2013-06-28 Gwang Yoon Hwang <ryumiel@company100.net>
Coordinated Graphics: Separate CoordinatedLayerTreeHost into CoordinatedLayerTreeHost and CompositingCoordinator
https://bugs.webkit.org/show_bug.cgi?id=104360
Reviewed by Noam Rosenthal.
The CoordinatedLayerTreeHost has too many responsibilities. It
implements LayerTreeHost, GraphicsLayerClient,
CoordinatedGraphicsLayerClient, CoordinatedImageBacking::Client,
UpdateAtlas::Client, GraphicsLayerFactory and
WebCustomFilterProgramProxyClient.
This refactoring reduces the responsibilities of CoordinatedLayerTreeHost.
This patch introduces a new class called CompositingCoordinator, which
takes the responsibility of managing compositing resources in
WebProcess.
CoordinatedLayerTreeHost is responsible only for the scheduling and
IPC-specific stuff, which are relevant only for WebKit2.
No new tests, covered by existing tests.
* CMakeLists.txt:
* Target.pri:
* platform/graphics/texmap/coordinated/CompositingCoordinator.cpp: Added.
(WebCore::CompositingCoordinator::create):
(WebCore::CompositingCoordinator::~CompositingCoordinator):
(WebCore::CompositingCoordinator::CompositingCoordinator):
(WebCore::CompositingCoordinator::setRootCompositingLayer):
(WebCore::CompositingCoordinator::sizeDidChange):
(WebCore::CompositingCoordinator::flushPendingLayerChanges):
(WebCore::CompositingCoordinator::syncDisplayState):
(WebCore::CompositingCoordinator::nextAnimationServiceTime):
(WebCore::CompositingCoordinator::clearPendingStateChanges):
(WebCore::CompositingCoordinator::initializeRootCompositingLayerIfNeeded):
(WebCore::CompositingCoordinator::createRootLayer):
(WebCore::CompositingCoordinator::syncLayerState):
(WebCore::CompositingCoordinator::createImageBackingIfNeeded):
(WebCore::CompositingCoordinator::createImageBacking):
(WebCore::CompositingCoordinator::updateImageBacking):
(WebCore::CompositingCoordinator::clearImageBackingContents):
(WebCore::CompositingCoordinator::removeImageBacking):
(WebCore::CompositingCoordinator::flushPendingImageBackingChanges):
(WebCore::CompositingCoordinator::notifyAnimationStarted):
(WebCore::CompositingCoordinator::notifyFlushRequired):
(WebCore::CompositingCoordinator::paintContents):
(WebCore::CompositingCoordinator::createGraphicsLayer):
(WebCore::CompositingCoordinator::deviceScaleFactor):
(WebCore::CompositingCoordinator::pageScaleFactor):
(WebCore::CompositingCoordinator::createUpdateAtlas):
(WebCore::CompositingCoordinator::removeUpdateAtlas):
(WebCore::CompositingCoordinator::visibleContentsRect):
(WebCore::CompositingCoordinator::mainContentsLayer):
(WebCore::CompositingCoordinator::setVisibleContentsRect):
(WebCore::CompositingCoordinator::deviceOrPageScaleFactorChanged):
(WebCore::CompositingCoordinator::detachLayer):
(WebCore::CompositingCoordinator::commitScrollOffset):
(WebCore::CompositingCoordinator::renderNextFrame):
(WebCore::CompositingCoordinator::purgeBackingStores):
(WebCore::CompositingCoordinator::paintToSurface):
(WebCore::CompositingCoordinator::scheduleReleaseInactiveAtlases):
(WebCore::CompositingCoordinator::releaseInactiveAtlasesTimerFired):
* platform/graphics/texmap/coordinated/CompositingCoordinator.h: Added.
(WebCore::CompositingCoordinator::clearRootLayer):
(WebCore::CompositingCoordinator::rootLayer):
(WebCore::CompositingCoordinator::state):
2013-06-28 Commit Queue <commit-queue@webkit.org>
Unreviewed, rolling out r152135.
http://trac.webkit.org/changeset/152135
https://bugs.webkit.org/show_bug.cgi?id=118199
Rolling out temporary patch used for debugging the test bots
(Requested by rfong on #webkit).
* platform/graphics/avfoundation/MediaPlayerPrivateAVFoundation.cpp:
(WebCore::MediaPlayerPrivateAVFoundation::load):
* platform/graphics/win/MediaPlayerPrivateQuickTimeVisualContext.cpp:
(WebCore::MediaPlayerPrivateQuickTimeVisualContext::load):
2013-06-28 Morten Stenshorne <mstensho@opera.com>
SVG relayout problem when displayed with different image box heights
https://bugs.webkit.org/show_bug.cgi?id=118140
Reviewed by Philip Rogers.
If the root element is an SVG, its position and height are affected
by the view height.
Test: svg/as-image/same-source-different-height.html
* rendering/RenderView.cpp:
(WebCore::RenderView::layout):
2013-06-28 Simon Fraser <simon.fraser@apple.com>
Allow some LayoutPoint and LayoutSize conversions to be inlined
https://bugs.webkit.org/show_bug.cgi?id=118167
Reviewed by Ryosuke Niwa.
Construction of FloatSize from LayoutSize, and FloatPoint's move(const LayoutSize&)
and moveBy(const LayoutPoint&) were not inlined, and showed up on some profiles.
Make them inlined by removing the overloaded functions, and instead providing
conversion operators from LayoutSize to FloatSize, and LayoutPoint to FloatPoint.
Do the same to allow a LayoutRect to be converted to a FloatRect.
This is nice because it removes pollution of FloatRect, FloatPoint and FloatSize with
Layout* entirely.
Remove Qt-specific conversions on LayoutRect, LayoutPoint and LayoutSize. Qt can
convert via IntRect/FloatRect as necessary.
* platform/graphics/FloatPoint.cpp:
* platform/graphics/FloatPoint.h:
(WebCore::FloatPoint::move):
(WebCore::FloatPoint::moveBy):
* platform/graphics/FloatRect.cpp:
* platform/graphics/FloatRect.h:
* platform/graphics/FloatSize.cpp:
* platform/graphics/FloatSize.h:
* platform/graphics/LayoutPoint.h:
(WebCore::LayoutPoint::operator FloatPoint):
* platform/graphics/LayoutRect.cpp:
* platform/graphics/LayoutRect.h:
(WebCore::LayoutRect::operator FloatRect):
* platform/graphics/LayoutSize.h:
(WebCore::LayoutSize::operator FloatSize):
2013-06-28 Christophe Dumez <ch.dumez@sisa.samsung.com>
Get rid of IsWorkerGlobalScope and ExtendsDOMGlobalObject extended attributes
https://bugs.webkit.org/show_bug.cgi?id=118191
Reviewed by Kentaro Hara.
Remove WebKit-specific [IsWorkerGlobalScope] and [ExtendsDOMGlobalObject] IDL
extended attributes and update the JSC bindings generator to figure this out
on its own.
No new tests, no behavior change.
* bindings/scripts/CodeGeneratorJS.pm:
(IsDOMGlobalObject):
(GenerateHeader):
(GenerateImplementation):
(GenerateConstructorHelperMethods):
* bindings/scripts/IDLAttributes.txt:
* page/DOMWindow.idl:
* workers/DedicatedWorkerGlobalScope.idl:
* workers/SharedWorkerGlobalScope.idl:
* workers/WorkerGlobalScope.idl:
2013-06-28 Christophe Dumez <ch.dumez@sisa.samsung.com>
Introduce SVGGraphicsElement IDL interface
https://bugs.webkit.org/show_bug.cgi?id=118178
Reviewed by Kentaro Hara.
Introduce SVGGraphicsElement IDL interface as per the latest SVG
specification:
- https://svgwg.org/svg2-draft/types.html#InterfaceSVGGraphicsElement
SVGGraphicsElement is a merge of SVGLocatable and SVGTransformable.
This is one step towards simplifying inheritance in SVG and matching
the latest SVG2 specification.
No new tests, already covered by existing tests.
* CMakeLists.txt:
* DerivedSources.cpp:
* DerivedSources.make:
* DerivedSources.pri:
* GNUmakefile.list.am:
* Target.pri:
* WebCore.order:
* WebCore.vcxproj/WebCore.vcxproj:
* WebCore.vcxproj/WebCore.vcxproj.filters:
* WebCore.xcodeproj/project.pbxproj:
* bindings/scripts/CodeGeneratorJS.pm:
(GetGnuVTableOffsetForType):
* rendering/svg/RenderSVGEllipse.cpp:
(WebCore::RenderSVGEllipse::RenderSVGEllipse):
* rendering/svg/RenderSVGEllipse.h:
* rendering/svg/RenderSVGPath.cpp:
(WebCore::RenderSVGPath::RenderSVGPath):
* rendering/svg/RenderSVGPath.h:
* rendering/svg/RenderSVGResourceClipper.cpp:
(WebCore::RenderSVGResourceClipper::pathOnlyClipping):
* rendering/svg/RenderSVGResourceContainer.cpp:
(WebCore::RenderSVGResourceContainer::transformOnNonScalingStroke):
* rendering/svg/RenderSVGResourceMarker.cpp:
* rendering/svg/RenderSVGShape.cpp:
(WebCore::RenderSVGShape::RenderSVGShape):
(WebCore::RenderSVGShape::updateShapeFromElement):
(WebCore::RenderSVGShape::layout):
(WebCore::RenderSVGShape::nonScalingStrokeTransform):
(WebCore::RenderSVGShape::shouldGenerateMarkerPositions):
* rendering/svg/RenderSVGShape.h:
* rendering/svg/RenderSVGTransformableContainer.cpp:
(WebCore::RenderSVGTransformableContainer::RenderSVGTransformableContainer):
(WebCore::RenderSVGTransformableContainer::calculateLocalTransform):
* rendering/svg/RenderSVGTransformableContainer.h:
* svg/SVGAElement.cpp:
(WebCore::SVGAElement::SVGAElement):
(WebCore::SVGAElement::parseAttribute):
(WebCore::SVGAElement::svgAttributeChanged):
(WebCore::SVGAElement::defaultEventHandler):
(WebCore::SVGAElement::supportsFocus):
(WebCore::SVGAElement::isURLAttribute):
* svg/SVGAElement.h:
* svg/SVGAElement.idl:
* svg/SVGAllInOne.cpp:
* svg/SVGAnimateMotionElement.cpp:
(WebCore::SVGAnimateMotionElement::hasValidAttributeType):
* svg/SVGCircleElement.cpp:
(WebCore::SVGCircleElement::SVGCircleElement):
(WebCore::SVGCircleElement::parseAttribute):
(WebCore::SVGCircleElement::svgAttributeChanged):
* svg/SVGCircleElement.h:
* svg/SVGCircleElement.idl:
* svg/SVGClipPathElement.cpp:
(WebCore::SVGClipPathElement::SVGClipPathElement):
(WebCore::SVGClipPathElement::parseAttribute):
(WebCore::SVGClipPathElement::svgAttributeChanged):
(WebCore::SVGClipPathElement::childrenChanged):
* svg/SVGClipPathElement.h:
* svg/SVGClipPathElement.idl:
* svg/SVGDefsElement.cpp:
(WebCore::SVGDefsElement::SVGDefsElement):
* svg/SVGDefsElement.h:
* svg/SVGDefsElement.idl:
* svg/SVGElement.h:
(WebCore::SVGElement::isSVGGraphicsElement):
* svg/SVGEllipseElement.cpp:
(WebCore::SVGEllipseElement::SVGEllipseElement):
(WebCore::SVGEllipseElement::parseAttribute):
(WebCore::SVGEllipseElement::svgAttributeChanged):
* svg/SVGEllipseElement.h:
* svg/SVGEllipseElement.idl:
* svg/SVGForeignObjectElement.cpp:
(WebCore::SVGForeignObjectElement::SVGForeignObjectElement):
(WebCore::SVGForeignObjectElement::parseAttribute):
(WebCore::SVGForeignObjectElement::svgAttributeChanged):
(WebCore::SVGForeignObjectElement::rendererIsNeeded):
* svg/SVGForeignObjectElement.h:
* svg/SVGForeignObjectElement.idl:
* svg/SVGGElement.cpp:
(WebCore::SVGGElement::SVGGElement):
(WebCore::SVGGElement::parseAttribute):
(WebCore::SVGGElement::svgAttributeChanged):
* svg/SVGGElement.h:
* svg/SVGGElement.idl:
* svg/SVGGraphicsElement.cpp: Renamed from Source/WebCore/svg/SVGStyledTransformableElement.cpp.
(WebCore::SVGGraphicsElement::SVGGraphicsElement):
(WebCore::SVGGraphicsElement::~SVGGraphicsElement):
(WebCore::SVGGraphicsElement::getCTM):
(WebCore::SVGGraphicsElement::getScreenCTM):
(WebCore::SVGGraphicsElement::animatedLocalTransform):
(WebCore::SVGGraphicsElement::supplementalTransform):
(WebCore::SVGGraphicsElement::isSupportedAttribute):
(WebCore::SVGGraphicsElement::parseAttribute):
(WebCore::SVGGraphicsElement::svgAttributeChanged):
(WebCore::SVGGraphicsElement::nearestViewportElement):
(WebCore::SVGGraphicsElement::farthestViewportElement):
(WebCore::SVGGraphicsElement::getBBox):
(WebCore::SVGGraphicsElement::createRenderer):
(WebCore::SVGGraphicsElement::toClipPath):
* svg/SVGGraphicsElement.h: Renamed from Source/WebCore/svg/SVGStyledTransformableElement.h.
(WebCore::SVGGraphicsElement::localCoordinateSpaceTransform):
(WebCore::SVGGraphicsElement::synchronizeRequiredFeatures):
(WebCore::SVGGraphicsElement::synchronizeRequiredExtensions):
(WebCore::SVGGraphicsElement::synchronizeSystemLanguage):
(WebCore::toSVGGraphicsElement):
* svg/SVGGraphicsElement.idl: Copied from Source/WebCore/svg/SVGForeignObjectElement.idl.
* svg/SVGImageElement.cpp:
(WebCore::SVGImageElement::SVGImageElement):
(WebCore::SVGImageElement::isPresentationAttribute):
(WebCore::SVGImageElement::collectStyleForPresentationAttribute):
(WebCore::SVGImageElement::parseAttribute):
(WebCore::SVGImageElement::svgAttributeChanged):
(WebCore::SVGImageElement::attach):
(WebCore::SVGImageElement::insertedInto):
(WebCore::SVGImageElement::addSubresourceAttributeURLs):
(WebCore::SVGImageElement::didMoveToNewDocument):
* svg/SVGImageElement.h:
* svg/SVGImageElement.idl:
* svg/SVGLineElement.cpp:
(WebCore::SVGLineElement::SVGLineElement):
(WebCore::SVGLineElement::parseAttribute):
(WebCore::SVGLineElement::svgAttributeChanged):
* svg/SVGLineElement.h:
* svg/SVGLineElement.idl:
* svg/SVGPathElement.cpp:
(WebCore::SVGPathElement::SVGPathElement):
(WebCore::SVGPathElement::parseAttribute):
(WebCore::SVGPathElement::svgAttributeChanged):
(WebCore::SVGPathElement::insertedInto):
(WebCore::SVGPathElement::removedFrom):
* svg/SVGPathElement.h:
* svg/SVGPathElement.idl:
* svg/SVGPatternElement.cpp:
* svg/SVGPolyElement.cpp:
(WebCore::SVGPolyElement::SVGPolyElement):
(WebCore::SVGPolyElement::parseAttribute):
(WebCore::SVGPolyElement::svgAttributeChanged):
* svg/SVGPolyElement.h:
* svg/SVGPolygonElement.idl:
* svg/SVGPolylineElement.idl:
* svg/SVGRectElement.cpp:
(WebCore::SVGRectElement::SVGRectElement):
(WebCore::SVGRectElement::parseAttribute):
(WebCore::SVGRectElement::svgAttributeChanged):
* svg/SVGRectElement.h:
* svg/SVGRectElement.idl:
* svg/SVGSVGElement.cpp:
(WebCore::SVGSVGElement::SVGSVGElement):
(WebCore::SVGSVGElement::didMoveToNewDocument):
(WebCore::SVGSVGElement::parseAttribute):
(WebCore::SVGSVGElement::insertedInto):
(WebCore::SVGSVGElement::removedFrom):
* svg/SVGSVGElement.h:
* svg/SVGSVGElement.idl:
* svg/SVGStyledElement.cpp:
(WebCore::SVGStyledElement::localCoordinateSpaceTransform):
* svg/SVGSwitchElement.cpp:
(WebCore::SVGSwitchElement::SVGSwitchElement):
* svg/SVGSwitchElement.h:
* svg/SVGSwitchElement.idl:
* svg/SVGUseElement.cpp:
(WebCore::SVGUseElement::SVGUseElement):
(WebCore::SVGUseElement::parseAttribute):
(WebCore::SVGUseElement::insertedInto):
(WebCore::SVGUseElement::removedFrom):
(WebCore::SVGUseElement::svgAttributeChanged):
(WebCore::SVGUseElement::toClipPath):
(WebCore::SVGUseElement::finishParsingChildren):
* svg/SVGUseElement.h:
* svg/SVGUseElement.idl:
2013-06-28 Gyuyoung Kim <gyuyoung.kim@samsung.com>
Add new schemes to content utils.
https://bugs.webkit.org/show_bug.cgi?id=118181
Reviewed by Christophe Dumez.
According to latest content handler spec, new schemes are added to it.
Those are "geo, magnet, sip, ssh and xmpp".
http://www.w3.org/html/wg/drafts/html/master/webappapis.html#custom-handlers
Tests: fast/dom/register-protocol-handler.html
fast/dom/unregister-protocol-handler.html
* Modules/navigatorcontentutils/NavigatorContentUtils.cpp:
(WebCore::initProtocolHandlerWhitelist):
2013-06-28 Sanghyup Lee <sh53.lee@samsung.com>
Avoid duplicating hostWindow() call in ScrollView.cpp
https://bugs.webkit.org/show_bug.cgi?id=118168
Reviewed by Christophe Dumez.
Remove redundant hostWindow() calls in ScrollView.cpp.
* platform/ScrollView.cpp:
(WebCore::ScrollView::scrollContents):
(WebCore::ScrollView::contentsToScreen):
(WebCore::ScrollView::screenToContents):
(WebCore::ScrollView::repaintContentRectangle):
(WebCore::ScrollView::updateOverhangAreas):
(WebCore::ScrollView::addPanScrollIcon):
(WebCore::ScrollView::removePanScrollIcon):
2013-06-28 Christophe Dumez <ch.dumez@sisa.samsung.com>
Unreviewed, fix GTK build after r152156.
* GNUmakefile.list.am:
2013-06-28 Christophe Dumez <ch.dumez@sisa.samsung.com>
Merge SVGLangSpace into SVGElement
https://bugs.webkit.org/show_bug.cgi?id=118170
Reviewed by Kentaro Hara.
Remove SVGLangSpace IDL interface and move its attributes to SVGElement
to match the latest specification and simplify inheritance in SVG:
- https://svgwg.org/svg2-draft/types.html#InterfaceSVGElement
No new tests, no behavior change.
* DerivedSources.make:
* WebCore.xcodeproj/project.pbxproj:
* svg/SVGAElement.h:
* svg/SVGAElement.idl:
* svg/SVGCircleElement.h:
* svg/SVGCircleElement.idl:
* svg/SVGClipPathElement.h:
* svg/SVGClipPathElement.idl:
* svg/SVGDefsElement.h:
* svg/SVGDefsElement.idl:
* svg/SVGDescElement.h:
* svg/SVGDescElement.idl:
* svg/SVGElement.cpp:
(WebCore::SVGElement::parseAttribute):
* svg/SVGElement.h:
* svg/SVGElement.idl:
* svg/SVGEllipseElement.h:
* svg/SVGEllipseElement.idl:
* svg/SVGFEImageElement.h:
* svg/SVGFEImageElement.idl:
* svg/SVGFilterElement.h:
* svg/SVGFilterElement.idl:
* svg/SVGForeignObjectElement.h:
* svg/SVGForeignObjectElement.idl:
* svg/SVGGElement.h:
* svg/SVGGElement.idl:
* svg/SVGImageElement.h:
* svg/SVGImageElement.idl:
* svg/SVGLangSpace.idl: Removed.
* svg/SVGLineElement.h:
* svg/SVGLineElement.idl:
* svg/SVGMarkerElement.h:
* svg/SVGMarkerElement.idl:
* svg/SVGMaskElement.h:
* svg/SVGMaskElement.idl:
* svg/SVGPathElement.h:
* svg/SVGPathElement.idl:
* svg/SVGPatternElement.h:
* svg/SVGPatternElement.idl:
* svg/SVGPolyElement.h:
* svg/SVGPolygonElement.idl:
* svg/SVGPolylineElement.idl:
* svg/SVGRectElement.h:
* svg/SVGRectElement.idl:
* svg/SVGSVGElement.h:
* svg/SVGSVGElement.idl:
* svg/SVGStyleElement.h:
* svg/SVGStyleElement.idl:
* svg/SVGSwitchElement.h:
* svg/SVGSwitchElement.idl:
* svg/SVGSymbolElement.h:
* svg/SVGSymbolElement.idl:
* svg/SVGTextContentElement.h:
* svg/SVGTextContentElement.idl:
* svg/SVGTitleElement.h:
* svg/SVGTitleElement.idl:
* svg/SVGUseElement.h:
* svg/SVGUseElement.idl:
2013-06-28 Christophe Dumez <ch.dumez@sisa.samsung.com>
Use & instead of | in the value of [CallWith]
https://bugs.webkit.org/show_bug.cgi?id=118054
Reviewed by Kentaro Hara.
[CallWith=ScriptExecutionContext|ScriptState] meant that both the
ScriptExecutionContext AND the ScriptState would be passed as
arguments to the implementation (not one OR the other).
This patch changes the semantics for those IDL extended attributes
to make it less confusing. Proper usage is now:
[CallWith=ScriptExecutionContext&ScriptState]
No new tests, covered by existing bindings tests.
* bindings/scripts/CodeGenerator.pm:
(ExtendedAttributeContains):
* bindings/scripts/test/TestObj.idl:
* page/Console.idl:
2013-06-27 Kangil Han <kangil.han@samsung.com>
HTMLAudioElement doesn't have to know about isVideo function
https://bugs.webkit.org/show_bug.cgi?id=118116
Reviewed by Eric Carlson.
Minor code cleanup to remove isVideo function from HTMLAudioElement.
We can use default function in HTMLMediaElement as hasVideo does.
* html/HTMLAudioElement.h:
* html/HTMLMediaElement.h:
(WebCore::HTMLMediaElement::isVideo):
2013-06-27 Kangil Han <kangil.han@samsung.com>
Adopt is/toHTMLInputElement for code cleanup
https://bugs.webkit.org/show_bug.cgi?id=118130
Reviewed by Antti Koivisto.
To enhance readability, this patch adopts is/toHTMLInputElement.
This also helps out to reduce duplicated use of static_cast.
* accessibility/AccessibilityMediaControls.cpp:
(WebCore::AccessibilityMediaTimeline::valueDescription):
* accessibility/AccessibilityNodeObject.cpp:
(WebCore::AccessibilityNodeObject::determineAccessibilityRole):
(WebCore::AccessibilityNodeObject::isNativeTextControl):
(WebCore::AccessibilityNodeObject::isNativeImage):
(WebCore::AccessibilityNodeObject::isInputImage):
(WebCore::AccessibilityNodeObject::isReadOnly):
(WebCore::AccessibilityNodeObject::valueForRange):
(WebCore::AccessibilityNodeObject::maxValueForRange):
(WebCore::AccessibilityNodeObject::minValueForRange):
(WebCore::AccessibilityNodeObject::actionElement):
(WebCore::AccessibilityNodeObject::titleElementText):
(WebCore::AccessibilityNodeObject::visibleText):
(WebCore::AccessibilityNodeObject::title):
(WebCore::AccessibilityNodeObject::text):
(WebCore::AccessibilityNodeObject::colorValue):
(WebCore::accessibleNameForNode):
* accessibility/AccessibilityRenderObject.cpp:
(WebCore::AccessibilityRenderObject::isFileUploadButton):
(WebCore::AccessibilityRenderObject::addRadioButtonGroupMembers):
(WebCore::AccessibilityRenderObject::url):
(WebCore::AccessibilityRenderObject::setValue):
(WebCore::AccessibilityRenderObject::determineAccessibilityRole):
(WebCore::AccessibilityRenderObject::addTextFieldChildren):
* accessibility/AccessibilitySlider.cpp:
(WebCore::AccessibilitySlider::element):
* accessibility/ios/AccessibilityObjectIOS.mm:
(WebCore::AccessibilityObject::accessibilityPasswordFieldLength):
* bindings/js/JSHTMLInputElementCustom.cpp:
(WebCore::JSHTMLInputElement::selectionStart):
(WebCore::JSHTMLInputElement::setSelectionStart):
(WebCore::JSHTMLInputElement::selectionEnd):
(WebCore::JSHTMLInputElement::setSelectionEnd):
(WebCore::JSHTMLInputElement::selectionDirection):
(WebCore::JSHTMLInputElement::setSelectionDirection):
(WebCore::JSHTMLInputElement::setSelectionRange):
* css/StyleResolver.cpp:
(WebCore::StyleResolver::adjustRenderStyle):
* editing/FrameSelection.cpp:
(WebCore::FrameSelection::isInPasswordField):
* editing/ReplaceSelectionCommand.cpp:
(WebCore::ReplaceSelectionCommand::shouldPerformSmartReplace):
* html/HTMLFormControlElement.cpp:
(WebCore::shouldAutofocus):
* html/HTMLFormElement.cpp:
(WebCore::HTMLFormElement::getTextFieldValues):
* html/HTMLInputElement.h:
(WebCore::isHTMLInputElement):
(WebCore::toHTMLInputElement):
* html/RadioInputType.cpp:
(WebCore::RadioInputType::handleKeydownEvent):
(WebCore::RadioInputType::isKeyboardFocusable):
* html/shadow/MediaControlElementTypes.cpp:
(WebCore::mediaControlElementType):
* html/shadow/TextControlInnerElements.cpp:
(WebCore::SearchFieldResultsButtonElement::defaultEventHandler):
(WebCore::SearchFieldCancelButtonElement::defaultEventHandler):
(WebCore::SearchFieldCancelButtonElement::willRespondToMouseClickEvents):
(WebCore::InputFieldSpeechButtonElement::defaultEventHandler):
(WebCore::InputFieldSpeechButtonElement::willRespondToMouseClickEvents):
(WebCore::InputFieldSpeechButtonElement::setRecognitionResult):
(WebCore::InputFieldSpeechButtonElement::startSpeechInput):
* loader/FormSubmission.cpp:
(WebCore::FormSubmission::create):
* page/Chrome.cpp:
(WebCore::Chrome::setToolTip):
* page/EventHandler.cpp:
(WebCore::isSubmitImage):
(WebCore::EventHandler::handleMousePressEvent):
* page/FocusController.cpp:
(WebCore::clearSelectionIfNeeded):
* platform/gtk/PasteboardGtk.cpp:
(WebCore::getURLForImageNode):
* platform/qt/RenderThemeQt.cpp:
(WebCore::RenderThemeQt::paintMediaVolumeSliderTrack):
* platform/qt/RenderThemeQtMobile.cpp:
(WebCore::RenderThemeQtMobile::paintSliderTrack):
* rendering/HitTestResult.cpp:
(WebCore::HitTestResult::altDisplayString):
(WebCore::HitTestResult::absoluteImageURL):
(WebCore::HitTestResult::isContentEditable):
* rendering/RenderBlock.cpp:
(WebCore::RenderBlock::hasLineIfEmpty):
* rendering/RenderBox.cpp:
(WebCore::RenderBox::sizesLogicalWidthToFitContent):
* rendering/RenderButton.cpp:
(WebCore::RenderButton::updateFromElement):
(WebCore::RenderButton::canHaveGeneratedChildren):
* rendering/RenderDetailsMarker.cpp:
(WebCore::RenderDetailsMarker::isOpen):
* rendering/RenderFileUploadControl.cpp:
(WebCore::RenderFileUploadControl::updateFromElement):
(WebCore::RenderFileUploadControl::maxFilenameWidth):
(WebCore::RenderFileUploadControl::paintObject):
(WebCore::RenderFileUploadControl::uploadButton):
(WebCore::RenderFileUploadControl::fileTextValue):
* rendering/RenderImage.cpp:
(WebCore::RenderImage::updateAltText):
* testing/Internals.cpp:
(WebCore::Internals::selectColorInColorChooser):
2013-06-27 Antti Koivisto <antti@apple.com>
Use DeferrableOneShotTimer for deleting decoded data
https://bugs.webkit.org/show_bug.cgi?id=118150
Reviewed by Andreas Kling.
Up to 1% of page load time can be used under CachedScript::script() for restarting
the decoded data deletion timer.
Using DeferrableOneShotTimer instead of a plain Timer avoids unnecessary low level timer access.
* loader/cache/CachedResource.cpp:
(WebCore::CachedResource::CachedResource):
(WebCore::CachedResource::destroyDecodedDataIfNeeded):
(WebCore::CachedResource::decodedDataDeletionTimerFired):
(WebCore::CachedResource::decodedDataDeletionTimerDelay):
Adopt DeferrableOneShotTimer.
* loader/cache/CachedResource.h:
* loader/cache/CachedScript.cpp:
(WebCore::CachedScript::script):
(WebCore::CachedScript::decodedDataDeletionTimerDelay):
Keep using zero delay for scripts.
* platform/Timer.h:
(WebCore::DeferrableOneShotTimer::stop):
Avoid unnecessary restart after stopping and starting again.
2013-06-27 Anders Carlsson <andersca@apple.com>
Add a new String::charactersWithNullTermination() function that returns a vector
https://bugs.webkit.org/show_bug.cgi?id=118155
Reviewed by Andreas Kling.
Change calls to deprecatedCharactersWithNullTermination() to charactersWithNullTermination().data()
* platform/graphics/win/FontCacheWin.cpp:
(WebCore::getLinkedFonts):
* platform/graphics/win/FontCustomPlatformData.cpp:
(WebCore::FontCustomPlatformData::fontPlatformData):
* platform/graphics/win/FontCustomPlatformDataCairo.cpp:
(WebCore::FontCustomPlatformData::fontPlatformData):
* platform/graphics/win/IconWin.cpp:
(WebCore::Icon::createIconForFiles):
* platform/graphics/win/MediaPlayerPrivateQuickTimeVisualContext.cpp:
(WebCore::MediaPlayerPrivateQuickTimeVisualContext::setUpCookiesForQuickTime):
* platform/graphics/wince/FontPlatformData.cpp:
(WebCore::FontPlatformData::FontPlatformData):
* platform/network/curl/CurlDownload.cpp:
(CurlDownload::moveFileToDestination):
* platform/network/win/CookieJarWin.cpp:
(WebCore::setCookiesFromDOM):
(WebCore::cookiesForDOM):
* platform/network/win/DownloadBundleWin.cpp:
(WebCore::DownloadBundle::appendResumeData):
(WebCore::DownloadBundle::extractResumeData):
* platform/network/win/ResourceHandleWin.cpp:
(WebCore::createInternetHandle):
(WebCore::ResourceHandle::start):
(WebCore::ResourceHandle::fileLoadTimer):
* platform/text/win/LocaleWin.cpp:
(WebCore::LCIDFromLocaleInternal):
* platform/text/win/TextCodecWin.cpp:
(WebCore::TextCodecWin::enumerateSupportedEncodings):
* platform/win/ClipboardUtilitiesWin.cpp:
(WebCore::getWebLocData):
(WebCore::createGlobalData):
(WebCore::setFileDescriptorData):
(WebCore::getURL):
(WebCore::setCFData):
* platform/win/ContextMenuWin.cpp:
(WebCore::ContextMenu::createPlatformContextMenuFromItems):
* platform/win/DragImageWin.cpp:
(WebCore::createDragImageIconForCachedImageFilename):
* platform/win/FileSystemWin.cpp:
(WebCore::getFindData):
(WebCore::deleteFile):
(WebCore::deleteEmptyDirectory):
(WebCore::pathByAppendingComponent):
(WebCore::makeAllDirectories):
(WebCore::pathGetFileName):
(WebCore::openTemporaryFile):
(WebCore::openFile):
* platform/win/MIMETypeRegistryWin.cpp:
(WebCore::mimeTypeForExtension):
(WebCore::MIMETypeRegistry::getPreferredExtensionForMIMEType):
* platform/win/PasteboardWin.cpp:
(WebCore::createGlobalImageFileDescriptor):
(WebCore::createGlobalHDropContent):
* platform/win/PathWalker.cpp:
(WebCore::PathWalker::PathWalker):
* platform/win/SSLKeyGeneratorWin.cpp:
(WebCore::WebCore::signedPublicKeyAndChallengeString):
* platform/win/SharedBufferWin.cpp:
(WebCore::SharedBuffer::createWithContentsOfFile):
* platform/wince/FileSystemWinCE.cpp:
(WebCore::getFileInfo):
(WebCore::fileExists):
(WebCore::deleteFile):
(WebCore::deleteEmptyDirectory):
(WebCore::makeAllDirectories):
(WebCore::openTemporaryFile):
(WebCore::openFile):
* plugins/win/PluginDatabaseWin.cpp:
(WebCore::PluginDatabase::getPluginPathsInDirectories):
(WebCore::addMozillaPluginDirectories):
(WebCore::addAdobeAcrobatPluginDirectory):
(WebCore::addJavaPluginDirectory):
* plugins/win/PluginPackageWin.cpp:
(WebCore::getVersionInfo):
(WebCore::PluginPackage::fetchInfo):
(WebCore::PluginPackage::load):
* plugins/win/PluginViewWin.cpp:
(WebCore::PluginView::handlePostReadFile):
2013-06-27 Frédéric Wang <fred.wang@free.fr>
Implement parsing of MathML lengths.
https://bugs.webkit.org/show_bug.cgi?id=118053
Reviewed by Chris Fleizach.
A parsing function for MathML lengths, similar to Gecko's one, is
implemented. It is currently only used to parse mfrac@linethickness but
will be convenient to parse other MathML attributes in the future.
Tests: mathml/presentation/mfrac-linethickness1.html
mathml/presentation/mfrac-linethickness2.html
mathml/presentation/mfrac-linethickness3.html
* rendering/mathml/RenderMathMLBlock.cpp: add parsing functions
(WebCore::parseMathMLLength): parsing MathML Length (number unit)
(WebCore::parseNamedSpace): parsing MathML namedspaces
* rendering/mathml/RenderMathMLBlock.h: declare parsing functions
* rendering/mathml/RenderMathMLFraction.cpp: use the parsing function for linethickness
(WebCore::RenderMathMLFraction::updateFromElement):
2013-06-27 Anders Carlsson <andersca@apple.com>
Remove call to deprecatedCharactersWithNullTermination() in WebGL code
https://bugs.webkit.org/show_bug.cgi?id=118154
Reviewed by Dean Jackson.
Remove an unneeded call to deprecatedCharactersWithNullTermination(). Ultimately,
the string we used to call it on gets converted to an UTF-8 CString that has a null character anyway.
* html/canvas/WebGLProgram.cpp:
(WebCore::WebGLProgram::cacheActiveAttribLocations):
2013-06-27 Roger Fong <roger_fong@apple.com>
Unreviewed. Temporarily add some stderr output to Media Engine load methods to determine which engine buildbots are using for layout tests.
* platform/graphics/avfoundation/MediaPlayerPrivateAVFoundation.cpp:
(WebCore::MediaPlayerPrivateAVFoundation::load):
* platform/graphics/win/MediaPlayerPrivateQuickTimeVisualContext.cpp:
(WebCore::MediaPlayerPrivateQuickTimeVisualContext::load):
2013-06-27 Anders Carlsson <andersca@apple.com>
Stop using deprecatedCharactersWithNullTermination in SQLite code
https://bugs.webkit.org/show_bug.cgi?id=118146
Reviewed by Filip Pizlo.
Turns out SQLite uses UTF-8 internally so we might just as well use the SQLite functions
that take UTF-8 strings and do the conversion ourselves. This has the added advantage that we can
use String::utf8() which returns a null-terminated string.
Require a version of SQLite newer than 3.6.16 so we can remove two workarounds. 3.6.16 was released
4 years ago so supported port is likely to have it.
* platform/sql/SQLiteFileSystem.cpp:
(WebCore::SQLiteFileSystem::openDatabase):
Use sqlite3_open instead of sqlite3_open16.
* platform/sql/SQLiteFileSystem.h:
Fix parameter name capitalization.
* platform/sql/SQLiteStatement.cpp:
(WebCore::SQLiteStatement::prepare):
Use sqlite3_prepare_v2. Also, pass the length of the string (including the null character), since
that lets SQLite avoid a buffer copy. Remove a workaround for versions of SQLite older than 3.6.16.
2013-06-27 Andrew Lo <anlo@blackberry.com>
[BlackBerry] Unnecessary root layer commits occur during html5 video playback
https://bugs.webkit.org/show_bug.cgi?id=118147
Reviewed by Rob Buis.
Internally reviewed by Arvid Nilsson, John Griggs.
Only request layer commits when layer properties change in
GraphicsLayerBlackBerry::updateContentsRect and
GraphicsLayerBlackBerry::setContentsToMedia.
JIRA112749.
* platform/graphics/blackberry/GraphicsLayerBlackBerry.cpp:
(WebCore::GraphicsLayerBlackBerry::setContentsToMedia):
(WebCore::GraphicsLayerBlackBerry::updateContentsRect):
2013-06-27 Bem Jones-Bey <bjonesbe@adobe.com>
[CSS Shapes] New positioning model: basic support for rectangle shape-outside
https://bugs.webkit.org/show_bug.cgi?id=118080
Reviewed by David Hyatt.
With the latest Editor's Draft of the CSS Shapes specification,
shape-outside no longer affects the positioning of floats. This is the
first step in changing the implementation to reflect this
specification change. The bulk of this change is reverting the code
that was needed to position floats based on the bounding box of the
shape.
Tests: csswg/submitted/shapes/shape-outside/shape-outside-floats-horizontal-rectangle-000.html
csswg/submitted/shapes/shape-outside/shape-outside-floats-horizontal-rectangle-001.html
csswg/submitted/shapes/shape-outside/shape-outside-floats-horizontal-rectangle-002.html
csswg/submitted/shapes/shape-outside/shape-outside-floats-square-000.html
csswg/submitted/shapes/shape-outside/shape-outside-floats-vertical-rectangle-000.html
csswg/submitted/shapes/shape-outside/shape-outside-floats-vertical-rectangle-001.html
csswg/submitted/shapes/shape-outside/shape-outside-floats-vertical-rectangle-002.html
* rendering/LayoutState.cpp:
(WebCore::LayoutState::LayoutState): Revert changes to support float
positioning from shape-outside.
* rendering/RenderBlock.cpp:
(WebCore::RenderBlock::blockSelectionGaps): Ditto.
(WebCore::RenderBlock::insertFloatingObject): Ditto.
(WebCore::RenderBlock::positionNewFloats): Ditto.
(WebCore::RenderBlock::logicalLeftOffsetForLine): Instead of
converting to shape bounding box coordinates, convert to the
float's margin box coordinates.
(WebCore::RenderBlock::logicalRightOffsetForLine): Ditto.
(WebCore::positionForPointRespectingEditingBoundaries): Revert changes
to support float positioning from shape-outside.
* rendering/RenderBlock.h:
(WebCore::RenderBlock::xPositionForFloatIncludingMargin): Ditto.
(WebCore::RenderBlock::yPositionForFloatIncludingMargin): Ditto.
* rendering/RenderBlockLineLayout.cpp:
(WebCore::LineWidth::shrinkAvailableWidthForNewFloatIfNeeded): Instead
of converting to shape bounding box coordinates, convert to the
float's margin box coordinates.
* rendering/RenderBox.cpp:
(WebCore::RenderBox::mapLocalToContainer): Revert changes to support
float positioning from shape-outside.
(WebCore::RenderBox::offsetFromContainer): Ditto.
(WebCore::RenderBox::computeRectForRepaint): Ditto.
(WebCore::RenderBox::layoutOverflowRectForPropagation): Ditto.
* rendering/RenderBoxModelObject.cpp: Ditto.
* rendering/RenderBoxModelObject.h: Ditto.
* rendering/RenderInline.cpp:
(WebCore::RenderInline::clippedOverflowRectForRepaint): Ditto.
(WebCore::RenderInline::computeRectForRepaint): Ditto.
(WebCore::RenderInline::mapLocalToContainer): Ditto.
* rendering/RenderLayer.cpp:
(WebCore::RenderLayer::updateLayerPosition): Ditto.
(WebCore::RenderLayer::calculateClipRects): Ditto.
(WebCore::RenderLayer::shouldBeNormalFlowOnly): Ditto.
* rendering/RenderLayer.h:
(WebCore::RenderLayer::offsetForInFlowPosition): Ditto.
* rendering/RenderObject.h: Ditto.
* rendering/shapes/ShapeInfo.h: Make m_renderer protected, since we
now need it in the subclass to compute the segments.
* rendering/shapes/ShapeOutsideInfo.cpp:
(WebCore::ShapeOutsideInfo::computeSegmentsForLine): Update segment
computation to use the float's margin box instead of the shape's
bounding box for computing the deltas.
(WebCore::ShapeOutsideInfo::leftSegmentMarginBoxDelta): This used to
be leftSegmentShapeBoundingBoxDelta, which has been renamed in the
obvious way.
(WebCore::ShapeOutsideInfo::rightSegmentMarginBoxDelta): This used to
be rightSegmentShapeBoundingBoxDelta, which has been renamed in the
obvious way.
* rendering/shapes/ShapeOutsideInfo.h: Revert changes to support float
positioning from shape-outside.
* rendering/style/RenderStyle.h: Ditto.
2013-06-27 Antti Koivisto <antti@apple.com>
RenderLayerCompositor destructor is fragile
https://bugs.webkit.org/show_bug.cgi?id=118143
Reviewed by Simon Fraser.
With iOS tile cache implementation deleting RenderLayerCompositor may end up starting a deleted timer.
This corrupts the timer heap and leads to a crash later. This happens because GraphicsLayers destructor
calls back to the RenderLayerCompositor that is being deleted. This is pretty fragile in general.
No test as there is no known way to repro this with plain webkit.
* platform/Timer.cpp:
(WebCore::TimerBase::TimerBase):
(WebCore::TimerBase::~TimerBase):
(WebCore::TimerBase::setNextFireTime):
* platform/Timer.h:
Assert that the timer is alive before starting it. This turns bugs like this into clear crash stacks
instead of hard-to-debug timer heap corruptions.
* rendering/RenderLayerCompositor.cpp:
(WebCore::RenderLayerCompositor::~RenderLayerCompositor):
Take care to delete owned GraphicsLayers before proceeding with the rest of the destructor.
2013-06-27 Christophe Dumez <ch.dumez@sisa.samsung.com>
Update SVG interfaces to stop inheriting from SVGURIReference and SVGTests
https://bugs.webkit.org/show_bug.cgi?id=118142
Reviewed by Ryosuke Niwa.
Stop inheriting from SVGURIReference and SVGTests and use IDL implements statements
instead. This is one step towards getting rid of multiple inheritance in SVG (which
is no longer supported by Web IDL) and matching the latest specification:
- https://svgwg.org/svg2-draft/types.html#BasicDOMInterfaces
No new tests, no behavior change.
* CMakeLists.txt:
* DerivedSources.pri:
* GNUmakefile.list.am:
* svg/SVGAElement.idl:
* svg/SVGAltGlyphElement.idl:
* svg/SVGAnimationElement.idl:
* svg/SVGCircleElement.idl:
* svg/SVGClipPathElement.idl:
* svg/SVGCursorElement.idl:
* svg/SVGDefsElement.idl:
* svg/SVGEllipseElement.idl:
* svg/SVGFEImageElement.idl:
* svg/SVGFilterElement.idl:
* svg/SVGForeignObjectElement.idl:
* svg/SVGGElement.idl:
* svg/SVGGlyphRefElement.idl:
* svg/SVGGradientElement.idl:
* svg/SVGImageElement.idl:
* svg/SVGLineElement.idl:
* svg/SVGMPathElement.idl:
* svg/SVGMaskElement.idl:
* svg/SVGPathElement.idl:
* svg/SVGPatternElement.idl:
* svg/SVGPolygonElement.idl:
* svg/SVGPolylineElement.idl:
* svg/SVGRectElement.idl:
* svg/SVGSVGElement.idl:
* svg/SVGScriptElement.idl:
* svg/SVGSwitchElement.idl:
* svg/SVGTRefElement.idl:
* svg/SVGTextContentElement.idl:
* svg/SVGTextPathElement.idl:
* svg/SVGUseElement.idl:
2013-06-27 Ruth Fong <ruth_fong@apple.com>
Polish context menus for media elements
https://bugs.webkit.org/show_bug.cgi?id=118078
<rdar://problem/14278960>
Reviewed by Eric Carlson.
No new tests: media/context-menu-action.html,
which has been disabled by bug 116651, is used to test context menus.
* English.lproj/Localizable.strings: Changed "Fullscreen" to "Full Screen"
and added strings "Show Controls" and "Hide Controls".
* page/ContextMenuController.cpp: Updated to include a new context menu item
that toggles betweeen "Show Controls" and "Hide Controls".
* platform/ContextMenuItem.h:
* platform/LocalizedStrings.cpp:
* platform/LocalizedStrings.h:
* platform/efl/LocalizedStringsEfl.cpp:
* platform/gtk/LocalizedStringsGtk.cpp:
* platform/qt/LocalizedStringsQt.cpp:
Added equivalents of localized strings "Show Controls" and "Hide Controls".
2013-06-27 Chris Fleizach <cfleizach@apple.com>
AX: IOS: crash while navigating with SVG
https://bugs.webkit.org/show_bug.cgi?id=118101
Need to check if the SVG path exists before copying it.
Reviewed by Stephen Chenney.
Test: platform/iphone-simulator/accessibility/svg-path-crash.html
* accessibility/AccessibilityRenderObject.cpp:
(WebCore::AccessibilityRenderObject::elementPath):
* rendering/svg/RenderSVGShape.h:
(WebCore::RenderSVGShape::hasPath):
2013-06-27 Seokju Kwon <seokju.kwon@gmail.com>
Removing the redundant checks after r152078
https://bugs.webkit.org/show_bug.cgi?id=118117
Reviewed by Simon Fraser.
Avoided redundant checks in RenderLayerCompositor::reasonsForCompositing() after r152078.
No new tests as no functionality change.
* inspector/InspectorLayerTreeAgent.cpp:
(WebCore::InspectorLayerTreeAgent::reasonsForCompositingLayer):
* rendering/RenderLayerCompositor.cpp:
(WebCore::RenderLayerCompositor::logReasonsForCompositing):
2013-06-27 Christophe Dumez <ch.dumez@sisa.samsung.com>
Remove [NoInterfaceObject] from WorkerGlobalScope
https://bugs.webkit.org/show_bug.cgi?id=118071
Reviewed by Kentaro Hara.
Expose WorkerGlobalScope interface in worker environment as per the latest
specification:
http://www.whatwg.org/specs/web-apps/current-work/multipage/workers.html#the-workerglobalscope-common-interface
Also expose the SharedWorkerGlobalScope interface when the JavaScript global environment is a
shared worker environment, and the DedicatedWorkerGlobalScope interface when the JavaScript
global environment is a dedicated worker environment:
http://www.whatwg.org/specs/web-apps/current-work/multipage/workers.html#sharedworkerglobalscope
http://www.whatwg.org/specs/web-apps/current-work/multipage/workers.html#dedicatedworkerglobalscope
The semantics of the [GlobalContext] IDL extended attribute has changed to support this
use case. The value for the extended attribute is now the name of the interface to which the
Constructor attribute should be added (Window, WorkerGlobalScope, SharedWorkerGlobalScope...).
It is possible to specify several interface names by using '&' as separator. For e.g.
[GlobalContext=DOMWindow&WorkerGlobalScope].
Tests: fast/js/global-constructors-attributes-dedicated-worker.html
fast/js/global-constructors-attributes-shared-worker.html
* CMakeLists.txt:
* DerivedSources.make:
* DerivedSources.pri:
* GNUmakefile.am:
* Modules/websockets/WebSocket.idl:
* UseJSC.cmake:
* bindings/scripts/CodeGeneratorJS.pm:
(GenerateConstructorHelperMethods):
* bindings/scripts/IDLAttributes.txt:
* bindings/scripts/generate-bindings.pl:
(checkIfIDLAttributesExists):
* bindings/scripts/preprocess-idls.pl:
* dom/MessageChannel.idl:
* dom/MessageEvent.idl:
* fileapi/Blob.idl:
* fileapi/FileReader.idl:
* fileapi/FileReaderSync.idl:
* html/DOMURL.idl:
* html/canvas/ArrayBuffer.idl:
* html/canvas/DataView.idl:
* html/canvas/Float32Array.idl:
* html/canvas/Float64Array.idl:
* html/canvas/Int16Array.idl:
* html/canvas/Int32Array.idl:
* html/canvas/Int8Array.idl:
* html/canvas/Uint16Array.idl:
* html/canvas/Uint32Array.idl:
* html/canvas/Uint8Array.idl:
* html/canvas/Uint8ClampedArray.idl:
* page/EventSource.idl:
* workers/DedicatedWorkerGlobalScope.idl:
* workers/SharedWorkerGlobalScope.idl:
* workers/WorkerGlobalScope.idl:
* workers/WorkerLocation.idl:
* xml/XMLHttpRequest.idl:
2013-06-27 Commit Queue <commit-queue@webkit.org>
Unreviewed, rolling out r152074.
http://trac.webkit.org/changeset/152074
https://bugs.webkit.org/show_bug.cgi?id=118137
It caused lots of layout and API test crash on Qt Wk2.
(Requested by kadam on #webkit).
* CMakeLists.txt:
* Target.pri:
* platform/graphics/texmap/coordinated/CompositingCoordinator.cpp: Removed.
* platform/graphics/texmap/coordinated/CompositingCoordinator.h: Removed.
2013-06-27 Seokju Kwon <seokju.kwon@gmail.com>
Avoid duplicating hostWindow() call in FrameView::setFrameRect()
https://bugs.webkit.org/show_bug.cgi?id=118115
Reviewed by Christophe Dumez.
Remove a redundant call in FrameView::setFrameRect().
No function change, no tests.
* page/FrameView.cpp:
(WebCore::FrameView::scheduleAnimation):
2013-06-27 Xabier Rodriguez Calvar <calvaris@igalia.com>
Fixing some compiler warnings
https://bugs.webkit.org/show_bug.cgi?id=117791
Reviewed by Martin Robinson.
No new tests needed.
* accessibility/atk/WebKitAccessibleInterfaceText.cpp:
(webkitAccessibleTextGetTextForOffset): Fixed warning about
uninitialized variable.
2013-06-27 Iago Toral Quiroga <itoral@igalia.com>
Use consistent file names for WidgetBackingStoreGtkX11 class
https://bugs.webkit.org/show_bug.cgi?id=118124
Reviewed by Carlos Garcia Campos.
* GNUmakefile.list.am:
* PlatformGTK.cmake:
* platform/gtk/GtkWidgetBackingStoreX11.cpp: Removed.
* platform/gtk/GtkWidgetBackingStoreX11.h: Removed.
* platform/gtk/WidgetBackingStoreGtkX11.cpp: Added.
(WebCore::WidgetBackingStoreGtkX11::create):
(WebCore::WidgetBackingStoreGtkX11::WidgetBackingStoreGtkX11):
(WebCore::WidgetBackingStoreGtkX11::~WidgetBackingStoreGtkX11):
(WebCore::WidgetBackingStoreGtkX11::cairoSurface):
(WebCore::WidgetBackingStoreGtkX11::scroll):
* platform/gtk/WidgetBackingStoreGtkX11.h: Added.
2013-06-27 Zoltan Arvai <zarvai@inf.u-szeged.hu>
Buildfix for !ENABLE(SVG) builds.
Reviewed by Csaba Osztrogonác.
Moving RenderObject::hasAspectRatio() outside from ENABLE(SVG) guard.
* rendering/RenderObject.h:
(WebCore::RenderObject::hasAspectRatio):
2013-06-27 Kangil Han <kangil.han@samsung.com>
Adopt is/toHTMLLabelElement for code cleanup
https://bugs.webkit.org/show_bug.cgi?id=118113
Reviewed by Andreas Kling.
To enhance readability, this patch adopts is/toHTMLLabelElement.
This also helps out to reduce duplicated use of static_cast.
* accessibility/AXObjectCache.cpp:
(WebCore::AXObjectCache::handleAttributeChanged):
(WebCore::AXObjectCache::labelChanged):
* accessibility/AccessibilityNodeObject.cpp:
(WebCore::AccessibilityNodeObject::determineAccessibilityRole):
(WebCore::AccessibilityNodeObject::labelForElement):
* accessibility/AccessibilityRenderObject.cpp:
(WebCore::AccessibilityRenderObject::labelElementContainer):
(WebCore::AccessibilityRenderObject::computeAccessibilityIsIgnored):
(WebCore::AccessibilityRenderObject::determineAccessibilityRole):
* dom/DocumentOrderedMap.cpp:
(WebCore::keyMatchesLabelForAttribute):
* dom/Element.cpp:
(WebCore::Element::updateLabel):
* dom/TreeScope.cpp:
(WebCore::TreeScope::labelElementForId):
* html/HTMLLabelElement.h:
(WebCore::isHTMLLabelElement):
(WebCore::toHTMLLabelElement):
* html/LabelsNodeList.cpp:
(WebCore::LabelsNodeList::nodeMatches):
2013-06-27 Peter Gal <galpeter@inf.u-szeged.hu>
[curl] Fix unused variable/parameter warnings
https://bugs.webkit.org/show_bug.cgi?id=118050
Reviewed by Christophe Dumez.
Commented out unused parameters and removed an unused variable in the curl backend.
No tests required.
* platform/network/curl/CredentialStorageCurl.cpp:
(WebCore::CredentialStorage::getFromPersistentStorage):
* platform/network/curl/DNSCurl.cpp:
(WebCore::prefetchDNS):
* platform/network/curl/ResourceHandleManager.cpp:
(WebCore::curl_lock_callback):
(WebCore::curl_unlock_callback):
(WebCore::headerCallback):
(WebCore::ResourceHandleManager::downloadTimerCallback):
2013-06-27 Csaba Osztrogonác <ossy@webkit.org>
Fix cast-align warnings in WebCore/platform/graphics/cairo
https://bugs.webkit.org/show_bug.cgi?id=117990
Reviewed by Rob Buis.
* platform/graphics/cairo/BitmapImageCairo.cpp:
(WebCore::BitmapImage::checkForSolidColor):
* platform/graphics/cairo/ImageBufferCairo.cpp:
(WebCore::ImageBuffer::platformTransformColorSpace):
(WebCore::getImageData):
(WebCore::ImageBuffer::putByteArray):
2013-06-27 Szabolcs Dávid <davidsz@inf.u-szeged.hu>
[curl] Add "set-cookie" to appendable headers
https://bugs.webkit.org/show_bug.cgi?id=118061
Reviewed by Christophe Dumez.
Mark set-cookie as an appendable header.
* platform/network/curl/ResourceHandleManager.cpp:
(WebCore::isAppendableHeader):
2013-06-27 Horia Iosif Olaru <olaru@adobe.com>
Remove ENABLE_CSS_COMPOSITING guards around -webkit-background-blend mode related code. The same flag guards -webkit-blend-mode code, but those guards are not touched by this change.
https://bugs.webkit.org/show_bug.cgi?id=117619
Reviewed by Dean Jackson.
Test: css3/compositing/effect-background-blend-mode-tiled.html
* WebCore.exp.in:
* bindings/generic/RuntimeEnabledFeatures.h:
* css/CSSComputedStyleDeclaration.cpp:
(WebCore::ComputedStyleExtractor::propertyValue):
* css/CSSParser.cpp:
(WebCore::CSSParser::parseValue):
(WebCore::CSSParser::parseFillProperty):
* css/CSSProperty.cpp:
(WebCore::CSSProperty::isInheritedProperty):
* css/CSSPropertyNames.in:
* css/DeprecatedStyleBuilder.cpp:
(WebCore::DeprecatedStyleBuilder::DeprecatedStyleBuilder):
2013-06-26 Christophe Dumez <ch.dumez@sisa.samsung.com>
Rename WorkerContext to WorkerGlobalScope
https://bugs.webkit.org/show_bug.cgi?id=118059
Reviewed by Kentaro Hara.
Rename WorkerContext / SharedWorkerContext / DedicatedWorkerContext to
WorkerGlobalScope / SharedWorkerGlobalScope / DedicatedWorkerGlobalScope
to match the latest specification:
http://www.whatwg.org/specs/web-apps/current-work/multipage/workers.html#workerglobalscope
Those interfaces have [NoInterfaceObject] IDL extended attribute so the
name did not matter much so far. However, the specification was updated
and [NoInterfaceObject] was removed. We should therefore rename those
interfaces as a preparation for this change.
No new tests, no behavior change as these interfaces are not exposed to
JavaScript yet.
* CMakeLists.txt:
* DerivedSources.cpp:
* DerivedSources.make:
* DerivedSources.pri:
* GNUmakefile.am:
* GNUmakefile.list.am:
* Modules/filesystem/WorkerGlobalScopeFileSystem.cpp: Renamed from Source/WebCore/Modules/filesystem/WorkerContextFileSystem.cpp.
(WebCore::WorkerGlobalScopeFileSystem::webkitRequestFileSystem):
(WebCore::WorkerGlobalScopeFileSystem::webkitRequestFileSystemSync):
(WebCore::WorkerGlobalScopeFileSystem::webkitResolveLocalFileSystemURL):
(WebCore::WorkerGlobalScopeFileSystem::webkitResolveLocalFileSystemSyncURL):
* Modules/filesystem/WorkerGlobalScopeFileSystem.h: Renamed from Source/WebCore/Modules/filesystem/WorkerContextFileSystem.h.
* Modules/filesystem/WorkerGlobalScopeFileSystem.idl: Renamed from Source/WebCore/Modules/filesystem/WorkerContextFileSystem.idl.
* Modules/indexeddb/IDBFactory.cpp:
* Modules/indexeddb/WorkerGlobalScopeIndexedDatabase.cpp: Renamed from Source/WebCore/Modules/indexeddb/WorkerContextIndexedDatabase.cpp.
(WebCore::WorkerGlobalScopeIndexedDatabase::WorkerGlobalScopeIndexedDatabase):
(WebCore::WorkerGlobalScopeIndexedDatabase::~WorkerGlobalScopeIndexedDatabase):
(WebCore::WorkerGlobalScopeIndexedDatabase::supplementName):
(WebCore::WorkerGlobalScopeIndexedDatabase::from):
(WebCore::WorkerGlobalScopeIndexedDatabase::indexedDB):
* Modules/indexeddb/WorkerGlobalScopeIndexedDatabase.h: Renamed from Source/WebCore/Modules/indexeddb/WorkerContextIndexedDatabase.h.
* Modules/indexeddb/WorkerGlobalScopeIndexedDatabase.idl: Renamed from Source/WebCore/Modules/indexeddb/WorkerContextIndexedDatabase.idl.
* Modules/notifications/Notification.cpp:
* Modules/notifications/NotificationCenter.cpp:
* Modules/notifications/WorkerGlobalScopeNotifications.cpp: Renamed from Source/WebCore/Modules/notifications/WorkerContextNotifications.cpp.
(WebCore::WorkerGlobalScopeNotifications::WorkerGlobalScopeNotifications):
(WebCore::WorkerGlobalScopeNotifications::~WorkerGlobalScopeNotifications):
(WebCore::WorkerGlobalScopeNotifications::supplementName):
(WebCore::WorkerGlobalScopeNotifications::from):
(WebCore::WorkerGlobalScopeNotifications::webkitNotifications):
* Modules/notifications/WorkerGlobalScopeNotifications.h: Renamed from Source/WebCore/Modules/notifications/WorkerContextNotifications.h.
* Modules/notifications/WorkerGlobalScopeNotifications.idl: Renamed from Source/WebCore/Modules/notifications/WorkerContextNotifications.idl.
* Modules/webdatabase/DatabaseContext.cpp:
(WebCore::DatabaseContext::allowDatabaseAccess):
(WebCore::DatabaseContext::databaseExceededQuota):
* Modules/webdatabase/WorkerGlobalScopeWebDatabase.cpp: Renamed from Source/WebCore/Modules/webdatabase/WorkerContextWebDatabase.cpp.
(WebCore::WorkerGlobalScopeWebDatabase::openDatabase):
(WebCore::WorkerGlobalScopeWebDatabase::openDatabaseSync):
* Modules/webdatabase/WorkerGlobalScopeWebDatabase.h: Renamed from Source/WebCore/Modules/webdatabase/WorkerContextWebDatabase.h.
(WebCore::WorkerGlobalScopeWebDatabase::WorkerGlobalScopeWebDatabase):
(WebCore::WorkerGlobalScopeWebDatabase::~WorkerGlobalScopeWebDatabase):
* Modules/webdatabase/WorkerGlobalScopeWebDatabase.idl: Renamed from Source/WebCore/Modules/webdatabase/WorkerContextWebDatabase.idl.
* Modules/websockets/ThreadableWebSocketChannel.cpp:
(WebCore::ThreadableWebSocketChannel::create):
* Modules/websockets/ThreadableWebSocketChannelClientWrapper.cpp:
(WebCore::ThreadableWebSocketChannelClientWrapper::processPendingTasksCallback):
* Modules/websockets/WorkerThreadableWebSocketChannel.cpp:
(WebCore::WorkerThreadableWebSocketChannel::WorkerThreadableWebSocketChannel):
(WebCore::workerGlobalScopeDidSend):
(WebCore::WorkerThreadableWebSocketChannel::Peer::send):
(WebCore::workerGlobalScopeDidGetBufferedAmount):
(WebCore::WorkerThreadableWebSocketChannel::Peer::bufferedAmount):
(WebCore::workerGlobalScopeDidConnect):
(WebCore::WorkerThreadableWebSocketChannel::Peer::didConnect):
(WebCore::workerGlobalScopeDidReceiveMessage):
(WebCore::WorkerThreadableWebSocketChannel::Peer::didReceiveMessage):
(WebCore::workerGlobalScopeDidReceiveBinaryData):
(WebCore::WorkerThreadableWebSocketChannel::Peer::didReceiveBinaryData):
(WebCore::workerGlobalScopeDidUpdateBufferedAmount):
(WebCore::WorkerThreadableWebSocketChannel::Peer::didUpdateBufferedAmount):
(WebCore::workerGlobalScopeDidStartClosingHandshake):
(WebCore::WorkerThreadableWebSocketChannel::Peer::didStartClosingHandshake):
(WebCore::workerGlobalScopeDidClose):
(WebCore::WorkerThreadableWebSocketChannel::Peer::didClose):
(WebCore::workerGlobalScopeDidReceiveMessageError):
(WebCore::WorkerThreadableWebSocketChannel::Peer::didReceiveMessageError):
(WebCore::WorkerThreadableWebSocketChannel::Bridge::Bridge):
(WebCore::WorkerThreadableWebSocketChannel::WorkerGlobalScopeDidInitializeTask::create):
(WebCore::WorkerThreadableWebSocketChannel::WorkerGlobalScopeDidInitializeTask::~WorkerGlobalScopeDidInitializeTask):
(WebCore::WorkerThreadableWebSocketChannel::WorkerGlobalScopeDidInitializeTask::WorkerGlobalScopeDidInitializeTask):
(WebCore::WorkerThreadableWebSocketChannel::Bridge::mainThreadInitialize):
(WebCore::WorkerThreadableWebSocketChannel::Bridge::disconnect):
(WebCore::WorkerThreadableWebSocketChannel::Bridge::waitForMethodCompletion):
* Modules/websockets/WorkerThreadableWebSocketChannel.h:
(WebCore::WorkerThreadableWebSocketChannel::create):
(WebCore::WorkerThreadableWebSocketChannel::Bridge::create):
* Target.pri:
* UseJSC.cmake:
* WebCore.order:
* WebCore.vcxproj/WebCore.vcxproj:
* WebCore.vcxproj/WebCore.vcxproj.filters:
* WebCore.xcodeproj/project.pbxproj:
* bindings/cpp/WebDOMEventTarget.cpp:
(toWebKit):
* bindings/cpp/WebDOMEventTarget.h:
* bindings/generic/ActiveDOMCallback.cpp:
* bindings/js/DOMRequestState.h:
(WebCore::DOMRequestState::DOMRequestState):
* bindings/js/JSBindingsAllInOne.cpp:
* bindings/js/JSDOMBinding.h:
* bindings/js/JSDOMGlobalObject.cpp:
(WebCore::JSDOMGlobalObject::scriptExecutionContext):
(WebCore::toJSDOMGlobalObject):
* bindings/js/JSDedicatedWorkerGlobalScopeCustom.cpp: Renamed from Source/WebCore/bindings/js/JSDedicatedWorkerContextCustom.cpp.
(WebCore::JSDedicatedWorkerGlobalScope::postMessage):
* bindings/js/JSEventListener.cpp:
(WebCore::JSEventListener::handleEvent):
* bindings/js/JSEventTargetCustom.cpp:
(WebCore::toJS):
* bindings/js/JSWorkerGlobalScopeBase.cpp: Renamed from Source/WebCore/bindings/js/JSWorkerContextBase.cpp.
(WebCore::JSWorkerGlobalScopeBase::JSWorkerGlobalScopeBase):
(WebCore::JSWorkerGlobalScopeBase::finishCreation):
(WebCore::JSWorkerGlobalScopeBase::destroy):
(WebCore::JSWorkerGlobalScopeBase::scriptExecutionContext):
(WebCore::toJS):
(WebCore::toJSDedicatedWorkerGlobalScope):
(WebCore::toJSSharedWorkerGlobalScope):
(WebCore::toJSWorkerGlobalScope):
* bindings/js/JSWorkerGlobalScopeBase.h: Renamed from Source/WebCore/bindings/js/JSWorkerContextBase.h.
(WebCore::JSWorkerGlobalScopeBase::impl):
(WebCore::JSWorkerGlobalScopeBase::createStructure):
* bindings/js/JSWorkerGlobalScopeCustom.cpp: Renamed from Source/WebCore/bindings/js/JSWorkerContextCustom.cpp.
(WebCore::JSWorkerGlobalScope::visitChildren):
(WebCore::JSWorkerGlobalScope::getOwnPropertySlotDelegate):
(WebCore::JSWorkerGlobalScope::getOwnPropertyDescriptorDelegate):
(WebCore::JSWorkerGlobalScope::importScripts):
(WebCore::JSWorkerGlobalScope::setTimeout):
(WebCore::JSWorkerGlobalScope::setInterval):
* bindings/js/ScheduledAction.cpp:
(WebCore::ScheduledAction::execute):
* bindings/js/ScheduledAction.h:
* bindings/js/ScriptProfiler.cpp:
(WebCore::ScriptProfiler::startForWorkerGlobalScope):
(WebCore::ScriptProfiler::stopForWorkerGlobalScope):
* bindings/js/ScriptProfiler.h:
* bindings/js/ScriptState.cpp:
(WebCore::scriptStateFromWorkerGlobalScope):
* bindings/js/ScriptState.h:
* bindings/js/WorkerScriptController.cpp:
(WebCore::WorkerScriptController::WorkerScriptController):
(WebCore::WorkerScriptController::~WorkerScriptController):
(WebCore::WorkerScriptController::initScript):
(WebCore::WorkerScriptController::evaluate):
(WebCore::WorkerScriptController::setException):
(WebCore::WorkerScriptController::forbidExecution):
(WebCore::WorkerScriptController::isExecutionForbidden):
(WebCore::WorkerScriptController::disableEval):
(WebCore::WorkerScriptController::attachDebugger):
(WebCore::WorkerScriptController::detachDebugger):
* bindings/js/WorkerScriptController.h:
(WebCore::WorkerScriptController::workerGlobalScopeWrapper):
(WebCore::WorkerScriptController::initScriptIfNeeded):
* bindings/js/WorkerScriptDebugServer.cpp:
(WebCore::WorkerScriptDebugServer::WorkerScriptDebugServer):
(WebCore::WorkerScriptDebugServer::addListener):
(WebCore::WorkerScriptDebugServer::recompileAllJSFunctions):
(WebCore::WorkerScriptDebugServer::removeListener):
(WebCore::WorkerScriptDebugServer::runEventLoopWhilePaused):
* bindings/js/WorkerScriptDebugServer.h:
* bindings/scripts/CodeGeneratorJS.pm:
(GenerateHeader):
(GenerateImplementation):
* bindings/scripts/IDLAttributes.txt:
* bindings/scripts/preprocess-idls.pl:
* dom/ActiveDOMObject.cpp:
* dom/EventTarget.h:
* dom/EventTargetFactory.in:
* dom/MessagePort.cpp:
(WebCore::MessagePort::dispatchMessages):
* dom/ScriptExecutionContext.cpp:
(WebCore::ScriptExecutionContext::createdMessagePort):
(WebCore::ScriptExecutionContext::destroyedMessagePort):
(WebCore::ScriptExecutionContext::vm):
* dom/ScriptExecutionContext.h:
(WebCore::ScriptExecutionContext::isWorkerGlobalScope):
* inspector/InjectedScriptManager.cpp:
(WebCore::InjectedScriptManager::createForWorker):
(WebCore::InjectedScriptManager::canAccessInspectedWorkerGlobalScope):
* inspector/InjectedScriptManager.h:
* inspector/InspectorConsoleInstrumentation.h:
(WebCore::InspectorInstrumentation::addMessageToConsole):
* inspector/InspectorInstrumentation.cpp:
(WebCore::InspectorInstrumentation::didStartWorkerGlobalScopeImpl):
(WebCore::InspectorInstrumentation::willEvaluateWorkerScript):
(WebCore::InspectorInstrumentation::workerGlobalScopeTerminatedImpl):
(WebCore::InspectorInstrumentation::instrumentingAgentsForWorkerGlobalScope):
(WebCore::InspectorInstrumentation::instrumentingAgentsForNonDocumentContext):
* inspector/InspectorInstrumentation.h:
(WebCore::InspectorInstrumentation::didStartWorkerGlobalScope):
(WebCore::InspectorInstrumentation::workerGlobalScopeTerminated):
* inspector/InspectorProfilerAgent.cpp:
(WebCore::WorkerProfilerAgent::WorkerProfilerAgent):
(WebCore::WorkerProfilerAgent::startProfiling):
(WebCore::WorkerProfilerAgent::stopProfiling):
(WebCore::InspectorProfilerAgent::create):
* inspector/InspectorProfilerAgent.h:
* inspector/InspectorRuntimeAgent.h:
* inspector/InspectorWorkerAgent.cpp:
(WebCore::InspectorWorkerAgent::WorkerFrontendChannel::WorkerFrontendChannel):
(WebCore::InspectorWorkerAgent::WorkerFrontendChannel::~WorkerFrontendChannel):
(WebCore::InspectorWorkerAgent::WorkerFrontendChannel::proxy):
(WebCore::InspectorWorkerAgent::WorkerFrontendChannel::connectToWorkerGlobalScope):
(WebCore::InspectorWorkerAgent::WorkerFrontendChannel::disconnectFromWorkerGlobalScope):
(WebCore::InspectorWorkerAgent::connectToWorker):
(WebCore::InspectorWorkerAgent::disconnectFromWorker):
(WebCore::InspectorWorkerAgent::didStartWorkerGlobalScope):
(WebCore::InspectorWorkerAgent::workerGlobalScopeTerminated):
(WebCore::InspectorWorkerAgent::destroyWorkerFrontendChannels):
(WebCore::InspectorWorkerAgent::createWorkerFrontendChannel):
* inspector/InspectorWorkerAgent.h:
* inspector/InstrumentingAgents.cpp:
(WebCore::instrumentationForWorkerGlobalScope):
* inspector/InstrumentingAgents.h:
* inspector/WorkerDebuggerAgent.cpp:
(WebCore::WorkerDebuggerAgent::create):
(WebCore::WorkerDebuggerAgent::WorkerDebuggerAgent):
(WebCore::WorkerDebuggerAgent::~WorkerDebuggerAgent):
(WebCore::WorkerDebuggerAgent::interruptAndDispatchInspectorCommands):
(WebCore::WorkerDebuggerAgent::injectedScriptForEval):
* inspector/WorkerDebuggerAgent.h:
* inspector/WorkerInspectorController.cpp:
(WebCore::WorkerInspectorController::WorkerInspectorController):
(WebCore::WorkerInspectorController::connectFrontend):
* inspector/WorkerInspectorController.h:
* inspector/WorkerRuntimeAgent.cpp:
(WebCore::WorkerRuntimeAgent::WorkerRuntimeAgent):
(WebCore::WorkerRuntimeAgent::injectedScriptForEval):
(WebCore::WorkerRuntimeAgent::pauseWorkerGlobalScope):
* inspector/WorkerRuntimeAgent.h:
(WebCore::WorkerRuntimeAgent::create):
* loader/ThreadableLoader.cpp:
(WebCore::ThreadableLoader::create):
(WebCore::ThreadableLoader::loadResourceSynchronously):
* loader/WorkerThreadableLoader.cpp:
(WebCore::WorkerThreadableLoader::WorkerThreadableLoader):
(WebCore::WorkerThreadableLoader::loadResourceSynchronously):
(WebCore::workerGlobalScopeDidSendData):
(WebCore::WorkerThreadableLoader::MainThreadBridge::didSendData):
(WebCore::workerGlobalScopeDidReceiveResponse):
(WebCore::WorkerThreadableLoader::MainThreadBridge::didReceiveResponse):
(WebCore::workerGlobalScopeDidReceiveData):
(WebCore::WorkerThreadableLoader::MainThreadBridge::didReceiveData):
(WebCore::workerGlobalScopeDidFinishLoading):
(WebCore::WorkerThreadableLoader::MainThreadBridge::didFinishLoading):
(WebCore::workerGlobalScopeDidFail):
(WebCore::WorkerThreadableLoader::MainThreadBridge::didFail):
(WebCore::workerGlobalScopeDidFailAccessControlCheck):
(WebCore::WorkerThreadableLoader::MainThreadBridge::didFailAccessControlCheck):
(WebCore::workerGlobalScopeDidFailRedirectCheck):
(WebCore::WorkerThreadableLoader::MainThreadBridge::didFailRedirectCheck):
* loader/WorkerThreadableLoader.h:
(WebCore::WorkerThreadableLoader::create):
* loader/cache/MemoryCache.cpp:
(WebCore::MemoryCache::removeRequestFromCache):
* platform/blackberry/LocalFileSystemBlackBerry.cpp:
(WebCore::openFileSystem):
(WebCore::LocalFileSystem::deleteFileSystem):
* platform/blackberry/WorkerAsyncFileSystemBlackBerry.cpp:
(WebCore::WorkerAsyncFileSystemBlackBerry::WorkerAsyncFileSystemBlackBerry):
(WebCore::WorkerAsyncFileSystemBlackBerry::openFileSystem):
(WebCore::WorkerAsyncFileSystemBlackBerry::deleteFileSystem):
* platform/blackberry/WorkerAsyncFileSystemBlackBerry.h:
(WebCore::WorkerAsyncFileSystemBlackBerry::create):
* platform/blackberry/WorkerAsyncFileWriterBlackBerry.h:
* platform/blackberry/WorkerPlatformAsyncFileSystemCallbacks.cpp:
(WebCore::WorkerPlatformAsyncFileSystemCallbacks::postTaskToWorkerThread):
* platform/blackberry/WorkerPlatformAsyncFileSystemCallbacks.h:
* platform/blackberry/WorkerPlatformFileWriterClient.cpp:
(WebCore::WorkerPlatformFileWriterClient::postTaskToWorkerThreadIfNeeded):
* platform/blackberry/WorkerPlatformFileWriterClient.h:
* workers/DedicatedWorkerGlobalScope.cpp: Renamed from Source/WebCore/workers/DedicatedWorkerContext.cpp.
(WebCore::DedicatedWorkerGlobalScope::create):
(WebCore::DedicatedWorkerGlobalScope::DedicatedWorkerGlobalScope):
(WebCore::DedicatedWorkerGlobalScope::~DedicatedWorkerGlobalScope):
(WebCore::DedicatedWorkerGlobalScope::interfaceName):
(WebCore::DedicatedWorkerGlobalScope::postMessage):
(WebCore::DedicatedWorkerGlobalScope::importScripts):
(WebCore::DedicatedWorkerGlobalScope::thread):
* workers/DedicatedWorkerGlobalScope.h: Renamed from Source/WebCore/workers/DedicatedWorkerContext.h.
* workers/DedicatedWorkerGlobalScope.idl: Renamed from Source/WebCore/workers/DedicatedWorkerContext.idl.
* workers/DedicatedWorkerThread.cpp:
(WebCore::DedicatedWorkerThread::createWorkerGlobalScope):
(WebCore::DedicatedWorkerThread::runEventLoop):
* workers/DedicatedWorkerThread.h:
* workers/DefaultSharedWorkerRepository.cpp:
(WebCore::SharedWorkerProxy::postTaskForModeToWorkerGlobalScope):
(WebCore::SharedWorkerProxy::workerGlobalScopeClosed):
(WebCore::SharedWorkerProxy::workerGlobalScopeDestroyed):
(WebCore::SharedWorkerConnectTask::performTask):
(WebCore::SharedWorkerScriptLoader::notifyFinished):
(WebCore::DefaultSharedWorkerRepository::workerScriptLoaded):
* workers/SharedWorkerGlobalScope.cpp: Renamed from Source/WebCore/workers/SharedWorkerContext.cpp.
(WebCore::createConnectEvent):
(WebCore::SharedWorkerGlobalScope::create):
(WebCore::SharedWorkerGlobalScope::SharedWorkerGlobalScope):
(WebCore::SharedWorkerGlobalScope::~SharedWorkerGlobalScope):
(WebCore::SharedWorkerGlobalScope::interfaceName):
(WebCore::SharedWorkerGlobalScope::thread):
(WebCore::SharedWorkerGlobalScope::logExceptionToConsole):
* workers/SharedWorkerGlobalScope.h: Renamed from Source/WebCore/workers/SharedWorkerContext.h.
(WebCore::SharedWorkerGlobalScope::name):
* workers/SharedWorkerGlobalScope.idl: Renamed from Source/WebCore/workers/SharedWorkerContext.idl.
* workers/SharedWorkerThread.cpp:
(WebCore::SharedWorkerThread::createWorkerGlobalScope):
* workers/SharedWorkerThread.h:
* workers/Worker.cpp:
(WebCore::Worker::Worker):
(WebCore::Worker::postMessage):
(WebCore::Worker::terminate):
(WebCore::Worker::notifyFinished):
* workers/Worker.h:
* workers/WorkerGlobalScope.cpp: Renamed from Source/WebCore/workers/WorkerContext.cpp.
(WebCore::CloseWorkerGlobalScopeTask::create):
(WebCore::CloseWorkerGlobalScopeTask::performTask):
(WebCore::CloseWorkerGlobalScopeTask::isCleanupTask):
(WebCore::WorkerGlobalScope::WorkerGlobalScope):
(WebCore::WorkerGlobalScope::~WorkerGlobalScope):
(WebCore::WorkerGlobalScope::applyContentSecurityPolicyFromString):
(WebCore::WorkerGlobalScope::scriptExecutionContext):
(WebCore::WorkerGlobalScope::virtualURL):
(WebCore::WorkerGlobalScope::virtualCompleteURL):
(WebCore::WorkerGlobalScope::completeURL):
(WebCore::WorkerGlobalScope::userAgent):
(WebCore::WorkerGlobalScope::disableEval):
(WebCore::WorkerGlobalScope::location):
(WebCore::WorkerGlobalScope::close):
(WebCore::WorkerGlobalScope::navigator):
(WebCore::WorkerGlobalScope::hasPendingActivity):
(WebCore::WorkerGlobalScope::postTask):
(WebCore::WorkerGlobalScope::setTimeout):
(WebCore::WorkerGlobalScope::clearTimeout):
(WebCore::WorkerGlobalScope::clearInspector):
(WebCore::WorkerGlobalScope::setInterval):
(WebCore::WorkerGlobalScope::clearInterval):
(WebCore::WorkerGlobalScope::importScripts):
(WebCore::WorkerGlobalScope::errorEventTarget):
(WebCore::WorkerGlobalScope::logExceptionToConsole):
(WebCore::WorkerGlobalScope::addConsoleMessage):
(WebCore::WorkerGlobalScope::addMessage):
(WebCore::WorkerGlobalScope::addMessageToWorkerConsole):
(WebCore::WorkerGlobalScope::isContextThread):
(WebCore::WorkerGlobalScope::isJSExecutionForbidden):
(WebCore::WorkerGlobalScope::eventTargetData):
(WebCore::WorkerGlobalScope::ensureEventTargetData):
(WebCore::WorkerGlobalScope::Observer::Observer):
(WebCore::WorkerGlobalScope::Observer::~Observer):
(WebCore::WorkerGlobalScope::Observer::stopObserving):
(WebCore::WorkerGlobalScope::registerObserver):
(WebCore::WorkerGlobalScope::unregisterObserver):
(WebCore::WorkerGlobalScope::notifyObserversOfStop):
(WebCore::WorkerGlobalScope::eventQueue):
* workers/WorkerGlobalScope.h: Renamed from Source/WebCore/workers/WorkerContext.h.
(WebCore::WorkerGlobalScope::isSharedWorkerGlobalScope):
(WebCore::WorkerGlobalScope::isDedicatedWorkerGlobalScope):
(WebCore::WorkerGlobalScope::url):
(WebCore::WorkerGlobalScope::groupSettings):
(WebCore::WorkerGlobalScope::script):
(WebCore::WorkerGlobalScope::clearScript):
(WebCore::WorkerGlobalScope::thread):
(WebCore::WorkerGlobalScope::self):
(WebCore::WorkerGlobalScope::workerInspectorController):
(WebCore::WorkerGlobalScope::optionalNavigator):
(WebCore::WorkerGlobalScope::optionalLocation):
(WebCore::WorkerGlobalScope::isClosing):
* workers/WorkerGlobalScope.idl: Renamed from Source/WebCore/workers/WorkerContext.idl.
* workers/WorkerGlobalScopeProxy.h: Renamed from Source/WebCore/workers/WorkerContextProxy.h.
(WebCore::WorkerGlobalScopeProxy::~WorkerGlobalScopeProxy):
(WebCore::WorkerGlobalScopeProxy::PageInspector::~PageInspector):
(WebCore::WorkerGlobalScopeProxy::connectToInspector):
(WebCore::WorkerGlobalScopeProxy::disconnectFromInspector):
(WebCore::WorkerGlobalScopeProxy::sendMessageToInspector):
* workers/WorkerLoaderProxy.h:
* workers/WorkerMessagingProxy.cpp:
(WebCore::MessageWorkerGlobalScopeTask::create):
(WebCore::MessageWorkerGlobalScopeTask::MessageWorkerGlobalScopeTask):
(WebCore::MessageWorkerGlobalScopeTask::performTask):
(WebCore::WorkerGlobalScopeDestroyedTask::create):
(WebCore::WorkerGlobalScopeDestroyedTask::WorkerGlobalScopeDestroyedTask):
(WebCore::WorkerGlobalScopeDestroyedTask::performTask):
(WebCore::WorkerTerminateTask::performTask):
(WebCore::PostMessageToPageInspectorTask::performTask):
(WebCore::WorkerGlobalScopeProxy::create):
(WebCore::WorkerMessagingProxy::WorkerMessagingProxy):
(WebCore::WorkerMessagingProxy::~WorkerMessagingProxy):
(WebCore::WorkerMessagingProxy::startWorkerGlobalScope):
(WebCore::WorkerMessagingProxy::postMessageToWorkerGlobalScope):
(WebCore::WorkerMessagingProxy::postTaskForModeToWorkerGlobalScope):
(WebCore::WorkerMessagingProxy::workerObjectDestroyedInternal):
(WebCore::connectToWorkerGlobalScopeInspectorTask):
(WebCore::WorkerMessagingProxy::connectToInspector):
(WebCore::disconnectFromWorkerGlobalScopeInspectorTask):
(WebCore::WorkerMessagingProxy::disconnectFromInspector):
(WebCore::dispatchOnInspectorBackendTask):
(WebCore::WorkerMessagingProxy::workerGlobalScopeDestroyed):
(WebCore::WorkerMessagingProxy::workerGlobalScopeClosed):
(WebCore::WorkerMessagingProxy::workerGlobalScopeDestroyedInternal):
(WebCore::WorkerMessagingProxy::terminateWorkerGlobalScope):
* workers/WorkerMessagingProxy.h:
* workers/WorkerObjectProxy.h:
* workers/WorkerReportingProxy.h:
* workers/WorkerRunLoop.cpp:
(WebCore::WorkerRunLoop::run):
(WebCore::WorkerRunLoop::runInMode):
(WebCore::WorkerRunLoop::runCleanupTasks):
(WebCore::WorkerRunLoop::Task::performTask):
* workers/WorkerRunLoop.h:
* workers/WorkerScriptLoader.cpp:
(WebCore::WorkerScriptLoader::loadSynchronously):
* workers/WorkerThread.cpp:
(WebCore::WorkerThread::workerThread):
(WebCore::WorkerThread::runEventLoop):
(WebCore::WorkerThreadShutdownFinishTask::performTask):
(WebCore::WorkerThreadShutdownStartTask::performTask):
(WebCore::WorkerThread::stop):
* workers/WorkerThread.h:
(WebCore::WorkerThread::workerGlobalScope):
* xml/XMLHttpRequest.cpp:
(WebCore::XMLHttpRequest::usesDashboardBackwardCompatibilityMode):
(WebCore::XMLHttpRequest::responseXML):
2013-06-26 Sanjoy Pal <sanjoy.pal@samsung.com>
Avoid redundant checks for Compositing reasons in RenderLayerCompositor
https://bugs.webkit.org/show_bug.cgi?id=118114
Reviewed by Anders Carlsson.
A RenderObject can be any one of the Video, Canvas, Plugin or Iframe.
Hence removing the redundant checks.
No new tests as no functionality change.
* rendering/RenderLayerCompositor.cpp:
(WebCore::RenderLayerCompositor::reasonsForCompositing):
2013-06-26 Gwang Yoon Hwang <ryumiel@company100.net>
Coordinated Graphics: Separate CoordinatedLayerTreeHost into CoordinatedLayerTreeHost and CompositingCoordinator
https://bugs.webkit.org/show_bug.cgi?id=104360
Reviewed by Noam Rosenthal.
The CoordinatedLayerTreeHost has too many responsibilities. It
implements LayerTreeHost, GraphicsLayerClient,
CoordinatedGraphicsLayerClient, CoordinatedImageBacking::Client,
UpdateAtlas::Client, GraphicsLayerFactory and
WebCustomFilterProgramProxyClient.
This refactoring reduces the responsibilities of CoordinatedLayerTreeHost.
This patch introduces a new class called CompositingCoordinator, which
takes the responsibility of managing compositing resources in
WebProcess.
CoordinatedLayerTreeHost is responsible only for the scheduling and
IPC-specific stuff, which are relevant only for WebKit2.
No new tests, covered by existing tests.
* CMakeLists.txt:
* Target.pri:
* platform/graphics/texmap/coordinated/CompositingCoordinator.cpp: Added.
(WebCore::CompositingCoordinator::create):
(WebCore::CompositingCoordinator::~CompositingCoordinator):
(WebCore::CompositingCoordinator::CompositingCoordinator):
(WebCore::CompositingCoordinator::setRootCompositingLayer):
(WebCore::CompositingCoordinator::sizeDidChange):
(WebCore::CompositingCoordinator::flushPendingLayerChanges):
(WebCore::CompositingCoordinator::syncDisplayState):
(WebCore::CompositingCoordinator::nextAnimationServiceTime):
(WebCore::CompositingCoordinator::clearPendingStateChanges):
(WebCore::CompositingCoordinator::initializeRootCompositingLayerIfNeeded):
(WebCore::CompositingCoordinator::createRootLayer):
(WebCore::CompositingCoordinator::syncLayerState):
(WebCore::CompositingCoordinator::createImageBackingIfNeeded):
(WebCore::CompositingCoordinator::createImageBacking):
(WebCore::CompositingCoordinator::updateImageBacking):
(WebCore::CompositingCoordinator::clearImageBackingContents):
(WebCore::CompositingCoordinator::removeImageBacking):
(WebCore::CompositingCoordinator::flushPendingImageBackingChanges):
(WebCore::CompositingCoordinator::notifyAnimationStarted):
(WebCore::CompositingCoordinator::notifyFlushRequired):
(WebCore::CompositingCoordinator::paintContents):
(WebCore::CompositingCoordinator::createGraphicsLayer):
(WebCore::CompositingCoordinator::deviceScaleFactor):
(WebCore::CompositingCoordinator::pageScaleFactor):
(WebCore::CompositingCoordinator::createUpdateAtlas):
(WebCore::CompositingCoordinator::removeUpdateAtlas):
(WebCore::CompositingCoordinator::visibleContentsRect):
(WebCore::CompositingCoordinator::mainContentsLayer):
(WebCore::CompositingCoordinator::setVisibleContentsRect):
(WebCore::CompositingCoordinator::deviceOrPageScaleFactorChanged):
(WebCore::CompositingCoordinator::detachLayer):
(WebCore::CompositingCoordinator::commitScrollOffset):
(WebCore::CompositingCoordinator::renderNextFrame):
(WebCore::CompositingCoordinator::purgeBackingStores):
(WebCore::CompositingCoordinator::paintToSurface):
(WebCore::CompositingCoordinator::scheduleReleaseInactiveAtlases):
(WebCore::CompositingCoordinator::releaseInactiveAtlasesTimerFired):
* platform/graphics/texmap/coordinated/CompositingCoordinator.h: Added.
(WebCore::CompositingCoordinator::clearRootLayer):
(WebCore::CompositingCoordinator::rootLayer):
(WebCore::CompositingCoordinator::state):
2013-06-26 Kihong Kwon <kihong.kwon@samsung.com>
Vibration cannot be canceled during pattern vibration.
https://bugs.webkit.org/show_bug.cgi?id=117822
Reviewed by Gyuyoung Kim.
Vibration can not cancel during pattern vibration is working. If resting time which are
even numbers of pattern m_isVibraing will be false and cancel will thus return early.
In addition, m_timerStart needs to be stopped in the cancelVibration().
If cancelVibration() is called right after m_timerStart is fired, timerStartFired
function can be called even if vibration is already canceled because of timing issue of timer.
Test: vibration/cancelVibration-during-pattern-vibrating.html
* Modules/vibration/Vibration.cpp:
(WebCore::Vibration::vibrate):
(WebCore::Vibration::cancelVibration):
(WebCore::Vibration::suspendVibration):
(WebCore::Vibration::resumeVibration):
(WebCore::Vibration::stopVibration):
(WebCore::Vibration::timerStartFired):
(WebCore::Vibration::timerStopFired):
* Modules/vibration/Vibration.h:
2013-06-26 Anders Carlsson <andersca@apple.com>
Deprecate StringImpl::charactersWithNullTermination
https://bugs.webkit.org/show_bug.cgi?id=118108
Reviewed by Beth Dakin.
Rename calls to charactersWithNullTermination to deprecatedCharactersWithNullTermination.
* html/canvas/WebGLProgram.cpp:
(WebCore::WebGLProgram::cacheActiveAttribLocations):
* platform/graphics/win/FontCacheWin.cpp:
(WebCore::getLinkedFonts):
* platform/graphics/win/FontCustomPlatformData.cpp:
(WebCore::FontCustomPlatformData::fontPlatformData):
* platform/graphics/win/FontCustomPlatformDataCairo.cpp:
(WebCore::FontCustomPlatformData::fontPlatformData):
* platform/graphics/win/IconWin.cpp:
(WebCore::Icon::createIconForFiles):
* platform/graphics/win/MediaPlayerPrivateQuickTimeVisualContext.cpp:
(WebCore::MediaPlayerPrivateQuickTimeVisualContext::setUpCookiesForQuickTime):
* platform/graphics/wince/FontPlatformData.cpp:
(WebCore::FontPlatformData::FontPlatformData):
* platform/network/curl/CurlDownload.cpp:
(CurlDownload::moveFileToDestination):
* platform/network/win/CookieJarWin.cpp:
(WebCore::setCookiesFromDOM):
(WebCore::cookiesForDOM):
* platform/network/win/DownloadBundleWin.cpp:
(WebCore::DownloadBundle::appendResumeData):
(WebCore::DownloadBundle::extractResumeData):
* platform/network/win/ResourceHandleWin.cpp:
(WebCore::createInternetHandle):
(WebCore::ResourceHandle::start):
(WebCore::ResourceHandle::fileLoadTimer):
* platform/sql/SQLiteFileSystem.cpp:
(WebCore::SQLiteFileSystem::openDatabase):
* platform/sql/SQLiteStatement.cpp:
(WebCore::SQLiteStatement::prepare):
* platform/text/win/LocaleWin.cpp:
(WebCore::LCIDFromLocaleInternal):
* platform/text/win/TextCodecWin.cpp:
(WebCore::TextCodecWin::enumerateSupportedEncodings):
* platform/win/ClipboardUtilitiesWin.cpp:
(WebCore::getWebLocData):
(WebCore::createGlobalData):
(WebCore::setFileDescriptorData):
(WebCore::getURL):
(WebCore::setCFData):
* platform/win/ContextMenuWin.cpp:
(WebCore::ContextMenu::createPlatformContextMenuFromItems):
* platform/win/DragImageWin.cpp:
(WebCore::createDragImageIconForCachedImageFilename):
* platform/win/FileSystemWin.cpp:
(WebCore::getFindData):
(WebCore::deleteFile):
(WebCore::deleteEmptyDirectory):
(WebCore::pathByAppendingComponent):
(WebCore::makeAllDirectories):
(WebCore::pathGetFileName):
(WebCore::openTemporaryFile):
(WebCore::openFile):
* platform/win/MIMETypeRegistryWin.cpp:
(WebCore::mimeTypeForExtension):
(WebCore::MIMETypeRegistry::getPreferredExtensionForMIMEType):
* platform/win/PasteboardWin.cpp:
(WebCore::createGlobalImageFileDescriptor):
(WebCore::createGlobalHDropContent):
* platform/win/PathWalker.cpp:
(WebCore::PathWalker::PathWalker):
* platform/win/SSLKeyGeneratorWin.cpp:
(WebCore::WebCore::signedPublicKeyAndChallengeString):
* platform/win/SharedBufferWin.cpp:
(WebCore::SharedBuffer::createWithContentsOfFile):
* platform/wince/FileSystemWinCE.cpp:
(WebCore::getFileInfo):
(WebCore::fileExists):
(WebCore::deleteFile):
(WebCore::deleteEmptyDirectory):
(WebCore::makeAllDirectories):
(WebCore::openTemporaryFile):
(WebCore::openFile):
* plugins/win/PluginDatabaseWin.cpp:
(WebCore::PluginDatabase::getPluginPathsInDirectories):
(WebCore::addMozillaPluginDirectories):
(WebCore::addAdobeAcrobatPluginDirectory):
(WebCore::addJavaPluginDirectory):
* plugins/win/PluginPackageWin.cpp:
(WebCore::getVersionInfo):
(WebCore::PluginPackage::fetchInfo):
(WebCore::PluginPackage::load):
* plugins/win/PluginViewWin.cpp:
(WebCore::PluginView::handlePostReadFile):
2013-06-26 Roger Fong <roger_fong@apple.com>
Add an accessibility delegate interface to AppleWin port.
https://bugs.webkit.org/show_bug.cgi?id=118094.
Reviewed by Brent Fulgham.
* accessibility/win/AXObjectCacheWin.cpp: We call the page client's AXStartFrameLoad and AXFinishFrameLoad methods here, which will in turn call the AccessibilityDelegate's callbacks.
(WebCore::AXObjectCache::frameLoadingEventPlatformNotification):
* loader/EmptyClients.h:
(WebCore::EmptyChromeClient::AXStartFrameLoad):
(WebCore::EmptyChromeClient::AXFinishFrameLoad):
* page/ChromeClient.h:
2013-06-26 Jer Noble <jer.noble@apple.com>
Potential use-after-free after neutering AudioBuffer's underlying ArrayBuffer.
https://bugs.webkit.org/show_bug.cgi?id=118040
Reviewed by Filip Pizlo.
Test: webaudio/audiobuffer-neuter.html
When creating an AudioBuffer's backing ArrayBufferView objects, mark them as 'unneuterable',
meaning the underlying data will be copied in a neuter scenario rather than transferred. This
means the underlying assumtions of the webaudio code can continue to assume that the memory
areas owned by the ArrayBufferView will be present until the AudioBuffer is itself destroyed.
In order to not expose the 'unneuterable' behavior to JavaScript, return a fresh Float32Array
wrapper around the ArrayBuffer object, rather than our own.
* Modules/webaudio/AudioBuffer.cpp:
(WebCore::AudioBuffer::AudioBuffer): Mark the newly created channels as not neuterable.
(WebCore::AudioBuffer::getChannelData): Return a new Float32Array object rather than a pointer to our own.
* Modules/webaudio/AudioBuffer.h:
2013-06-26 Brent Fulgham <bfulgham@apple.com>
[Windows] Unreviewed build correction after r152035.
* page/CaptionUserPreferencesMediaAF.cpp: Don't attempt to include CoreText.h
if we do not have MediaAccessibility Framework.
2013-06-26 Brent Fulgham <bfulgham@apple.com>
[Windows] Enable CaptionUserPreferencesMediaAF on Windows.
https://bugs.webkit.org/show_bug.cgi?id=118076
Reviewed by Eric Carlson.
* WebCore.vcxproj/WebCore.vcxproj: Enable building the CaptionUserPreferencesMediaAF source file.
* page/CaptionUserPreferencesMediaAF.cpp: Add soft-link commands for CoreText symbols needed in
the implementation for Windows.
* platform/LocalizedStrings.cpp: Enable Text Track-related strings on Windows.
* platform/LocalizedStrings.h: Ditto.
2013-06-26 Ryosuke Niwa <rniwa@webkit.org>
Speed up SVG sprites by only painting the source rect in SVGImage::draw
https://bugs.webkit.org/show_bug.cgi?id=118070
Reviewed by Tim Horton.
Merge https://chromium.googlesource.com/chromium/blink/+/d359ab67fdd76a877d666dca91c311505dd27bbf.
* svg/graphics/SVGImage.cpp:
(WebCore::SVGImage::draw):
2013-06-26 David Kilzer <ddkilzer@apple.com>
BUILD FIX (r151981): Include HTMLAudioElement.h for ENABLE(PLUGIN_PROXY_FOR_VIDEO)
* css/StyleResolver.cpp:
- Include HTMLAudioElement.h.
- Sort headers.
* rendering/RenderLayerCompositor.cpp:
- Include HTMLAudioElement.h.
2013-06-26 Yuki Sekiguchi <yuki.sekiguchi@access-company.com>
getComputedStyle().width wrong after text changed
https://bugs.webkit.org/show_bug.cgi?id=106611
Reviewed by Dean Jackson.
When a new RenderText is created, NodeRenderingContext::createRendererForTextIfNeeded() sets a style to the RenderText.
If a font in the new style needs transcode (e.g. Meiryo), styleDidChange() calls transformText().
It sets a preferredLogicalWidthsDirty flag.
After that, createRendererForTextIfNeeded() inserts the RenderText to its parent renderer.
However, RenderObjectChildList::insertChildNode() doesn't set a preferredLogicalWidthsDirty flag of owner
because a preferredLogicalWidthsDirty flag of the RenderText is already true.
Inserting new child should always sets a preferredLogicalWidthsDirty flag.
Therefore, this patch called setPreferredLogicalWidthsDirty() of owner.
Test: fast/dynamic/empty-absolute-innerhtml-transcoding-text.html
* rendering/RenderObjectChildList.cpp:
(WebCore::RenderObjectChildList::insertChildNode):
2013-06-26 Brent Fulgham <bfulgham@apple.com>
Prepare CaptionUserPreferencesMac for use on Windows port.
https://bugs.webkit.org/show_bug.cgi?id=118069
Reviewed by Eric Carlson.
* WebCore.vcxproj/WebCore.vcxproj: Add new files.
* WebCore.vcxproj/WebCore.vcxproj.filters: Ditto.
* WebCore.xcodeproj/project.pbxproj: Update for new file name.
* page/CaptionUserPreferencesMac.h: Removed.
* page/CaptionUserPreferencesMac.mm: Removed.
* page/CaptionUserPreferencesMediaAF.cpp: Copied from page/CaptionUserPreferencesMac.mm.
* page/CaptionUserPreferencesMediaAF.h: Copied from page/CaptionUserPreferencesMac.h.
* page/PageGroup.cpp:
(WebCore::PageGroup::captionPreferences): Updated to new class name.
2013-06-26 Ryosuke Niwa <rniwa@webkit.org>
Remove unneccesary cast to Node* in MediaControlTextTrackContainerElement::updateDisplay
https://bugs.webkit.org/show_bug.cgi?id=118020
Reviewed by Christophe Dumez.
Merge https://chromium.googlesource.com/chromium/blink/+/2de89f61bb316f5e166b45ce71bb2b293dbf575d
TextTrackCue is a Node, there's no reason to static_cast from it to Node*.
* html/shadow/MediaControlElements.cpp:
(WebCore::MediaControlTextTrackContainerElement::updateDisplay):
2013-06-26 Ryosuke Niwa <rniwa@webkit.org>
RenderBox::hasRenderOverflow should return bool instead of RenderOverflow*
https://bugs.webkit.org/show_bug.cgi?id=118041
Reviewed by Christophe Dumez.
Merge https://chromium.googlesource.com/chromium/blink/+/1683b58c855b745463acbf18086e32279db5000f.
* rendering/RenderBox.h:
(WebCore::RenderBox::hasRenderOverflow):
(WebCore::RenderBox::hasHorizontalLayoutOverflow):
(WebCore::RenderBox::hasVerticalLayoutOverflow):
2013-06-26 Ryosuke Niwa <rniwa@webkit.org>
Remove unneeded static_casts from SelectorChecker
https://bugs.webkit.org/show_bug.cgi?id=118018
Reviewed by Christophe Dumez.
Merge https://chromium.googlesource.com/chromium/blink/+/adc5b8bec2d8c6a857b3c930ca7484f76cad1367
SelectorChecker::checkOne casts to StyledElement just to call classNames, but
this method is on Element so there's no reason for this. The cast here also
looks pretty suspect. The method also casts to HTMLFrameElementBase to call
containsFullScreenElement which is also on Element so the cast can be removed.
* css/SelectorChecker.cpp:
(WebCore::SelectorChecker::checkOne):
2013-06-26 Ryosuke Niwa <rniwa@webkit.org>
Set Attr.ownerDocument in Element#setAttributeNode()
https://bugs.webkit.org/show_bug.cgi?id=118031
Reviewed by Andreas Kling.
Merge https://chromium.googlesource.com/chromium/blink/+/fa739fe5369f55bbdcb3fa123cb64df36b8ae414.
Adopt Attr node as needed.
Test: fast/dom/Attr/set-attribute-node-from-iframe.html
* dom/Element.cpp:
(WebCore::Element::setAttributeNode):
2013-06-25 David Hyatt <hyatt@apple.com>
Flex boxes (both old and new) don't handle max-height images correctly.
https://bugs.webkit.org/show_bug.cgi?id=118000
Reviewed by Beth Dakin.
Tests: css3/flexbox/image-percent-max-height.html
fast/flexbox/image-percent-max-height.html
* rendering/RenderBlock.cpp:
(WebCore::RenderBlock::dirtyForLayoutFromPercentageHeightDescendants):
(WebCore::RenderBlock::layoutBlockChildren):
Pull the percentage height descendant code that dirties those descendants
out of layoutBlockChildren and into a protected helper function,
dirtyForLayoutFromPercentageHeightDescendants, that can be called from the
flex box code.
Also patch dirtyForLayoutFromPercentageHeightDescendants so that it will dirty
preferred logical widths when a child has an aspect ratio, since we know that
percentage height changes will potentially affect the preferred widths of the image and
its ancestor blocks.
* rendering/RenderBlock.h:
Declaration of the new dirtyForLayoutFromPercentageHeightDescendants function.
* rendering/RenderDeprecatedFlexibleBox.cpp:
(WebCore::RenderDeprecatedFlexibleBox::layoutBlock):
Make the old flex box code call dirtyForLayoutFromPercentageHeightDescendants so
that everything is dirtied properly.
(WebCore::RenderDeprecatedFlexibleBox::layoutHorizontalBox):
(WebCore::RenderDeprecatedFlexibleBox::layoutVerticalBox):
Remove the isReplaced()/percentage height/width dirtying now that the old flexible
box is using the same dirtying mechanism as RenderBlock.
* rendering/RenderFlexibleBox.cpp:
(WebCore::RenderFlexibleBox::layoutBlock):
Patch the new flexible box code to use the dirtying mechanism that RenderBlock
uses for percentage heights/widths on replaced descendants.
* rendering/RenderObject.h:
(WebCore::RenderObject::hasAspectRatio):
Pulled the static helper function from RenderReplaced into a full-blown method
on RenderObject, so that dirtyForLayoutFromPercentageHeightDescendants can call
it to check if an object has an aspect ratio.
* rendering/RenderReplaced.cpp:
(WebCore::RenderReplaced::computeAspectRatioInformationForRenderBox):
(WebCore::RenderReplaced::computeIntrinsicRatioInformation):
Patch the call sites of the static helper function to use hasAspectRatio instead
and get rid of the static in the cpp file.
2013-06-26 Kangil Han <kangil.han@samsung.com>
Adopt is/toHTMLAreaElement for code cleanup
https://bugs.webkit.org/show_bug.cgi?id=117980
Reviewed by Antonio Gomes.
To enhance readibility, this patch adopts is/toHTMLAreaElement.
This also helps out to reduce duplicated use of static_cast.
* accessibility/AXObjectCache.cpp:
(WebCore::AXObjectCache::focusedUIElementForPage):
* accessibility/AccessibilityRenderObject.cpp:
(WebCore::AccessibilityRenderObject::getDocumentLinks):
(WebCore::AccessibilityRenderObject::accessibilityHitTest):
(WebCore::AccessibilityRenderObject::addImageMapChildren):
* html/HTMLAreaElement.h:
(WebCore::isHTMLAreaElement):
(WebCore::toHTMLAreaElement):
* html/HTMLMapElement.cpp:
(WebCore::HTMLMapElement::mapMouseEvent):
* page/FocusController.cpp:
(WebCore::FocusController::advanceFocusDirectionally):
* page/SpatialNavigation.cpp:
(WebCore::FocusCandidate::FocusCandidate):
(WebCore::areElementsOnSameLine):
* rendering/HitTestResult.cpp:
(WebCore::HitTestResult::absoluteLinkURL):
* rendering/RenderImage.cpp:
(WebCore::RenderImage::paintAreaElementFocusRing):
2013-06-26 Brady Eidson <beidson@apple.com>
[Mac] Document URL is not updated by HSTS
<rdar://problem/14241270> and https://bugs.webkit.org/show_bug.cgi?id=118003
Patch started by Alexey Proskuryakov, finished by Brady Eidson.
Reviewed by Brady Eidson and then Alexey Proskuryakov.
Synthesize a response and properly handle willSendRequest when the URL changes in a way that's typical for HSTS.
* platform/network/mac/WebCoreURLResponse:
* platform/network/mac/WebCoreURLResponse:
(WebCore::synthesizeRedirectResponseIfNecessary): Synthesize a redirect response and when the URL changes in a way that's
typical for HSTS connections.
* platform/network/mac/WebCoreResourceHandleAsDelegate.mm:
(-[WebCoreResourceHandleAsDelegate connection:willSendRequest:redirectResponse:]): Call synthesizeRedirectResponseIfNecessary.
* platform/network/mac/WebCoreResourceHandleAsOperationQueueDelegate.mm:
(-[WebCoreResourceHandleAsOperationQueueDelegate connection:willSendRequest:redirectResponse:]): Ditto.
2013-06-26 Andrei Bucur <abucur@adobe.com>
[CSS Regions] fast/regions/seamless-iframe-flowed-into-regions.html asserts
https://bugs.webkit.org/show_bug.cgi?id=117797
Reviewed by Antti Koivisto.
The seamless iframes inherit the current RenderFlowThread during layout. This means getting
the LayoutState object from the flow thread RenderView object is not always correct.
For RenderObjects inside the seamless iframes the view()/LayoutState object is different than the one
of the RenderFlowThread. The patch changes the code to use the correct LayoutState object during
layout when pushing a new state.
Tests: covered by fast/regions/seamless-iframe-flowed-into-regions.html
* rendering/RenderFlowThread.cpp:
(WebCore::RenderFlowThread::currentActiveRenderBox):
(WebCore::RenderFlowThread::pushFlowThreadLayoutState):
(WebCore::RenderFlowThread::popFlowThreadLayoutState):
2013-06-26 Ryosuke Niwa <rniwa@webkit.org>
Remove many static_casts to Element types from AccessibilityNodeObject
https://bugs.webkit.org/show_bug.cgi?id=118021
Reviewed by Chris Fleizach.
Merge https://chromium.googlesource.com/chromium/blink/+/ecd837f94996a20fdb8798e24f26cf6edea2a423.
* accessibility/AccessibilityNodeObject.cpp:
(WebCore::AccessibilityNodeObject::isReadOnly):
(WebCore::AccessibilityNodeObject::alternativeTextForWebArea):
(WebCore::AccessibilityNodeObject::text):
2013-06-26 Christophe Dumez <ch.dumez@sisa.samsung.com>
Stop inheriting SVGExternalResourcesRequired, SVGFitToViewBox and SVGZoomAndPan
https://bugs.webkit.org/show_bug.cgi?id=118029
Reviewed by Kentaro Hara.
Stop inheriting SVGExternalResourcesRequired, SVGFitToViewBox and SVGZoomAndPan
in the IDL and use implements statements instead.
This is one step towards getting rid of multiple inheritance in the SVG code
and matching the latest specification:
http://www.w3.org/TR/SVG2/types.html#BasicDOMInterfaces
There is no webexposed behavior change.
No new tests, no behavior change.
* svg/SVGAnimationElement.idl:
* svg/SVGCircleElement.idl:
* svg/SVGClipPathElement.idl:
* svg/SVGCursorElement.idl:
* svg/SVGDefsElement.idl:
* svg/SVGEllipseElement.idl:
* svg/SVGFEImageElement.idl:
* svg/SVGFilterElement.idl:
* svg/SVGForeignObjectElement.idl:
* svg/SVGGElement.idl:
* svg/SVGGradientElement.idl:
* svg/SVGImageElement.idl:
* svg/SVGLineElement.idl:
* svg/SVGMPathElement.idl:
* svg/SVGMarkerElement.idl:
* svg/SVGMaskElement.idl:
* svg/SVGPathElement.idl:
* svg/SVGPatternElement.idl:
* svg/SVGPolygonElement.idl:
* svg/SVGPolylineElement.idl:
* svg/SVGRectElement.idl:
* svg/SVGSVGElement.idl:
* svg/SVGScriptElement.idl:
* svg/SVGSwitchElement.idl:
* svg/SVGSymbolElement.idl:
* svg/SVGTextContentElement.idl:
* svg/SVGUseElement.idl:
* svg/SVGViewSpec.idl:
2013-06-26 Ryosuke Niwa <rniwa@webkit.org>
Use-after-free in RadioInputType::handleKeydownEvent
https://bugs.webkit.org/show_bug.cgi?id=118035
Reviewed by Kent Tamura.
Use RefPtr for inputElement since setFocusedNode could blow it away.
* html/RadioInputType.cpp:
(WebCore::RadioInputType::handleKeydownEvent):
2013-06-26 Christophe Dumez <ch.dumez@sisa.samsung.com>
Get rid of multiple inheritence for SVGViewElement interface
https://bugs.webkit.org/show_bug.cgi?id=118014
Reviewed by Kentaro Hara.
Web IDL no longer supports multiple inheritence. As per the latest
specification SVGViewElement should only inherit from SVGElement.
'implements' statements are used for the rest. This patch refactors
the IDL files to match the latest specification:
http://www.w3.org/TR/SVG2/linking.html#InterfaceSVGViewElement
Note that there is a WebExposed change as SVGZoomAndPan used to be
exposed on the Window and it is not anymore. SVGZoomAndPan merely
supplements SVGViewElement and should not be exposed to JavaScript
according to the latest specification.
No new tests, covered by existing tests.
* CMakeLists.txt:
* DerivedSources.pri:
* GNUmakefile.list.am:
* svg/SVGExternalResourcesRequired.idl:
* svg/SVGFitToViewBox.idl:
* svg/SVGViewElement.idl:
* svg/SVGZoomAndPan.idl:
2013-06-26 Ryosuke Niwa <rniwa@webkit.org>
Mark SVG(Circle|Path|Rect)Element::createRenderer() with OVERRIDE
https://bugs.webkit.org/show_bug.cgi?id=118037
Reviewed by Philip Rogers.
Merge https://chromium.googlesource.com/chromium/blink/+/e8196920e769ab0786b2b4b21d3fdc2d87afef0d.
* svg/SVGCircleElement.h:
* svg/SVGPathElement.h:
* svg/SVGRectElement.h:
2013-06-26 Kangil Han <kangil.han@samsung.com>
Adopt is/toHTMLAudioElement for code cleanup
https://bugs.webkit.org/show_bug.cgi?id=117985
Reviewed by Jer Noble.
To enhance readibility, this patch adopts is/toHTMLAudioElement.
This also helps out to reduce duplicated use of static_cast.
* bindings/js/JSNodeCustom.cpp:
(WebCore::isReachableFromDOM):
* css/CSSDefaultStyleSheets.cpp:
(WebCore::CSSDefaultStyleSheets::ensureDefaultStyleSheetsForElement):
* css/StyleResolver.cpp:
(WebCore::StyleResolver::canShareStyleWithElement):
* html/HTMLAudioElement.h:
(WebCore::isHTMLAudioElement):
(WebCore::toHTMLAudioElement):
* loader/SubframeLoader.cpp:
(WebCore::SubframeLoader::loadMediaPlayerProxyPlugin):
* rendering/HitTestResult.cpp:
(WebCore::HitTestResult::mediaElement):
* rendering/RenderLayerCompositor.cpp:
(WebCore::RenderLayerCompositor::requiresCompositingForVideo):
* rendering/RenderThemeMac.mm:
(WebCore::RenderThemeMac::paintMediaMuteButton):
(WebCore::RenderThemeMac::paintMediaPlayButton):
2013-06-26 Ryosuke Niwa <rniwa@webkit.org>
Refactoring: Fold Document::focusedNodeRemoved into Document::removeFocusedNodeOfSubtree
https://bugs.webkit.org/show_bug.cgi?id=118036
Reviewed by Kent Tamura.
Merge https://chromium.googlesource.com/chromium/blink/+/3391beabe75548cc638a6c88982f913621a4410f.
* dom/Document.cpp:
(WebCore::Document::removeFocusedNodeOfSubtree):
* dom/Document.h:
2013-06-25 Ryosuke Niwa <rniwa@webkit.org>
JSString should remember AtomicString
https://bugs.webkit.org/show_bug.cgi?id=117386
Reviewed by Geoffrey Garen.
Added "Atomic" attribute as a WebKit extension to WebIDL, and deployed it in Element.idl and Node.idl so that
the binding code can use newly added JSValue::toAtomic to update JSString's m_value.
* bindings/js/JSDOMBinding.cpp:
(WebCore::valueToAtomicStringWithNullCheck): Added.
(WebCore::valueToAtomicStringWithUndefinedOrNullCheck): Added.
* bindings/js/JSDOMBinding.h:
* bindings/scripts/CodeGeneratorJS.pm:
(GetNativeTypeFromSignature): Return const AtomicString& when either Atomic attribute is specified or the type is
Reflect. Note that setAttribute and getAttribute both use AtomicString for all arguments.
(JSValueToNative): Use AtomicString equivalents when possible when converting DOMString to a WebCore object.
* bindings/scripts/IDLAttributes.txt: Added "Atomic" attribute.
* bindings/scripts/test/JS/JSTestObj.cpp: Baselined test cases.
(WebCore::setJSTestObjReflectedStringAttr):
(WebCore::setJSTestObjReflectedURLAttr):
(WebCore::setJSTestObjReflectedCustomURLAttr):
* dom/Document.idl:
* dom/Element.idl:
* dom/Node.idl:
2013-06-25 Kangil Han <kangil.han@samsung.com>
Adopt is/toHTMLAnchorElement for code cleanup
https://bugs.webkit.org/show_bug.cgi?id=117973
Reviewed by Andreas Kling.
To enhance readibility, this patch adopts is/toHTMLAnchorElement.
This also helps out to reduce duplicated use of static_cast.
* accessibility/AccessibilityNodeObject.cpp:
(WebCore::AccessibilityNodeObject::anchorElement):
* accessibility/AccessibilityRenderObject.cpp:
(WebCore::AccessibilityRenderObject::anchorElement):
(WebCore::AccessibilityRenderObject::internalLinkElement):
(WebCore::AccessibilityRenderObject::url):
(WebCore::AccessibilityRenderObject::stringValueForMSAA):
(WebCore::AccessibilityRenderObject::isLinked):
* css/CSSDefaultStyleSheets.cpp:
(WebCore::elementCanUseSimpleDefaultStyle):
* css/SelectorChecker.cpp:
(WebCore::SelectorChecker::checkOne):
* dom/Document.cpp:
(WebCore::Document::updateBaseURL):
* dom/TreeScope.cpp:
(WebCore::TreeScope::findAnchor):
* dom/VisitedLinkState.cpp:
(WebCore::linkHashForElement):
(WebCore::VisitedLinkState::determineLinkStateSlowCase):
* html/HTMLAnchorElement.h:
(WebCore::isHTMLAnchorElement):
(WebCore::toHTMLAnchorElement):
* page/DragController.cpp:
(WebCore::DragController::draggableElement):
* rendering/HitTestResult.cpp:
(WebCore::HitTestResult::absoluteLinkURL):
(WebCore::HitTestResult::isLiveLink):
* rendering/RenderObject.cpp:
(WebCore::RenderObject::getTextDecorationColors):
2013-06-25 Dean Jackson <dino@apple.com>
Don't snapshot plug-ins that come from the same host as the page
https://bugs.webkit.org/show_bug.cgi?id=117969
<rdar://problem/12885400>
Reviewed by Tim Horton.
If a page is serving plug-in content directly, then that content
is typically very important to the page. For example, embedding
a video or audio player. In this case, don't snapshot the plug-ins.
* html/HTMLPlugInImageElement.cpp:
(WebCore::HTMLPlugInImageElement::subframeLoaderWillCreatePlugIn): Add a test
that compares the plug-in's URL against the main page's URL and don't snapshot
if they are the same.
2013-06-25 Alex Christensen <achristensen@apple.com>
Added PLATFORM(WIN) to many places where it was missing for compiling WebGL for Windows.
https://bugs.webkit.org/show_bug.cgi?id=117955
Reviewed by Brent Fulgham.
* platform/graphics/GraphicsContext3D.cpp:
* platform/graphics/OpenGLShims.cpp:
* platform/graphics/cairo/GraphicsContext3DCairo.cpp: Include new location of ShaderLang.h on Windows as of r151854.
* platform/graphics/opengl/Extensions3DOpenGL.cpp:
(WebCore::Extensions3DOpenGL::createVertexArrayOES):
(WebCore::Extensions3DOpenGL::deleteVertexArrayOES):
(WebCore::Extensions3DOpenGL::isVertexArrayOES):
(WebCore::Extensions3DOpenGL::bindVertexArrayOES):
* platform/graphics/opengl/Extensions3DOpenGL.h:
* platform/graphics/opengl/Extensions3DOpenGLCommon.cpp:
* platform/graphics/opengl/GraphicsContext3DOpenGL.cpp:
* platform/graphics/opengl/GraphicsContext3DOpenGLCommon.cpp: Added PLATFORM(WIN) when necessary to each file.
2013-06-25 Bruno de Oliveira Abinader <brunoabinader@gmail.com>
Fixes a typo in renderTextDecorationFlagsToCSSValue
https://bugs.webkit.org/show_bug.cgi?id=117989
Reviewed by Gyuyoung Kim.
Return value should be PassRefPtr instead of RefPtr.
Backported from Blink:
https://src.chromium.org/viewvc/blink?view=rev&revision=152994
No new tests, no behavior change.
* css/CSSComputedStyleDeclaration.cpp:
(WebCore::renderTextDecorationFlagsToCSSValue):
2013-06-25 Santosh Mahto <santosh.ma@samsung.com>
"application/x-mimearchive" should be included in finding remoteWebArchive while document loading
https://bugs.webkit.org/show_bug.cgi?id=117734
Reviewed by Alexey Proskuryakov.
"application/x-mimearchive" is also used while checking for
RemoteArchive.
* loader/DocumentLoader.cpp:
(WebCore::DocumentLoader::continueAfterContentPolicy):
2013-06-25 Allan Sandfeld Jensen <allan.jensen@digia.com>
HTMLMediaElement should inherit from MediaPlayerClient privately
https://bugs.webkit.org/show_bug.cgi?id=117874
Reviewed by Andreas Kling.
Fixing FIXME: HTMLMediaElement was stuck with public inheritance from
MediaPlayerClient due to the Chromium and Qt port.
The Qt port is changed to not cast from MediaPlayerClient to HTMLMediaElement.
* html/HTMLMediaElement.h:
* platform/graphics/qt/MediaPlayerPrivateQt.cpp:
(WebCore::MediaPlayerPrivateQt::commitLoad):
2013-06-25 Csaba Osztrogonác <ossy@webkit.org>
Checking if frame is complete and access duration doesn't need a decode
https://bugs.webkit.org/show_bug.cgi?id=116041
Reviewed by Allan Sandfeld Jensen.
This change is to avoid image decoding for these two operations:
1. frameIsCompleteAtIndex
2. frameDurationAtIndex
These two operations are moved to ImageDecoder interface and are now const
to prevent future regression.
We are now able to check if a frame is complete by parsing the entire GIF file
without decoding. This also provides information like frame duration such that
controller the animation doesn't require any decoding.
Based on the Blink patch by Hin-Chung Lam <hclam@google.com>
https://src.chromium.org/viewvc/blink?revision=149883&view=revision
* platform/graphics/BitmapImage.cpp:
(WebCore::BitmapImage::frameIsCompleteAtIndex):
(WebCore::BitmapImage::frameDurationAtIndex):
* platform/graphics/ImageSource.cpp:
(WebCore::ImageSource::frameDurationAtIndex):
(WebCore::ImageSource::frameHasAlphaAtIndex):
(WebCore::ImageSource::frameIsCompleteAtIndex):
* platform/graphics/ImageSource.h:
* platform/image-decoders/ImageDecoder.cpp:
(WebCore::ImageDecoder::frameHasAlphaAtIndex):
(WebCore::ImageDecoder::frameIsCompleteAtIndex):
* platform/image-decoders/ImageDecoder.h:
(WebCore::ImageDecoder::frameDurationAtIndex):
* platform/image-decoders/gif/GIFImageDecoder.cpp:
(WebCore::GIFImageDecoder::frameIsCompleteAtIndex):
(WebCore::GIFImageDecoder::frameDurationAtIndex):
(WebCore::GIFImageDecoder::haveDecodedRow):
(WebCore::GIFImageDecoder::gifComplete):
(WebCore::GIFImageDecoder::decode):
(WebCore::GIFImageDecoder::initFrameBuffer):
* platform/image-decoders/gif/GIFImageDecoder.h:
* platform/image-decoders/gif/GIFImageReader.h:
(GIFImageReader::frameContext):
(GIFImageReader::parseCompleted):
2013-06-24 Christophe Dumez <ch.dumez@sisa.samsung.com>
Update AbstractWorker, Worker and SharedWorker to match the specification
https://bugs.webkit.org/show_bug.cgi?id=117930
Reviewed by Kentaro Hara.
Update AbstractWorker, Worker and SharedWorker to match the spec:
http://www.whatwg.org/specs/web-apps/current-work/multipage/workers.html#abstractworker
http://www.whatwg.org/specs/web-apps/current-work/multipage/workers.html#worker
http://www.whatwg.org/specs/web-apps/current-work/multipage/workers.html#sharedworker
Worker and SharedWorker no longer inherit from AbstractWorker. Web IDL 'implements'
statements are used instead. Worker and SharedWorker can now inherit from EventTarget
as per the specification.
No new tests, no behavior change.
* workers/AbstractWorker.idl:
* workers/SharedWorker.idl:
* workers/Worker.idl:
2013-06-24 Andy Estes <aestes@apple.com>
DerivedSources.make should optionally include SupplementalDependencies.dep
https://bugs.webkit.org/show_bug.cgi?id=117972
Reviewed by Dan Bernstein.
make(1) logs a non-fatal error to stderr when an included Makefile can't
be found. This error is non-fatal because after make(1) reads in all the
Makefiles it runs the recipe for any rule that specifies one of the
Makefiles as a target. Only if the Makefile is still missing after
applying these rules does the error become fatal.
Since SupplementalDependencies.dep is generated by running a script on
SupplementalDependencies.txt, the file won't exist during clean builds.
Each time make(1) logs this non-fatal error, Xcode sees it and itself
logs a non-fatal error. This is annoying.
We don't care about this error. We only care if the recipe to generate
SupplementalDependencies.dep fails, which is already a fatal error.
Suppress the error by including SupplementalDependencies.dep optionally.
* DerivedSources.make:
2013-06-24 Kangil Han <kangil.han@samsung.com>
Add support for document.currentScript
https://bugs.webkit.org/show_bug.cgi?id=104221
Reviewed by Ryosuke Niwa.
Merge http://src.chromium.org/viewvc/blink?view=revision&revision=152230
document.currentScript reflects the script that is currently being executed.
Merge http://src.chromium.org/viewvc/blink?view=revision&revision=152237
Following up patch for code clean-up.
Tests: fast/dom/Document/document-current-script-async.html
fast/dom/Document/document-current-script.html
* dom/Document.cpp:
(WebCore::Document::pushCurrentScript):
(WebCore::Document::popCurrentScript):
* dom/Document.h:
(WebCore::Document::currentScript):
* dom/Document.idl:
* dom/ScriptElement.cpp:
(WebCore::isHTMLScriptElement):
(WebCore::isSVGScriptElement):
(WebCore::ScriptElement::executeScript):
(WebCore::toScriptElementIfPossible):
* html/HTMLScriptElement.h:
(WebCore::toHTMLScriptElement):
* svg/SVGScriptElement.cpp:
* svg/SVGScriptElement.h:
(WebCore::toSVGScriptElement):
2013-06-24 Kangil Han <kangil.han@samsung.com>
Adopt is/toHTMLFormElement for code cleanup
https://bugs.webkit.org/show_bug.cgi?id=117937
Reviewed by Andreas Kling.
This refers to http://src.chromium.org/viewvc/blink?view=revision&revision=152859
To enhance readibility, this patch adopts is/toHTMLFormElement.
This also helps out to reduce duplicated use of static_cast.
* accessibility/AccessibilityRenderObject.cpp:
(WebCore::AccessibilityRenderObject::determineAccessibilityRole):
* bindings/js/JSDOMFormDataCustom.cpp:
(WebCore::toHTMLFormElement):
* bindings/js/JSHTMLFormElementCustom.cpp:
(WebCore::JSHTMLFormElement::nameGetter):
* editing/FrameSelection.cpp:
(WebCore::scanForForm):
(WebCore::FrameSelection::currentForm):
* editing/InsertParagraphSeparatorCommand.cpp:
(WebCore::InsertParagraphSeparatorCommand::doApply):
* html/FormAssociatedElement.cpp:
(WebCore::FormAssociatedElement::findAssociatedForm):
* html/HTMLElement.cpp:
(WebCore::HTMLElement::findFormAncestor):
* html/HTMLFormControlsCollection.cpp:
(WebCore::HTMLFormControlsCollection::HTMLFormControlsCollection):
(WebCore::HTMLFormControlsCollection::formControlElements):
(WebCore::HTMLFormControlsCollection::formImageElements):
(WebCore::HTMLFormControlsCollection::updateNameCache):
* html/HTMLFormElement.h:
(WebCore::isHTMLFormElement):
(WebCore::toHTMLFormElement):
* html/HTMLImageElement.cpp:
(WebCore::HTMLImageElement::insertedInto):
* html/HTMLNameCollection.cpp:
(WebCore::WindowNameCollection::nodeMatchesIfNameAttributeMatch):
(WebCore::DocumentNameCollection::nodeMatchesIfNameAttributeMatch):
(WebCore::DocumentNameCollection::nodeMatches):
* html/RadioInputType.cpp:
(WebCore::RadioInputType::handleKeydownEvent):
* html/RadioNodeList.cpp:
(WebCore::RadioNodeList::RadioNodeList):
(WebCore::RadioNodeList::checkElementMatchesRadioNodeListFilter):
* html/parser/HTMLConstructionSite.cpp:
(WebCore::HTMLConstructionSite::insertHTMLFormElement):
* html/parser/HTMLTreeBuilder.cpp:
(WebCore::closestFormAncestor):
* page/Frame.cpp:
(WebCore::Frame::searchForLabelsBeforeElement):
2013-06-24 Gyuyoung Kim <gyuyoung.kim@samsung.com>
Remove unneeded include header files from WebCore
https://bugs.webkit.org/show_bug.cgi?id=117926
Reviewed by Andreas Kling.
Merge from https://chromiumcodereview.appspot.com/17388003.
Cleanup unused includes from WebCore.
* editing/CompositeEditCommand.cpp:
* editing/DeleteSelectionCommand.cpp:
* editing/EditingStyle.cpp:
* editing/Editor.cpp:
* editing/FrameSelection.cpp:
* editing/HTMLInterchange.cpp:
* editing/IndentOutdentCommand.cpp:
* editing/InsertListCommand.cpp:
* editing/InsertTextCommand.cpp:
* editing/SpellChecker.h:
* editing/VisibleUnits.cpp:
* editing/VisibleUnits.h:
* editing/markup.cpp:
* fileapi/Blob.h:
* fileapi/File.h:
* fileapi/WebKitBlobBuilder.h:
* history/HistoryItem.cpp:
* history/HistoryItem.h:
* html/BaseDateAndTimeInputType.cpp:
* html/BaseDateAndTimeInputType.h:
* html/ClassList.cpp:
* html/ClassList.h:
* html/DOMSettableTokenList.h:
* html/DOMURL.cpp:
* html/DateInputType.h:
* html/FormController.h:
* html/HTMLCanvasElement.cpp:
* html/HTMLCollection.cpp:
* html/HTMLCollection.h:
* html/HTMLDocument.h:
* html/HTMLEmbedElement.cpp:
* html/HTMLFieldSetElement.h:
* html/HTMLFormElement.cpp:
* html/HTMLFrameOwnerElement.h:
* html/HTMLIFrameElement.cpp:
* html/HTMLInputElement.cpp:
* html/HTMLLegendElement.cpp:
* html/HTMLLinkElement.h:
* html/HTMLMediaElement.cpp:
* html/HTMLMeterElement.cpp:
* html/HTMLOptionElement.cpp:
* html/HTMLOutputElement.h:
* html/HTMLPlugInImageElement.cpp:
* html/HTMLPlugInImageElement.h:
* html/HTMLProgressElement.cpp:
* html/HTMLSelectElement.cpp:
* html/HTMLTableElement.cpp:
* html/HTMLTitleElement.cpp:
* html/HTMLTrackElement.cpp:
* html/ImageInputType.h:
* html/InputType.h:
* html/MediaController.h:
* html/MediaFragmentURIParser.h:
* html/NumberInputType.cpp:
* html/RadioNodeList.h:
* html/TextFieldInputType.h:
* html/TypeAhead.cpp:
* html/ValidityState.cpp:
* html/canvas/CanvasPathMethods.h:
* html/canvas/CanvasRenderingContext2D.cpp:
* html/canvas/CanvasRenderingContext2D.h:
* html/canvas/OESVertexArrayObject.h:
* html/canvas/WebGLBuffer.cpp:
* html/canvas/WebGLBuffer.h:
* html/canvas/WebGLCompressedTextureATC.h:
* html/canvas/WebGLCompressedTextureS3TC.cpp:
* html/canvas/WebGLCompressedTextureS3TC.h:
* html/canvas/WebGLContextObject.h:
* html/canvas/WebGLDebugShaders.cpp:
* html/canvas/WebGLObject.h:
* html/canvas/WebGLProgram.h:
* html/canvas/WebGLRenderingContext.cpp:
* html/canvas/WebGLRenderingContext.h:
* html/canvas/WebGLShader.h:
* html/canvas/WebGLTexture.h:
* html/canvas/WebGLUniformLocation.h:
* html/canvas/WebGLVertexArrayObjectOES.h:
* html/parser/BackgroundHTMLParser.cpp:
* html/parser/BackgroundHTMLParser.h:
* html/parser/CSSPreloadScanner.cpp:
* html/parser/HTMLConstructionSite.cpp:
* html/parser/HTMLConstructionSite.h:
* html/parser/HTMLDocumentParser.h:
* html/parser/HTMLElementStack.h:
* html/parser/HTMLParserIdioms.cpp:
* html/parser/HTMLParserIdioms.h:
* html/parser/HTMLParserScheduler.h:
* html/parser/HTMLPreloadScanner.cpp:
* html/parser/HTMLSourceTracker.h:
* html/parser/HTMLTreeBuilder.h:
* html/parser/HTMLTreeBuilderSimulator.h:
* html/parser/XSSAuditor.cpp:
* html/parser/XSSAuditorDelegate.h:
* html/shadow/HTMLContentElement.cpp:
* html/shadow/HTMLContentElement.h:
* html/shadow/MediaControlElements.cpp:
* html/shadow/MediaControls.h:
* html/shadow/SliderThumbElement.cpp:
* html/shadow/SliderThumbElement.h:
* html/shadow/TextControlInnerElements.cpp:
* html/track/InbandTextTrack.h:
* html/track/LoadableTextTrack.cpp:
* html/track/LoadableTextTrack.h:
* html/track/TextTrackCueGeneric.h:
2013-06-24 Simon Fraser <simon.fraser@apple.com>
Don't crash if renderName() is called on a renderer with no style
https://bugs.webkit.org/show_bug.cgi?id=117960
Reviewed by Dave Hyatt.
Calling renderName() at the top of RenderObject::willChangeStyle() when
adding debug logging would often crash because various functions called
from renderName() assume style is non-null. Fix this.
* rendering/RenderBlock.cpp:
(WebCore::RenderBlock::renderName):
* rendering/RenderInline.cpp:
(WebCore::RenderInline::renderName):
2013-06-24 Alex Christensen <achristensen@apple.com>
Added /d option to xcopy to prevent unnecessary copying and compiling.
https://bugs.webkit.org/show_bug.cgi?id=117951
Reviewed by Brent Fulgham.
* WebCore.vcxproj/WebCorePreBuild.cmd:
2013-06-24 Simon Fraser <simon.fraser@apple.com>
Fix various crashes on sites with fixed backgrounds
https://bugs.webkit.org/show_bug.cgi?id=117959
Reviewed by Andy Estes.
FrameView::removeSlowRepaintObject() would assume that addSlowRepaintObject()
had been called before it, but this isn't always the case. For example, if
a page has a fixed background on the body, this falls into the accelerated
path in WK2 tiled mode, so addSlowRepaintObject() is never called. However,
we still call removeSlowRepaintObject() if the body is removed.
So null-check m_slowRepaintObjects to avoid crashing.
Test: platform/mac-wk2/tiled-drawing/fixed-background/fixed-background-removal.html
* page/FrameView.cpp:
(WebCore::FrameView::removeSlowRepaintObject):
2013-06-24 Ruth Fong <ruth_fong@apple.com>
Expose the mediaHasAudio() function in WK2
https://bugs.webkit.org/show_bug.cgi?id=117946
<rdar://problem/14250527>
Reviewed by Beth Dakin.
* WebCore.exp.in: Updated to include symbol for
HTMLMediaElement::mediaHasAudio() function.
2013-06-24 Simon Fraser <simon.fraser@apple.com>
Move displayID stuff from Widget to Chrome
https://bugs.webkit.org/show_bug.cgi?id=117944
Reviewed by Anders Carlsson.
In r151877 I polluted Widget with displayID-related stuff. This would
be better on HostWindow, so move it there. This is a net code reduction,
and eliminates PlatformScreenMac.h, and the NSScreen category.
* WebCore.exp.in: Remove some functions from the exports list.
* WebCore.xcodeproj/project.pbxproj: PlatformScreenMac.h is gone!
* dom/Document.cpp:
(WebCore::Document::requestAnimationFrame): Get the displayID from page->chrome()
* page/Chrome.cpp:
(WebCore::Chrome::Chrome): Initialize m_displayID.
(WebCore::Chrome::displayID):
(WebCore::Chrome::windowScreenDidChange): Code moved from Page; save the
displayID, and tell all subframes that the displayID changed.
* page/Chrome.h: Add displayID-related functions.
* page/FrameView.cpp: Removed windowDisplayID().
* page/FrameView.h: Ditto.
* page/Page.cpp: Removed code.
(WebCore::Page::Page):
* page/Page.h:
* platform/HostWindow.h: Added virtual displayID-related functions.
* platform/Widget.cpp: Removed code.
* platform/Widget.h: Ditto.
* platform/mac/PlatformScreenMac.h: Removed.
* platform/mac/PlatformScreenMac.mm: Removed the NSScreen category.
(WebCore::displayIDFromScreen):
(WebCore::screenForDisplayID):
(WebCore::displayFromWidget):
(WebCore::screenForWidget):
* platform/mac/WidgetMac.mm: Removed windowDisplayID().
* rendering/RenderLayerCompositor.cpp:
(WebCore::RenderLayerCompositor::notifyFlushBeforeDisplayRefresh): Get
the displayID via chrome().
2013-06-24 Andreas Kling <akling@apple.com>
Don't create Document's selector query cache just to invalidate it.
<http://webkit.org/b/117942>
Reviewed by Anders Carlsson.
If Document::m_selectorQueryCache is null, there's nothing to invalidate,
so don't go through the trouble of creating a query cache.
* dom/Document.cpp:
(WebCore::Document::setCompatibilityMode):
(WebCore::Document::updateBaseURL):
2013-06-24 Robert Hogan <robert@webkit.org>
Refactor adding a line break
https://bugs.webkit.org/show_bug.cgi?id=117907
Reviewed by Ryosuke Niwa.
Reduce code duplication when adding a line break.
No new tests, refactoring.
* rendering/RenderBlockLineLayout.cpp:
(WebCore::addLineBreak):
(WebCore::RenderBlock::LineBreaker::nextSegmentBreak):
2013-06-24 Mikhail Pozdnyakov <mikhail.pozdnyakov@intel.com>
HashMap: reverse the order of the template arguments at alternate 'find', 'contains' and 'add' methods
https://bugs.webkit.org/show_bug.cgi?id=117911
Reviewed by Anders Carlsson.
The order of the template arguments at HashMap alternate 'find', 'contains' and
'add' methods is reversed so that callers can just pass the translator
and let the compiler deduce input argument type.
Another rational is consistency with HashSet class.
* platform/network/HTTPHeaderMap.cpp:
(WebCore::HTTPHeaderMap::get):
(WebCore::HTTPHeaderMap::contains):
(WebCore::HTTPHeaderMap::add):
2013-06-24 Robert Hogan <robert@webkit.org>
Remove unnecessary check in RenderBlockLineLayout::nextSegmentBreak()
https://bugs.webkit.org/show_bug.cgi?id=117713
Reviewed by David Hyatt.
Changeset r151613 should have done this instead. Since r151518 changed
nextSegmentBreak() to detect line-break opportunities between no-wrap
inlines there is no need to force the break later.
No new tests, covered by existing tests.
* rendering/RenderBlockLineLayout.cpp:
(WebCore::RenderBlock::LineBreaker::nextSegmentBreak):
2013-06-24 Eric Carlson <eric.carlson@apple.com>
Potential crash when in-band track is removed
https://bugs.webkit.org/show_bug.cgi?id=117938
<rdar://problem/14246763>
Reviewed by Jer Noble.
This is timing dependent and I was unable to come up with a reliable test.
* html/track/InbandTextTrack.cpp:
(WebCore::InbandTextTrack::willRemoveTextTrackPrivate): Early return if the media element
has been cleared.
2013-06-24 Chris Rogers <crogers@google.com>
WaveTable name has changed to PeriodicWave
https://bugs.webkit.org/show_bug.cgi?id=117748
Reviewed by Jer Noble.
See related Web Audio bug and spec change:
https://www.w3.org/Bugs/Public/show_bug.cgi?id=19561
https://dvcs.w3.org/hg/audio/rev/7c4a40a9bb57
* CMakeLists.txt:
* DerivedSources.make:
* DerivedSources.pri:
* GNUmakefile.list.am:
* Modules/webaudio/AudioContext.cpp:
(WebCore::AudioContext::createPeriodicWave):
* Modules/webaudio/AudioContext.h:
* Modules/webaudio/AudioContext.idl:
* Modules/webaudio/OscillatorNode.cpp:
(WebCore::OscillatorNode::OscillatorNode):
(WebCore::OscillatorNode::setType):
(WebCore::OscillatorNode::calculateSampleAccuratePhaseIncrements):
(WebCore::OscillatorNode::process):
(WebCore::OscillatorNode::setPeriodicWave):
(WebCore::OscillatorNode::propagatesSilence):
* Modules/webaudio/OscillatorNode.h:
* Modules/webaudio/OscillatorNode.idl:
* Modules/webaudio/PeriodicWave.cpp: Renamed from Source/WebCore/Modules/webaudio/WaveTable.cpp.
(WebCore::PeriodicWave::create):
(WebCore::PeriodicWave::createSine):
(WebCore::PeriodicWave::createSquare):
(WebCore::PeriodicWave::createSawtooth):
(WebCore::PeriodicWave::createTriangle):
(WebCore::PeriodicWave::PeriodicWave):
(WebCore::PeriodicWave::waveDataForFundamentalFrequency):
(WebCore::PeriodicWave::maxNumberOfPartials):
(WebCore::PeriodicWave::numberOfPartialsForRange):
(WebCore::PeriodicWave::createBandLimitedTables):
(WebCore::PeriodicWave::generateBasicWaveform):
* Modules/webaudio/PeriodicWave.h: Renamed from Source/WebCore/Modules/webaudio/WaveTable.h.
(WebCore::PeriodicWave::rateScale):
(WebCore::PeriodicWave::periodicWaveSize):
(WebCore::PeriodicWave::sampleRate):
(WebCore::PeriodicWave::numberOfRanges):
* Modules/webaudio/PeriodicWave.idl: Renamed from Source/WebCore/Modules/webaudio/WaveTable.idl.
* Target.pri:
* WebCore.xcodeproj/project.pbxproj:
2013-06-24 Christophe Dumez <ch.dumez@sisa.samsung.com>
Commented IDL implements statements should not impact code generation
https://bugs.webkit.org/show_bug.cgi?id=117932
Reviewed by Kentaro Hara.
Fix regular expression in preprocess-idls.pl script so that commented
IDL implements statements no longer cause any code to be generated.
No new tests, covered by TestObj.idl.
* bindings/scripts/preprocess-idls.pl:
(getImplementedInterfacesFromIDL):
* bindings/scripts/test/TestObj.idl:
2013-06-24 Kangil Han <kangil.han@samsung.com>
Adopt is/toHTMLStyleElement for minor code cleanup
https://bugs.webkit.org/show_bug.cgi?id=117917
Reviewed by Antti Koivisto.
This patch refers to http://src.chromium.org/viewvc/blink?view=revision&revision=152853
There are some usages of static_cast to HTMLStyleElement so this patch creates toHTMLStyleElement
function for code cleanup. Plus, isHTMLStyleElement is also made for same purpose.
* css/CSSStyleSheet.cpp:
(WebCore::isAcceptableCSSStyleSheetParent):
* css/StyleScopeResolver.cpp:
(WebCore::StyleScopeResolver::scopeFor):
* css/StyleSheetList.cpp:
(WebCore::StyleSheetList::getNamedItem):
* dom/DocumentStyleSheetCollection.cpp:
(WebCore::DocumentStyleSheetCollection::collectActiveStyleSheets):
* dom/Node.cpp:
(WebCore::Node::numberOfScopedHTMLStyleChildren):
* html/HTMLStyleElement.h:
(WebCore::isHTMLStyleElement):
(WebCore::toHTMLStyleElement):
* inspector/InspectorCSSAgent.cpp:
(WebCore::InspectorCSSAgent::viaInspectorStyleSheet):
* inspector/InspectorStyleSheet.cpp:
(WebCore::InspectorStyleSheet::inlineStyleSheetText):
* page/PageSerializer.cpp:
(WebCore::PageSerializer::serializeFrame):
2013-06-24 Patrick Gansterer <paroga@webkit.org>
Cleanup RenderThemeWin after r151783 and r151794.
https://bugs.webkit.org/show_bug.cgi?id=117936
Reviewed by Alexis Menard.
GetSysColor() takes an integer as argument. Let cssValueIdToSysColorIndex()
return an int instead of casting the values to the CSSValueID type.
* rendering/RenderThemeWin.cpp:
(WebCore::cssValueIdToSysColorIndex):
(WebCore::RenderThemeWin::systemColor):
2013-06-24 Patrick Gansterer <paroga@webkit.org>
Use SetFilePointer instead of SetFilePointerEx in FileSystemWin
https://bugs.webkit.org/show_bug.cgi?id=116205
Reviewed by Ryosuke Niwa.
SetFilePointerEx is not available on Windows CE, so use SetFilePointer.
Also add a extra return for the case of an failure.
* platform/win/FileSystemWin.cpp:
(WebCore::seekFile):
2013-06-24 Christophe Dumez <ch.dumez@sisa.samsung.com>
Introduce WindowTimers IDL interface
https://bugs.webkit.org/show_bug.cgi?id=117929
Reviewed by Kentaro Hara.
Introduce WindowTimers IDL interface and have both DOMWindow and WorkerContext
implement it to match the latest specification and avoid IDL duplication:
- http://www.whatwg.org/specs/web-apps/current-work/multipage/timers.html#windowtimers
- http://dev.w3.org/html5/workers/#apis-available-to-workers
No new tests, no behavior change.
* CMakeLists.txt:
* DerivedSources.make:
* DerivedSources.pri:
* GNUmakefile.list.am:
* page/DOMWindow.idl:
* page/WindowTimers.idl:
* workers/WorkerContext.idl:
2013-06-24 Patrick Gansterer <paroga@webkit.org>
Build fix for WinCE after r151563.
* bindings/js/JSDOMBinding.cpp:
(WebCore::toInt8): Use fabs() instead of abs().
(WebCore::toUInt8): Ditto.
2013-06-24 Patrick Gansterer <paroga@webkit.org>
Build fix for WinCE after r151783.
* rendering/RenderThemeWinCE.cpp:
(WebCore::cssValueIdToSysColorIndex):
(WebCore::RenderThemeWinCE::systemColor):
2013-06-24 Commit Queue <commit-queue@webkit.org>
Unreviewed, rolling out r151021.
http://trac.webkit.org/changeset/151021
https://bugs.webkit.org/show_bug.cgi?id=117924
caused regressions on Qt and GTK (#117141 and #117688)
(Requested by philn on #webkit).
* platform/graphics/gstreamer/WebKitWebSourceGStreamer.cpp:
(webkit_web_src_init):
(webKitWebSrcFinalize):
(webKitWebSrcSetProperty):
(webKitWebSrcGetProperty):
(webKitWebSrcStop):
(webKitWebSrcStart):
(webKitWebSrcChangeState):
(webKitWebSrcQueryWithParent):
(webKitWebSrcGetUri):
(webKitWebSrcSetUri):
(webKitWebSrcNeedDataMainCb):
(webKitWebSrcEnoughDataMainCb):
(webKitWebSrcSeekMainCb):
(webKitWebSrcSeekDataCb):
(StreamingClient::StreamingClient):
(StreamingClient::~StreamingClient):
(StreamingClient::didReceiveResponse):
(StreamingClient::didReceiveData):
(StreamingClient::didFinishLoading):
(StreamingClient::wasBlocked):
(StreamingClient::cannotShowURL):
2013-06-24 Christophe Dumez <ch.dumez@sisa.samsung.com>
Move IDL implements statements to IDL files that implement the interface
https://bugs.webkit.org/show_bug.cgi?id=117921
Reviewed by Kentaro Hara.
Move IDL implements statements to IDL files that implement the interface
so that we can more easily know that a given IDL interface implements
another.
The generator now enforces this as well for consistency.
No new tests, covered by TestImplements.idl.
* bindings/scripts/preprocess-idls.pl:
(getImplementedInterfacesFromIDL):
* bindings/scripts/test/TestImplements.idl:
* bindings/scripts/test/TestInterface.idl:
* dom/CharacterData.idl:
* dom/ChildNode.idl:
* dom/DocumentType.idl:
* dom/Element.idl:
2013-06-24 Zalan Bujtas <zalan@apple.com>
Hittest finds the truncated text instead of the floating input, when the input is clicked.
https://bugs.webkit.org/show_bug.cgi?id=115675
Reviewed by David Hyatt.
Ignore truncated text on inline textbox and everything beyond the ellipsis box on
the root inlinebox while hittesting. (provided that nodeAtPoint finds no hit for any of
the root inline's children.)
Test: fast/css/text-overflow-ellipsis-and-floating-input-hittest.html
* rendering/InlineFlowBox.cpp:
(WebCore::InlineFlowBox::nodeAtPoint):
* rendering/InlineTextBox.cpp:
(WebCore::InlineTextBox::nodeAtPoint):
(WebCore::InlineTextBox::paint):
2013-06-17 Darin Adler <darin@apple.com>
Sort all the Xcode project files
https://bugs.webkit.org/show_bug.cgi?id=117696
Reviewed by Anders Carlsson.
* WebCore.xcodeproj/project.pbxproj: Ran the sort-Xcode-project-file script.
2013-06-22 Zalan Bujtas <zalan@apple.com>
Remove redundant helper from RenderRegion.
https://bugs.webkit.org/show_bug.cgi?id=117915
Reviewed by Andreas Kling.
Minor code cleanup.
* rendering/RenderRegion.cpp:
(WebCore::RenderRegion::regionOversetState):
(WebCore::RenderRegion::setRegionOversetState):
* rendering/RenderRegion.h:
2013-06-22 Mark Rowe <mrowe@apple.com>
Build fix after r151878.
* platform/graphics/avfoundation/objc/WebCoreAVFResourceLoader.mm:
(WebCore::WebCoreAVFResourceLoader::startLoading): Pass the new UseDefaultOriginRestrictionsForType
argument to the ResourceLoaderOptions constructor.
2013-06-22 Simon Fraser <simon.fraser@apple.com>
Followup from r151877 .
Fix crash in fast/frames/iframe-access-screen-of-deleted.html by null-checking the widget.
* platform/mac/PlatformScreenMac.mm:
(WebCore::screenForWidget):
2013-06-22 Hans Muller <hmuller@adobe.com>
[CSS Shapes] limit shape image values to same origin
https://bugs.webkit.org/show_bug.cgi?id=117610
Reviewed by Alexey Proskuryakov.
Restrict the image URL values for shape-inside and shape-outside to
the same origin as the document. The alpha channel of image shape values
will be thresholded to produce the shape's boundaries (see bug 116643)
so normal image access rules aren't secure enough.
Added a RequestOriginPolicy ResourceLoaderOption which is used by
StyleResolver::loadPendingShapeImage() to request the additional restriction.
The change should have no other effect although it does enable one to apply
the same restriction to other resources which can currently be loaded from
any origin - see CachedResourceLoader::canRequest().
Test: http/tests/security/shape-inside-image-origin.html
* css/CSSImageValue.cpp:
(WebCore::CSSImageValue::cachedImage): Add an effectively optional ResourceLoaderOptions parameter.
* css/CSSImageValue.h:
(WebCore::CSSImageValue::cachedImage): Ditto.
* css/StyleResolver.cpp:
(WebCore::StyleResolver::loadPendingShapeImage): Load the image with the default CachedResourceLoader options plus RestrictToSameOrigin.
(WebCore::StyleResolver::loadPendingImages): Call loadPendingShapeImage().
* css/StyleResolver.h:
* loader/DocumentLoader.cpp:
(WebCore::DocumentLoader::startLoadingMainResource): Update the ResourceLoaderOptions static variable.
* loader/NetscapePlugInStreamLoader.cpp:
(WebCore::NetscapePlugInStreamLoader::NetscapePlugInStreamLoader): Ditto.
* loader/ResourceLoader.h:
(WebCore::ResourceLoader::options):
* loader/ResourceLoaderOptions.h: Add RequestOriginPolicy enum.
(WebCore::ResourceLoaderOptions::ResourceLoaderOptions):
* loader/SubresourceLoader.cpp:
(WebCore::SubresourceLoader::willSendRequest): Pass ResourceLoaderOptions along to revised CachedResourceLoader::canRequest().
* loader/cache/CachedResourceLoader.cpp:
(WebCore::CachedResourceLoader::requestImage):
(WebCore::CachedResourceLoader::requestUserCSSStyleSheet): Update load() ResourceLoaderOptions.
(WebCore::CachedResourceLoader::canRequest): Replaced ContentSecurityPolicyCheck parameter with ResourceLoaderOptions.
(WebCore::CachedResourceLoader::requestResource): Pass ResourceLoaderOptions along to revised CachedResourceLoader::canRequest().
(WebCore::CachedResourceLoader::defaultCachedResourceOptions): Added UseDefaultOriginRestrictionsForType initializer.
* loader/cache/CachedResourceLoader.h:
* loader/icon/IconLoader.cpp:
(WebCore::IconLoader::startLoading): Added UseDefaultOriginRestrictionsForType intializer.
2013-06-22 Simon Fraser <simon.fraser@apple.com>
screen.availWidth always returns width of primary display
https://bugs.webkit.org/show_bug.cgi?id=117863
Reviewed by Geoffrey Garen.
In WebKit2, Widgets have no platformWidget, so trying to get to the
NSScreen via the platform widget's window never succeeded, and we always
fell back on getting info for the main display.
However, we were already pushing the WKView's displayID down to the
WebProcess for the requestAnimationFrame infrastructure, so use that.
Add a virtual function on Widget windowDisplayID(), that is overridden
in FrameView to return the PlatformDisplayID which Page has.
Fix PlatformScreenMac to fall back to Widget::windowDisplayID() when it fails
to get an NSWindow from the Widget.
Add a utility category on NSScreen to get an NSScreen's displayID, and to
find an NSScreen given a displayID.
* WebCore.exp.in:
* WebCore.xcodeproj/project.pbxproj:
* page/FrameView.cpp:
(WebCore::FrameView::windowDisplayID):
* page/FrameView.h:
* platform/Widget.cpp:
(WebCore::Widget::windowDisplayID):
* platform/Widget.h:
* platform/mac/PlatformScreenMac.h: Added.
* platform/mac/PlatformScreenMac.mm:
(+[NSScreen screenForDislayID:]):
(-[NSScreen displayID]):
(WebCore::screenRect):
(WebCore::screenAvailableRect):
* platform/mac/WidgetMac.mm:
(WebCore::Widget::windowDisplayID):
2013-06-21 Geoffrey Garen <ggaren@apple.com>
Crashes due to NULL dereference beneath WebCore::StyleResolver::loadPendingSVGDocuments and related functions
https://bugs.webkit.org/show_bug.cgi?id=117903
<rdar://problem/14202130>
Reviewed by Darin Adler.
* css/StyleResolver.cpp:
(WebCore::StyleResolver::loadPendingSVGDocuments): Add a NULL check for
RenderStyle here...
(WebCore::StyleResolver::loadPendingResources): ...and here.
2013-06-21 Simon Fraser <simon.fraser@apple.com>
Occasional crash swiping between pages
https://bugs.webkit.org/show_bug.cgi?id=117902
Reviewed by Beth Dakin.
m_scrollingStateTree->rootStateNode() can be null when quickly swiping between pages,
so check this in ScrollingCoordinatorMac::commitTreeState().
* page/scrolling/mac/ScrollingCoordinatorMac.mm:
(WebCore::ScrollingCoordinatorMac::commitTreeState):
2013-06-21 Brent Fulgham <bfulgham@apple.com>
AX: Title for ListItemRole should consist of concatenated child text elements.
https://bugs.webkit.org/show_bug.cgi?id=117892
Reviewed by Chris Fleizach.
accessibility/listitem-title.html
* accessibility/AccessibilityNodeObject.cpp:
(WebCore::AccessibilityNodeObject::visibleText): Add ListItemRole to set of
elements that concatenate their children for display purposes.
(WebCore::AccessibilityNodeObject::title): Ditto.
2013-06-21 Sergio Correia <sergio.correia@openbossa.org>
[MediaStream]: Remove ``>= 0'' assertion from a size_t variable
https://bugs.webkit.org/show_bug.cgi?id=117890
Reviewed by Adam Barth.
This patch fixes a strict build by removing the ``>= 0'' assertion from
a size_t (unsigned type) variable in RTCStatsResponse.cpp.
No new tests; build fix.
* Modules/mediastream/RTCStatsResponse.cpp:
(WebCore::RTCStatsResponse::addStatistic): Remove ``>=0''assertion,
since the variable is unsigned and is always >= 0.
2013-06-21 Alex Christensen <achristensen@apple.com>
GraphicsContext3DNEON.h cannot be found on Windows and does not need to be found.
https://bugs.webkit.org/show_bug.cgi?id=117894
Reviewed by Brent Fulgham.
* platform/graphics/GraphicsContext3D.cpp:
Added #if HAVE(ARM_NEON_INTRINSICS) around #include "GraphicsContext3DNEON.h"
2013-06-21 Robert Hogan <robert@webkit.org>
Ignoring padding-right of inline elements in containers with undefined width
https://bugs.webkit.org/show_bug.cgi?id=76451
Reviewed by David Hyatt.
Collapsed trailing space on a normal wrap line should not cause a line-break
if it is the difference between fitting on the line and breaking. Likewise, on a line that
has a mix of auto-wrap and no-wrap inlines we don't want a trailing space at the end of a no-wrap inline
to be the difference between that no-wrap inline fitting or breaking the line. This latter
scenario is covered already by inline-whitespace-wrapping-8.html.
Test: fast/text/whitespace/inline-whitespace-wrapping-9.html
* rendering/RenderBlockLineLayout.cpp:
(WebCore::LineWidth::fitsOnLine):
(WebCore::LineWidth::fitsOnLineIncludingExtraWidth):
(WebCore::LineWidth::fitsOnLineExcludingTrailingWhitespace):
(WebCore::LineWidth::currentWidth):
(WebCore::LineWidth::fitsOnLineExcludingTrailingCollapsedWhitespace):
(WebCore::RenderBlock::LineBreaker::nextSegmentBreak):
2013-06-21 Alex Christensen <achristensen@apple.com>
Added WebGL source files to Windows build and made Windows build successfully with them.
https://bugs.webkit.org/show_bug.cgi?id=117853
Reviewed by Brent Fulgham.
* WebCore.vcxproj/WebCore.vcxproj: Added WebGL source files.
* WebCore.vcxproj/WebCore.vcxproj.filters: Added platform\graphics\opengl and platform\graphics\gpu filters.
* WebCore.vcxproj/WebCorePreBuild.cmd: Copy ANGLE headers and glext.h before building WebCore (which now uses them).
* platform/graphics/ANGLEWebKitBridge.h: Look in newly copied directory for ShaderLang.h.
* platform/graphics/OpenGLShims.h: Include GL/glext.h.
* platform/graphics/gpu/LoopBlinnShader.cpp:
(WebCore::LoopBlinnShader::use): Fixed parameter ordering in call to uniformMatrix4fv.
* platform/graphics/opengl/GLPlatformSurface.cpp:
(WebCore::GLPlatformSurface::createOffScreenSurface): Added notImplemented for non-EGL builds for now.
2013-06-21 Eric Carlson <eric.carlson@apple.com>
Update platform text track menu
https://bugs.webkit.org/show_bug.cgi?id=117884
Reviewed by Jer Noble.
* html/HTMLMediaElement.cpp:
(WebCore::HTMLMediaElement::setSelectedTextTrack):
* html/track/TextTrack.cpp:
(WebCore::TextTrack::platformTextTrack):
* platform/graphics/PlatformTextTrack.h:
(WebCore::PlatformTextTrack::create):
(WebCore::PlatformTextTrack::uniqueId):
(WebCore::PlatformTextTrack::captionMenuOffItem):
(WebCore::PlatformTextTrack::captionMenuAutomaticItem):
(WebCore::PlatformTextTrack::PlatformTextTrack):
2013-06-21 James Craig <james@cookiecrook.com>
AX: audio/video playback control timers (elapsed and remaining) should be exposed as ApplicationTimerRole
https://bugs.webkit.org/show_bug.cgi?id=117883
Reviewed by Chris Fleizach.
Some of the media controls were returning the wrong role. Updated existing test coverage.
* accessibility/AccessibilityMediaControls.h:
(WebCore::AccessibilityMediaTimeDisplay::roleValue):
2013-06-21 Alex Christensen <achristensen@apple.com>
Added glext.h from http://www.opengl.org/registry/oldspecs/glext.h for Windows
This file does not meet WebKit style guidelines.
Part of https://bugs.webkit.org/show_bug.cgi?id=117853
Reviewed by Brent Fulgham.
* platform/graphics/win/GL: Added.
* platform/graphics/win/GL/glext.h: Added.
2013-06-21 Ruth Fong <ruth_fong@apple.com>
Fix TextTrackCue::cueIndex() to handle the null case of TextTrack::cues(() properly
https://bugs.webkit.org/show_bug.cgi?id=117815
<rdar://problem/14211041>
Reviewed by Ryosuke Niwa.
This patch adds assert statements to try to catch when
track()->cues() returns a null pointer.
* html/track/TextTrackCue.cpp:
(WebCore::TextTrackCue::cueIndex):
2013-06-21 Jer Noble <jer.noble@apple.com>
[iOS] Hang drawing captions after pressing the home button while playing a video
https://bugs.webkit.org/show_bug.cgi?id=117882
Reviewed by Eric Carlson.
Instead of rendering in a callback on the main thread, pre-render the captions and pass to the main
thread as a CGImage. As such, rename paintTextTrackRepresentation() to createTextTrackRepresentationImage().
* html/shadow/MediaControlElements.cpp:
(WebCore::MediaControlTextTrackContainerElement::createTextTrackRepresentationImage): Renamed from
paintTextTrackRepresentation. Now returns an Image object.
* html/shadow/MediaControlElements.h:
* platform/graphics/MediaPlayer.h:
* platform/graphics/TextTrackRepresentation.h:
2013-06-21 Radu Stavila <stavila@adobe.com>
[CSS Regions] Move overset compute code from flow thread to named flow thread
https://bugs.webkit.org/show_bug.cgi?id=117835
Reviewed by Andreas Kling.
Moved computeOversetStateForRegions() and overset() methods from RenderFlowThread to RenderNamedFlowThread.
Added ASSERTS in RenderRegion::regionOversetState and RenderRegion::setRegionOversetState to ensure
the region was created from an element.
* rendering/RenderBlock.cpp:
(WebCore::RenderBlock::computeOverflow):
* rendering/RenderFlowThread.cpp:
(WebCore::RenderFlowThread::RenderFlowThread):
* rendering/RenderFlowThread.h:
* rendering/RenderNamedFlowThread.cpp:
(WebCore::RenderNamedFlowThread::RenderNamedFlowThread):
(WebCore::RenderNamedFlowThread::computeOversetStateForRegions):
* rendering/RenderNamedFlowThread.h:
(WebCore::RenderNamedFlowThread::overset):
* rendering/RenderRegion.cpp:
(WebCore::RenderRegion::regionOversetState):
(WebCore::RenderRegion::setRegionOversetState):
2013-06-21 Commit Queue <commit-queue@webkit.org>
Unreviewed, rolling out r151838.
http://trac.webkit.org/changeset/151838
https://bugs.webkit.org/show_bug.cgi?id=117880
Breaks MediaPlayerPrivateQt on Mac (Requested by carewolf on
#webkit).
* html/HTMLMediaElement.h:
2013-06-20 Brent Fulgham <bfulgham@apple.com>
[Windows] AX: Radio buttons with "tab" role should describe themselves as tabs
https://bugs.webkit.org/show_bug.cgi?id=117837
Reviewed by Chris Fleizach.
accessibility/aria-tab-role-on-buttons.html
* accessibility/AccessibilityNodeObject.cpp:
(WebCore::AccessibilityNodeObject::canSetSelectedAttribute): Indicate that certain accessibility
types (such as Tabs) can be selected.
* accessibility/AccessibilityNodeObject.h: Signature for canSelectAttribute override.
2013-06-21 Allan Sandfeld Jensen <allan.jensen@digia.com>
Remove unused GesturePinch events
https://bugs.webkit.org/show_bug.cgi?id=117875
Reviewed by Andreas Kling.
The gesturePinch events have not been used for some time, even Chromium
had stop using them before moving out of webkit.
* dom/GestureEvent.cpp:
(WebCore::GestureEvent::create):
* page/EventHandler.cpp:
(WebCore::EventHandler::handleGestureEvent):
* platform/PlatformEvent.h:
2013-06-21 Radu Stavila <stavila@adobe.com>
Improve the reattaching process while applying the :hover style
https://bugs.webkit.org/show_bug.cgi?id=117590
Reviewed by Andreas Kling.
Changes made:
- context is properly propagated to the element's children and to Shadow DOM elements.
- context is properly set on the lazyReattach method.
- another hit-testing is triggered when needed.
- when a hovered element is detached, it's ancestors are also removed from the hovered state.
Tests: fast/css/hover-display-block-inline.html
fast/css/hover-display-block-none.html
* dom/ContainerNode.cpp:
(WebCore::ContainerNode::attach):
(WebCore::ContainerNode::detach):
* dom/ContainerNode.h:
(WebCore::ContainerNode::attachChildren):
(WebCore::ContainerNode::detachChildrenIfNeeded):
(WebCore::ContainerNode::detachChildren):
* dom/Document.cpp:
(WebCore::Document::recalcStyle):
(WebCore::Document::updateHoverActiveState):
* dom/Element.cpp:
(WebCore::Element::attach):
(WebCore::Element::detach):
* dom/ElementShadow.cpp:
(WebCore::ElementShadow::attach):
(WebCore::ElementShadow::detach):
* dom/ElementShadow.h:
* dom/Node.h:
(WebCore::Node::lazyReattach):
2013-06-21 Allan Sandfeld Jensen <allan.jensen@digia.com>
HTMLMediaElement should inherit from MediaPlayerClient privately
https://bugs.webkit.org/show_bug.cgi?id=117874
Reviewed by Andreas Kling.
Fixing FIXME: HTMLMediaElement was stuck with public inheritance from
MediaPlayerClient due to the Chromium port.
This can now be fixed to a private inheritance.
* html/HTMLMediaElement.h:
2013-06-21 Allan Sandfeld Jensen <allan.jensen@digia.com>
Remove Chromium-only TouchDisambiguation
https://bugs.webkit.org/show_bug.cgi?id=117873
Reviewed by Andreas Kling.
* page/TouchDisambiguation.cpp: Removed.
* page/TouchDisambiguation.h: Removed.
2013-06-21 Zalan Bujtas <zalan@apple.com>
Rollout r150602: Restoring text-overflow vs. floating rendering behaviour.
https://bugs.webkit.org/show_bug.cgi?id=117871
Unreviewed. Rolling out r150602.
Undesirable rendering behaviour.
* rendering/RenderBlockLineLayout.cpp:
(WebCore::RenderBlock::checkLinesForTextOverflow):
2013-06-21 Radu Stavila <stavila@adobe.com>
Web Inspector: Integrate new regionOversetChange event into inspector
https://bugs.webkit.org/show_bug.cgi?id=117833
Added the new regionOversetChange event to the WebInspector.
Reviewed by Joseph Pecoraro.
Tests: inspector/styles/protocol-css-regions-commands.html:
* inspector/Inspector.json:
* inspector/InspectorCSSAgent.cpp:
(WebCore::ChangeRegionOversetTask::ChangeRegionOversetTask):
(WebCore::ChangeRegionOversetTask::scheduleFor):
(WebCore::ChangeRegionOversetTask::unschedule):
(WebCore::ChangeRegionOversetTask::reset):
(WebCore::ChangeRegionOversetTask::onTimer):
(WebCore::InspectorCSSAgent::resetNonPersistentData):
(WebCore::InspectorCSSAgent::willRemoveNamedFlow):
(WebCore::InspectorCSSAgent::didChangeRegionOverset):
(WebCore::InspectorCSSAgent::regionOversetChanged):
* inspector/InspectorCSSAgent.h:
* inspector/InspectorInstrumentation.cpp:
(WebCore::InspectorInstrumentation::didChangeRegionOversetImpl):
* inspector/InspectorInstrumentation.h:
(WebCore::InspectorInstrumentation::didChangeRegionOverset):
* inspector/front-end/CSSNamedFlowCollectionsView.js:
(WebInspector.CSSNamedFlowCollectionsView.prototype._regionOversetChanged):
(WebInspector.CSSNamedFlowCollectionsView.prototype.wasShown):
(WebInspector.CSSNamedFlowCollectionsView.prototype.willHide):
* inspector/front-end/CSSStyleModel.js:
(WebInspector.CSSStyleModel.prototype._regionOversetChanged):
(WebInspector.CSSDispatcher.prototype.regionLayoutUpdated):
(WebInspector.CSSDispatcher.prototype.regionOversetChanged):
* rendering/RenderNamedFlowThread.cpp:
(WebCore::RenderNamedFlowThread::dispatchRegionOversetChangeEvent):
2013-06-21 Sergio Correia <sergio.correia@openbossa.org>
[EFL] NetworkStateNotifierEfl: Use closeWithRetry instead of looping for EINTR on close
https://bugs.webkit.org/show_bug.cgi?id=117872
Reviewed by Christophe Dumez.
closeWithRetry works around the Linux behavior of closing the file descriptor
unconditionally even if the close() call is interrupted.
No new tests, no behavior change.
* platform/network/efl/NetworkStateNotifierEfl.cpp:
(WebCore::NetworkStateNotifier::~NetworkStateNotifier): Use closeWithRetry instead of
looping for EINTR on close.
2013-06-21 Christophe Dumez <ch.dumez@sisa.samsung.com>
REGRESSION (r150663): Using webkitAudioContext in Inspector makes it undefined everywhere
https://bugs.webkit.org/show_bug.cgi?id=117825
Reviewed by Kentaro Hara.
Partially revert r150663 so that we use Settings to enable WebAudio instead of
RuntimeEnabledFeatures.
Introduce a new [EnabledBySetting] IDL extended attribute which behaves similarly to
the existing [EnabledAtRuntime] but relies on Settings instead of RuntimeEnabledFeatures
to determine if the feature should be enabled. Make use of this new IDL attribute for
webkitAudioContext interface.
No new tests, no behavior change.
* Modules/webaudio/AudioContext.idl:
* WebCore.exp.in:
* WebCore.order:
* bindings/generic/RuntimeEnabledFeatures.cpp:
* bindings/generic/RuntimeEnabledFeatures.h:
* bindings/scripts/CodeGeneratorJS.pm:
(GenerateImplementation):
* bindings/scripts/IDLAttributes.txt:
* bindings/scripts/preprocess-idls.pl:
(GenerateConstructorAttribute):
* bindings/scripts/test/JS/JSTestObj.cpp:
(WebCore::jsTestObjTestSubObjEnabledBySettingConstructor):
(WebCore::setJSTestObjTestSubObjEnabledBySettingConstructor):
* bindings/scripts/test/JS/JSTestObj.h:
* bindings/scripts/test/ObjC/DOMTestObj.h:
* bindings/scripts/test/ObjC/DOMTestObj.mm:
(-[DOMTestObj TestSubObjEnabledBySetting]):
(-[DOMTestObj setTestSubObjEnabledBySetting:]):
* bindings/scripts/test/TestObj.idl:
* page/Settings.in:
2013-06-21 Krzysztof Czech <k.czech@samsung.com>
[ATK] Added support for aria-required attribute.
https://bugs.webkit.org/show_bug.cgi?id=117730
Reviewed by Chris Fleizach.
Tests: accessibility/aria-required.html
accessibility/html5-required-attribute.html
The aria-required attribute is used to indicate that user input is required on an
element before a form can be submitted.
* accessibility/atk/WebKitAccessibleWrapperAtk.cpp:
(setAtkStateSetFromCoreObject):
2013-06-21 Chris Fleizach <cfleizach@apple.com>
IndieUI: Add basic IndieUI infrastructure
https://bugs.webkit.org/show_bug.cgi?id=117367
Unreviewed. Revert erroneous file that was included accidentally.
* accessibility/AccessibilityNodeObject.h:
2013-06-21 Chris Fleizach <cfleizach@apple.com>
IndieUI: Add basic IndieUI infrastructure
https://bugs.webkit.org/show_bug.cgi?id=117367
Reviewed by Ryosuke Niwa.
IndieUI is a new W3C spec that aims to abstract the connection between input and action, so that
a user (possibly using assistive technologies like a screen reader) does not need a specific kind
of device (like a mouse) to interact with an object.
http://www.w3.org/WAI/IndieUI/
This initial patch adds in the basic support for UIRequestEvent and the uiactions attribute.
It modifies the config files to enable and build this feature.
Tests: indieui/create-uirequestevent.html
indieui/uiactions.html
* CMakeLists.txt:
* Configurations/FeatureDefines.xcconfig:
* DerivedSources.make:
* GNUmakefile.am:
* Modules/indieui: Added.
* Modules/indieui/UIRequestEvent.cpp: Added.
(WebCore::UIRequestEventInit::UIRequestEventInit):
(WebCore::UIRequestEvent::create):
(WebCore::UIRequestEvent::UIRequestEvent):
(WebCore::UIRequestEvent::~UIRequestEvent):
(WebCore::UIRequestEvent::interfaceName):
(WebCore::UIRequestEventDispatchMediator::UIRequestEventDispatchMediator):
(WebCore::UIRequestEventDispatchMediator::event):
(WebCore::UIRequestEventDispatchMediator::dispatchEvent):
* Modules/indieui/UIRequestEvent.h: Added.
(WebCore::UIRequestEvent::receiver):
(WebCore::UIRequestEventDispatchMediator::create):
* Modules/indieui/UIRequestEvent.idl: Added.
* WebCore.xcodeproj/project.pbxproj:
* accessibility/AccessibilityNodeObject.h:
* dom/Element.cpp:
(WebCore::Element::setUIActions):
(WebCore::Element::UIActions):
* dom/Element.h:
* dom/Element.idl:
* dom/Event.cpp:
(WebCore::EventInit::EventInit):
* dom/Event.h:
* dom/EventNames.in:
* dom/Node.cpp:
(WebCore::Node::dispatchUIRequestEvent):
* dom/Node.h:
* dom/UIEvent.cpp:
(WebCore::UIEventInit::UIEventInit):
* dom/UIEvent.h:
* html/HTMLAttributeNames.in:
2013-06-20 Ryosuke Niwa <rniwa@webkit.org>
REGRESSION(r145788): mouse drag on canvas shouldn't start selection
https://bugs.webkit.org/show_bug.cgi?id=117860
Reviewed by Benjamin Poulain.
Like HTMLImageElement, HTMLCanvasElement shouldn't start selection.
Also uninline some virtual function overrides.
Test: fast/events/mosuedrag-on-canvas-should-not-start-selection.html
* html/HTMLCanvasElement.cpp:
(WebCore::HTMLCanvasElement::areAuthorShadowsAllowed):
(WebCore::HTMLCanvasElement::canContainRangeEndPoint):
(WebCore::HTMLCanvasElement::canStartSelection):
* html/HTMLCanvasElement.h:
2013-06-20 Ryosuke Niwa <rniwa@webkit.org>
REGRESSION(r149652): accessing items in .children via id doesn't work when element is not rooted in DOM tree
https://bugs.webkit.org/show_bug.cgi?id=117836
Reviewed by Benjamin Poulain.
When the root node of a HTML collection is not in the document or in a shadow tree,
we shouldn't use its tree scope's id and name maps to find name getters.
Always use the slow path in such cases.
Test: fast/dom/htmlallcollection-detached-node-children.html
* html/HTMLCollection.cpp:
(WebCore::HTMLCollection::namedItem):
2013-06-20 Alexey Proskuryakov <ap@apple.com>
https://bugs.webkit.org/show_bug.cgi?id=116495
Fix null-pointer deref in DocumentLoader::responseReceived()
Patch by Nate Chapin, reviewed by Mike West and myself.
Test: http/tests/security/XFrameOptions/x-frame-options-deny-delete-frame-in-load-event.html
* loader/DocumentLoader.cpp: (WebCore::DocumentLoader::responseReceived): Added
a null check.
2013-06-20 Roger Fong <roger_fong@apple.com>
Unreviewed. Roll out part of r150618.
* platform/graphics/avfoundation/cf/MediaPlayerPrivateAVFoundationCF.cpp:
2013-06-20 Enrica Casucci <enrica@apple.com>
Initial advance on the first glyph of the run is not correctly set for rtl text.
https://bugs.webkit.org/show_bug.cgi?id=117839
<rdar://problem/13860717>
Reviewed by Sam Weinig.
We need to set the initial advance to the glyphBuffer, using the
initial advance of the complex run that will be drawn first.
In order to choose the run correctly we must consider the text direction.
Test: fast/text/complex-first-glyph-with-initial-advance.html
* platform/graphics/mac/ComplexTextController.cpp:
(WebCore::ComplexTextController::advance):
2013-06-20 Alex Christensen <achristensen@apple.com>
Fixed WebGL compile errors on Windows.
https://bugs.webkit.org/show_bug.cgi?id=117805
Reviewed by Brent Fulgham.
* html/canvas/WebGLRenderingContext.cpp: Included CString.h.
Added PLATFORM(WIN) to existing lists of platform macros.
* platform/graphics/ANGLEWebKitBridge.h:
* platform/graphics/GraphicsContext3D.h:
(WebCore::GraphicsContext3D::ShaderSourceEntry::symbolMap):
* platform/graphics/OpenGLESShims.h:
2013-06-20 Simon Fraser <simon.fraser@apple.com>
FrameView needs to initialize paintsEntireContents on creation
https://bugs.webkit.org/show_bug.cgi?id=117844
Reviewed by Anders Carlsson.
In WebKit1, if the WebView is layer-backed, WebHTMLView gets a layer.
In this mode, FrameView::paintsEntireContents() is true. However,
we would only call setPaintsEntireContents(true) on the FrameView
when the view's layer-backed status changes. FrameView also needs
to fetch this state when it is initialized, because we may be creating
a new FrameView for an already layer-backed WebHTMLView.
* page/ChromeClient.h:
(WebCore::ChromeClient::shouldPaintEntireContents):
* page/FrameView.cpp:
(WebCore::FrameView::init):
2013-06-20 Simon Fraser <simon.fraser@apple.com>
Sticky elements are missing or misplaced sometimes when reloading a page that scrolls to a named anchor
https://bugs.webkit.org/show_bug.cgi?id=117819
Reviewed by Anders Carlsson.
At the end of FrameView::performPostLayoutTasks() we call scrollToAnchor() which attempts
to restore the scroll position to a named anchor, even when the document has been
changed by layout. This ends up in a call to ScrollView::scrollTo(), which in turn
calls repaintFixedElementsAfterScrolling(). However, repaintFixedElementsAfterScrolling()
would bail if m_nestedLayoutCount != 0, so we never updated layer positions which
depend on scroll position (but which would not be updated by layout, since their
renderers are not marked for layout when scrolling happens).
We've solved this problem once before in updateFixedElementsAfterScrolling() which
checks for m_nestedLayoutCount <= 1, so that we do work on the outermost nested layout.
Apply that same fix to repaintFixedElementsAfterScrolling().
Very timing-dependent, so hard to make a test.
* page/FrameView.cpp:
(WebCore::FrameView::repaintFixedElementsAfterScrolling):
2013-06-20 Mikhail Pozdnyakov <mikhail.pozdnyakov@intel.com>
HashSet: reverse the order of the template arguments at alternate 'find', 'contains' and 'add' methods
https://bugs.webkit.org/show_bug.cgi?id=117830
Reviewed by Anders Carlsson.
The order of the template arguments at HashSet alternate 'find', 'contains' and
'add' methods is reversed so that callers can just pass the translator
and let the compiler deduce input argument type.
No new tests. No new functionality.
* dom/QualifiedName.cpp:
(WebCore::QualifiedName::QualifiedName):
* platform/graphics/cg/SubimageCacheWithTimer.cpp:
(WebCore::SubimageCacheWithTimer::getSubimage):
* svg/SVGAElement.cpp:
(WebCore::SVGAElement::isSupportedAttribute):
* svg/SVGAnimateMotionElement.cpp:
(WebCore::SVGAnimateMotionElement::isSupportedAttribute):
* svg/SVGAnimateTransformElement.cpp:
(WebCore::SVGAnimateTransformElement::isSupportedAttribute):
* svg/SVGAnimationElement.cpp:
(WebCore::SVGAnimationElement::isSupportedAttribute):
* svg/SVGCircleElement.cpp:
(WebCore::SVGCircleElement::isSupportedAttribute):
* svg/SVGClipPathElement.cpp:
(WebCore::SVGClipPathElement::isSupportedAttribute):
* svg/SVGComponentTransferFunctionElement.cpp:
(WebCore::SVGComponentTransferFunctionElement::isSupportedAttribute):
* svg/SVGCursorElement.cpp:
(WebCore::SVGCursorElement::isSupportedAttribute):
* svg/SVGEllipseElement.cpp:
(WebCore::SVGEllipseElement::isSupportedAttribute):
* svg/SVGFEBlendElement.cpp:
(WebCore::SVGFEBlendElement::isSupportedAttribute):
* svg/SVGFEColorMatrixElement.cpp:
(WebCore::SVGFEColorMatrixElement::isSupportedAttribute):
* svg/SVGFEComponentTransferElement.cpp:
(WebCore::SVGFEComponentTransferElement::isSupportedAttribute):
* svg/SVGFECompositeElement.cpp:
(WebCore::SVGFECompositeElement::isSupportedAttribute):
* svg/SVGFEConvolveMatrixElement.cpp:
(WebCore::SVGFEConvolveMatrixElement::isSupportedAttribute):
* svg/SVGFEDiffuseLightingElement.cpp:
(WebCore::SVGFEDiffuseLightingElement::isSupportedAttribute):
* svg/SVGFEDisplacementMapElement.cpp:
(WebCore::SVGFEDisplacementMapElement::isSupportedAttribute):
* svg/SVGFEDropShadowElement.cpp:
(WebCore::SVGFEDropShadowElement::isSupportedAttribute):
* svg/SVGFEGaussianBlurElement.cpp:
(WebCore::SVGFEGaussianBlurElement::isSupportedAttribute):
* svg/SVGFEImageElement.cpp:
(WebCore::SVGFEImageElement::isSupportedAttribute):
* svg/SVGFELightElement.cpp:
(WebCore::SVGFELightElement::isSupportedAttribute):
* svg/SVGFEMergeNodeElement.cpp:
(WebCore::SVGFEMergeNodeElement::isSupportedAttribute):
* svg/SVGFEMorphologyElement.cpp:
(WebCore::SVGFEMorphologyElement::isSupportedAttribute):
* svg/SVGFEOffsetElement.cpp:
(WebCore::SVGFEOffsetElement::isSupportedAttribute):
* svg/SVGFESpecularLightingElement.cpp:
(WebCore::SVGFESpecularLightingElement::isSupportedAttribute):
* svg/SVGFETileElement.cpp:
(WebCore::SVGFETileElement::isSupportedAttribute):
* svg/SVGFETurbulenceElement.cpp:
(WebCore::SVGFETurbulenceElement::isSupportedAttribute):
* svg/SVGFilterElement.cpp:
(WebCore::SVGFilterElement::isSupportedAttribute):
(WebCore::SVGFilterElement::childShouldCreateRenderer):
* svg/SVGFilterPrimitiveStandardAttributes.cpp:
(WebCore::SVGFilterPrimitiveStandardAttributes::isSupportedAttribute):
* svg/SVGForeignObjectElement.cpp:
(WebCore::SVGForeignObjectElement::isSupportedAttribute):
* svg/SVGGElement.cpp:
(WebCore::SVGGElement::isSupportedAttribute):
* svg/SVGGradientElement.cpp:
(WebCore::SVGGradientElement::isSupportedAttribute):
* svg/SVGImageElement.cpp:
(WebCore::SVGImageElement::isSupportedAttribute):
* svg/SVGLineElement.cpp:
(WebCore::SVGLineElement::isSupportedAttribute):
* svg/SVGLinearGradientElement.cpp:
(WebCore::SVGLinearGradientElement::isSupportedAttribute):
* svg/SVGMPathElement.cpp:
(WebCore::SVGMPathElement::isSupportedAttribute):
* svg/SVGMarkerElement.cpp:
(WebCore::SVGMarkerElement::isSupportedAttribute):
* svg/SVGMaskElement.cpp:
(WebCore::SVGMaskElement::isSupportedAttribute):
* svg/SVGPathElement.cpp:
(WebCore::SVGPathElement::isSupportedAttribute):
* svg/SVGPatternElement.cpp:
(WebCore::SVGPatternElement::isSupportedAttribute):
* svg/SVGPolyElement.cpp:
(WebCore::SVGPolyElement::isSupportedAttribute):
* svg/SVGRadialGradientElement.cpp:
(WebCore::SVGRadialGradientElement::isSupportedAttribute):
* svg/SVGRectElement.cpp:
(WebCore::SVGRectElement::isSupportedAttribute):
* svg/SVGScriptElement.cpp:
(WebCore::SVGScriptElement::isSupportedAttribute):
* svg/SVGStopElement.cpp:
(WebCore::SVGStopElement::isSupportedAttribute):
* svg/SVGStyleElement.cpp:
(WebCore::SVGStyleElement::isSupportedAttribute):
* svg/SVGStyledTransformableElement.cpp:
(WebCore::SVGStyledTransformableElement::isSupportedAttribute):
* svg/SVGSymbolElement.cpp:
(WebCore::SVGSymbolElement::isSupportedAttribute):
* svg/SVGTRefElement.cpp:
(WebCore::SVGTRefElement::isSupportedAttribute):
* svg/SVGTextContentElement.cpp:
(WebCore::SVGTextContentElement::isSupportedAttribute):
* svg/SVGTextElement.cpp:
(WebCore::SVGTextElement::isSupportedAttribute):
* svg/SVGTextPathElement.cpp:
(WebCore::SVGTextPathElement::isSupportedAttribute):
* svg/SVGTextPositioningElement.cpp:
(WebCore::SVGTextPositioningElement::isSupportedAttribute):
* svg/SVGUseElement.cpp:
(WebCore::SVGUseElement::isSupportedAttribute):
(WebCore::isDisallowedElement):
* svg/SVGViewElement.cpp:
(WebCore::SVGViewElement::isSupportedAttribute):
* svg/animation/SVGSMILElement.cpp:
(WebCore::SVGSMILElement::isSupportedAttribute):
2013-06-20 Commit Queue <commit-queue@webkit.org>
Unreviewed, rolling out r151451.
http://trac.webkit.org/changeset/151451
https://bugs.webkit.org/show_bug.cgi?id=117848
"Broke quite a lot of sites" (Requested by rhogan on #webkit).
* rendering/RenderBox.cpp:
(WebCore::RenderBox::computePositionedLogicalWidth):
(WebCore::RenderBox::computePositionedLogicalHeight):
* rendering/RenderBox.h:
(WebCore::RenderBox::intrinsicSize):
* rendering/RenderButton.h:
* rendering/RenderListBox.cpp:
(WebCore::RenderListBox::RenderListBox):
(WebCore::RenderListBox::computeLogicalHeight):
* rendering/RenderListBox.h:
* rendering/RenderMenuList.h:
* rendering/RenderReplaced.h:
* rendering/RenderTextControl.cpp:
(WebCore::RenderTextControl::RenderTextControl):
(WebCore::RenderTextControl::computeLogicalHeight):
* rendering/RenderTextControl.h:
2013-06-20 Commit Queue <commit-queue@webkit.org>
Unreviewed, rolling out r151788.
http://trac.webkit.org/changeset/151788
https://bugs.webkit.org/show_bug.cgi?id=117847
"This is the wrong fix" (Requested by rhogan on #webkit).
* rendering/RenderTextControl.cpp:
(WebCore::RenderTextControl::computeLogicalHeight):
(WebCore::RenderTextControl::computePreferredLogicalWidths):
2013-05-24 Balazs Kelemen <kbalazs@webkit.org>
[Gstreamer] cleanup buffering and state updates
https://bugs.webkit.org/show_bug.cgi?id=116642
Reviewed by Philippe Normand.
Covered by existing media tests, especially the ones that have been unskipped.
Always do download buffering. It should not differ if preload is "none" because
it's about when to start buffering, not about how. Fix a bunch other subtle issues
to make this change go smoothly with the tests. As a bonus some tests that were
failing so far started to pass.
It is possible to further tweak the buffering in a way that will enable us to support
a different and appropriate behavior for preload="metadata" but it should be managed
a bit differently. I will implement it in a follow-up.
* platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:
(WebCore::MediaPlayerPrivateGStreamer::MediaPlayerPrivateGStreamer):
(WebCore::MediaPlayerPrivateGStreamer::load): Don't call setDownloadBuffering
yet. Now it also responsible for starting the fill timer and it turned out that
setting the download flag before the pipeline is set to a state has negative
effect on some tests. Most probably GStreamer starts buffering too early if
we set the download flag.
(WebCore::MediaPlayerPrivateGStreamer::commitLoad): Call setDownloadBuffering now.
(WebCore::MediaPlayerPrivateGStreamer::play): Ditto, plus set m_delayingLoad to false
because otherwise setPreload will wrongly assume that the load has not been committed
yet if prepareToPlay is not called before play.
(WebCore::MediaPlayerPrivateGStreamer::pause): Make sure we don't commit a load here
if it was not committed yet by looking in the pipeline state.
(WebCore::MediaPlayerPrivateGStreamer::processBufferingStats): No need to observe the
type of buffering.
(WebCore::MediaPlayerPrivateGStreamer::fillTimerFired): Introduced m_downloadFinished to update
ready and network states in updateStates based on it. The previously used condition
- (maxTimeLoaded() == duration()) - was not correct in the case when duration is not known.
(WebCore::MediaPlayerPrivateGStreamer::maxTimeLoaded): Removed a lie. If the fill timer is not active
it does not necesarily means that download has been finished. This lie was actually ensuring
a lot of tests to pass because it made the condition (maxTimeLoaded() == duration()) true.
Now that state updates has been cleaned up we don't need to lie.
(WebCore::MediaPlayerPrivateGStreamer::updateStates): Merge all the parts that takes part in updating
ready and network states. It was untrackable. Unset download buffering for for live streams early so
we don't need to restart them.
* platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.h:
(MediaPlayerPrivateGStreamer): Removed m_startedBuffering because there is no need for it now.
2013-06-20 Eric Carlson <eric.carlson@apple.com>
ASSERT removing then adding a <track> element
https://bugs.webkit.org/show_bug.cgi?id=117814
Reviewed by Jer Noble.
Test: media/track/add-and-remove-track.html
* html/HTMLTrackElement.cpp:
(WebCore::HTMLTrackElement::insertedInto): Always call ensureTrack before adding the track
to the parent <video> element.
(WebCore::HTMLTrackElement::ensureTrack): Call m_track->setTrackElement() in case the
parent was cleared after m_track was created.
* html/track/LoadableTextTrack.cpp:
(WebCore::LoadableTextTrack::setTrackElement): New, set m_trackElement.
* html/track/LoadableTextTrack.h:
2013-06-20 Roger Fong <roger_fong@apple.com>
Unreviewed. Build fix for Apple Windows port.
* rendering/RenderThemeWin.cpp:
(WebCore::cssValueIdToSysColorIndex):
2013-06-20 Alexey Proskuryakov <ap@apple.com>
[Mac] Downloaded file name encoding is incorrect when download link opens in a new window
https://bugs.webkit.org/show_bug.cgi?id=117818
<rdar://problem/14212635>
Reviewed by Brady Eidson.
No tests added. The machinery we have for logging downloaded file name is very
far from being able to work in a secondary window.
* loader/FrameLoader.cpp: (WebCore::FrameLoader::addExtraFieldsToRequest):
Made a targeted fix - don't update encoding fallback array if we already have one,
there is no chance for it to be more correct. In this case, it's incorrect because
it comes from a new blank window, instead of original referer.
We have a lot of code in addExtraFieldsToRequest() to struggle with this, and we have
a FIXME to try not calling it from policy delegate.
2013-06-18 Robert Hogan <robert@webkit.org>
REGRESSION (r151451): Text not vertically centered correctly on icloud.com
https://bugs.webkit.org/show_bug.cgi?id=117744
Reviewed by David Hyatt.
The positioned height and width computation adds in the element's border and padding so
don't add it to the intrinsic height and preferred widths of text controls that are
absolutely positioned.
Test: fast/replaced/height-of-positioned-text-control.html
* rendering/RenderTextControl.cpp:
(WebCore::RenderTextControl::computeLogicalHeight):
(WebCore::RenderTextControl::computePreferredLogicalWidths):
2013-06-20 Roger Fong <roger_fong@apple.com>
Make Windows makefile copy build output to a different folder.
<rdar://problem/14219184>.
* WebCore.vcxproj/WebCore.make:
2013-06-19 Jer Noble <jer.noble@apple.com>
Roll-on in-band captions are displayed bottom-to-top rather than top-to-bottom.
https://bugs.webkit.org/show_bug.cgi?id=117811
Reviewed by Eric Carlson.
When comparing Generic cues, we should check that their type is Generic, not WebVTT.
* html/track/TextTrackCueGeneric.cpp:
(WebCore::TextTrackCueGeneric::isOrderedBefore):
2013-06-20 Ralph Thomas <ralpht@gmail.com>
[CMake][CSS Shaders] Add WebCore files for CSS Shaders to CMakeLists.txt
https://bugs.webkit.org/show_bug.cgi?id=117711
Reviewed by Laszlo Gombos.
No new tests, no CMake platforms currently enable this functionality.
* CMakeLists.txt:
2013-06-20 Alexis Menard <alexis@webkit.org>
Cleanup usage of CSSPropertyID and CSSValueID inside WebKit.
https://bugs.webkit.org/show_bug.cgi?id=117829
Reviewed by Andreas Kling.
A lot of call sites were using integers to represent them. While it's
not incorrect per se, it's not ideal for various reason such as type
safety or to remove ambiguity.
This patch eradicate the wrong usage by not letting any integer based
API for getting CSSValueIDs or CSSPropertyIDs from CSSPrimitiveValues.
Instead we use new but typed functions to construct the values as well
as getting them. Two customs and internal types were added to CSSPrimitiveValue
to handle correctly the new APIs.
It's good to note that in order to preserve compatibility on the
CSSPrimitiveValue type whenever CSSPrimitiveValue handles a CSSValueID
or a CSSPropertyID the return type for the public API will be CSS_IDENT
despite it is a separate internal type.
No new tests: refactor, existing tests should cover.
* css/CSSComputedStyleDeclaration.cpp:
(WebCore::ComputedStyleExtractor::propertyMatches):
* css/CSSFontSelector.cpp:
(WebCore::CSSFontSelector::addFontFaceRule):
* css/CSSGradientValue.cpp:
(WebCore::positionFromValue):
(WebCore::CSSLinearGradientValue::customCssText):
(WebCore::CSSLinearGradientValue::createGradient):
(WebCore::CSSRadialGradientValue::customCssText):
(WebCore::CSSRadialGradientValue::createGradient):
* css/CSSParser.cpp:
(WebCore::CSSParser::parseSystemColor):
(WebCore::isFillPositionKeyword):
(WebCore::CSSParser::parse4ValuesFillPosition):
(WebCore::CSSParser::parse3ValuesFillPosition):
(WebCore::CSSParser::parseFillPosition):
(WebCore::CSSParser::parseFillRepeat):
(WebCore::CSSParser::parseRadialGradient):
(WebCore::CSSParser::isBlendMode):
(WebCore::CSSParser::isCompositeOperator):
* css/CSSParser.h:
* css/CSSParserValues.cpp:
(WebCore::CSSParserValue::createCSSValue):
* css/CSSPrimitiveValue.cpp:
(WebCore::isValidCSSUnitTypeForDoubleConversion):
(WebCore::CSSPrimitiveValue::primitiveType):
(WebCore::propertyName):
(WebCore::valueName):
(WebCore::CSSPrimitiveValue::CSSPrimitiveValue):
(WebCore::CSSPrimitiveValue::cleanup):
(WebCore::CSSPrimitiveValue::getStringValue):
(WebCore::CSSPrimitiveValue::customCssText):
(WebCore::CSSPrimitiveValue::cloneForCSSOM):
(WebCore::CSSPrimitiveValue::equals):
* css/CSSPrimitiveValue.h:
(WebCore::CSSPrimitiveValue::isFontRelativeLength):
(WebCore::CSSPrimitiveValue::isValueID):
(WebCore::CSSPrimitiveValue::createIdentifier):
(WebCore::CSSPrimitiveValue::createParserOperator):
(WebCore::CSSPrimitiveValue::getPropertyID):
(WebCore::CSSPrimitiveValue::getValueID):
* css/CSSPrimitiveValueMappings.h:
(WebCore::CSSPrimitiveValue::CSSPrimitiveValue):
(WebCore::CSSPrimitiveValue::operator CSSReflectionDirection):
(WebCore::CSSPrimitiveValue::operator ColumnSpan):
(WebCore::CSSPrimitiveValue::operator PrintColorAdjust):
(WebCore::CSSPrimitiveValue::operator EBorderStyle):
(WebCore::CSSPrimitiveValue::operator OutlineIsAuto):
(WebCore::CSSPrimitiveValue::operator CompositeOperator):
(WebCore::CSSPrimitiveValue::operator ControlPart):
(WebCore::CSSPrimitiveValue::operator EBackfaceVisibility):
(WebCore::CSSPrimitiveValue::operator EFillAttachment):
(WebCore::CSSPrimitiveValue::operator EFillBox):
(WebCore::CSSPrimitiveValue::operator EFillRepeat):
(WebCore::CSSPrimitiveValue::operator EBoxPack):
(WebCore::CSSPrimitiveValue::operator EBoxAlignment):
(WebCore::CSSPrimitiveValue::operator EBoxDecorationBreak):
(WebCore::CSSPrimitiveValue::operator BackgroundEdgeOrigin):
(WebCore::CSSPrimitiveValue::operator EBoxSizing):
(WebCore::CSSPrimitiveValue::operator EBoxDirection):
(WebCore::CSSPrimitiveValue::operator EBoxLines):
(WebCore::CSSPrimitiveValue::operator EBoxOrient):
(WebCore::CSSPrimitiveValue::operator ECaptionSide):
(WebCore::CSSPrimitiveValue::operator EClear):
(WebCore::CSSPrimitiveValue::operator ECursor):
(WebCore::CSSPrimitiveValue::operator CursorVisibility):
(WebCore::CSSPrimitiveValue::operator EDisplay):
(WebCore::CSSPrimitiveValue::operator EEmptyCell):
(WebCore::CSSPrimitiveValue::operator EAlignItems):
(WebCore::CSSPrimitiveValue::operator EJustifyContent):
(WebCore::CSSPrimitiveValue::operator EFlexDirection):
(WebCore::CSSPrimitiveValue::operator EAlignContent):
(WebCore::CSSPrimitiveValue::operator EFlexWrap):
(WebCore::CSSPrimitiveValue::operator EFloat):
(WebCore::CSSPrimitiveValue::operator LineBreak):
(WebCore::CSSPrimitiveValue::operator EListStylePosition):
(WebCore::CSSPrimitiveValue::operator EListStyleType):
(WebCore::CSSPrimitiveValue::operator EMarginCollapse):
(WebCore::CSSPrimitiveValue::operator EMarqueeBehavior):
(WebCore::CSSPrimitiveValue::operator RegionFragment):
(WebCore::CSSPrimitiveValue::operator EMarqueeDirection):
(WebCore::CSSPrimitiveValue::operator ENBSPMode):
(WebCore::CSSPrimitiveValue::operator EOverflow):
(WebCore::CSSPrimitiveValue::operator EPageBreak):
(WebCore::CSSPrimitiveValue::operator EPosition):
(WebCore::CSSPrimitiveValue::operator EResize):
(WebCore::CSSPrimitiveValue::operator ETableLayout):
(WebCore::CSSPrimitiveValue::operator ETextAlign):
(WebCore::CSSPrimitiveValue::operator TextAlignLast):
(WebCore::CSSPrimitiveValue::operator TextJustify):
(WebCore::CSSPrimitiveValue::operator TextDecoration):
(WebCore::CSSPrimitiveValue::operator TextDecorationStyle):
(WebCore::CSSPrimitiveValue::operator TextUnderlinePosition):
(WebCore::CSSPrimitiveValue::operator ETextSecurity):
(WebCore::CSSPrimitiveValue::operator ETextTransform):
(WebCore::CSSPrimitiveValue::operator EUnicodeBidi):
(WebCore::CSSPrimitiveValue::operator EUserDrag):
(WebCore::CSSPrimitiveValue::operator EUserModify):
(WebCore::CSSPrimitiveValue::operator EUserSelect):
(WebCore::CSSPrimitiveValue::operator EVerticalAlign):
(WebCore::CSSPrimitiveValue::operator EVisibility):
(WebCore::CSSPrimitiveValue::operator EWhiteSpace):
(WebCore::CSSPrimitiveValue::operator EWordBreak):
(WebCore::CSSPrimitiveValue::operator EOverflowWrap):
(WebCore::CSSPrimitiveValue::operator TextDirection):
(WebCore::CSSPrimitiveValue::operator WritingMode):
(WebCore::CSSPrimitiveValue::operator TextCombine):
(WebCore::CSSPrimitiveValue::operator RubyPosition):
(WebCore::CSSPrimitiveValue::operator TextEmphasisPosition):
(WebCore::CSSPrimitiveValue::operator TextOverflow):
(WebCore::CSSPrimitiveValue::operator TextEmphasisFill):
(WebCore::CSSPrimitiveValue::operator TextEmphasisMark):
(WebCore::CSSPrimitiveValue::operator TextOrientation):
(WebCore::CSSPrimitiveValue::operator EPointerEvents):
(WebCore::CSSPrimitiveValue::operator FontDescription::Kerning):
(WebCore::CSSPrimitiveValue::operator FontSmoothingMode):
(WebCore::CSSPrimitiveValue::operator FontWeight):
(WebCore::CSSPrimitiveValue::operator FontItalic):
(WebCore::CSSPrimitiveValue::operator FontSmallCaps):
(WebCore::CSSPrimitiveValue::operator TextRenderingMode):
(WebCore::CSSPrimitiveValue::operator ColorSpace):
(WebCore::CSSPrimitiveValue::operator Hyphens):
(WebCore::CSSPrimitiveValue::operator LineSnap):
(WebCore::CSSPrimitiveValue::operator LineAlign):
(WebCore::CSSPrimitiveValue::operator Order):
(WebCore::CSSPrimitiveValue::operator ESpeak):
(WebCore::CSSPrimitiveValue::operator BlendMode):
(WebCore::CSSPrimitiveValue::operator LineCap):
(WebCore::CSSPrimitiveValue::operator LineJoin):
(WebCore::CSSPrimitiveValue::operator WindRule):
(WebCore::CSSPrimitiveValue::operator EAlignmentBaseline):
(WebCore::CSSPrimitiveValue::operator EBorderCollapse):
(WebCore::CSSPrimitiveValue::operator EBorderFit):
(WebCore::CSSPrimitiveValue::operator EImageRendering):
(WebCore::CSSPrimitiveValue::operator ETransformStyle3D):
(WebCore::CSSPrimitiveValue::operator ColumnAxis):
(WebCore::CSSPrimitiveValue::operator ColumnProgression):
(WebCore::CSSPrimitiveValue::operator WrapFlow):
(WebCore::CSSPrimitiveValue::operator WrapThrough):
(WebCore::CSSPrimitiveValue::operator GridAutoFlow):
(WebCore::CSSPrimitiveValue::convertToLength):
(WebCore::CSSPrimitiveValue::operator EBufferedRendering):
(WebCore::CSSPrimitiveValue::operator EColorInterpolation):
(WebCore::CSSPrimitiveValue::operator EColorRendering):
(WebCore::CSSPrimitiveValue::operator EDominantBaseline):
(WebCore::CSSPrimitiveValue::operator EShapeRendering):
(WebCore::CSSPrimitiveValue::operator ETextAnchor):
(WebCore::CSSPrimitiveValue::operator SVGWritingMode):
(WebCore::CSSPrimitiveValue::operator EVectorEffect):
(WebCore::CSSPrimitiveValue::operator EMaskType):
* css/CSSToStyleMap.cpp:
(WebCore::CSSToStyleMap::mapFillAttachment):
(WebCore::CSSToStyleMap::mapFillSize):
(WebCore::CSSToStyleMap::mapAnimationDirection):
(WebCore::CSSToStyleMap::mapAnimationFillMode):
(WebCore::CSSToStyleMap::mapAnimationIterationCount):
(WebCore::CSSToStyleMap::mapAnimationName):
(WebCore::CSSToStyleMap::mapAnimationPlayState):
(WebCore::CSSToStyleMap::mapAnimationProperty):
(WebCore::CSSToStyleMap::mapAnimationTimingFunction):
(WebCore::CSSToStyleMap::mapNinePieceImageQuad):
(WebCore::CSSToStyleMap::mapNinePieceImageRepeat):
* css/Counter.h:
(WebCore::Counter::listStyleIdent):
* css/DeprecatedStyleBuilder.cpp:
(WebCore::ApplyPropertyNumber::applyValue):
(WebCore::ApplyPropertyAuto::applyValue):
(WebCore::ApplyPropertyClip::applyValue):
(WebCore::ApplyPropertyColor::applyValue):
(WebCore::ApplyPropertyLength::applyValue):
(WebCore::ApplyPropertyString::applyValue):
(WebCore::ApplyPropertyComputeLength::applyValue):
(WebCore::ApplyPropertyFontFamily::applyValue):
(WebCore::ApplyPropertyFontSize::applyValue):
(WebCore::ApplyPropertyFontWeight::applyValue):
(WebCore::ApplyPropertyFontVariantLigatures::applyValue):
(WebCore::ApplyPropertyCounter::applyValue):
(WebCore::ApplyPropertyCursor::applyValue):
(WebCore::ApplyPropertyTextAlign::applyValue):
(WebCore::ApplyPropertyMarqueeIncrement::applyValue):
(WebCore::ApplyPropertyMarqueeRepetition::applyValue):
(WebCore::ApplyPropertyMarqueeSpeed::applyValue):
(WebCore::ApplyPropertyLineHeight::applyValue):
(WebCore::ApplyPropertyPageSize::getPageSizeFromName):
(WebCore::ApplyPropertyPageSize::applyValue):
(WebCore::ApplyPropertyTextEmphasisStyle::applyValue):
(WebCore::ApplyPropertyResize::applyValue):
(WebCore::ApplyPropertyVerticalAlign::applyValue):
(WebCore::ApplyPropertyZoom::applyValue):
(WebCore::ApplyPropertyClipPath::applyValue):
(WebCore::ApplyPropertyShape::applyValue):
(WebCore::ApplyPropertyImageResolution::applyValue):
(WebCore::ApplyPropertyTextIndent::applyValue):
* css/MediaQueryEvaluator.cpp:
(WebCore::orientationMediaFeatureEval):
(WebCore::view_modeMediaFeatureEval):
(WebCore::pointerMediaFeatureEval):
* css/SVGCSSParser.cpp:
(WebCore::CSSParser::parseSVGValue):
* css/SVGCSSStyleSelector.cpp:
(WebCore::StyleResolver::applySVGProperty):
* css/StylePropertySet.cpp:
(WebCore::StylePropertySet::getLayeredShorthandValue):
* css/StyleResolver.cpp:
(WebCore::createGridTrackBreadth):
(WebCore::createGridTrackList):
(WebCore::createGridPosition):
(WebCore::StyleResolver::applyProperty):
(WebCore::colorForCSSValue):
(WebCore::StyleResolver::colorFromPrimitiveValueIsDerivedFromElement):
(WebCore::StyleResolver::colorFromPrimitiveValue):
(WebCore::StyleResolver::createCustomFilterOperationWithInlineSyntax):
(WebCore::StyleResolver::createFilterOperations):
* css/ViewportStyleResolver.cpp:
(WebCore::ViewportStyleResolver::getViewportArgumentValue):
* css/WebKitCSSMatrix.cpp:
(WebCore::WebKitCSSMatrix::setMatrixValue):
* editing/ApplyStyleCommand.cpp:
(WebCore::toIdentifier):
* editing/EditingStyle.cpp:
(WebCore::identifierForStyleProperty):
(WebCore::HTMLElementEquivalent::create):
(WebCore::HTMLElementEquivalent::HTMLElementEquivalent):
(WebCore::HTMLElementEquivalent::valueIsPresentInStyle):
(WebCore::HTMLTextDecorationEquivalent::create):
(WebCore::HTMLTextDecorationEquivalent::HTMLTextDecorationEquivalent):
(WebCore::EditingStyle::textDirection):
(WebCore::EditingStyle::prepareToApplyAt):
(WebCore::EditingStyle::textDirectionForSelection):
(WebCore::fontWeightIsBold):
(WebCore::legacyFontSizeFromCSSValue):
(WebCore::isTransparentColorValue):
* editing/EditingStyle.h:
* editing/markup.cpp:
(WebCore::propertyMissingOrEqualToNone):
* platform/blackberry/RenderThemeBlackBerry.cpp:
(WebCore::RenderThemeBlackBerry::systemFont):
* platform/blackberry/RenderThemeBlackBerry.h:
(WebCore::RenderThemeBlackBerry::systemFont):
* platform/blackberry/RenderThemeEfl.cpp:
(WebCore::RenderThemeEfl::systemFont):
* platform/blackberry/RenderThemeEfl.h:
(WebCore::RenderThemeEfl::systemFont):
* platform/gtk/RenderThemeGtk.cpp:
(WebCore::RenderThemeGtk::systemFont):
* platform/gtk/RenderThemeGtk.h:
* platform/gtk/RenderThemeGtk2.cpp:
(WebCore::RenderThemeGtk::systemColor):
* platform/gtk/RenderThemeGtk3.cpp:
(WebCore::RenderThemeGtk::systemColor):
* platform/qt/RenderThemeQt.cpp:
(WebCore::RenderThemeQt::systemFont):
(WebCore::RenderThemeQt::systemColor):
* platform/qt/RenderThemeQt.h:
* rendering/RenderTheme.cpp:
(WebCore::RenderTheme::systemColor):
* rendering/RenderTheme.h:
* rendering/RenderThemeMac.h:
* rendering/RenderThemeMac.mm:
(WebCore::RenderThemeMac::systemFont):
(WebCore::RenderThemeMac::systemColor):
* rendering/RenderThemeSafari.h:
(WebCore::RenderThemeSafari::systemFont):
* rendering/RenderThemeSafari.cpp:
(WebCore::RenderThemeSafari::systemFont):
* rendering/RenderThemeWin.cpp:
(WebCore::RenderThemeWin::systemFont):
(WebCore::cssValueIdToSysColorIndex):
(WebCore::RenderThemeWin::systemColor):
* rendering/RenderThemeWin.h:
* rendering/RenderThemeWinCE.cpp:
(WebCore::RenderThemeWinCE::systemFont):
(WebCore::cssValueIdToSysColorIndex):
(WebCore::RenderThemeWinCE::systemColor):
* rendering/RenderThemeWinCE.h:
2013-06-19 Brent Fulgham <bfulgham@apple.com>
AX: List Items should support a default action
https://bugs.webkit.org/show_bug.cgi?id=117812
Reviewed by Chris Fleizach.
* accessibility/AccessibilityObject.cpp:
(WebCore::AccessibilityObject::actionVerb): Provide a "select" verb
for use in ListItemRole objects.
* platform/LocalizedStrings.cpp:
(WebCore::AXListItemActionVerb): Added.
* platform/LocalizedStrings.h:
* platform/blackberry/LocalizedStringsBlackBerry.cpp:
(WebCore::AXListItemActionVerb):
* platform/efl/LocalizedStringsEfl.cpp:
(WebCore::AXListItemActionVerb):
* platform/gtk/LocalizedStringsGtk.cpp:
(WebCore::AXListItemActionVerb):
2013-06-20 Radu Stavila <stavila@adobe.com>
[CSS Regions] Add new regionOversetChange event
https://bugs.webkit.org/show_bug.cgi?id=117508
Added regionOversetChange event and tests for it. The overset value of the region has been moved to the ElementRareData
object instead of the RenderRegion object. This was needed for the case when a reattach is performed (for instance by changing
the display type of the region's containing block) and the RenderRegion object is destroyed. When computing the overset again,
there would be no "previous" value to compare it to and decide whether the regionOversetChange event must be dispatched.
Reviewed by Antti Koivisto.
Tests: fast/regions/webkit-named-flow-event-add-to-flow.html:
fast/regions/webkit-named-flow-event-auto-height.html:
fast/regions/webkit-named-flow-event-crash.html:
fast/regions/webkit-named-flow-event-no-regions.html:
fast/regions/webkit-named-flow-event-region-in-flexbox-no-overset-change.html: Added.
fast/regions/webkit-named-flow-event-region-in-flexbox-overset-change.html: Added.
fast/regions/webkit-named-flow-event-remove-from-dom.html:
fast/regions/webkit-named-flow-event-remove-from-flow.html:
fast/regions/webkit-named-flow-event-target.html:
fast/regions/webkit-named-flow-event-to-null.html:
fast/regions/webkit-named-flow-event.html:
* GNUmakefile.list.am:
* Target.pri:
* WebCore.xcodeproj/project.pbxproj:
* dom/Element.cpp:
(WebCore::Element::setRegionOversetState):
(WebCore::Element::regionOversetState):
(WebCore::Element::webkitRegionOverset):
* dom/Element.h:
* dom/ElementRareData.cpp:
* dom/ElementRareData.h:
(WebCore::ElementRareData::regionOversetState):
(WebCore::ElementRareData::setRegionOversetState):
(WebCore::ElementRareData::ElementRareData):
* dom/EventNames.h:
* dom/WebKitNamedFlow.cpp:
(WebCore::WebKitNamedFlow::firstEmptyRegionIndex):
(WebCore::WebKitNamedFlow::dispatchRegionOversetChangeEvent):
* dom/WebKitNamedFlow.h:
(WebCore::ChangeRegionOversetTask::ChangeRegionOversetTask):
(WebCore::ChangeRegionOversetTask::scheduleFor):
(WebCore::ChangeRegionOversetTask::unschedule):
(WebCore::ChangeRegionOversetTask::reset):
(WebCore::ChangeRegionOversetTask::onTimer):
* rendering/RegionOversetState.h: Added.
* rendering/RenderBlock.cpp:
(WebCore::RenderBlock::computeOverflow):
* rendering/RenderFlowThread.cpp:
(WebCore::RenderFlowThread::RenderFlowThread):
(WebCore::RenderFlowThread::layout):
(WebCore::RenderFlowThread::computeOversetStateForRegions):
* rendering/RenderFlowThread.h:
* rendering/RenderNamedFlowThread.cpp:
(WebCore::RenderNamedFlowThread::RenderNamedFlowThread):
(WebCore::RenderNamedFlowThread::dispatchRegionOversetChangeEvent):
(WebCore::RenderNamedFlowThread::regionOversetChangeEventTimerFired):
* rendering/RenderNamedFlowThread.h:
* rendering/RenderRegion.cpp:
(WebCore::RenderRegion::RenderRegion):
(WebCore::RenderRegion::regionOversetState):
(WebCore::RenderRegion::setRegionOversetState):
* rendering/RenderRegion.h:
2013-06-20 James Craig <james@cookiecrook.com>
AX: aria-required is not exposed on all expected roles
https://bugs.webkit.org/show_bug.cgi?id=115123
Reviewed by Chris Fleizach.
aria-required is now exposed on more roles. Updated existing test file.
* accessibility/AccessibilityNodeObject.cpp:
(WebCore::AccessibilityNodeObject::supportsRequiredAttribute):
* accessibility/AccessibilityNodeObject.h:
* accessibility/AccessibilityObject.h:
(WebCore::AccessibilityObject::supportsRequiredAttribute):
* accessibility/mac/WebAccessibilityObjectWrapperMac.mm:
(-[WebAccessibilityObjectWrapper additionalAccessibilityAttributeNames]):
2013-06-20 Seokju Kwon <seokju.kwon@gmail.com>
Web Inspector: Use console.timeStamp instead of console.markTimeline
https://bugs.webkit.org/show_bug.cgi?id=117810
Reviewed by Joseph Pecoraro.
Webkit supports both console.timeStamp and console.markTimeline.
And they do the exact same thing.
This patch gets rid of console.markTimeline for Chrome/Firebug compatibility.
No new functionality, no new tests.
* WebCore.order:
* page/Console.cpp:
* page/Console.h:
* page/Console.idl:
2013-06-20 Grzegorz Czajkowski <g.czajkowski@samsung.com>
background-color and text-decoration are not preserved when merging paragraphs
https://bugs.webkit.org/show_bug.cgi?id=116215
Reviewed by Ryosuke Niwa.
In mergeInlineAndImplicitStyleOfElement(), style from matched rules are retrieved.
If they contain either background-color or text-decoration they will be removed
by removeNonEditingProperties() due to copyEditingProperties() implicit
'OnlyInheritableEditingProperties' parameter.
We have already had similar issue at https://bugs.webkit.org/show_bug.cgi?id=53196
Tests: editing/deleting/merge-div-from-span-with-style.html
editing/deleting/merge-paragraph-from-span-with-multiple-text-decoration.html
editing/deleting/merge-paragraph-from-span-with-style.html
* editing/EditingStyle.cpp:
(WebCore::copyEditingProperties):
(WebCore::editingStyleFromComputedStyle):
Add EditingStyle:: due to move EditingPropertiesToInclude to EditingStyle.h.
(WebCore::toEditingProperties):
Add a helper to easy convert PropertiesToInclude to EditingPropertiesToInclude,
needed in mergeInlineAndImplicitStyleOfElement().
(WebCore::EditingStyle::removeAllButEditingProperties):
Add a parameter to choose which editing properties should be preserved while
removing all properties (OnlyInheritableEditingProperties implicite).
(WebCore::EditingStyle::mergeInlineAndImplicitStyleOfElement):
Call removeAllButEditingProperties with parameter.
* editing/EditingStyle.h:
Move EditingPropertiesType to the header as it's needed by removeAllButEditingProperties().
Change EditingPropertiesType to EditingPropertiesToInclude to be consistent with
PropertiesToInclude.
Change removeNonEditingProperties() to removeAllButEditingProperties().
2013-06-19 Christophe Dumez <ch.dumez@sisa.samsung.com>
The order of the generated supplemental code is not guaranteed
https://bugs.webkit.org/show_bug.cgi?id=117820
Reviewed by Kentaro Hara.
Sort the supplemental idl files before generating the code so that it is
generated in a consistent order.
No new tests, covered by existing bindings tests.
* bindings/scripts/generate-bindings.pl:
2013-06-19 Commit Queue <commit-queue@webkit.org>
Unreviewed, rolling out r151769.
http://trac.webkit.org/changeset/151769
https://bugs.webkit.org/show_bug.cgi?id=117821
Broke windows build due to missing GL/glext.h header.
(Requested by bfulgham on #webkit).
* WebCore.vcxproj/WebCore.vcxproj:
* WebCore.vcxproj/WebCore.vcxproj.filters:
2013-06-19 Alex Christensen <alex.christensen@flexsim.com>
Added WebGL files to Windows build without enabling them.
https://bugs.webkit.org/show_bug.cgi?id=117809
Reviewed by Brent Fulgham.
* WebCore.vcxproj/WebCore.vcxproj: Added WebGL source files.
* WebCore.vcxproj/WebCore.vcxproj.filters: Added platform\graphics\opengl and platform\graphics\gpu filters.
2013-06-19 Alex Christensen <achristensen@apple.com>
Windows build should include WebGL generated files if WebGL is enabled.
https://bugs.webkit.org/show_bug.cgi?id=117802
Reviewed by Brent Fulgham.
Added WebGL generated files to Windows build if WebGL is enabled.
* DerivedSources.cpp:
* WebCore.vcxproj/WebCore.vcxproj:
* WebCore.vcxproj/WebCore.vcxproj.filters:
2013-06-19 Alexey Proskuryakov <ap@apple.com>
[Mac] Common crashes when playing media
https://bugs.webkit.org/show_bug.cgi?id=117813
<rdar://problem/13837412>
Reviewed by Eric Carlson.
* platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
(-[WebCoreAVFLoaderDelegate resourceLoader:didCancelLoadingRequest:]):
This method may be called from a secondary thread, but it does things that are
not thread safe.
2013-06-19 Yuki Sekiguchi <yuki.sekiguchi@access-company.com>
Incomplete repaint of input elements in writing-mode overflow
https://bugs.webkit.org/show_bug.cgi?id=110246
Reviewed by Simon Fraser.
We calculate repaint rect using unflipped rect.
However, RenderBox::applyCachedClipAndScrollOffsetForRepaint() which is called from repaint rect calculation
wants that its argument rect is flipped.
The reason is:
- paintRect.move(-scrolledContentOffset()); cannot scroll if the rect is unflipped.
- It cannot clip using intersect.
Passing unflipped rect to applyCachedClipAndScrollOffsetForRepaint() cause invalid clipping.
Therefore, this patch flipped the rect at the first part of the function and unflipped it at the last part of the function.
Scroll bar rect is absolute rect, so it is flipped rect.
RenderLayer::invalidateScrollbarRect() pass the rect to repaintRectangle() which expects an argument rect is unflipped.
This cause part of overlapping scroll bar doesn't fade out.
Therefore, this patch flipped the rect and pass it to repaintRectangle().
Tests: fast/repaint/horizontal-bt-overflow-child.html
fast/repaint/horizontal-bt-overflow-parent.html
fast/repaint/horizontal-bt-overflow-same.html
fast/repaint/vertical-overflow-child.html
fast/repaint/vertical-overflow-parent.html
fast/repaint/vertical-overflow-same.html
* rendering/RenderBox.cpp:
(WebCore::RenderBox::applyCachedClipAndScrollOffsetForRepaint):
* rendering/RenderLayer.cpp:
(WebCore::RenderLayer::invalidateScrollbarRect):
2013-06-19 Benjamin Poulain <bpoulain@apple.com>
Use the PlatformEvent timestamp when creating a DOM Event
https://bugs.webkit.org/show_bug.cgi?id=117179
Reviewed by Darin Adler.
Previously, the platform event's timestamp was ignored by WebCore and each
new event would get a new timestamp by calling WTF::currentTime().
The problem is there can be a significant delay between the input event and
it being dispatched to JavaScript. Computing the velocity/acceleration of the cursor
is impossible since the delay vary from event to events.
On WebKit2, the delay per event typically vary between 0 and 30ms.
This patch changes the Event creation code to use the timer passed by the underlying platform event.
* WebCore.exp.in:
* dom/Event.cpp:
(WebCore::Event::Event):
* dom/Event.h:
* dom/GestureEvent.cpp:
(WebCore::GestureEvent::create):
(WebCore::GestureEvent::GestureEvent):
* dom/GestureEvent.h:
* dom/KeyboardEvent.cpp:
(WebCore::KeyboardEvent::KeyboardEvent):
* dom/KeyboardEvent.h:
* dom/MouseEvent.cpp:
(WebCore::MouseEvent::create):
(WebCore::MouseEvent::MouseEvent):
(WebCore::SimulatedMouseEvent::SimulatedMouseEvent):
* dom/MouseEvent.h:
* dom/MouseRelatedEvent.cpp:
(WebCore::MouseRelatedEvent::MouseRelatedEvent):
* dom/MouseRelatedEvent.h:
* dom/TouchEvent.cpp:
(WebCore::TouchEvent::TouchEvent):
* dom/UIEvent.cpp:
(WebCore::UIEvent::UIEvent):
* dom/UIEvent.h:
* dom/UIEventWithKeyState.h:
(WebCore::UIEventWithKeyState::UIEventWithKeyState):
* dom/WheelEvent.cpp:
(WebCore::WheelEvent::WheelEvent):
(WebCore::WheelEventDispatchMediator::WheelEventDispatchMediator):
* dom/WheelEvent.h:
(WebCore::WheelEvent::create):
* page/EventHandler.cpp:
(WebCore::EventHandler::dispatchDragEvent):
* platform/mac/PlatformEventFactoryMac.mm:
(WebCore::PlatformMouseEventBuilder::PlatformMouseEventBuilder):
(WebCore::PlatformWheelEventBuilder::PlatformWheelEventBuilder):
(WebCore::PlatformKeyboardEventBuilder::PlatformKeyboardEventBuilder):
(WebCore::PlatformGestureEventBuilder::PlatformGestureEventBuilder):
2013-06-19 Alexis Menard <alexis@webkit.org>
Make sure to use CSSValueID and CSSPropertyID rather than integers
https://bugs.webkit.org/show_bug.cgi?id=117481
Reviewed by Benjamin Poulain.
This will ensure that types are enforced when passing arguments in various
css functions. Having a compile time check make sure that no mistakes
will be done over the type.
The parser was also patched to directly use CSSValueID over integers.
This patch also fixes various call sites abusing the usage of integers.
This is part 1 of 2.
No new tests : existing ones should cover.
* WebCore.xcodeproj/project.pbxproj: copy CSSValueKeywords.h as it could be used in WebKit/ for example.
* css/CSSComputedStyleDeclaration.cpp:
(WebCore::valueForRepeatRule):
(WebCore::cssIdentifierForFontSizeKeyword):
(WebCore::identifierForFamily):
(WebCore::valueForFamily):
* css/CSSGrammar.y.in:
* css/CSSParser.cpp:
(WebCore::parseColorValue):
(WebCore::parseKeywordValue):
(WebCore::CSSParser::parseValidPrimitive):
(WebCore::CSSParser::parseValue):
(WebCore::CSSParser::parseContent):
(WebCore::CSSParser::parseBackgroundColor):
(WebCore::CSSParser::parseFillPositionComponent):
(WebCore::CSSParser::parse3ValuesFillPosition):
(WebCore::CSSParser::parseFillRepeat):
(WebCore::CSSParser::parseAnimationProperty):
(WebCore::CSSParser::parseCounterContent):
(WebCore::CSSParser::parseLineHeight):
(WebCore::CSSParser::parseFontSize):
(WebCore::CSSParser::createFontWeightValueKeyword):
(WebCore::CSSParser::parseFontWeight):
(WebCore::parseDeprecatedGradientColorStop):
(WebCore::parseGradientColorOrKeyword):
(WebCore::CSSParser::parseDeprecatedRadialGradient):
(WebCore::CSSParser::rewriteSpecifiers):
* css/CSSParser.h:
* css/CSSParserValues.h:
* css/CSSPrimitiveValue.h:
* css/CSSValuePool.cpp:
(WebCore::CSSValuePool::createIdentifierValue):
* css/CSSValuePool.h:
* css/StylePropertySet.cpp:
(WebCore::MutableStylePropertySet::setProperty):
* css/StylePropertySet.h:
* dom/StyledElement.cpp:
(WebCore::StyledElement::setInlineStyleProperty):
(WebCore::StyledElement::addPropertyToPresentationAttributeStyle):
* dom/StyledElement.h:
* editing/EditingStyle.cpp:
(WebCore::HTMLFontSizeEquivalent::attributeValueAsCSSValue):
(WebCore::EditingStyle::prepareToApplyAt):
* editing/EditorCommand.cpp:
(WebCore::executeApplyStyle):
(WebCore::executeFontSize):
* html/HTMLElement.cpp:
(WebCore::unicodeBidiAttributeForDirAuto):
(WebCore::HTMLElement::applyAlignmentAttributeToStyle):
* html/HTMLFontElement.cpp:
(WebCore::HTMLFontElement::cssValueFromFontSizeNumber):
(WebCore::HTMLFontElement::collectStyleForPresentationAttribute):
* html/HTMLFontElement.h:
* html/HTMLTableElement.cpp:
(WebCore::leakBorderStyle):
* html/track/TextTrackCue.cpp:
(WebCore::TextTrackCue::getCSSWritingDirection):
(WebCore::TextTrackCue::getCSSWritingMode):
* html/track/TextTrackCue.h:
2013-06-19 Bem Jones-Bey <bjonesbe@adobe.com>
Fix a few missed renames from Exclusions -> Shapes
https://bugs.webkit.org/show_bug.cgi?id=117803
Reviewed by David Hyatt.
In the great CSS Exclusions to CSS Shapes rename, a few instances were
missed. This fixes those instances.
No new tests, no behavior change, just renames.
* rendering/RenderBlock.cpp:
(WebCore::RenderBlock::updateRegionsAndShapesBeforeChildLayout):
(WebCore::RenderBlock::updateRegionsAndShapesAfterChildLayout):
(WebCore::RenderBlock::layoutBlock):
(WebCore::RenderBlock::logicalLeftOffsetForLine):
(WebCore::RenderBlock::logicalRightOffsetForLine):
* rendering/RenderBlock.h:
* rendering/RenderDeprecatedFlexibleBox.cpp:
(WebCore::RenderDeprecatedFlexibleBox::layoutBlock):
* rendering/RenderFlexibleBox.cpp:
(WebCore::RenderFlexibleBox::layoutBlock):
* rendering/RenderGrid.cpp:
(WebCore::RenderGrid::layoutBlock):
2013-06-19 Oliver Hunt <oliver@apple.com>
Incorrect use of jsCast in a finalizer
https://bugs.webkit.org/show_bug.cgi?id=117807
Reviewed by Geoffrey Garen.
We can't use jsCast in a finalizer as it checks an object's structure,
and the structure may already have been swept by that point. Use a
static_cast instead.
* bridge/runtime_array.cpp:
(JSC::RuntimeArray::destroy):
2013-06-19 Brent Fulgham <bfulgham@apple.com>
[Windows] AX: Extend notification handling
https://bugs.webkit.org/show_bug.cgi?id=117761.
Reviewed by Anders Carlsson.
accessibility/press-works-on-control-types.html
* accessibility/win/AXObjectCacheWin.cpp:
(WebCore::AXObjectCache::postPlatformNotification): Add handlers for more event notifications.
* accessibility/win/AccessibilityObjectWrapperWin.cpp:
(WebCore::AccessibilityObjectWrapper::accessibilityAttributeValue): Protect against null
pointer dereference found during testing.
* dom/Document.cpp:
(WebCore::Document::implicitClose): Execute notification handler for Windows as well as Mac.
* page/FrameView.cpp:
(WebCore::FrameView::layout): Ditto.
2013-06-19 peavo@outlook.com <peavo@outlook.com>
[WinCairo] Webfont rendering is broken.
https://bugs.webkit.org/show_bug.cgi?id=117695
Reviewed by Brent Fulgham.
The native font handle created from webfont data is invalid.
In much the same way it's done in WinApple, we first need to install the webfont,
create a native font handle from the new font name,
and pass the font handle to the FontPlatformData object, where it's needed to get the glyphs.
* platform/graphics/FontPlatformData.h: Added HFONT parameter to constructor.
* platform/graphics/win/FontCustomPlatformDataCairo.cpp:
(WebCore::FontCustomPlatformData::~FontCustomPlatformData): Release installed webfont.
(WebCore::FontCustomPlatformData::fontPlatformData): Create valid HFONT handle for webfont.
(WebCore::createUniqueFontName): Added method to create webfont name.
(WebCore::createFontCustomPlatformData): Install font from webfont data.
* platform/graphics/win/FontCustomPlatformDataCairo.h: Removed.
* platform/graphics/win/FontPlatformDataCairoWin.cpp:
(WebCore::FontPlatformData::FontPlatformData): Added HFONT parameter to constructor.
2013-06-19 Christophe Dumez <ch.dumez@sisa.samsung.com>
Implement WebIDL implements
https://bugs.webkit.org/show_bug.cgi?id=117785
Reviewed by Kentaro Hara.
Add support for Web IDL 'implements' statements to the bindings generator:
http://www.w3.org/TR/WebIDL/#dfn-implements-statement
Introduce ChildNode IDL interface and have Element, DocumentType and
CharacterData implement it, to match the specification:
http://dom.spec.whatwg.org/#childnode
There is no change in behavior, merely refactoring to match the
specification by leveraging support for Web IDL implements statements.
No new tests, no behavior change.
* CMakeLists.txt:
* DerivedSources.make:
* DerivedSources.pri:
* GNUmakefile.list.am:
* bindings/scripts/generate-bindings.pl:
* bindings/scripts/preprocess-idls.pl:
(GeneratePartialInterface):
(getImplementersFromIDL):
* bindings/scripts/test/CPP/WebDOMTestImplements.cpp: Added.
* bindings/scripts/test/CPP/WebDOMTestImplements.h: Added.
* bindings/scripts/test/CPP/WebDOMTestInterface.cpp:
(WebDOMTestInterface::implementsStr1):
(WebDOMTestInterface::implementsStr2):
(WebDOMTestInterface::setImplementsStr2):
(WebDOMTestInterface::implementsNode):
(WebDOMTestInterface::setImplementsNode):
(WebDOMTestInterface::implementsMethod1):
(WebDOMTestInterface::implementsMethod4):
* bindings/scripts/test/CPP/WebDOMTestInterface.h:
* bindings/scripts/test/GObject/WebKitDOMTestImplements.cpp: Added.
* bindings/scripts/test/GObject/WebKitDOMTestImplements.h: Added.
* bindings/scripts/test/GObject/WebKitDOMTestInterface.cpp:
(webkit_dom_test_interface_set_property):
(webkit_dom_test_interface_get_property):
(webkit_dom_test_interface_class_init):
(webkit_dom_test_interface_implements_method1):
(webkit_dom_test_interface_implements_method2):
(webkit_dom_test_interface_implements_method4):
(webkit_dom_test_interface_get_implements_str1):
(webkit_dom_test_interface_get_implements_str2):
(webkit_dom_test_interface_set_implements_str2):
(webkit_dom_test_interface_get_implements_node):
(webkit_dom_test_interface_set_implements_node):
* bindings/scripts/test/GObject/WebKitDOMTestInterface.h:
* bindings/scripts/test/JS/JSTestImplements.cpp: Added.
* bindings/scripts/test/JS/JSTestImplements.h: Added.
* bindings/scripts/test/JS/JSTestInterface.cpp:
(WebCore::jsTestInterfaceConstructorImplementsStaticReadOnlyAttr):
(WebCore::jsTestInterfaceConstructorImplementsStaticAttr):
(WebCore::jsTestInterfaceImplementsStr1):
(WebCore::jsTestInterfaceImplementsStr2):
(WebCore::jsTestInterfaceImplementsStr3):
(WebCore::jsTestInterfaceImplementsNode):
(WebCore::setJSTestInterfaceConstructorImplementsStaticAttr):
(WebCore::setJSTestInterfaceImplementsStr2):
(WebCore::setJSTestInterfaceImplementsStr3):
(WebCore::setJSTestInterfaceImplementsNode):
(WebCore::jsTestInterfacePrototypeFunctionImplementsMethod1):
(WebCore::jsTestInterfacePrototypeFunctionImplementsMethod2):
(WebCore::jsTestInterfacePrototypeFunctionImplementsMethod3):
(WebCore::jsTestInterfaceConstructorFunctionImplementsMethod4):
(WebCore::jsTestInterfaceIMPLEMENTSCONSTANT1):
(WebCore::jsTestInterfaceIMPLEMENTSCONSTANT2):
* bindings/scripts/test/JS/JSTestInterface.h:
* bindings/scripts/test/ObjC/DOMTestImplements.cpp: Added.
* bindings/scripts/test/ObjC/DOMTestImplements.h: Added.
* bindings/scripts/test/ObjC/DOMTestInterface.h:
* bindings/scripts/test/ObjC/DOMTestInterface.mm:
(-[DOMTestInterface implementsStr1]):
(-[DOMTestInterface implementsStr2]):
(-[DOMTestInterface setImplementsStr2:]):
(-[DOMTestInterface implementsStr3]):
(-[DOMTestInterface setImplementsStr3:]):
(-[DOMTestInterface implementsNode]):
(-[DOMTestInterface setImplementsNode:]):
(-[DOMTestInterface implementsMethod1]):
(-[DOMTestInterface implementsMethod2:objArg:]):
(-[DOMTestInterface implementsMethod3]):
(-[DOMTestInterface implementsMethod4]):
* bindings/scripts/test/TestImplements.idl: Added.
* dom/CharacterData.idl:
* dom/ChildNode.idl: Copied from Source/WebCore/dom/DocumentType.idl.
* dom/DocumentType.idl:
* dom/Element.idl:
2013-06-19 Robert Hogan <robert@webkit.org>
Incorrect computation of shrink-to-fit width for block with white-space:nowrap and floating children
https://bugs.webkit.org/show_bug.cgi?id=114879
Reviewed by David Hyatt.
Per http://www.w3.org/TR/CSS21/visudet.html#Computing_widths_and_margins when width is auto then floating non-replaced,
absolute non-replaced, and inline-block non-replaced elements should use shrink-to-fit width. This trumps any no-wrap property
on the element so if we are shrinking to fit ensure our minimum width respects all possible line breaks.
Test: fast/block/shrink-to-fit-width-container-with-floating-children.html
* rendering/RenderBlock.cpp:
(WebCore::RenderBlock::computeIntrinsicLogicalWidths):
2013-06-19 Christophe Dumez <ch.dumez@sisa.samsung.com>
Do not require JS*Custom.h header if [CustomPutFunction] / [CustomNamedSetter] is used
https://bugs.webkit.org/show_bug.cgi?id=117795
Reviewed by Kentaro Hara.
Fix the JS bindings generator so that it stops including JS*Custom.h header whenever
[CustomPutFunction] or [CustomNamedSetter] IDL extended attributes are used. We don't
really need this custom header and this forces the developer to create dummy custom
headers so that it builds.
If the developer really needs such custom header to be included, he can still use
[JSCustomHeader] IDL extended attribute to do so.
This patch also remove the dummy custom headers that were created but are no longer
required to build.
No new tests, no behavior change. Already covered by the following bindings test:
TestInterface.idl
* GNUmakefile.list.am:
* Target.pri:
* WebCore.vcxproj/WebCore.vcxproj:
* WebCore.vcxproj/WebCore.vcxproj.filters:
* WebCore.xcodeproj/project.pbxproj:
* bindings/js/JSDOMStringMapCustom.h: Removed.
* bindings/js/JSHTMLAppletElementCustom.cpp:
* bindings/js/JSHTMLAppletElementCustom.h: Removed.
* bindings/js/JSHTMLEmbedElementCustom.cpp:
* bindings/js/JSHTMLEmbedElementCustom.h: Removed.
* bindings/js/JSHTMLObjectElementCustom.cpp:
* bindings/js/JSHTMLObjectElementCustom.h: Removed.
* bindings/js/JSHistoryCustom.cpp:
* bindings/js/JSHistoryCustom.h: Removed.
* bindings/js/JSLocationCustom.cpp:
* bindings/js/JSLocationCustom.h: Removed.
* bindings/js/JSStorageCustom.cpp:
* bindings/js/JSStorageCustom.h: Removed.
* bindings/scripts/CodeGeneratorJS.pm:
(GenerateHeader):
2013-06-19 Carlos Garcia Campos <cgarcia@igalia.com>
[BlackBerry] Several tests crash due to an assert when creating an ImageBuffer
https://bugs.webkit.org/show_bug.cgi?id=117793
Reviewed by Rob Buis.
JIRA 388741
Fixes a crash in several layout tests due to an assert when
creating an ImageBuffer with an empty size.
* platform/graphics/blackberry/ImageBufferBlackBerry.cpp:
(WebCore::ImageBuffer::ImageBuffer): Return early if the given
size is empty.
2013-06-19 Víctor Manuel Jáquez Leal <vjaquez@igalia.com>
[GStreamer] [texmap] the bytesPerLine is wrong when updating the texture
https://bugs.webkit.org/show_bug.cgi?id=117551
Reviewed by Philippe Normand.
The bytesPerLine (or stride) is wrong when updating the texture
content. This is because the naturalSize() is not updated to the
current buffer. This patch extracts the current value of the size and
the stride.
No tests required.
* platform/graphics/gstreamer/MediaPlayerPrivateGStreamerBase.cpp:
(WebCore::MediaPlayerPrivateGStreamerBase::updateTexture):
(WebCore::MediaPlayerPrivateGStreamerBase::paintToTextureMapper):
2013-06-19 Andre Moreira Magalhaes <andre.magalhaes@collabora.co.uk>
Adjust internal size on gstreamer source element when receiving data if necessary
https://bugs.webkit.org/show_bug.cgi?id=116534
Reviewed by Philippe Normand.
If the size received in didReceiveResponse is smaller than the actual size of the received data
update the internal size and the appsrc size to the proper value.
* platform/graphics/gstreamer/WebKitWebSourceGStreamer.cpp:
(StreamingClient::didReceiveData):
2013-06-19 Víctor Manuel Jáquez Leal <vjaquez@igalia.com>
[GStreamer] Potential race condition when getting the video sink caps.
https://bugs.webkit.org/show_bug.cgi?id=117736
Reviewed by Philippe Normand.
There is a potential race condition with the pad setting caps, as the
buffer and the caps won't match when renegotiation happens, and might
cause a crash.
This patch keeps an instance of the current caps in the video sink,
and it is accessible through a getter method. Hence the player can ask
for the current caps without running into a race condition.
No new tests. No change in behaviour.
* platform/graphics/gstreamer/MediaPlayerPrivateGStreamerBase.cpp:
(WebCore::MediaPlayerPrivateGStreamerBase::naturalSize):
(WebCore::MediaPlayerPrivateGStreamerBase::paint):
(WebCore::MediaPlayerPrivateGStreamerBase::currentVideoSinkCaps):
(WebCore::MediaPlayerPrivateGStreamerBase::createVideoSink):
* platform/graphics/gstreamer/MediaPlayerPrivateGStreamerBase.h:
* platform/graphics/gstreamer/VideoSinkGStreamer.cpp:
(webkitVideoSinkGetProperty):
(webkitVideoSinkStop):
(webkitVideoSinkSetCaps):
(webkit_video_sink_class_init):
2013-06-19 Kihong Kwon <kihong.kwon@samsung.com>
Vibration can be canceled even if page visibility status is hidden
https://bugs.webkit.org/show_bug.cgi?id=117333
Reviewed by Gyuyoung Kim.
vibration can be canceled in the onvisibilitychange listener even if page visibility is changed to hidden status.
Therefore cancelVibration needs to work when page visibility is hidden.
Tests: vibration/cancelVibration-after-pagevisibility-changed-to-hidden.html
* Modules/vibration/NavigatorVibration.cpp:
(WebCore::NavigatorVibration::vibrate):
* Modules/vibration/Vibration.h:
(WebCore::Vibration::isVibrating):
* testing/Internals.cpp:
(WebCore::Internals::isVibrating):
* testing/Internals.h:
* testing/Internals.idl:
2013-06-18 Ryosuke Niwa <rniwa@webkit.org>
Input type range slider is not updated when min or max are changed
https://bugs.webkit.org/show_bug.cgi?id=117778
Reviewed by Kent Tamura.
Merge https://chromium.googlesource.com/chromium/blink/+/089c7a0ba2d85b9b59632c2603fbc6472b310be1.
Test: fast/forms/range/range-change-min-max.html
* html/RangeInputType.cpp:
(WebCore::RangeInputType::minOrMaxAttributeChanged):
2013-06-18 Ryosuke Niwa <rniwa@webkit.org>
Remove two superfluous overrides of supportsFocus
https://bugs.webkit.org/show_bug.cgi?id=117770
Reviewed by Benjamin Poulain.
Merge https://chromium.googlesource.com/chromium/blink/+/4228964a63e3a889a40efce0d01866629fdcd9b9.
* html/HTMLOptGroupElement.cpp:
* html/HTMLOptGroupElement.h:
* html/HTMLOptionElement.cpp:
* html/HTMLOptionElement.h:
2013-06-18 Darin Adler <darin@apple.com>
Improve style of null checks in FrameView::setFrameRect
https://bugs.webkit.org/show_bug.cgi?id=117681
Reviewed by Sam Weinig.
* page/FrameView.cpp:
(WebCore::FrameView::setFrameRect): Used nested if statements and local variables
to tighten this code up a little.
2013-06-18 Christophe Dumez <ch.dumez@sisa.samsung.com>
Move IDL extended attributes to their correct location
https://bugs.webkit.org/show_bug.cgi?id=117732
Reviewed by Kentaro Hara.
Move IDL extended attributes to their correct location according to the
latest Web IDL specification. We used to be inconsistent in the positioning
of the extended attributes. This simplifies a lot the code of the IDL parser
and makes our IDL files more standard.
Based on Blink r148345 by Kentaro Hara <haraken@chromium.org>.
No new tests, no behavior change.
* Modules/encryptedmedia/MediaKeyMessageEvent.idl:
* Modules/notifications/Notification.idl:
* Modules/speech/SpeechSynthesisVoice.idl:
* bindings/scripts/IDLParser.pm:
(parseDefinitions):
(parseInterfaceMembers):
(parseInterfaceMember):
(parseDictionaryMembers):
(parseAttributeOrOperationOrIterator):
(parseAttribute):
* css/CSSFontFaceLoadEvent.idl:
* dom/Document.idl:
* dom/Element.idl:
* dom/Node.idl:
* html/HTMLBodyElement.idl:
* html/HTMLEmbedElement.idl:
* html/HTMLFrameSetElement.idl:
* html/HTMLMediaElement.idl:
* html/HTMLSelectElement.idl:
* html/HTMLSourceElement.idl:
* page/DOMWindow.idl:
* svg/SVGElementInstance.idl:
* svg/SVGScriptElement.idl:
* testing/TypeConversions.idl:
2013-06-18 Jessie Berlin <jberlin@apple.com>
Let the script to update the Localizable.strings file do the reordering it wants to do.
Rubber-stamped by Anders Carlsson.
* English.lproj/Localizable.strings:
2013-06-18 Brent Fulgham <bfulgham@apple.com>
[Windows] Unreviewed gardening -- show missing AccessibilityNodeObject source
files in Visual Studio.
* WebCore.vcxproj/WebCore.vcxproj: Add missing files.
* WebCore.vcxproj/WebCore.vcxproj.filters: Ditto.
2013-06-18 Commit Queue <commit-queue@webkit.org>
Unreviewed, rolling out r151513.
http://trac.webkit.org/changeset/151513
https://bugs.webkit.org/show_bug.cgi?id=117763
It causes assertions in debug (Requested by benjaminp on
#webkit).
* rendering/RenderLayerBacking.cpp:
(WebCore::RenderLayerBacking::startAnimation):
(WebCore::RenderLayerBacking::startTransition):
2013-06-18 Roger Fong <roger_fong@apple.com>
Replace tools32 folder with tools and update WebKit Windows solution accordingly.
<rdar://problem/14118143>.
Rubberstamped by Brent Fulgham.
* WebCore.vcxproj/QTMovieWin/QTMovieWin.vcxproj:
* WebCore.vcxproj/QTMovieWin/QTMovieWinCairoDebug.props:
* WebCore.vcxproj/QTMovieWin/QTMovieWinCairoRelease.props:
* WebCore.vcxproj/QTMovieWin/QTMovieWinDebug.props:
* WebCore.vcxproj/QTMovieWin/QTMovieWinPostBuild.cmd:
* WebCore.vcxproj/QTMovieWin/QTMovieWinProduction.props:
* WebCore.vcxproj/QTMovieWin/QTMovieWinRelease.props:
* WebCore.vcxproj/WebCore.vcxproj:
* WebCore.vcxproj/WebCoreDebug.props:
* WebCore.vcxproj/WebCoreDebugWinCairo.props:
* WebCore.vcxproj/WebCoreGenerated.vcxproj:
* WebCore.vcxproj/WebCoreGeneratedDebug.props:
* WebCore.vcxproj/WebCoreGeneratedDebugWinCairo.props:
* WebCore.vcxproj/WebCoreGeneratedProduction.props:
* WebCore.vcxproj/WebCoreGeneratedRelease.props:
* WebCore.vcxproj/WebCoreGeneratedReleaseWinCairo.props:
* WebCore.vcxproj/WebCoreProduction.props:
* WebCore.vcxproj/WebCoreRelease.props:
* WebCore.vcxproj/WebCoreReleaseWinCairo.props:
* WebCore.vcxproj/WebCoreTestSupport.vcxproj:
* WebCore.vcxproj/build-generated-files.sh:
2013-06-18 Zoltan Horvath <zoltan@webkit.org>
[CSS Shapes] Remove lineOverflowsFromShapeInside boolean from RenderBlock::layoutRunsAndFloatsInRange function
https://bugs.webkit.org/show_bug.cgi?id=117757
Reviewed by David Hyatt.
We don't need keep lineOverflowsFromShapeInside boolean in RenderBlock::layoutRunsAndFloatsInRange and in its
helpers because it's easy to decide whether we are in an shape content overflow state or not, so I got rid of
lineOverflowsFromShapeInside's occurences and updated the affected functions.
Covered by existing overflow tests in fast/exclusions/shape-inside and fast/regions/shape-inside.
* rendering/RenderBlock.h: Update helper's definition.
* rendering/RenderBlockLineLayout.cpp:
(WebCore::pushShapeContentOverflowBelowTheContentBox): Add condition when overflow is already positioned.
(WebCore::RenderBlock::updateShapeAndSegmentsForCurrentLine): Remove lineOverflowsFromShapeInside.
(WebCore::RenderBlock::updateShapeAndSegmentsForCurrentLineInFlowThread): Remove lineOverflowsFromShapeInside.
(WebCore::RenderBlock::layoutRunsAndFloatsInRange): Remove lineOverflowsFromShapeInside.
2013-06-18 Zalan Bujtas <zalan@apple.com>
widthMediaFeatureEval ends up with null FrameView during iframe unload.
https://bugs.webkit.org/show_bug.cgi?id=117754
Reviewed by Geoffrey Garen.
Ensure that MediaQueryEvaluator checks against NULL FrameView.
While frames are being unloaded, the Frame object does not necessarily have valid
FrameView anymore. Layout on the main frame can end up querying media values on such child
frames, while detaching.
Test: fast/frames/crash-when-child-iframe-forces-layout-during-unload-and-sibling-frame-has-mediaquery.html
* css/MediaQueryEvaluator.cpp:
(WebCore::orientationMediaFeatureEval):
(WebCore::aspect_ratioMediaFeatureEval):
(WebCore::evalResolution):
(WebCore::heightMediaFeatureEval):
(WebCore::widthMediaFeatureEval):
(WebCore::MediaQueryEvaluator::eval):
2013-06-18 Ruth Fong <ruth_fong@apple.com>
Expose a getMediaType method in WebKit
https://bugs.webkit.org/show_bug.cgi?id=117667
Reviewed by Brady Eidson.
* WebCore.exp.in: Updated to add a symbol for
HitTestResult::mediaIsVideo method
and alphabetize the list of exposed methods.
2013-06-18 Ryosuke Niwa <rniwa@webkit.org>
Remove unused bool argument from ReplacementFragment's constructor
https://bugs.webkit.org/show_bug.cgi?id=117752
Reviewed by Antti Koivisto.
Merge https://chromium.googlesource.com/chromium/blink/+/265586d9f154a9dff657511d09926429b8e1b53d.
* editing/ReplaceSelectionCommand.cpp:
(WebCore::ReplacementFragment::ReplacementFragment):
(WebCore::ReplaceSelectionCommand::doApply):
2013-06-18 Eric Carlson <eric.carlson@apple.com>
Not all subtitle tracks are SDH
https://bugs.webkit.org/show_bug.cgi?id=117738
Reviewed by Dean Jackson.
No new tests, existing tests updated.
* html/track/InbandTextTrack.cpp:
(WebCore::InbandTextTrack::isSDH): New.
* html/track/InbandTextTrack.h: Add isSDH override.
* html/track/TextTrack.h:
* page/CaptionUserPreferencesMac.mm:
(WebCore::trackDisplayName): Only add "SDH" label if a track claims to be SDH.
* platform/graphics/InbandTextTrackPrivate.h:
(WebCore::InbandTextTrackPrivate::isSDH): New.
* platform/graphics/avfoundation/objc/InbandTextTrackPrivateAVFObjC.h:
* platform/graphics/avfoundation/objc/InbandTextTrackPrivateAVFObjC.mm:
(WebCore::InbandTextTrackPrivateAVFObjC::isSDH): Return true if track has both "transcribes
spoken dialog for accessibility" and "describes music and sound for accessibility"
characteristics.
2013-06-18 Ryosuke Niwa <rniwa@webkit.org>
Simplify FormKeyGenerator::willDeleteForm
https://bugs.webkit.org/show_bug.cgi?id=117751
Reviewed by Antti Koivisto.
Merge https://chromium.googlesource.com/chromium/blink/+/c6399efb9da863eb1d1fc98b17ef925998b985ac
* html/FormController.cpp:
(WebCore::FormKeyGenerator::willDeleteForm):
2013-06-18 Ryosuke Niwa <rniwa@webkit.org>
REGRESSION(r147602): Search text field doesn't render selection when it has some :focus rules
https://bugs.webkit.org/show_bug.cgi?id=117747
Reviewed by Kent Tamura.
Merge https://chromium.googlesource.com/chromium/blink/+/7ff656c8239ce3b125246abcc8b149a603fcff28
r147612 added setNeedsLayout(true, MarkOnlyThis) for
TextControlInnerTextElement renderer. It's ok for input[type=text]
because RenderTextControlSingleLine also has needsLayout flag, and it
has only the inner text renderer as a child.
As for input[type=search], it doesn't work. Renderer structure for
input[type=search] is:
RenderTextControlSingleLine
└Renderer for TextControlInnerContainer
└Renderer for TextControlInnerElement
└Renderer for TextControlInnerTextElement
After r147612, there is a case that only RenderTextControlSingleLine
and TextControlInnerTextElement renderer have needsLayout flag, and
others don't. It won't trigger layout for
TextControlInnerTextElement renderer.
We should set needsLayout flags of TextControlInnerContainer renderer
and TextControlInnerElement renderer by MarkContainingBlockChain.
Manual Tests: search-select-all-with-focus-style.html
(I tried but couldn't make a test that works in DRT)
* rendering/RenderTextControlSingleLine.cpp:
(WebCore::RenderTextControlSingleLine::styleDidChange):
2013-06-18 Dean Jackson <dino@apple.com>
Attempted build fix for non-Mac.
* platform/graphics/SimpleFontData.cpp:
(WebCore::SimpleFontData::nonSyntheticItalicFontData):
2013-06-18 Dean Jackson <dino@apple.com>
Synthesized vertical italics on rotated glyphs are transformed incorrectly
https://bugs.webkit.org/show_bug.cgi?id=117726
Reviewed by Enrica Casucci.
If a font does not have italic glyphs, and is in a vertical flow, then
the synthesis of italics was skewing in the wrong direction. While here,
ensure that no CJK text will get italics in vertical layout.
This is a topic under discussion in the CSS Working Group. The resolution
at the June 2013 face-to-face was that:
- italics in Japanese (and Chinese) text are rare in vertical layout
- most people wanted Latin text to italicize in the direction of the line flow
The final behaviour was left undefined, but we consider the change here
to be sufficient for now. In all cases, the best solution is to avoid
synthesized italics by specifying a font that includes such forms.
Tests: fast/text/international/synthesized-italic-vertical-latin.html
fast/text/international/synthesized-italic-vertical.html
* platform/graphics/FontGlyphs.cpp:
(WebCore::glyphDataAndPageForCJKCharacterWithoutSyntheticItalic): New function
that makes a new glyph data pair that is marked as NOT using a synthesized italic.
(WebCore::FontGlyphs::glyphDataAndPageForCharacter): If this is a CJK character and
has a synthesized oblique, then run it through the function above to make a new glyph data pair.
* platform/graphics/SimpleFontData.cpp:
(WebCore::SimpleFontData::nonSyntheticItalicFontData): Creates/returns a new SimpleFontData that will
not synthesize italics.
* platform/graphics/SimpleFontData.h: New method nonSyntheticItalicFontData.
* platform/graphics/mac/FontMac.mm:
(WebCore::Font::drawGlyphs): This is the actual bug fix. If you are in a vertical flow, the
skew direction should be downwards, not leftwards.
2013-06-18 Commit Queue <commit-queue@webkit.org>
Unreviewed, rolling out r151549.
http://trac.webkit.org/changeset/151549
https://bugs.webkit.org/show_bug.cgi?id=117741
broke selection in the web inspector source after scrolling
(Requested by smfr on #webkit).
* rendering/RenderBox.cpp:
(WebCore::RenderBox::computeRectForRepaint):
* rendering/RenderLayerModelObject.cpp:
* rendering/RenderLayerModelObject.h:
2013-06-18 Santosh Mahto <santosh.ma@samsung.com>
<video> element delays document load event for ~ 3 seconds
https://bugs.webkit.org/show_bug.cgi?id=90272
Reviewed by Eric Carlson.
Test: media/media-preload-no-delay-loadevent.html
* html/HTMLMediaElement.cpp:
(WebCore::HTMLMediaElement::prepareForLoad):
No need to delay document load event here when preload="none"
2013-06-18 Diego Pino Garcia <dpino@igalia.com>
[GTK] Remove comment about possibility of handling ObjCPolymorphic (it's used by ObjC bindings only)
https://bugs.webkit.org/show_bug.cgi?id=117546
Reviewed by Xan Lopez.
According to the WebKit IDL spec the modifier ObjCPolymorphic only
applies to the Objective-C bindings generator
* bindings/scripts/CodeGeneratorGObject.pm:
(IsPolymorphic): Remove comment. Search parameter 'type' in array, instead of
concatening a series of 'or' conditionals.
2013-06-18 Víctor Manuel Jáquez Leal <vjaquez@igalia.com>
Fix after r151673
https://bugs.webkit.org/show_bug.cgi?id=116042
Reviewed by Philippe Normand.
Removed a spurious semicolon in the video sink caps definition.
No new tests, no behavior change.
* platform/graphics/gstreamer/VideoSinkGStreamer.cpp:
2013-06-18 Praveen R Jadhav <praveen.j@samsung.com>
[WebSpeech] Speech Recognition requires convertValue support in JSDictionary
https://bugs.webkit.org/show_bug.cgi?id=117731
Reviewed by Christophe Dumez.
Build fails after enabling ENABLE_SCRIPTED_SPEECH feature. This patch
resolves the issue.
No new tests. No change in behaviour.
* bindings/js/JSDictionary.cpp:
(WebCore::JSDictionary::convertValue):
* bindings/js/JSDictionary.h:
2013-06-18 Mary Wu <mary.wu@torchmobile.com.cn>
[BlackBerry] only notify download client when download error
https://bugs.webkit.org/show_bug.cgi?id=117687
Reviewed by Rob Buis.
When met network error in downloading, we notify the error to download
client through download stream, we shouldn't notify page client the error.
RIM JIRA 419985
* platform/network/blackberry/NetworkJob.cpp:
(WebCore::NetworkJob::shouldNotifyClientFailed):
2013-06-18 Mario Sanchez Prada <mario.prada@samsung.com>
Shader compiler not properly configured for GLES on cairo based ports
https://bugs.webkit.org/show_bug.cgi?id=117705
Reviewed by Martin Robinson.
Configure the shader compiler with SH_ESSL_OUTPUT for GLESv2
compliant platforms, and with SH_GLSL_OUTPUT otherwise.
* platform/graphics/cairo/GraphicsContext3DCairo.cpp:
(WebCore::GraphicsContext3D::GraphicsContext3D):
2013-06-18 Christophe Dumez <ch.dumez@sisa.samsung.com>
touching any idl rebuilds all derived sources
https://bugs.webkit.org/show_bug.cgi?id=117708
Reviewed by Kentaro Hara.
Fix preprocess-idls.pl script to update the following files only
if they have changed:
DerivedSources/WebCore/supplemental_dependency.tmp
DerivedSources/WebCore/DOMWindowConstructors.idl
DerivedSources/WebCore/WorkerContextConstructors.idl
This avoids triggering uselessly bindings generation for all IDL
files whenever an IDL file is touched.
No new tests, no behavior change.
* bindings/scripts/preprocess-idls.pl:
(WriteFileIfChanged):
(GeneratePartialInterface):
2013-06-18 Víctor Manuel Jáquez Leal <vjaquez@igalia.com>
[GStreamer] [texmap] upload a video buffer into the video texture
https://bugs.webkit.org/show_bug.cgi?id=116042
Reviewed by Philippe Normand.
This patch prepares more quickly the texture when the video frame is
already in the GPU memory.
It is done using a new buffer's metadata available in GStreamer 1.2,
and its purpose is to upload buffers into a OpenGL texture.
If the decoder provides buffers with this metadata, the buffer will be
uploaded into the texture used for the video display and it will be
rendered, avoiding a expensive mem copies. This is particularly useful
for Full HD videos, where all the processing and display will be done
in the GPU.
No new tests, covered by existing tests.
* platform/graphics/gstreamer/MediaPlayerPrivateGStreamerBase.cpp:
(WebCore::MediaPlayerPrivateGStreamerBase::MediaPlayerPrivateGStreamerBase):
(WebCore::MediaPlayerPrivateGStreamerBase::updateTexture):
* platform/graphics/gstreamer/MediaPlayerPrivateGStreamerBase.h:
* platform/graphics/gstreamer/VideoSinkGStreamer.cpp:
(webkitVideoSinkProposeAllocation):
2013-06-17 Peter Gal <galpeter@inf.u-szeged.hu>
[curl] Set the http response status text
https://bugs.webkit.org/show_bug.cgi?id=117307
Reviewed by Brent Fulgham.
No new tests, covered by existing ones.
* platform/network/curl/ResourceHandleManager.cpp:
(WebCore::headerCallback):
2013-06-14 Brent Fulgham <bfulgham@apple.com>
AX: Correct accessibility role when -webkit-box:display is used.
https://bugs.webkit.org/show_bug.cgi?id=117706
Reviewed by Chris Fleizach.
accessibility/box-styled-lists.html
* accessibility/AccessibilityRenderObject.cpp:
(WebCore::AccessibilityRenderObject::determineAccessibilityRole): If HTML token is
of the list element type, treat it as a ListItemRole accessibility role, regardless
of what specific renderer is being used.
2013-06-17 Roger Fong <roger_fong@apple.com>
Add some UNUSED_PARAMs to RenderBlock.cpp so that it builds properly if CSS_EXCLUSIONS is disabled.
https://bugs.webkit.org/show_bug.cgi?id=117722.
Rubberstamped by Jon Lee.
* rendering/RenderBlock.cpp:
(WebCore::RenderBlock::updateRegionsAndExclusionsAfterChildLayout):
(WebCore::RenderBlock::logicalLeftOffsetForLine):
(WebCore::RenderBlock::logicalRightOffsetForLine):
2013-06-17 Beth Dakin <bdakin@apple.com>
PageBanners appear over HTML5 video when media element is in full screen mode
https://bugs.webkit.org/show_bug.cgi?id=117721
-and corresponding-
<rdar://problem/13686998>
Reviewed by Sam Weinig.
Update the scrolling tree when a header/footer has been removed.
* rendering/RenderLayerCompositor.cpp:
(WebCore::RenderLayerCompositor::updateLayerForHeader):
(WebCore::RenderLayerCompositor::updateLayerForFooter):
2013-06-17 Roger Fong <roger_fong@apple.com>
Modify Windows makefiles to copy some bin output into Program Files.
https://bugs.webkit.org/show_bug.cgi?id=117714.
<rdar://problem/14179054>
Reviewed by Brent Fulgham.
* WebCore.vcxproj/WebCore.make:
2013-06-17 Max Vujovic <mvujovic@adobe.com>
Crash in loadPendingShaders
https://bugs.webkit.org/show_bug.cgi?id=117665
Reviewed by Dean Jackson.
Speculative fix because the crash reports do not contain a test case.
Rearrange the conditions to check m_state.hasPendingShaders() first. Additionally, check if
m_state.style() is non-null.
No new tests. We don't know how to reproduce this crash yet.
* css/StyleResolver.cpp:
(WebCore::StyleResolver::loadPendingShaders):
2013-06-17 Ruth Fong <ruth_fong@apple.com>
REGRESSION: Important controls are missing from <video> element UI, when compared to QuickTime
https://bugs.webkit.org/show_bug.cgi?id=20599
Add a "Download Video"/"Download Audio" context menu item to download media
elements.
Reviewed by Beth Dakin.
No new tests. media/context-menu-action.html,
which has been disabled by bug 116651, is used to test context menus.
* English.lproj/Localizable.strings: Updated to
include localizable strings for "Download Video" and "Download Audio".
* page/ContextMenuController.cpp: Updated to
include and handle a "Download Video/Audio" context menu item.
* platform/ContextMenuItem.h:
* platform/LocalizedStrings.cpp:
* platform/LocalizedStrings.h:
* platform/efl/LocalizedStringsEfl.cpp:
* platform/gtk/LocalizedStringsGtk.cpp:
* platform/qt/LocalizedStringsQt.cpp:
Updated to include localizable strings for "Download Video" and "Download Audio".
2013-06-17 Zoltan Horvath <zoltan@webkit.org>
[CSS Shapes] Consider bottom borders when calculating the position of the overflow
https://bugs.webkit.org/show_bug.cgi?id=117663
Reviewed by Alexandru Chiculita.
When you have a shape and the content overflows from the shape we need to push the overflow below the content box,
not below the border box. We didn't consider the bottom borders of the content box, now I fixed it too and the overflow
just starts after the content box. I added a new helper function called pushShapeContentOverflowBelowTheContentBox. Now
both the shape in flow thread and the shape overflow use the same function. I added a new test and modified the existing
tests to cover all the affected cases.
Test: fast/exclusions/shape-inside/shape-inside-overflow-fixed-dimensions-block-content.html
Existing overflow tests also modified to test the behavior:
fast/exclusions/shape-inside/shape-inside-empty-expected.html
fast/exclusions/shape-inside/shape-inside-overflow-fixed-dimensions-block-content-expected.html
fast/exclusions/shape-inside/shape-inside-overflow-fixed-dimensions-block-content.html
fast/exclusions/shape-inside/shape-inside-overflow-fixed-dimensions-expected.html
fast/exclusions/shape-inside/shape-inside-overflow-fixed-dimensions.html
fast/regions/shape-inside/shape-inside-on-regions-block-content-overflow-multiple-shapes-expected.html
fast/regions/shape-inside/shape-inside-on-regions-block-content-overflow-multiple-shapes.html
* rendering/RenderBlockLineLayout.cpp:
(WebCore::pushShapeContentOverflowBelowTheContentBox):
(WebCore::RenderBlock::updateShapeAndSegmentsForCurrentLine):
(WebCore::RenderBlock::updateShapeAndSegmentsForCurrentLineInFlowThread):
2013-06-17 Igor Oliveira <igor.o@sisa.samsung.com>
[CSS Regions] ::before and ::after pseudo-elements are not displayed for regions
https://bugs.webkit.org/show_bug.cgi?id=80163
When the implementation of the before/after was moved to the DOM, before/after generated
content stoppped to work with css regions. The problem happens when:
1. RenderRegion can not have children and when the PseudoElement::attach tries to create a renderer for the
generated content, it fails.
2. RenderRegion::canHaveGeneratedChildren should not be false because regions can have generated content.
Reviewed by David Hyatt.
Tests: fast/regions/region-dynamic-after-before.html
fast/regions/region-generated-content-before-after.html
* dom/NodeRenderingContext.cpp:
(WebCore::NodeRenderingContext::shouldCreateRenderer):
* rendering/RenderRegion.h:
2013-06-17 Michael Brüning <michael.bruning@digia.com>
[Mac] Remove unmaintained GStreamer specific video code.
https://bugs.webkit.org/show_bug.cgi?id=117694
Reviewed by Philippe Normand.
No new tests, no behaviour change.
* platform/mac/WebVideoFullscreenController.mm:
(-[WebVideoFullscreenController setupVideoOverlay:]):
(-[WebVideoFullscreenController windowDidLoad]):
(-[WebVideoFullscreenController setMediaElement:]):
(-[WebVideoFullscreenController windowDidExitFullscreen]):
2013-06-17 Michael Brüning <michael.bruning@digia.com>
[Qt] Remove Qt specific QTKIT flagged code.
https://bugs.webkit.org/show_bug.cgi?id=117635
Reviewed by Simon Hausmann.
Due to disabling QTKIT for Qt in r151546, the
code the flags that are not taken into account
anymore and the code that has been rendered
unreachable by this are removed.
No new tests, no behavioural change.
* Target.pri:
* WebCore.exp.in:
* page/Settings.cpp:
* page/Settings.h:
* platform/KURL.h:
* platform/SharedBuffer.h:
* platform/cf/KURLCFNet.cpp:
(WebCore::KURL::fileSystemPath):
* platform/cf/SharedBufferCF.cpp:
* platform/graphics/FloatSize.h:
* platform/graphics/IntRect.h:
* platform/graphics/IntSize.h:
* platform/graphics/MediaPlayer.cpp:
(WebCore::installedMediaEngines):
* platform/graphics/cg/FloatSizeCG.cpp:
* platform/graphics/cg/IntRectCG.cpp:
* platform/graphics/mac/MediaPlayerPrivateQTKit.h:
* platform/graphics/mac/MediaPlayerPrivateQTKit.mm:
(WebCore::MediaPlayerPrivateQTKit::createQTMovieLayer):
(WebCore::MediaPlayerPrivateQTKit::preferredRenderingMode):
(WebCore::MediaPlayerPrivateQTKit::paint):
(-[WebCoreMovieObserver layerHostChanged:]):
* platform/mac/SharedBufferMac.mm:
(+[WebCoreSharedBufferData initialize]):
(WebCore::SharedBuffer::createWithContentsOfFile):
2013-06-17 Allan Sandfeld Jensen <allan.jensen@digia.com>
REGRESSSION(r151632) : Build error on ASSERT(WTF_USE_GRAMMAR_CHECKING)
https://bugs.webkit.org/show_bug.cgi?id=117692
Reviewed by Jocelyn Turcotte.
Ifdef the feature-depending code and fix the assertions to check runtime conditions.
* editing/Editor.cpp:
(WebCore::Editor::advanceToNextMisspelling):
(WebCore::Editor::markMisspellingsOrBadGrammar):
(WebCore::Editor::markBadGrammar):
* editing/TextCheckingHelper.cpp:
(WebCore::findBadGrammars):
(WebCore::TextCheckingHelper::findFirstGrammarDetail):
(WebCore::TextCheckingHelper::findFirstBadGrammar):
(WebCore::TextCheckingHelper::isUngrammatical):
(WebCore::TextCheckingHelper::markAllBadGrammar):
(WebCore::checkTextOfParagraph):
* editing/TextCheckingHelper.h:
2013-06-17 Grzegorz Czajkowski <g.czajkowski@samsung.com>
Unreviewed, rolling out r151632.
http://trac.webkit.org/changeset/151632
https://bugs.webkit.org/show_bug.cgi?id=117585
Debug build error ASSERT(WTF_USE_GRAMMAR_CHECKING) for non MAC
platforms
* page/ContextMenuController.cpp:
(WebCore::ContextMenuController::contextMenuItemSelected):
(WebCore::ContextMenuController::createAndAppendSpellingAndGrammarSubMenu):
(WebCore::ContextMenuController::populate):
(WebCore::ContextMenuController::checkOrEnableIfNeeded):
* platform/LocalizedStrings.cpp:
(WebCore::contextMenuItemTagSpellingMenu):
(WebCore::contextMenuItemTagShowSpellingPanel):
(WebCore::contextMenuItemTagCheckGrammarWithSpelling):
* platform/LocalizedStrings.h:
* platform/efl/LocalizedStringsEfl.cpp:
(WebCore::contextMenuItemTagSpellingMenu):
(WebCore::contextMenuItemTagShowSpellingPanel):
(WebCore::contextMenuItemTagCheckGrammarWithSpelling):
* platform/gtk/LocalizedStringsGtk.cpp:
(WebCore::contextMenuItemTagSpellingMenu):
(WebCore::contextMenuItemTagShowSpellingPanel):
(WebCore::contextMenuItemTagCheckGrammarWithSpelling):
* platform/qt/LocalizedStringsQt.cpp:
(WebCore::contextMenuItemTagSpellingMenu):
(WebCore::contextMenuItemTagShowSpellingPanel):
(WebCore::contextMenuItemTagCheckGrammarWithSpelling):
2013-06-17 Carlos Garcia Campos <cgarcia@igalia.com>
Unreviewed. Fix make distcheck.
* GNUmakefile.list.am: Remove non existent files from compilation
and add a missing header file.
2013-06-14 Grzegorz Czajkowski <g.czajkowski@samsung.com>
Context menu grammar checking items are available when GRAMMAR_CHECKING macro is off
https://bugs.webkit.org/show_bug.cgi?id=117585
Reviewed by Anders Carlsson.
Do not add "Check Grammar With Spelling" and "Ignore Grammar" to the context menu
when GRAMMAR_CHECKING is off.
Replace "Spelling and Grammar" with "Spelling" as the sub menu title and "Show/Hide Spelling
and Grammar" with "Show/Hide Spelling" when GRAMMAR_CHECKING is off.
Additionally, guard grammar checking in context menu code to not necessarily
compile it.
No new layout tests because every port has a different way of showing
spelling/grammar context menu items.
* page/ContextMenuController.cpp:
(WebCore::ContextMenuController::contextMenuItemSelected):
(WebCore::ContextMenuController::createAndAppendSpellingAndGrammarSubMenu):
(WebCore::ContextMenuController::populate):
(WebCore::ContextMenuController::checkOrEnableIfNeeded):
* platform/LocalizedStrings.cpp:
(WebCore::contextMenuItemTagCheckGrammarWithSpelling):
(WebCore::contextMenuItemTagSpellingMenu):
(WebCore::contextMenuItemTagShowSpellingPanel):
* platform/LocalizedStrings.h:
* platform/efl/LocalizedStringsEfl.cpp:
(WebCore::contextMenuItemTagCheckGrammarWithSpelling):
(WebCore::contextMenuItemTagSpellingMenu):
(WebCore::contextMenuItemTagShowSpellingPanel):
* platform/gtk/LocalizedStringsGtk.cpp:
(WebCore::contextMenuItemTagCheckGrammarWithSpelling):
(WebCore::contextMenuItemTagSpellingMenu):
(WebCore::contextMenuItemTagShowSpellingPanel):
* platform/qt/LocalizedStringsQt.cpp:
(WebCore::contextMenuItemTagCheckGrammarWithSpelling):
(WebCore::contextMenuItemTagSpellingMenu):
(WebCore::contextMenuItemTagShowSpellingPanel):
2013-06-16 Simon Fraser <simon.fraser@apple.com>
Fix test assertion after r151624
An assertion was hit in RenderObject::willBeDestroyed()
for fast/css/getComputedStyle/getComputedStyle-background-shorthand.html
because the code asserted that the RenderObject had been removed from
the FrameView's slowRepaintObject set before remove() was called,
so move the assertion to after that call.
* rendering/RenderObject.cpp:
(WebCore::RenderObject::willBeDestroyed):
2013-06-16 Gyuyoung Kim <gyuyoung.kim@samsung.com>
Remove a redundant virtual call to hostWindow() in FrameView::invalidateRect()
https://bugs.webkit.org/show_bug.cgi?id=117685
Reviewed by Andreas Kling.
From Blink r152490 by <vivek.vg@samsung.com>
* page/FrameView.cpp:
(WebCore::FrameView::invalidateRect): Avoid hostWindow() twice call.
2013-06-16 Kent Tamura <tkent@chromium.org>
Fix two assertion failures in Range::insertNode
https://bugs.webkit.org/show_bug.cgi?id=116511
Reviewed by Ryosuke Niwa.
> ASSERTION FAILED: childBefore == (offset ? container->childNode(offset - 1) : 0)
> third_party/WebKit/Source/WebCore/dom/RangeBoundaryPoint.h(115) : void WebCore::RangeBoundaryPoint::set(PassRefPtr<WebCore::Node>, int, WebCore::Node *)
> ASSERTION FAILED: child->parentNode()
> ../../third_party/WebKit/Source/core/dom/RangeBoundaryPoint.h(133) : void WebCore::RangeBoundaryPoint::setToBeforeChild(WebCore::Node *)
> 1 0x87594b2 WebCore::RangeBoundaryPoint::setToBeforeChild(WebCore::Node*)
> 2 0x87534a9 WebCore::Range::insertNode(WTF::PassRefPtr<WebCore::Node>, int&)
Range::insertNode calls Node::insertBefore, in which an event handler
can update the DOM structure so that RangeBoundaryPoint don't like. We
postpone event dispatching by EventQueueScope.
Also, remove old comments about Acid3. The behavior is standardized.
(Step 9 of http://dom.spec.whatwg.org/#dom-range-insertnode)
This patch imports http://src.chromium.org/viewvc/blink?view=revision&revision=150470 .
Test: fast/dom/Range/range-insertNode-assertion.html
* dom/Range.cpp:
(WebCore::Range::insertNode):
- Add EventQueueScope
- Remove obsolete comments
2013-06-16 Simon Fraser <simon.fraser@apple.com>
Fixed backgrounds in composited layers not repainted on scrolling
https://bugs.webkit.org/show_bug.cgi?id=117684
Reviewed by Tim Horton.
FrameView is aware that "slow-repaint objects" (i.e. renderers with
background-attachment:fixed) require a slow-scrolling path. However,
it was ignorant of the fact that such objects could be painting into
compositing layers; it simply dirtied the main tiles, and nothing else.
Fix by having FrameView track the slow-repaints objects explicitly, as we
do for position:fixed, and repaint each of them on scrolling.
Test: compositing/repaint/fixed-background-scroll.html
* page/FrameView.cpp:
(WebCore::FrameView::FrameView): No need to initialize m_slowRepaintObjectCount,
which is now an OwnPtr<RenderObjectSet>.
(WebCore::FrameView::useSlowRepaints): Use hasSlowRepaintObjects() now.
(WebCore::FrameView::addSlowRepaintObject): Now adds the object to a set,
allocating the set if necessary.
(WebCore::FrameView::removeSlowRepaintObject): Remove the object from the set,
and deallocate the set if empty.
(WebCore::FrameView::scrollContentsSlowPath): Call repaintSlowRepaintObjects();
this is the change that fixes the bug for always-composited implementations (e.g.
tile cache). This is a conservative change; we still invalidate the tile cache
as well. This could be optimized later.
(WebCore::FrameView::repaintSlowRepaintObjects): Repaint each object in the set.
Their appropriate compositing ancestor will be repainted.
(WebCore::FrameView::scrollPositionChangedViaPlatformWidget): Call
repaintSlowRepaintObjects() so that fixed backgrounds in composited layers are
correctly repainted; this fixes the bug for WebKit1.
* page/FrameView.h: Replace m_slowRepaintObjectCount with a HashSet of
RenderObjects.
(WebCore::FrameView::hasSlowRepaintObject): Takes a RenderObject* now.
(WebCore::FrameView::hasSlowRepaintObjects): Ditto.
* rendering/RenderObject.cpp:
(WebCore::RenderObject::styleWillChange): Pass the RenderObject.
(WebCore::RenderObject::willBeDestroyed): Assert that this RenderObject
has been removed from FrameView's set of slow-repaint objects already, if
the document is not being destroyed.
(WebCore::RenderObject::willBeRemovedFromTree): Pass the RenderObject.
2013-06-15 Simon Fraser <simon.fraser@apple.com>
Painting of fixed background images is wrong in composited layers
https://bugs.webkit.org/show_bug.cgi?id=65793
Reviewed by Sam Weinig.
The code that computed background image geometry for background-attachment:fixed
images was unaware of compositing, so often painting the image at the wrong location.
Fix by having RenderBoxModelObject::calculateBackgroundImageGeometry() do the correct
math for fixed backgrounds in composited layer by offsetting the viewport rect by
the paint container's absolute position.
Tests: compositing/backgrounds/fixed-background-on-descendant.html
compositing/backgrounds/fixed-backgrounds.html
* rendering/RenderBox.cpp:
(WebCore::RenderBox::getBackgroundPaintedExtent): Now returns a bool indicating
whether it is returning a reliable extent rect. It can return false in the case where
a background is fixed, since computing the correct extent would require finding
the appropriate composited ancestor to pass to calculateBackgroundImageGeometry().
This is OK since this function is used for "background opaque" optimizations.
(WebCore::RenderBox::computeBackgroundIsKnownToBeObscured): If getBackgroundPaintedExtent()
returns false, return false.
(WebCore::RenderBox::maskClipRect): We removed mask-attachment, so we never need to
compute the composited ancestor here and can pass null.
(WebCore::RenderBox::repaintLayerRectsForImage): Unwrap a comment.
If the changed image is related to a fixed background, geometry.hasNonLocalGeometry()
will be true. In that cause, just repaint the entire renderer rather than groveling
around for a composited ancestor.
* rendering/RenderBox.h: Changed name and signature of backgroundPaintedExtent.
* rendering/RenderBoxModelObject.cpp:
(WebCore::RenderBoxModelObject::paintFillLayerExtended): calculateBackgroundImageGeometry()
now needs to know the painting container.
(WebCore::RenderBoxModelObject::calculateBackgroundImageGeometry): Now takes a painting
container, that is required to correctly compute the viewport-relative offset for fixed
backgrounds. geometry.setHasNonLocalGeometry() is set for fixed backgrounds to indicate
to callers that, if they didn't pass a paint container, the destRect is not accurate.
The main bug fix is also here: we move the viewportRect by the absolute location of
paint container, which is equivalent to the composited layer offset.
(WebCore::RenderBoxModelObject::getGeometryForBackgroundImage): calculateBackgroundImageGeometry()
takes a paint container.
* rendering/RenderBoxModelObject.h:
(WebCore::RenderBoxModelObject::BackgroundImageGeometry::BackgroundImageGeometry):
(WebCore::RenderBoxModelObject::BackgroundImageGeometry::setHasNonLocalGeometry):
(WebCore::RenderBoxModelObject::BackgroundImageGeometry::hasNonLocalGeometry):
* rendering/RenderImage.cpp:
(WebCore::RenderImage::computeBackgroundIsKnownToBeObscured): If getBackgroundPaintedExtent()
can't cheaply give an accurate answer, return false.
* rendering/RenderLayerBacking.cpp:
(WebCore::RenderLayerBacking::updateDirectlyCompositedBackgroundImage): Pass the paint container,
which is our own renderer.
2013-06-15 Simon Fraser <simon.fraser@apple.com>
webkit-backface-visibility on a parent element stops background-position from updating
https://bugs.webkit.org/show_bug.cgi?id=116319
Reviewed by Darin Adler.
The optimization added in r102952 was incorrect in the case where a style change
resulted in a positioned-movement-only layout but also required a repaint; it assumed
that a composited layer did not need to be repainted for a a positioned-movement-only layout.
Fix by making RenderObject::setNeedsLayoutForPositionedMovement() check whether the
style change requires a repaint, and calling setLayerNeedsFullRepaint() in that situation.
Test: compositing/repaint/positioned-movement.html
* rendering/RenderLayer.h: RepaintStatus values do not need to be bit flags.
* rendering/RenderObject.cpp:
(WebCore::RenderObject::setStyle): Pass the old style to setNeedsPositionedMovementLayout().
(WebCore::RenderObject::styleDidChange): Ditto.
* rendering/RenderObject.h:
(WebCore::RenderObject::setNeedsPositionedMovementLayout): Now takes a const RenderStyle*.
* rendering/style/RenderStyle.cpp:
(WebCore::RenderStyle::diff): Remove a comment now that this bug is fixed.
(WebCore::RenderStyle::diffRequiresRepaint): Public wrapper for changeRequiresRepaint().
That function never uses contextSensitiveProperties so we can safely ignore them.
* rendering/style/RenderStyle.h: Expose a way to call changeRequiresRepaint().
2013-06-15 Darin Adler <darin@apple.com>
Try to fix iOS after last Pasteboard change.
* platform/ios/PasteboardIOS.mm:
(WebCore::Pasteboard::writeSelection): Put the new code inline here because the
stringSelectionForPasteboard function is currently Mac-only.
2013-06-15 Darin Adler <darin@apple.com>
Move Pasteboard::getStringSelection to Editor, fixing a layering violation
https://bugs.webkit.org/show_bug.cgi?id=117673
Reviewed by Ryosuke Niwa.
* editing/Editor.h: Added stringSelectionForPasteboardWithImageAltText.
* editing/mac/EditorMac.mm:
(WebCore::Editor::stringSelectionForPasteboard): Moved code here from the Pasteboard
class, since all the Pasteboard class did really was turn around and call back here.
(WebCore::Editor::stringSelectionForPasteboardWithImageAltText): Added. Variant of
the function above that includes image alt text. Separate named functions are often
the best pattern for something like this unless there are many different combinations.
* platform/Pasteboard.h: Remove the Mac-only Pasteboard::getStringSelectioon.
* platform/ios/PasteboardIOS.mm:
(WebCore::Pasteboard::writeSelection):
* platform/mac/PasteboardMac.mm:
(WebCore::Pasteboard::writeSelectionForTypes):
Call the two new functions instead of the old Pasteboard::getStringSelection.
2013-06-15 Darin Adler <darin@apple.com>
Support using clang instead of gcc for bindings preprocessing
https://bugs.webkit.org/show_bug.cgi?id=117674
Reviewed by Sam Weinig.
I couldn't build on my computer because I don't have gcc installed.
This is my cut at fixing it.
* bindings/scripts/CodeGeneratorObjC.pm:
(ReadPublicInterfaces): Use clang if present.
* bindings/scripts/preprocessor.pm:
(applyPreprocessor): Ditto.
2013-06-14 Robert Hogan <robert@webkit.org>
REGRESSION (r148367): Facebook and Twitter icons at macworld.com are stacked vertically, obscuring Twitter one
https://bugs.webkit.org/show_bug.cgi?id=117284
Reviewed by David Hyatt.
Test: fast/text/whitespace/inline-whitespace-wrapping-7.html
We were looking for line breaks in trailing collapsed whitespace even when inside a nowrap inline.
It's wrong to do this as we don't know yet if we will want or need to break - that decision has to
be deferred until we enter a part of the line that is autowrap.
* rendering/RenderBlockLineLayout.cpp:
(WebCore::RenderBlock::LineBreaker::nextSegmentBreak):
2013-06-14 Lukasz Gajowy <l.gajowy@samsung.com>
background-color is not preserved when inserting a new paragraph
https://bugs.webkit.org/show_bug.cgi?id=117138
Reviewed by Ryosuke Niwa.
The style isn't copied because background-color isn't defined as inheritable property.
Test: editing/inserting/insert-paragraph-not-preserving-background-color.html
* editing/InsertParagraphSeparatorCommand.cpp:
(WebCore::InsertParagraphSeparatorCommand::calculateStyleBeforeInsertion):
Passing EditingPropertiesInEffect instead of implicit parameter OnlyEditingInheritableProperties.
2013-06-14 Adam Barth <abarth@webkit.org>
Threaded HTML parser can ASSERT in some situations
https://bugs.webkit.org/show_bug.cgi?id=117662
Reviewed by Ryosuke Niwa.
This patch merges https://chromium.googlesource.com/chromium/blink/+/3c0a112b42d72c7623f78463166dd7f04d680b4c
--->8---
The parser is supposed to stop processing data when there's a pending
location change, but before this CL we would actually process the first
token from every chunk when there was a pending location change.
If the first token in a chunk was a "script" start tag, that would put
the tree builder into TextMode, which can only process character
tokens. If the next chunk starts with another start tag token, the tree
builder would be sad and hit an ASSERT.
This CL reorders a couple lines in HTMLDocumentParser so that we check
for pending location changes before processing any tokens. This change
stops us from processing the first token from each chunk while there is
a pending location change.
This issue can reproduce on any platform, but it reproduced often on
Android because mobile markup often elides spaces between consecutive
script tags. If there are space characters between the script tags,
then those space characters will be the first ones processes in the
chunk, which doesn't trigger the ASSERT.
---8<---
Since we landed this patch in Blink, we've been able to reproduce this
issue on desktops as well. I spoke with rniwa in #webkit and he said
that WebKit doesn't have any current plans to enable the threaded
parser but that it was probably worth merging this patch anyway.
Test: http/tests/navigation/pending-location-change-assert.html
* html/parser/HTMLDocumentParser.cpp:
(WebCore::HTMLDocumentParser::processParsedChunkFromBackgroundParser):
2013-06-14 Patrick Gansterer <paroga@webkit.org>
Introduce USE(WINGDI) for the Windows port
https://bugs.webkit.org/show_bug.cgi?id=116138
Reviewed by Ryosuke Niwa.
Using USE(WINGDI) instead of OS(WINCE) will allow us to
compile the GDI based Windows port on WinNT too.
* config.h:
* platform/graphics/BitmapImage.h:
* platform/graphics/FontPlatformData.h:
* platform/graphics/GlyphBuffer.h:
(WebCore):
(GlyphBuffer):
* platform/graphics/Gradient.h:
(Gradient):
* platform/graphics/GraphicsContext.cpp:
(WebCore):
* platform/graphics/GraphicsContext.h:
(WebCore):
(GraphicsContext):
* platform/graphics/ImageBufferData.h:
* platform/graphics/NativeImagePtr.h:
(WebCore):
* platform/graphics/Path.h:
* platform/graphics/Pattern.h:
* plugins/win/PluginViewWin.cpp:
(WebCore::PluginView::paintWindowedPluginIntoContext):
(WebCore::PluginView::paint):
(WebCore::PluginView::snapshot):
2013-06-13 Jer Noble <jer.noble@apple.com>
Report the memory cost of HTMLMediaElements to GC.
https://bugs.webkit.org/show_bug.cgi?id=117608
Reviewed by Darin Adler.
Report the extra memory cost of a HTMLMediaElement to the VM, in order to
encourage GC to occur after a media element is removed from the DOM.
Because we cannot know for sure the memory cost of our underlying media
framework objects, use the worst case scenario for the media memory cost:
the buffered percentage of movie * the total data length of the movie.
* html/HTMLMediaElement.cpp:
(WebCore::HTMLMediaElement::HTMLMediaElement): Initialize m_reportedExtraMemoryCost.
(WebCore::HTMLMediaElement::removedFrom): Report the extra memory cost.
* html/HTMLMediaElement.h:
* html/TimeRanges.cpp:
(TimeRanges::totalDuration): Added convenience function.
* html/TimeRanges.h:
* platform/graphics/MediaPlayer.cpp:
(WebCore::MediaPlayer::extraMemoryCost): Pass to MediaPlayerPrivate.
* platform/graphics/MediaPlayer.h:
* platform/graphics/MediaPlayerPrivate.h:
(WebCore::MediaPlayerPrivateInterface::extraMemoryCost): Default to 0.
* platform/graphics/avfoundation/MediaPlayerPrivateAVFoundation.cpp:
(WebCore::MediaPlayerPrivateAVFoundation::extraMemoryCost): Return the percentage
loaded * total data length.
* platform/graphics/avfoundation/MediaPlayerPrivateAVFoundation.h:
2013-06-13 Jer Noble <jer.noble@apple.com>
Add support for AVFoundation-backed HTMLMediaElements in the WebVideoFullScreenController.
https://bugs.webkit.org/show_bug.cgi?id=117597
Reviewed by Eric Carlson.
Check for media elements with AVFoundation media types and create a AVPlayerLayer
rather than a QTMovieLayer.
* platform/mac/WebVideoFullscreenController.h:
* platform/mac/WebVideoFullscreenController.mm:
(-[WebVideoFullscreenController setupVideoOverlay:]): Take a CALayer rather than a
QTMovieLayer. Move the code which connects the layer with it's media source into
setMediaElement.
(-[WebVideoFullscreenController windowDidLoad]): Give the window's contentView a generic
CALayer instaead of a QTMovieLayer.
(-[WebVideoFullscreenController setMediaElement:]): Test whether the incoming media
element is backed by a QTMovie or an AVPlayer, and create the appropriate layer.
(-[WebVideoFullscreenController windowDidExitFullscreen]): Remove the observer of
AVPlayer's rate property.
(-[WebVideoFullscreenController observeValueForKeyPath:ofObject:change:context:]):
If the keyPath is "rate", call rateChanged.
2013-06-14 Enrica Casucci <enrica@apple.com>
WKPageFindStringMatches ignores the kWKFindOptionsBackwards option.
https://bugs.webkit.org/show_bug.cgi?id=117647
<rdar://problem/13881024>
Reviewed by Darin Adler.
The API returns the matched ranges in the DOM order regardless of the
find direction, but the index of the first match after the user selection
should take the find direction into account.
Extended existing test in TestWebKitAPI.
* page/Page.cpp:
(WebCore::Page::findStringMatchingRanges): Added handling of the Backwards case.
* page/Page.h: Fixed incorrect name of the enum.
2013-06-14 Jer Noble <jer.noble@apple.com>
REGRESSION (r150651): Web Audio doesn't work at all (silence or squawks) on Mountain Lion
https://bugs.webkit.org/show_bug.cgi?id=117652
Reviewed by Eric Carlson.
r150651 disabled setting the buffer size to a large value, but in so doing, also
disabled setting the buffer size to a small value for Web Audio. Narrow the Mountain
Lion protection to just the <video> element case.
* platform/audio/mac/AudioSessionManagerMac.cpp:
(AudioSessionManager::updateSessionState):
2013-06-14 Ryosuke Niwa <rniwa@webkit.org>
Function names on Object.prototype should be common identifiers
https://bugs.webkit.org/show_bug.cgi?id=117614
Reviewed by Darin Adler.
Use the added common identifiers.
* bindings/js/JSDOMWindowBase.cpp:
(WebCore::JSDOMWindowBase::finishCreation):
(WebCore::JSDOMWindowBase::updateDocument):
2013-06-14 Arpita Bahuguna <a.bah@samsung.com>
Editing: wrong text position when you click enter on the text behind the image
https://bugs.webkit.org/show_bug.cgi?id=115023
Reviewed by Ryosuke Niwa.
When trying to break a line after an image followed by some text, contrary
to the expected behavior the text doesn't move to a new line, instead, the
caret position just shifts to the end of line.
As per the existing implementation for inserting a paragraph separator,
the insertion position obtained corresponds to the point after the image
element.
Since the insertion position doesn't resolve to being offset in the
following text node (0 offset), no splitting of text occurs and the block
to be inserted is placed after the containing (start) block (thereby
causing the caret position to shift).
If the computed insertionPosition points to an element that shall be
ignored for editing purposes (i.e. cannot have a VisiblePosition inside
it), and the position lies either at the start or at the end of such
an element, we should move our Position either upstream or
downstream (respectively) so as to obtain a valid position which can
be used further for splitting of the text.
Test: editing/inserting/insert-paragraph-after-non-editable-node-before-text.html
* editing/InsertParagraphSeparatorCommand.cpp:
(WebCore::InsertParagraphSeparatorCommand::doApply):
Moving the insertionPosition either upstream or downstream, if the point
lies either at the start or at the end of the anchor node.
The ensuing position, if a text node, can then be used for splitting of
the text correctly.
2013-06-14 Alberto Garcia <agarcia@igalia.com>
[BlackBerry] Remove implementation of ContextMenu classes
https://bugs.webkit.org/show_bug.cgi?id=114860
Reviewed by Rob Buis.
This code is not being used so we can safely remove it.
* PlatformBlackBerry.cmake:
* platform/blackberry/ContextMenuBlackBerry.cpp: Removed.
* platform/blackberry/ContextMenuItemBlackBerry.cpp: Removed.
* platform/blackberry/LocalizedStringsBlackBerry.cpp:
2013-06-14 Brent Fulgham <bfulgham@apple.com>
[Windows] Provide simple <meter> drawing logic for testing.
https://bugs.webkit.org/show_bug.cgi?id=117645.
Reviewed by Anders Carlsson.
accessbility/meter-element.html
* rendering/RenderThemeSafari.cpp: Simple test implementation
(WebCore::RenderThemeSafari::adjustMeterStyle): Added.
(WebCore::RenderThemeSafari::supportsMeter): Added.
(WebCore::RenderThemeSafari::meterSizeForBounds): Added.
(WebCore::RenderThemeSafari::paintMeter): Added.
* rendering/RenderThemeSafari.h:
* rendering/RenderThemeWin.cpp:
(WebCore::RenderThemeWin::progressBarTheme): Added.
(WebCore::RenderThemeWin::getClassicThemeData): Support meters.
(WebCore::RenderThemeWin::getThemeData): Support meter theme.
(WebCore::RenderThemeWin::adjustMeterStyle): Added.
(WebCore::RenderThemeWin::supportsMeter): Added.
(WebCore::RenderThemeWin::meterSizeForBounds): Added.
(WebCore::RenderThemeWin::paintMeter): Added.
* rendering/RenderThemeWin.h:
2013-06-14 Eric Carlson <eric.carlson@apple.com>
Potential use-after-free with an event fired at a HTMLMediaElement which is currently being deleted
https://bugs.webkit.org/show_bug.cgi?id=117466
Reviewed by Oliver Hunt.
Merge https://chromium.googlesource.com/chromium/blink/+/f4200a0093b3d9376f703961615359ec7fb712b4
If an event is created using as target an HTMLMediaElement which is
currently being deleted it becomes a heap-use-after free situation.
The GenericEventQueue instance is already owned by the HTMLMediaElement,
and there already is an underlying mechanism to set the target of the
event to NULL, if their target is owner of the queue.
In order to avoid creating this reference in the first place, we enqueue
the event with a NULL target to defer the refcount increment until the
timer for dispatching the event happens (which won't happen at all if
garbage collection is already destroying the objects).
Test: media/track/media-element-enqueue-event-crash.html
* dom/GenericEventQueue.cpp:
(WebCore::GenericEventQueue::enqueueEvent): Don't ASSERT if the event has no target.
* html/HTMLMediaElement.cpp:
(WebCore::HTMLMediaElement::~HTMLMediaElement): Close the event queue so it won't try to
dispatch any pending events.
(WebCore::HTMLMediaElement::scheduleEvent): Don't set the event target, it will happen just
prior to event dispatch.
(WebCore::HTMLMediaElement::stop): Close the event queue.
2013-06-14 Dean Jackson <dino@apple.com>
Clicking on snapshotting plug-ins does not restart them
https://bugs.webkit.org/show_bug.cgi?id=117620
<rdar://problem/13821729>
Follow-up review comments from Darin Adler, with some
discussion on IRC.
Sprinkle OVERRIDE on virtual functions where needed. Also
make sure that the Event is a MouseEvent before casting to it.
* html/HTMLPlugInElement.h: Move defaultEventHandler back to protected and add OVERRIDE.
* html/HTMLPlugInImageElement.cpp:
(WebCore::HTMLPlugInImageElement::defaultEventHandler): Check for MouseEvent and
use toMouseEvent().
* html/HTMLPlugInImageElement.h: Sprinkle some OVERRIDEs, and move defaultEventHandler
to private.
2013-06-14 Timothy Hatcher <timothy@apple.com>
Remove front-end from the WebCore Xcode project.
https://bugs.webkit.org/show_bug.cgi?id=117640
Reviewed by Darin Adler.
* WebCore.xcodeproj/project.pbxproj:
2013-06-14 Jaehun Lim <ljaehun.lim@samsung.com>
CSSParser::parseImageSet() doesn't need a parameter.
https://bugs.webkit.org/show_bug.cgi?id=117617
Reviewed by Darin Adler.
parseImageSet() can get m_valueList directly.
And minor fixes.
No new tests, no behavior change.
* css/CSSParser.cpp:
(WebCore::CSSParser::parseValue):
(WebCore::CSSParser::parseContent):
(WebCore::CSSParser::parseFillImage):
(WebCore::CSSParser::parseBorderImage):
(WebCore::CSSParser::parseImageSet):
* css/CSSParser.h:
2013-06-14 Tiancheng Jiang <tijiang@rim.com>
[BlackBerry] Dropdown button UX updates.
https://bugs.webkit.org/show_bug.cgi?id=117642.
Reviewed by Rob Buis.
JIRA 388652
Internally Reviewed by Jeff Rogers.
Change arrow assert.
* platform/blackberry/RenderThemeBlackBerry.cpp:
(WebCore::RenderThemeBlackBerry::paintMenuList):
2013-06-14 Arvid Nilsson <anilsson@rim.com>
[BlackBerry] LayerTiler fails to tile really big layers
https://bugs.webkit.org/show_bug.cgi?id=117211
Reviewed by Carlos Garcia Campos.
PR 273550
The cause for this bug was that LayerTiler computed which tiles are
visible by exhaustively mapping every tile to normalized device
coordinates and checking if it intersected the viewport. If there was a
lot of tiles, it would get stuck in this loop, iterating over all
tiles, for a very long time. Also, the visibility information was
transferred to the WebKit thread using mutexes, which added unnecessary
mutex contention to the mix.
Fixed by doing the reverse calculation, unprojecting the visible part
of the layer to layer coordinate space to find which tiles are visible.
Instead of doing a traditional unprojection of point to line and see
where the line intersects the layer, this patch uses the w-coordinates
of triangle vertices to perform "perspective correct texturing" of the
intersection points in device space, which is equivalent to
unprojection since perspective correct texturing computes a 2D
coordinate in (normalized) layer coordinate space which is easily
scaled up to the layer bounds and get the visible region expressed in
layer coordinate space.
The visible area is approximated by a rectangle, and a set of tiles
needing render are added to the mix, and we have a swappable data
structure so visbility can be transferred to WebKit thread without
mutexes, but instead using atomic swap.
No new tests, covered by existing tests.
* platform/graphics/blackberry/CanvasLayerWebKitThread.cpp:
(CanvasLayerCompositingThreadClient):
(WebCore::CanvasLayerCompositingThreadClient::drawTextures):
* platform/graphics/blackberry/EGLImageLayerCompositingThreadClient.cpp:
(WebCore::EGLImageLayerCompositingThreadClient::drawTextures):
* platform/graphics/blackberry/EGLImageLayerCompositingThreadClient.h:
(EGLImageLayerCompositingThreadClient):
* platform/graphics/blackberry/LayerCompositingThread.cpp:
(WebCore::LayerCompositingThread::drawTextures):
(WebCore::LayerCompositingThread::drawSurface):
* platform/graphics/blackberry/LayerCompositingThread.h:
(LayerCompositingThread):
* platform/graphics/blackberry/LayerCompositingThreadClient.h:
(WebCore):
(LayerCompositingThreadClient):
* platform/graphics/blackberry/LayerRenderer.cpp:
(WebCore::LayerRenderer::compositeLayersRecursive):
* platform/graphics/blackberry/LayerTile.cpp:
(WebCore::LayerTile::LayerTile):
(WebCore::LayerTile::setContents):
(WebCore::LayerTile::updateContents):
(WebCore::LayerTile::discardContents):
* platform/graphics/blackberry/LayerTile.h:
(LayerTile):
(WebCore::LayerTile::contentsScale):
(WebCore::LayerTile::setContentsDirty):
* platform/graphics/blackberry/LayerTiler.cpp:
(LayerVisibility):
(WebCore::LayerVisibility::LayerVisibility):
(WebCore::LayerVisibility::visibleRect):
(WebCore::LayerVisibility::setVisibleRect):
(WebCore::LayerVisibility::needsRender):
(WebCore::LayerVisibility::tileNeedsRender):
(WebCore::LayerVisibility::willRenderTile):
(WebCore::LayerVisibility::swapTilesNeedingRender):
(WebCore::LayerVisibility::merge):
(WebCore):
(WebCore::LayerTiler::LayerTiler):
(WebCore::LayerTiler::~LayerTiler):
(WebCore::LayerTiler::updateTextureContentsIfNeeded):
(WebCore::LayerTiler::swapFrontVisibility):
(WebCore::LayerTiler::setFrontVisibility):
(WebCore::LayerTiler::layerVisibilityChanged):
(WebCore::LayerTiler::uploadTexturesIfNeeded):
(WebCore::LayerTiler::processTextureJob):
(WebCore::LayerTiler::addTileJob):
(WebCore::LayerTiler::performTileJob):
(WebCore::LayerTiler::drawTile):
(WebCore::inflateViewport):
(WebCore::LayerTiler::drawTextures):
(WebCore::LayerTiler::pruneTextures):
(WebCore::LayerTiler::rectForTile):
* platform/graphics/blackberry/LayerTiler.h:
(WebCore):
(LayerTiler):
(WebCore::LayerTiler::TextureJob::TextureJob):
(WebCore::LayerTiler::takeFrontVisibility):
* platform/graphics/blackberry/LayerUtilities.h:
(WebCore):
(WebCore::det):
(WebCore::dot):
(LayerClipEdge):
(WebCore::LayerClipEdge::LayerClipEdge):
(WebCore::LayerClipEdge::isPointInside):
(WebCore::LayerClipEdge::computeIntersection):
(WebCore::intersectPolygonWithRect):
(WebCore::computeBarycentricCoordinates):
(WebCore::manhattanDistanceToViewport):
(UnprojectionVertex):
(WebCore::compareManhattanDistanceToViewport):
(WebCore::unproject):
2013-06-14 Antoine Quint <graouts@apple.com>
[Mac] clicking caption track glyph should dismiss menu
https://bugs.webkit.org/show_bug.cgi?id=117621
We now correctly capture all click events while the captions track menu
is showing, and ensure that no other control in the media player can be
activated as the track list gets dismissed by clicking anywhere but on
itself.
Reviewed by Eric Carlson.
* html/shadow/MediaControlsApple.cpp:
(WebCore::MediaControlsApple::showClosedCaptionTrackList):
Make the controls panel non-interactive and track click events in the
capture phase also on the controls container itself such that we can
identify correctly whether a click in the <video> shadow tree is on
the track list or another element (the target could only be resolved
to a shadow tree node if the event is handled within the shadow tree).
(WebCore::MediaControlsApple::hideClosedCaptionTrackList):
Make the controls panel interactive again and remove the new click
event handler on the controls container.
(WebCore::MediaControlsApple::handleClickEvent):
Capture any click event that targets a node anywhere outside of the track
list container and its subtree and hide the track list in this condition.
(WebCore::MediaControlsAppleEventListener::handleEvent):
Call handleClickEvent() on the media controls when a click event is handled.
* html/shadow/MediaControlsApple.h:
New public handleClickEvent() API such that it can be called from
MediaControlsAppleEventListener::handleEvent().
2013-06-14 Arvid Nilsson <anilsson@rim.com>
[BlackBerry] Accelerated compositing layers that intersect the image plane are incorrectly transformed
https://bugs.webkit.org/show_bug.cgi?id=117067
Reviewed by Carlos Garcia Campos.
PR 273550
The BlackBerry port used to mathematically project each corner of each
layer bounds rectangle, which gives the wrong results when the layer
intersects the image plane.
For display lists, we still got the correct appearance of the layer
contents, since the display list results in geometry that's transformed
in the vertex shader, on the GPU.
However, the transformed bounds are used for drawing the debug border,
performing visibility calculations on the CPU and drawing of WebGL,
masks/reflections and filters. Using the mathematical projection of
points that lie behind the image plane gives the wrong results.
The most important consequence of this bug was that the wrong area of
the layer would be considered visible, so a tiled layer would not
populate the right tiles (or any tiles at all).
Fixed by implementing something along the lines of the recipe in
section 6.2 of http://www.w3.org/TR/css3-transforms.
No new tests, manually testable by enabling debug border on
https://developer.mozilla.org/en-US/demos/detail/the-box/launch.
* platform/graphics/blackberry/EGLImageLayerCompositingThreadClient.cpp:
(WebCore::EGLImageLayerCompositingThreadClient::drawTextures):
* platform/graphics/blackberry/LayerCompositingThread.cpp:
(WebCore::LayerCompositingThread::LayerCompositingThread):
(WebCore::LayerCompositingThread::setDrawTransform):
(WebCore):
(WebCore::LayerCompositingThread::textureCoordinates):
(WebCore::LayerCompositingThread::drawTextures):
* platform/graphics/blackberry/LayerCompositingThread.h:
(LayerCompositingThread):
(WebCore::LayerCompositingThread::transformedBounds):
(WebCore::LayerCompositingThread::ws):
(WebCore::LayerCompositingThread::centerW):
* platform/graphics/blackberry/LayerFilterRenderer.cpp:
(WebCore::LayerFilterRenderer::applyActions):
* platform/graphics/blackberry/LayerRenderer.cpp:
(WebCore::compareLayerW):
(WebCore::LayerRenderer::compositeLayers):
(WebCore::LayerRenderer::drawDebugBorder):
(WebCore):
(WebCore::LayerRenderer::updateLayersRecursive):
(WebCore::LayerRenderer::compositeLayersRecursive):
* platform/graphics/blackberry/LayerRenderer.h:
(WebCore):
(LayerRenderer):
* platform/graphics/blackberry/LayerRendererSurface.cpp:
(WebCore::LayerRendererSurface::boundingBox):
(WebCore::LayerRendererSurface::transformedBounds):
* platform/graphics/blackberry/LayerRendererSurface.h:
(WebCore::LayerRendererSurface::setDrawTransform):
(WebCore::LayerRendererSurface::setReplicaDrawTransform):
(LayerRendererSurface):
* platform/graphics/blackberry/LayerUtilities.h: Added.
(WebCore):
(LayerClipPlane):
(WebCore::LayerClipPlane::LayerClipPlane):
(WebCore::LayerClipPlane::isPointInside):
(WebCore::LayerClipPlane::computeIntersection):
(WebCore::intersect):
(WebCore::boundingBox):
(WebCore::multVecMatrix):
(WebCore::toVector):
2013-06-14 Allan Sandfeld Jensen <allan.jensen@digia.com>
[Qt] Map rewind and fast forward keys to match GoogleTV
https://bugs.webkit.org/show_bug.cgi?id=117634
Reviewed by Jocelyn Turcotte.
Set the same keycode for media keys rewind and fast-forward as
GoogleTV does.
* platform/qt/PlatformKeyboardEventQt.cpp:
(WebCore::windowsKeyCodeForKeyEvent):
2013-06-13 Carlos Garcia Campos <cgarcia@igalia.com>
Avoid unnecessary data copies when loading subresources with DoNotBufferData option
https://bugs.webkit.org/show_bug.cgi?id=115804
Reviewed by Darin Adler.
When DoNotBufferData option is used to load a resource its data
is always copied before sending it to the CachedResource. Most
of the cached resources ignore the incremental data and wait
until all data has been received to save the ResourceBuffer,
that will be NULL anyway when DoNotBufferData is used.
CachedRawResource notifies its clients about the incremental
data, but it doesn't save the data when DoNotBufferData option
is present. In those cases we are unnecessary copying the data.
CachedResource::data has been split into
CachedResource::addDataBuffer() used for incremental data chunks
when buffering data, CachedResource::addData() used for
incremental data chunks when not buffering and
CachedResource::finishLoading() used to finish the loading. This
way we get rid of the allDataReceived boolean parameter and cached
resources not interested in incremenetal data chunks only have to
implement finishLoading() without having to check if all data have
been received or not.
SubresourceLoader::sendDataToResource was always called after
checking if loading multipart content, and then it was checked
again to decided whether to copy the data or not. It has been
removed in favor of calling directly the resource methods,
finishLoading for multipart content, addDataBuffer for data chunks
when buffering and addData for data chunks when not buffering.
No new functionality, covered by existing tests.
* html/ImageDocument.cpp:
(WebCore::ImageDocumentParser::appendBytes): Update to API changes.
(WebCore::ImageDocumentParser::finish): Ditto.
* loader/SubresourceLoader.cpp:
(WebCore::SubresourceLoader::didReceiveResponse): Call
finishLoading() for multipart content.
(WebCore::SubresourceLoader::didReceiveDataOrBuffer): Add data to
the resource using addDataBuffer or addData depending on whether
we are buffering or not.
(WebCore::SubresourceLoader::didFinishLoading): Call
finishLoading() for the cached resource instead of data.
* loader/SubresourceLoader.h:
* loader/cache/CachedCSSStyleSheet.cpp:
(WebCore::CachedCSSStyleSheet::finishLoading):
* loader/cache/CachedCSSStyleSheet.h:
* loader/cache/CachedFont.cpp:
(WebCore::CachedFont::finishLoading):
* loader/cache/CachedFont.h:
* loader/cache/CachedImage.cpp:
(WebCore::CachedImage::isValidDecodedImageSize): Helper function
to check if the image size is valid.
(WebCore::CachedImage::addIncrementalDataBuffer): Helper function
to add incremental data buffer.
(WebCore::CachedImage::addDataBuffer): Call
addIncrementalDataBuffer().
(WebCore::CachedImage::addData): Create a ResourceBuffer and call
addIncrementalDataBuffer().
(WebCore::CachedImage::finishLoading):
* loader/cache/CachedImage.h:
* loader/cache/CachedRawResource.cpp:
(WebCore::CachedRawResource::calculateIncrementalDataChunk):
Returns a pointer to the data corresponding to the current chunk
and its length.
(WebCore::CachedRawResource::addDataBuffer): Assert to make sure
this is only called when BufferData option is present. Use
calculateIncrementalDataChunk().
(WebCore::CachedRawResource::addData): Assert to make sure this is
only called when DoNotBufferData option is present.
(WebCore::CachedRawResource::finishLoading):
(WebCore::CachedRawResource::notifyClientsDataWasReceived): Helper
private function to notify the clients about data received.
* loader/cache/CachedRawResource.h:
* loader/cache/CachedResource.cpp:
(WebCore::CachedResource::addDataBuffer):
(WebCore::CachedResource::addData):
(WebCore::CachedResource::finishLoading):
* loader/cache/CachedResource.h:
* loader/cache/CachedSVGDocument.cpp:
(WebCore::CachedSVGDocument::finishLoading):
* loader/cache/CachedSVGDocument.h:
* loader/cache/CachedScript.cpp:
(WebCore::CachedScript::finishLoading):
* loader/cache/CachedScript.h:
* loader/cache/CachedShader.cpp:
(WebCore::CachedShader::finishLoading):
* loader/cache/CachedShader.h:
* loader/cache/CachedTextTrack.cpp:
(WebCore::CachedTextTrack::addDataBuffer):
(WebCore::CachedTextTrack::finishLoading):
* loader/cache/CachedTextTrack.h:
* loader/cache/CachedXSLStyleSheet.cpp:
(WebCore::CachedXSLStyleSheet::finishLoading):
* loader/cache/CachedXSLStyleSheet.h:
2013-06-14 Michał Pakuła vel Rutka <m.pakula@samsung.com>
[EFL] Fix build when DRAG_SUPPORT is set OFF
https://bugs.webkit.org/show_bug.cgi?id=117628
Reviewed by Gyuyoung Kim.
Add guard around Clipboard::declareAndWriteDragImage.
* platform/efl/ClipboardEfl.cpp:
2013-06-13 Simon Fraser <simon.fraser@apple.com>
Sometimes we stick in slow scrolling mode even after leaving a page
https://bugs.webkit.org/show_bug.cgi?id=117622
Reviewed by Sam Weinig.
ScrollingCoordinator, and thus the scrolling state tree, is owned by Page,
and so persists when navigating between cached pages. We do give the ScrollingStateTree
a new ScrollingStateScrollingNode on navigation, however the ScrollingStateScrollingNode
would not have dirty flags set for, say, WheelEventHandlerCount if the document had
no wheel handlers. And because that dirty flag wasn't set, ScrollingTree::commitNewTreeState()
would fail to update m_hasWheelEventHandlers, so we'd remain in slow scrolling.
Fix by having ScrollingStateTree remember if it's been given a new root ScrollingStateScrollingNode,
and making ScrollingTree::commitNewTreeState() to the right thing in that case.
Also fix a couple of issues with the tiled scrolling indicator. First, on cached page
navigation, the indicator color would show the state for the old page, because
ScrollingCoordinatorMac::commitTreeState() checked scrollingTree()->hasWheelEventHandlers()
before the scrolling thread has committed the new scrolling tree.
Second, the color change would animate, so stop that.
Not testable, since tests can only dump the scrolling state tree.
* page/scrolling/ScrollingStateTree.cpp:
(WebCore::ScrollingStateTree::ScrollingStateTree):
(WebCore::ScrollingStateTree::attachNode):
(WebCore::ScrollingStateTree::commit):
* page/scrolling/ScrollingStateTree.h:
(WebCore::ScrollingStateTree::hasNewRootStateNode):
* page/scrolling/ScrollingTree.cpp:
(WebCore::ScrollingTree::commitNewTreeState):
* page/scrolling/mac/ScrollingCoordinatorMac.mm:
(WebCore::ScrollingCoordinatorMac::commitTreeState):
* platform/graphics/ca/mac/TileController.mm:
(-[WebTiledScrollingIndicatorLayer init]): Turn off borderColor implicit animations.
2013-06-13 Peter Gal <galpeter@inf.u-szeged.hu>
[curl] Merge http response header values
https://bugs.webkit.org/show_bug.cgi?id=117342
Reviewed by Brent Fulgham.
According to the HTTP RFC some HTTP header values should be
merged if multiple entries for the same header exists.
* platform/network/curl/ResourceHandleManager.cpp:
(WebCore::isAppendableHeader):
(WebCore::headerCallback):
2013-06-13 Simon Fraser <simon.fraser@apple.com>
Should not call firePaintRelatedMilestones() for "update control tints" paint pass
https://bugs.webkit.org/show_bug.cgi?id=117624
Reviewed by Sam Weinig.
When window activation changes, we do a fake paint pass that is just used to
invalidate controls that change their appearance in background windows. This fake
paint should not be recorded in the inspector, and it should not cause paint-related
milestones to fire.
* page/FrameView.cpp:
(WebCore::FrameView::paintContents):
2013-06-13 Dean Jackson <dino@apple.com>
Clicking on snapshotting plug-ins does not restart them
https://bugs.webkit.org/show_bug.cgi?id=117620
<rdar://problem/13821729>
Reviewed by Simon Fraser.
HTMLPlugInElement has an event handler which would return
immediately if the element was not snapshotted, restarting
or playing. There is a case it missed, which was snapshotting
(WaitingForSnapshot to be precise). If we get a click in this
state then it should immediately restart.
* html/HTMLPlugInElement.h: Move defaultEventHandler to public (we call it from the child class).
* html/HTMLPlugInImageElement.cpp:
(WebCore::HTMLPlugInImageElement::defaultEventHandler): If there is a click on a snapshotting
plug-in, then call restart.
* html/HTMLPlugInImageElement.h: Virtual defaultEventHandler declaration.
2013-06-13 Zoltan Horvath <zoltan@webkit.org>
Use borderAndPadding[Before,After]() instead of border[Before,After]() + padding[Before,After]()
https://bugs.webkit.org/show_bug.cgi?id=117611
Reviewed by Dirk Schulze.
I added a new function called borderAndPaddingAfter(), since we already had borderAndPaddingBefore(). I changed
every separate additions to the old/new function. This change makes the code shorter and more straightforward.
Behavior hasn't changed, no new tests were needed.
* rendering/InlineFlowBox.cpp:
(WebCore::InlineFlowBox::placeBoxesInBlockDirection):
* rendering/RenderBlock.cpp:
(WebCore::RenderBlock::layoutBlock):
(WebCore::RenderBlock::marginBeforeEstimateForChild):
(WebCore::RenderBlock::layoutBlockChildren):
(WebCore::RenderBlock::paintColumnRules):
(WebCore::RenderBlock::columnRectAt):
(WebCore::RenderBlock::relayoutForPagination):
(WebCore::RenderBlock::adjustRectForColumns):
(WebCore::RenderBlock::flipForWritingModeIncludingColumns):
(WebCore::RenderBlock::adjustStartEdgeForWritingModeIncludingColumns):
(WebCore::RenderBlock::adjustForColumns):
* rendering/RenderBlockLineLayout.cpp:
(WebCore::RenderBlock::updateShapeAndSegmentsForCurrentLineInFlowThread):
(WebCore::RenderBlock::layoutInlineChildren):
* rendering/RenderBoxModelObject.h:
(WebCore::RenderBoxModelObject::borderAndPaddingStart):
(WebCore::RenderBoxModelObject::borderAndPaddingBefore):
(WebCore::RenderBoxModelObject::borderAndPaddingAfter):
(WebCore::RenderBoxModelObject::borderAndPaddingLogicalHeight):
* rendering/RenderMultiColumnBlock.cpp:
(WebCore::RenderMultiColumnBlock::layoutSpecialExcludedChild):
* rendering/RenderMultiColumnSet.cpp:
(WebCore::RenderMultiColumnSet::heightAdjustedForSetOffset):
(WebCore::RenderMultiColumnSet::prepareForLayout):
(WebCore::RenderMultiColumnSet::columnRectAt):
* rendering/RenderTableCell.cpp:
(WebCore::RenderTableCell::computeIntrinsicPadding):
(WebCore::RenderTableCell::cellBaselinePosition):
* rendering/RenderTableSection.cpp:
(WebCore::RenderTableSection::calcRowLogicalHeight):
(WebCore::RenderTableSection::layoutRows):
(WebCore::RenderTableSection::firstLineBoxBaseline):
* rendering/RootInlineBox.cpp:
(WebCore::RootInlineBox::lineSnapAdjustment):
(WebCore::RootInlineBox::selectionTop):
(WebCore::RootInlineBox::ascentAndDescentForBox):
2013-06-13 Andreas Kling <akling@apple.com>
Move Node::shouldUseInputMethod() to Element.
<http://webkit.org/b/117603>
Reviewed by Antti Koivisto.
This method is only ever called on Elements, so move it off of Node.
* dom/Element.cpp:
(WebCore::Element::shouldUseInputMethod):
* dom/Element.h:
* dom/Node.cpp:
* dom/Node.h:
* html/HTMLInputElement.h:
* html/HTMLTextAreaElement.h:
2013-06-13 Max Vujovic <mvujovic@adobe.com>
[CSS Regions] Selection dragged from a region paints its background
https://bugs.webkit.org/show_bug.cgi?id=117607
Reviewed by Alexandru Chiculita.
When a RenderFlowThread is in the selection paint phase, tell its layer to paint with the
selection only behavior. This way, only foregrounds and not backgrounds will be painted in
the dragged selection.
Manual test: ManualTests/regions/drag-selection-painting.html
* rendering/RenderFlowThread.cpp:
(WebCore::RenderFlowThread::paintFlowThreadPortionInRegion):
2013-06-13 Zoltan Horvath <zoltan@webkit.org>
[CSS Shapes][CSS Regions] Respect bottom positioned shapes and content adjustment inside shapes
https://bugs.webkit.org/show_bug.cgi?id=117599
Reviewed by David Hyatt.
In r150478 I added support for multiple positioned shape-insides on regions, this patch covers the cases when a shape
is positioned to the bottom of the region or the region contains a shape which forces the content to be adjusted inside
the shape (e.g. we have a triangle shape and the first line needs to be started at the first position where it fits).
I introduced a new helper function to update the current shape and the current line segments in the flow thread cases. With
this new helper function all the logic which calculates the segments for shape-inside on regions is located in one function.
Tests: fast/regions/shape-inside/shape-inside-on-regions-block-content-overflow-bottom-positioned-multiple-shapes.html
fast/regions/shape-inside/shape-inside-on-regions-block-content-polygon-with-adjustment.html
fast/regions/shape-inside/shape-inside-on-regions-inline-content-overflow-bottom-positioned-multiple-shapes.html
fast/regions/shape-inside/shape-inside-on-regions-inline-content-polygon-with-adjustment.html
* rendering/RenderBlock.h: Add new helper's declaration
* rendering/RenderBlockLineLayout.cpp:
(WebCore::LineLayoutState::LineLayoutState): Add a member to carry adjustment for flow thread cases.
(WebCore::LineLayoutState::adjustedLogicalLineTop): Add new member.
(WebCore::LineLayoutState::setAdjustedLogicalLineTop): Add new setter for the new member.
(WebCore::RenderBlock::updateShapeAndSegmentsForCurrentLine): Move flow thread case to its helper function.
(WebCore::RenderBlock::updateShapeAndSegmentsForCurrentLineInFlowThread): Added new helper for flow thread cases.
(WebCore::RenderBlock::adjustLogicalLineTopAndLogicalHeightIfNeeded): Save adjustment for flow thread cases.
2013-06-13 Mihai Tica <mitica@adobe.com>
[CSS Background Blending] Enable CSS Background blending for layers with SVGs.
The change implies adding the blending parameter for SVGImage
https://bugs.webkit.org/show_bug.cgi?id=117588
Reviewed by Dirk Schulze.
Tests: css3/compositing/background-blend-mode-image-svg.html
css3/compositing/background-blend-mode-svg-color.html
* svg/graphics/SVGImage.cpp:
(WebCore::SVGImage::draw):
2013-06-13 Mihai Tica <mitica@adobe.com>
Updating the -webkit-background-blend-mode property dynamically does not trigger a redraw of the element.
Adding krit's fix: actual blending values should be compared, not the sets.
https://bugs.webkit.org/show_bug.cgi?id=117223
Reviewed by Dirk Schulze.
Test: css3/compositing/background-blend-mode-image-color-dynamic.html
* rendering/style/FillLayer.cpp:
(WebCore::FillLayer::operator==):
2013-06-13 Beth Dakin <bdakin@apple.com>
Headers and footers should be pinned to the left edge of the window when scrolling
horizontally, even when zoomed
https://bugs.webkit.org/show_bug.cgi?id=117562
-and corresponding-
<rdar://problem/14006745>
Reviewed by Sam Weinig.
We really want to use the width value from scrollOffsetForFixedPosition() for the
banner with a scaled factor of 1. So if there is a different scale factor, re-
compute this value specifically for the banners.
* page/scrolling/mac/ScrollingTreeScrollingNodeMac.mm:
(WebCore::ScrollingTreeScrollingNodeMac::setScrollLayerPosition):
2013-06-13 Christophe Dumez <ch.dumez@sisa.samsung.com>
Support byte and octet types in bindings generators
https://bugs.webkit.org/show_bug.cgi?id=117547
Reviewed by Kentaro Hara.
Add support for byte and octet IDL types to the bindings
generator:
http://dev.w3.org/2006/webapi/WebIDL/#idl-byte
http://dev.w3.org/2006/webapi/WebIDL/#idl-octet
No new tests, covered by existing layout tests and by new
bindings tests.
No new tests, covered by bindings tests and:
fast/js/webidl-type-mapping.html
* WebCore.exp.in: Export new symbols for mac port.
* bindings/js/JSDOMBinding.cpp:
* bindings/js/JSDOMBinding.h: Add toInt8() / toUInt8()
methods to convert from JSValue to int8_t / uint8_t as
specified by Web IDL.
* bindings/js/JSDataViewCustom.cpp: Remove custom code for
getInt8, getUInt8, setInt8, setUInt8 now that byte and octet
types are supported by the bindings generator.
* bindings/scripts/CodeGeneratorCPP.pm:
* bindings/scripts/CodeGeneratorGObject.pm:
* bindings/scripts/CodeGeneratorJS.pm:
* bindings/scripts/CodeGeneratorObjC.pm:
* bindings/scripts/test/CPP/WebDOMTestObj.cpp:
* bindings/scripts/test/CPP/WebDOMTestObj.h:
* bindings/scripts/test/GObject/WebKitDOMTestObj.cpp:
* bindings/scripts/test/GObject/WebKitDOMTestObj.h:
* bindings/scripts/test/JS/JSTestObj.cpp:
* bindings/scripts/test/JS/JSTestObj.h:
* bindings/scripts/test/ObjC/DOMTestObj.h:
* bindings/scripts/test/ObjC/DOMTestObj.mm:
* bindings/scripts/test/TestObj.idl: Add tests for byte and octet types.
* html/canvas/DataView.idl: Remove [Custom] extended attribute for
getInt8, getUInt8, setInt8, setUInt8 and use newly supported byte / octet
types.
2013-06-13 Timothy Hatcher <timothy@apple.com>
Revert r150339 since it causes a hang while paused in the Web Inspector in other apps.
https://bugs.webkit.org/show_bug.cgi?id=117596
Reviewed by Joseph Pecoraro.
* platform/mac/EventLoopMac.mm:
(WebCore::EventLoop::cycle):
2013-06-13 Brent Fulgham <bfulgham@apple.com>
[Windows] Unreviewed gardening. Remove dangling 'strings' folder from solution.
* WebCore.vcxproj/WebCore.vcxproj.filters: Get rid of 'strings' that was orphaned by
recent file reorganization.
2013-06-13 Praveen R Jadhav <praveen.j@samsung.com>
Avoid unwanted thread hops in ScriptProcessorNode when 'onaudioprocess' listener is not set.
https://bugs.webkit.org/show_bug.cgi?id=117578.
Reviewed by Darin Adler.
ScriptProcessorNode process operation continues to dispatch AudioProcessingEvent
even though 'onaudioprocess' listener is not set. This results in unwanted thread hops.
Code is optimized to dispatch AudioProcessingEvent only if the listener is set.
No new tests, already covered by existing tests.
* Modules/webaudio/ScriptProcessorNode.cpp:
(WebCore::ScriptProcessorNode::ScriptProcessorNode):
(WebCore::ScriptProcessorNode::process):
(WebCore::ScriptProcessorNode::setOnaudioprocess):
* Modules/webaudio/ScriptProcessorNode.h:
(WebCore::ScriptProcessorNode::onaudioprocess):
2013-06-13 Max Vujovic <mvujovic@adobe.com>
[CSS Regions] -webkit-background-clip: text; does not clip the background in regions
https://bugs.webkit.org/show_bug.cgi?id=117566
Reviewed by Alexandru Chiculita.
This patch enables -webkit-background-clip: text; on regions.
Test: fast/regions/webkit-background-clip-text.html
* rendering/RenderFlowThread.cpp:
(WebCore::RenderFlowThread::paintFlowThreadPortionInRegion):
Force black text if we're in the text clip paint phase. This makes sure the text's alpha
channel does not affect the final opacity of the background clipping result. Rather,
the text's alpha channel affects the amount of blending between the text color
and the background.
* rendering/RenderRegion.cpp:
(WebCore::shouldPaintRegionContentsInPhase):
Factor out a function to check if we should paint the region contents in a particular
phase. Add "PaintPhaseTextClip" so that we draw the contents in the text clipping phase.
(WebCore::RenderRegion::paintObject):
Call shouldPaintRegionContentsInPhase instead of doing the phase checks directly in this
function. Move, update, and clarify the surrounding comments.
2013-06-13 Anton Obzhirov <a.obzhirov@samsung.com>
[CSS Regions] Regions auto-height and absolute positioning bug
https://bugs.webkit.org/show_bug.cgi?id=111092
Reviewed by David Hyatt.
During last layout that should update the auto-height regions new auto-height region height
is calculated correctly based on the text content, but it requires extra step
to reposition the render block after new logical height is set (correct logical height becomes
available only during last layout).
Tests: fast/regions/autoheight-abspos-bottom-align.html
* rendering/RenderRegion.cpp:
(WebCore::RenderRegion::updateLogicalHeight):
2013-06-13 Brent Fulgham <bfulgham@webkit.org>
[WinCairo] Unreviewed build correction.
* WebCore.vcxproj/WebCoreCairo.props: Use proper WebKit_Libraries
environment variable, rather than older WebKitLibraries.
2013-06-13 Christophe Dumez <ch.dumez@sisa.samsung.com>
Avoid duplicate isInt32() / isUInt32() checks in JSDOMBindings
https://bugs.webkit.org/show_bug.cgi?id=117593
Reviewed by Geoffrey Garen.
Avoid duplicate isInt32() / isUInt32() checks in JSDOMBindings by
calling asInt32() / asUInt32() instead of toInt32() / toUInt32()
when we already know the value is a int32 / uint32.
No new tests, no behavior change.
* bindings/js/JSDOMBinding.cpp:
2013-06-13 Yuki Sekiguchi <yuki.sekiguchi@access-company.com>
Setting overflow:hidden on position:absolute does not repaint hidden content
https://bugs.webkit.org/show_bug.cgi?id=116994
Reviewed by Simon Fraser.
Since a container which has overflow clip of RenderBox which has self painting layer doesn't have a rect of the RenderBox as visual overflow,
the container should not clip request repainting rect of the RenderBox.
Test: fast/repaint/change-overflow-and-display-of-relative.html
* rendering/RenderBox.cpp:
(WebCore::RenderBox::computeRectForRepaint):
* rendering/RenderLayerModelObject.cpp:
(WebCore::RenderLayerModelObject::shouldUseClipForRepaint): If this has self painting layer, we should not clip for repaint.
* rendering/RenderLayerModelObject.h:
2013-06-13 Mihai Tica <mitica@adobe.com>
[CSS Background Blending] Gradients don't blend with any of the layers behind.
First, allow the layers behind opaque gradients to be drawn, then add the blending filters
when working with gradients.
https://bugs.webkit.org/show_bug.cgi?id=117532
Reviewed by Dirk Schulze.
Tests: css3/compositing/background-blend-mode-gradient-color.html
css3/compositing/background-blend-mode-gradient-gradient.html
css3/compositing/background-blend-mode-gradient-image.html
css3/compositing/background-blend-mode-multiple-background-layers.html
* platform/graphics/GeneratorGeneratedImage.cpp:
(WebCore::GeneratorGeneratedImage::draw):
* rendering/RenderBox.cpp:
(WebCore::RenderBox::paintFillLayers):
2013-06-13 Michael Brüning <michael.bruning@digia.com>
[Qt][Mac] Disable QTKit video on OS X.
https://bugs.webkit.org/show_bug.cgi?id=117591
Reviewed by Tor Arne Vestbø.
Deployment of the same Qt binaries to different
Mac OS X version makes it impossible to link against
the correct WebKitSystemInterface version at build time.
No new tests, no behavioural change.
* WebCore.pri:
2013-06-13 Morten Stenshorne <mstensho@opera.com>
Column balancing support in the region based multicol implementation
https://bugs.webkit.org/show_bug.cgi?id=116033
Start by setting the column height to the flow thread's height divided
by the number of columns. Then stretch the column height until
contents fits without creating overflowing columns, or until the
maximum allowed column height is reached, whichever comes first. This
may require several layout iterations (but normally only a
couple). For each time we stretch, stretch by the least amount
required to make a difference to which box goes where.
Also make sure that the columns get tall enough to honor orphans
and widows settings.
This change takes some tiny steps in preparing for multiple column
set support. There is also some minor cleanup and bugfixing; see
details below.
Reviewed by David Hyatt.
Tests: fast/multicol/newmulticol/balance-images.html
fast/multicol/newmulticol/balance-maxheight1.html
fast/multicol/newmulticol/balance-maxheight2.html
fast/multicol/newmulticol/balance1.html
fast/multicol/newmulticol/balance2.html
fast/multicol/newmulticol/balance3.html
fast/multicol/newmulticol/balance4.html
fast/multicol/newmulticol/balance5.html
fast/multicol/newmulticol/balance6.html
fast/multicol/newmulticol/balance7.html
fast/multicol/newmulticol/balance8.html
fast/multicol/newmulticol/balance9.html
fast/multicol/newmulticol/cell-shrinkback.html
fast/multicol/newmulticol/columns-shorthand-parsing.html
fast/multicol/newmulticol/orphans-and-widows-balance.html
fast/multicol/newmulticol/single-line.html
* rendering/RenderBlock.cpp:
(WebCore::RenderBlock::adjustForUnsplittableChild):
(WebCore::RenderBlock::setPageBreak):
(WebCore):
(WebCore::RenderBlock::updateMinimumPageHeight):
(WebCore::calculateMinimumPageHeight):
(WebCore::RenderBlock::adjustLinePositionForPagination):
(WebCore::RenderBlock::adjustBlockChildForPagination): If no lines
cross the boundaries, we need to report where blocks cross
instead, so that the column balancer knows how much to stretch
columns if necessary.
* rendering/RenderBlock.h:
* rendering/RenderFlowThread.h:
* rendering/RenderMultiColumnBlock.cpp:
(WebCore::RenderMultiColumnBlock::RenderMultiColumnBlock):
(WebCore::RenderMultiColumnBlock::checkForPaginationLogicalHeightChange):
(WebCore::RenderMultiColumnBlock::relayoutForPagination):
(WebCore::RenderMultiColumnBlock::layoutSpecialExcludedChild):
* rendering/RenderMultiColumnBlock.h:
(WebCore::RenderMultiColumnBlock::columnHeightAvailable):
(WebCore::RenderMultiColumnBlock::requiresBalancing):
(RenderMultiColumnBlock):
* rendering/RenderMultiColumnFlowThread.cpp:
(WebCore::RenderMultiColumnFlowThread::autoGenerateRegionsToBlockOffset):
(WebCore::RenderMultiColumnFlowThread::setPageBreak):
(WebCore):
(WebCore::RenderMultiColumnFlowThread::updateMinimumPageHeight):
* rendering/RenderMultiColumnFlowThread.h:
(RenderMultiColumnFlowThread):
* rendering/RenderMultiColumnSet.cpp: Get rid of
RenderMultiColumnSet::updateLogicalHeight() override. Make
RenderMultiColumnSet behave more like normal blocks, by having
computeLogicalHeight() calculate logical top in addition to
height, just like any other block.
(WebCore::RenderMultiColumnSet::RenderMultiColumnSet):
(WebCore::RenderMultiColumnSet::heightAdjustedForSetOffset): This
method will become more meaningful once we add support for
multiple column sets.
(WebCore):
(WebCore::RenderMultiColumnSet::pageLogicalTopForOffset):
(WebCore::RenderMultiColumnSet::setAndConstrainColumnHeight):
(WebCore::RenderMultiColumnSet::calculateBalancedHeight):
(WebCore::RenderMultiColumnSet::recordSpaceShortage):
(WebCore::RenderMultiColumnSet::updateLogicalWidth):
(WebCore::RenderMultiColumnSet::prepareForLayout):
(WebCore::RenderMultiColumnSet::computeLogicalHeight):
(WebCore::RenderMultiColumnSet::columnCount):
(WebCore::RenderMultiColumnSet::columnIndexAtOffset):
repaintFlowThreadContent() could end up in an infinite loop
because columnIndexAtOffset() could return UINT_MAX
(subtracting 1 from unsigned 0, which columnCount() could return),
which an unsigned integer obviously can never become larger
than. Also always call columnIndexAtOffset() if we want to get the
column index for some offset, rather than doing it on our own
sometimes. To make this work also during layout, we cannot just
return the last column created so far if we're past it, since
adding new columns is exactly what we want to do at this point.
* rendering/RenderMultiColumnSet.h:
(RenderMultiColumnSet):
2013-06-12 Anders Carlsson <andersca@apple.com>
Remove the notion of inactive plug-ins
https://bugs.webkit.org/show_bug.cgi?id=117570
<rdar://problem/13484213>
Reviewed by Tim Horton.
Remove RenderEmbeddedObject::PluginInactive and the replacement text.
* English.lproj/Localizable.strings:
* platform/LocalizedStrings.cpp:
* platform/LocalizedStrings.h:
* rendering/RenderEmbeddedObject.cpp:
(WebCore::unavailablePluginReplacementText):
* rendering/RenderEmbeddedObject.h:
2013-06-12 Dean Jackson <dino@apple.com>
[Mac] Change default Traditional Chinese serif font on 10.9
https://bugs.webkit.org/show_bug.cgi?id=117568
Reviewed by Alexey Proskuryakov.
Change default font on newer versions of OS X.
* page/mac/SettingsMac.mm:
(WebCore::Settings::initializeDefaultFontFamilies): Use 'Songti TC'
on 10.9 and above.
2013-06-12 Dean Jackson <dino@apple.com>
[Mac] Change default Simplified Chinese serif font on 10.9
https://bugs.webkit.org/show_bug.cgi?id=117567
Reviewed by Alexey Proskuryakov.
Change default font on newer versions of OS X.
* page/mac/SettingsMac.mm:
(WebCore::Settings::initializeDefaultFontFamilies): Use 'Songti SC'
instead of 'STSong' on newer systems.
2013-06-12 Gyuyoung Kim <gyuyoung.kim@samsung.com>
Fix crashes due to failed ImageBuffer allocation
https://bugs.webkit.org/show_bug.cgi?id=117541
Reviewed by Andreas Kling.
From Blink r152268 by <pdr@chromium.org>
A crash can happen due to a failed ImageBuffer allocation in
SVGImage::drawPatternForContainer(). Added a check for that failed allocation.
* svg/graphics/SVGImage.cpp:
(WebCore::SVGImage::drawPatternForContainer):
2013-06-12 Eduardo Lima Mitev <elima@igalia.com>
[atk] Replace deprecated call to atk_document_get_locale() in DumpRenderTree
https://bugs.webkit.org/show_bug.cgi?id=115647
Reviewed by Martin Robinson.
Override the get_object_locale() method of WebkitAccessibleWrapperAtk's internal
AtkObject, to include custom implementations for AtkDocument and AtkText objects,
taking the logic as-is from AtkDocument::get_document_locale() and DumpRenderTree's
AccessibilityUIElementAtk::language(), respectively.
Apart from improving encapsulation, this avoids calling deprecated get_document_locale()
method.
No new functionality, no new tests.
* accessibility/atk/WebKitAccessibleInterfaceDocument.cpp:
(webkitAccessibleDocumentInterfaceInit): Chains implementation of
AtkDocument::get_document_locale() to AtkObject::get_object_locale().
* accessibility/atk/WebKitAccessibleWrapperAtk.cpp:
(webkitAccessibleGetObjectLocale): Add implementation of locale resolution for
objects of type AtkDocument and AtkText.
(webkitAccessibleClassInit): Override AtkObject::get_object_locale() method.
2013-06-12 Zan Dobersek <zdobersek@igalia.com>
[GTK] Move more build targets for source code that's free of layer violations into libPlatform
https://bugs.webkit.org/show_bug.cgi?id=115936
Reviewed by Martin Robinson.
No new tests - no new functionality.
* GNUmakefile.list.am: Move more build targets under the platform_sources and platformgtk_sources listing.
These build targets represent source files that are already free of platform layer violations and are as such
ready to be pushed down from the WebCore layer into the Platform layer.
2013-06-12 Ruth Fong <ruth_fong@apple.com>
"Open Video in New Window" doesn't make sense in fullscreen
https://bugs.webkit.org/show_bug.cgi?id=117556
Reviewed by Beth Dakin.
No new tests needed.
* WebCore.exp.in: Added WebKit2 hook for mediaIsInFullscreen() method.
2013-06-12 Ryosuke Niwa <rniwa@webkit.org>
Accessibility code assumes an area element's parent is a map element
https://bugs.webkit.org/show_bug.cgi?id=117496
Reviewed by Chris Fleizach.
We can't make such an assumption. Scripts can insert any element between area and map elements.
Merge https://chromium.googlesource.com/chromium/blink/+/b6f486284f08c52904701c93e1ec0b7d6e76af9f.
Test: accessibility/image-map-with-indirect-area-crash.html
* accessibility/AccessibilityRenderObject.cpp:
(WebCore::AccessibilityRenderObject::accessibilityImageMapHitTest):
2013-06-12 Robert Hogan <robert@webkit.org>
Whitespace between inlines with nowrap and a shrink-to-fit parent gets a line-break when it shouldn't
https://bugs.webkit.org/show_bug.cgi?id=117370
Reviewed by David Hyatt.
Test: fast/text/whitespace/inline-whitespace-wrapping-8.html
A no-wrap inline shouldn't include trailing space when deciding whether it fits on a line.
Likewise when we finish iterating through the objects on a line we should clear our linebreak
if the only thing that prevents us fitting on the line is our collapsed trailing whitespace.
Removing the trailing space from this measurement means we need to watch out for potential
breaks between no-wrap inlines, in particular if we leave a no-wrap inline ignoring spaces
and enter an autowrap inline then we need to mark the beginning of the autowrap inline
as a potential linebreak. The test fast/text/whitespace/inline-whitespace-wrapping-5.html
is an example of such a case.
* rendering/RenderBlockLineLayout.cpp:
(WebCore::LineWidth::LineWidth):
(WebCore::LineWidth::fitsOnLine):
(WebCore::LineWidth::fitsOnLineExcludingTrailingWhitespace):
(WebCore::LineWidth::fitsOnLineExcludingTrailingCollapsedWhitespace):
(WebCore::LineWidth::setTrailingWhitespaceWidth):
(WebCore::RenderBlock::LineBreaker::nextSegmentBreak):
2013-06-12 Bem Jones-Bey <bjonesbe@adobe.com>
[CSS Shapes] rectangle and inset-rectangle do not properly handle rx and ry
https://bugs.webkit.org/show_bug.cgi?id=116745
Reviewed by Dirk Schulze.
If ry is not supplied, it now defaults to the rx value. Also, if rx
and ry are not supplied, they default to 0px. This also has the effect
that the computed style for any rectangle or inset-rectangle now
contains all six parameters.
If rx > width/2 then it is clamped to width/2, and if ry > height/2,
then it is clamped to height/2. This happens at layout time because
given mixed units and relative units, that is the only time this
determination can be made.
Tests: fast/exclusions/shape-inside/shape-inside-rounded-rectangle-large-radius.html
fast/exclusions/shape-outside-floats/shape-outside-floats-rounded-rectangle-large-radius.html
* css/BasicShapeFunctions.cpp:
(WebCore::valueForBasicShape): Remove checks for undefined, since rx
and ry cannot be undefined in BasicShapes anymore.
(WebCore::basicShapeForValue): If radii are undefined in CSS, set
default values in the BasicShape, per the spec.
* rendering/ExclusionShape.cpp:
(WebCore::ensureRadiiDoNotOverlap): Utility method to ensure radii
don't overlap.
(WebCore::ExclusionShape::createExclusionShape): Remove defaulting to
zero, clamp radii per the spec.
* rendering/style/BasicShapes.cpp:
(WebCore::BasicShapeRectangle::path): Remove defaulting.
(WebCore::BasicShapeRectangle::blend): Ditto.
(WebCore::BasicShapeInsetRectangle::path): Ditto.
(WebCore::BasicShapeInsetRectangle::blend): Ditto.
* rendering/style/BasicShapes.h:
(WebCore::BasicShapeRectangle::BasicShapeRectangle): Remove defaulting
to undefined for radii.
(WebCore::BasicShapeRectangle::setCornerRadiusX): Add assert to
prevent undefined.
(WebCore::BasicShapeRectangle::setCornerRadiusY): Add assert to
prevent undefined.
(WebCore::BasicShapeInsetRectangle::BasicShapeInsetRectangle): Ditto.
(WebCore::BasicShapeInsetRectangle::setCornerRadiusX): Add assert to
prevent undefined.
(WebCore::BasicShapeInsetRectangle::setCornerRadiusY): Add assert to
prevent undefined.
2013-06-11 Brent Fulgham <bfulgham@apple.com>
[Windows] Support Title UI Element Accessibility Attribute
https://bugs.webkit.org/show_bug.cgi?id=117530
Reviewed by Anders Carlsson.
Fixes: accessibility/list-item-role.html
accessibility/hidden-legend.html
* accessibility/win/AccessibilityObjectWrapperWin.cpp:
(WebCore::AccessibilityObjectWrapper::accessibilityAttributeValue): Extend to support access
for the Title UI Element object.
* accessibility/win/AccessibilityObjectWrapperWin.h: Revise interface to use Variant output,
which is more in keeping with the Mac's 'id' method signature.
2013-06-12 Ralph Thomas <ralpht@gmail.com>
[CSS Shaders] Animations and transitions should use validated custom programs
https://bugs.webkit.org/show_bug.cgi?id=117550
Run filters used for animations and transitions through RenderLayer::computeFilterOperations
in order to validate custom filter operations.
Reviewed by Alexandru Chiculita.
No new tests as no platform can run custom filters with accelerated animations yet.
* rendering/RenderLayerBacking.cpp:
(WebCore::RenderLayerBacking::startAnimation):
(WebCore::RenderLayerBacking::startTransition):
2013-06-12 Ruth Fong <ruth_fong@apple.com>
Allow for toggling fullscreen on <video> elements
https://bugs.webkit.org/show_bug.cgi?id=117220
Reviewed by Dean Jackson.
This patch adds the ability for fullscreen
context menu item on <video> elements to switch between "Enter Fullscreen"
and "Exit Fullscreen" and behave appropriately.
No new tests. media/context-menu-action.html,
which has been disabled by bug 116651, is used to test context menus.
* English.lproj/Localizable.strings: Add "Exit Fullscreen" string.
* html/HTMLMediaElement.cpp:
(WebCore::HTMLMediaElement::toggleFullscreenState): Added to appropriately enter/exit fullscreen.
* html/HTMLMediaElement.h:
* page/ContextMenuController.cpp:
* platform/ContextMenuItem.h:
* platform/LocalizedStrings.cpp:
* platform/LocalizedStrings.h:
Updated to rename variables more appropriately to reflect the toggle-ability of video fullscreen.
* rendering/HitTestResult.cpp:
(WebCore::HitTestResult::mediaIsInFullscreen): Added to check if an element
was a media element in fullscreen.
(WebCore::HitTestResult::toggleMediaFullscreenState): Added to hook into
HTMLMediaElement::toggleFullscreenState.
* rendering/HitTestResult.h:
2013-06-12 Sergio Villar Senin <svillar@igalia.com>
Skipping {}, () and [] blocks while error recovering in CSS
https://bugs.webkit.org/show_bug.cgi?id=116071
Reviewed by Darin Adler.
From Blink r150201 and r150755 by <serya@chromium.org>
Test: fast/css/parsing-expr-error-recovery.html
The CSS parser should properly recover from invalid {}, () and []
blocks skipping them instead of discarding the whole declaration
as invalid. This merge is actually made of two different changes
from Blink, the original one that fixes the bug and another one
which refactors a bit the code making it more legible.
* css/CSSGrammar.y.in:
2013-06-12 Alberto Garcia <agarcia@igalia.com>
[BlackBerry] Remove dead WebDOM code
https://bugs.webkit.org/show_bug.cgi?id=113370
Reviewed by Anders Carlsson.
BlackBerry PR 347565
Internally reviewed by Charles Wei.
* PlatformBlackBerry.cmake:
2013-06-12 Daniel Bates <dabates@apple.com>
window.find() case-insensitive search doesn't match diacritical marks
https://bugs.webkit.org/show_bug.cgi?id=117353
<rdar://problem/8535227>
Reviewed by Darin Adler.
Currently, a case-insensitive window.find() search will return true for a word w
(e.g. café) with diacritical characters when w appears on the page without
diacritical marks (e.g. cafe). This leads to bad results, especially when
searching for a non-English word (e.g. qué) where the presence of an accented
character(s) may change the meaning of the word. Instead window.find() should
return false when case-insensitively matching a word with diacritical marks to
the same word without diacritical marks.
Test: fast/text/find-diacritical-mark.html
* editing/TextIterator.cpp:
(WebCore::SearchBuffer::SearchBuffer):
2013-06-12 Christophe Dumez <ch.dumez@sisa.samsung.com>
Support latest Web IDL indexed property getters
https://bugs.webkit.org/show_bug.cgi?id=117507
Reviewed by Kentaro Hara.
Support latest Web IDL indexed property getters:
http://www.w3.org/TR/WebIDL/#dfn-support-indexed-properties
Drop support for outdated [IndexedGetter] and [NumericIndexedGetter]
IDL extended attributes. Since the new getter format specifies the
return type, the bindings generator is now smart enough to know if
the indexed getter is numeric or not on its own.
Based on Blink r149564 by <kojih@chromium.org>.
No new tests, no behavior change.
* Modules/filesystem/EntryArray.idl:
* Modules/filesystem/EntryArraySync.idl:
* Modules/gamepad/GamepadList.idl:
* Modules/mediasource/SourceBufferList.idl:
* Modules/speech/SpeechGrammarList.idl:
* Modules/speech/SpeechRecognitionResult.idl:
* Modules/speech/SpeechRecognitionResultList.idl:
* bindings/scripts/CodeGenerator.pm:
(IsNumericType):
* bindings/scripts/CodeGeneratorJS.pm:
(GenerateGetOwnPropertySlotBody):
(GenerateGetOwnPropertyDescriptorBody):
(GetIndexedGetterFunction):
(GenerateHeader):
(GenerateImplementation):
* bindings/scripts/IDLAttributes.txt:
* bindings/scripts/test/TestEventTarget.idl:
* bindings/scripts/test/TestTypedArray.idl:
* css/CSSRuleList.idl:
* css/CSSStyleDeclaration.idl:
* css/CSSValueList.idl:
* css/MediaList.idl:
* css/StyleSheetList.idl:
* css/WebKitCSSFilterValue.idl:
* css/WebKitCSSKeyframesRule.idl:
* css/WebKitCSSTransformValue.idl:
* dom/ClientRectList.idl:
* dom/DOMNamedFlowCollection.idl:
* dom/DOMStringList.idl:
* dom/DataTransferItemList.idl:
* dom/NamedNodeMap.idl:
* dom/NodeList.idl:
* dom/PropertyNodeList.idl:
* dom/TouchList.idl:
* fileapi/FileList.idl:
* html/DOMSettableTokenList.idl:
* html/DOMTokenList.idl:
* html/HTMLAllCollection.idl:
* html/HTMLCollection.idl:
* html/HTMLFormControlsCollection.idl:
* html/HTMLFormElement.idl:
* html/HTMLPropertiesCollection.idl:
* html/HTMLSelectElement.idl:
* html/RadioNodeList.idl:
* html/canvas/Float32Array.idl:
* html/canvas/Float64Array.idl:
* html/canvas/Int16Array.idl:
* html/canvas/Int32Array.idl:
* html/canvas/Int8Array.idl:
* html/canvas/Uint16Array.idl:
* html/canvas/Uint32Array.idl:
* html/canvas/Uint8Array.idl:
* html/canvas/Uint8ClampedArray.idl:
* html/track/AudioTrackList.idl:
* html/track/TextTrackCueList.idl:
* html/track/TextTrackList.idl:
* html/track/TextTrackRegionList.idl:
* html/track/VideoTrackList.idl:
* page/PerformanceEntryList.idl:
* page/SpeechInputResultList.idl:
* plugins/DOMMimeTypeArray.idl:
* plugins/DOMPlugin.idl:
* plugins/DOMPluginArray.idl:
2013-06-12 Christophe Dumez <ch.dumez@sisa.samsung.com>
Rename [CallWith] to [ConstructorCallWith] for IDL interfaces
https://bugs.webkit.org/show_bug.cgi?id=117531
Reviewed by Kentaro Hara.
Rename [CallWith] to [ConstructorCallWith] for IDL interfaces as the
meaning is slightly different when [CallWith] is used for IDL operations
or attributes. This improves IDL readability a bit and makes it more
directly understandable.
Also removed [ConstructorCallWith] statements from interfaces with custom
constructors or no constructor, as this does not have any effect.
No new tests, no behavior change.
* Modules/filesystem/FileWriter.idl:
* Modules/mediasource/MediaSource.idl:
* Modules/mediasource/SourceBufferList.idl:
* Modules/mediastream/MediaStream.idl:
* Modules/mediastream/RTCPeerConnection.idl:
* Modules/notifications/Notification.idl:
* Modules/speech/SpeechRecognition.idl:
* Modules/speech/SpeechSynthesisUtterance.idl:
* Modules/webaudio/OfflineAudioContext.idl:
* Modules/websockets/WebSocket.idl:
* bindings/scripts/CodeGeneratorJS.pm:
(GenerateConstructorDefinition):
* bindings/scripts/IDLAttributes.txt:
* bindings/scripts/test/TestInterface.idl:
* dom/MessageChannel.idl:
* fileapi/FileReader.idl:
* html/MediaController.idl:
* html/track/TextTrackCue.idl:
* page/EventSource.idl:
* workers/SharedWorker.idl:
* workers/Worker.idl:
* xml/XMLHttpRequest.idl:
2013-06-12 Allan Sandfeld Jensen <allan.jensen@digia.com>
[Qt] Set windows key-code for multimedia keys
https://bugs.webkit.org/show_bug.cgi?id=117535
Reviewed by Jocelyn Turcotte.
Map Qt Key-events to their defined windows keycode values.
* platform/qt/PlatformKeyboardEventQt.cpp:
(WebCore::windowsKeyCodeForKeyEvent):
2013-06-12 Sergio Villar Senin <svillar@igalia.com>
[Soup] Use ResourceLoadPriority
https://bugs.webkit.org/show_bug.cgi?id=112902
Reviewed by Carlos Garcia Campos.
Use the ResourceLoadPriority from the ResourceRequest to set the
correnpondent priority to each SoupMessage.
No new tests required as there is no change in functionality,
we're just enabling a new feature in the underlying network stack.
* platform/network/soup/ResourceHandleSoup.cpp:
(WebCore::createSoupMessageForHandleAndRequest):
* platform/network/soup/ResourceRequest.h:
(WebCore):
(WebCore::toSoupMessagePriority): Translates ResourceLoadPriority
to SoupMessagePriority.
2013-06-12 Zan Dobersek <zdobersek@igalia.com>
Remove memoryInfoEnabled, quantizedMemoryInfoEnabled settings
https://bugs.webkit.org/show_bug.cgi?id=117512
Reviewed by Darin Adler.
* page/Settings.in: Remove the memoryInfoEnabled and the quantizedMemoryInfoEnabled settings. These are not used
anywhere anymore after r151199 which simplified and moved the MemoryInfo interface under window.internals.
2013-06-12 Diego Pino Garcia <dpino@igalia.com>
[GTK] Parameter 'pseudoElement' from function 'webkit_dom_dom_window_get_computed_style' should be allowed to be NULL
https://bugs.webkit.org/show_bug.cgi?id=117332
Reviewed by Xan Lopez.
Add parameter 'pseudoElement' to the list of parameters that are allowed to
be NULL.
* bindings/scripts/CodeGeneratorGObject.pm:
(GetGReturnMacro):
2013-06-12 Sergio Villar Senin <svillar@igalia.com>
Add CSS parsing recovery to functions
https://bugs.webkit.org/show_bug.cgi?id=117500
Reviewed by Andreas Kling.
From Blink r150205 by <serya@chromium.org>
Add parsing recovery capabilities to functions. Errors were
correctly detected without this change but then the whole
declaration was invalidated. By using expr_recovery to handle them
we can recover from those errors and go on with the parsing.
* css/CSSGrammar.y.in:
2013-06-11 Christophe Dumez <ch.dumez@sisa.samsung.com>
Unreviewed, rolling out r151378.
http://trac.webkit.org/changeset/151378
https://bugs.webkit.org/show_bug.cgi?id=117400
Decreased IDL readability a bit.
* Modules/encryptedmedia/MediaKeys.idl:
* Modules/mediastream/RTCIceCandidate.idl:
* Modules/mediastream/RTCPeerConnection.idl:
* Modules/mediastream/RTCSessionDescription.idl:
* Modules/webaudio/OfflineAudioContext.idl:
* Modules/websockets/WebSocket.idl:
* bindings/scripts/CodeGeneratorJS.pm:
(GenerateConstructorDefinition):
* bindings/scripts/IDLAttributes.txt:
* bindings/scripts/test/TestInterface.idl:
* bindings/scripts/test/TestNamedConstructor.idl:
* css/WebKitCSSMatrix.idl:
* html/HTMLOptionElement.idl:
* page/EventSource.idl:
* workers/SharedWorker.idl:
* workers/Worker.idl:
2013-06-11 Ryosuke Niwa <rniwa@webkit.org>
Have to invalidate the mute button when changing the volume
https://bugs.webkit.org/show_bug.cgi?id=117464
Reviewed by Darin Adler.
Merge https://chromium.googlesource.com/chromium/blink/+/c4c685c82908449526fd8c251cc551e729ebed08
but without a test since the test doesn't work in WebKit.
* html/shadow/MediaControls.cpp:
(WebCore::MediaControls::changedVolume):
2013-06-11 Max Vujovic <mvujovic@adobe.com>
[CSS Regions] Regions don't create a stacking context for their contents
https://bugs.webkit.org/show_bug.cgi?id=114268
Reviewed by Alexandru Chiculita.
Paint the region content (from RenderFlowThread) during the background phase instead of the
foreground phase.
Let's assume there is a region and a sibling element. The sibling partially overlaps the
region and appears after the region in DOM order.
Before this patch, we would paint in this order:
1) Region background
2) Sibling background
3) Region content
4) Sibling content
As a result, the sibling background would incorrectly paint between the region
background and the region content. Instead, the sibling background should paint over the
region background and the region content.
After this patch, we paint in this order:
1) Region background
2) Region content
3) Sibling background
4) Sibling content
Test: fast/regions/region-sibling-paint-order.html
* rendering/RenderRegion.cpp:
(WebCore::RenderRegion::paintObject):
2013-06-11 Jer Noble <jer.noble@apple.com>
REGRESSION: (r149232) videos on disney.com are initially scrambled on load
https://bugs.webkit.org/show_bug.cgi?id=117517
Reviewed by Eric Carlson.
Set a background color on the AVPlayerLayer to avoid corruption when no
frames are available to display.
* platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
(WebCore::MediaPlayerPrivateAVFoundationObjC::createVideoLayer):
2013-06-11 Ryosuke Niwa <rniwa@webkit.org>
Use HTMLElementFactory to create equivalent elements in WebVTTElement
https://bugs.webkit.org/show_bug.cgi?id=117423
Reviewed by Eric Carlson.
Merge https://chromium.googlesource.com/chromium/blink/+/3d60bec8e5dabfe877c482797d9ef430bfde31
This change forces the calls through the factory so that we create appropriate sub-classes based upon the passed tag name,
rather than just creating a concrete HTMLElement class with an inappropriate tag name.
Test: media/track/getCueAsHTMLCrash.html
* html/track/WebVTTElement.cpp:
(WebCore::WebVTTElement::createEquivalentHTMLElement):
2013-06-11 Benjamin Poulain <bpoulain@apple.com>
Split SelectorDataList::executeSingleTagNameSelectorData() into the 4 kinds of traversal
https://bugs.webkit.org/show_bug.cgi?id=117486
Reviewed by Ryosuke Niwa.
Since this is pretty common, split the name selector to have the constant conditions
outside the traversal.
* dom/SelectorQuery.cpp:
(WebCore::SelectorDataList::executeSingleTagNameSelectorData):
2013-06-11 Eric Carlson <eric.carlson@apple.com>
[Mac] Update text track menu
https://bugs.webkit.org/show_bug.cgi?id=117351
Reviewed by Darin Adler.
No new tests, existing tests updated.
* English.lproj/Localizable.strings: Update the menu title.
* page/CaptionUserPreferencesMac.mm: System language is no longer needed.
* platform/LocalizedStrings.cpp: Ditto.
* platform/LocalizedStrings.h:
2013-06-11 Benjamin Poulain <bpoulain@apple.com>
Fix the element type in the selector checkers
https://bugs.webkit.org/show_bug.cgi?id=117450
Reviewed by Anders Carlsson.
* css/SelectorCheckerFastPath.cpp:
(WebCore::HTMLNames::checkClassValue):
* dom/SelectorQuery.cpp:
(WebCore::SelectorDataList::executeSingleClassNameSelectorData):
2013-06-11 Benjamin Poulain <bpoulain@apple.com>
Clean up the initializer mess in Document
https://bugs.webkit.org/show_bug.cgi?id=117448
Reviewed by Ryosuke Niwa.
Basic cleaning from
https://chromium.googlesource.com/chromium/blink/+/e54ba8d3b62b0245ecdf2f3ec11cd33b4035a4d7
* dom/Document.cpp:
(WebCore::Document::Document):
* dom/Document.h:
2013-06-11 Jer Noble <jer.noble@apple.com>
Set the font size for in-band captions on the display box, not the :cue.
https://bugs.webkit.org/show_bug.cgi?id=117515
Reviewed by Eric Carlson.
Make the in-band font size behavior match the out-of-band behavior.
* html/track/TextTrackCueGeneric.cpp:
(WebCore::TextTrackCueGeneric::setFontSize):
2013-06-11 Brent Fulgham <bfulgham@apple.com>
[Windows] Implement 'attributeValue' accessor to support testing.
https://bugs.webkit.org/show_bug.cgi?id=117513
Reviewed by Anders Carlsson.
* WebCore.vcxproj/WebCore.vcxproj: Add new implementation file.
* WebCore.vcxproj/WebCore.vcxproj.filters: Ditto.
* accessibility/win/AccessibilityObjectWrapperWin.cpp: Added.
* accessibility/win/AccessibilityObjectWrapperWin.h: Add declaration
2013-05-27 Robert Hogan <robert@webkit.org>
Positioned Replaced Elements That Aren't RenderReplaced get Incorrect Width
https://bugs.webkit.org/show_bug.cgi?id=93735
Reviewed by Darin Adler.
Replaced elements that aren't RenderReplaced aren't |isReplaced| and don't have an
intrinsic height or width. This causes them to go down the wrong height and width computation
path in RenderBox when they are absolute positioned.
The notion of |isReplaced| is entwined with the notion of being |isInline| so it isn't really
possible to make them isReplaced without re-wiring a lot of code. So instead use an ad-hoc definition
of isReplacedElement in RenderBox to bring all replaced elements into the height and width calculation.
To make sure we get the right height and width in there, give non-RenderReplaced replaced renderers
the helpers for returning their approximation of intrinsic height and width.
Test: fast/replaced/width-and-height-of-positioned-replaced-elements.html
* rendering/RenderBox.cpp:
(WebCore::isReplacedElement):
(WebCore::RenderBox::computePositionedLogicalWidth):
(WebCore::RenderBox::computePositionedLogicalHeight):
* rendering/RenderBox.h:
(WebCore::RenderBox::intrinsicSize):
* rendering/RenderButton.h:
* rendering/RenderListBox.cpp:
(WebCore::RenderListBox::RenderListBox):
(WebCore::RenderListBox::computeLogicalHeight):
* rendering/RenderListBox.h:
* rendering/RenderMenuList.h:
* rendering/RenderReplaced.h:
* rendering/RenderTextControl.cpp:
(WebCore::RenderTextControl::RenderTextControl):
(WebCore::RenderTextControl::computeLogicalHeight):
* rendering/RenderTextControl.h:
2013-06-11 Ryosuke Niwa <rniwa@webkit.org>
There are unused variables in ApplyStyleCommand::mergeEndWithNextIfIdentical and ReplaceSelectionCommand::removeUnrenderedTextNodesAtEnds
https://bugs.webkit.org/show_bug.cgi?id=117475
Reviewed by Andreas Kling.
Removed.
* editing/ApplyStyleCommand.cpp:
(WebCore::ApplyStyleCommand::mergeEndWithNextIfIdentical):
* editing/ReplaceSelectionCommand.cpp:
(WebCore::ReplaceSelectionCommand::removeUnrenderedTextNodesAtEnds):
2013-06-11 Robert Hogan <robert@webkit.org>
Fix typo in r151445
Unreviewed build fix.
* rendering/RenderBlock.cpp:
(WebCore::RenderBlock::computeInlinePreferredLogicalWidths):
2013-06-11 Ryosuke Niwa <rniwa@webkit.org>
Remove redundant calls to ceilToFloat in RenderBlock::computeInlinePreferredLogicalWidths
https://bugs.webkit.org/show_bug.cgi?id=117490
Reviewed by Andreas Kling.
Merge https://chromium.googlesource.com/chromium/blink/+/be336b14325b2938ff6a4fb6191073a6e717a57c.
* rendering/RenderBlock.cpp:
(WebCore::RenderBlock::computeInlinePreferredLogicalWidths):
2013-06-03 Robert Hogan <robert@webkit.org>
Painting collapsed borders during scrolling
https://bugs.webkit.org/show_bug.cgi?id=85658
Reviewed by David Hyatt.
Test: fast/repaint/table-cell-collapsed-border-scroll.html
WHen painting collapsed borders we need to paint the borders of the row above
the topmost dirtied row so that we compute the correct value for the dirtied row's collapsed border.
* rendering/RenderTableSection.cpp:
(WebCore::RenderTableSection::paintObject):
2013-06-11 Peter Gal <galpeter@inf.u-szeged.hu>
[curl] Custom HTTP method support
https://bugs.webkit.org/show_bug.cgi?id=117302
Reviewed by Kenneth Rohde Christiansen.
No new tests, already covered by existing ones like:
http/tests/xmlhttprequest/workers/methods.html
http/tests/xmlhttprequest/workers/methods-async.html
* platform/network/curl/ResourceHandleManager.cpp:
(WebCore::ResourceHandleManager::initializeHandle):
2013-06-11 Seokju Kwon <seokju.kwon@gmail.com>
Web Inspector: Remove 'using namespace std'
https://bugs.webkit.org/show_bug.cgi?id=117498
Reviewed by Anders Carlsson.
No new tests, no behavior change.
* inspector/InspectorAgent.cpp: Remove unneeded 'using namespace std'.
* inspector/InspectorFrontendClientLocal.cpp: Use explicit std:: qualifiers instead.
(WebCore::InspectorFrontendClientLocal::constrainedAttachedWindowHeight):
(WebCore::InspectorFrontendClientLocal::constrainedAttachedWindowWidth):
* inspector/InspectorFrontendHost.cpp: Remove unneeded 'using namespace std'.
* inspector/InspectorPageAgent.cpp: Remove unneeded 'using namespace std'.
2013-06-11 Christophe Dumez <ch.dumez@sisa.samsung.com>
Support latest Web IDL named property getters
https://bugs.webkit.org/show_bug.cgi?id=117403
Reviewed by Kentaro Hara.
Add support for the latest Web IDL named property getters to the JSC
bindings generator:
http://www.w3.org/TR/WebIDL/#idl-named-properties
Drop support for outdated [NamedGetter] IDL extended attribute.
Support for other kinds of named properties will be added in later
patches. This patch only brings named property getters.
This patch is based on Blink r149247 by kojih@chromium.org.
No new tests, no behavior change.
* bindings/scripts/CodeGeneratorJS.pm:
(GenerateGetOwnPropertySlotBody):
(GenerateGetOwnPropertyDescriptorBody):
(GetSpecialAccessorFunctionForType):
(GetNamedGetterFunction):
(GenerateHeader):
(GenerateImplementation):
* bindings/scripts/IDLAttributes.txt:
* bindings/scripts/IDLParser.pm:
(applyTypedefs):
(parseSpecialOperation):
(parseSpecials):
(applyMemberList):
* bindings/scripts/test/TestEventTarget.idl:
* css/StyleSheetList.idl:
* dom/DOMNamedFlowCollection.idl:
* dom/DOMStringMap.idl:
* dom/NamedNodeMap.idl:
* dom/NodeList.idl:
* html/HTMLAllCollection.idl:
* html/HTMLCollection.idl:
* html/HTMLFormControlsCollection.idl:
* html/HTMLPropertiesCollection.idl:
* plugins/DOMMimeTypeArray.idl:
* plugins/DOMPlugin.idl:
* plugins/DOMPluginArray.idl:
* storage/Storage.idl:
2013-06-11 Carlos Garcia Campos <cgarcia@igalia.com>
[BlackBerry] Test editing/execCommand/indent-paragraphs.html times out
https://bugs.webkit.org/show_bug.cgi?id=117235
Reviewed by Rob Buis.
PR 346414.
After r150224 ResourceHandle::start() can fail returning false so
that the ResourceHandle is destroyed and the error not
handled. Handle the errors by scheduling a InvalidURLFailure and
returning true when startJob fails to make sure the ResourceHandle
is not destroyed and the error is handled and notified to the
client.
Fixes timeout in editing/execCommand/indent-paragraphs.html.
* platform/network/blackberry/ResourceHandleBlackBerry.cpp:
(WebCore::ResourceHandle::start):
2013-06-11 Ryosuke Niwa <rniwa@webkit.org>
Remove IntRect::pixelSnapped* and its enclosingRect since they are no longer used
https://bugs.webkit.org/show_bug.cgi?id=117494
Reviewed by Darin Adler.
Merge: https://chromium.googlesource.com/chromium/blink/+/9433dc00e882e2808ac1db3c1fd89090896d7b58
https://chromium.googlesource.com/chromium/blink/+/7beaa73aa099170cb2cad02c12c5e0a448b12c21
* inspector/InspectorLayerTreeAgent.cpp:
(WebCore::InspectorLayerTreeAgent::buildObjectForLayer):
* inspector/InspectorOverlay.cpp:
(WebCore::InspectorOverlay::update):
* platform/graphics/IntRect.h:
* rendering/RenderInline.cpp:
(WebCore::RenderInline::hitTestCulledInline):
* rendering/RenderObject.cpp:
(WebCore::RenderObject::repaintUsingContainer):
2013-06-11 Sergio Villar Senin <svillar@igalia.com>
Autoclose braces and parentheses at the end of style sheet
https://bugs.webkit.org/show_bug.cgi?id=117414
Reviewed by Andreas Kling.
From Blink r150202 by <serya@chromium.org>
Use closing_parenthesis and closing_brace instead of the literals
'}' and ')'. This allows the parser to treat expressions with
unmatched closing braces/parenthesis as if all of them were
actually closed.
Tests: animations/keyframe-autoclose-brace.html
css3/autoclose-braces-and-parentheses.html
* css/CSSGrammar.y.in:
2013-06-10 Jae Hyun Park <jae.park@company100.net>
[CoordinatedGraphics] Typos in custom shader support
https://bugs.webkit.org/show_bug.cgi?id=117413
Reviewed by Noam Rosenthal.
Wrong keyframe is passed when assigning filterValue.
* platform/graphics/texmap/coordinated/CoordinatedGraphicsScene.cpp:
(WebCore::CoordinatedGraphicsScene::setLayerAnimationsIfNeeded):
2013-06-10 Ryosuke Niwa <rniwa@webkit.org>
text-transform: capitalize shouldn't upconvert
https://bugs.webkit.org/show_bug.cgi?id=117485
Reviewed by Adam Barth.
Avoid the upconversion. Merge https://chromium.googlesource.com/chromium/blink/+/c5a221d6da2443df0639c01c40aac6040908ec79.
* rendering/RenderText.cpp:
(WebCore::makeCapitalized):
2013-06-10 Ryosuke Niwa <rniwa@webkit.org>
DocType strings should be 8 bit wide
https://bugs.webkit.org/show_bug.cgi?id=117487
Reviewed by Michael Saboff.
Merge https://chromium.googlesource.com/chromium/blink/+/8da02d0ce3965c4e6bf227db856bce930393429a.
* html/parser/HTMLConstructionSite.cpp:
(WebCore::HTMLConstructionSite::insertDoctype):
2013-06-10 Ryosuke Niwa <rniwa@webkit.org>
Make more functions const
https://bugs.webkit.org/show_bug.cgi?id=117455
Reviewed by Benjamin Poulain.
Merge https://chromium.googlesource.com/chromium/blink/+/886866f5034d7f30f8aa607b909313f99db1f3b4.
* editing/VisibleUnits.cpp:
(WebCore::CachedLogicallyOrderedLeafBoxes::boxIndexInLeaves):
* html/canvas/WebGLRenderingContext.cpp:
* page/ContentSecurityPolicy.cpp:
(WebCore::CSPDirectiveList::evalDisabledErrorMessage):
* rendering/RenderBlockLineLayout.cpp:
(WebCore::LineWidth::shouldIndentText):
2013-06-10 Jer Noble <jer.noble@apple.com>
REGRESSION(r151302): Many broken webaudio/ tests on Mac port.
https://bugs.webkit.org/show_bug.cgi?id=117446
Reviewed by Chris Rogers.
The new "pageConsentRequiredForAudioStart()" restriction was blocking playback event
even when page consent was given. Remvoe the restriction immediately in that case.
* Modules/webaudio/AudioContext.cpp:
(WebCore::AudioContext::startRendering):
2013-06-10 Andreas Kling <akling@apple.com>
REGRESSION(r150633): Find on page non-focused text highlight color is bright yellow.
<rdar://problem/14098882>
<http://webkit.org/b/117371>
Reviewed by Anders Carlsson.
There was a mistake in the parameter ordering which still compiled because of
implicit bool/unsigned conversion.
Changed the interface of Page::findMatchesForText() to use enums instead of bools.
No test because the color of the highlighted matches is not available through APIs.
* page/Page.h:
* page/Page.cpp:
(WebCore::Page::findMatchesForText):
(WebCore::Page::markAllMatchesForText):
(WebCore::Page::countFindMatches):
2013-06-10 Bear Travis <betravis@adobe.com>
[CSS Shapes][CSS Exclusions] Split CSS Exclusions and CSS Shapes code
https://bugs.webkit.org/show_bug.cgi?id=117162
Reviewed by Alexandru Chiculita.
With the split between the CSS Exclusions and CSS Shapes specifications,
some renaming is necessary. In general, this patch removes 'Exclusion' from
any Shapes code, while organizing the rendering shapes code into a 'shapes'
folder.
Renames:
ExclusionShape -> Shape
Exclusion[Rectangle|Polygon] -> [Rectangle|Polygon]Shape
Exclusion -> Shape
Refactoring, no new tests.
* CMakeLists.txt:
* GNUmakefile.am:
* GNUmakefile.list.am:
* Target.pri:
* WebCore.pri:
* WebCore.vcxproj/WebCore.vcxproj:
* WebCore.vcxproj/WebCore.vcxproj.filters:
* WebCore.xcodeproj/project.pbxproj:
* css/CSSComputedStyleDeclaration.cpp:
(WebCore::ComputedStyleExtractor::propertyValue):
* css/CSSPrimitiveValue.h:
* css/DeprecatedStyleBuilder.cpp:
(WebCore::ApplyPropertyShape::setValue):
(WebCore::ApplyPropertyShape::applyValue):
(WebCore::ApplyPropertyShape::createHandler):
(WebCore::DeprecatedStyleBuilder::DeprecatedStyleBuilder):
* page/animation/CSSPropertyAnimation.cpp:
(WebCore::blendFunc):
(WebCore::PropertyWrapperShape::PropertyWrapperShape):
(WebCore::CSSPropertyAnimation::ensurePropertyMap):
* rendering/LayoutState.cpp:
(WebCore::LayoutState::LayoutState):
* rendering/LayoutState.h:
(WebCore::LayoutState::LayoutState):
(WebCore::LayoutState::shapeInsideInfo):
* rendering/RenderBlock.cpp:
(WebCore::RenderBlock::styleDidChange):
(WebCore::RenderBlock::updateShapeInsideInfoAfterStyleChange):
(WebCore::shapeInfoRequiresRelayout):
(WebCore::RenderBlock::updateRegionsAndExclusionsBeforeChildLayout):
(WebCore::RenderBlock::computeShapeSize):
(WebCore::RenderBlock::updateRegionsAndExclusionsAfterChildLayout):
(WebCore::RenderBlock::insertFloatingObject):
(WebCore::RenderBlock::computeLogicalLocationForFloat):
(WebCore::RenderBlock::positionNewFloats):
(WebCore::RenderBlock::logicalLeftOffsetForLine):
(WebCore::RenderBlock::logicalRightOffsetForLine):
* rendering/RenderBlock.h:
(WebCore::RenderBlock::ensureShapeInsideInfo):
(WebCore::RenderBlock::shapeInsideInfo):
(WebCore::RenderBlock::setShapeInsideInfo):
(WebCore::RenderBlock::allowsShapeInsideInfoSharing):
(WebCore::RenderBlock::xPositionForFloatIncludingMargin):
(WebCore::RenderBlock::yPositionForFloatIncludingMargin):
* rendering/RenderBlockLineLayout.cpp:
(WebCore::RenderBlock::layoutShapeInsideInfo):
(WebCore::LineWidth::LineWidth):
(WebCore::LineWidth::shrinkAvailableWidthForNewFloatIfNeeded):
(WebCore::RenderBlock::computeInlineDirectionPositionsForLine):
(WebCore::constructBidiRunsForLine):
(WebCore::adjustLogicalLineTop):
(WebCore::RenderBlock::updateLineBoundariesForShapes):
(WebCore::RenderBlock::adjustLogicalLineTopAndLogicalHeightIfNeeded):
(WebCore::RenderBlock::layoutRunsAndFloatsInRange):
(WebCore::RenderBlock::LineBreaker::nextLineBreak):
(WebCore::RenderBlock::LineBreaker::nextSegmentBreak):
* rendering/RenderBox.cpp:
(WebCore::RenderBox::willBeDestroyed):
(WebCore::RenderBox::styleDidChange):
(WebCore::RenderBox::updateShapeOutsideInfoAfterStyleChange):
* rendering/RenderBox.h:
(WebCore::RenderBox::shapeOutsideInfo):
* rendering/RenderBoxModelObject.cpp:
(WebCore::RenderBoxModelObject::paintOffset):
* rendering/RenderView.h:
(WebCore::RenderView::pushLayoutState):
* rendering/shapes/PolygonShape.cpp: Renamed from Source/WebCore/rendering/ExclusionPolygon.cpp.
(WebCore::leftSide):
(WebCore::isReflexVertex):
(WebCore::computeXIntersection):
(WebCore::inwardEdgeNormal):
(WebCore::outwardEdgeNormal):
(WebCore::appendArc):
(WebCore::snapVerticesToLayoutUnitGrid):
(WebCore::computeShapePaddingBounds):
(WebCore::computeShapeMarginBounds):
(WebCore::PolygonShape::shapePaddingBounds):
(WebCore::PolygonShape::shapeMarginBounds):
(WebCore::getVertexIntersectionVertices):
(WebCore::appendIntervalX):
(WebCore::compareEdgeIntersectionX):
(WebCore::computeXIntersections):
(WebCore::computeOverlappingEdgeXProjections):
(WebCore::PolygonShape::getExcludedIntervals):
(WebCore::PolygonShape::getIncludedIntervals):
(WebCore::firstFitRectInPolygon):
(WebCore::aboveOrToTheLeft):
(WebCore::PolygonShape::firstIncludedIntervalLogicalTop):
* rendering/shapes/PolygonShape.h: Renamed from Source/WebCore/rendering/ExclusionPolygon.h.
(WebCore::OffsetPolygonEdge::OffsetPolygonEdge):
(WebCore::OffsetPolygonEdge::edgeIndex):
(WebCore::OffsetPolygonEdge::basis):
(WebCore::PolygonShape::PolygonShape):
* rendering/shapes/RectangleShape.cpp: Renamed from Source/WebCore/rendering/ExclusionRectangle.cpp.
(WebCore::ellipseXIntercept):
(WebCore::ellipseYIntercept):
(WebCore::FloatRoundedRect::paddingBounds):
(WebCore::FloatRoundedRect::marginBounds):
(WebCore::FloatRoundedRect::cornerInterceptForWidth):
(WebCore::RectangleShape::shapePaddingBounds):
(WebCore::RectangleShape::shapeMarginBounds):
(WebCore::RectangleShape::getExcludedIntervals):
(WebCore::RectangleShape::getIncludedIntervals):
(WebCore::RectangleShape::firstIncludedIntervalLogicalTop):
* rendering/shapes/RectangleShape.h: Renamed from Source/WebCore/rendering/ExclusionRectangle.h.
(WebCore::FloatRoundedRect::FloatRoundedRect):
(WebCore::FloatRoundedRect::rx):
(WebCore::FloatRoundedRect::ry):
(WebCore::RectangleShape::RectangleShape):
* rendering/shapes/Shape.cpp: Renamed from Source/WebCore/rendering/ExclusionShape.cpp.
(WebCore::createRectangleShape):
(WebCore::createShapeCircle):
(WebCore::createShapeEllipse):
(WebCore::createPolygonShape):
(WebCore::physicalRectToLogical):
(WebCore::physicalPointToLogical):
(WebCore::physicalSizeToLogical):
(WebCore::Shape::createShape):
* rendering/shapes/Shape.h: Renamed from Source/WebCore/rendering/ExclusionShape.h.
(WebCore::LineSegment::LineSegment):
(WebCore::Shape::~Shape):
(WebCore::Shape::shapeMargin):
(WebCore::Shape::shapePadding):
* rendering/shapes/ShapeInfo.cpp: Renamed from Source/WebCore/rendering/ExclusionShapeInfo.cpp.
(WebCore::::computedShape):
(WebCore::::computeSegmentsForLine):
* rendering/shapes/ShapeInfo.h: Renamed from Source/WebCore/rendering/ExclusionShapeInfo.h.
(WebCore::MappedInfo::ensureInfo):
(WebCore::MappedInfo::removeInfo):
(WebCore::MappedInfo::info):
(WebCore::MappedInfo::infoMap):
(WebCore::ShapeInfo::~ShapeInfo):
(WebCore::ShapeInfo::setShapeSize):
(WebCore::ShapeInfo::clearSegments):
(WebCore::ShapeInfo::shapeLogicalTop):
(WebCore::ShapeInfo::shapeLogicalBottom):
(WebCore::ShapeInfo::shapeLogicalLeft):
(WebCore::ShapeInfo::shapeLogicalRight):
(WebCore::ShapeInfo::shapeLogicalWidth):
(WebCore::ShapeInfo::shapeLogicalHeight):
(WebCore::ShapeInfo::logicalLineTop):
(WebCore::ShapeInfo::logicalLineBottom):
(WebCore::ShapeInfo::shapeContainingBlockHeight):
(WebCore::ShapeInfo::lineOverlapsShapeBounds):
(WebCore::ShapeInfo::lineWithinShapeBounds):
(WebCore::ShapeInfo::dirtyShapeSize):
(WebCore::ShapeInfo::shapeSizeDirty):
(WebCore::ShapeInfo::owner):
(WebCore::ShapeInfo::ShapeInfo):
(WebCore::ShapeInfo::logicalTopOffset):
(WebCore::ShapeInfo::logicalLeftOffset):
* rendering/shapes/ShapeInsideInfo.cpp: Renamed from Source/WebCore/rendering/ExclusionShapeInsideInfo.cpp.
(WebCore::LineSegmentRange::LineSegmentRange):
(WebCore::ShapeInsideInfo::isEnabledFor):
(WebCore::ShapeInsideInfo::adjustLogicalLineTop):
* rendering/shapes/ShapeInsideInfo.h: Renamed from Source/WebCore/rendering/ExclusionShapeInsideInfo.h.
(WebCore::LineSegmentIterator::LineSegmentIterator):
(WebCore::ShapeInsideInfo::createInfo):
(WebCore::ShapeInsideInfo::hasSegments):
(WebCore::ShapeInsideInfo::segments):
(WebCore::ShapeInsideInfo::segmentRanges):
(WebCore::ShapeInsideInfo::currentSegment):
(WebCore::ShapeInsideInfo::setNeedsLayout):
(WebCore::ShapeInsideInfo::needsLayout):
(WebCore::ShapeInsideInfo::ShapeInsideInfo):
* rendering/shapes/ShapeInterval.cpp: Renamed from Source/WebCore/rendering/ExclusionInterval.cpp.
(WebCore::IntervalX1Comparator::operator()):
(WebCore::ShapeInterval::intersect):
(WebCore::sortShapeIntervals):
(WebCore::mergeShapeIntervals):
(WebCore::intersectShapeIntervals):
(WebCore::subtractShapeIntervals):
* rendering/shapes/ShapeInterval.h: Renamed from Source/WebCore/rendering/ExclusionInterval.h.
(WebCore::ShapeInterval::ShapeInterval):
* rendering/shapes/ShapeOutsideInfo.cpp: Renamed from Source/WebCore/rendering/ExclusionShapeOutsideInfo.cpp.
(WebCore::ShapeOutsideInfo::isEnabledFor):
(WebCore::ShapeOutsideInfo::computeSegmentsForLine):
* rendering/shapes/ShapeOutsideInfo.h: Renamed from Source/WebCore/rendering/ExclusionShapeOutsideInfo.h.
(WebCore::ShapeOutsideInfo::shapeLogicalOffset):
(WebCore::ShapeOutsideInfo::leftSegmentShapeBoundingBoxDelta):
(WebCore::ShapeOutsideInfo::rightSegmentShapeBoundingBoxDelta):
(WebCore::ShapeOutsideInfo::createInfo):
(WebCore::ShapeOutsideInfo::ShapeOutsideInfo):
* rendering/style/RenderStyle.cpp:
(WebCore::RenderStyle::initialShapeInside):
* rendering/style/RenderStyle.h:
* rendering/style/ShapeValue.h: Renamed from Source/WebCore/rendering/style/ExclusionShapeValue.h.
(WebCore::ShapeValue::createShapeValue):
(WebCore::ShapeValue::createOutsideValue):
(WebCore::ShapeValue::createImageValue):
(WebCore::ShapeValue::type):
(WebCore::ShapeValue::shape):
(WebCore::ShapeValue::image):
(WebCore::ShapeValue::setImage):
(WebCore::ShapeValue::operator==):
(WebCore::ShapeValue::ShapeValue):
* rendering/style/StyleRareNonInheritedData.h:
2013-06-10 Iago Toral Quiroga <itoral@igalia.com>
Use Cairo implementation of the WidgetBackingStore instead of X11 when running on Wayland
https://bugs.webkit.org/show_bug.cgi?id=116717
Reviewed by Martin Robinson.
Refactored WidgetBackingStore to be an abstract base class and make
GtkWidgetBackingStoreX11 and WidgetBackingStoreCairo inherit from it.
GtkWidgetBackingStoreX11 renamed to WidgetBackingStoreGtkX11.
* GNUmakefile.list.am:
* platform/cairo/WidgetBackingStore.h:
(WebCore):
(WidgetBackingStore):
(WebCore::WidgetBackingStore::WidgetBackingStore):
(WebCore::WidgetBackingStore::~WidgetBackingStore):
* platform/cairo/WidgetBackingStoreCairo.cpp:
(WebCore::WidgetBackingStoreCairo::create):
(WebCore):
(WebCore::WidgetBackingStoreCairo::WidgetBackingStoreCairo):
(WebCore::WidgetBackingStoreCairo::~WidgetBackingStoreCairo):
(WebCore::WidgetBackingStoreCairo::cairoSurface):
(WebCore::WidgetBackingStoreCairo::scroll):
* platform/cairo/WidgetBackingStoreCairo.h: Added.
(WebCore):
(WidgetBackingStoreCairo):
* platform/gtk/GtkWidgetBackingStoreX11.cpp:
(WebCore::WidgetBackingStoreGtkX11::create):
(WebCore):
(WebCore::WidgetBackingStoreGtkX11::WidgetBackingStoreGtkX11):
(WebCore::WidgetBackingStoreGtkX11::~WidgetBackingStoreGtkX11):
(WebCore::WidgetBackingStoreGtkX11::cairoSurface):
(WebCore::WidgetBackingStoreGtkX11::scroll):
* platform/gtk/GtkWidgetBackingStoreX11.h: Added.
(WebCore):
(WidgetBackingStoreGtkX11):
2013-06-10 Otto Derek Cheung <otcheung@rim.com>
[BlackBerry] Store ParsedCookies as RefPtrs instead of PassRefPtrs in CookieDatabaseBackingStore
https://bugs.webkit.org/show_bug.cgi?id=117411
JIRA388672
BRWSR-11465
Reviewed by Rob Buis.
When we queue up ParsedCookie objects for modification, we should be storing them as a refptr instead
of a PassRefPtr.
* platform/blackberry/CookieDatabaseBackingStore/CookieDatabaseBackingStore.h:
2013-06-10 Mihnea Ovidenie <mihnea@adobe.com>
[CSSRegions] ASSERTION FAILED: roundedIntPoint(rendererMappedResult) == roundedIntPoint(result) in RenderGeometryMap::mapToContainer
https://bugs.webkit.org/show_bug.cgi?id=117395
Reviewed by Alexandru Chiculita.
Test: fast/regions/assert-flow-thread-compositing.html
We should not allow RenderNamedFlowThread layers to be composited, rather their collected children should checked
for compositing through their associated RenderRegions.
The assert in RenderGeometryMap::mapToContainer was hit because after https://bugs.webkit.org/show_bug.cgi?id=117270
the render named flow threads are hooked in RenderView layer tree - with the caveat that they are not directly involved
in hit testing/paint which is done through their associated regions.
* rendering/RenderLayerCompositor.cpp:
(WebCore::RenderLayerCompositor::computeCompositingRequirements): Bail out if we hit a render named flow thread layer.
(WebCore::RenderLayerCompositor::rebuildCompositingLayerTree): Ditto.
2013-06-10 Sergio Villar Senin <svillar@igalia.com>
Refactor CALCFUNCTION rules in the CSS grammar
https://bugs.webkit.org/show_bug.cgi?id=117401
Reviewed by Andreas Kling.
From Blink r149862 by <serya@chromium.org>.
Reduce the number of CALCFUNCTION rules by refactoring the closing
parenthesis handling code.
No new tests required as this is a refactoring, no new functionality
added.
* css/CSSGrammar.y.in:
2013-06-10 Radu Stavila <stavila@adobe.com>
[CSS Regions] Rename region-overflow to region-fragment
https://bugs.webkit.org/show_bug.cgi?id=117397
Renamed -webkit-region-overflow to -webkit-region-fragment and
webkitRegionOverflow to webkitRegionFragment according to the new working draft
at http://www.w3.org/TR/2013/WD-css3-regions-20130528/#the-region-fragment-property
Reviewed by Alexander Pavlov.
* css/CSSComputedStyleDeclaration.cpp:
(WebCore::ComputedStyleExtractor::propertyValue):
* css/CSSParser.cpp:
(WebCore::isValidKeywordPropertyAndValue):
(WebCore::isKeywordPropertyID):
(WebCore::CSSParser::parseValue):
* css/CSSPrimitiveValueMappings.h:
(WebCore::CSSPrimitiveValue::CSSPrimitiveValue):
(WebCore::CSSPrimitiveValue::operator RegionFragment):
* css/CSSProperty.cpp:
(WebCore::CSSProperty::isInheritedProperty):
* css/CSSPropertyNames.in:
* css/CSSValueKeywords.in:
* css/DeprecatedStyleBuilder.cpp:
(WebCore::DeprecatedStyleBuilder::DeprecatedStyleBuilder):
* css/StyleResolver.cpp:
(WebCore::StyleResolver::applyProperty):
* rendering/RenderBlock.cpp:
(WebCore::RenderBlock::hasNextPage):
* rendering/RenderRegion.cpp:
(WebCore::RenderRegion::overflowRectForFlowThreadPortion):
* rendering/style/RenderStyle.cpp:
(WebCore::RenderStyle::changeRequiresLayout):
* rendering/style/RenderStyle.h:
* rendering/style/RenderStyleConstants.h:
* rendering/style/StyleRareNonInheritedData.cpp:
(WebCore::StyleRareNonInheritedData::StyleRareNonInheritedData):
(WebCore::StyleRareNonInheritedData::operator==):
* rendering/style/StyleRareNonInheritedData.h:
2013-06-10 Christophe Dumez <ch.dumez@sisa.samsung.com>
Replace [ConstructorRaisesException] with [RaisesException]
https://bugs.webkit.org/show_bug.cgi?id=117400
Reviewed by Kentaro Hara.
Replace [ConstructorRaisesException] with [RaisesException] IDL extended
attribute and drop [ConstructorRaisesException]. It makes little sense
to have 2 extended attributes with the same meaning.
[RaisesException] can now be used on IDL operations to indicate that the
method may throw exceptions or on interfaces to indicate that the
constructor may throw exceptions.
From Blink r148027 by Kentaro Hara <haraken@chromium.org>.
No new tests, no behavior change.
* Modules/encryptedmedia/MediaKeys.idl:
* Modules/mediastream/RTCIceCandidate.idl:
* Modules/mediastream/RTCPeerConnection.idl:
* Modules/mediastream/RTCSessionDescription.idl:
* Modules/webaudio/OfflineAudioContext.idl:
* Modules/websockets/WebSocket.idl:
* bindings/scripts/CodeGeneratorJS.pm:
(GenerateConstructorDefinition):
* bindings/scripts/IDLAttributes.txt:
* bindings/scripts/test/TestInterface.idl:
* bindings/scripts/test/TestNamedConstructor.idl:
* css/WebKitCSSMatrix.idl:
* html/HTMLOptionElement.idl:
* page/EventSource.idl:
* workers/SharedWorker.idl:
* workers/Worker.idl:
2013-06-10 Mátyás Mustoha <mmatyas@inf.u-szeged.hu>
Web Inspector: refactor statusBarItems getter in front-end.
https://bugs.webkit.org/show_bug.cgi?id=110114
Reviewed by Noam Rosenthal.
Refactored "statusBarItems" methods from getters into functions and
moved default implementation from Panel.js to View.js.
Patch created by Andrey Lushnikov.
* inspector/front-end/AdvancedSearchController.js:
(WebInspector.SearchView.prototype.statusBarItems):
* inspector/front-end/ApplicationCacheItemsView.js:
(WebInspector.ApplicationCacheItemsView.prototype.statusBarItems):
* inspector/front-end/AuditsPanel.js:
(WebInspector.AuditsPanel.prototype.statusBarItems):
* inspector/front-end/CPUProfileView.js:
(WebInspector.CPUProfileView.prototype.statusBarItems):
* inspector/front-end/CSSSelectorProfileView.js:
(WebInspector.CSSSelectorProfileView.prototype.statusBarItems):
* inspector/front-end/CanvasProfileView.js:
(WebInspector.CanvasProfileView.prototype.statusBarItems):
(WebInspector.CanvasProfileType.prototype.statusBarItems):
* inspector/front-end/ConsolePanel.js:
(WebInspector.ConsolePanel.prototype.statusBarItems):
* inspector/front-end/ConsoleView.js:
(WebInspector.ConsoleView.prototype.statusBarItems):
* inspector/front-end/CookieItemsView.js:
(WebInspector.CookieItemsView.prototype.statusBarItems):
* inspector/front-end/DOMStorageItemsView.js:
(WebInspector.DOMStorageItemsView.prototype.statusBarItems):
* inspector/front-end/DatabaseTableView.js:
(WebInspector.DatabaseTableView.prototype.statusBarItems):
* inspector/front-end/Drawer.js:
* inspector/front-end/ElementsPanel.js:
(WebInspector.ElementsPanel.prototype.statusBarItems):
* inspector/front-end/ExtensionPanel.js:
(WebInspector.ExtensionPanel.prototype.statusBarItems):
* inspector/front-end/FileSystemView.js:
(WebInspector.FileSystemView.prototype.statusBarItems):
* inspector/front-end/HeapSnapshotView.js:
* inspector/front-end/IndexedDBViews.js:
(WebInspector.IDBDataView.prototype.statusBarItems):
* inspector/front-end/NetworkPanel.js:
(WebInspector.NetworkLogView.prototype.statusBarItems):
(WebInspector.NetworkPanel.prototype.statusBarItems):
* inspector/front-end/Panel.js:
(WebInspector.Panel.prototype.wasShown):
* inspector/front-end/ProfilesPanel.js:
(WebInspector.ProfileType.prototype.statusBarItems):
(WebInspector.ProfilesPanel.prototype.statusBarItems):
(WebInspector.ProfilesPanel.prototype._updateProfileTypeSpecificUI):
(WebInspector.ProfilesPanel.prototype._showProfile):
* inspector/front-end/ResourcesPanel.js:
(WebInspector.ResourcesPanel.prototype.statusBarItems):
(WebInspector.ResourcesPanel.prototype._innerShowView):
* inspector/front-end/ScriptsPanel.js:
(WebInspector.ScriptsPanel.prototype.statusBarItems):
* inspector/front-end/TimelinePanel.js:
(WebInspector.TimelinePanel.prototype.statusBarItems):
* inspector/front-end/View.js:
(WebInspector.View.prototype.statusBarItems):
2013-06-10 Benjamin Poulain <benjamin@webkit.org>
Add special tree walking for the single tag or class CSS query selectors
https://bugs.webkit.org/show_bug.cgi?id=117388
Reviewed by Ryosuke Niwa.
Queries for a single tag name or a single class name are the most common
input of querySelector.
This patch adds a simplified tree walking in those cases, only checking that particular
case instead of a full selector.
With the change, the balanced query selector benchmarks become 11% faster.
* css/SelectorCheckerFastPath.cpp:
(WebCore::HTMLNames::checkClassValue):
* dom/SelectorQuery.cpp:
(WebCore::isSingleTagNameSelector):
(WebCore::SelectorDataList::executeSingleTagNameSelectorData):
(WebCore::isSingleClassNameSelector):
(WebCore::SelectorDataList::executeSingleClassNameSelectorData):
(WebCore::SelectorDataList::execute):
* dom/SelectorQuery.h:
2013-06-09 Roger Fong <roger_fong@apple.com>
Layout info should never be cleared before delayed scroll information updates.
https://bugs.webkit.org/show_bug.cgi?id=116689.
Reviewed by Darin Adler.
Test: fast/flexbox/clear-overflow-before-scroll-update.html
Make sure that clearLayoutOverflow only gets called after layer()->updateScrollInfoAfterLayout().
Also move clearLayoutOverflow to RenderBlock so we can keep all the delayed scroll update logic in RenderBlock.
* rendering/RenderBlock.cpp:
(WebCore::RenderBlock::finishDelayUpdateScrollInfo): Call clearLayoutOverflow here.
(WebCore::RenderBlock::layout): Only call clearLayoutOverflow here if scrolling isn't being delayed.
(WebCore::RenderBlock::clearLayoutOverflow): Remove clearLayoutOverflow, move into RenderBlock to keep delayed scrolling logic in the same file.
* rendering/RenderBlock.h:
* rendering/RenderBox.cpp:
* rendering/RenderBox.h:
* rendering/RenderDeprecatedFlexibleBox.cpp: Should call updateScrollInfoAfterLayout, not layer()->updateScrollInfoAfterLayout(), so that it takes delayed scrolling logic into account.
(WebCore::RenderDeprecatedFlexibleBox::layoutBlock):
* rendering/RenderGrid.cpp: Ditto
(WebCore::RenderGrid::layoutBlock):
2013-06-09 Benjamin Poulain <bpoulain@apple.com>
Split the 3 paths of SelectorDataList::execute() into 3 separate functions
https://bugs.webkit.org/show_bug.cgi?id=117378
Reviewed by Ryosuke Niwa.
Split those to have several small execute() fucntions instead of a giant one.
* dom/SelectorQuery.cpp:
(WebCore::selectorForIdLookup):
(WebCore::isTreeScopeRoot):
(WebCore::SelectorDataList::executeFastPathForIdSelector):
(WebCore::SelectorDataList::executeSingleSelectorData):
(WebCore::SelectorDataList::executeSingleMultiSelectorData):
(WebCore::SelectorDataList::execute):
* dom/SelectorQuery.h:
2013-06-09 Benjamin Poulain <bpoulain@apple.com>
Scrolling with platformWidget and delegateScrolling is incorrectly clamped
https://bugs.webkit.org/show_bug.cgi?id=117369
<rdar://problem/13985064>
Reviewed by Darin Adler.
The patch http://trac.webkit.org/changeset/142526 clamps the input position
in the ScrollView scroll range. This was done for the path to the ScrollingCoordinator.
The problem with that change is ScrollView::setScrollPosition() can delegate the scrolling
to either a platformWidget, or through delegateScrolling. After r142526, the position is clamped,
and we do not let those external scrolling mechanims handle the out-of-bound scrolling.
This patch fixes the issue by moving the threaded scrolling call to ScrollView,
after the delegate handling code.
* page/FrameView.cpp:
(WebCore::FrameView::setScrollPosition):
(WebCore::FrameView::requestScrollPositionUpdate):
2013-06-08 Igor Oliveira <igor.o@sisa.samsung.com>
before/after generated content is not working with HTMLSummaryElement and HTMLDetailsElement.
https://bugs.webkit.org/show_bug.cgi?id=117374
Allow before/after pseudo generated content be added in HTMLDetailsElement and HTMLSumamaryElement.
Reviewed by Ryosuke Niwa.
Test: fast/css-generated-content/details-summary-before-after.html
* html/HTMLDetailsElement.cpp:
(WebCore::HTMLDetailsElement::childShouldCreateRenderer):
* html/HTMLSummaryElement.cpp:
(WebCore::HTMLSummaryElement::childShouldCreateRenderer):
2013-06-08 Peter Gal <galpeter@inf.u-szeged.hu>
[curl] Allow headers with empty value
https://bugs.webkit.org/show_bug.cgi?id=117344
Reviewed by Brent Fulgham.
No new tests, already covered by:
http/tests/xmlhttprequest/xmlhttprequest-setrequestheader-no-value.html
http/tests/xmlhttprequest/post-blob-content-type-sync.html
* platform/network/curl/ResourceHandleManager.cpp:
(WebCore::ResourceHandleManager::initializeHandle):
2013-06-08 Peter Gal <galpeter@inf.u-szeged.hu>
[curl] Handling of blob elements is incorrect
https://bugs.webkit.org/show_bug.cgi?id=117301
Reviewed by Kenneth Rohde Christiansen.
No new tests, covered by existing ones:
http/tests/fileapi/xhr-send-form-data-filename-escaping.html
http/tests/fileapi/xhr-send-form-data-mimetype-normalization.html
* platform/network/curl/ResourceHandleManager.cpp:
(WebCore::getFormElementsCount): Resolve Blob elements.
2013-06-07 Alexandru Chiculita <achicu@adobe.com>
[CSS Regions] Layers inside the RenderFlowThread should be collected by the layer of RenderView
https://bugs.webkit.org/show_bug.cgi?id=117270
Reviewed by David Hyatt.
RenderNamedFlowThreads are attached to the RenderView, but they are painted
and hit-tested through their regions. The easiest way to prevent the RenderView
from seeing the RenderNamedFlowThreads as its own children was to avoid collecting
the layers of the RenderNamedFlowThreads as children layers of the RenderView.
However, most of the code is analyzing the layers tree starting from the root,
so having the RenderNamedFlowThread participate in the layer tree is needed
in order to enable compositing for layers inside the flow thread.
This patch makes the RenderNamedFlowThread visible to the RenderView, but
ignores it when iterates the children of the RenderView in paint and hit-test methods.
No new tests, no visible changes.
* rendering/RenderLayer.cpp:
(WebCore::RenderLayer::paintList):
(WebCore::RenderLayer::hitTestList):
(WebCore::RenderLayer::calculateLayerBounds):
(WebCore::RenderLayer::collectLayers):
* rendering/RenderTreeAsText.cpp:
(WebCore::writeLayers):
2013-06-07 Bear Travis <betravis@adobe.com>
[CSS Exclusions][CSS Shapes] Incorrect compile flag in LayoutState.h
https://bugs.webkit.org/show_bug.cgi?id=117318
Reviewed by Alexandru Chiculita.
m_exclusionShapeInsideInfo should be guarded by the CSS_SHAPES flag,
not the CSS_EXCLUSIONS flag.
No tests required.
* rendering/LayoutState.h:
2013-06-07 Christophe Dumez <ch.dumez@sisa.samsung.com>
Get rid of outdated raises() from Web IDL
https://bugs.webkit.org/show_bug.cgi?id=117350
Reviewed by Darin Adler.
Stop using "raises()" in the IDL as this is no longer part of the Web IDL
specification. Web IDL no longer specifies exceptions for operations. Instead
it is now explained in prose.
WebKit still needs to know if the method can throw an exception (but does not
need the exception name) so this patch adds a WebKit specific IDL extended
attribute: [RaisesException]. The naming is consistent with Blink.
This results in more standard and concise IDL. This also simplifies a lot
the code of the IDL parser.
No new tests, no behavior change.
* Modules/battery/BatteryManager.idl:
* Modules/encryptedmedia/MediaKeySession.idl:
* Modules/encryptedmedia/MediaKeys.idl:
* Modules/filesystem/DirectoryEntrySync.idl:
* Modules/filesystem/DirectoryReaderSync.idl:
* Modules/filesystem/EntrySync.idl:
* Modules/filesystem/FileEntrySync.idl:
* Modules/filesystem/FileWriter.idl:
* Modules/filesystem/FileWriterSync.idl:
* Modules/filesystem/WorkerContextFileSystem.idl:
* Modules/indexeddb/IDBCursor.idl:
* Modules/indexeddb/IDBDatabase.idl:
* Modules/indexeddb/IDBFactory.idl:
* Modules/indexeddb/IDBIndex.idl:
* Modules/indexeddb/IDBKeyRange.idl:
* Modules/indexeddb/IDBObjectStore.idl:
* Modules/indexeddb/IDBRequest.idl:
* Modules/indexeddb/IDBTransaction.idl:
* Modules/mediasource/MediaSource.idl:
* Modules/mediasource/SourceBuffer.idl:
* Modules/mediasource/SourceBufferList.idl:
* Modules/mediastream/MediaStream.idl:
* Modules/mediastream/MediaStreamTrack.idl:
* Modules/mediastream/NavigatorMediaStream.idl:
* Modules/mediastream/RTCDTMFSender.idl:
* Modules/mediastream/RTCDataChannel.idl:
* Modules/mediastream/RTCPeerConnection.idl:
* Modules/navigatorcontentutils/NavigatorContentUtils.idl:
* Modules/networkinfo/NetworkInfoConnection.idl:
* Modules/notifications/Notification.idl:
* Modules/notifications/NotificationCenter.idl:
* Modules/speech/SpeechRecognition.idl:
* Modules/vibration/NavigatorVibration.idl:
* Modules/webaudio/AudioBuffer.idl:
* Modules/webaudio/AudioContext.idl:
* Modules/webaudio/AudioNode.idl:
* Modules/webdatabase/DOMWindowWebDatabase.idl:
* Modules/webdatabase/DatabaseSync.idl:
* Modules/webdatabase/WorkerContextWebDatabase.idl:
* Modules/websockets/WebSocket.idl:
* bindings/scripts/CodeGeneratorCPP.pm:
(GenerateImplementation):
* bindings/scripts/CodeGeneratorGObject.pm:
(GenerateFunction):
(GenerateFunctions):
* bindings/scripts/CodeGeneratorJS.pm:
(GenerateImplementation):
(GenerateParametersCheck):
(GenerateImplementationFunctionCall):
(GenerateConstructorDefinition):
* bindings/scripts/CodeGeneratorObjC.pm:
(GenerateImplementation):
* bindings/scripts/IDLAttributes.txt:
* bindings/scripts/IDLParser.pm:
(parseOperationRest):
* bindings/scripts/test/TestEventTarget.idl:
* bindings/scripts/test/TestObj.idl:
* bindings/scripts/test/TestSupplemental.idl:
* bindings/scripts/test/TestTypedefs.idl:
* css/CSSHostRule.idl:
* css/CSSMediaRule.idl:
* css/CSSPrimitiveValue.idl:
* css/CSSStyleDeclaration.idl:
* css/CSSStyleSheet.idl:
* css/CSSSupportsRule.idl:
* css/FontLoader.idl:
* css/MediaList.idl:
* css/WebKitCSSMatrix.idl:
* dom/CharacterData.idl:
* dom/DOMImplementation.idl:
* dom/DataTransferItemList.idl:
* dom/Document.idl:
* dom/DocumentFragment.idl:
* dom/DocumentType.idl:
* dom/Element.idl:
* dom/EventTarget.idl:
* dom/MessagePort.idl:
* dom/MutationObserver.idl:
* dom/NamedNodeMap.idl:
* dom/Node.idl:
* dom/NodeIterator.idl:
* dom/Range.idl:
* dom/ShadowRoot.idl:
* dom/Text.idl:
* dom/WebKitNamedFlow.idl:
* fileapi/FileReader.idl:
* fileapi/FileReaderSync.idl:
* html/DOMTokenList.idl:
* html/HTMLCanvasElement.idl:
* html/HTMLDialogElement.idl:
* html/HTMLElement.idl:
* html/HTMLEmbedElement.idl:
* html/HTMLFrameElement.idl:
* html/HTMLIFrameElement.idl:
* html/HTMLInputElement.idl:
* html/HTMLMediaElement.idl:
* html/HTMLObjectElement.idl:
* html/HTMLOptionsCollection.idl:
* html/HTMLSelectElement.idl:
* html/HTMLTableElement.idl:
* html/HTMLTableRowElement.idl:
* html/HTMLTableSectionElement.idl:
* html/HTMLTextAreaElement.idl:
* html/HTMLVideoElement.idl:
* html/MediaController.idl:
* html/TimeRanges.idl:
* html/canvas/CanvasGradient.idl:
* html/canvas/CanvasRenderingContext2D.idl:
* html/canvas/DOMPath.idl:
* html/canvas/DataView.idl:
* html/canvas/OESVertexArrayObject.idl:
* html/canvas/WebGLDebugShaders.idl:
* html/canvas/WebGLRenderingContext.idl:
* html/track/AudioTrackList.idl:
* html/track/TextTrack.idl:
* html/track/TextTrackCue.idl:
* html/track/TextTrackList.idl:
* html/track/VideoTrackList.idl:
* loader/appcache/DOMApplicationCache.idl:
* page/Crypto.idl:
* page/DOMSelection.idl:
* page/DOMWindow.idl:
* page/EventSource.idl:
* page/History.idl:
* page/Performance.idl:
* storage/Storage.idl:
* svg/SVGAngle.idl:
* svg/SVGAnimationElement.idl:
* svg/SVGColor.idl:
* svg/SVGDocument.idl:
* svg/SVGLength.idl:
* svg/SVGLengthList.idl:
* svg/SVGLocatable.idl:
* svg/SVGMatrix.idl:
* svg/SVGNumberList.idl:
* svg/SVGPaint.idl:
* svg/SVGPathSegList.idl:
* svg/SVGPointList.idl:
* svg/SVGStringList.idl:
* svg/SVGTextContentElement.idl:
* svg/SVGTransformList.idl:
* testing/InternalSettings.idl:
* testing/Internals.idl:
* workers/AbstractWorker.idl:
* workers/DedicatedWorkerContext.idl:
* workers/Worker.idl:
* workers/WorkerContext.idl:
* xml/XMLHttpRequest.idl:
* xml/XMLHttpRequestUpload.idl:
* xml/XMLSerializer.idl:
* xml/XPathEvaluator.idl:
* xml/XPathExpression.idl:
* xml/XPathResult.idl:
2013-06-07 Brady Eidson <beidson@apple.com>
REGRESSION (r151088): Crash navigating away from non-loaded main resources with non-loaded scripts.
<rdar://problem/14052886> and https://bugs.webkit.org/show_bug.cgi?id=117278
Reviewed by Anders Carlsson.
Test: http/tests/navigation/slow-loading-page-with-slow-script.php
* html/parser/HTMLScriptRunner.cpp:
(WebCore::HTMLScriptRunner::isPendingScriptReady): The script runner might be told about a script
after it has already been detached (the main resource load has finished/failed/cancelled).
Don't dereference a null document in that case.
2013-06-07 Andy Estes <aestes@apple.com>
Compile WebCoreTestShimLibrary.cpp on iOS, but exclude the Carbon bits
https://bugs.webkit.org/show_bug.cgi?id=117360
Reviewed by Mark Rowe.
In r150114 we tried to make the WebCoreTestShim target build on iOS by
excluding its only source file from the build. While this allowed the
target to build, it prevented the target's product (WebCoreTestShim.dylib)
from being created. This causes xcodebuild to fail if you ask it to
install the target.
Fix this by building the target's product on iOS. Just use the
preprocessor to exclude the bits that won't build on iOS.
* Configurations/WebCoreTestShim.xcconfig:
* testing/WebCoreTestShimLibrary.cpp:
2013-06-07 Ryosuke Niwa <rniwa@webkit.org>
REGRESSION: Lines jump up and down while typing Chinese or Japanese
https://bugs.webkit.org/show_bug.cgi?id=115931
Reviewed by Darin Adler.
The bug was caused by Font::width caching the width of text even when the font fallbacks existed when fallbackFonts
argument was null; because of this, a later call to Font::width was returning the width without filling up
fallbackFonts even if it was not null this time.
Fixed the bug by adding a local fallback fonts hash set, and checking the emptiness of this variable in Font::width.
Also added pass fallbackFonts around in various places to make use of the cached font fallbacks.
No new tests. Unfortunately I haven't been able to make a reliable reduction for this bug.
* platform/graphics/Font.cpp:
(WebCore::Font::width):
* rendering/RenderBlockLineLayout.cpp:
(WebCore::measureHyphenWidth):
(WebCore::setLogicalWidthForTextRun):
(WebCore::textWidth):
(WebCore::tryHyphenating):
(WebCore::RenderBlock::LineBreaker::nextSegmentBreak):
* rendering/RenderText.cpp:
(WebCore::maxWordFragmentWidth):
(WebCore::RenderText::computePreferredLogicalWidths):
2013-06-07 Zan Dobersek <zdobersek@igalia.com>
[regression] build failure WebKitFontFamilyNames.h missing
https://bugs.webkit.org/show_bug.cgi?id=117178
Reviewed by Sam Weinig.
* GNUmakefile.am: Make libPlatform and other sources depend on the generated platform sources. This should prevent
build failures in source code that's depending on the generated platform sources.
2013-06-07 Chris Fleizach <cfleizach@apple.com>
MathML line fraction needs to parse number values
https://bugs.webkit.org/show_bug.cgi?id=117305
Reviewed by Darin Adler.
The line fraction thickness was not handling arbitrary thickness numbers.
The accessibility code was not handling default values for line thickness, so
it made sense to have AX rely on the RenderFraction object to retrive the thickness.
Modified existing tests to cover new behavior.
* accessibility/AccessibilityRenderObject.cpp:
(WebCore::AccessibilityRenderObject::mathLineThickness):
* rendering/mathml/RenderMathMLFraction.cpp:
(WebCore::RenderMathMLFraction::updateFromElement):
* rendering/mathml/RenderMathMLFraction.h:
(WebCore::RenderMathMLFraction::lineThickness):
(WebCore::toRenderMathMLFraction):
2013-06-07 Claudio Saavedra <csaavedra@igalia.com>
[rendering] Use foreground color to render the overtype caret
https://bugs.webkit.org/show_bug.cgi?id=117347
Reviewed by Darin Adler.
Currently, the overtype caret is rendered using the colors of
a normal selection, which is confusing. This patch enables RenderObject
to differentiate between a normal and a overtype caret selection,
in order to use a different color for the latter.
Also, let RenderView update the selection if this is unchanged
when going from a overtype caret to one character selection and
viceversa.
* rendering/RenderObject.cpp:
(WebCore::RenderObject::selectionBackgroundColor):
* rendering/RenderView.cpp:
(WebCore::RenderView::setSelection):
* rendering/RenderView.h:
2013-06-07 Christophe Dumez <ch.dumez@sisa.samsung.com>
Get rid of outdated getter / setter raises from Web IDL
https://bugs.webkit.org/show_bug.cgi?id=117346
Reviewed by Darin Adler.
Stop using "getter / setter raises" in the IDL as this is no longer part of
the Web IDL specification. Web IDL no longer specifies exceptions for
attribute getters or setters. Instead, it is now explained in prose.
WebKit still needs to know if the getter / setter can throw an exception
(but does not need the exception name) so this patch adds 2 WebKit specific
IDL extended attributes: [GetterRaisesException] / [SetterRaisesException].
The naming is consistent with Blink.
This results in more standard and concise IDL. This also simplifies a lot
the code of the IDL parser.
Note that this patch does not remove "raises()" from the IDL methods yet.
This should be replaced by [RaisesException] IDL extended attribute in a
later patch.
No new tests, no behavior change.
* Modules/indexeddb/IDBRequest.idl:
* Modules/mediasource/MediaSource.idl:
* Modules/mediasource/SourceBuffer.idl:
* Modules/mediastream/RTCDataChannel.idl:
* Modules/mediastream/RTCPeerConnection.idl:
* Modules/mediastream/RTCSessionDescription.idl:
* Modules/mediastream/RTCStatsResponse.idl:
* Modules/webaudio/AnalyserNode.idl:
* Modules/webaudio/AudioBufferSourceNode.idl:
* Modules/webaudio/AudioNode.idl:
* Modules/webdatabase/SQLResultSet.idl:
* bindings/scripts/CodeGeneratorCPP.pm:
(GenerateImplementation):
* bindings/scripts/CodeGeneratorGObject.pm:
(GenerateProperty):
(GenerateFunctions):
* bindings/scripts/CodeGeneratorJS.pm:
(GenerateImplementation):
* bindings/scripts/CodeGeneratorObjC.pm:
(GenerateImplementation):
* bindings/scripts/IDLAttributes.txt:
* bindings/scripts/IDLParser.pm:
(parseAttributeRest):
(parseAttributeRestOld):
* bindings/scripts/test/TestObj.idl:
* bindings/scripts/test/TestTypedefs.idl:
* css/CSSCharsetRule.idl:
* css/CSSRule.idl:
* css/CSSStyleDeclaration.idl:
* css/CSSValue.idl:
* css/MediaList.idl:
* dom/Attr.idl:
* dom/CharacterData.idl:
* dom/Document.idl:
* dom/Node.idl:
* dom/ProcessingInstruction.idl:
* dom/Range.idl:
* dom/ShadowRoot.idl:
* dom/TreeWalker.idl:
* html/HTMLElement.idl:
* html/HTMLInputElement.idl:
* html/HTMLMarqueeElement.idl:
* html/HTMLMediaElement.idl:
* html/HTMLMeterElement.idl:
* html/HTMLOptionElement.idl:
* html/HTMLOptionsCollection.idl:
* html/HTMLProgressElement.idl:
* html/HTMLSelectElement.idl:
* html/HTMLTableElement.idl:
* html/HTMLTextAreaElement.idl:
* html/MediaController.idl:
* html/track/TextTrackCue.idl:
* html/track/TextTrackRegion.idl:
* page/DOMWindow.idl:
* storage/Storage.idl:
* svg/SVGAltGlyphElement.idl:
* svg/SVGAngle.idl:
* svg/SVGAnimatedBoolean.idl:
* svg/SVGAnimatedEnumeration.idl:
* svg/SVGAnimatedInteger.idl:
* svg/SVGAnimatedNumber.idl:
* svg/SVGAnimatedString.idl:
* svg/SVGElement.idl:
* svg/SVGGlyphRefElement.idl:
* svg/SVGLangSpace.idl:
* svg/SVGLength.idl:
* svg/SVGPreserveAspectRatio.idl:
* svg/SVGSVGElement.idl:
* svg/SVGScriptElement.idl:
* svg/SVGStyleElement.idl:
* svg/SVGViewSpec.idl:
* xml/XMLHttpRequest.idl:
* xml/XPathResult.idl:
2013-06-07 Kangil Han <kangil.han@samsung.com>
Remove unused header includes in Document
https://bugs.webkit.org/show_bug.cgi?id=117339
Reviewed by Andreas Kling.
Minor code cleanup.
* dom/Document.cpp:
* dom/Document.h:
2013-06-07 Allan Sandfeld Jensen <allan.jensen@digia.com>
Unnecessary use of Layout types in GraphicsLayer::paintGraphicsLayerContents
https://bugs.webkit.org/show_bug.cgi?id=117340
Reviewed by Darin Adler.
There is no reason to use Layout types when copying from Int types to Int types.
* platform/graphics/GraphicsLayer.cpp:
(WebCore::GraphicsLayer::paintGraphicsLayerContents):
2013-06-07 Grzegorz Czajkowski <g.czajkowski@samsung.com>
[EFL][GTK] TextCheckerEnchant uses deprecated enchant_dict_add_to_personal
https://bugs.webkit.org/show_bug.cgi?id=117335
Reviewed by Christophe Dumez.
enchant_dict_add_to_personal has been deprecated at r22321 in Enchant repository.
No behavior change, no new tests needed.
* platform/text/enchant/TextCheckerEnchant.cpp:
(WebCore::TextCheckerEnchant::learnWord):
Use enchant_dict_add instead of enchant_dict_add_to_personal.
2013-06-07 Zalan Bujtas <zalan@apple.com>
Frame flattening: crash when child iframe is removed during beforeload.
https://bugs.webkit.org/show_bug.cgi?id=116220
Reviewed by Antti Koivisto.
FrameView can get destroyed in updateWidget(). Normally, it is protected by layout()
but with frame flattening on, it can also be called asynchronously through the
post layout timer.
Test: fast/frames/flattening/crash-remove-iframe-during-object-beforeload.html
* page/FrameView.cpp:
(WebCore::FrameView::performPostLayoutTasks):
2013-06-06 Carlos Garcia Campos <cgarcia@igalia.com>
Make CachedResource virtual methods overridden in derived classes private
https://bugs.webkit.org/show_bug.cgi?id=117289
Reviewed by Darin Adler.
And mark them as OVERRIDE too. Also mark all CachedResource
derived classes as FINAL.
* inspector/InspectorPageAgent.cpp:
(WebCore::cachedResourcesForFrame):
* loader/cache/CachedCSSStyleSheet.h:
* loader/cache/CachedFont.h:
* loader/cache/CachedImage.h:
* loader/cache/CachedRawResource.h:
* loader/cache/CachedSVGDocument.h:
* loader/cache/CachedScript.h:
* loader/cache/CachedShader.h:
* loader/cache/CachedTextTrack.h:
* loader/cache/CachedXSLStyleSheet.h:
2013-06-07 Mihnea Ovidenie <mihnea@adobe.com>
[CSSRegions] getBoundingClientRect wrong for inline content nodes
https://bugs.webkit.org/show_bug.cgi?id=117290
Reviewed by Alexandru Chiculita.
getBoundingClientRect returned incorrect values for inline content that
was directly flowed inside regions because its mapLocalToContainer was not
properly patched as its RenderBox counterpart. This patch adds mapLocalToContainer
method in RenderFlowThread so that is properly called for all the elements inside the
flow thread.
Also, modified offsetFromContainer so that if the container is the flow thread,
offsetDependsOnPoint is set to true which further sets RenderGeometryMapStep::m_isNonUniform
to true for each step added in pushMappingToContainer methods.
Test: fast/regions/flowed-inline-content-bounding-client-rect.html
* rendering/RenderBox.cpp:
(WebCore::RenderBox::mapLocalToContainer):
(WebCore::RenderBox::pushMappingToContainer):
(WebCore::RenderBox::offsetFromContainer):
* rendering/RenderFlowThread.cpp:
(WebCore::RenderFlowThread::mapLocalToContainer):
* rendering/RenderFlowThread.h:
* rendering/RenderInline.cpp:
(WebCore::RenderInline::offsetFromContainer):
* rendering/RenderObject.cpp:
(WebCore::RenderObject::offsetFromContainer):
2013-06-06 Kangil Han <kangil.han@samsung.com>
Minor code cleanup to remove unused header includes
https://bugs.webkit.org/show_bug.cgi?id=117283
Reviewed by Andreas Kling.
* loader/cache/CachedResourceClient.h:
* rendering/RenderBlock.cpp:
* rendering/RenderBox.cpp:
* rendering/RenderBoxModelObject.cpp:
* rendering/RenderObject.cpp:
2013-06-06 Jer Noble <jer.noble@apple.com>
Restrict WebAudio from playing when disallowed by page.
https://bugs.webkit.org/show_bug.cgi?id=117310
Reviewed by Eric Carlson.
Add a new behavior restriction which would mute WebAudio
when media playback is disallowed by the page.
* Modules/webaudio/AudioContext.cpp:
(WebCore::AudioContext::constructCommon): Set the RequirePageConsentForAudioStartRestriction
restriction for the Mac port
(WebCore::AudioContext::document): Cast the execution context to a document.
(WebCore::AudioContext::lazyInitialize): Call startRendering() instead of
m_destinationNode->startRendering() directly.
(WebCore::AudioContext::startRendering): If media loading is disabled, add
a mediaCanStart listener.
(WebCore::AudioContext::mediaCanStart): Remove the RequirePageConsentForAudioStartRestriction.
* Modules/webaudio/AudioContext.h:
(WebCore::AudioContext::pageConsentRequiredForAudioStart): Added; simple wrapper.
* Modules/webaudio/AudioDestinationNode.cpp:
(WebCore::AudioDestinationNode::render): Mute output if pageConsentRequiredForAudioStart().
2013-06-03 Jer Noble <jer.noble@apple.com>
Upstream iOS WebAudio behavior restrictions.
https://bugs.webkit.org/show_bug.cgi?id=117151
Reviewed by Eric Carlson.
2012-06-25 Jeffrey Pfau <jpfau@apple.com>
<rdar://problem/11041007> WebAudio should restrict playback to user interaction on iOS
Added a bevahior restrictions field in AudioContext that behaviors similarly to
the one in HTMLMediaElement. Restrictions are lifted when JavaScript calls noteOn,
noteGrainOn or startRendering from a user gesture event.
Reviewed by Dean Jackson.
No new tests, testing framework doesn't support web audio.
* Modules/webaudio/AudioBufferSourceNode.cpp:
(WebCore::AudioBufferSourceNode::startGrain):
* Modules/webaudio/AudioContext.cpp:
(WebCore::AudioContext::AudioContext):
(WebCore::AudioContext::constructCommon):
(WebCore::AudioContext::lazyInitialize):
(WebCore::AudioContext::startRendering):
* Modules/webaudio/AudioContext.h:
(WebCore::AudioContext::userGestureRequiredForAudioStart):
(WebCore::AudioContext::addBehaviorRestriction):
(WebCore::AudioContext::removeBehaviorRestriction):
* Modules/webaudio/AudioDestinationNode.cpp:
(WebCore::AudioDestinationNode::render):
* Modules/webaudio/AudioScheduledSourceNode.cpp:
(WebCore::AudioScheduledSourceNode::start):
2013-06-06 Ruth Fong <ruth_fong@apple.com>
Expose HTMLCanvasElement supportsContext
https://bugs.webkit.org/show_bug.cgi?id=70117
Reviewed by Darin Adler.
Adds the supportsContext function for <canvas> elements as speced here:
http://www.whatwg.org/specs/web-apps/current-work/multipage/the-canvas-element.html#dom-canvas-supportscontext
Test: fast/canvas/webgl/canvas-supports-context.html
* bindings/js/JSHTMLCanvasElementCustom.cpp:
(WebCore::get3DContextAttributes): Added.
Refactored function from JSHTMLCanvasElement::getContext that parses attributes.
(WebCore::JSHTMLCanvasElement::getContext): Updated to use refactored function.
(WebCore::JSHTMLCanvasElement::supportsContext): Added.
Exposes JS function supportsContext.
* html/HTMLCanvasElement.cpp:
(WebCore::HTMLCanvasElement::getContext): Updated to use refactored functions.
(WebCore::HTMLCanvasElement::supportsContext): Added.
Implements supportsContext function based on contextId parameter (i.e. '2d').
* html/HTMLCanvasElement.h: Added refactored functions from HTMLCanvasElement::getContext.
* html/HTMLCanvasElement.idl:
2013-06-06 Zoltan Horvath <zoltan@webkit.org>
[CSS Shapes] Rename updateLineBoundariesForExclusions to updateShapeAndSegmentsForCurrentLine
https://bugs.webkit.org/show_bug.cgi?id=117308
Reviewed by Alexandru Chiculita.
We have a standalone specification for CSS Shapes now: http://dev.w3.org/csswg/css-shapes/
this change renames updateLineBoundariesForExclusions to updateShapeAndSegmentsForCurrentLine.
No behavior change, no new tests needed.
* rendering/RenderBlock.h:
* rendering/RenderBlockLineLayout.cpp:
(WebCore::RenderBlock::updateLineBoundariesForShapes):
(WebCore::RenderBlock::layoutRunsAndFloatsInRange):
2013-06-06 Diego Pino Garcia <dpino@igalia.com>
[GTK] Parameter 'refChild' from function 'webkit_dom_node_insert_before' should be allowed to be NULL
https://bugs.webkit.org/show_bug.cgi?id=117303
Reviewed by Xan Lopez.
Add parameter 'refChild' to the list of parameters that are allowed to
be NULL.
* bindings/scripts/CodeGeneratorGObject.pm:
2013-06-06 Bem Jones-Bey <bjonesbe@adobe.com>
Fix formatting in BasicShapes.cpp
https://bugs.webkit.org/show_bug.cgi?id=117309
Reviewed by Alexandru Chiculita.
I reformatted the code in BasicShapes.cpp (bug 116734) to fix the
style issues, and I got some of the formatting wrong, which makes the
code much harder to read. This patch fixes that formatting.
No new tests, formatting clean up.
* rendering/style/BasicShapes.cpp:
(WebCore::BasicShapeRectangle::path): Fix formatting.
(WebCore::BasicShapeInsetRectangle::path): Fix formatting.
2013-06-06 Christophe Dumez <ch.dumez@sisa.samsung.com>
Clean up AddIncludesForType in JSC bindings generators
https://bugs.webkit.org/show_bug.cgi?id=117297
Reviewed by Kentaro Hara.
Clean up AddIncludesForType in JSC bindings generators:
- Add JSC specific SkipIncludeHeader() subroutine and move
exceptions there.
- Remove special case for SerializedScriptValue by improving
the condition for callbacks: "JS" prefix is now only added to
headers in callbacks if they are wrapper types. Non-wrapper
types such as SerializedScriptValue do not have a JS*.h
header.
No new tests, code clean up.
* bindings/scripts/CodeGenerator.pm:
(SkipIncludeHeader):
- Reuse IsPrimitiveType() to avoid code duplication.
- Remove special case for String as this is not a valid IDL type
and it is not currently used.
* bindings/scripts/CodeGeneratorJS.pm:
(SkipIncludeHeader):
(AddIncludesForType):
2013-06-06 Radu Stavila <stavila@adobe.com>
:hover style not applied on hover if its display property is different from original style's
https://bugs.webkit.org/show_bug.cgi?id=7555
Properly apply the :hover pseudo-class when reattaching is required (e.g. when changing the display type)
A new AttachContext class was created to be passed along as an optional parameter to the attach/detach/reattach methods.
This new parameter is used to:
- prevent the element from being removed from the list of hovered/active elements upon detach when a reattach is in progress
- prevent the style from being incorrectly computed (due to the previous point)
- prevent the style from being computed twice (the attach() method used to recompute it)
Special care was required to the case when display:none is specified in the :hover class. Enabling the :hover style
was leaving the element without a renderer, which was causing it to remain stuck in the :hover state (subsequent mouseMove
events were not able to reset the element to its normal style due to the fact that it had no renderer).
The DragController::startDrag method was updated to properly handle the case when dragImage is NULL
(for instance by setting display:none inside the -webkit-drag pseudo-class).
Reviewed by Antti Koivisto.
Tests: fast/regions/hover-display-block-inline.html
fast/regions/hover-display-block-none.html
* page/DragController.cpp:
(WebCore::DragController::startDrag):
* dom/ContainerNode.cpp:
(WebCore::ContainerNode::attach):
(WebCore::ContainerNode::detach):
* dom/ContainerNode.h:
* dom/Document.cpp:
(WebCore::Document::attach):
(WebCore::Document::detach):
(WebCore::Document::updateHoverActiveState):
* dom/Document.h:
* dom/Element.cpp:
(WebCore::Element::setHovered):
(WebCore::Element::createRendererIfNeeded):
(WebCore::Element::attach):
(WebCore::Element::detach):
(WebCore::Element::recalcStyle):
* dom/Element.h:
* dom/Node.cpp:
(WebCore::Node::AttachDetachContext::AttachDetachContext):
(WebCore::Node::AttachDetachContext::~AttachDetachContext):
(WebCore::Node::attach):
(WebCore::Node::detach):
* dom/Node.h:
(WebCore::Node::reattach):
(WebCore::Node::reattachIfAttached):
* dom/NodeRenderingContext.cpp:
(WebCore::NodeRenderingContext::NodeRenderingContext):
* dom/PseudoElement.cpp:
(WebCore::PseudoElement::attach):
* dom/PseudoElement.h:
* dom/ShadowRoot.cpp:
(WebCore::ShadowRoot::attach):
* dom/ShadowRoot.h:
* dom/Text.cpp:
(WebCore::Text::attach):
* dom/Text.h:
* html/HTMLCanvasElement.cpp:
(WebCore::HTMLCanvasElement::attach):
* html/HTMLCanvasElement.h:
* html/HTMLFormControlElement.cpp:
(WebCore::HTMLFormControlElement::attach):
* html/HTMLFormControlElement.h:
* html/HTMLFrameElement.cpp:
(WebCore::HTMLFrameElement::attach):
* html/HTMLFrameElement.h:
* html/HTMLFrameElementBase.cpp:
(WebCore::HTMLFrameElementBase::attach):
* html/HTMLFrameElementBase.h:
* html/HTMLFrameSetElement.cpp:
(WebCore::HTMLFrameSetElement::attach):
* html/HTMLFrameSetElement.h:
* html/HTMLImageElement.cpp:
(WebCore::HTMLImageElement::attach):
* html/HTMLImageElement.h:
* html/HTMLInputElement.cpp:
(WebCore::HTMLInputElement::attach):
(WebCore::HTMLInputElement::detach):
* html/HTMLInputElement.h:
* html/HTMLLIElement.cpp:
(WebCore::HTMLLIElement::attach):
* html/HTMLLIElement.h:
* html/HTMLMediaElement.cpp:
(WebCore::HTMLMediaElement::attach):
* html/HTMLMediaElement.h:
* html/HTMLOptGroupElement.cpp:
(WebCore::HTMLOptGroupElement::attach):
(WebCore::HTMLOptGroupElement::detach):
* html/HTMLOptGroupElement.h:
* html/HTMLOptionElement.cpp:
(WebCore::HTMLOptionElement::attach):
(WebCore::HTMLOptionElement::detach):
* html/HTMLOptionElement.h:
* html/HTMLPlugInElement.cpp:
(WebCore::HTMLPlugInElement::detach):
* html/HTMLPlugInElement.h:
* html/HTMLPlugInImageElement.cpp:
(WebCore::HTMLPlugInImageElement::attach):
(WebCore::HTMLPlugInImageElement::detach):
* html/HTMLPlugInImageElement.h:
* html/HTMLProgressElement.cpp:
(WebCore::HTMLProgressElement::attach):
* html/HTMLProgressElement.h:
* html/HTMLTextAreaElement.cpp:
(WebCore::HTMLTextAreaElement::attach):
* html/HTMLTextAreaElement.h:
* html/HTMLVideoElement.cpp:
(WebCore::HTMLVideoElement::attach):
* html/HTMLVideoElement.h:
* html/PluginDocument.cpp:
(WebCore::PluginDocument::detach):
* html/PluginDocument.h:
* html/shadow/InsertionPoint.cpp:
(WebCore::InsertionPoint::attach):
(WebCore::InsertionPoint::detach):
* html/shadow/InsertionPoint.h:
* html/shadow/SliderThumbElement.cpp:
(WebCore::SliderThumbElement::detach):
* html/shadow/SliderThumbElement.h:
* html/shadow/SpinButtonElement.cpp:
(WebCore::SpinButtonElement::detach):
* html/shadow/SpinButtonElement.h:
* html/shadow/TextControlInnerElements.cpp:
(WebCore::SearchFieldCancelButtonElement::detach):
(WebCore::InputFieldSpeechButtonElement::attach):
(WebCore::InputFieldSpeechButtonElement::detach):
* html/shadow/TextControlInnerElements.h:
* loader/PlaceholderDocument.cpp:
(WebCore::PlaceholderDocument::attach):
* loader/PlaceholderDocument.h:
* svg/SVGImageElement.cpp:
(WebCore::SVGImageElement::attach):
* svg/SVGImageElement.h:
2013-06-06 Allan Sandfeld Jensen <allan.jensen@digia.com>
ENABLE(PAN_SCROLLING) AutoscrollController::updateAutoscrollRenderer calls hitTestResultAtPoint with `true` for HitTestRequestType
https://bugs.webkit.org/show_bug.cgi?id=116896
Reviewed by Andreas Kling.
Update hitTestResultAtPoint call to new API.
* page/AutoscrollController.cpp:
(WebCore::AutoscrollController::updateAutoscrollRenderer):
2013-06-06 Carlos Garcia Campos <cgarcia@igalia.com>
ResourceLoader::resourceData() should not return a PassRefPtr
https://bugs.webkit.org/show_bug.cgi?id=117288
Reviewed by Darin Adler.
Change ResourceLoader::resourceData() to return a raw pointer
instead of a PassRefPtr since we don't want to transfer the
ownership of the resource data. Also pass a raw pointer to
CachedResource::data() so that the cached resource can decide
whether to take a reference of the data or not, for example,
CachedRawResource only takes a reference when buffering policy is
BufferData.
* html/ImageDocument.cpp:
(WebCore::ImageDocumentParser::appendBytes):
(WebCore::ImageDocumentParser::finish):
* loader/ResourceLoader.cpp:
* loader/ResourceLoader.h:
(WebCore::ResourceLoader::resourceData):
* loader/SubresourceLoader.cpp:
(WebCore::SubresourceLoader::sendDataToResource):
* loader/cache/CachedCSSStyleSheet.cpp:
(WebCore::CachedCSSStyleSheet::data):
* loader/cache/CachedCSSStyleSheet.h:
* loader/cache/CachedFont.cpp:
(WebCore::CachedFont::data):
* loader/cache/CachedFont.h:
* loader/cache/CachedImage.cpp:
(WebCore::CachedImage::data):
* loader/cache/CachedImage.h:
* loader/cache/CachedRawResource.cpp:
(WebCore::CachedRawResource::data):
* loader/cache/CachedRawResource.h:
* loader/cache/CachedResource.cpp:
(WebCore::CachedResource::data):
* loader/cache/CachedResource.h:
* loader/cache/CachedSVGDocument.cpp:
(WebCore::CachedSVGDocument::data):
* loader/cache/CachedSVGDocument.h:
* loader/cache/CachedScript.cpp:
(WebCore::CachedScript::data):
* loader/cache/CachedScript.h:
* loader/cache/CachedShader.cpp:
(WebCore::CachedShader::data):
* loader/cache/CachedShader.h:
* loader/cache/CachedTextTrack.cpp:
(WebCore::CachedTextTrack::data):
* loader/cache/CachedTextTrack.h:
* loader/cache/CachedXSLStyleSheet.cpp:
(WebCore::CachedXSLStyleSheet::data):
* loader/cache/CachedXSLStyleSheet.h:
2013-06-06 Chris Fleizach <cfleizach@apple.com>
AX: iOS ignores ARIA progressbar elements
https://bugs.webkit.org/show_bug.cgi?id=116727
Reviewed by David Kilzer.
Make this an accessible element on iOS.
Test: platform/iphone-simulator/accessibility/progressbar.html
* accessibility/ios/WebAccessibilityObjectWrapperIOS.mm:
(-[WebAccessibilityObjectWrapper determineIsAccessibilityElement]):
(-[WebAccessibilityObjectWrapper _accessibilityMinValue]):
(-[WebAccessibilityObjectWrapper _accessibilityMaxValue]):
2013-06-06 Christophe Dumez <ch.dumez@sisa.samsung.com>
Remove unused HashValueForClassAndName() from JSC bindings generator
https://bugs.webkit.org/show_bug.cgi?id=117292
Reviewed by Kentaro Hara.
Remove HashValueForClassAndName() subroutine from JSC bindings generator
as it is dead code.
No new tests, code clean up.
* bindings/scripts/CodeGeneratorJS.pm:
2013-06-06 Gwang Yoon Hwang <ryumiel@company100.net>
Cannot set a new timer inside of timer callback in RunLoopTimerGtk & RunLoopTimerEFL
https://bugs.webkit.org/show_bug.cgi?id=117224
Reviewed by Christophe Dumez.
RunLoopTimer should clear its isActive flag before invoking timer
callback.
* platform/efl/RunLoopEfl.cpp:
(WebCore::RunLoop::TimerBase::timerFired):
* platform/gtk/RunLoopGtk.cpp:
(WebCore::RunLoop::TimerBase::timerFiredCallback):
2013-06-06 Diego Pino Garcia <dpino@igalia.com>
[GTK] Parameters 'inResult' and 'resolver' from function 'webkit_dom_document_evaluate' should be allowed to be NULL
https://bugs.webkit.org/show_bug.cgi?id=117129
Reviewed by Xan Lopez.
At this moment there was a temporary fix that allowed parameter
'inResult' to be NULL (see: webk.it/42115). However, there was no fix
for parameter 'resolver'.
This patch refactors the code of the previous fix, moving the code for
determine whether a parameter can be NULL or not to GetGReturnMacro.
The solution is quite general and will alow to add other parameters in
the future if needed.
* bindings/scripts/CodeGeneratorGObject.pm:
(GetGReturnMacro): Pass functionName, as in some cases the code
generated depends on the paramName and the functionName
(ParamCanBeNull): Checks if a parameter is allowed to be NULL
(GenerateFunction):
2013-06-06 Zalan Bujtas <zalan@apple.com>
SVG objects are misplaced when SVG root has CSS transform.
https://bugs.webkit.org/show_bug.cgi?id=117252
Reviewed by Simon Fraser.
Update layer transforms for SVG if needed.
SVG root, similarly to RenderBlock needs to call RenderLayer
to get transforms updated after layout, in order to
position the transformed objects properly.
Test: fast/transforms/transform-svg.html
* rendering/svg/RenderSVGRoot.cpp:
(WebCore::RenderSVGRoot::layout):
2013-06-06 Jae Hyun Park <jae.park@company100.net>
Coordinated Graphics : Refactor CoordinatedSurface to manage the lifecycle of GraphicsContext
https://bugs.webkit.org/show_bug.cgi?id=108899
Reviewed by Noam Rosenthal.
This is a preparation patch for Threaded Coordinated Graphics.
This patch changes CoordinatedSurface to be responsible for the
lifecycle of GraphicsContext used in Coordinated Graphics System.
CoordinatedImageBacking and UpdateAtlas do not ask for the ownership
of GraphicsContext anymore. Instead, those classes use client pattern to
ask the CoordiantedSurface to paint to the GraphicsContext.
This refactoring is needed to implement CoordinatedSurface for Threaded
Coordinated Graphics.
No new tests, covered by existing tests.
* platform/graphics/texmap/coordinated/CoordinatedGraphicsLayer.cpp:
(WebCore::CoordinatedGraphicsLayer::paintToSurface):
* platform/graphics/texmap/coordinated/CoordinatedGraphicsLayer.h:
* platform/graphics/texmap/coordinated/CoordinatedImageBacking.cpp:
(WebCore::ImageBackingSurfaceClient::ImageBackingSurfaceClient):
(WebCore::CoordinatedImageBacking::update):
* platform/graphics/texmap/coordinated/CoordinatedSurface.h:
(WebCore::CoordinatedSurface::Client::~Client):
* platform/graphics/texmap/coordinated/CoordinatedTile.cpp:
(WebCore::CoordinatedTile::updateBackBuffer):
(WebCore::CoordinatedTile::paintToSurfaceContext):
* platform/graphics/texmap/coordinated/CoordinatedTile.h:
* platform/graphics/texmap/coordinated/UpdateAtlas.cpp:
(WebCore::UpdateAtlasSurfaceClient::UpdateAtlasSurfaceClient):
(WebCore::UpdateAtlas::paintOnAvailableBuffer):
* platform/graphics/texmap/coordinated/UpdateAtlas.h:
2013-06-05 Ryosuke Niwa <rniwa@webkit.org>
Revert the second half of r151257. WebGLRenderingContext::create can return null.
* html/HTMLCanvasElement.cpp:
(WebCore::HTMLCanvasElement::getContext):
2013-06-05 Ryosuke Niwa <rniwa@webkit.org>
Remove unnecessary null check in HTMLCanvasElement.cpp.
Rubber-stamped by Benjamin Poulain.
* html/HTMLCanvasElement.cpp:
(WebCore::HTMLCanvasElement::getContext):
2013-06-05 Peter Gal <galpeter@inf.u-szeged.hu>
[curl] Add implementation for HTTP PUT method.
https://bugs.webkit.org/show_bug.cgi?id=117256
Reviewed by Brent Fulgham.
No new tests, covered by existing tests.
* platform/network/curl/ResourceHandleManager.cpp:
(WebCore::getFormSize):
(WebCore::setupFormData):
(WebCore::ResourceHandleManager::setupPUT):
(WebCore::ResourceHandleManager::setupPOST):
2013-06-05 Peter Gal <galpeter@inf.u-szeged.hu>
[curl] Normalize mime type information
https://bugs.webkit.org/show_bug.cgi?id=117194
Reviewed by Brent Fulgham.
* platform/MIMETypeRegistry.cpp: Enable MIME type normalization for curl.
2013-06-05 Xueqing Huang <huangxueqing@baidu.com>
Move OleGetClipboard to Pasteboard::createForCopyAndPaste.
https://bugs.webkit.org/show_bug.cgi?id=117064
Reviewed by Darin Adler.
No behavior change, no new tests.
* platform/win/EditorWin.cpp:
(WebCore::Editor::newGeneralClipboard): Editor should not create IDataObject explicitly then set it to Pasteboard.
* platform/win/PasteboardWin.cpp:
(WebCore::Pasteboard::createForCopyAndPaste): Construct a Pasteboard and create IDataObject by "OleGetClipboard".
2013-06-05 Benjamin Poulain <bpoulain@apple.com>
WebSQL forces 16-bit strings
https://bugs.webkit.org/show_bug.cgi?id=116935
Reviewed by Darin Adler.
Merge chromium 49c9632ac135f6f06e623a7a81d9da1f6bb7196f.
https://chromium.googlesource.com/chromium/blink/+/49c9632ac135f6f06e623a7a81d9da1f6bb7196f
* platform/sql/SQLiteStatement.cpp:
(WebCore::SQLiteStatement::getColumnValue):
2013-06-05 Bear Travis <betravis@adobe.com>
[CSS Exclusions][CSS Shapes] Split CSS Exclusions & Shapes compile & runtime flags
https://bugs.webkit.org/show_bug.cgi?id=117172
Reviewed by Alexandru Chiculita.
This patch adds a new compile and runtime flag for the CSS Shapes feature, which
has split off from the previous CSS Exclusions and Shapes specification. The
specifications are available here:
http://dev.w3.org/csswg/css-exclusions/
http://dev.w3.org/csswg/css-shapes/
The changes introduce a new CSS_SHAPES compile flag, and a new cssShapesEnabled
runtime flag. In general, the code changes are simple renames.
Refactoring, no new tests.
* bindings/generic/RuntimeEnabledFeatures.h:
(WebCore::RuntimeEnabledFeatures::setCSSShapesEnabled):
(WebCore::RuntimeEnabledFeatures::cssShapesEnabled):
* css/CSSComputedStyleDeclaration.cpp:
(WebCore::ComputedStyleExtractor::propertyValue):
* css/CSSParser.cpp:
(WebCore::isSimpleLengthPropertyID):
(WebCore::CSSParser::parseValue):
* css/CSSProperty.cpp:
(WebCore::CSSProperty::isInheritedProperty):
* css/DeprecatedStyleBuilder.cpp:
(WebCore::DeprecatedStyleBuilder::DeprecatedStyleBuilder):
* css/StyleResolver.cpp:
(WebCore::StyleResolver::applyProperty):
(WebCore::StyleResolver::loadPendingImages):
* page/animation/CSSPropertyAnimation.cpp:
(WebCore::CSSPropertyAnimation::ensurePropertyMap):
* rendering/BidiRun.h:
(WebCore::BidiRun::BidiRun):
* rendering/ExclusionShapeInfo.cpp:
* rendering/ExclusionShapeInfo.h:
* rendering/ExclusionShapeInsideInfo.cpp:
* rendering/ExclusionShapeInsideInfo.h:
* rendering/ExclusionShapeOutsideInfo.cpp:
* rendering/ExclusionShapeOutsideInfo.h:
* rendering/LayoutState.cpp:
(WebCore::LayoutState::LayoutState):
* rendering/LayoutState.h:
(WebCore::LayoutState::LayoutState):
* rendering/RenderBlock.cpp:
(WebCore::RenderBlock::styleDidChange):
(WebCore::exclusionInfoRequiresRelayout):
(WebCore::RenderBlock::updateRegionsAndExclusionsBeforeChildLayout):
(WebCore::RenderBlock::updateRegionsAndExclusionsAfterChildLayout):
(WebCore::RenderBlock::insertFloatingObject):
(WebCore::RenderBlock::computeLogicalLocationForFloat):
(WebCore::RenderBlock::positionNewFloats):
(WebCore::::collectIfNeeded):
(WebCore::RenderBlock::logicalLeftOffsetForLine):
(WebCore::RenderBlock::logicalRightOffsetForLine):
* rendering/RenderBlock.h:
(WebCore::RenderBlock::xPositionForFloatIncludingMargin):
(WebCore::RenderBlock::yPositionForFloatIncludingMargin):
(WebCore::RenderBlock::FloatIntervalSearchAdapter::FloatIntervalSearchAdapter):
* rendering/RenderBlockLineLayout.cpp:
(WebCore::LineWidth::LineWidth):
(WebCore::LineWidth::updateAvailableWidth):
(WebCore::LineWidth::shrinkAvailableWidthForNewFloatIfNeeded):
(WebCore::RenderBlock::constructLine):
(WebCore::computeExpansionForJustifiedText):
(WebCore::RenderBlock::computeInlineDirectionPositionsForLine):
(WebCore::RenderBlock::computeInlineDirectionPositionsForSegment):
(WebCore::constructBidiRunsForLine):
(WebCore::RenderBlock::layoutRunsAndFloatsInRange):
(WebCore::RenderBlock::LineBreaker::nextLineBreak):
(WebCore::RenderBlock::LineBreaker::nextSegmentBreak):
* rendering/RenderBox.cpp:
(WebCore::RenderBox::willBeDestroyed):
(WebCore::RenderBox::styleDidChange):
* rendering/RenderBox.h:
* rendering/RenderBoxModelObject.cpp:
(WebCore::RenderBoxModelObject::paintOffset):
* rendering/RenderLayer.cpp:
(WebCore::RenderLayer::shouldBeNormalFlowOnly):
* rendering/RenderObject.h:
(WebCore::RenderObject::hasPaintOffset):
* rendering/RenderView.h:
(WebCore::RenderView::pushLayoutState):
* rendering/style/RenderStyle.cpp:
(WebCore::RenderStyle::changeRequiresLayout):
* rendering/style/RenderStyle.h:
* testing/InternalSettings.cpp:
(WebCore::InternalSettings::Backup::Backup):
(WebCore::InternalSettings::Backup::restoreTo):
(WebCore::InternalSettings::setCSSShapesEnabled):
2013-06-05 Oliver Hunt <oliver@apple.com>
Don't throttle timers if a page is doing something that might be interesting
https://bugs.webkit.org/show_bug.cgi?id=117273
Reviewed by Gavin Barraclough.
Make the decision about whether or not to throttle timers be
determined by the PageThrottler
* page/Page.cpp:
(WebCore::Page::throttleTimers):
(WebCore::Page::unthrottleTimers):
(WebCore::Page::setVisibilityState):
(WebCore::Page::hiddenPageDOMTimerThrottlingStateChanged):
* page/Page.h:
* page/PageThrottler.cpp:
(WebCore::PageThrottler::throttlePage):
(WebCore::PageThrottler::unthrottlePage):
2013-06-05 Mark Salisbury <mark.salisbury@hp.com>
[WinCE,WinCairo] RenderThemeWin.cpp needs to include FrameSelection.h.
https://bugs.webkit.org/show_bug.cgi?id=116583
Reviewed by Brent Fulgham.
* rendering/RenderThemeWin.cpp:
2013-06-05 Peter Gal <galpeter@inf.u-szeged.hu>
[curl] Restrict allowed protocols
https://bugs.webkit.org/show_bug.cgi?id=117257
Reviewed by Brent Fulgham.
curl supports various protocols (like: HTTP,...,POP3,IMAP...) and by
default all of the are enabled for a single curl handle. Furthermore
all of the protocols are allowed during Location header follow.
This could pose a security risk for example: a malicious server responds
with a crafted Location header pointing to an imap/../(etc) url and the
curl backend will follow it and will give the result for the WebCore.
This patch will restrict the allowed protocols to: HTTP(S), FTP(S), FILE
* platform/network/curl/ResourceHandleManager.cpp:
(WebCore::ResourceHandleManager::initializeHandle):
2013-06-05 Bear Travis <betravis@adobe.com>
[css exclusions] Clean up ExclusionShapeInsideInfo dynamic removal code
https://bugs.webkit.org/show_bug.cgi?id=116236
Reviewed by David Hyatt.
Instead of keeping the ExclusionShapeInsideInfo around after it has
become stale, we can immediately remove it and just mark descendants
for relayout. This patch removes most of the code added by
https://bugs.webkit.org/show_bug.cgi?id=111029
in favor of this simpler approach.
This patch does not introduce new functionality.
* rendering/ExclusionShapeInsideInfo.h:
(WebCore::ExclusionShapeInsideInfo::ExclusionShapeInsideInfo):
(ExclusionShapeInsideInfo): Remove needsRemoval code.
* rendering/LayoutState.cpp:
(WebCore::LayoutState::LayoutState): Ditto.
* rendering/RenderBlock.cpp:
(WebCore::RenderBlock::updateExclusionShapeInsideInfoAfterStyleChange): Remove
needsRemoval code and mark descendants for layout.
(WebCore):
(WebCore::RenderBlock::markShapeInsideDescendantsForLayout): Method to mark
descendants of a shape inside with inline content for layout.
(WebCore::exclusionInfoRequiresRelayout): Remove needsRemoval code.
(WebCore::RenderBlock::updateRegionsAndExclusionsAfterChildLayout): Ditto.
* rendering/RenderBlock.h:
(WebCore::RenderBlock::exclusionShapeInsideInfo): Ditto.
(RenderBlock):
* rendering/RenderBlockLineLayout.cpp:
(WebCore::RenderBlock::layoutExclusionShapeInsideInfo): Ditto.
2013-06-05 Arunprasad Rajkumar <arurajku@cisco.com>
Avoid multiple copies of inline script & style strings
https://bugs.webkit.org/show_bug.cgi?id=117202
Reviewed by Darin Adler.
Merge from https://chromiumcodereview.appspot.com/16005007.
No new tests needed.
The HTML parser breaks up large text nodes into small chunks to avoid some
O(n^2) editing algorithms. This fix skips that workaround for <script> and
<style> elements, which aren't likely to need editing. As a result, <script>
ends up with a single text node, containing a contiguous String, which is the
source code of that inline script block.
Prior this fix, we could end up with two copies of large inline scripts: one
monolithic string retained by JSC and a number of shards retained by the DOM.
After this fix, both the DOM and JSC use the same monolithic string, removing a
copy.
* dom/Text.cpp:
(WebCore::Text::createWithLengthLimit):
* html/parser/HTMLConstructionSite.cpp:
(WebCore::shouldUseLengthLimit):
(WebCore::HTMLConstructionSite::insertTextNode):
2013-06-05 Kondapally Kalyan <kalyan.kondapally@intel.com>
[EFL] Build fix with EGL and GLES2 backend.
https://bugs.webkit.org/show_bug.cgi?id=117246
Reviewed by Kenneth Rohde Christiansen.
r150958 added support for EGLTransportSurfaceClient.
This patch adds the missing changes.
* platform/graphics/surfaces/efl/GLTransportSurface.cpp:
(WebCore::GLTransportSurfaceClient::createTransportSurfaceClient):
(WebCore::GLTransportSurfaceClient::GLTransportSurfaceClient):
* platform/graphics/surfaces/efl/GLTransportSurface.h:
* platform/graphics/surfaces/efl/GraphicsSurfaceCommon.cpp:
(WebCore::GraphicsSurfacePrivate::initializeClient):
* platform/graphics/surfaces/egl/EGLXSurface.cpp:
(WebCore::EGLXTransportSurfaceClient::EGLXTransportSurfaceClient):
* platform/graphics/surfaces/egl/EGLXSurface.h:
* platform/graphics/surfaces/glx/GLXSurface.cpp:
(WebCore::GLXTransportSurfaceClient::GLXTransportSurfaceClient):
* platform/graphics/surfaces/glx/GLXSurface.h:
* platform/graphics/surfaces/glx/X11Helper.cpp:
(WebCore::X11Helper::createOffScreenWindow):
(WebCore::X11Helper::createPixmap):
* platform/graphics/surfaces/glx/X11Helper.h:
2013-06-05 Jae Hyun Park <jae.park@company100.net>
[GTK] Support using GLContext from multiple threads
https://bugs.webkit.org/show_bug.cgi?id=117238
Reviewed by Martin Robinson.
Current implementation assumes that GLContext is only used in the main thread.
However, to support using GLContext from multiple threads, we need to change it
to thread local. Therefore, ASSERT(isMainThread()) is removed and GLContext is
changed to thread local.
* platform/graphics/cairo/GLContext.cpp:
(WebCore::ThreadGlobalGLContext::setContext):
(WebCore::ThreadGlobalGLContext::context):
(WebCore::currentContext):
(WebCore::GLContext::sharingContext):
(WebCore::GLContext::~GLContext):
(WebCore::GLContext::makeContextCurrent):
(WebCore::GLContext::getCurrent):
2013-06-05 Christophe Dumez <ch.dumez@sisa.samsung.com>
Unreviewed build fix when CHANNEL_MESSAGING is disabled.
Add #if ENABLE(CHANNEL_MESSAGING) to JSMessageChannelCustom.cpp.
* bindings/js/JSMessageChannelCustom.cpp:
2013-06-05 Christophe Dumez <ch.dumez@sisa.samsung.com>
Remove remaining custom getters for WorkerContext constructor attributes
https://bugs.webkit.org/show_bug.cgi?id=117247
Reviewed by Kentaro Hara.
Remove custom getter code for remaining constructor attribute on WorkerContext
interface. The custom code wasn't needed as it was doing nothing more than the
generated one. These constructor attributes are now automatically generated.
No new tests, no behavior change.
* CMakeLists.txt:
* DerivedSources.make:
* DerivedSources.pri:
* GNUmakefile.list.am:
* Modules/websockets/WebSocket.idl:
* Modules/websockets/WorkerContextWebSocket.idl: Removed.
* WebCore.order:
* WebCore.xcodeproj/project.pbxproj:
* bindings/js/JSWorkerContextCustom.cpp:
* dom/MessageChannel.idl:
* page/EventSource.idl:
* workers/WorkerContext.idl:
* xml/XMLHttpRequest.idl:
2013-06-05 Ryuan Choi <ryuan.choi@samsung.com>
Remove ChromeClient::deviceOrPageScaleFactorChanged
https://bugs.webkit.org/show_bug.cgi?id=117245
Reviewed by Andreas Kling.
It was introduced for chromium at r147357.
But now, there are no ports to use this.
No new tests - no behavior change.
* page/ChromeClient.h:
* page/Frame.cpp:
(WebCore::Frame::deviceOrPageScaleFactorChanged):
2013-06-05 Gwang Yoon Hwang <ryumiel@company100.net>
[Coordinated Graphics] Prevent a recursive painting in CoordinatedGraphicsLayer
https://bugs.webkit.org/show_bug.cgi?id=117222
Reviewed by Noam Rosenthal.
CoordinatedGraphicsLayer::flushCompositingState() will cross frame
boundaries if the GraphicsLayers are connected. In this case,
updateContentBuffers will invoke a painting of a sub-frame that causes
flushCompositingState recursively.
To prevent this behavior this patch extracts updateContentBuffers from
flushCompositingState, and places it in
updateContentBuffersIncludeSublayers, which is another tree traveler for
painting.
No new tests, covered by existing tests.
* platform/graphics/texmap/coordinated/CoordinatedGraphicsLayer.cpp:
(WebCore::CoordinatedGraphicsLayer::flushCompositingStateForThisLayerOnly):
(WebCore::CoordinatedGraphicsLayer::syncPendingStateChangesIncludingSubLayers):
(WebCore::CoordinatedGraphicsLayer::updateContentBuffersIncludingSubLayers):
* platform/graphics/texmap/coordinated/CoordinatedGraphicsLayer.h:
2013-06-05 Andreas Kling <akling@apple.com>
Fix some inefficiencies in AnimationController's composite animation map.
<http://webkit.org/b/117248>
Reviewed by Antti Koivisto.
Clean up some small things that were showing up in a window resizing profile (0.4%)
* page/animation/AnimationControllerPrivate.h:
* page/animation/AnimationController.cpp:
(WebCore::AnimationControllerPrivate::ensureCompositeAnimation):
Renamed this ensure* to conform to the WebKit Design Patterns, 2013 edition.
Always do a single hash lookup instead of two.
(WebCore::AnimationControllerPrivate::clear):
Use RefPtr<T> for local variables, never PassRefPtr<T>. See WKDP, 2013 ed.
(WebCore::AnimationControllerPrivate::updateAnimationTimerForRenderer):
(WebCore::AnimationControllerPrivate::isRunningAnimationOnRenderer):
(WebCore::AnimationControllerPrivate::isRunningAcceleratedAnimationOnRenderer):
(WebCore::AnimationControllerPrivate::getAnimatedStyleForRenderer):
Peek into m_compositeAnimations through "const CompositeAnimation*" instead
of using RefPtrs. There's no need to hold a reference on the animation while
querying some const method on it.
(WebCore::AnimationControllerPrivate::pauseAnimationAtTime):
(WebCore::AnimationControllerPrivate::pauseTransitionAtTime):
(WebCore::AnimationController::updateAnimations):
Poke into m_compositeAnimations through "CompositeAnimation*" instead of using
RefPtrs. There's no need to hold a reference here either, we can modify the
animations through a raw pointer.
2013-06-05 Roland Takacs <rtakacs@inf.u-szeged.hu>
Web Inspector: Clear button doesn't clean Memory graph in Overview pane.
https://bugs.webkit.org/show_bug.cgi?id=112429
Reviewed by Noam Rosenthal.
There is an early return from TimelineMemoryOverview.update() when
record array is empty. Thats why if you click onto the clear button,
the canvas won't be updated.
Moved this "return condition" after the canvas size definition
because we need to know the canvas size for refreshing.
Overridden TimelineOverviewBase's reset function to clear
HeapSizeLabels' content.
* inspector/front-end/TimelineOverviewPane.js:
(WebInspector.TimelineMemoryOverview.prototype.reset):
(WebInspector.TimelineMemoryOverview.prototype.update):
2013-06-05 Gwang Yoon Hwang <ryumiel@company100.net>
[Coordinated Graphics] Rename client classes for CoordinatedImageBacking and UpdateAtlas.
https://bugs.webkit.org/show_bug.cgi?id=111948
Reviewed by Noam Rosenthal.
This patch renames CoordinatedImageBacking::Coordinator to
CoordinatedImageBacking::Client, and UpdateAtlasClient to
UpdateAtlas::Client for naming consistency and clarification.
No new tests, covered by existing tests.
* platform/graphics/texmap/coordinated/CoordinatedImageBacking.cpp:
(WebCore::CoordinatedImageBacking::create):
(WebCore::CoordinatedImageBacking::CoordinatedImageBacking):
(WebCore::CoordinatedImageBacking::removeHost):
(WebCore::CoordinatedImageBacking::update):
(WebCore::CoordinatedImageBacking::clearContentsTimerFired):
* platform/graphics/texmap/coordinated/CoordinatedImageBacking.h:
* platform/graphics/texmap/coordinated/UpdateAtlas.cpp:
(WebCore::UpdateAtlas::UpdateAtlas):
* platform/graphics/texmap/coordinated/UpdateAtlas.h:
2013-06-05 Allan Sandfeld Jensen <allan.jensen@digia.com>
[Qt] Handle Return key without key text
https://bugs.webkit.org/show_bug.cgi?id=117239
Reviewed by Andreas Kling.
Test added to tst_qwebpage.cpp.
* platform/qt/PlatformKeyboardEventQt.cpp:
(WebCore::keyTextForKeyEvent):
2013-06-05 Gwang Yoon Hwang <ryumiel@company100.net>
Coordinated Graphics: Unify messages related object's lifecycles into CoordinatedGraphicsState.
https://bugs.webkit.org/show_bug.cgi?id=111919
Reviewed by Noam Rosenthal.
CoordinatedLayerTreeHostProxy has several methods, which simply passes
these calls to CoordinatedGraphicsScene.
This patch removes methods in CoordinatedLayerTreeHostProxy just for
message chaining. Instead of that, messages for creation/deletion of objects
(Layers, CustomFilters, UpdateAtlas, and ImageBacking) are unified into
CommitCoordinatedGraphicsState.
And this patch also removes codes for WebCoordinatedSurface in
CoordinatedLayerTreeHost, except for a factory method.
CoordinatedGraphicsArgumentCoders [en|de]codes CoordinatedSurface itself
using WebCoordinatedSurface.
No new tests, covered by existing tests.
* platform/graphics/texmap/coordinated/CoordinatedGraphicsScene.cpp:
(WebCore::CoordinatedGraphicsScene::syncCustomFilterPrograms):
(WebCore::CoordinatedGraphicsScene::syncUpdateAtlases):
(WebCore::CoordinatedGraphicsScene::syncImageBackings):
(WebCore::CoordinatedGraphicsScene::commitSceneState):
* platform/graphics/texmap/coordinated/CoordinatedGraphicsScene.h:
* platform/graphics/texmap/coordinated/CoordinatedGraphicsState.h:
* platform/graphics/texmap/coordinated/CoordinatedImageBacking.cpp:
(WebCore::CoordinatedImageBacking::update):
* platform/graphics/texmap/coordinated/CoordinatedImageBacking.h:
* platform/graphics/texmap/coordinated/UpdateAtlas.cpp:
(WebCore::UpdateAtlas::UpdateAtlas):
* platform/graphics/texmap/coordinated/UpdateAtlas.h:
2013-06-05 Andreas Kling <akling@apple.com>
Remove unnecessary null checks in SelectorChecker::checkOne().
<http://webkit.org/b/117243>
Reviewed by Antti Koivisto.
This function was riddled with unnecessary null checks of 'element', despite ASSERT(element)
being the first thing it does.
* css/SelectorChecker.cpp:
(WebCore::SelectorChecker::checkOne):
2013-06-05 Christophe Dumez <ch.dumez@sisa.samsung.com>
Merge [NoInterfaceObject] and [OmitConstructor] extended attributes
https://bugs.webkit.org/show_bug.cgi?id=115853
Reviewed by Geoffrey Garen.
Remove [OmitConstructor] extended attribute as it is overlapping with
the standard [NoInterfaceObject] Web IDL extended attribute.
Having [NoInterfaceObject] extended attribute on an interface now
implies that its constructor is omitted (i.e. not generated).
No new tests, no behavior change.
* Modules/geolocation/Coordinates.idl:
* Modules/geolocation/Geolocation.idl:
* Modules/geolocation/Geoposition.idl:
* Modules/notifications/Notification.idl:
* Modules/notifications/NotificationCenter.idl:
* Modules/quota/StorageInfo.idl:
* Modules/quota/StorageQuota.idl:
* Modules/webdatabase/Database.idl:
* Modules/webdatabase/DatabaseSync.idl:
* Modules/webdatabase/SQLError.idl:
* Modules/webdatabase/SQLResultSet.idl:
* Modules/webdatabase/SQLResultSetRowList.idl:
* Modules/webdatabase/SQLTransaction.idl:
* Modules/webdatabase/SQLTransactionSync.idl:
* bindings/scripts/CodeGeneratorJS.pm:
(GenerateHeader):
(GenerateAttributesHashTable):
(GenerateImplementation):
* bindings/scripts/IDLAttributes.txt:
* css/CSSUnknownRule.idl:
* css/MediaQueryListListener.idl:
* dom/EventListener.idl:
* dom/EventTarget.idl:
* html/MicroDataItemValue.idl:
* html/ValidityState.idl:
* html/canvas/EXTDrawBuffers.idl:
* html/canvas/EXTTextureFilterAnisotropic.idl:
* html/canvas/OESElementIndexUint.idl:
* html/canvas/OESStandardDerivatives.idl:
* html/canvas/OESTextureFloat.idl:
* html/canvas/OESTextureHalfFloat.idl:
* html/canvas/OESVertexArrayObject.idl:
* html/canvas/WebGLCompressedTextureATC.idl:
* html/canvas/WebGLCompressedTexturePVRTC.idl:
* html/canvas/WebGLCompressedTextureS3TC.idl:
* html/canvas/WebGLContextAttributes.idl:
* html/canvas/WebGLDebugRendererInfo.idl:
* html/canvas/WebGLDebugShaders.idl:
* html/canvas/WebGLDepthTexture.idl:
* html/canvas/WebGLLoseContext.idl:
* inspector/JavaScriptCallFrame.idl:
* inspector/ScriptProfile.idl:
* inspector/ScriptProfileNode.idl:
* loader/appcache/DOMApplicationCache.idl:
* page/AbstractView.idl:
* page/Console.idl:
* page/Crypto.idl:
* page/PerformanceEntryList.idl:
* page/WorkerNavigator.idl:
* page/make_settings.pl:
(generateInternalSettingsIdlFile):
* svg/ElementTimeControl.idl:
* svg/SVGAnimationElement.idl:
* svg/SVGExternalResourcesRequired.idl:
* svg/SVGFitToViewBox.idl:
* svg/SVGLangSpace.idl:
* svg/SVGLocatable.idl:
* svg/SVGTests.idl:
* svg/SVGTransformable.idl:
* svg/SVGURIReference.idl:
* testing/InternalSettings.idl:
* testing/Internals.idl:
* testing/MallocStatistics.idl:
* testing/MemoryInfo.idl:
* testing/TypeConversions.idl:
* workers/DedicatedWorkerContext.idl:
* workers/SharedWorkerContext.idl:
* workers/WorkerContext.idl:
* xml/XPathNSResolver.idl:
2013-06-05 Allan Sandfeld Jensen <allan.jensen@digia.com>
[Qt] Font::shouldUseSmoothing() has fake dependency on Qt 5.1
https://bugs.webkit.org/show_bug.cgi?id=117195
Reviewed by Jocelyn Turcotte.
Remove the fake dependency on Qt 5.1 so we may rebase the layout tests
before switching to Qt 5.1
* platform/graphics/qt/FontPlatformDataQt.cpp:
(WebCore::FontPlatformData::FontPlatformData):
2013-06-05 Mihnea Ovidenie <mihnea@adobe.com>
[CSSRegions] Respect renderer creation constraints when element is part of named flow
https://bugs.webkit.org/show_bug.cgi?id=116790
Reviewed by David Hyatt.
Before adding a child to a named flow, we have to make sure that the rules for
creation are properly checked.
Test: fast/regions/br-content-node-crash.xhtml
* rendering/RenderNamedFlowThread.cpp:
(WebCore::RenderNamedFlowThread::isChildAllowed):
Call isChildAllowed on the original parent renderer, before reparenting to
named flow.
* rendering/RenderNamedFlowThread.h:
2013-06-05 Philippe Normand <pnormand@igalia.com>
Unreviewed, GStreamer 0.10 build fix after r151175.
* platform/graphics/gstreamer/MediaPlayerPrivateGStreamerBase.cpp:
(WebCore::MediaPlayerPrivateGStreamerBase::MediaPlayerPrivateGStreamerBase):
(WebCore::MediaPlayerPrivateGStreamerBase::~MediaPlayerPrivateGStreamerBase):
(WebCore::MediaPlayerPrivateGStreamerBase::naturalSize):
(WebCore::MediaPlayerPrivateGStreamerBase::triggerRepaint):
(WebCore::MediaPlayerPrivateGStreamerBase::paint):
* platform/graphics/gstreamer/MediaPlayerPrivateGStreamerBase.h:
2013-06-05 Mihnea Ovidenie <mihnea@adobe.com>
[CSS Regions] REGRESSION Incorrect layer clipping inside flow thread
https://bugs.webkit.org/show_bug.cgi?id=117074
Reviewed by David Hyatt.
Function RenderBox::mapLocalToContainer was adapted for elements inside flow threads to convert
elements coordinates to RenderView coordinates, passing through the region in which the elements
were flowed (https://bugs.webkit.org/show_bug.cgi?id=66641).
The fix for https://bugs.webkit.org/show_bug.cgi?id=76486 modified RenderLayer::calculateClipRects and replaced
convertToLayerCoords with localToContainerPoint, which further calls mapLocalToContainer.
However, for elements inside the flow thread, which acts as a root layer for its collected children, we do not want
to get the offset in RenderView coordinates but rather in flow thread coordinates (and still take transforms into
account). This patch modifies RenderBox::mapLocalToContainer so that it stops at flow thread boundary when the passed
repaintContainer is the flow thread. The flow thread is the container for repaint for elements inside it, as seen from
RenderObject::containerForRepaint.
No new tests, converted overflow-size-change-with-stacking-context and overflow-size-change-with-stacking-context-rtl
into ref tests so that the we do not rely on pixel tests in the future.
* rendering/RenderBox.cpp:
(WebCore::RenderBox::mapLocalToContainer):
2013-06-05 Christophe Dumez <ch.dumez@sisa.samsung.com>
Remove [NoInterfaceObject] from TreeWalker
https://bugs.webkit.org/show_bug.cgi?id=117225
Reviewed by Kentaro Hara.
Remove [NoInterfaceObject] IDL extended attribute from TreeWalker interface
to match Firefox's behavior and the specification:
http://www.w3.org/TR/DOM-Level-2-Traversal-Range/traversal.html#Traversal-TreeWalker
No new tests, already covered by existing tests.
* dom/TreeWalker.idl:
2013-06-05 Zan Dobersek <zdobersek@igalia.com>
Move MemoryInfo under window.internals
https://bugs.webkit.org/show_bug.cgi?id=117197
Reviewed by Ryosuke Niwa.
The MemoryInfo interface is not a subject of any specification and should not be exposed
to the Web. It's still used by the performance tests so it is moved under the testing
internals, accessible through window.internals.memoryInfo.
The jsHeapSizeLimit attribute is removed from the MemoryInfo interface as that value was
only usable when using the V8 bindings which are not supported anymore. A small fast/harness
test is also provided to check that the MemoryInfo object is accessible through window.internals.
Test: fast/harness/memoryinfo-object.html
* CMakeLists.txt:
* DerivedSources.cpp:
* DerivedSources.make:
* DerivedSources.pri:
* GNUmakefile.list.am:
* Target.pri:
* UseJSC.cmake:
* WebCore.exp.in:
* WebCore.order:
* WebCore.vcxproj/WebCore.vcxproj:
* WebCore.vcxproj/WebCore.vcxproj.filters:
* WebCore.vcxproj/WebCoreTestSupport.vcxproj:
* WebCore.vcxproj/WebCoreTestSupport.vcxproj.filters:
* WebCore.xcodeproj/project.pbxproj:
* bindings/gobject/GNUmakefile.am: Remove the GObject bindings targets for MemoryInfo.
* bindings/js/JSBindingsAllInOne.cpp: Remove the JSMemoryInfo.h and MemoryInfo.h inclusion.
* bindings/js/JSMemoryInfoCustom.cpp: Removed.
* bindings/js/ScriptGCEvent.cpp: Remove the ENABLE(INSPECTOR) guards.
(WebCore::ScriptGCEvent::getHeapSize): Remove the jsHeapSizeLimit assignment.
* bindings/js/ScriptGCEvent.h: Remove the ENABLE(INSPECTOR) guards.
(WebCore::HeapInfo::HeapInfo): Remove the jsHeapSizeLimit member.
* page/Console.cpp: Remove the Console::memory method.
* page/Console.h: Ditto.
* page/Console.idl: Remove the window.console.memory attribute.
* page/MemoryInfo.cpp: Removed.
* page/Performance.cpp: Remove the Performance::memory method.
* page/Performance.h: Ditto.
* page/Performance.idl: Remove the window.performance.memory attribute.
* testing/Internals.cpp:
(WebCore::Internals::memoryInfo): Return a MemoryInfo object upon invoking.
* testing/Internals.h: Declare the Internals::memoryInfo method.
* testing/Internals.idl: Expose the window.internals.memoryInfo operation.
* testing/MemoryInfo.h: Renamed from Source/WebCore/page/MemoryInfo.h.
(WebCore::MemoryInfo::create): Return a new RefPtr-wrapped MemoryInfo object.
(WebCore::MemoryInfo::usedJSHeapSize): Return the value of the equally-named HeapInfo member.
(WebCore::MemoryInfo::totalJSHeapSize): Ditto.
(WebCore::MemoryInfo::MemoryInfo): Acquire the current heap info upon construction.
* testing/MemoryInfo.idl: Renamed from Source/WebCore/page/MemoryInfo.idl.
The jsHeapSizeLimit attribute is removed.
2013-06-04 Peter Gal <galpeter@inf.u-szeged.hu>
[curl] Headers should be parsed as utf8 if possible
https://bugs.webkit.org/show_bug.cgi?id=117196
Reviewed by Brent Fulgham.
Testcase already present: http/tests/download/literal-utf-8.html
* platform/network/curl/ResourceHandleManager.cpp:
(WebCore::headerCallback): Parse the header as an utf8 string if possible.
2013-06-04 Oliver Hunt <oliver@apple.com>
Prevent throttling while resources are being loaded
https://bugs.webkit.org/show_bug.cgi?id=117218
Reviewed by Gavin Barraclough.
Make use of the page activity assertion infrastructure to delay
throttling while we are waiting on resource loads.
* loader/FrameLoader.cpp:
(WebCore::FrameLoader::completed):
(WebCore::FrameLoader::started):
* loader/FrameLoader.h:
* loader/SubresourceLoader.cpp:
(WebCore::SubresourceLoader::init):
(WebCore::SubresourceLoader::checkForHTTPStatusCodeError):
(WebCore::SubresourceLoader::didFinishLoading):
(WebCore::SubresourceLoader::didFail):
(WebCore::SubresourceLoader::willCancel):
* loader/SubresourceLoader.h:
2013-06-04 Christophe Dumez <ch.dumez@sisa.samsung.com>
Remove [NoInterfaceObject] from XPathExpression and NodeIterator
https://bugs.webkit.org/show_bug.cgi?id=117204
Reviewed by Alexey Proskuryakov.
Remove [NoInterfaceObject] from XPathExpression and NodeIterator to match
their respective specifications:
- http://www.w3.org/TR/DOM-Level-3-XPath/xpath.html#XPathExpression
- http://www.w3.org/TR/DOM-Level-2-Traversal-Range/traversal.html#Traversal-NodeIterator
No new tests, already covered by:
fast/js/global-constructors-attributes.html
* dom/NodeIterator.idl:
* xml/XPathExpression.idl:
2013-06-04 Chris Fleizach <cfleizach@apple.com>
AX: MathML multiscripts not exposed in Accessibility
https://bugs.webkit.org/show_bug.cgi?id=115069
Unreviewed, build fix.
Remove an accessibility iOS method that was erroneously added.
* accessibility/ios/WebAccessibilityObjectWrapperIOS.mm:
2013-06-04 Greg Hughes <ghughes@apple.com>
Add "VisibleOnly" key to search predicate
https://bugs.webkit.org/show_bug.cgi?id=115491
Reviewed by Chris Fleizach.
Added support for accessibility clients to use the search predicate to find only visible elements
* accessibility/AccessibilityObject.cpp:
(WebCore::AccessibilityObject::isAccessibilityObjectSearchMatch):
(WebCore::AccessibilityObject::isOnscreen):
(WebCore):
* accessibility/AccessibilityObject.h:
(AccessibilitySearchCriteria):
(WebCore::AccessibilitySearchCriteria::AccessibilitySearchCriteria):
(AccessibilityObject):
* accessibility/mac/WebAccessibilityObjectWrapperMac.mm:
(-[WebAccessibilityObjectWrapper accessibilityAttributeValue:forParameter:]):
2013-06-04 Roger Fong <roger_fong@apple.com>
Unreviewed. Rollout of r151146. Broke some tests.
* page/FrameView.cpp:
(WebCore::FrameView::forceLayoutForPagination):
* rendering/RenderBlock.cpp:
(WebCore::RenderBlock::finishDelayUpdateScrollInfo):
(WebCore::RenderBlock::updateScrollInfoAfterLayout):
(WebCore::RenderBlock::layout):
* rendering/RenderBlock.h:
* rendering/RenderBox.cpp:
(WebCore::RenderBox::clearLayoutOverflow):
* rendering/RenderBox.h:
* rendering/RenderDeprecatedFlexibleBox.cpp:
(WebCore::RenderDeprecatedFlexibleBox::layoutBlock):
* rendering/RenderGrid.cpp:
(WebCore::RenderGrid::layoutBlock):
2013-06-04 Noam Rosenthal <noam@webkit.org>
Refactor the code that decides whether to enable WebGL from settings to helper functions
https://bugs.webkit.org/show_bug.cgi?id=117181
This removes some #ifdef crud out of the getContext() function.
Reviewed by Benjamin Poulain.
* html/HTMLCanvasElement.cpp:
(WebCore::requiresAcceleratedCompositingForWebGL):
(WebCore::shouldEnableWebGL):
(WebCore::HTMLCanvasElement::getContext):
2013-06-04 Thiago Santos <thiago.sousa.santos@collabora.com>
Prevent race when pad caps is set on gstreamer player
https://bugs.webkit.org/show_bug.cgi?id=115355
Reviewed by Philippe Normand.
Prevent race when pad caps is set on gstreamer player and
Also protect internal paint buffer with a mutex.
* platform/graphics/gstreamer/MediaPlayerPrivateGStreamerBase.cpp:
(WebCore::MediaPlayerPrivateGStreamerBase::MediaPlayerPrivateGStreamerBase):
(WebCore::MediaPlayerPrivateGStreamerBase::~MediaPlayerPrivateGStreamerBase):
(WebCore::MediaPlayerPrivateGStreamerBase::naturalSize):
(WebCore::MediaPlayerPrivateGStreamerBase::triggerRepaint):
(WebCore::MediaPlayerPrivateGStreamerBase::paint):
* platform/graphics/gstreamer/MediaPlayerPrivateGStreamerBase.h:
(MediaPlayerPrivateGStreamerBase):
2013-06-04 Jocelyn Turcotte <jocelyn.turcotte@digia.com>
[Qt] Fix a crash in QtPixmapRuntime.
https://bugs.webkit.org/show_bug.cgi?id=117193
https://bugreports.qt-project.org/browse/QTBUG-30736
Reviewed by Allan Sandfeld Jensen.
The crash could only be reproduced in release builds on Windows.
JSClassCreate calculates the size of JSClassDefinition.staticValues
and staticFunctions by iterating until an entry with a null name is found.
* bridge/qt/qt_pixmapruntime.cpp:
(JSC::Bindings::QtPixmapRuntime::getClassRef):
2013-06-04 Christophe Dumez <ch.dumez@sisa.samsung.com>
Automatically generate WorkerContext constructor attributes
https://bugs.webkit.org/show_bug.cgi?id=117183
Reviewed by Kentaro Hara.
Add [GlobalContext=WindowOnly|WorkerOnly|WindowAndWorker] IDL extended attribute
to indicate to the bindings generator on which global context the constructor
attribute should be generated for interfaces without [NoInterfaceObject]:
- WindowOnly: only on the global Window object (default if ommitted)
- WorkerOnly: only on the worker context
- WindowAndWorker: On both the global Window object and the worker context
This covers all the current use cases.
The JSC bindings generator now automatically generates the Constructor attributes
on the WorkerContext for non-callback interfaces which do not have the
[NoInterfaceObject] extended attribute but have [GlobalContext=WorkerOnly|WindowAndWorker]
extended attribute.
No new tests, already covered by:
fast/js/global-constructors-attributes.html
fast/js/global-constructors-attributes-worker.html
* CMakeLists.txt:
* DerivedSources.make: Pass new --workerContextConstructorsFile argument to preprocess-idls.pl.
* DerivedSources.pri: Ditto.
* GNUmakefile.am: Ditto.
* PlatformBlackBerry.cmake: Ditto.
* UseJSC.cmake: Ditto.
* bindings/scripts/IDLAttributes.txt: Add [GlobalContext=WindowOnly|WorkerOnly|WindowAndWorker]
IDL extended attribute.
* bindings/scripts/preprocess-idls.pl: Add support for [GlobalContext] extended attribute and
generate a partial interface for WorkerContext global constructors that are automatically
generated.
* dom/MessageEvent.idl: Add [GlobalContext=WindowAndWorker].
* fileapi/Blob.idl: Add [GlobalContext=WindowAndWorker].
* fileapi/FileReader.idl: Add [GlobalContext=WindowAndWorker].
* fileapi/FileReaderSync.idl: Add [GlobalContext=WorkerOnly] and remove [NoInterfaceObject]
as the interface should only be visible in worker environment as per the spec.
* html/DOMURL.idl: Add [GlobalContext=WindowAndWorker].
* html/canvas/ArrayBuffer.idl: Add [GlobalContext=WindowAndWorker].
* html/canvas/DataView.idl: Add [GlobalContext=WindowAndWorker].
* html/canvas/Float32Array.idl: Add [GlobalContext=WindowAndWorker].
* html/canvas/Float64Array.idl: Add [GlobalContext=WindowAndWorker].
* html/canvas/Int16Array.idl: Add [GlobalContext=WindowAndWorker].
* html/canvas/Int32Array.idl: Add [GlobalContext=WindowAndWorker].
* html/canvas/Int8Array.idl: Add [GlobalContext=WindowAndWorker].
* html/canvas/Uint16Array.idl: Add [GlobalContext=WindowAndWorker].
* html/canvas/Uint32Array.idl: Add [GlobalContext=WindowAndWorker].
* html/canvas/Uint8Array.idl: Add [GlobalContext=WindowAndWorker].
* html/canvas/Uint8ClampedArray.idl: Add [GlobalContext=WindowAndWorker].
* workers/WorkerContext.idl: Remove several Constructor attributes which are now automatically
generated.
* workers/WorkerLocation.idl: Add [GlobalContext=WorkerOnly] and remove [NoInterfaceObject]
as the interface should only be visible in worker environment as per the spec.
2013-06-04 Kangil Han <kangil.han@samsung.com>
Use ASSERT_DISABLED option for assertion purpose code in InlineBox
https://bugs.webkit.org/show_bug.cgi?id=117146
Reviewed by Alexey Proskuryakov.
We can distinguish assertion code with debug purpose by using ASSERT_DISABLED option.
* rendering/InlineBox.cpp:
(WebCore::InlineBox::~InlineBox):
(WebCore::InlineBox::destroy):
(WebCore::InlineBox::operator delete):
* rendering/InlineBox.h:
(WebCore::InlineBox::InlineBox):
2013-06-04 Kent Tamura <tkent@chromium.org>
Fix an assertion failure in Range::textNodeSplit by Text::splitText
https://bugs.webkit.org/show_bug.cgi?id=116509
Reviewed by Ryosuke Niwa.
Range::textNodeSplit is called in Text::splitText, and it assumes the
next sibling node is still a Text node. A DOM mutation event handler can
break this assumption.
We had better postpone DOM mutation events dispatched in Node::insertBefore
until exiting splitText to avoid inconsistent Range state.
This imports http://src.chromium.org/viewvc/blink?view=revision&revision=150493 .
Test: fast/dom/Range/split-text-in-range.html
* dom/Text.cpp:
(WebCore::Text::splitText): Add EventQueueScope.
2013-06-03 Kangil Han <kangil.han@samsung.com>
Remove unused arithmetic operation in RenderListItem
https://bugs.webkit.org/show_bug.cgi?id=117175
Reviewed by Brent Fulgham.
Variable 'markerLogicalLeft' is reassigned a value before the old one has been used.
* rendering/RenderListItem.cpp:
(WebCore::RenderListItem::positionListMarker):
2013-06-03 Roger Fong <roger_fong@apple.com>
Unreviewed. Some AppleWin VS2010 house cleaning.
* WebCore.vcxproj/build-generated-files.sh:
2013-06-03 Roger Fong <roger_fong@apple.com>
clearLayoutOverflow should never be called before calling layer()->updateScrollInfoAfterLayout().
https://bugs.webkit.org/show_bug.cgi?id=116689.
Reviewed by Ojan Vafai.
Make sure that clearLayoutOverflow only gets called after layer()->updateScrollInfoAfterLayout().
Also move clearLayoutOverflow to RenderBlock so we can keep all the delayed scroll update logic together.
Test: fast/flexbox/clear-overflow-before-scroll-update.html
* rendering/RenderBlock.cpp:
(WebCore::RenderBlock::layout): Remove call to clearLayoutOverflow.
(WebCore::RenderBlock::finishDelayUpdateScrollInfo): Add call to clearLayoutOverflow.
(WebCore::RenderBlock::updateScrollInfoAfterLayout): Ditto.
(WebCore::RenderBlock::clearLayoutOverflow): ASSERT(!gDelayUpdateScrollInfo) and move from RenderBox to RenderBlock to keep delayed scroll update logic together.
* rendering/RenderBlock.h:
(RenderBlock):
* rendering/RenderBox.cpp:
* rendering/RenderBox.h:
(WebCore::RenderBox::layoutOverflowRect): Remove from layoutOverflowRect.
(RenderBox):
* rendering/RenderDeprecatedFlexibleBox.cpp:
(WebCore::RenderDeprecatedFlexibleBox::layoutBlock): This should call updateScrollInfoAfterLayout() intead of directly calling layer()->updateScrollInfoAfterLayout().
* rendering/RenderGrid.cpp:
(WebCore::RenderGrid::layoutBlock): Ditto.
2013-05-31 Anders Carlsson <andersca@apple.com>
Take the normal NSView code path when drawing into an inclusive layer
https://bugs.webkit.org/show_bug.cgi?id=117094
<rdar://problem/13812355>
Reviewed by Sam Weinig.
For now, take the normal code path when drawing into an inclusive layer.
* platform/mac/WidgetMac.mm:
(WebCore::Widget::paint):
2013-05-31 Tiancheng Jiang <tijiang@rim.com>
[BlackBerry] Update Button UX.
https://bugs.webkit.org/show_bug.cgi?id=116992
Reviewed by Rob Buis.
BlackBerry PR 342298.
Internally Review by Jeff Rogers.
* css/themeBlackBerry.css:
2013-05-31 David Kilzer <ddkilzer@apple.com>
DerivedSources.make: any rules that use $(FEATURE_DEFINES) should be rebuilt when FeatureDefines.xcconfig changes
<http://webkit.org/b/117081>
Reviewed by Mark Rowe.
* DerivedSources.make: Add $(PLATFORM_FEATURE_DEFINES)
dependency for all rules that use $(FEATURE_DEFINES) to generate
files.
(PLATFORM_FEATURE_DEFINES): Set this variable to
Configurations/FeatureDefines.xcconfig if not already set on
Mac OS X.
2013-05-31 Tiancheng Jiang <tijiang@rim.com>
Text Field UX updates.
https://bugs.webkit.org/show_bug.cgi?id=116996
Reviewed by Rob Buis.
BlackBerry PR 342333.
Internally Reviewed by Jeff Rogers.
Update disabled text field font color.
* css/themeBlackBerry.css:
2013-05-31 Dean Jackson <dino@apple.com>
Update CheckedInt.h to latest version from Mozilla
https://bugs.webkit.org/show_bug.cgi?id=117009
Reviewed by Darin Adler.
Mozilla have updated their version of CheckedInt and suggested
we sync. Here are the improvements:
- CheckedInt now consistently rejects unsupported types. Before, you
could sometimes construct a CheckedInt from an unsupported type (like,
float) or multiply a CheckedInt by a float, and have it not caught! See
https://bugzilla.mozilla.org/show_bug.cgi?id=869194
- Fixed a possibility of undefined behavior in unary operator-. See bug
https://bugzilla.mozilla.org/show_bug.cgi?id=849666
- CheckedInt now supports the "long long" and "unsigned long long"
types. We don't like "long long" (and neither does the Google C++ style
guide!) but we had to do that because libogg exposes typedefs to those
types. See Bug https://bugzilla.mozilla.org/show_bug.cgi?id=869685
- CheckedInt also now supports "signed char" in addition to "char" ---
they are not the same type! See Bug https://bugzilla.mozilla.org/show_bug.cgi?id=847521
- Fixed and simplified usage of CheckedInt outside of Mozilla. You'll
like this one! See Bug https://bugzilla.mozilla.org/show_bug.cgi?id=849667
- Fixed compilation with the Intel C++ compiler. See bug https://bugzilla.mozilla.org/show_bug.cgi?id=784309
* html/canvas/CheckedInt.h: Updated.
2013-05-31 Andre Moreira Magalhaes <andre.magalhaes@collabora.co.uk>
Make sure gstreamer source element is thread-safe
https://bugs.webkit.org/show_bug.cgi?id=115352
Reviewed by Philippe Normand.
GStreamer source element may be created by any gstreamer element on any thread by calling
gst_element_make_from_uri with the URIs handled by the source element.
This patch makes sure the gstreamer source element is thread-safe to avoid issues with it
being created outside the main thread.
* platform/graphics/gstreamer/WebKitWebSourceGStreamer.cpp:
(_WebKitWebSrcPrivate):
(webkit_web_src_init):
(webKitWebSrcFinalize):
(webKitWebSrcSetProperty):
(webKitWebSrcGetProperty):
(webKitWebSrcStop):
(webKitWebSrcStart):
(webKitWebSrcChangeState):
(webKitWebSrcQueryWithParent):
(webKitWebSrcGetUri):
(webKitWebSrcSetUri):
(webKitWebSrcNeedDataMainCb):
(webKitWebSrcEnoughDataMainCb):
(webKitWebSrcSeekMainCb):
(webKitWebSrcSeekDataCb):
(webKitWebSrcSetMediaPlayer):
(StreamingClient::StreamingClient):
(StreamingClient::~StreamingClient):
(StreamingClient::didReceiveResponse):
(StreamingClient::didReceiveData):
(StreamingClient::didFinishLoading):
(StreamingClient::wasBlocked):
(StreamingClient::cannotShowURL):
2013-05-31 Sergio Villar Senin <svillar@igalia.com>
Build fix when CSSParser debugging is enabled
https://bugs.webkit.org/show_bug.cgi?id=117075
Reviewed by Andreas Kling.
Build fails when enabling parser debugging by setting YYDEBUG to
1 because of a missing include.
* css/CSSGrammar.y.includes:
2013-05-31 Alberto Garcia <agarcia@igalia.com>
[Soup] [Gstreamer] ASSERT in StreamingClient::getOrCreateReadBuffer
https://bugs.webkit.org/show_bug.cgi?id=116686
Reviewed by Carlos Garcia Campos.
We were using g_input_stream_read_async() to handle redirections
because of Gnome bug #691489.
This produces an unexpected read attempt which triggers an assert
in StreamingClient::getOrCreateReadBuffer().
Now that the Gnome bug is fixed we can replace read_async() with
skip_async().
* platform/network/soup/ResourceHandleSoup.cpp:
(WebCore::ResourceHandle::ensureReadBuffer):
(WebCore::redirectSkipCallback):
(WebCore::sendRequestCallback):
2013-05-30 Eugene Klyuchnikov <eustas@chromium.org>
selectionStart/selectionEnd return "obsolete" values when requested during "input" event
https://bugs.webkit.org/show_bug.cgi?id=110742
Reviewed by Ryosuke Niwa.
This patch defers firing "webkitEditableContentChanged" until new
selection is applied to control. This makes selection during "input"
more consistent and reliable.
Background: "input" event is fired by "webkitEditableContentChanged"
dispatcher. But "input" is scoped event, so under some conditions its
dispatching may be deferred. When "input" dispatching is deferred,
dispatcher observes updated selectionStart and selectionEnd.
Otherwise values repersent state before applying editing command.
So, to make selectionStart/End to be more predictable and useful, we
need either always dispatch "input" before selection is updated, or
always dispatch "input" after selection is updated.
As it was mentioned, dispatching could be deferred by scoping. So
dispatching before updating selection couldn't be guaranteed.
Moreover, it will be hard to calculate updated selection in user
code. On the other side - old selection could be easily tracked.
So, it looks logically that we should guarantee dispatching "input"
after updating selection. There are no execution paths in
"webkitEditableContentChanged" dispatched that depends on current
selection. So it is safe to fire this event after selection is updated.
Test: editing/selection/caret-after-keypress.html
* editing/Editor.cpp:
Dispatch "input" event after new selection in applied.
2013-05-30 Ruth Fong <ruth_fong@apple.com>
WebKit's Enter Full Screen for <video> elements isn't working
https://bugs.webkit.org/show_bug.cgi?id=117001
Reviewed by Jer Noble.
Fix workflow to allow a video to enter into full screen
mode from a kWKContextMenuItemTagEnterVideoFullscreen
context menu item by denoting the enterFullscreenForVideo
call as a user gesture, so Document::requestFullScreenForElement
will execute correctly.
No new tests. Covered by media/context-menu-actions.html,
which is disabled due to bug #116651.
* rendering/HitTestResult.cpp:
(WebCore::HitTestResult::enterFullscreenForVideo):
2013-05-30 Rafael Brandao <rafael.lobo@openbossa.org>
Fix double hash lookup in RenderTableSection::paintObject loop
https://bugs.webkit.org/show_bug.cgi?id=117055
Reviewed by Antonio Gomes.
* rendering/RenderTableSection.cpp:
(WebCore::RenderTableSection::paintObject):
2013-05-31 Stephanie Lewis <slewis@apple.com>
Update low memory handler to use new memory pressure notifications on new OS versions.
<rdar://problem/14027095>
Reviewed by Mark Rowe.
No change in functionality.
* WebCore.exp.in:
* platform/mac/MemoryPressureHandlerMac.mm:
(WebCore::MemoryPressureHandler::install): Call new API
* platform/mac/WebCoreSystemInterface.h:
* platform/mac/WebCoreSystemInterface.mm:
2013-05-30 Rafael Brandao <rafael.lobo@openbossa.org>
Fix double hash lookup in WebSocket::connect loop
https://bugs.webkit.org/show_bug.cgi?id=117052
Reviewed by Anders Carlsson.
* Modules/websockets/WebSocket.cpp:
(WebCore::WebSocket::connect):
2013-05-30 Benjamin Poulain <bpoulain@apple.com>
Remove some 16bits conversion.
https://bugs.webkit.org/show_bug.cgi?id=116935
Reviewed by Darin Adler.
Merge chromium ce35a544d09e6cb907457535340eb0e9984e57b8.
https://chromium.googlesource.com/chromium/blink/+/ce35a544d09e6cb907457535340eb0e9984e57b8
* html/parser/InputStreamPreprocessor.h:
* platform/FileSystem.cpp:
(WebCore::encodeForFileName):
2013-05-30 Anders Carlsson <andersca@apple.com>
REGRESSION (r119759): Adobe Flash Player "smaller" installer relies on the incorrect firing of a load event and needs an app-specific hack for compatibility
https://bugs.webkit.org/show_bug.cgi?id=117042
<rdar://problem/13916291>
Reviewed by Mark Rowe.
Ignore HTTP errors for scripts requested from within the installer. Instead of just checking for the
Adobe Flash installer, we use the "com.solidstatenetworks.awkhost" bundle identifier to determine
whether to apply the workaround. This could in theory fix other installers that use the same mechanism.
* loader/cache/CachedScript.cpp:
(WebCore::CachedScript::shouldIgnoreHTTPStatusCodeErrors):
* loader/cache/CachedScript.h:
* platform/RuntimeApplicationChecks.cpp:
(WebCore::applicationIsSolidStateNetworksDownloader):
* platform/RuntimeApplicationChecks.h:
2013-05-30 Sergio Villar Senin <svillar@igalia.com>
Allow no space between "background-position:" dimensions
https://bugs.webkit.org/show_bug.cgi?id=116870
Reviewed by Darin Adler.
From Blink r149314 by <ericwilligers@chromium.org>
Specs allow no spaces between the dimensions of a
"background-position:" like "1px+1px", we should support
that.
Whitespaces are no longer early consumed, dramatically dropping
the shift/reduce conflicts to half. The productions unary_term,
calc_func_term, calc_func_expr and calc_func_paren_expr no longer
consume whitespaces.
* css/CSSGrammar.y.in:
* css/CSSParser.cpp:
(WebCore::CSSParser::realLex):
2013-05-30 Jer Noble <jer.noble@apple.com>
HTMLMediaElement will not unthrottle page when playback stops for nreasons other than user-initiated pause.
https://bugs.webkit.org/show_bug.cgi?id=117016
Reviewed by Oliver Hunt.
Add a new class PageActivityAssertionToken to allow HTMLMediaElement to decouple
knowledge of and control over the lifetime of PageThrottler. The new class will
have weak references to and from the PageThrottler so that holders of the token
will not need to care if the Page or PageThrottler has been destroyed.
HTMLMediaElement will create one of these PageActivityAssertionTokens when playback
begins and destroy it when playback stops for any reason, or when the element is
destroyed.
* html/HTMLMediaElement.cpp:
(WebCore::HTMLMediaElement::~HTMLMediaElement):
(WebCore::HTMLMediaElement::playInternal):
(WebCore::HTMLMediaElement::pauseInternal):
(WebCore::HTMLMediaElement::playbackProgressTimerFired):
(WebCore::HTMLMediaElement::updatePlayState):
* html/HTMLMediaElement.h:
* page/Page.cpp:
(WebCore::createActivityToken): Added simple factory method.
* page/Page.h:
* page/PageActivityAssertionToken.cpp:
(WebCore::PageActivityAssertionToken::PageActivityAssertionToken): Call addActivityToken();
(WebCore::PageActivityAssertionToken::~PageActivityAssertionToken): Call removeActivityToken();
(WebCore::PageActivityAssertionToken::invalidate): Clear m_throttler.
* page/PageActivityAssertionToken.h:
* page/PageThrottler.cpp:
(WebCore::PageThrottler::~PageThrottler): Invalidate all outstanding tokens.
(WebCore::PageThrottler::addActivityToken): Bump the activity count.
(WebCore::PageThrottler::removeActivityToken): Lower the activity count.
* page/PageThrottler.h:
Add the new files to the various build systems:
* CMakeLists.txt:
* GNUmakefile.list.am:
* Target.pri:
* WebCore.vcproj/WebCore.vcproj:
* WebCore.vcxproj/WebCore.vcxproj:
* WebCore.vcxproj/WebCore.vcxproj.filters:
* WebCore.xcodeproj/project.pbxproj:
2013-05-29 Jeffrey Pfau <jpfau@apple.com>
[Mac] Enable cache partitioning and the public suffix list on 10.8
<rdar://problem/13679019>
Rubber-stamped by David Kilzer.
* Configurations/FeatureDefines.xcconfig:
2013-05-30 Andreas Kling <akling@apple.com>
Fix double hash lookup in DocumentEventQueue::cancelEvent().
<http://webkit.org/b/117031>
Reviewed by Anders Carlsson.
* dom/DocumentEventQueue.cpp:
(WebCore::DocumentEventQueue::cancelEvent):
2013-05-30 Andreas Kling <akling@apple.com>
Fix double hash lookup in DocumentLoader::removeSubresourceLoader().
<http://webkit.org/b/117030>
Reviewed by Anders Carlsson.
* loader/DocumentLoader.cpp:
(WebCore::DocumentLoader::removeSubresourceLoader):
2013-05-30 Andreas Kling <akling@apple.com>
Fix double hash lookup in RenderView::repaintSelection() loop.
<http://webkit.org/b/117029>
Reviewed by Anders Carlsson.
* rendering/RenderView.cpp:
(WebCore::RenderView::repaintSelection):
2013-05-30 Peter Gal <galpeter@inf.u-szeged.hu>
CURL: Incorrect stripping of query from file URL
https://bugs.webkit.org/show_bug.cgi?id=104307
Reviewed by Darin Adler.
Clear the query part of the file URL if there is any.
* platform/network/curl/ResourceHandleManager.cpp:
(WebCore::ResourceHandleManager::initializeHandle):
2013-05-30 Antti Koivisto <antti@apple.com>
Separate generic font family settings to a class
https://bugs.webkit.org/show_bug.cgi?id=117027
Reviewed by Andreas Kling.
The new class is under platform/ and can be accessed by the font code directly without platform violations.
* WebCore.xcodeproj/project.pbxproj:
* page/Settings.cpp:
(WebCore::invalidateAfterGenericFamilyChange):
(WebCore::Settings::Settings):
(WebCore::Settings::~Settings):
(WebCore::Settings::create):
(WebCore::Settings::standardFontFamily):
(WebCore::Settings::setStandardFontFamily):
(WebCore::Settings::fixedFontFamily):
(WebCore::Settings::setFixedFontFamily):
(WebCore::Settings::serifFontFamily):
(WebCore::Settings::setSerifFontFamily):
(WebCore::Settings::sansSerifFontFamily):
(WebCore::Settings::setSansSerifFontFamily):
(WebCore::Settings::cursiveFontFamily):
(WebCore::Settings::setCursiveFontFamily):
(WebCore::Settings::fantasyFontFamily):
(WebCore::Settings::setFantasyFontFamily):
(WebCore::Settings::pictographFontFamily):
(WebCore::Settings::setPictographFontFamily):
* page/Settings.h:
* platform/graphics/FontGenericFamilies.cpp: Added.
(WebCore::setGenericFontFamilyForScript):
(WebCore::genericFontFamilyForScript):
(WebCore::FontGenericFamilies::FontGenericFamilies):
(WebCore::FontGenericFamilies::standardFontFamily):
(WebCore::FontGenericFamilies::fixedFontFamily):
(WebCore::FontGenericFamilies::serifFontFamily):
(WebCore::FontGenericFamilies::sansSerifFontFamily):
(WebCore::FontGenericFamilies::cursiveFontFamily):
(WebCore::FontGenericFamilies::fantasyFontFamily):
(WebCore::FontGenericFamilies::pictographFontFamily):
(WebCore::FontGenericFamilies::setStandardFontFamily):
(WebCore::FontGenericFamilies::setFixedFontFamily):
(WebCore::FontGenericFamilies::setSerifFontFamily):
(WebCore::FontGenericFamilies::setSansSerifFontFamily):
(WebCore::FontGenericFamilies::setCursiveFontFamily):
(WebCore::FontGenericFamilies::setFantasyFontFamily):
(WebCore::FontGenericFamilies::setPictographFontFamily):
* platform/graphics/FontGenericFamilies.h: Added.
(WebCore::UScriptCodeHashTraits::emptyValue):
(WebCore::UScriptCodeHashTraits::constructDeletedValue):
(WebCore::UScriptCodeHashTraits::isDeletedValue):
(WebCore::FontGenericFamilies::create):
2013-05-30 Andreas Kling <akling@apple.com>
Avoid using CSSOM style declarations in HTML editing.
<http://webkit.org/b/117019>
Reviewed by Antti Koivisto.
Convert the editing code to use ComputedStyleExtractor instead of instantiating CSSOM wrappers.
* css/CSSComputedStyleDeclaration.h:
* css/CSSComputedStyleDeclaration.cpp:
(WebCore::ComputedStyleExtractor::getFontSizeCSSValuePreferringKeyword):
(WebCore::ComputedStyleExtractor::useFixedFontDefaultSize):
(WebCore::ComputedStyleExtractor::propertyMatches):
(WebCore::ComputedStyleExtractor::copyProperties):
(WebCore::ComputedStyleExtractor::copyPropertiesInSet):
Moved here from CSSComputedStyleDeclaration. These methods are used by HTML editing.
(WebCore::CSSComputedStyleDeclaration::copyProperties):
Reimplemented to call ComputedStyleExtractor.
* css/CSSStyleDeclaration.h:
* css/PropertySetCSSStyleDeclaration.h:
* css/PropertySetCSSStyleDeclaration.cpp:
(WebCore::PropertySetCSSStyleDeclaration::copyProperties):
Removed CSSStyleDeclaration::cssPropertyMatches(), the remaining code lives in
ComputedStyleExtractor::propertyMatches() and is only used by HTML editing.
* css/StylePropertySet.h:
* css/StylePropertySet.cpp:
(WebCore::MutableStylePropertySet::removeEquivalentProperties):
Added an overload that takes a ComputedStyleExtractor.
This code should move into EditingStyle.cpp, material for a follow-up patch.
* editing/ApplyStyleCommand.cpp:
(WebCore::toIdentifier):
Add a file-local helper for yanking the identifier value (if any) out of a CSSPrimitiveValue.
(WebCore::ApplyStyleCommand::splitAncestorsWithUnicodeBidi):
(WebCore::ApplyStyleCommand::removeEmbeddingUpToEnclosingBlock):
(WebCore::highestEmbeddingAncestor):
* editing/EditingStyle.h:
* editing/EditingStyle.cpp:
(WebCore::editingStyleFromComputedStyle):
(WebCore::extractPropertyValue):
(WebCore::identifierForStyleProperty):
(WebCore::textColorFromStyle):
(WebCore::backgroundColorFromStyle):
(WebCore::EditingStyle::init):
(WebCore::EditingStyle::removeStyleAddedByNode):
(WebCore::EditingStyle::removeStyleConflictingWithStyleOfNode):
(WebCore::EditingStyle::triStateOfStyle):
(WebCore::EditingStyle::styleIsPresentInComputedStyleOfNode):
(WebCore::EditingStyle::removeStyleFromRulesAndContext):
(WebCore::StyleChange::StyleChange):
(WebCore::fontWeightIsBold):
(WebCore::extractPropertiesNotIn):
(WebCore::getPropertiesNotIn):
Use ComputedStyleExtractor instead of CSSComputedStyleDeclaration in all of this code.
Templatized a bunch of the code so we don't have to repeat ourselves for both StylePropertySet
and ComputedStyleExtractor inputs.
2013-05-30 Roland Takacs <rtakacs@inf.u-szeged.hu>
Remove "hidden"=true from Inspector.json
https://bugs.webkit.org/show_bug.cgi?id=114116
Reviewed by Timothy Hatcher.
Remove "hidden"=true because it's a Chromium concept.
Patch created by Timothy Hatcher.
* inspector/Inspector.json:
2013-05-30 Kondapally Kalyan <kalyan.kondapally@intel.com>
[EFL][EGL] Implement TransportSurface client.
https://bugs.webkit.org/show_bug.cgi?id=114122
Reviewed by Kenneth Rohde Christiansen.
Covered by existing WebGL tests.
This patch implements the client support for Transport
Surface with EGL backend using GLES2.
* platform/graphics/surfaces/efl/GLTransportSurface.cpp:
(WebCore::GLTransportSurfaceClient::createTransportSurfaceClient):
(WebCore::GLTransportSurfaceClient::GLTransportSurfaceClient):
* platform/graphics/surfaces/efl/GLTransportSurface.h:
(GLTransportSurfaceClient):
* platform/graphics/surfaces/efl/GraphicsSurfaceCommon.cpp:
(WebCore::GraphicsSurfacePrivate::initializeClient):
* platform/graphics/surfaces/egl/EGLConfigSelector.cpp:
(WebCore):
(WebCore::EGLConfigSelector::surfaceClientConfig):
(WebCore::EGLConfigSelector::findMatchingConfigWithVisualId):
* platform/graphics/surfaces/egl/EGLConfigSelector.h:
(WebCore):
(EGLConfigSelector):
Support for retrieving valid EGLConfig on client side.
* platform/graphics/surfaces/egl/EGLHelper.cpp:
(WebCore):
(WebCore::resolveDisplay):
(WebCore::EGLHelper::resolveEGLBindings):
(WebCore::EGLHelper::createEGLImage):
(WebCore::EGLHelper::destroyEGLImage):
(WebCore::EGLHelper::imageTargetTexture2DOES):
* platform/graphics/surfaces/egl/EGLHelper.h:
Helper functions to create and destroy EGLImage.
* platform/graphics/surfaces/egl/EGLXSurface.cpp:
(WebCore::EGLXTransportSurfaceClient::EGLXTransportSurfaceClient):
(WebCore):
(WebCore::EGLXTransportSurfaceClient::~EGLXTransportSurfaceClient):
(WebCore::EGLXTransportSurfaceClient::destroy):
(WebCore::EGLXTransportSurfaceClient::prepareTexture):
(WebCore::EGLTextureFromPixmap::EGLTextureFromPixmap):
(WebCore::EGLTextureFromPixmap::~EGLTextureFromPixmap):
(WebCore::EGLTextureFromPixmap::destroy):
(WebCore::EGLTextureFromPixmap::isValid):
(WebCore::EGLTextureFromPixmap::bindTexImage):
(WebCore::EGLTextureFromPixmap::reBindTexImage):
* platform/graphics/surfaces/egl/EGLXSurface.h:
(EGLXTransportSurfaceClient):
TransportSurfaceClient implementation.
(WebCore):
* platform/graphics/surfaces/glx/GLXSurface.cpp:
(WebCore::GLXTransportSurfaceClient::GLXTransportSurfaceClient):
* platform/graphics/surfaces/glx/GLXSurface.h:
(GLXTransportSurfaceClient):
* platform/graphics/surfaces/glx/X11Helper.cpp:
(WebCore::X11Helper::createOffScreenWindow):
(WebCore):
(WebCore::X11Helper::createPixmap):
* platform/graphics/surfaces/glx/X11Helper.h:
(X11Helper):
2013-05-30 Mike West <mkwst@chromium.org>
Rename 'KURL::elidedString' and inspector's 'String.prototype.trimMiddle' for clarity.
https://bugs.webkit.org/show_bug.cgi?id=111700
Reviewed by Darin Adler.
Darin suggested that 'KURL::elidedString' is inaccurately named[1], this
patch is an attempt to do better. It additionally brings the Inspector's
'String.prototype.trimMiddle' method into line, as the two methods do
more or less the same thing.
After a bit of discussion with Maciej and Daniel Bates on IRC, I've
settled on 'KURL::stringCenterEllipsizedToLength(unsigned)' and
'String.prototype.centerEllipsizedToLength(number)' respectively.
No new tests are added, as this patch shouldn't have any visible effect
on the web. It's strictly an internal refactoring.
* Modules/websockets/WebSocket.cpp:
(WebCore::WebSocket::connect):
(WebCore::WebSocket::send):
* Modules/websockets/WebSocketChannel.cpp:
(WebCore::WebSocketChannel::send):
(WebCore::WebSocketChannel::fail):
* bindings/ScriptControllerBase.cpp:
(WebCore::ScriptController::canExecuteScripts):
* dom/Document.cpp:
(WebCore::Document::processHttpEquiv):
* dom/ScriptElement.cpp:
(WebCore::ScriptElement::executeScript):
* html/HTMLMediaElement.cpp:
(WebCore::HTMLMediaElement::canPlayType):
(WebCore::HTMLMediaElement::isSafeToLoadURL):
* loader/FrameLoader.cpp:
(WebCore::FrameLoader::submitForm):
(WebCore::FrameLoader::loadFrameRequest):
(WebCore::FrameLoader::commitProvisionalLoad):
(WebCore::FrameLoader::shouldInterruptLoadForXFrameOptions):
(WebCore::FrameLoader::loadProvisionalItemFromCachedPage):
(WebCore::createWindow):
* loader/MainResourceLoader.cpp:
(WebCore::MainResourceLoader::willSendRequest):
(WebCore::MainResourceLoader::responseReceived):
* loader/MixedContentChecker.cpp:
(WebCore::MixedContentChecker::logWarning):
* loader/appcache/ApplicationCacheGroup.cpp:
(WebCore::ApplicationCacheGroup::didReceiveResponse):
(WebCore::ApplicationCacheGroup::didFail):
* loader/cache/CachedResourceLoader.cpp:
(WebCore::CachedResourceLoader::canRequest):
(WebCore::CachedResourceLoader::requestResource):
(WebCore::CachedResourceLoader::loadResource):
(WebCore::CachedResourceLoader::printAccessDeniedMessage):
* page/ContentSecurityPolicy.cpp:
(WebCore::CSPDirectiveList::checkSourceAndReportViolation):
(WebCore::CSPDirectiveList::allowScriptNonce):
(WebCore::CSPDirectiveList::allowPluginType):
* platform/KURL.cpp:
(WebCore::KURL::stringCenterEllipsizedToLength):
* platform/KURL.h:
Rename 'KURL::elidedString' to 'KURL::stringCenterEllipsizedToLength',
and adjust callsites accordingly.
* inspector/front-end/CallStackSidebarPane.js:
(WebInspector.CallStackSidebarPane.Placard.prototype._update):
* inspector/front-end/ElementsTreeOutline.js:
(WebInspector.ElementsTreeElement.prototype._buildAttributeDOM):
* inspector/front-end/HeapSnapshotGridNodes.js:
(WebInspector.HeapSnapshotGenericObjectNode.prototype.shortenWindowURL):
* inspector/front-end/Linkifier.js:
(WebInspector.Linkifier.DefaultFormatter.prototype.formatLiveAnchor):
* inspector/front-end/ResourceUtils.js:
(WebInspector.linkifyURLAsNode):
* inspector/front-end/TabbedEditorContainer.js:
(WebInspector.TabbedEditorContainer.prototype._titleForFile):
* inspector/front-end/utilities.js:
Rename 'String.prototype.trimMiddle' to 'String.prototype.centerEllipsizedToLength'
and adjust callsites accordingly.
2013-05-30 Antti Koivisto <antti@apple.com>
Rename FontFallbackList.cpp/h to FontGlyphs.cpp/h
https://bugs.webkit.org/show_bug.cgi?id=117022
Reviewed by Andreas Kling.
Rename to match the class name.
* CMakeLists.txt:
* GNUmakefile.list.am:
* Target.pri:
* WebCore.vcproj/WebCore.vcproj:
* WebCore.vcxproj/WebCore.vcxproj:
* WebCore.vcxproj/WebCore.vcxproj.filters:
* WebCore.xcodeproj/project.pbxproj:
* platform/graphics/Font.h:
* platform/graphics/FontCache.cpp:
* platform/graphics/FontFallbackList.cpp: Removed.
* platform/graphics/FontFallbackList.h: Removed.
* platform/graphics/FontFastPath.cpp:
* platform/graphics/FontGlyphs.cpp: Copied from Source/WebCore/platform/graphics/FontFallbackList.cpp.
* platform/graphics/FontGlyphs.h: Copied from Source/WebCore/platform/graphics/FontFallbackList.h.
* platform/graphics/mac/FontComplexTextMac.cpp:
2013-05-30 Ryosuke Niwa <rniwa@webkit.org>
Get rid of Position::computedStyle
https://bugs.webkit.org/show_bug.cgi?id=117024
Reviewed by Andreas Kling.
Removed the function.
* dom/Position.cpp:
* dom/Position.h:
* editing/ApplyStyleCommand.cpp:
(WebCore::ApplyStyleCommand::positionToComputeInlineStyleChange): We need a position
inside the dummy element since we'll get the containing element's style instead
if we had the position before the dummy element.
* editing/EditingStyle.cpp:
(WebCore::StyleChange::StyleChange):
2013-05-30 Seokju Kwon <seokju.kwon@gmail.com>
Remove obsolete forward declaration from InspectorFrontendHost.h
https://bugs.webkit.org/show_bug.cgi?id=117017
Reviewed by Joseph Pecoraro.
Remove obsolete forward declaration and fix style issue as well.
No change in behavior, no new tests.
* inspector/InspectorFrontendHost.h:
(WebCore):
(InspectorFrontendHost):
2013-05-29 Tim Horton <timothy_horton@apple.com>
Expose incrementalRenderingSuppressionTimeout via WK2
https://bugs.webkit.org/show_bug.cgi?id=117015
<rdar://problem/13992853>
Reviewed by Darin Adler.
* dom/Document.cpp:
(WebCore::Document::setVisualUpdatesAllowed):
Inform the FrameLoader that we're ready to transition the page, if
nothing else already has. This will be forwarded to the FrameLoaderClient,
and WebKit2's implementation will go ahead and un-freeze the layer tree,
so that the incremental rendering suppression watchdog timer actually works.
(WebCore::Document::setVisualUpdatesAllowedByClient):
Make incremental rendering suppression extension tokens play nice with the
watchdog timer; allow setVisualUpdatesAllowedByClient=true to re-enable updates
if either the page is in the "completed" state or the watchdog has already fired.
* loader/FrameLoader.cpp:
* loader/FrameLoader.h:
(WebCore::FrameLoader::forcePageTransitionIfNeeded): Added.
Forward to the client.
* loader/FrameLoaderClient.h:
(WebCore::FrameLoaderClient::forcePageTransitionIfNeeded): Added.
2013-05-29 Praveen R Jadhav <praveen.j@samsung.com>
ProgressEvent should not be cancelable
https://bugs.webkit.org/show_bug.cgi?id=114444
Reviewed by Darin Adler.
Parameter "cancelable" in ProgressEvent is set to false, by default, as mentioned in the specification. The spec link is given below.
Spec: http://www.w3.org/TR/2011/CR-progress-events-20110922/#suggested-names-for-events-using-the-progressevent-interface
No new tests. file-reader-event-listener.html and infoOnProgressEvent-expected.txt are updated.
* dom/ProgressEvent.cpp:
(WebCore::ProgressEvent::ProgressEvent):
(WebCore):
2013-05-29 Simon Fraser <simon.fraser@apple.com>
Fix paint-related milestones to not fire when the layer tree is frozen
https://bugs.webkit.org/show_bug.cgi?id=117012
Reviewed by Tim Horton.
In the previous code, it was possible to paint some layer and schedule
the m_paintRelatedMilestonesTimer, but then the layer tree was put into
a frozen state because the page redirected. However, the paint-related
milestones timer would still fire. This caused woes with header/footer
banners.
Fix by not firing paint-related milestones if the layer tree is frozen,
which we know via a new ChromeClient callback. When unfrozen, we'll
paint again, and fire the timer later.
* page/ChromeClient.h:
(WebCore::ChromeClient::layerTreeStateIsFrozen):
* rendering/RenderLayerCompositor.cpp:
(WebCore::RenderLayerCompositor::paintRelatedMilestonesTimerFired):
2013-05-29 Ryosuke Niwa <rniwa@webkit.org>
Store form control list with RefPtr
https://bugs.webkit.org/show_bug.cgi?id=116910
Reviewed by Kent Tamura.
Merge https://chromium.googlesource.com/chromium/blink/+/582132773280455ead1d42b0073be37efdeaf989.
Unfortunately, the Blink change doesn't provide much insight as to what kind of crashes are fixed
by this code change but it cleans up the way form elements with state are registered to the form
controller so it seems benefitial to merge it anyway.
* dom/Document.cpp:
(WebCore::Document::dispose):
* html/FormController.cpp:
(WebCore::FormController::createSavedFormStateMap):
(WebCore::FormController::registerFormElementWithState):
(WebCore::FormController::unregisterFormElementWithState):
(WebCore):
* html/FormController.h:
(FormController):
* html/HTMLFormControlElementWithState.cpp:
(WebCore::HTMLFormControlElementWithState::HTMLFormControlElementWithState):
(WebCore::HTMLFormControlElementWithState::~HTMLFormControlElementWithState):
(WebCore::HTMLFormControlElementWithState::insertedInto):
(WebCore):
(WebCore::HTMLFormControlElementWithState::removedFrom):
* html/HTMLFormControlElementWithState.h:
(HTMLFormControlElementWithState):
* html/HTMLTextFormControlElement.cpp:
(WebCore::HTMLTextFormControlElement::insertedInto):
2013-05-29 Andreas Kling <akling@apple.com>
Take ComputedStyleExtractor for a spin.
<http://webkit.org/b/116968>
Reviewed by Antti Koivisto.
Convert some editing and SVG code to use ComputedStyleExtractor instead of creating full
blown CSSComputedStyleDeclaration objects.
* editing/ApplyStyleCommand.cpp:
(WebCore::ApplyStyleCommand::splitAncestorsWithUnicodeBidi):
(WebCore::ApplyStyleCommand::removeEmbeddingUpToEnclosingBlock):
(WebCore::highestEmbeddingAncestor):
(WebCore::ApplyStyleCommand::computedFontSize):
* editing/EditingStyle.cpp:
(WebCore::EditingStyle::mergeStyleFromRulesForSerialization):
(WebCore::EditingStyle::textDirectionForSelection):
(WebCore::getIdentifierValue):
(WebCore::backgroundColorInEffect):
* editing/EditingStyle.h:
* svg/SVGAnimationElement.cpp:
(WebCore::SVGAnimationElement::computeCSSPropertyValue):
2013-05-29 Benjamin Poulain <bpoulain@apple.com>
Add a special case for SelectorDataList::execute when there is only one selector
https://bugs.webkit.org/show_bug.cgi?id=116891
Reviewed by Andreas Kling.
In the vast majority of cases, querySelector is called with a single selector.
This patch takes that input into account to improve the performance of
SelectorDataList::execute(). For the case of a single selector, we avoid three
branches executed for every node of the traversal.
This improves QuerySelector's time by 2.3%.
* dom/SelectorQuery.cpp:
(WebCore::SelectorDataList::execute):
2013-05-29 Dean Jackson <dino@apple.com>
-webkit-text-underline-position should not be inherited
https://bugs.webkit.org/show_bug.cgi?id=116363
Reverting http://trac.webkit.org/changeset/150366
It was an incorrect fix referring to an old specification.
* css/CSSProperty.cpp:
(WebCore::CSSProperty::isInheritedProperty):
* rendering/style/RenderStyle.h:
* rendering/style/StyleRareInheritedData.cpp:
(WebCore::StyleRareInheritedData::StyleRareInheritedData):
(WebCore::StyleRareInheritedData::operator==):
* rendering/style/StyleRareInheritedData.h:
(StyleRareInheritedData):
* rendering/style/StyleRareNonInheritedData.cpp:
(WebCore::StyleRareNonInheritedData::StyleRareNonInheritedData):
(WebCore::StyleRareNonInheritedData::operator==):
* rendering/style/StyleRareNonInheritedData.h:
(StyleRareNonInheritedData):
2013-05-29 Ryuan Choi <ryuan.choi@samsung.com>
[CMAKE] cmake errors when CMAKE_BUILD_TYPE is not specified.
https://bugs.webkit.org/show_bug.cgi?id=116899
Reviewed by Laszlo Gombos.
* CMakeLists.txt: Fixed if statement to escape when find command fails.
2013-05-28 Oliver Hunt <oliver@apple.com>
Add more accurate activity state tracking
https://bugs.webkit.org/show_bug.cgi?id=116893
Reviewed by Gavin Barraclough.
Add a hysteresis to Page activity throttling. We do this
through a PageThrottler class that now handles entering and
exiting throttling state, and adds a hysteresis to we can
limit the amount of on/off bouncing on the throttle.
Media elements now make use of this to disable timer throttling
while they are playing, and plugins use it to momentarily bounce
from throttled to unthrottled state.
* CMakeLists.txt:
* GNUmakefile.list.am:
* Target.pri:
* WebCore.exp.in:
* WebCore.vcproj/WebCore.vcproj:
* WebCore.vcxproj/WebCore.vcxproj:
* WebCore.vcxproj/WebCore.vcxproj.filters:
* WebCore.xcodeproj/project.pbxproj:
* html/HTMLMediaElement.cpp:
(WebCore::HTMLMediaElement::~HTMLMediaElement):
(WebCore::HTMLMediaElement::pageThrottlerIfPossible):
(WebCore):
(WebCore::HTMLMediaElement::playInternal):
(WebCore::HTMLMediaElement::pauseInternal):
* html/HTMLMediaElement.h:
(WebCore):
* html/MediaController.cpp:
(MediaController::unpause):
* page/ChromeClient.h:
(WebCore::ChromeClient::incrementActivePageCount):
(WebCore::ChromeClient::decrementActivePageCount):
(ChromeClient):
* page/Page.cpp:
(WebCore::Page::Page):
(WebCore::Page::~Page):
(WebCore::Page::setThrottled):
* page/Page.h:
(WebCore):
(Page):
(WebCore::Page::pageThrottler):
* page/PageThrottleState.h: Added.
* page/PageThrottler.cpp: Added.
(WebCore):
(WebCore::PageThrottler::PageThrottler):
(WebCore::PageThrottler::~PageThrottler):
(WebCore::PageThrottler::clearPage):
(WebCore::PageThrottler::throttlePage):
(WebCore::PageThrottler::unthrottlePage):
(WebCore::PageThrottler::setThrottled):
(WebCore::PageThrottler::preventThrottling):
(WebCore::PageThrottler::allowThrottling):
(WebCore::PageThrottler::stopThrottleHysteresisTimer):
(WebCore::PageThrottler::reportInterestingEvent):
(WebCore::PageThrottler::startThrottleHysteresisTimer):
(WebCore::PageThrottler::throttleHysteresisTimerFired):
* page/PageThrottler.h: Added.
(WebCore):
(PageThrottler):
(WebCore::PageThrottler::create):
(WebCore::PageThrottler::shouldThrottleAnimations):
(WebCore::PageThrottler::shouldThrottleTimers):
2013-05-29 Kent Tamura <tkent@chromium.org>
Remove leftover files for ENABLE_PAGE_POPUP and ENABLE_CALENDAR_PICKER
https://bugs.webkit.org/show_bug.cgi?id=116999
Reviewed by Anders Carlsson.
* Resources/pagepopups/colorSuggestionPicker.css: Removed.
* Resources/pagepopups/colorSuggestionPicker.js: Removed.
* Resources/pagepopups/pickerCommon.css: Removed.
* Resources/pagepopups/pickerCommon.js: Removed.
* Resources/pagepopups/suggestionPicker.css: Removed.
* Resources/pagepopups/suggestionPicker.js: Removed.
2013-05-29 Jer Noble <jer.noble@apple.com>
Unreviewed build fix; remove unintentional semicolon.
* Modules/webaudio/AudioScheduledSourceNode.cpp:
(WebCore::AudioScheduledSourceNode::finish):
2013-05-29 Anders Carlsson <andersca@apple.com>
Merge PODArea::Chunk into PODFreeListArena::FreeListChunk
https://bugs.webkit.org/show_bug.cgi?id=117000
Reviewed by Oliver Hunt.
* platform/PODArena.h:
(WebCore::PODArena::roundUp):
* platform/PODFreeListArena.h:
(PODFreeListArena):
(WebCore::PODFreeListArena::FreeListChunk::FreeListChunk):
(FreeListChunk):
(WebCore::PODFreeListArena::FreeListChunk::~FreeListChunk):
(WebCore::PODFreeListArena::FreeListChunk::allocate):
2013-05-29 Anders Carlsson <andersca@apple.com>
Move some PODArena members to PODFreeListArena
https://bugs.webkit.org/show_bug.cgi?id=116993
Reviewed by Sam Weinig.
This is more work towards merging the two classes.
* platform/PODArena.h:
(PODArena):
* platform/PODFreeListArena.h:
(PODFreeListArena):
(WebCore::PODFreeListArena::PODFreeListArena):
2013-05-29 Jer Noble <jer.noble@apple.com>
[Mac] Scrubbing long movie files results in timeline snapping back to 0 during scrub.
https://bugs.webkit.org/show_bug.cgi?id=116986
Reviewed by Eric Carlson.
Keep a count of the number of in-flight seek requests, and only issue a timeupdate
(which triggers a "seeked" event) when the final seek completes.
Test: media/video-seek-multiple.html
* platform/graphics/avfoundation/MediaPlayerPrivateAVFoundation.cpp:
(WebCore::MediaPlayerPrivateAVFoundation::seek):
(WebCore::MediaPlayerPrivateAVFoundation::seekCompleted):
* platform/graphics/avfoundation/MediaPlayerPrivateAVFoundation.h:
(MediaPlayerPrivateAVFoundation):
2013-05-29 Anders Carlsson <andersca@apple.com>
Remove unused code from PODArena
https://bugs.webkit.org/show_bug.cgi?id=116990
Reviewed by Sam Weinig.
PODArena is only used as a base class of PODFreeListArena so remove unused member functions and make all
members protected to make it impossible to use it without subclassing.
PODArena is a risky class to use since it doesn't return memory to the system unless the arena object is destroyed.
This was the reason why PODFreeListArea was added. An upcoming patch will merge PODArena with PODFreeListArena and
this is a small step towards that goal.
* platform/PODArena.h:
2013-05-29 Darin Adler <darin@apple.com>
Remove custom binding for Clipboard setDragImage function
https://bugs.webkit.org/show_bug.cgi?id=116422
Reviewed by Sam Weinig.
* bindings/js/JSClipboardCustom.cpp: Removed setDragImage binding.
* dom/Clipboard.cpp:
(WebCore::Clipboard::canSetDragImage): Added a condition that this is a drag
and drop clipboard. That used to be checked in the setDragImage binding.
(WebCore::Clipboard::setDragImage): Added a version that takes an Element
and calls through to the existing functions (in the legacy code path), or handles
both the Element and HTMLImageElement not-in-document cases (in the new code path).
* dom/Clipboard.h: Updated for changes above.
* dom/Clipboard.idl: Removed [Custom] from setDragImage.
* page/EventHandler.cpp:
(WebCore::EventHandler::handleDrag): Call the new setDragImage instead of the
old setDragImageElement.
2013-05-29 Praveen R Jadhav <praveen.j@samsung.com>
Cleanup AudioSourceNode.idl from WebKit build.
https://bugs.webkit.org/show_bug.cgi?id=116905.
Reviewed by Darin Adler.
AudioSourceNode.idl is not part of WebAudio Specifications anymore.
AudioNode is inherited directly in all the audio source nodes.
No new tests. Current test cases will cover all the scenarios.
* CMakeLists.txt:
* DerivedSources.make:
* DerivedSources.pri:
* GNUmakefile.list.am:
* Modules/webaudio/AudioBufferSourceNode.h:
* Modules/webaudio/AudioBufferSourceNode.idl:
* Modules/webaudio/AudioScheduledSourceNode.cpp:
(WebCore::AudioScheduledSourceNode::AudioScheduledSourceNode):
* Modules/webaudio/AudioScheduledSourceNode.h:
* Modules/webaudio/AudioSourceNode.h: Removed.
* Modules/webaudio/AudioSourceNode.idl: Removed.
* Modules/webaudio/MediaElementAudioSourceNode.cpp:
(WebCore::MediaElementAudioSourceNode::MediaElementAudioSourceNode):
* Modules/webaudio/MediaElementAudioSourceNode.h:
(MediaElementAudioSourceNode):
* Modules/webaudio/MediaElementAudioSourceNode.idl:
* Modules/webaudio/MediaStreamAudioDestinationNode.idl:
* Modules/webaudio/MediaStreamAudioSourceNode.cpp:
(WebCore::MediaStreamAudioSourceNode::MediaStreamAudioSourceNode):
* Modules/webaudio/MediaStreamAudioSourceNode.h:
(MediaStreamAudioSourceNode):
* Modules/webaudio/MediaStreamAudioSourceNode.idl:
* Modules/webaudio/OscillatorNode.h:
* Modules/webaudio/OscillatorNode.idl:
* Target.pri:
* WebCore.xcodeproj/project.pbxproj:
2013-05-29 Adam Barth <abarth@webkit.org>
Optimize RenderText::offsetNext for 8 bit strings
https://bugs.webkit.org/show_bug.cgi?id=116877
Reviewed by Darin Adler.
Previously, this function was always upconverting strings to 16 bits in
order to create a cursorMovementIterator. This patch adds a fast path
for ASCII and Latin-1 strings, which don't need this complicated cursor
movement logic.
I ran into this code because nextOffset showed up as a memory pig on a
memory profile of Mobile Gmail.
Test: editing/selection/move-by-character-brute-force.html
* rendering/RenderText.cpp:
(WebCore::RenderText::previousOffset):
(WebCore::RenderText::nextOffset):
2013-05-29 Brent Fulgham <bfulgham@apple.com>
[Windows] Correct copy command (form versus forms)
* WebCore.vcproj/copyForwardingHeaders.cmd:
* WebCore.vcxproj/copyForwardingHeaders.cmd:
2013-05-29 Bem Jones-Bey <bjonesbe@adobe.com>
[CSS Shapes] Fix style issues in BasicShapes
https://bugs.webkit.org/show_bug.cgi?id=116734
Reviewed by Alexandru Chiculita.
Fix indentation in BasicShapes.cpp, and change enums to respect the
style rules CamelCase instead of HAVING_UNDERSCORES.
No new tests, only style changes.
* css/BasicShapeFunctions.cpp:
(WebCore::valueForBasicShape):
(WebCore::basicShapeForValue):
* css/CSSBasicShapes.cpp:
(WebCore::buildRectangleString):
(WebCore::CSSBasicShapeRectangle::equals):
(WebCore::CSSBasicShapeCircle::equals):
(WebCore::CSSBasicShapeEllipse::equals):
(WebCore::CSSBasicShapePolygon::equals):
(WebCore::CSSBasicShapeInsetRectangle::equals):
* css/CSSBasicShapes.h:
(WebCore::CSSBasicShapeRectangle::type):
(WebCore::CSSBasicShapeInsetRectangle::type):
(WebCore::CSSBasicShapeCircle::type):
(WebCore::CSSBasicShapeEllipse::type):
(WebCore::CSSBasicShapePolygon::type):
* rendering/ExclusionShape.cpp:
(WebCore::ExclusionShape::createExclusionShape):
* rendering/ExclusionShapeInsideInfo.cpp:
(WebCore::ExclusionShapeInsideInfo::isEnabledFor):
* rendering/ExclusionShapeOutsideInfo.cpp:
(WebCore::ExclusionShapeOutsideInfo::isEnabledFor):
* rendering/style/BasicShapes.cpp:
(WebCore::BasicShape::canBlend):
(WebCore::BasicShapeRectangle::path):
(WebCore::BasicShapeCircle::path):
(WebCore::BasicShapeEllipse::path):
(WebCore::BasicShapeInsetRectangle::path):
* rendering/style/BasicShapes.h:
(WebCore::BasicShapeRectangle::type):
(WebCore::BasicShapeCircle::type):
(WebCore::BasicShapeEllipse::type):
(WebCore::BasicShapePolygon::type):
(WebCore::BasicShapeInsetRectangle::type):
2013-05-29 Otto Derek Cheung <otcheung@rim.com>
[BlackBerry] Handle Host-Only cookies
https://bugs.webkit.org/show_bug.cgi?id=116969
PR 338809
Reviewed by Rob Buis.
Internally Reviewed by Joe Mason.
Adding support for host-only cookies (cookies with no
specified domains). These cookies should only be returned
when the host matches the cookie domain exactly.
Tested using Opera and Browser cookie test suite. Tested
that host cookies are being stored in it's own map using
Web Inspector.
* platform/blackberry/CookieManager.cpp:
(WebCore::CookieManager::getRawCookies):
(WebCore::CookieManager::checkAndTreatCookie):
(WebCore::CookieManager::findOrCreateCookieMap):
* platform/blackberry/CookieParser.cpp:
(WebCore::CookieParser::CookieParser):
(WebCore::CookieParser::parseOneCookie):
* platform/blackberry/ParsedCookie.h:
(WebCore::ParsedCookie::isHostOnly):
(ParsedCookie):
2013-05-29 Ryosuke Niwa <rniwa@webkit.org>
Remove the size of DataVector in HTMLToken
https://bugs.webkit.org/show_bug.cgi?id=116931
Reviewed by Sam Weinig.
Merge https://chromium.googlesource.com/chromium/blink/+/7977721e62c471bfa17b84d82cd5d8243a4eb9a9.
Shink HTMLToken by 1.5 kB
HTMLToken has an inline vector for buffering characters during tokenization. We
originally picked the inline capacity of this buffer somewhat arbitrarily. This
CL tunes the number based on a somewhat non-scientific browse of a number of
popular web sites.
I (abarth) instrumented content_shell to log the length of each complete DataVector. I
then browsed around a variety of web sites to collect data. The 99% percentile
of DataVector lengths was just shy of 250 characters. I rounded that up to 256
because powers of two are pretty. That means we'll malloc an external buffer
less than 1% of the time, which seems fine.
* html/parser/HTMLToken.h:
(HTMLToken):
2013-05-29 Brent Fulgham <bfulgham@apple.com>
[Windows] Build correction after r150837
New 'forms' sub-folder of html needs to be included in
copy operations.
* WebCore.vcproj/copyForwardingHeaders.cmd: copy html/forms.
* WebCore.vcxproj/WebCoreTestSupport.vcxproj.filters: Use correct
'obj32' folder for build output.
* WebCore.vcxproj/copyForwardingHeaders.cmd: copy html/forms.
2013-05-29 Tiancheng Jiang <tijiang@rim.com>
[BlackBerry] Radio Button UX updates.
https://bugs.webkit.org/show_bug.cgi?id=116881
Reviewed by Rob Buis.
BlackBerry PR 342322.
Internally Reviewed by Jeff Rogers.
Change images.
* platform/blackberry/RenderThemeBlackBerry.cpp:
(WebCore::RenderThemeBlackBerry::paintRadio):
2013-05-29 Tiancheng Jiang <tijiang@rim.com>
[BlackBerry] Datetime string is not centred in form controls.
https://bugs.webkit.org/show_bug.cgi?id=100760
Reviewed by Rob Buis.
BlackBerry PR 343512
Internally Reviewed by Jeff Rogers.
Adjust margin for inner text node of datetime form controls.
* css/themeBlackBerry.css:
(input::-webkit-date-and-time-value):
2013-05-29 Brent Fulgham <bfulgham@apple.com>
[Windows] Build correction after r150876
A clean build will now fail because the BaseMultipleFieldsDateAndTimeInputType sources have
been removed, but are still referenced in the project file.
* WebCore.vcxproj/WebCore.vcxproj: Remove reference to BaseMultipleFieldsDateAndTimeInputType
* WebCore.vcxproj/WebCore.vcxproj.filters: Ditto
2013-05-28 Jer Noble <jer.noble@apple.com>
Support the 'onended' EventListener property for AudioBufferSourceNode and OscillatorNode.
https://bugs.webkit.org/show_bug.cgi?id=116798
Reviewed by Eric Carlson.
Tests: webaudio/audiobuffersource-ended.html
webaudio/oscillator-ended.html
* Modules/webaudio/AudioScheduledSourceNode.cpp:
(WebCore::AudioScheduledSourceNode::AudioScheduledSourceNode):
(WebCore::AudioScheduledSourceNode::setOnended): Set m_hasEndedListener.
(WebCore::AudioScheduledSourceNode::finish): Call notifyEndedDispatch on the main thread.
(WebCore::AudioScheduledSourceNode::notifyEndedDispatch): Call notifyEnded().
(WebCore::AudioScheduledSourceNode::notifyEnded): Call the onended event listener.
* Modules/webaudio/AudioScheduledSourceNode.h:
(WebCore::AudioScheduledSourceNode::onended): Added boilerplate.
* Modules/webaudio/AudioBufferSourceNode.idl: Added the onerror attribute.
* Modules/webaudio/OscillatorNode.idl: Ditto.
2013-05-29 Bem Jones-Bey <bjonesbe@adobe.com>
[CSS Shapes] Support parsing inset-rectangle shapes
https://bugs.webkit.org/show_bug.cgi?id=116638
Reviewed by Dean Jackson.
Add parsing for inset-rectangle. It's very similar to parsing for
rectangle.
No new tests, updated existing tests to cover this.
* css/BasicShapeFunctions.cpp:
(WebCore::valueForBasicShape): Add support for inset rectangles.
(WebCore::basicShapeForValue): Add support for inset rectangles.
* css/CSSBasicShapes.cpp:
(WebCore::buildInsetRectangleString): Create an inset-rectangle css
string.
(WebCore::CSSBasicShapeInsetRectangle::cssText): Convert inset
rectangle shape to a CSS string.
(WebCore::CSSBasicShapeInsetRectangle::equals): Compare two inset
rectangles.
(WebCore::CSSBasicShapeInsetRectangle::serializeResolvingVariables):
Create an inset rectangle string, with CSS variables resolved.
(WebCore::CSSBasicShapeInsetRectangle::hasVariableReference):
Determine if this inset rectangle has any CSS Variable references.
* css/CSSBasicShapes.h:
(CSSBasicShapeInsetRectangle): Add inset rectangle class. This is a
direct representation of the CSS property. All the methods below
are just simple getters and setters, along with a construtor and a
factory method.
(WebCore::CSSBasicShapeInsetRectangle::create):
(WebCore::CSSBasicShapeInsetRectangle::top):
(WebCore::CSSBasicShapeInsetRectangle::right):
(WebCore::CSSBasicShapeInsetRectangle::bottom):
(WebCore::CSSBasicShapeInsetRectangle::left):
(WebCore::CSSBasicShapeInsetRectangle::radiusX):
(WebCore::CSSBasicShapeInsetRectangle::radiusY):
(WebCore::CSSBasicShapeInsetRectangle::setTop):
(WebCore::CSSBasicShapeInsetRectangle::setRight):
(WebCore::CSSBasicShapeInsetRectangle::setBottom):
(WebCore::CSSBasicShapeInsetRectangle::setLeft):
(WebCore::CSSBasicShapeInsetRectangle::setRadiusX):
(WebCore::CSSBasicShapeInsetRectangle::setRadiusY):
(WebCore::CSSBasicShapeInsetRectangle::type):
(WebCore::CSSBasicShapeInsetRectangle::CSSBasicShapeInsetRectangle):
(WebCore):
* css/CSSParser.cpp:
(WebCore::CSSParser::parseBasicShapeInsetRectangle): Parse the
inset-rectangle CSS property and create a
CSSBasicShapeInsetRectangle.
(WebCore::CSSParser::parseBasicShape): Add a call to parse
inset-rectangle.
* rendering/ExclusionShapeInsideInfo.cpp:
(WebCore::ExclusionShapeInsideInfo::isEnabledFor): Disable
inset-rectangles, since only the parsing has been implemented so
far.
* rendering/ExclusionShapeOutsideInfo.cpp:
(WebCore::ExclusionShapeOutsideInfo::isEnabledFor): Disable
inset-rectangles, since only the parsing has been implemented so
far.
* rendering/style/BasicShapes.cpp:
(WebCore::BasicShapeInsetRectangle::path): Calculate the Path for an
inset-rectangle.
(WebCore::BasicShapeInsetRectangle::blend): Blend two inset rectangles
together at a point depending on the "progress" and return the
blended rectangle.
* rendering/style/BasicShapes.h:
(BasicShapeInsetRectangle): Add higher level inset rectangle class.
This is used outside of the CSS representation. The methods below
are just simple getters and setters, along with a constructor and
a factory method.
(WebCore::BasicShapeInsetRectangle::create):
(WebCore::BasicShapeInsetRectangle::top):
(WebCore::BasicShapeInsetRectangle::right):
(WebCore::BasicShapeInsetRectangle::bottom):
(WebCore::BasicShapeInsetRectangle::left):
(WebCore::BasicShapeInsetRectangle::cornerRadiusX):
(WebCore::BasicShapeInsetRectangle::cornerRadiusY):
(WebCore::BasicShapeInsetRectangle::setTop):
(WebCore::BasicShapeInsetRectangle::setRight):
(WebCore::BasicShapeInsetRectangle::setBottom):
(WebCore::BasicShapeInsetRectangle::setLeft):
(WebCore::BasicShapeInsetRectangle::setCornerRadiusX):
(WebCore::BasicShapeInsetRectangle::setCornerRadiusY):
(WebCore::BasicShapeInsetRectangle::type):
(WebCore::BasicShapeInsetRectangle::BasicShapeInsetRectangle):
2013-05-29 Andreas Kling <akling@apple.com>
Move computed style extraction out of CSSComputedStyleDeclaration.
<http://webkit.org/b/116965>
Reviewed by Antti Koivisto.
Make it possible to get computed CSSValues from a Node without creating a CSSOM
style declaration object.
The bulk of the logic moves to a new class; ComputedStyleExtractor, which can be created
on the stack, and takes the same setup variables as CSSComputedStyleDeclaration.
This is prep to enable futuristic optimizations in editing and elsewhere.
* css/CSSComputedStyleDeclaration.h:
* css/CSSComputedStyleDeclaration.cpp:
(WebCore::CSSComputedStyleDeclaration::getPropertyCSSValue):
Create a ComputedStyleExtractor to do the work!
(WebCore::ComputedStyleExtractor::currentColorOrValidColor):
(WebCore::ComputedStyleExtractor::valueForFilter):
(WebCore::ComputedStyleExtractor::ComputedStyleExtractor):
(WebCore::ComputedStyleExtractor::valueForShadow):
(WebCore::ComputedStyleExtractor::styledNode):
(WebCore::ComputedStyleExtractor::propertyValue):
(WebCore::ComputedStyleExtractor::getCSSPropertyValuesForShorthandProperties):
(WebCore::ComputedStyleExtractor::getCSSPropertyValuesForSidesShorthand):
(WebCore::ComputedStyleExtractor::getCSSPropertyValuesForGridShorthand):
(WebCore::ComputedStyleExtractor::getBackgroundShorthandValue):
* css/SVGCSSComputedStyleDeclaration.cpp:
(WebCore::ComputedStyleExtractor::adjustSVGPaintForCurrentColor):
(WebCore::ComputedStyleExtractor::svgPropertyValue):
Moved all of these from CSSComputedStyleDeclaration to the new class.
* rendering/style/RenderStyle.h:
* svg/SVGPaint.h:
Have these two befriend ComputedStyleExtractor.
2013-05-29 Antti Koivisto <antti@apple.com>
Another attempt to fix windows build.
Not reviewed.
* css/CSSFontSelector.h:
2013-05-29 Antti Koivisto <antti@apple.com>
Try to fix window build.
Not reviewed.
* platform/graphics/FontCache.h:
(WebCore::FontDescriptionFontDataCacheKey::computeHash):
2013-05-29 Simon Fraser <simon.fraser@apple.com>
Fix the firing of m_paintRelatedMilestonesTimer
https://bugs.webkit.org/show_bug.cgi?id=116919
Reviewed by Tim Horton.
r150671 intended to change things so that paint-related milestones
only fire when painting has actually happened, so that WebKit clients
are notified when we actually have bits to present.
However, it made an incorrect assumption that painting would happen
inside of flushCompositingState(). This is not the case; flushCompositingState()
will just dirty CALayers, and later on Core Animation will ask us to paint them.
This incorrect assumption meant that we would never start the
m_paintRelatedMilestonesTimer, so never fire the milestones.
Fix by starting the m_paintRelatedMilestonesTimer via the RenderLayerBacking
paintContents call back. At this time we know we're painting, so we can both
set the FrameView's last paint time, and start up the timer. We also only
want to start the timer if there are pending milestones.
* rendering/RenderLayerBacking.cpp:
(WebCore::RenderLayerBacking::paintIntoLayer):
(WebCore::RenderLayerBacking::paintContents):
* rendering/RenderLayerCompositor.cpp:
(WebCore::RenderLayerCompositor::flushPendingLayerChanges):
(WebCore::RenderLayerCompositor::didPaintBacking):
* rendering/RenderLayerCompositor.h:
(RenderLayerCompositor):
2013-05-29 Antti Koivisto <antti@apple.com>
Share FontGlyphs
https://bugs.webkit.org/show_bug.cgi?id=116863
Reviewed by Anreas Kling.
Style system generates many Font objects that are identical or similar enough to have identical FontGlyphs.
We can figure out that the FontGlyphs are going to be the same and share them. This reduces memory usage.
It also improves performance as the glyph cache and the width cache hang from FontGlyphs and their hit rate
increases.
On PLT3 this takes the number of live FontGlyphs at the end from 40k+ to <1k. Width cache hit rate improves
from ~42% to ~55%.
* css/CSSFontSelector.cpp:
(WebCore::CSSFontSelector::CSSFontSelector):
Add unique id we can use in cache key.
(WebCore::CSSFontSelector::dispatchInvalidationCallbacks):
Bump the version number on invalidation so we don't reuse cache entries after web font is loaded.
(WebCore::CSSFontSelector::resolvesFamilyFor):
Test if FontSelector is needed for resolving a particular FontDescription.
* css/CSSFontSelector.h:
* page/Settings.cpp:
(WebCore::setGenericFontFamilyMap):
Invalidate the cache if standard font settings change.
* platform/graphics/Font.cpp:
(FontGlyphsCacheKey):
(FontGlyphsCacheEntry):
(WebCore::operator==):
(WebCore::fontGlyphsCache):
(WebCore::invalidateFontGlyphsCache):
(WebCore::makeFontSelectorFlags):
(WebCore::makeFontGlyphsCacheKey):
The cache key consists of
- all families.
- shared key with the lower level FontData cache (FontCache), guaranteeing FontDatas would be identical.
- font selector specific keys.
These guarantee the FontData will be identical.
(WebCore::computeFontGlyphsCacheHash):
(WebCore::pruneUnreferencedFromFontGlyphsCache):
Don't accumulate unused entries.
(WebCore::retrieveOrAddCachedFontGlyphs):
(WebCore::Font::update):
* platform/graphics/Font.h:
* platform/graphics/FontCache.cpp:
(WebCore::FontPlatformDataCacheKey::FontPlatformDataCacheKey):
(WebCore::FontPlatformDataCacheKey::isHashTableDeletedValue):
(WebCore::FontPlatformDataCacheKey::operator==):
(FontPlatformDataCacheKey):
(WebCore::computeHash):
(WebCore::FontCache::getCachedFontPlatformData):
(WebCore::FontCache::purgeInactiveFontData):
(WebCore::FontCache::invalidate):
* platform/graphics/FontCache.h:
(WebCore::FontDescriptionFontDataCacheKey::FontDescriptionFontDataCacheKey):
(WebCore::FontDescriptionFontDataCacheKey::makeFlagKey):
(WebCore::FontDescriptionFontDataCacheKey::operator==):
(WebCore::FontDescriptionFontDataCacheKey::operator!=):
(WebCore::FontDescriptionFontDataCacheKey::computeHash):
Separate part of the key for sharing.
(FontDescriptionFontDataCacheKey):
* platform/graphics/FontFallbackList.cpp:
(WebCore::FontGlyphs::FontGlyphs):
(WebCore::FontGlyphs::releaseFontData):
* platform/graphics/FontFallbackList.h:
(WebCore::FontGlyphs::create):
(WebCore::FontGlyphs::~FontGlyphs):
Remove invalidate(). If FontGlyphs needs invalidation it is reconstructed.
* platform/graphics/FontSelector.h:
2013-05-29 Nico Weber <thakis@chromium.org>
Remove unused file PlatformGestureEvent.cpp
https://bugs.webkit.org/show_bug.cgi?id=116894
Reviewed by Darin Adler.
This was added in https://bugs.webkit.org/show_bug.cgi?id=49345 but
not removed in https://bugs.webkit.org/show_bug.cgi?id=77492 which
removed most of that code again.
* platform/PlatformGestureRecognizer.cpp: Removed.
2013-05-29 Víctor Manuel Jáquez Leal <vjaquez@igalia.com>
[texmap][GStreamer][GTK] Composited Video support
https://bugs.webkit.org/show_bug.cgi?id=86410
Reviewed by Noam Rosenthal.
Enable the video accelerated compositing using the WebKit's
TextureMapper.
This patch does not use hardware accelerated video decoding. It
provides a generic path for system memory buffers.
This new functionality is only available when the coordinated graphics
system is not used.
No new tests, already covered by existing tests.
* platform/graphics/gstreamer/MediaPlayerPrivateGStreamerBase.cpp:
(WebCore::MediaPlayerPrivateGStreamerBase::MediaPlayerPrivateGStreamerBase):
(WebCore):
(WebCore::MediaPlayerPrivateGStreamerBase::updateTexture): update the
texture content with the new received video buffer.
(WebCore::MediaPlayerPrivateGStreamerBase::triggerRepaint): choose to
use the accelerated compositing or the normal code path
(WebCore::MediaPlayerPrivateGStreamerBase::paint): if accelerated
compositing is used this method is halted.
(WebCore::MediaPlayerPrivateGStreamerBase::paintToTextureMapper): get
a texture from the pool and draws it if it is already available.
* platform/graphics/gstreamer/MediaPlayerPrivateGStreamerBase.h:
(MediaPlayerPrivateGStreamerBase):
(WebCore::MediaPlayerPrivateGStreamerBase::platformLayer): returns itself
(WebCore::MediaPlayerPrivateGStreamerBase::supportsAcceleratedRendering):
returns true
2013-05-29 Peter Gal <galpeter@inf.u-szeged.hu>
[Qt] Missing files from build after r150853
https://bugs.webkit.org/show_bug.cgi?id=116932
Reviewed by Csaba Osztrogonác.
* Target.pri: Added missing include path.
2013-05-29 Mihai Maerean <mmaerean@adobe.com>
[CSS Regions] Content that has overflow: scroll cannot be scrolled by dragging the scroll thumbs with the mouse
https://bugs.webkit.org/show_bug.cgi?id=113703
Reviewed by Darin Adler.
The point inside a box that's inside a region has its coordinates relative to the region, not the FlowThread
that is its container in the RenderObject tree.
Previously, the coordinates were computed relatively to the FlowThread which doesn't really have a location in
the page.
Tests: fast/regions/drag-scrollbars-of-content.html
fast/regions/hover-in-second-region.html
* rendering/RenderBox.cpp:
(WebCore::RenderBox::offsetFromContainer):
* rendering/RenderBoxModelObject.cpp:
(WebCore::RenderBoxModelObject::mapAbsoluteToLocalPoint):
2013-05-29 Andreas Kling <akling@apple.com>
Fix dumb typo in r150879.
* editing/htmlediting.cpp:
(WebCore::nextLeafNode):
2013-05-29 Andreas Kling <akling@apple.com>
Move leaf Node traversal helpers to htmlediting.cpp
<http://webkit.org/b/116940>
Reviewed by Antti Koivisto.
Move Node::previousLeafNode() and Node::nextLeafNode() to htmlediting.cpp along with their helpers.
Fixes an 8-year old FIXME. \o/
* dom/Node.h:
* dom/Node.cpp:
* dom/Position.cpp:
(WebCore::nextRenderedEditable):
(WebCore::previousRenderedEditable):
* editing/VisibleUnits.cpp:
(WebCore::previousLeafWithSameEditability):
(WebCore::nextLeafWithSameEditability):
* editing/htmlediting.h:
* editing/htmlediting.cpp:
(WebCore::previousNodeConsideringAtomicNodes):
(WebCore::nextNodeConsideringAtomicNodes):
(WebCore::previousLeafNode):
(WebCore::nextLeafNode):
2013-05-29 Peter Gal <galpeter@inf.u-szeged.hu>
[Qt] Missing files from build after r150853
https://bugs.webkit.org/show_bug.cgi?id=116932
Reviewed by Csaba Osztrogonác.
* Target.pri: Added the CFURLExtras.{cpp,h} files to the projectfile.
2013-05-29 Ryosuke Niwa <rniwa@webkit.org>
PresentationAttributeCacheCleaner::m_hitCount is never initialized
https://bugs.webkit.org/show_bug.cgi?id=116946
Reviewed by Andreas Kling.
Merge https://chromium.googlesource.com/chromium/blink/+/70be7ddc41141ef6dec7795d37842c27dab2e194.
* dom/StyledElement.cpp:
(WebCore::PresentationAttributeCacheCleaner::PresentationAttributeCacheCleaner):
2013-05-29 Kent Tamura <tkent@chromium.org>
Remove ENABLE_INPUT_MULTIPLE_FIELDS_UI.
https://bugs.webkit.org/show_bug.cgi?id=116796
Reviewed by Ryosuke Niwa.
This feature was used only by Chromium port.
* CMakeLists.txt:
* GNUmakefile.list.am:
* Target.pri:
* WebCore.vcproj/WebCore.vcproj:
* WebCore.vcxproj/WebCore.vcxproj:
* WebCore.vcxproj/WebCore.vcxproj.filters:
* WebCore.xcodeproj/project.pbxproj:
* css/html.css:
(input::-webkit-date-and-time-value):
* dom/Element.cpp:
* dom/Element.h:
* html/BaseChooserOnlyDateAndTimeInputType.cpp:
* html/BaseChooserOnlyDateAndTimeInputType.h:
* html/BaseMultipleFieldsDateAndTimeInputType.cpp: Removed.
* html/BaseMultipleFieldsDateAndTimeInputType.h: Removed.
* html/DateInputType.cpp:
* html/DateInputType.h:
(DateInputType):
* html/DateTimeFieldsState.cpp: Removed.
* html/DateTimeFieldsState.h: Removed.
* html/DateTimeInputType.cpp:
* html/DateTimeInputType.h:
(DateTimeInputType):
* html/DateTimeLocalInputType.cpp:
* html/DateTimeLocalInputType.h:
(DateTimeLocalInputType):
* html/HTMLInputElement.cpp:
(WebCore::HTMLInputElement::HTMLInputElement):
(WebCore):
* html/HTMLInputElement.h:
(HTMLInputElement):
* html/InputType.cpp:
* html/InputType.h:
(InputType):
* html/MonthInputType.cpp:
* html/MonthInputType.h:
(MonthInputType):
* html/TimeInputType.cpp:
* html/TimeInputType.h:
(TimeInputType):
* html/WeekInputType.cpp:
* html/WeekInputType.h:
(WeekInputType):
* html/shadow/ClearButtonElement.cpp: Removed.
* html/shadow/ClearButtonElement.h: Removed.
* html/shadow/DateTimeEditElement.cpp: Removed.
* html/shadow/DateTimeEditElement.h: Removed.
* html/shadow/DateTimeFieldElement.cpp: Removed.
* html/shadow/DateTimeFieldElement.h: Removed.
* html/shadow/DateTimeFieldElements.cpp: Removed.
* html/shadow/DateTimeFieldElements.h: Removed.
* html/shadow/DateTimeNumericFieldElement.cpp: Removed.
* html/shadow/DateTimeNumericFieldElement.h: Removed.
* html/shadow/DateTimeSymbolicFieldElement.cpp: Removed.
* html/shadow/DateTimeSymbolicFieldElement.h: Removed.
* html/shadow/PickerIndicatorElement.cpp: Removed.
* html/shadow/PickerIndicatorElement.h: Removed.
* page/ChromeClient.h:
(ChromeClient):
* platform/LocalizedStrings.h:
(WebCore):
* platform/text/PlatformLocale.cpp:
* platform/text/PlatformLocale.h:
(Locale):
* rendering/RenderDetailsMarker.cpp:
* rendering/RenderDetailsMarker.h:
* rendering/RenderObject.h:
(RenderObject):
2013-05-29 Ryosuke Niwa <rniwa@webkit.org>
Remove setFullScreenRendererSize and setFullScreenRendererBackgroundColor
https://bugs.webkit.org/show_bug.cgi?id=116914
Reviewed by Benjamin Poulain.
Merge https://chromium.googlesource.com/chromium/blink/+/508eb21a07f69ed38b9be9ff92fe75dcb907861f
* dom/Document.cpp:
* dom/Document.h:
2013-05-29 Ryosuke Niwa <rniwa@webkit.org>
Make WidgetHierarchyUpdatesSuspensionScope use swap instead of copy
https://bugs.webkit.org/show_bug.cgi?id=116927
Reviewed by Andreas Kling.
Merge https://chromium.googlesource.com/chromium/blink/+/1d577e1fd5c5716a06e4007e04fc3d9d0a88f5e4
This is equivalent behavior code that is unambiguously better performance. swap is O(1) time and memory,
copying a hash table is at least linear with the number of elements.
* rendering/RenderWidget.cpp:
(WebCore::WidgetHierarchyUpdatesSuspensionScope::moveWidgets):
2013-05-29 Andreas Kling <akling@apple.com>
Remove Document::nodeAbsIndex() and Document::nodeWithAbsIndex().
Rubber-stamped by Antti "Lucky" Koivisto.
* dom/Document.h:
* dom/Document.cpp:
2013-05-28 Andreas Kling <akling@apple.com>
FocusController should operate on Elements internally.
<http://webkit.org/b/116781>
Reviewed by Antti Koivisto.
Switch from Node* to Element* as much as possible inside FocusController.
Mostly mechanical, gets rid of some unnecessary isElementNode() checks and casts.
* page/FocusController.h:
* page/FocusController.cpp:
(WebCore::dispatchEventsOnWindowAndFocusedElement):
(WebCore::isNonFocusableShadowHost):
(WebCore::adjustedTabIndex):
(WebCore::shouldVisit):
(WebCore::FocusController::setFocused):
(WebCore::FocusController::findFocusableElementDescendingDownIntoFrameDocument):
(WebCore::FocusController::advanceFocusInDocumentOrder):
(WebCore::FocusController::findFocusableElementAcrossFocusScope):
(WebCore::FocusController::findFocusableElementRecursively):
(WebCore::FocusController::findFocusableElement):
(WebCore::FocusController::nextFocusableElement):
(WebCore::FocusController::previousFocusableElement):
(WebCore::FocusController::setActive):
2013-05-29 Radu Stavila <stavila@adobe.com>
[CSS Regions] Mouse over an element does not trigger :hover state for parent when the element is flowed in a region
https://bugs.webkit.org/show_bug.cgi?id=111749
Reviewed by Antti Koivisto.
When searching for the hover ancestor and encountering a named flow thread,
the search will continue with the DOM ancestor of the top-most element
in the named flow thread.
Tests: fast/regions/hover-in-region-grandparent.html
fast/regions/hover-in-region-parent-skip.html
fast/regions/hover-in-region-parent-skip-inlines-anonymous.html
fast/regions/hover-on-child-in-region.html
fast/regions/hover-on-child-in-region-in-region.html
* rendering/RenderObject.cpp:
(WebCore::RenderObject::hoverAncestor):
* rendering/RenderObject.h:
2013-05-28 Nate Chapin <japhet@chromium.org>
Crash in WebCore::SubresourceLoader::releaseResources when connection fails
https://bugs.webkit.org/show_bug.cgi?id=87743
Don't do anything complicated in SubresourceLoader::releaseResources(),
just clear variables. With this patch, releaseResources() will still
assert in debug builds if it is called twice, but it will safely execute
in release.
Reviewed by Darin Adler.
* loader/ResourceLoader.cpp:
(WebCore::ResourceLoader::cleanupForError): Pull shared cleanup code out of didFail()
and cancel() into a helper.
(WebCore::ResourceLoader::cancel): Merge a couple variables into an enum, check for
reentrancy from within didCancel().
* loader/ResourceLoader.h: Replace m_calledWillCancel and m_cancelled with an enum.
* loader/SubresourceLoader.cpp:
(WebCore::SubresourceLoader::didFinishLoading): Don't call ResourceLoader::didFinishLoading(),
put finish() in the middle of the process.
(WebCore::SubresourceLoader::didFail): Don't call ResourceLoader::didFail(), put finish()
in the middle of the process.
(WebCore::SubresourceLoader::didCancel):
(WebCore::SubresourceLoader::notifyDone): Do the non-trivial work previous done in releaseResources(),
most importantly calling loadDone().
(WebCore::SubresourceLoader::releaseResources): Only do simple variable clearing here.
* loader/SubresourceLoader.h:
(SubresourceLoader):
* loader/cache/CachedResource.cpp: Split stopLoading() into cancelLoad() (which notifies clients)
and clearLoader() (which just nulls m_loader).
* loader/cache/CachedResource.h:
* loader/chromium/ResourceLoaderChromium.cpp:
2013-05-28 Seokju Kwon <seokju.kwon@gmail.com>
[GTK] Build fix after r150837
https://bugs.webkit.org/show_bug.cgi?id=116904
Unreviewed build fix.
* GNUmakefile.am:
2013-05-28 Andy Estes <aestes@apple.com>
REGRESSION (r150169): Images from file: URLs display after a delay even though they were preloaded by JavaScript
https://bugs.webkit.org/show_bug.cgi?id=116906
<rdar://problem/13991927>
Reviewed by Andreas Kling.
Writing a test for this is blocked on https://webkit.org/b/116199.
Some WebKit clients use JavaScript to preload images from disk so that
subsequent loads will display immediately from the memory cache. By not
caching non-HTTP sub-resources in memory, we break this common pattern.
This change restricts r150169 to only apply to cached main resources.
Sub-resources will again be cached indefinitely as they were prior to
r150169.
* loader/cache/CachedResource.cpp:
(WebCore::CachedResource::freshnessLifetime): If this is a non-HTTP
main resource from a scheme that should not be cached indefinitely,
return 0 for the freshness lifetime. For other non-HTTP cached
resources, return an indefinite freshness lifetime.
2013-05-28 Dean Jackson <dino@apple.com>
Animations do not restart after exiting page cache
https://bugs.webkit.org/show_bug.cgi?id=116900
Reviewed by Tim Horton.
Animations are suspended as they enter the page cache, but
were not getting correctly resumed when exiting. The cause
was an error in r149576 which was checking a global flag for suspension
on the AnimationController and thus not trying to resume anything.
Test: animations/resume-after-page-cache.html
* page/animation/AnimationController.cpp:
(WebCore::AnimationControllerPrivate::suspendAnimationsForDocument):
(WebCore::AnimationControllerPrivate::resumeAnimationsForDocument):
2013-05-28 Chris Rogers <crogers@google.com>
Support multiple HRTFDatabases for different sample-rates
https://bugs.webkit.org/show_bug.cgi?id=116183
Reviewed by Kenneth Russell.
Adapted from Blink:
https://codereview.chromium.org/14636011/
This removes the limitation which required OfflineAudioContexts to be created at native sample-rate
* Modules/webaudio/AudioContext.h:
(WebCore::AudioContext::hrtfDatabaseLoader):
(AudioContext):
* Modules/webaudio/OfflineAudioContext.cpp:
(WebCore::OfflineAudioContext::create):
* Modules/webaudio/OfflineAudioDestinationNode.cpp:
(WebCore::OfflineAudioDestinationNode::offlineRender):
* Modules/webaudio/PannerNode.cpp:
(WebCore::PannerNode::initialize):
(WebCore::PannerNode::setPanningModel):
* platform/audio/HRTFDatabaseLoader.cpp:
(WebCore):
(WebCore::HRTFDatabaseLoader::createAndLoadAsynchronouslyIfNecessary):
(WebCore::HRTFDatabaseLoader::~HRTFDatabaseLoader):
* platform/audio/HRTFDatabaseLoader.h:
(HRTFDatabaseLoader):
(WebCore::HRTFDatabaseLoader::loaderMap):
* platform/audio/HRTFPanner.cpp:
(WebCore::HRTFPanner::HRTFPanner):
(WebCore::HRTFPanner::calculateDesiredAzimuthIndexAndBlend):
(WebCore::HRTFPanner::pan):
* platform/audio/HRTFPanner.h:
(HRTFPanner):
* platform/audio/Panner.cpp:
(WebCore::Panner::create):
* platform/audio/Panner.h:
(WebCore):
2013-05-28 Alexey Proskuryakov <ap@apple.com>
Windows build fix.
* platform/cf/KURLCFNet.cpp:
(WebCore::KURL::createCFURL):
2013-05-28 Alexey Proskuryakov <ap@apple.com>
Freeze when loading a particular page on washingtonpost.com with NetworkProcess enabled
https://bugs.webkit.org/show_bug.cgi?id=116887
<rdar://problem/12965959>
Reviewed by Darin Adler.
Test: http/tests/uri/curly-braces-escaping.html
The issue was that WebKit used an incorrect accessor to get a string out of CFURL,
unlike WebCore.
Centralized code for converting between CFURLs and strings in a place that WebKit
can use directly.
* WebCore.exp.in:
* WebCore.vcproj/WebCore.vcproj:
* WebCore.vcxproj/WebCore.vcxproj:
* WebCore.vcxproj/WebCore.vcxproj.filters:
* WebCore.xcodeproj/project.pbxproj:
Keeping things building.
* platform/KURL.cpp: (WebCore::KURL::copyToBuffer):
* platform/KURL.h:
Updated for a new typedef name. The code was using Vector<char, 512> and CharBuffer
inconsistently, and now URLs use URLCharBuffer.
* platform/cf/CFURLExtras.cpp: Added.
(WebCore::createCFURLFromBuffer):
(WebCore::getURLBytes):
* platform/cf/CFURLExtras.h: Added.
* platform/cf/KURLCFNet.cpp:
(WebCore::KURL::KURL):
(WebCore::KURL::createCFURL):
Extracted code for CFURL string manipulation that is not logcally part of KURL.
* platform/mac/KURLMac.mm:
(WebCore::KURL::KURL): Use the new getURLBytes function.
(WebCore::KURL::operator NSURL *): Added a comment.
(WebCore::KURL::createCFURL): Added a comment, and updated for new names and
signatures.
* platform/network/cf/ResourceErrorCF.cpp: (WebCore::ResourceError::platformLazyInit):
Added a FIXME. We are still using CFURLGetString here. The difficulty is getting
encodings right.
2013-05-28 Anders Carlsson <andersca@apple.com>
Create a html/forms subdirectory and move FileIconLoader there
https://bugs.webkit.org/show_bug.cgi?id=116880
Reviewed by Jessie Berlin.
A lot (if not the majority) of files in html/ are forms related, so it makes sense to begin splitting
them out into a separate subdirectory, html/forms.
Begin my moving FileIconLoader from platform to html/forms. It is related to HTML forms (it's only used by
the file upload element), and is not really a platform abstraction so it doesn't belong in platform.
* CMakeLists.txt:
* GNUmakefile.list.am:
* Target.pri:
* WebCore.vcproj/WebCore.vcproj:
* WebCore.vcxproj/WebCore.vcxproj:
* WebCore.vcxproj/WebCore.vcxproj.filters:
* WebCore.xcodeproj/project.pbxproj:
* html/forms/FileIconLoader.cpp: Renamed from Source/WebCore/platform/FileIconLoader.cpp.
* html/forms/FileIconLoader.h: Renamed from Source/WebCore/platform/FileIconLoader.h.
2013-05-28 Chris Fleizach <cfleizach@apple.com>
AX: WKView is unable to set AXFocused to YES and does not handle keyboard events as expected
https://bugs.webkit.org/show_bug.cgi?id=116756
Reviewed by Tim Horton.
If AXFocused is set to true, but the WebView is not the first responder, then the call will
not do anything. This change asks the Chrome to make the WebView the first responder before
trying to set focus within the page.
Was not able to make a test, it requires on interplay between areas outside the web view.
* accessibility/mac/WebAccessibilityObjectWrapperMac.mm:
(-[WebAccessibilityObjectWrapper accessibilitySetValue:forAttribute:]):
2013-05-28 Jer Noble <jer.noble@apple.com>
Crash in DumpRenderTree at com.apple.WebCore: WebCore::RenderTextTrackCue::repositionGenericCue + 154
https://bugs.webkit.org/show_bug.cgi?id=116882
Reviewed by Eric Carlson.
Remove an inappropriate assert. No cues coming through repositionGenericCue will be WebVTT ones.
* rendering/RenderTextTrackCue.cpp:
(WebCore::RenderTextTrackCue::repositionGenericCue):
2013-05-28 Alberto Garcia <agarcia@igalia.com>
[BlackBerry] GraphicsContext: add missing definitions.
https://bugs.webkit.org/show_bug.cgi?id=115515
Reviewed by Rob Buis.
* platform/graphics/GraphicsContext.h:
(Graphics):
Add definition for PlatformGraphicsContext.
* platform/graphics/blackberry/GraphicsContextBlackBerry.cpp:
Include RoundedRect.h
2013-05-28 Arvid Nilsson <anilsson@rim.com>
[BlackBerry] Fix style issues in BlackBerry accelerated compositing backend
https://bugs.webkit.org/show_bug.cgi?id=116604
Reviewed by Carlos Garcia Campos.
PR 273550, 99638
Remove the "get" prefix from getters in the WebKit- and compositing-
thread layer classes, as well as LayerRendererSurface. Clarify which
geometry-related getters return normalized device coordinates by adding
a comment.
Also remove dead code related to LayerData::m_holePunchClipRect, which
was part of an eventually disabled fix for video clipping in iframes,
PR 99638. Since we now use AC layers for iframes, the bug is no longer
reproducible, and the dead code will never need to be enabled again.
No change in behavior, no new tests.
* platform/graphics/blackberry/EGLImageLayerCompositingThreadClient.cpp:
(WebCore::EGLImageLayerCompositingThreadClient::drawTextures):
* platform/graphics/blackberry/LayerCompositingThread.cpp:
(WebCore::LayerCompositingThread::setDrawTransform):
(WebCore::LayerCompositingThread::transformedHolePunchRect):
(WebCore::LayerCompositingThread::drawTextures):
(WebCore::LayerCompositingThread::drawSurface):
* platform/graphics/blackberry/LayerCompositingThread.h:
(WebCore::LayerCompositingThread::sublayers): Removed "get" prefix
(LayerCompositingThread):
(WebCore::LayerCompositingThread::boundingBox): Renamed from "getDrawRect"
(WebCore::LayerCompositingThread::transformedBounds): Removed "get" prefix
(WebCore::LayerCompositingThread::transformedHolePunchRect): Removed "get" prefix
* platform/graphics/blackberry/LayerData.h:
(LayerData): Removed unused data member "m_holePunchClipRect"
* platform/graphics/blackberry/LayerFilterRenderer.cpp:
(WebCore::LayerFilterRenderer::applyActions):
* platform/graphics/blackberry/LayerRenderer.cpp:
(WebCore::LayerRenderer::compositeLayers):
(WebCore::LayerRenderer::drawDebugBorder):
(WebCore::LayerRenderer::drawHolePunchRect):
(WebCore::LayerRenderer::prepareFrameRecursive):
(WebCore::LayerRenderer::updateLayersRecursive):
(WebCore::collect3DPreservingLayers):
(WebCore::LayerRenderer::compositeLayersRecursive):
* platform/graphics/blackberry/LayerRendererSurface.cpp:
(WebCore::LayerRendererSurface::boundingBox):
* platform/graphics/blackberry/LayerRendererSurface.h:
(WebCore::LayerRendererSurface::boundingBox): Renamed from "drawRect" because that sounds like a verb, and this is a getter
* platform/graphics/blackberry/LayerWebKitThread.h:
(WebCore::LayerWebKitThread::sublayers): Removed "get" prefix
* platform/graphics/blackberry/VideoLayerWebKitThread.cpp:
(WebCore::VideoLayerWebKitThread::setHolePunchRect):
(WebCore::VideoLayerWebKitThread::boundsChanged):
2013-05-28 Jer Noble <jer.noble@apple.com>
Made AudioNode an EventTarget
https://bugs.webkit.org/show_bug.cgi?id=116871
Merge: https://chromium.googlesource.com/chromium/blink/+/ef37484162ddb95d677dcfdcdd778ec60590928b
Reviewed by Darin Adler.
Tests: webaudio/audionode-expected.txt:
webaudio/audionode.html:
Add the requisite boilerplate to allow AudioNode to become an EventTarget. Remove
all that same boilerplate from ScriptProcessorNode now that it's base class
is an EventTarget.
* Modules/webaudio/AudioNode.cpp:
(WebCore::AudioNode::interfaceName): Added boilerplate.
(WebCore::AudioNode::scriptExecutionContext): Return the AudioContext's context.
(WebCore::AudioNode::processIfNecessary): Whitespace.
* Modules/webaudio/AudioNode.h:
* Modules/webaudio/AudioNode.idl: Make AudioNode an EventTarget.
* Modules/webaudio/ScriptProcessorNode.cpp: Remove EventTarget boilerplate.
* Modules/webaudio/ScriptProcessorNode.h: Ditto.
* Modules/webaudio/ScriptProcessorNode.idl: Ditto.
* dom/EventTarget.h: Mark AudioNode as an EventTarget.
* dom/EventTargetFactory.in: Ditto.
2013-05-28 Arvid Nilsson <anilsson@rim.com>
[BlackBerry] backface-visibility: hidden doesn't work properly with masks and filters
https://bugs.webkit.org/show_bug.cgi?id=116616
Reviewed by Carlos Garcia Campos.
The BlackBerry::Platform::Graphics::GraphicsContext generates geometry
with a different winding order than the accelerated compositing backend
of the BlackBerry port. So, when we switched from Skia to this new
rendering engine, we switched from glFrontFace(GL_CCW) to
glFrontFace(GL_CW), and all was well when drawing display lists.
However, we forgot to update the winding order of geometry generated
within the accelerated compositing backend, which is used for masks and
filters, so they were getting erroneously culled out when
backface-visibility: hidden was applied to them. Fixed by switching the
winding order of all geometry generated up here, which has the added
benefit of enabling us to use TransformationMatrix::mapQuad instead of
transforming point-by-point.
To further complicate matters, a right-side up transform is used when
drawing layers into surfaces, reversing the winding order and requiring
us to switch back to glFrontFace(GL_CCW) temporarily, when drawing
layers to surfaces, or the layers will get culled out inside the
surface.
Also fix spelling error, "drawed" should be "drawn".
No new tests, this is only detectable by pixel tests, which the
BlackBerry port currently doesn't support.
PR 341945.
* platform/graphics/blackberry/EGLImageLayerCompositingThreadClient.cpp:
(WebCore::EGLImageLayerCompositingThreadClient::drawTextures):
* platform/graphics/blackberry/LayerCompositingThread.cpp:
(WebCore::LayerCompositingThread::setDrawTransform):
(WebCore::getTransformedRect):
(WebCore::LayerCompositingThread::drawTextures):
(WebCore::LayerCompositingThread::drawSurface):
* platform/graphics/blackberry/LayerCompositingThread.h:
(LayerCompositingThread):
(WebCore::LayerCompositingThread::origin):
* platform/graphics/blackberry/LayerFilterRenderer.cpp:
(WebCore):
* platform/graphics/blackberry/LayerRenderer.cpp:
(WebCore::LayerRenderer::compositeLayers):
(WebCore):
(WebCore::LayerRenderer::drawLayersOnSurfaces):
* platform/graphics/blackberry/LayerRendererSurface.cpp:
(WebCore::LayerRendererSurface::drawRect):
(WebCore::LayerRendererSurface::transformedBounds):
* platform/graphics/blackberry/LayerRendererSurface.h:
(WebCore::LayerRendererSurface::origin):
(LayerRendererSurface):
* platform/graphics/blackberry/MediaPlayerPrivateBlackBerry.cpp:
(WebCore):
(WebCore::loadBufferingImageData):
(WebCore::MediaPlayerPrivate::drawBufferingAnimation):
2013-05-28 Andreas Kling <akling@apple.com>
Move Node::dispatchChangeEvent() to HTMLFormControlElement.
<http://webkit.org/b/116866>
Reviewed by Anders Carlsson.
...and devirtualize it, since it had no overrides.
* dom/Node.h:
* dom/Node.cpp:
* html/HTMLFormControlElement.h:
* html/HTMLFormControlElement.cpp:
(WebCore::HTMLFormControlElement::dispatchChangeEvent):
(WebCore::HTMLFormControlElement::dispatchFormControlChangeEvent):
* html/FileInputType.cpp:
(WebCore::FileInputType::setFiles):
* html/HTMLTextFormControlElement.cpp:
(WebCore::HTMLTextFormControlElement::dispatchFormControlChangeEvent):
2013-05-28 Sergio Villar Senin <svillar@igalia.com>
Refactoring CSS grammar
https://bugs.webkit.org/show_bug.cgi?id=116679
Reviewed by Andreas Kling.
From Blink r149948 by <serya@chromium.org>
Added "closing_parenthesis:" and "error_recovery:" to avoid code
duplication in a couple of error recovery rules. Some other rules
were also refactored which allows to reduce the the number of
shift/reduce conflicts by 2.
No new tests required as this is just a refactoring, no new
functionality added.
* css/CSSGrammar.y.in:
2013-05-28 Sergio Villar Senin <svillar@igalia.com>
Invalid block doesn't make declaration invalid
https://bugs.webkit.org/show_bug.cgi?id=115709
Reviewed by Andreas Kling.
From Blink r149446 by <serya@chromium.org>
Added a new rule "declaration_recovery:" which covers any kind of
"invalid_block_list maybe_space" sequence. By appending this new
rule to every rule reductable to "declaration:" we can remove some
redundant rules and improve error recovery of some others that
were only accepting exactly one error.
One of the rules being removed was preventing invalid blocks in a
declaration to invalidate the whole declaration. The rule was
reporting the syntax error but at the same time accepting the
invalid block as part of a valid declaration.
* css/CSSGrammar.y.in:
2013-05-28 Andreas Kling <akling@apple.com>
Move dispatching of focus-related events from Node to Element.
<http://webkit.org/b/116864>
Reviewed by Antti Koivisto.
...and pass around pointers to Element instead of Node.
* dom/Node.cpp:
* dom/Node.h:
* dom/Element.h:
* dom/Element.cpp:
(WebCore::Element::dispatchFocusInEvent):
(WebCore::Element::dispatchFocusOutEvent):
(WebCore::Element::dispatchFocusEvent):
(WebCore::Element::dispatchBlurEvent):
Moved here from Node.
* html/HTMLFormControlElement.h:
* html/HTMLFormControlElement.cpp:
(WebCore::HTMLFormControlElement::dispatchBlurEvent):
* html/HTMLSelectElement.h:
* html/HTMLSelectElement.cpp:
(WebCore::HTMLSelectElement::dispatchFocusEvent):
(WebCore::HTMLSelectElement::dispatchBlurEvent):
* html/HTMLTextFormControlElement.h:
* html/HTMLTextFormControlElement.cpp:
(WebCore::HTMLTextFormControlElement::dispatchFocusEvent):
(WebCore::HTMLTextFormControlElement::dispatchBlurEvent):
Update subclass overrides and sprinkle OVERRIDE/FINAL.
2013-05-28 Zan Dobersek <zdobersek@igalia.com>
Remove CachedResourceRequest::initiatorElement
https://bugs.webkit.org/show_bug.cgi?id=116862
Reviewed by Andreas Kling.
The CachedResourceRequest::initiatorElement method is not used anywhere and should be removed.
* loader/cache/CachedResourceRequest.cpp: Remove the initiatorElement method definition.
* loader/cache/CachedResourceRequest.h:
(CachedResourceRequest): Remove the initiatorElement method declaration.
2013-05-28 Andreas Kling <akling@apple.com>
Document::setFocusedNode() should be setFocusedElement().
<http://webkit.org/b/116857>
Reviewed by Antti Koivisto.
Only Elements can be focused, so tighten Document's idea of what's focused.
Most of this patch is just updating call sites for the new names and removing
now-unnecessary isElementNode() checks and casts.
* WebCore.exp.in:
* accessibility/AXObjectCache.cpp:
(WebCore::AXObjectCache::focusedUIElementForPage):
* accessibility/AccessibilityNodeObject.cpp:
(WebCore::AccessibilityNodeObject::canSetFocusAttribute):
* accessibility/AccessibilityRenderObject.cpp:
(WebCore::AccessibilityRenderObject::isFocused):
(WebCore::AccessibilityRenderObject::setFocused):
(WebCore::AccessibilityRenderObject::handleActiveDescendantChanged):
* bindings/objc/DOM.mm:
(-[DOMElement isFocused]):
* dom/Document.cpp:
(WebCore::Document::dispose):
(WebCore::Document::detach):
(WebCore::Document::focusedNodeRemoved):
(WebCore::Document::removeFocusedNodeOfSubtree):
(WebCore::Document::setFocusedElement):
(WebCore::Document::updateFocusAppearanceTimerFired):
(WebCore::eventTargetNodeForDocument):
* dom/Document.h:
(Document):
(WebCore::Document::focusedElement):
* dom/Element.cpp:
(WebCore::Element::attach):
(WebCore::Element::focus):
(WebCore::Element::blur):
(WebCore::Element::cancelFocusAppearanceUpdate):
* dom/Node.cpp:
(WebCore::Node::rendererIsEditable):
* dom/TreeScope.cpp:
(WebCore::TreeScope::focusedElement):
* dom/UserTypingGestureIndicator.cpp:
(WebCore::UserTypingGestureIndicator::UserTypingGestureIndicator):
* editing/Editor.cpp:
(WebCore::Editor::setBaseWritingDirection):
(WebCore::Editor::setComposition):
(WebCore::Editor::guessesForMisspelledOrUngrammatical):
* editing/EditorCommand.cpp:
(WebCore::verticalScrollDistance):
* editing/FrameSelection.cpp:
(WebCore::FrameSelection::selectAll):
(WebCore::FrameSelection::focusedOrActiveStateChanged):
(WebCore::FrameSelection::setFocusedElementIfNeeded):
(WebCore::FrameSelection::currentForm):
* history/CachedPage.cpp:
(WebCore::CachedPage::restore):
* html/HTMLInputElement.cpp:
(WebCore::HTMLInputElement::updateType):
(WebCore::HTMLInputElement::attach):
* html/HTMLTextAreaElement.cpp:
(WebCore::HTMLTextAreaElement::setValueCommon):
* html/HTMLTextFormControlElement.cpp:
(WebCore::HTMLTextFormControlElement::placeholderShouldBeVisible):
(WebCore::HTMLTextFormControlElement::selectionStart):
(WebCore::HTMLTextFormControlElement::selectionEnd):
(WebCore::HTMLTextFormControlElement::selectionDirection):
* html/RadioInputType.cpp:
(WebCore::RadioInputType::handleKeydownEvent):
(WebCore::RadioInputType::isKeyboardFocusable):
* html/shadow/DateTimeEditElement.cpp:
(WebCore::DateTimeEditElement::focusedFieldIndex):
* loader/FrameLoader.cpp:
(WebCore::FrameLoader::stopLoading):
* page/DOMWindow.cpp:
(WebCore::DOMWindow::focus):
* page/EventHandler.cpp:
(WebCore::EventHandler::scrollOverflow):
(WebCore::EventHandler::logicalScrollOverflow):
(WebCore::EventHandler::dispatchMouseEvent):
(WebCore::EventHandler::sendContextMenuEventForKey):
(WebCore::EventHandler::capsLockStateMayHaveChanged):
* page/FocusController.cpp:
(WebCore::dispatchEventsOnWindowAndFocusedNode):
(WebCore::FocusController::advanceFocusInDocumentOrder):
(WebCore::FocusController::setFocusedElement):
(WebCore::FocusController::findFocusCandidateInContainer):
(WebCore::FocusController::advanceFocusDirectionallyInContainer):
(WebCore::FocusController::advanceFocusDirectionally):
* page/FrameView.cpp:
(WebCore::FrameView::scrollToAnchor):
* plugins/PluginView.cpp:
(WebCore::PluginView::focusPluginElement):
* plugins/efl/PluginViewEfl.cpp:
(WebCore::PluginView::setFocus):
* plugins/mac/PluginViewMac.mm:
(WebCore::PluginView::platformStart):
* rendering/RenderImage.cpp:
(WebCore::RenderImage::paintAreaElementFocusRing):
* rendering/RenderListBox.cpp:
(WebCore::RenderListBox::paintItemForeground):
(WebCore::RenderListBox::paintItemBackground):
* rendering/RenderTextControlSingleLine.cpp:
(WebCore::RenderTextControlSingleLine::capsLockStateMayHaveChanged):
(WebCore::RenderTextControlSingleLine::textShouldBeTruncated):
* rendering/RenderTheme.cpp:
(WebCore::RenderTheme::isFocused):
2013-05-28 Sergio Villar Senin <svillar@igalia.com>
Web Inspector: Enable CSS logging
https://bugs.webkit.org/show_bug.cgi?id=113401
Reviewed by Benjamin Poulain.
From Blink r149265 by <serya@chromium.org>
CSS logging was disabled in r147028 to prevent message overflow in
the inspector console. This change restores it by modifying the
CSS grammar in order to reduce as much consecutive errors as
possible in 'declaration_list' and 'decl_list' rules.
This way, for rules like 'x { color: ### }' only the first '#'
will be reported as error (instead of 3 identical errors).
The rule 'declaration' still produces multiple errors, because it
does not eat as much errors as possible. So in order not to create
a complex risky patch we just disable logging in the parser for
that rule.
* css/CSSGrammar.y.in:
* css/CSSParser.cpp:
(WebCore::CSSParser::CSSParser):
(WebCore::CSSParser::parseSheet):
(WebCore::CSSParser::syntaxError):
(WebCore::CSSParser::isLoggingErrors):
(WebCore::CSSParser::rewriteSpecifiers):
* css/CSSParser.h:
(CSSParser):
2013-05-27 Patrick Gansterer <paroga@webkit.org>
Build fix for WinCE after r150730.
* platform/graphics/FontFallbackList.cpp:
(WebCore::FontGlyphs::glyphDataAndPageForCharacter):
2013-05-27 Patrick Gansterer <paroga@webkit.org>
Build fix for WinCE after r150772.
* platform/win/ClipboardWin.cpp:
(WebCore):
* platform/win/PasteboardWin.cpp:
(WebCore::Pasteboard::readFilenames):
(WebCore):
2013-05-27 Darin Adler <darin@apple.com>
Fix build.
* html/HTMLAnchorElement.cpp:
(WebCore::hasNonEmptyBox): Fix typo.
2013-05-27 Darin Adler <darin@apple.com>
Move hasNonEmptyBoundingBox from Node to HTMLAnchorElement
https://bugs.webkit.org/show_bug.cgi?id=116842
Reviewed by Antti Koivisto.
* dom/Node.cpp: Removed hasNonEmptyBoundingBox.
* dom/Node.h: Ditto.
* html/HTMLAnchorElement.cpp:
(WebCore::HTMLAnchorElement::isMouseFocusable): Fixed #if to be more readable and
added more-explicit clearer comments. No behavior change.
(WebCore::hasNonEmptyBox): Added. Has the same code that was in
Node::hasNonEmptyBoundingBox with some additional comments.
(WebCore::HTMLAnchorElement::isKeyboardFocusable): Call hasNonEmptyBox.
2013-05-27 Darin Adler <darin@apple.com>
Move isBlockFlowElement and related functions out of the Node class into editing code
https://bugs.webkit.org/show_bug.cgi?id=116846
Reviewed by Antti Koivisto.
* dom/Node.cpp: Removed isBlockFlowElement, enclosingBlockFlowElement, and
inSameContainingBlockFlowElement. These are all editing functions that don't
belong in the Node class, and mostly-deprecated ones to boot.
* dom/Node.h: Ditto.
* dom/Position.cpp:
(WebCore::inSameEnclosingBlockFlowElement): Added. This editing-specific function
is used only here, so put it here.
(WebCore::Position::rendersInDifferentPosition): Updated to call new function above.
(WebCore::Position::leadingWhitespacePosition): Ditto.
* editing/InsertLineBreakCommand.cpp:
(WebCore::InsertLineBreakCommand::insertNodeAfterPosition): Use
deprecatedEnclosingBlockFlowElement at its new location.
(WebCore::InsertLineBreakCommand::insertNodeBeforePosition): Ditto.
* editing/InsertListCommand.cpp:
(WebCore::InsertListCommand::doApplyForSingleParagraph): use
isBlockFlowElement at its new location.
* editing/ReplaceSelectionCommand.cpp:
(WebCore::enclosingInline): Ditto.
* editing/VisiblePosition.cpp:
(WebCore::VisiblePosition::canonicalPosition): Use deprecatedEnclosingBlockFlowElement
at its new location.
(WebCore::enclosingBlockFlowElement): Ditto. Also added FIXME.
* editing/VisibleSelection.cpp:
(WebCore::makeSearchRange): Ditto.
* editing/htmlediting.cpp:
(WebCore::isBlockFlowElement): Added. Same as the Node::isBlockFlowElement
function, but here because this is an editing function, not suitable as a Node member.
(WebCore::deprecatedEnclosingBlockFlowElement): Ditto. Added "deprecated" to the name
since the Node member function had a comment saying it was deprecated. Also changed so
it tolerates a 0 for an argument, which made it easier for one caller.
* editing/htmlediting.h: Added the two new functions.
2013-05-27 Seokju Kwon <seokju.kwon@gmail.com>
Add guard around paintForFixedRootBackground
https://bugs.webkit.org/show_bug.cgi?id=116754
Reviewed by Simon Fraser.
paintForFixedRootBackground is only used when ACCELERATED_COMPOSITING is enabled.
No new tests, no behavior change.
* rendering/RenderLayer.cpp:
(WebCore):
2013-05-27 Seokju Kwon <seokju.kwon@gmail.com>
Remove a leftover Pagepoup from PickerIndicatorElement.h
https://bugs.webkit.org/show_bug.cgi?id=116801
Reviewed by Anders Carlsson.
No new tests, no behavior change.
* html/shadow/PickerIndicatorElement.h:
(WebCore):
2013-05-27 Claudio Saavedra <csaavedra@igalia.com>
[CSS] -webkit-var prefix is case-sensitive
https://bugs.webkit.org/show_bug.cgi?id=116829
Reviewed by Darin Adler.
Tests: Added case to fast/css/variables/case-sensitive.html
* css/CSSParser.cpp:
(WebCore::isEqualToCSSCaseSensitiveIdentifier): Add variant to
IsEqualToCSSIdentifier that respects case-sensitivity.
(WebCore::CSSParser::realLex): Use the above method for CSS
variable declarations.
2013-05-27 Zalan Bujtas <zalan@apple.com>
drop-shadow filter with overflow:hidden child misbehaves.
https://bugs.webkit.org/show_bug.cgi?id=109783
Reviewed by Simon Fraser.
Applying CSS filters only to the scrollbar rect leaves rendering
artefacts. Filters should skip such partial repaints.
Tests: Test framework uses mock theme for scrollbars. Such scrollbars do not
initiate partial repaints.
* rendering/RenderLayer.cpp:
(WebCore::RenderLayer::setupFilters):
(WebCore::RenderLayer::paintLayerContents):
* rendering/RenderLayer.h:
(RenderLayer):
2013-05-27 Xueqing Huang <huangxueqing@baidu.com>
Move Windows port off legacy clipboard.
https://bugs.webkit.org/show_bug.cgi?id=116258
Reviewed by Darin Adler.
Clipboard refactor, no new tests.
* dom/Clipboard.h:
* page/win/EventHandlerWin.cpp:
(WebCore::EventHandler::createDraggingClipboard): Create Clipboard instead of ClipboardWin.
* platform/Pasteboard.h:
(WebCore::Pasteboard::dataObject): Get IDataObject by Clipborad.
(WebCore::Pasteboard::writableDataObject): Get WCDataObject by Clipborad.
* platform/win/ClipboardWin.cpp:
(WebCore::Clipboard::createDragImage): Change parameter name loc to dragLocation.
(WebCore::Clipboard::declareAndWriteDragImage): Implement declareAndWriteDragImage use WCDataObject exposed by Pasteboard.
* platform/win/ClipboardWin.h: Removed.
* platform/win/EditorWin.cpp:
(WebCore::Editor::newGeneralClipboard): Create Clipboard instead of ClipboardWin.
* platform/win/PasteboardWin.cpp:
(WebCore::Pasteboard::createForCopyAndPaste): Create a Pasteboard.
(WebCore::Pasteboard::createPrivate): Ditto.
(WebCore::Pasteboard::createForDragAndDrop): Ditto.
(WebCore::Pasteboard::finishCreatingPasteboard): Create Pasteboard use Windows API.
(WebCore::Pasteboard::Pasteboard):
(WebCore::clipboardTypeFromMIMEType): Copied from ClipboardWin.cpp.
(WebCore::Pasteboard::clear): Ditto.
(WebCore::Pasteboard::hasData): Ditto.
(WebCore::addMimeTypesForFormat): Ditto.
(WebCore::Pasteboard::types): Ditto.
(WebCore::Pasteboard::readString): Ditto.
(WebCore::Pasteboard::readFilenames): Ditto.
(WebCore::writeURL): Ditto.
(WebCore::Pasteboard::writeString): Ditto.
(WebCore::Pasteboard::setDragImage): Ditto.
(WebCore::Pasteboard::writeRangeToDataObject): Write range to WCDataObject.
(WebCore::Pasteboard::writeSelection):
(WebCore::Pasteboard::writePlainTextToDataObject): Write PlainText to WCDataObject.
(WebCore::Pasteboard::writePlainText):
(WebCore::pathRemoveBadFSCharacters): Copied from ClipboardWin.cpp.
(WebCore::filesystemPathFromUrlOrTitle): Ditto.
(WebCore::writeFileToDataObject): Ditto.
(WebCore::Pasteboard::writeURLToDataObject): Write URL to WCDataObject.
(WebCore::Pasteboard::writeURL): Copied from ClipboardWin.cpp.
(WebCore::Pasteboard::writePasteboard): Copied from Pasteboard::writeClipboard.
(WebCore::Pasteboard::documentFragment): Copied from ClipboardWin.cpp.
(WebCore::Pasteboard::setExternalDataObject): Clipboard can set new IDataObject.
(WebCore::getCachedImage): Copied from ClipboardWin.cpp.
(WebCore::createGlobalImageFileDescriptor): Ditto.
(WebCore::createGlobalImageFileContent): Ditto.
(WebCore::createGlobalHDropContent): Ditto.
(WebCore::Pasteboard::writeImageToDataObject): Expose to make Clipboard implement declareAndWriteDragImage.
(WebCore::Pasteboard::writeURLToWritableDataObject): Ditto.
2013-05-27 Tim Horton <timothy_horton@apple.com>
PDFPlugin: Main-frame PDFPlugin Accessibility
https://bugs.webkit.org/show_bug.cgi?id=116563
<rdar://problem/13458534>
Reviewed by Sam Weinig.
* WebCore.exp.in: Export AffineTransform::mapRect.
2013-05-27 Tiancheng Jiang <tijiang@rim.com>
Checkbox UX update.
https://bugs.webkit.org/show_bug.cgi?id=116838.
Reviewed by Rob Buis.
BlackBerry PR 342302.
Internally Reviewed by Jeff Rogers.
Remove old background and change pressed checkmark image.
* platform/blackberry/RenderThemeBlackBerry.cpp:
(WebCore::RenderThemeBlackBerry::paintCheckbox):
2013-05-27 Sam Weinig <sam@webkit.org>
When the background is completely transparent we should be conservative and use the default scrollbar style, not the light one
https://bugs.webkit.org/show_bug.cgi?id=116836
<rdar://problem/13949905>
Reviewed by Simon Fraser.
* page/FrameView.cpp:
(WebCore::FrameView::recalculateScrollbarOverlayStyle):
Don't use the light style when the background is completely transparent.
2013-05-27 Patrick Gansterer <paroga@webkit.org>
Use ICU_INCLUDE_DIRS in BlackBerry CMake files
https://bugs.webkit.org/show_bug.cgi?id=116210
Reviewed by Rob Buis.
Set and use the ICU_INCLUDE_DIRS variable to avoid
duplicated adding of the ICU include directory.
* PlatformBlackBerry.cmake:
2013-05-27 Antti Koivisto <antti@apple.com>
Tighten FontGlyphs::glyphDataAndPageForCharacter to take FontDescription
https://bugs.webkit.org/show_bug.cgi?id=116823
Reviewed by Andreas Kling.
FontGlyphs does not need to know about Font anymore.
* platform/graphics/Font.cpp:
(WebCore::Font::Font):
(WebCore::Font::operator=):
* platform/graphics/Font.h:
(WebCore::Font::isPlatformFont):
(WebCore::Font::glyphDataAndPageForCharacter):
(Font):
* platform/graphics/FontCache.h:
* platform/graphics/FontFallbackList.cpp:
(WebCore::FontGlyphs::FontGlyphs):
(WebCore::FontGlyphs::glyphDataAndPageForCharacter):
* platform/graphics/FontFallbackList.h:
(WebCore):
(WebCore::FontGlyphs::createForPlatformFont):
Tweaked the name.
(WebCore::FontGlyphs::isForPlatformFont):
Move knowledge about platform font to FontGlyphs as it is needed for resolving system fallback on Mac.
* platform/graphics/blackberry/FontCacheBlackBerry.cpp:
(WebCore::FontCache::systemFallbackForCharacters):
* platform/graphics/freetype/FontCacheFreeType.cpp:
(WebCore::FontCache::systemFallbackForCharacters):
* platform/graphics/mac/FontCacheMac.mm:
(WebCore::FontCache::systemFallbackForCharacters):
* platform/graphics/qt/FontCacheQt.cpp:
(WebCore::FontCache::systemFallbackForCharacters):
* platform/graphics/win/FontCacheWin.cpp:
(WebCore::FontCache::systemFallbackForCharacters):
* platform/graphics/wince/FontCacheWinCE.cpp:
(WebCore::FontCache::systemFallbackForCharacters):
More descriptive name and tighter interface.
2013-05-27 Mihnea Ovidenie <mihnea@adobe.com>
[CSSRegions] Prevent unnecessary copy of LayoutRect objects
https://bugs.webkit.org/show_bug.cgi?id=116828
Reviewed by Andreas Kling.
Use const references for parameter passing.
No functional change, no new tests.
* rendering/RenderFlowThread.cpp:
(WebCore::RenderFlowThread::paintFlowThreadPortionInRegion):
(WebCore::RenderFlowThread::hitTestFlowThreadPortionInRegion):
* rendering/RenderFlowThread.h:
* rendering/RenderRegion.cpp:
(WebCore::RenderRegion::overflowRectForFlowThreadPortion):
* rendering/RenderRegion.h:
2013-05-27 Leo Yang <leoyang@rim.com>
[BlackBerry] Reveal HTTP error code for XHR even if there is no response body
https://bugs.webkit.org/show_bug.cgi?id=116543
Reviewed by Rob Buis.
Reviewed internally by Joe Mason.
It's a regression introduced by r132556.
BlackBerry is doing friendly HTTP error handling: if there is no response body
for an HTTP error it will display an error message made by the port. But for a
XHR request, which usually does not result in displaying error messages to the
end user, HTTP error code should be revealed to let the JavaScript know what
the actual server error code is.
Covered by existing tests:
ManualTests/blackberry/head-xhr-nonexistant-file.html
LayoutTests/http/tests/xmlhttprequest/xmlhttprequest-check-head-readystate-for-404.html
LayoutTests/http/tests/xmlhttprequest/xmlhttprequest-check-get-readystate-for-404-without-body.html
* platform/network/blackberry/NetworkJob.cpp:
(WebCore::NetworkJob::shouldNotifyClientFailed):
2013-05-27 Tiancheng Jiang <tijiang@rim.com>
Adjust date input width.
https://bugs.webkit.org/show_bug.cgi?id=100760.
Reviewed by Rob Buis.
BlackBerry PR 343497.
Internally Reviewed by Jeff Rogers.
Set width to auto to fit the string length.
* css/themeBlackBerry.css:
(input[type="date"], input[type="datetime"], input[type="datetime-local"], input[type="time"], input[type="month"]):
2013-05-27 Andreas Kling <akling@apple.com>
Document::setHoveredNode() should be setHoveredElement().
<http://webkit.org/b/116819>
Reviewed by Antti Koivisto.
Only Elements can be hovered, teach Document about this.
* dom/Document.h:
* dom/Document.cpp:
(WebCore::Document::dispose):
(WebCore::Document::detach):
m_hoverNode => m_hoveredElement.
Removed hoverNode() and setHoverNode() since those were only used internally.
(WebCore::Document::updateHoverActiveState):
Updated for hovered things always being Elements.
(WebCore::Document::hoveredElementDidDetach):
* dom/Element.cpp:
(WebCore::Element::detach):
Renamed Document::hoveredNodeDetached() to hoveredElementDidDetach() and fix it up
following the same pattern as elementInActiveChainDidDetach().
2013-05-27 Allan Sandfeld Jensen <allan.jensen@digia.com>
[Qt] REGRESSION(r150716): It made 15 inspector and 1 mozilla test to assert
https://bugs.webkit.org/show_bug.cgi?id=116822
Reviewed by Andreas Kling.
The input fontDescription may have more than one family defined.
* platform/qt/RenderThemeQStyle.cpp:
(WebCore::RenderThemeQStyle::adjustButtonStyle):
2013-05-27 Jocelyn Turcotte <jocelyn.turcotte@digia.com>
[Qt][Win] Input events aren't mapped properly with windowless plugins.
https://bugs.webkit.org/show_bug.cgi?id=116094
Reviewed by Tor Arne Vestbø.
The events are first sent properly but Flash then immediately repaints
and this causes flickering painting.
The issue is that Flash seems to be doing some input event tracking of
its own internally, using the HWND returned through NPN_GetValue(NPNVnetscapeWindow).
We are currently using two coordinate systems for windowless plugins on Windows with Qt:
- FrameView coordinates: Used for input events and ajusted with the WM_WINDOWPOSCHANGED message
- Drawable coordinates: Used by WM_PAINT and adjusted with NPP_SetWindow
This patch fixes the bug by mapping input events to the native window returned
as NPNVnetscapeWindow instead of the FrameView to ensure that those coordinates will match
the ones used by Flash internally.
With this we shouldn't be using FrameView coordinates anywhere for windowless plugins
on Windows with Qt.
* platform/qt/QWebPageClient.h:
(QWebPageClient):
Added mapToOwnerWindow to the interface, mapping from the FrameView up to the wrapping nativeParentWidget.
* plugins/win/PluginViewWin.cpp:
(WebCore::contentsToNativeWindow):
(WebCore::PluginView::paintIntoTransformedContext):
(WebCore::PluginView::handleMouseEvent):
2013-05-27 Antti Koivisto <antti@apple.com>
Tighten FontGlyphs interfaces to take FontDescription instead of Font
https://bugs.webkit.org/show_bug.cgi?id=116818
Reviewed by Andreas Kling.
This gives better understanding of what the actual inputs are.
* WebCore.exp.in:
* platform/graphics/Font.h:
(WebCore::Font::primaryFont):
(WebCore::Font::fontDataAt):
(WebCore::Font::isFixedPitch):
* platform/graphics/FontCache.cpp:
(WebCore::FontCache::getFontData):
* platform/graphics/FontCache.h:
* platform/graphics/FontFallbackList.cpp:
(WebCore::FontGlyphs::determinePitch):
(WebCore::FontGlyphs::realizeFontDataAt):
(WebCore::FontGlyphs::glyphDataAndPageForCharacter):
* platform/graphics/FontFallbackList.h:
(WebCore::FontGlyphs::primaryFontData):
(WebCore::FontGlyphs::isFixedPitch):
(WebCore::FontGlyphs::primarySimpleFontData):
* platform/graphics/blackberry/FontCacheBlackBerry.cpp:
* platform/graphics/freetype/FontCacheFreeType.cpp:
* platform/graphics/mac/FontCacheMac.mm:
(WebCore::FontCache::similarFontPlatformData):
Drop get* naming and make this Mac only as no other platform has it.
* platform/graphics/qt/FontCacheQt.cpp:
* platform/graphics/win/FontCacheWin.cpp:
* platform/graphics/wince/FontCacheWinCE.cpp:
(WebCore):
2013-05-27 Andreas Kling <akling@apple.com>
Strengthen typing of detaching an Element from Document's :active chain.
<http://webkit.org/b/116815>
Reviewed by Antti Koivisto.
Tiny cleanup now that the :active chain can only contain elements.
Rename Document::activeChainNodeDetached() to elementInActiveChainDidDetach().
* dom/Element.cpp:
(WebCore::Element::detach):
* dom/Document.h:
* dom/Document.cpp:
(WebCore::Document::elementInActiveChainDidDetach):
Rename, take Element*, remove silly condition that was always true.
2013-05-27 Andrei Bucur <abucur@adobe.com>
[CSS Regions] Remove the offsetFromLogicalTopOfFirstPage parameter from layout functions
https://bugs.webkit.org/show_bug.cgi?id=116441
Reviewed by David Hyatt.
The patch changes the following things:
- exposes offsetFromLogicalTopOfFirstPage() to all the RenderBoxes;
- offsetFromLogicalTopOfFirstPage() is now safe to call from any box inside a flow thread, not only the
currently being laid out;
- removes the offsetFromLogicalTopOfFirstPage parameter from all the layout functions
that didn't actually required it; when the value is necessary, the offsetFromLogicalTopOfFirstPage
function is called instead;
- RenderFlowThread now handles its own logic for obtaining the offset from logical top of the first
region for a box, based on the layout states pushed on RenderView; it provides a better caching mechanism
that can be used for all the ancestor containing blocks of the current box being laid out.
The RenderBoxRegionInfo structures are cached only based on the box and the region. This means that
passing around a value for offsetFromLogicalTopOfFirstPage different in some cases than others was
risky. If there is a possibility of having a different box info result for a different offset
then the cache is not working correctly.
Tests: No function change, no tests.
* rendering/RenderBlock.cpp:
(WebCore::RenderBlock::computeStartPositionDeltaForChildAvoidingFloats):
(WebCore::RenderBlock::logicalLeftOffsetForContent):
(WebCore::RenderBlock::logicalRightOffsetForContent):
(WebCore::RenderBlock::getClearDelta):
(WebCore::RenderBlock::lineWidthForPaginatedLineChanged):
(WebCore::RenderBlock::offsetFromLogicalTopOfFirstPage):
(WebCore::RenderBlock::logicalWidthChangedInRegions):
* rendering/RenderBlock.h:
(WebCore::RenderBlock::availableLogicalWidthForLine):
(WebCore::RenderBlock::logicalRightOffsetForLine):
(WebCore::RenderBlock::logicalLeftOffsetForLine):
(WebCore::RenderBlock::startOffsetForLine):
(WebCore::RenderBlock::endOffsetForLine):
(WebCore::RenderBlock::availableLogicalWidthForContent):
(WebCore::RenderBlock::startOffsetForContent):
(WebCore::RenderBlock::endOffsetForContent):
(WebCore::RenderBlock::logicalLeftOffsetForContent):
(WebCore::RenderBlock::logicalRightOffsetForContent):
* rendering/RenderBox.cpp:
(WebCore::RenderBox::borderBoxRectInRegion):
(WebCore::RenderBox::constrainLogicalWidthInRegionByMinMax):
(WebCore::RenderBox::shrinkLogicalWidthToAvoidFloats):
(WebCore::RenderBox::containingBlockLogicalWidthForContentInRegion):
(WebCore::RenderBox::containingBlockAvailableLineWidthInRegion):
(WebCore::RenderBox::computeLogicalWidthInRegion):
(WebCore::RenderBox::computeLogicalWidthInRegionUsing):
(WebCore::RenderBox::renderBoxRegionInfo):
(WebCore::RenderBox::containingBlockLogicalWidthForPositioned):
(WebCore::RenderBox::containingBlockLogicalHeightForPositioned):
(WebCore::computeInlineStaticDistance):
(WebCore::RenderBox::computePositionedLogicalWidth):
(WebCore::RenderBox::computePositionedLogicalWidthUsing):
(WebCore::RenderBox::computePositionedLogicalHeight):
(WebCore::RenderBox::computePositionedLogicalHeightUsing):
(WebCore::RenderBox::computePositionedLogicalWidthReplaced):
(WebCore::RenderBox::computePositionedLogicalHeightReplaced):
(WebCore::RenderBox::offsetFromLogicalTopOfFirstPage):
* rendering/RenderBox.h:
* rendering/RenderFlexibleBox.cpp:
(WebCore::RenderFlexibleBox::computeMainAxisExtentForChild):
* rendering/RenderFlowThread.cpp:
(WebCore::RenderFlowThread::logicalWidthChangedInRegionsForBlock):
(WebCore::RenderFlowThread::hasCachedOffsetFromLogicalTopOfFirstRegion):
(WebCore::RenderFlowThread::cachedOffsetFromLogicalTopOfFirstRegion):
(WebCore::RenderFlowThread::setOffsetFromLogicalTopOfFirstRegion):
(WebCore::RenderFlowThread::clearOffsetFromLogicalTopOfFirstRegion):
(WebCore::RenderFlowThread::currentActiveRenderBox):
(WebCore::RenderFlowThread::pushFlowThreadLayoutState):
(WebCore::RenderFlowThread::popFlowThreadLayoutState):
(WebCore::RenderFlowThread::offsetFromLogicalTopOfFirstRegion):
(WebCore::RenderFlowThread::adjustedPositionRelativeToOffsetParent):
* rendering/RenderFlowThread.h:
* rendering/RenderTable.cpp:
(WebCore::RenderTable::updateLogicalWidth):
* rendering/RenderView.cpp:
(WebCore::RenderView::pushLayoutState):
(WebCore::RenderView::pushLayoutStateForCurrentFlowThread):
(WebCore::RenderView::popLayoutStateForCurrentFlowThread):
* rendering/RenderView.h:
(WebCore::RenderView::pushLayoutState):
(WebCore::RenderView::popLayoutState):
2013-05-27 Allan Sandfeld Jensen <allan.jensen@digia.com>
Active DOM objects stopped twice
https://bugs.webkit.org/show_bug.cgi?id=116524
Reviewed by Alexey Proskuryakov.
Only iterate over all active DOM object to stop them once.
To ensure later created active DOM objects are stopped,
suspendActiveDOMObjectIfNeeded now also stops active DOM objects
if needed. This also fixes an existing bug when active DOM
objects were created after stopActiveDOMObjects had been called.
Two existing tests creates new active DOM objects after stopActiveDOMObjects
has been called:
fast/dom/xmlhttprequest-constructor-in-detached-document.html
fast/dom/Window/timer-null-script-execution-context.html
* dom/ScriptExecutionContext.cpp:
(WebCore::ScriptExecutionContext::stopActiveDOMObjects):
(WebCore::ScriptExecutionContext::suspendActiveDOMObjectIfNeeded):
2013-05-27 Charles Wei <charles.wei@torchmobile.com.cn>
Remove redundant CachedRawResource::loader()
https://bugs.webkit.org/show_bug.cgi?id=116805
Reviewed by Andreas Kling.
Just remove redundant code, no test case needed.
* loader/cache/CachedRawResource.cpp:
* loader/cache/CachedRawResource.h:
2013-05-27 Andreas Kling <akling@apple.com>
WinCE build TLC: Node::active() moved to Element.
* rendering/RenderThemeWinCE.cpp:
(WebCore::RenderThemeWinCE::paintSearchFieldCancelButton):
2013-05-26 Jaehun Lim <ljaehun.lim@samsung.com>
CSSParser::parseImageResolution doesn't need a parameter.
https://bugs.webkit.org/show_bug.cgi?id=116755
Reviewed by Darin Adler.
parseImageResolution() can get CSSPraserValueList from m_valueList directly.
No new tests, no behavior change.
* css/CSSParser.cpp:
(WebCore::CSSParser::parseImageResolution):
* css/CSSParser.h:
2013-05-26 Andreas Kling <akling@apple.com>
Turn TreeScope::focusedNode() into focusedElement().
<http://webkit.org/b/116802>
Reviewed by Darin Adler.
For the hundredth time, only Elements can be focused!
This change mostly reverts r121079 since that made things unnecessarily complicated
just to tweak the behavior of ShadowRoot.activeElement, an API that we don't expose.
Finding a TreeScope's focused element now does a simple walk up the parent chain instead
of running the full Shadow DOM re-targeting algorithm.
(WebCore::TreeScope::focusedElement):
Simplify and return Element* instead of Node*.
* dom/TreeScope.h:
* dom/TreeScope.cpp:
(WebCore::focusedFrameOwnerElement):
Make this return Element* as the name already suggested.
* dom/Document.cpp:
(WebCore::Document::removeFocusedNodeOfSubtree):
* dom/Element.cpp:
(WebCore::Element::blur):
* dom/ShadowRoot.h:
(WebCore::ShadowRoot::activeElement):
* html/HTMLDocument.cpp:
(WebCore::HTMLDocument::activeElement):
Simplified call sites that were paranoid about getting a non-Element focused node.
2013-05-26 Dean Jackson <dino@apple.com>
Plugins with no src but valid type should not snapshot
https://bugs.webkit.org/show_bug.cgi?id=116799
<rdar://problem/13695911>
Reviewed by Simon Fraser.
There are a few plug-ins around that don't take any source content
via the src attribute, but rather just load the binary based on the
mime-type. In those cases we shouldn't snapshot until we have a
mechanism to do so.
* html/HTMLPlugInImageElement.cpp:
(WebCore::HTMLPlugInImageElement::subframeLoaderWillCreatePlugIn):
Add MIMEType logging, and detect the case of no src but valid type.
* html/HTMLPlugInImageElement.h: Add another SnapshotReason enum for
this special case.
2013-05-26 Antti Koivisto <antti@apple.com>
Encapsulate FontGlyphs
https://bugs.webkit.org/show_bug.cgi?id=116803
Reviewed by Andreas Kling.
FontGlyphs is unfriending Font. Give it a real class interface and some actual code.
* platform/graphics/Font.cpp:
(WebCore::Font::Font):
* platform/graphics/Font.h:
(WebCore::Font::glyphDataForCharacter):
(WebCore::Font::glyphDataAndPageForCharacter):
* platform/graphics/FontFallbackList.cpp:
(WebCore::FontGlyphs::FontGlyphs):
(WebCore::isInRange):
(WebCore::shouldIgnoreRotation):
(WebCore::glyphDataAndPageForNonCJKCharacterWithGlyphOrientation):
Helpers from FontFastPath.cpp.
(WebCore::FontGlyphs::glyphDataAndPageForCharacter):
This is the primary interface. The code moves here from FontFastPath.cpp.
* platform/graphics/FontFallbackList.h:
(WebCore::FontGlyphs::createForPlatformData):
Remove setPlatformData in favor of constructor.
(WebCore::FontGlyphs::primarySimpleFontData):
* platform/graphics/FontFastPath.cpp:
* platform/graphics/GraphicsContext.h:
Remove a stray function definition also called setPlatformFont().
* rendering/svg/SVGTextRunRenderingContext.cpp:
(WebCore::SVGTextRunRenderingContext::glyphDataForCharacter):
2013-05-26 Seokju Kwon <seokju.kwon@gmail.com>
Remove a leftover CALENDAR_PICKER from LocaleNone.cpp
https://bugs.webkit.org/show_bug.cgi?id=116800
Reviewed by Kent Tamura.
No new tests, no behavior change.
* platform/text/LocaleNone.cpp:
(LocaleNone):
2013-05-26 Antti Koivisto <antti@apple.com>
Rename FontFallbackList to FontGlyphs
https://bugs.webkit.org/show_bug.cgi?id=116797
Reviewed by Andreas Kling.
Maybe it was a fallback list once. Nowadays its purpose is to cache realized glyphs and related data.
File renaming will be done separately.
* WebCore.exp.in:
* platform/graphics/Font.cpp:
(WebCore::Font::Font):
(WebCore::Font::operator=):
(WebCore::Font::operator==):
Refactored to early return style.
(WebCore::Font::update):
(WebCore::Font::width):
* platform/graphics/Font.h:
(Font):
(WebCore::Font::glyphs):
(WebCore::Font::loadingCustomFonts):
(WebCore::Font::primaryFont):
(WebCore::Font::fontDataAt):
(WebCore::Font::isFixedPitch):
(WebCore::Font::fontSelector):
* platform/graphics/FontCache.h:
(FontCache):
* platform/graphics/FontFallbackList.cpp:
(WebCore::FontGlyphs::FontGlyphs):
(WebCore::FontGlyphs::invalidate):
(WebCore::FontGlyphs::releaseFontData):
(WebCore::FontGlyphs::determinePitch):
(WebCore::FontGlyphs::realizeFontDataAt):
Renamed for clarity along with m_fontList -> m_realizedFontData.
(WebCore::FontGlyphs::setPlatformFont):
* platform/graphics/FontFallbackList.h:
(FontGlyphs):
(WebCore::FontGlyphs::GlyphPagesStateSaver::GlyphPagesStateSaver):
(WebCore::FontGlyphs::GlyphPagesStateSaver::~GlyphPagesStateSaver):
(GlyphPagesStateSaver):
(WebCore::FontGlyphs::create):
(WebCore::FontGlyphs::~FontGlyphs):
(WebCore::FontGlyphs::primaryFontData):
* platform/graphics/FontFastPath.cpp:
(WebCore::Font::glyphDataAndPageForCharacter):
* rendering/svg/SVGTextRunRenderingContext.cpp:
(WebCore::SVGTextRunRenderingContext::glyphDataForCharacter):
2013-05-26 Kent Tamura <tkent@chromium.org>
Remove ENABLE_CALENDAR_PICKER
https://bugs.webkit.org/show_bug.cgi?id=116795
Reviewed by Ryosuke Niwa.
This feature was used only by Chromium port.
* Resources/pagepopups/calendarPicker.css: Removed.
* Resources/pagepopups/calendarPicker.js: Removed.
* css/html.css:
* platform/text/LocaleICU.cpp:
(WebCore::LocaleICU::LocaleICU):
(WebCore):
* platform/text/LocaleICU.h:
(LocaleICU):
* platform/text/PlatformLocale.h:
(Locale):
* platform/text/mac/LocaleMac.h:
(LocaleMac):
* platform/text/mac/LocaleMac.mm:
(WebCore::LocaleMac::monthLabels):
* platform/text/win/LocaleWin.cpp:
(WebCore::LocaleWin::LocaleWin):
(WebCore::LocaleWin::monthLabels):
* platform/text/win/LocaleWin.h:
(LocaleWin):
2013-05-26 Andreas Kling <akling@apple.com>
Move :active chain participation state from Node to Element.
<http://webkit.org/b/116786>
Reviewed by Antti Koivisto.
Only Elements can be in the :active chain so move the logic there from Node.
* dom/Document.cpp:
(WebCore::Document::updateHoverActiveState):
Add isElementNode() type checks when updating the :active chain.
* dom/Node.h:
* dom/Node.cpp:
(WebCore::Node::detach):
* dom/Element.cpp:
(WebCore::Element::detach):
Move the remaining logic for detaching from the UserActionElementSet to Element.
(WebCore::Element::isUserActionElementInActiveChain):
* dom/Element.h:
(WebCore::Element::inActiveChain):
Move all the :active chain stuff from Node to Element.
* dom/UserActionElementSet.cpp:
(WebCore::UserActionElementSet::didDetach):
* dom/UserActionElementSet.h:
(WebCore::UserActionElementSet::isInActiveChain):
(WebCore::UserActionElementSet::setInActiveChain):
UserActionElementSet now only takes Element* in its API.
2013-05-26 Antti Koivisto <antti@apple.com>
Remove FontFamily.h/.cpp
https://bugs.webkit.org/show_bug.cgi?id=116788
Reviewed by Anders Carlsson.
Empty files.
* CMakeLists.txt:
* GNUmakefile.list.am:
* Target.pri:
* WebCore.vcproj/WebCore.vcproj:
* WebCore.vcxproj/WebCore.vcxproj:
* WebCore.xcodeproj/project.pbxproj:
* platform/graphics/FontDescription.h:
* platform/graphics/FontFamily.cpp: Removed.
* platform/graphics/FontFamily.h: Removed.
2013-05-26 Antti Koivisto <antti@apple.com>
Use Vector instead of custom linked list for font families
https://bugs.webkit.org/show_bug.cgi?id=116783
Reviewed by Andreas Kling.
Get rid of FontFamily and SharedFontFamily.
* accessibility/AccessibilityRenderObject.cpp:
(WebCore::AccessibilityRenderObject::hasSameFont):
* accessibility/atk/WebKitAccessibleInterfaceText.cpp:
(getAttributeSetForAccessibilityObject):
* css/CSSComputedStyleDeclaration.cpp:
(WebCore::fontFamilyFromStyle):
* css/DeprecatedStyleBuilder.cpp:
(WebCore::ApplyPropertyFontFamily::applyInheritValue):
(WebCore::ApplyPropertyFontFamily::applyInitialValue):
(WebCore::ApplyPropertyFontFamily::applyValue):
* css/StyleResolver.cpp:
(WebCore::StyleResolver::styleForDocument):
(WebCore::StyleResolver::initializeFontStyle):
* html/canvas/CanvasRenderingContext2D.cpp:
(WebCore::CanvasRenderingContext2D::font):
(WebCore::CanvasRenderingContext2D::setFont):
* page/PrintContext.cpp:
(WebCore::PrintContext::pageProperty):
* platform/efl/RenderThemeEfl.cpp:
(WebCore::RenderThemeEfl::systemFont):
* platform/graphics/Font.h:
(WebCore::Font::firstFamily):
(WebCore::Font::familyCount):
(WebCore::Font::familyAt):
* platform/graphics/FontCache.cpp:
(WebCore::FontCache::getFontData):
* platform/graphics/FontDescription.cpp:
(SameSizeAsFontDescription):
* platform/graphics/FontDescription.h:
(WebCore::FontDescription::FontDescription):
(WebCore::FontDescription::familyCount):
(WebCore::FontDescription::firstFamily):
(WebCore::FontDescription::familyAt):
(WebCore::FontDescription::families):
(WebCore::FontDescription::useFixedDefaultSize):
(WebCore::FontDescription::setOneFamily):
(WebCore::FontDescription::setFamilies):
(WebCore::FontDescription::adoptFamilies):
(WebCore::FontDescription::operator==):
* platform/graphics/FontFamily.cpp:
* platform/graphics/FontFamily.h:
* platform/graphics/ca/win/PlatformCALayerWinInternal.cpp:
(PlatformCALayerWinInternal::displayCallback):
* platform/graphics/mac/FontCacheMac.mm:
(WebCore::FontCache::getSimilarFontPlatformData):
* platform/graphics/qt/FontCacheQt.cpp:
(WebCore::FontCache::getLastResortFallbackFont):
* platform/gtk/RenderThemeGtk.cpp:
(WebCore::RenderThemeGtk::systemFont):
* platform/mac/ThemeMac.mm:
(WebCore::ThemeMac::controlFont):
* platform/qt/RenderThemeQStyle.cpp:
(WebCore::RenderThemeQStyle::adjustButtonStyle):
* platform/text/transcoder/FontTranscoder.cpp:
(WebCore::FontTranscoder::converterType):
* platform/win/DragImageWin.cpp:
(WebCore::dragLabelFont):
* rendering/RenderText.cpp:
(WebCore::RenderText::styleDidChange):
* rendering/RenderTextControl.cpp:
(WebCore::RenderTextControl::computeIntrinsicLogicalWidths):
* rendering/RenderTextControlSingleLine.cpp:
(WebCore::RenderTextControlSingleLine::preferredContentLogicalWidth):
* rendering/RenderThemeMac.mm:
(WebCore::RenderThemeMac::systemFont):
(WebCore::RenderThemeMac::setFontFromControlSize):
* rendering/RenderThemeSafari.cpp:
(WebCore::RenderThemeSafari::systemFont):
(WebCore::RenderThemeSafari::setFontFromControlSize):
* rendering/RenderThemeWin.cpp:
(WebCore::fillFontDescription):
2013-05-26 Andreas Kling <akling@apple.com>
Move "active" state logic from Node to Element.
<http://webkit.org/b/116785>
Reviewed by Antti Koivisto.
Resolve another 7 year old FIXME by merging the "active" state logic from Node and ContainerNode
and moving it all to Element instead.
* dom/UserActionElementSet.h:
(WebCore::UserActionElementSet::isActive):
(WebCore::UserActionElementSet::setActive):
* dom/ContainerNode.cpp:
* dom/ContainerNode.h:
* dom/Node.cpp:
* dom/Node.h:
* dom/Element.h:
(WebCore::Element::active):
* dom/Element.cpp:
(WebCore::Element::isUserActionElementActive):
(WebCore::Element::setActive):
Moved here from Node/ContainerNode.
* accessibility/AccessibilityNodeObject.cpp:
(WebCore::AccessibilityNodeObject::isPressed):
* dom/Document.cpp:
(WebCore::Document::setFocusedNode):
(WebCore::Document::updateHoverActiveState):
* rendering/RenderTheme.cpp:
(WebCore::RenderTheme::isPressed):
(WebCore::RenderTheme::isSpinUpButtonPartPressed):
* rendering/RenderThemeMac.mm:
(WebCore::getMediaUIPartStateFlags):
(WebCore::RenderThemeMac::updatePressedState):
* platform/qt/RenderThemeQt.cpp:
(WebCore::RenderThemeQt::getMediaControlForegroundColor):
Check that the inspected Node is an Element before asking if it's active.
* html/HTMLAnchorElement.cpp:
(WebCore::HTMLAnchorElement::setActive):
Call the right superclass.
* html/HTMLAnchorElement.h:
* html/HTMLLabelElement.h:
* html/shadow/MediaControlElementTypes.h:
Sprinkle OVERRIDE>
2013-05-26 Andreas Kling <akling@apple.com>
Move Node::dispatchSimulatedClick() to Element.
<http://webkit.org/b/116784>
Reviewed by Antti Koivisto.
Only Elements use the dispatchSimulatedClick() functionality, so move it there.
* dom/Node.cpp:
* dom/Node.h:
* dom/Element.h:
* dom/Element.cpp:
(WebCore::Element::dispatchSimulatedClick):
* dom/EventDispatcher.h:
* dom/EventDispatcher.cpp:
(WebCore::EventDispatcher::dispatchSimulatedClick):
2013-05-26 Andreas Kling <akling@apple.com>
TreeScope::rootNode() should return a ContainerNode.
<http://webkit.org/b/116782>
Reviewed by Antti Koivisto.
The rootNode() of a TreeScope is always a ContainerNode, so update pointer types to reflect that.
This lets us take advantage of Antti's optimized traversal functions.
* dom/ContainerNode.h:
(WebCore::Node::isTreeScope):
* dom/Document.cpp:
(WebCore::Document::buildAccessKeyMap):
* dom/Node.cpp:
(WebCore::Node::containingShadowRoot):
* dom/Node.h:
* dom/TreeScope.h:
(WebCore::TreeScope::rootNode):
(TreeScope):
* page/FocusController.cpp:
(WebCore::FocusNavigationScope::rootNode):
(WebCore::FocusNavigationScope::owner):
* page/FocusController.h:
(FocusNavigationScope):
2013-05-26 Andreas Kling <akling@apple.com>
FocusController::setFocusedNode() should be setFocusedElement().
<http://webkit.org/b/116780>
Reviewed by Antti Koivisto.
Only Elements can have focus, so make the public API of FocusController take Element*.
* WebCore.exp.in:
* page/FocusController.h:
* page/FocusController.cpp:
(WebCore::FocusController::setFocusedElement):
Out with the setFocusedNode(), in with the setFocusedElement().
* dom/Element.cpp:
(WebCore::Element::focus):
(WebCore::Element::blur):
* page/EventHandler.cpp:
(WebCore::EventHandler::dispatchMouseEvent):
* plugins/PluginView.cpp:
(WebCore::PluginView::focusPluginElement):
* editing/FrameSelection.cpp:
(WebCore::FrameSelection::setFocusedNodeIfNeeded):
Tweak for FocusController taking Element* instead of Node*.
(WebCore::FrameSelection::setFocusedElementIfNeeded):
Renamed from setFocusedNodeIfNeeded().
* editing/htmlediting.h:
* editing/htmlediting.cpp:
(WebCore::enclosingAnchorElement):
Cleaned up the loop for readability and made it return an Element.
2013-05-26 Andreas Kling <akling@apple.com>
Move some form control things from Element to HTMLFormControlElement.
<http://webkit.org/b/116779>
Reviewed by Antti Koivisto.
The following methods sit better on HTMLFormControlElement than on Element:
- formControlType()
- wasChangedSinceLastFormControlChangeEvent()
- setChangedSinceLastFormControlChangeEvent()
- dispatchFormControlChangeEvent()
Moved them, and devirtualized as much as possible.
* dom/Document.cpp:
(WebCore::Document::setFocusedNode):
Check if the old focus target is an Element before (possibly) dispatching a change event.
* dom/Element.cpp:
* dom/Element.h:
Removed some stub methods that were only used by HTMLFormControlElement subclasses.
* html/HTMLFormControlElement.cpp:
* html/HTMLFormControlElement.h:
(WebCore::isHTMLFormControlElement):
(WebCore::toHTMLFormControlElement):
Add toHTMLFormControlElement() helper with ASSERT_WITH_SECURITY_IMPLICATION.
* html/HTMLTextFormControlElement.h:
Sprinkle OVERRIDE.
2013-05-25 Andreas Kling <akling@apple.com>
Move Node::supportsFocus() to Element.
<http://webkit.org/b/116778>
Reviewed by Antti Koivisto.
Node never supports focus, so move supportsFocus() to Element instead.
* dom/Element.h:
* dom/Node.cpp:
* dom/Node.h:
Removed Node::supportsFocus(), it always returned false anyway.
* accessibility/AccessibilityNodeObject.cpp:
(WebCore::AccessibilityNodeObject::canSetFocusAttribute):
Check that the underlying Node is an Element before asking if it supports focus.
* html/HTMLAnchorElement.h:
* html/HTMLAreaElement.h:
* html/HTMLBodyElement.h:
* html/HTMLElement.h:
* html/HTMLFieldSetElement.h:
* html/HTMLFormControlElement.h:
* html/HTMLFrameElementBase.h:
* html/HTMLMediaElement.h:
* html/HTMLOptGroupElement.h:
* html/HTMLOptionElement.h:
* html/HTMLOutputElement.h:
* svg/SVGAElement.h:
* svg/SVGCircleElement.h:
* svg/SVGEllipseElement.h:
* svg/SVGGElement.h:
* svg/SVGImageElement.h:
* svg/SVGLineElement.h:
* svg/SVGPathElement.h:
* svg/SVGPolyElement.h:
* svg/SVGRectElement.h:
* svg/SVGSVGElement.h:
* svg/SVGSwitchElement.h:
* svg/SVGSymbolElement.h:
* svg/SVGTextElement.h:
* svg/SVGUseElement.h:
OVERRIDE ALL THE THINGS!
2013-05-25 Andreas Kling <akling@apple.com>
Move Node::isFocusable() to Element.
<http://webkit.org/b/116777>
Reviewed by Anders Carlsson.
Nodes cannot be focusable, so move isFocusable() from Node to Element.
* dom/Node.cpp:
* dom/Node.h:
* dom/Element.h:
* dom/Element.cpp:
(WebCore::Element::isFocusable):
Moved here from Node.
* dom/Document.cpp:
(WebCore::Document::setFocusedNode):
* accessibility/AccessibilityNodeObject.cpp:
(WebCore::AccessibilityNodeObject::determineAccessibilityRole):
Check that the underlying node is an Element before asking if it's focusable.
* page/FrameView.cpp:
(WebCore::FrameView::scrollToAnchor):
Renamed the 'anchorNode' variable to 'anchorElement' because reasons.
* html/HTMLAreaElement.h:
* html/HTMLFormControlElement.h:
* html/HTMLLabelElement.h:
* html/HTMLOptionElement.h:
* svg/SVGAElement.h:
Sprinkle OVERRIDE.
* html/ValidationMessage.cpp:
(WebCore::ValidationMessage::setMessage):
Update a comment to refer to Element::isFocusable() instead of Node.
2013-05-25 Andreas Kling <akling@apple.com>
Move Node::tabIndex() to Element.
<http://webkit.org/b/116772>
Reviewed by Ryosuke Niwa.
Since only Elements are keyboard-focusable, it doesn't make sense for Node to have a tabIndex().
* dom/Element.h:
* dom/Node.cpp:
* dom/Node.h:
A Node can't have a tab index, so move tabIndex() to Element.
* page/FocusController.h:
* page/FocusController.cpp:
(WebCore::adjustedTabIndex):
(WebCore::FocusController::findElementWithExactTabIndex):
(WebCore::nextElementWithGreaterTabIndex):
(WebCore::previousElementWithLowerTabIndex):
(WebCore::FocusController::nextFocusableNode):
(WebCore::FocusController::previousFocusableNode):
Make this code deal in Element* when doing tab index stuff. FocusController needs
more Node->Element cleanup, but let's do that separately.
* html/HTMLAnchorElement.h:
* html/HTMLElement.h:
* html/HTMLFormControlElement.h:
Sprinkle OVERRIDE.
2013-05-25 Andreas Kling <akling@apple.com>
Don't instantiate ChildNodeLists just to get a child count.
<http://webkit.org/b/116776>
Reviewed by Ryosuke Niwa.
Use ContainerNode::childNodeCount() instead of Node::childNodes()->length().
* editing/ApplyStyleCommand.cpp:
(WebCore::ApplyStyleCommand::mergeEndWithNextIfIdentical):
2013-05-25 Andreas Kling <akling@apple.com>
PluginDocument::pluginNode() should be pluginElement() instead.
<http://webkit.org/b/116774>
Reviewed by Anders Carlsson.
Make PluginDocument hand out a HTMLPlugInElement* instead of a Node*.
* dom/Document.cpp:
(WebCore::eventTargetNodeForDocument):
* html/PluginDocument.h:
* html/PluginDocument.cpp:
(WebCore::PluginDocumentParser::createDocumentStructure):
(WebCore::PluginDocument::pluginWidget):
(WebCore::PluginDocument::setPluginElement):
(WebCore::PluginDocument::detach):
2013-05-25 Andreas Kling <akling@apple.com>
Remove Document::getFocusableNodes().
<http://webkit.org/b/116773>
Reviewed by Joseph Pecoraro.
This was added in r42191 and there are no remaining clients of the API.
* dom/Document.cpp:
* dom/Document.h:
* WebCore.exp.in:
2013-05-25 Andreas Kling <akling@apple.com>
Move Node::focusDelegate() to Element.
<http://webkit.org/b/116768>
Reviewed by Anders Carlsson.
Only Element can be a focus delegate (it's currently only ever HTMLInputElement actually)
so move Node::focusDelegate() to Element. Sprinkled isElementNode() checks as needed.
* dom/Node.cpp:
* dom/Node.h:
* dom/Element.h:
* dom/Element.cpp:
* html/shadow/SliderThumbElement.cpp:
(WebCore::SliderThumbElement::focusDelegate):
* html/shadow/SliderThumbElement.h:
* rendering/RenderTheme.cpp:
(WebCore::RenderTheme::isFocused):
* rendering/RenderThemeMac.mm:
(WebCore::RenderThemeMac::paintSliderThumb):
2013-05-25 Alberto Garcia <agarcia@igalia.com>
Path: clean up addPathForRoundedRect()
https://bugs.webkit.org/show_bug.cgi?id=116765
Reviewed by Andreas Kling.
Reorganize code that is a bit redundant.
No new tests, no behavior change.
* platform/graphics/Path.cpp:
(WebCore::Path::addPathForRoundedRect):
2013-05-25 Simon Fraser <simon.fraser@apple.com>
Unprefix Page Visibility API
https://bugs.webkit.org/show_bug.cgi?id=102340
Reviewed by Tim Horton.
Remove prefixes from the document properties, and the visibilitychanged event.
Rename the "preview" state to "unloaded". The "unloaded" state is never
reached yet (see https://bugs.webkit.org/show_bug.cgi?id=116769).
Add some comments to places where we should update the visibility state
when going in and out of the page cache, but cannot safely do so yet.
Tested by existing Page Visibility tests.
* dom/Document.cpp:
(WebCore::Document::pageVisibilityState):
(WebCore::Document::visibilityState):
(WebCore::Document::hidden):
(WebCore::Document::dispatchVisibilityStateChangeEvent):
* dom/Document.h:
* dom/Document.idl:
* dom/EventNames.h:
* history/CachedFrame.cpp:
(WebCore::CachedFrameBase::restore):
* loader/FrameLoader.cpp:
(WebCore::FrameLoader::stopLoading):
* page/Page.cpp:
(WebCore::Page::setVisibilityState):
* page/PageVisibilityState.cpp:
(WebCore::pageVisibilityStateString):
* page/PageVisibilityState.h:
2013-05-25 Andreas Kling <akling@apple.com>
Move Node::isMouseFocusable() to Element.
<http://webkit.org/b/116762>
Reviewed by Anders Carlsson.
Node::isMouseFocusable() would just return isFocusable(), which is never true for a non-Element
since Node::supportsFocus() always returns false. So move it to Element!
* dom/Node.h:
* dom/Node.cpp:
* dom/Element.h:
* dom/Element.cpp:
(WebCore::Element::isMouseFocusable):
Moved here from Node.
* editing/FrameSelection.cpp:
(WebCore::FrameSelection::setFocusedNodeIfNeeded):
* page/EventHandler.cpp:
(WebCore::EventHandler::dispatchMouseEvent):
Walk up the parent chain with parentOrShadowHostElement() instead of parentOrShadowHostNode().
Removed a misleading no-op hunk about mouse-focusable ShadowRoots, since ShadowRoots are not
Elements and thus cannot be mouse-focusable.
* page/TouchAdjustment.cpp:
(WebCore::TouchAdjustment::nodeRespondsToTapGesture):
Check that the Node is an Element before asking if it's mouse-focusable.
* html/HTMLAnchorElement.h:
* html/HTMLAreaElement.h:
* html/HTMLFormControlElement.h:
* html/HTMLInputElement.h:
* html/HTMLMediaElement.h:
* html/HTMLSelectElement.h:
* html/HTMLTextAreaElement.h:
* html/shadow/ClearButtonElement.h:
* html/shadow/TextControlInnerElements.h:
* svg/SVGAElement.h:
* svg/SVGStyledElement.h:
Sprinkle OVERRIDE.
2013-05-25 Andreas Kling <akling@apple.com>
Move Node::isKeyboardFocusable() to Element.
<http://webkit.org/b/116761>
Reviewed by Antti Koivisto.
Only Elements can be keyboard-focusable. Move the base isKeyboardFocusable() implementation to Element
and sprinkle OVERRIDE on subclass overrides.
FocusController gets some temporary type checks that will go away as that code moves to dealing in
Elements instead of Node.
* dom/Node.h:
* dom/Node.cpp:
* dom/Element.h:
* dom/Element.cpp:
(WebCore::Element::isKeyboardFocusable):
Move isKeyboardFocusable() from Node to Element.
* page/FocusController.cpp:
(WebCore::isNonFocusableShadowHost):
(WebCore::isFocusableShadowHost):
(WebCore::shouldVisit):
(WebCore::FocusController::advanceFocusInDocumentOrder):
Check that the inspected Node is an Element before querying isKeyboardFocusable().
* html/HTMLAnchorElement.h:
* html/HTMLAreaElement.h:
* html/HTMLFormControlElement.h:
* html/HTMLFrameOwnerElement.h:
* html/HTMLInputElement.h:
* html/HTMLPlugInElement.h:
* html/HTMLSelectElement.h:
* html/HTMLTextAreaElement.h:
* svg/SVGAElement.h:
* svg/SVGStyledElement.h:
Sprinkle OVERRIDE.
2013-05-25 Andreas Kling <akling@apple.com>
Begin moving "focus" state logic from Node to Element.
<http://webkit.org/b/116760>
Reviewed by Antti Koivisto.
Only Elements can be focused, so merge the "focus" state logic from Node and ContainerNode
and move it into Element. There's a lot more iceberg under this tip, but we'll be starting
with setFocus(bool) and focused().
* dom/Node.h:
* dom/ContainerNode.cpp:
* dom/ContainerNode.h:
* dom/Element.cpp:
(WebCore::Element::isUserActionElementFocused):
(WebCore::Element::setFocus):
* dom/Element.h:
(WebCore::Element::focused):
* dom/Node.cpp:
Move focused() and setFocus(bool) from Node/ContainerNode to Element.
* dom/Document.cpp:
(WebCore::Document::setFocusedNode):
* page/EventHandler.cpp:
(WebCore::EventHandler::dispatchMouseEvent):
Check if the inspected Node is an Element before asking if it's focused.
2013-05-25 Noam Rosenthal <noam.rosenthal@nokia.com>
Direct pattern compositing breaks when no-repeat is set on a large layer
https://bugs.webkit.org/show_bug.cgi?id=116140
Reviewed by Antti Koivisto.
In some cases the directly composited background color logic overrides the layer's
contentsRect, which results in wrong rendering of tiled images.
This patch makes sure that the background image is applied after the solid color,
which ensures the correct contentsRect.
Test: compositing/patterns/direct-pattern-compositing-contain-no-repeat.html
* rendering/RenderLayerBacking.cpp:
(WebCore::RenderLayerBacking::updateDirectlyCompositedContents):
2013-05-24 Andreas Kling <akling@apple.com>
Move "hover" state logic from Node to Element.
<http://webkit.org/b/116757>
Reviewed by Antti Koivisto.
Resolve a 7 year old FIXME by merging the "hover" state logic from Node and ContainerNode
and moving it all to Element instead.
* dom/Node.cpp:
(WebCore::Node::detach):
* dom/Element.cpp:
(WebCore::Element::detach):
Move Document::hoveredNodeDetached() call from Node::detach() to Element::detach().
(WebCore::Element::isUserActionElementHovered):
(WebCore::Element::setHovered):
* dom/Element.h:
(WebCore::Element::hovered):
Moved here from Node/ContainerNode.
* dom/UserActionElementSet.h:
(WebCore::UserActionElementSet::setHovered):
(WebCore::UserActionElementSet::setFlags):
Make setHovered() take an Element* instead of a Node*. I'd like to do this will all
of these methods eventually, so added a setFlags() helper with the tighter type.
* html/HTMLLabelElement.h:
* html/shadow/SpinButtonElement.h:
Sprinkle OVERRIDE on setHovered() overrides.
* dom/Document.cpp:
(WebCore::Document::updateHoverActiveState):
* accessibility/AccessibilityNodeObject.cpp:
(WebCore::AccessibilityNodeObject::isHovered):
* rendering/RenderTheme.cpp:
(WebCore::RenderTheme::isHovered):
Check if the inspected Node is an element before asking if it's hovered.
2013-05-25 Andreas Kling <akling@apple.com>
Document::formController() should return a reference.
<http://webkit.org/b/116758>
Reviewed by Antti Koivisto.
The formController() is created on demand, so return a reference instead.
* dom/Document.h:
* dom/Document.cpp:
(WebCore::Document::formController):
(WebCore::Document::setStateForNewFormElements):
* html/HTMLFormControlElementWithState.cpp:
(WebCore::HTMLFormControlElementWithState::HTMLFormControlElementWithState):
(WebCore::HTMLFormControlElementWithState::~HTMLFormControlElementWithState):
(WebCore::HTMLFormControlElementWithState::didMoveToNewDocument):
(WebCore::HTMLFormControlElementWithState::finishParsingChildren):
* html/HTMLFormElement.cpp:
(WebCore::HTMLFormElement::~HTMLFormElement):
(WebCore::HTMLFormElement::finishParsingChildren):
* html/HTMLInputElement.cpp:
(WebCore::HTMLInputElement::~HTMLInputElement):
(WebCore::HTMLInputElement::didMoveToNewDocument):
(WebCore::HTMLInputElement::checkedRadioButtons):
2013-05-25 Sergio Villar Senin <svillar@igalia.com>
Reducing CSS code duplication in declaration list error recovery
https://bugs.webkit.org/show_bug.cgi?id=115157
Reviewed by Andreas Kling.
From Blink r148974 by <serya@chromium.org>
Refactor "invalid_block_list error | /* empty */" in a new
decl_list_recovery rule that allows to remove 4 redundant rules.
No new test required as we're just refactoring code, no new behaviour.
* css/CSSGrammar.y.in:
2013-05-24 Ryosuke Niwa <rniwa@webkit.org>
Build fix after r150664.
* bindings/scripts/test/JS/JSTestObj.cpp:
(WebCore):
2013-05-24 Sergio Villar Senin <svillar@igalia.com>
Fixing invalid block recovery in some declaration list.
https://bugs.webkit.org/show_bug.cgi?id=115159
Reviewed by Darin Adler.
From Blink r148889 by <serya@chromium.org>
Improves the detection of some invalid block declarations inside a
declaration list. This allows the parser not to completely discard
a whole declaration list that contains an invalid block. In
particular grammar failed in tests 8, 12, 13, 15, 16 and 17 in the
new test added by this change.
Test: fast/css/parsing-invalid-block-recovery.html
* css/CSSGrammar.y.in:
2013-05-24 Beth Dakin <bdakin@apple.com>
DidFirstFlushForHeaderLayer can be called too soon on pages that redirect
https://bugs.webkit.org/show_bug.cgi?id=116749
-and corresponding-
<rdar://problem/13886753>
Reviewed by Simon Fraser.
Only start m_paintRelatedMilestonesTimer if we have actually painted.
* rendering/RenderLayerCompositor.cpp:
(WebCore::RenderLayerCompositor::flushPendingLayerChanges):
2013-05-24 Anders Carlsson <andersca@apple.com>
Fix Windows build.
* WebCore.vcproj/WebCore.vcproj:
* WebCore.vcxproj/WebCore.vcxproj:
* WebCore.vcxproj/WebCore.vcxproj.filters:
2013-05-24 Tim Horton <timothy_horton@apple.com>
Animated GIFs don't repaint after TiledCoreAnimationDrawingArea un-suspends painting
https://bugs.webkit.org/show_bug.cgi?id=116744
<rdar://problem/13973514>
Reviewed by Simon Fraser.
* WebCore.exp.in: Export FrameView::resumeAnimatingImages.
* page/FrameView.cpp:
(WebCore::FrameView::setIsInWindow):
(WebCore::FrameView::resumeAnimatingImages):
Factor the code to restart animated images out of frameView::setIsInWindow.
* page/FrameView.h:
(FrameView):
2013-05-24 Anders Carlsson <andersca@apple.com>
Move history property list writer to WebKit
https://bugs.webkit.org/show_bug.cgi?id=116746
Reviewed by Tim Horton.
Remove files from the Xcode project and remove symbols that now live in WebKit.
* WebCore.exp.in:
* WebCore.xcodeproj/project.pbxproj:
2013-05-24 Christophe Dumez <ch.dumez@sisa.samsung.com>
Global constructors exposed in worker environment have wrong attributes
https://bugs.webkit.org/show_bug.cgi?id=116708
Reviewed by Geoffrey Garen.
Fix JSC bindings generator so that Global constructors exposed in worker environment
have the following attributes:
{ [[Writable]]: true, [[Enumerable]]: false, [[Configurable]]: true }
This is now consistent with global constructors on DOMWindow and with the Web IDL
specification:
http://dev.w3.org/2006/webapi/WebIDL/#es-interfaces
Test: fast/js/global-constructors-attributes-worker.html
* bindings/scripts/CodeGeneratorJS.pm:
(GenerateAttributesHashTable):
2013-05-24 Christophe Dumez <ch.dumez@sisa.samsung.com>
Remove custom code for webkitAudioContext global constructor getter
https://bugs.webkit.org/show_bug.cgi?id=116530
Reviewed by Geoffrey Garen.
Get rid of custom code for webkitAudioContext global constructor getter. The
global DOMWindow attribute is now automatically generated by leveraging support
for [EnabledAtRuntime] extended attribute and the existing methods in
RuntimeEnabledFeatures class.
No new tests, no behavior change.
* GNUmakefile.list.am: Remove JSDOMWindowWebAudioCustom.*.
* Modules/webaudio/AudioContext.idl:
Remove [NoInterfaceObject] extended attribute so that the global constructor is
automatically generated instead of automatically added. Add [EnabledAtRuntime]
extended attribute since this global constructor can be disabled at runtime and
so that we can getter rid of the [CustomGetter] for the corresponding global
constructor. Use [InterfaceName] extended attribute so that the interface name
matches the global constructor on DOMWindow (webkitAudioContext).
* Target.pri: Remove JSDOMWindowWebAudioCustom.*.
* UseJSC.cmake: Remove JSDOMWindowWebAudioCustom.*.
* WebCore.exp.in: Export additional symbol.
* WebCore.order: Export additional symbol.
* WebCore.vcproj/WebCore.vcproj: Remove JSDOMWindowWebAudioCustom.*.
* WebCore.vcxproj/WebCore.vcxproj: Remove JSDOMWindowWebAudioCustom.*.
* WebCore.vcxproj/WebCore.vcxproj.filters: Remove JSDOMWindowWebAudioCustom.*.
* WebCore.xcodeproj/project.pbxproj: Remove JSDOMWindowWebAudioCustom.*.
* bindings/generic/RuntimeEnabledFeatures.h:
(WebCore::RuntimeEnabledFeatures::setWebAudioEnabled):
* bindings/js/JSBindingsAllInOne.cpp: Remove JSDOMWindowWebAudioCustom.*.
* bindings/js/JSDOMWindowWebAudioCustom.cpp: Removed. We no longer need any custom code for
the WebAudio global constructor getter because we use [EnabledAtRuntime] support in the
bindings generator now.
* page/DOMWindow.idl: Remove global constructor for AudioContext as it is now automatically
generated.
* page/Settings.in: Remove webAudioEnabled setting as we use the existing setting
in RuntimeEnabledFeatures now.
2013-05-24 Seokju Kwon <seokju.kwon@gmail.com>
[AC] Needs to be guarded by USE(ACCELERATED_COMPOSITING)
https://bugs.webkit.org/show_bug.cgi?id=116712
Reviewed by Andreas Kling.
renderView is used when ACCELERATED_COMPOSITING is enabled.
So, this patch allows it to be guarded by USE(ACCELERATED_COMPOSITING).
No new tests, no behavior change.
* page/FrameView.cpp:
(WebCore::FrameView::setFrameRect):
2013-05-24 Thomas Deniau <deniau@apple.com>
Add more lines to the context during Dictionary lookups
https://bugs.webkit.org/show_bug.cgi?id=115256
Reviewed by Ryosuke Niwa.
No new tests - no new functionality.
* WebCore.exp.in: Export a few methods in VisibleUnits needed to be able
to call previousLinePosition(), nextLinePosition(), startOfLine() and
endOfLine() in WebPageMac.mm when determining the context while looking
up a dictionary definition. These symbols used to be exported for iOS
only, export them on the desktop too.
2013-05-24 Anders Carlsson <andersca@apple.com>
Remove PagePopup code
https://bugs.webkit.org/show_bug.cgi?id=116732
Reviewed by Andreas Kling.
Remove all page popup code.
* GNUmakefile.list.am:
* WebCore.xcodeproj/project.pbxproj:
* dom/ContextFeatures.cpp:
* dom/ContextFeatures.h:
* loader/EmptyClients.h:
* page/ChromeClient.h:
* page/DOMWindowPagePopup.cpp: Removed.
* page/DOMWindowPagePopup.h: Removed.
* page/DOMWindowPagePopup.idl: Removed.
* page/PagePopup.h: Removed.
* page/PagePopupClient.cpp: Removed.
* page/PagePopupClient.h: Removed.
* page/PagePopupController.cpp: Removed.
* page/PagePopupController.h: Removed.
* page/PagePopupController.idl: Removed.
* page/PagePopupDriver.h: Removed.
* testing/Internals.cpp:
(WebCore::Internals::resetToConsistentState):
(WebCore):
* testing/Internals.h:
(WebCore):
(Internals):
* testing/Internals.idl:
* testing/MockPagePopupDriver.cpp: Removed.
* testing/MockPagePopupDriver.h: Removed.
2013-05-24 Jer Noble <jer.noble@apple.com>
Mac: Set the default audio buffer size to a large value for <video> elements.
https://bugs.webkit.org/show_bug.cgi?id=116342
Reviewed by Eric Carlson.
Roll-in rubber stamped by Eric Carlson.
To enable power savings by waking up the audio hardware less often, set the
requested buffer frame size to a large value, such as 4096. Since this results
in approximately 100ms worth of buffer, set the buffer size to a much lower
value when playing WebAudio, which is much more sensitive to latency than video
or audio elements.
Introduce a new class, AudioSessionManager, as well as a helper class,
AudioSessionManagerToken. Audio elements, video elements, and WebAudio destination
nodes will create and retain a token, and release the token in their destructor.
This allows the AudioSessionManager to track how many of what type of audio-
generating objects are in existence.
This requires implementing AudioSession for Mac platforms. Move the implementation
for retrieving the hardware sample rate and setting the buffer duration into
AudioSessionMac from AudioDestinationMac, to be shared with AudioSessionManagerMac.
Change the AudioSession method preferredBufferLength() into preferredBufferSize(),
as the callers really want to specify a buffer size, not a buffer duration. On iOS,
where the available API requires a duration, perform the conversion from duration to
size on behalf of the caller.
However, since the original version of this patch caused media test
failures on the Mac ML and Lion bots, only enable the buffer size
change for OS X > ML.
* html/HTMLMediaElement.h: Add a AudioSessionManagerToken member.
* html/HTMLMediaElement.cpp:
(WebCore::HTMLMediaElement::HTMLMediaElement): Initialize the token.
* platform/audio/AudioSession.cpp:
(WebCore::AudioSession::preferredBufferSize): Renamed from preferredBufferLength.
(WebCore::AudioSession::setPreferredBufferSize): Renamed from setPreferredBufferLength.
* platform/audio/AudioSession.h:
* platform/audio/AudioSessionManager.cpp:
(AudioSessionManagerToken::create): Simple factory method.
(AudioSessionManagerToken::AudioSessionManagerToken): Call AudioSessionManager::incrementCount().
(AudioSessionManagerToken::~AudioSessionManagerToken): Call AudioSessionManager::decrementCount().
(AudioSessionManager::sharedManager): Simple singleton method.
(AudioSessionManager::AudioSessionManager): Simple constructor.
(AudioSessionManager::has): Return whether the type is present.
(AudioSessionManager::incrementCount): Increment, then call updateSessionState()
(AudioSessionManager::decrementCount): Decrement, then call updateSessionState()
(AudioSessionManager::updateSessionState): Stub, does nothing.
* platform/audio/AudioSessionManager.h:
* platform/audio/ios/AudioDestinationIOS.cpp:
(WebCore::AudioDestinationIOS::configure): Call setPreferredBufferSize() instead of setPreferredBufferLength()
* platform/audio/ios/AudioSessionIOS.mm:
(WebCore::AudioSession::preferredBufferSize): Renamed from preferredBufferLength.
(WebCore::AudioSession::setPreferredBufferSize): Renamed from setPreferredBufferLength
* platform/audio/mac/AudioDestinationMac.cpp:
(WebCore::AudioDestination::hardwareSampleRate): Call AudioSession::sampleRate().
(WebCore::AudioDestinationMac::AudioDestinationMac): Create the AudioSessionManagerToken.
(WebCore::AudioDestinationMac::configure): Do not set the buffer size (this is done in AudioSessionManagerMac).
* platform/audio/mac/AudioDestinationMac.h:
* platform/audio/mac/AudioSessionMac.cpp: Added.
(WebCore::defaultDevice): Added, returns the default audio device.
(WebCore::AudioSession::AudioSession): Simple constructor.
(WebCore::AudioSession::~AudioSession): Simple destructor.
(WebCore::AudioSession::category): Stub, unimplemented.
(WebCore::AudioSession::setCategory): Ditto.
(WebCore::AudioSession::categoryOverride): Ditto.
(WebCore::AudioSession::setCategoryOverride): Ditto.
(WebCore::AudioSession::numberOfOutputChannels): Ditto.
(WebCore::AudioSession::setActive): Ditto.
(WebCore::AudioSession::sampleRate): Use the HAL to return the default audio device sample rate.
(WebCore::AudioSession::preferredBufferSize): Return the current HAL setting.
(WebCore::AudioSession::setPreferredBufferSize): Set the buffer size.
* platform/audio/mac/AudioSessionManagerMac.cpp:
(AudioSessionManager::updateSessionState): Set the buffer size depending on what audio outputs are present.
* WebCore.xcodeproj/project.pbxproj: Add the new files to the project.
2013-05-24 Alberto Garcia <agarcia@igalia.com>
Path: upstream the missing bits from the BlackBerry port
https://bugs.webkit.org/show_bug.cgi?id=116658
Reviewed by Xan Lopez.
PathBlackBerry was upstreamed a while ago (r144612) but a few bits
were missing from the cross-platform code.
* platform/graphics/Path.cpp:
(WebCore::Path::addPathForRoundedRect):
* platform/graphics/Path.h:
(Graphics):
(Path):
2013-05-24 Noam Rosenthal <noam@webkit.org>
WebProcess is crashing on http://achicu.github.io/css-presentation when direct pattern compositing is enabled
https://bugs.webkit.org/show_bug.cgi?id=115135
Reviewed by Antti Koivisto.
Issue is invoked when there is a visibility:hidden layer with a non-compositable
background image (e.g. a radial gradient).
The layer is treated as a no-contents layer because of its visibility, however
updateDirectlyCompositedBackgroundImage() later mistakenly treats it as a layer
with direct background-image compositing.
Fixed by returning early from updating directly composited contents for layers
with hidden contents.
Test: compositing/patterns/direct-pattern-compositing-hidden-radial-gradient.html
* rendering/RenderLayerBacking.cpp:
(WebCore::RenderLayerBacking::updateDirectlyCompositedContents):
(WebCore::RenderLayerBacking::updateDirectlyCompositedBackgroundImage):
(WebCore::RenderLayerBacking::paintsChildren):
(WebCore::RenderLayerBacking::isDirectlyCompositedImage):
2013-05-24 Robert Hogan <robert@webkit.org>
Refactor shouldAddBorderPaddingMargin()
https://bugs.webkit.org/show_bug.cgi?id=98803
Reviewed by Ryosuke Niwa.
Make this helper function less clever-stupid in its misguided sacrifice of intelligibility
for the sake of concision.
No new tests, refactoring.
* rendering/RenderBlockLineLayout.cpp:
(WebCore::shouldAddBorderPaddingMargin):
(WebCore::inlineLogicalWidth):
2013-05-24 Xiaobo Wang <xiaobwang@blackberry.com>
[BlackBerry] DRT - crashed on GraphicsContext3D::makeContextCurrent
https://bugs.webkit.org/show_bug.cgi?id=116654
Reviewed by Carlos Garcia Campos.
PR 331552.
Internally reviewed and amended by Arvid Nilsson.
No new tests, this patch is to fix DRT crashes in fast/canvas/webgl.
The instance of GraphicsContext3D has already been destroyed but
WebGLLayerWebKitThread is not aware of that. This is because compositor
layer of the WebGL graphics context was referenced outside the context.
So when destructing GraphicsContext3D the compositing layer was not
destructed.
Fix by setting m_webGLContext to 0 when destructing GrapthicsContext3D
after releasing the compositor layer, so that it won't be de-referenced
again later.
* platform/graphics/blackberry/GraphicsContext3DBlackBerry.cpp:
(WebCore::GraphicsContext3D::~GraphicsContext3D):
* platform/graphics/blackberry/WebGLLayerWebKitThread.cpp:
(WebCore::WebGLLayerWebKitThread::~WebGLLayerWebKitThread):
(WebCore::WebGLLayerWebKitThread::webGLContextDestroyed):
(WebCore):
* platform/graphics/blackberry/WebGLLayerWebKitThread.h:
(WebGLLayerWebKitThread):
2013-05-24 Andreas Kling <akling@apple.com>
Typing in Safari's unified field causes unnecessary web content repaints.
<http://webkit.org/b/116703>
Reviewed by Andy Estes.
Break out an alternate version of Page::markAllMatchesForText() that only counts the number of times
a string occurs in the page, but doesn't try to mark the occurrences.
This allows Safari to count matches for the 'Find "foo" on This Page' functionality in the unified
location bar without causing tile repaints.
* WebCore.exp.in:
* page/Page.h:
* page/Page.cpp:
(WebCore::Page::findMatchesForText):
(WebCore::Page::markAllMatchesForText):
(WebCore::Page::countFindMatches):
Renamed markAllMatchesForText() to findMatchesForText() and gave it a boolean parameter to control whether
matches should be marked or not. countFindMatches() is the new helper that doesn't mark.
2013-05-23 Beth Dakin <bdakin@apple.com>
https://bugs.webkit.org/show_bug.cgi?id=116702
REGRESSION (r150399): Scrollbar missing for all overflow scroll
-and corresponding-
<rdar://problem/13963712>
Reviewed by Simon Fraser.
This was a silly copy-paste error.
* rendering/RenderLayer.cpp:
(WebCore::RenderLayer::scrollbarAnimationsAreSuppressed):
2013-05-23 peavo@outlook.com <peavo@outlook.com>
[WinCairo] Build fails to link.
https://bugs.webkit.org/show_bug.cgi?id=116671
Reviewed by Brent Fulgham.
* page/FrameView.h: Added guard for ACCELERATED_COMPOSITING.
2013-05-23 Roger Fong <roger_fong@apple.com>
Unreviewed. Modify WebCore for AppleWin 2010 production build.
* WebCore.vcxproj/WebCoreGenerated.make:
(WebCore::AXObjectCache::frameLoadingEventPlatformNotification):
* platform/graphics/avfoundation/cf/MediaPlayerPrivateAVFoundationCF.cpp:
2013-05-23 Yongjun Zhang <yongjun_zhang@apple.com>
We need to clear main resource when detaching DocumentLoader from the frame.
https://bugs.webkit.org/show_bug.cgi?id=116680
Normally, when we detach the documentLoader in DocumentLoader::detachFromFrame, main resource is also cleared
in stopLoading(). There is possibility that main resource not being cleared, and this could cause crash later
since docLoader could still receive resource callbacks. To avoid that, we can remove docLoader from main resource's
client set in detachFromFrame.
Reviewed by Brady Eidson.
No new tests, this doesn't happen on OS X.
* loader/DocumentLoader.cpp:
(WebCore::DocumentLoader::detachFromFrame):
(WebCore::DocumentLoader::clearMainResource):
* loader/cache/CachedResource.h: make hasClient accessible publicly.
(WebCore::CachedResource::hasClient):
(CachedResource):
2013-05-23 Mihai Maerean <mmaerean@adobe.com>
assertion failed: !node || node->isElementNode() in WebCore::RenderBlock::clone
https://bugs.webkit.org/show_bug.cgi?id=116614
Reviewed by David Hyatt.
Add a test for flow threads so they don't end up being cloned in region based multi columns with columns:1 where
the only child has column-span:all.
Test: fast/multicol/newmulticol/direct-child-column-span-all.html
* rendering/RenderBlock.cpp:
(WebCore::RenderBlock::addChildIgnoringAnonymousColumnBlocks):
2013-05-23 Anders Carlsson <andersca@apple.com>
Crash in convertMainResourceLoadToDownload when downloading file by option-return
https://bugs.webkit.org/show_bug.cgi?id=116451
Reviewed by Andreas Kling.
Handle MainResourceLoader being null here which will happen when loading a cached main resource.
* loader/DocumentLoader.cpp:
(WebCore::DocumentLoader::continueAfterContentPolicy):
2013-05-23 Benjamin Poulain <bpoulain@apple.com>
KURL::createCFURL() should return a RetainPtr<CFURLRef>
https://bugs.webkit.org/show_bug.cgi?id=116644
Reviewed by Andreas Kling.
For consistency with the other createCFType() APIs in WebKit, KURL should
return a RetainPtr<> instead of raw +1 CFURLRef.
No leak were discovered while making this change.
* platform/KURL.h:
* platform/cf/KURLCFNet.cpp:
(WebCore):
(WebCore::createCFURLFromBuffer):
(WebCore::KURL::createCFURL):
(WebCore::KURL::fileSystemPath):
* platform/graphics/avfoundation/cf/MediaPlayerPrivateAVFoundationCF.cpp:
(WebCore::AVFWrapper::createAssetForURL):
* platform/graphics/cg/GraphicsContextCG.cpp:
(WebCore::GraphicsContext::setURLForRect):
* platform/mac/KURLMac.mm:
(WebCore):
(WebCore::KURL::operator NSURL *):
(WebCore::KURL::createCFURL):
* platform/network/cf/CookieJarCFNet.cpp:
(WebCore::setCookiesFromDOM):
(WebCore::cookiesForDOM):
(WebCore::cookieRequestHeaderFieldValue):
(WebCore::getRawCookies):
(WebCore::deleteCookie):
* platform/network/cf/DNSCFNet.cpp:
(WebCore::DNSResolveQueue::platformProxyIsEnabledInSystemPreferences):
* platform/network/cf/ProxyServerCFNet.cpp:
(WebCore::addProxyServersForURL):
* platform/network/cf/ResourceRequestCFNet.cpp:
(WebCore::ResourceRequest::doUpdatePlatformRequest):
(WebCore::ResourceRequest::doUpdatePlatformHTTPBody):
* platform/network/cf/ResourceResponseCFNet.cpp:
(WebCore::ResourceResponse::cfURLResponse):
* platform/network/cf/SocketStreamHandleCFNet.cpp:
(WebCore::SocketStreamHandle::SocketStreamHandle):
2013-05-18 Robert Hogan <robert@webkit.org>
The ellipsis in a text overflow should not avoid floats
https://bugs.webkit.org/show_bug.cgi?id=115746
Reviewed by David Hyatt.
When placing an ellipsis for text overflow we shouldn't avoid any floats on the line.
That is to say, if there is a float in the box we overflow we should let our no-wrap text,
including the ellipsis, render inside the float just as we would if overflow was hidden but
a text-overflow rendering had not been specified.
Test: fast/css/text-overflow-ellipsis-behind-floats.html
* rendering/RenderBlockLineLayout.cpp:
(WebCore::RenderBlock::checkLinesForTextOverflow):
2013-05-23 Christophe Dumez <ch.dumez@sisa.samsung.com>
Unreviewed, rolling out r150586.
http://trac.webkit.org/changeset/150586
https://bugs.webkit.org/show_bug.cgi?id=116660
Those constructors should be exposed on the WorkerContext, not
the DOMWindow
* fileapi/FileReaderSync.idl:
* workers/WorkerLocation.idl:
2013-05-23 Christophe Dumez <ch.dumez@sisa.samsung.com>
Remove [NoInterfaceObject] from FileReaderSync and WorkerLocation
https://bugs.webkit.org/show_bug.cgi?id=116660
Reviewed by Kentaro Hara.
Remove [NoInterfaceObject] from FileReaderSync and WorkerLocation to match their
respective specifications:
- http://dev.w3.org/2006/webapi/FileAPI/#FileReaderSync
- http://dev.w3.org/html5/workers/#workerlocation
No new tests, covered by existing tests.
* fileapi/FileReaderSync.idl:
* workers/WorkerLocation.idl:
2013-05-23 Christophe Dumez <ch.dumez@sisa.samsung.com>
Remove special case for MessagePortArray from bindings generator
https://bugs.webkit.org/show_bug.cgi?id=116653
Reviewed by Kentaro Hara.
Use MessagePort[] instead of MessagePortArray type in the IDL as MessagePortArray
is not defined on IDL side. This allows us to remove the special case for
MessagePortArray from the bindings generator.
No new tests, no behavior change.
* bindings/js/JSMessageEventCustom.cpp:
(WebCore::JSMessageEvent::data):
* bindings/scripts/CodeGeneratorJS.pm:
(NativeToJSValue): Remove special case for MessagePortArray.
* bindings/scripts/test/CPP/WebDOMTestSerializedScriptValueInterface.cpp:
* bindings/scripts/test/CPP/WebDOMTestSerializedScriptValueInterface.h:
(WebDOMTestSerializedScriptValueInterface):
* bindings/scripts/test/GObject/WebKitDOMTestSerializedScriptValueInterface.cpp:
(webkit_dom_test_serialized_script_value_interface_get_property):
(webkit_dom_test_serialized_script_value_interface_class_init):
* bindings/scripts/test/GObject/WebKitDOMTestSerializedScriptValueInterface.h:
* bindings/scripts/test/JS/JSTestSerializedScriptValueInterface.cpp:
(WebCore::jsTestSerializedScriptValueInterfacePorts):
* bindings/scripts/test/ObjC/DOMTestSerializedScriptValueInterface.h:
* bindings/scripts/test/ObjC/DOMTestSerializedScriptValueInterface.mm:
* bindings/scripts/test/TestSerializedScriptValueInterface.idl: Replace MessagePortArray
by MessagePort[].
* dom/MessageEvent.h:
(WebCore::MessageEvent::ports): The method should return a Vector, not a Vector*
as the array on JavaScript side is not nullable.
* dom/MessageEvent.idl: Replace MessagePortArray by MessagePort[].
2013-05-23 Michał Pakuła vel Rutka <m.pakula@samsung.com>
[EFL] Back, Forward and Stop should be hidden in context menu
https://bugs.webkit.org/show_bug.cgi?id=116615
Reviewed by Christophe Dumez.
Context menu items: Back, Forward, Stop, Reload, should be shown only when
they are able to perform action.
No new tests - no new functionality.
* page/ContextMenuController.cpp:
(WebCore::ContextMenuController::populate):
2013-05-22 Dean Jackson <dino@apple.com>
Rolling out r150555. It borked about 30 media tests.
* WebCore.xcodeproj/project.pbxproj:
* html/HTMLMediaElement.cpp:
(WebCore::HTMLMediaElement::HTMLMediaElement):
* html/HTMLMediaElement.h:
* platform/audio/AudioSession.cpp:
(WebCore):
(WebCore::AudioSession::AudioSession):
(WebCore::AudioSession::preferredBufferDuration):
(WebCore::AudioSession::setPreferredBufferDuration):
* platform/audio/AudioSession.h:
* platform/audio/AudioSessionListener.h:
(AudioSessionListener):
* platform/audio/AudioSessionManager.cpp: Removed.
* platform/audio/AudioSessionManager.h: Removed.
* platform/audio/ios/AudioDestinationIOS.cpp:
(WebCore::AudioDestinationIOS::configure):
* platform/audio/ios/AudioSessionIOS.mm:
(WebCore::AudioSession::preferredBufferDuration):
(WebCore::AudioSession::setPreferredBufferDuration):
* platform/audio/mac/AudioDestinationMac.cpp:
(WebCore::AudioDestination::hardwareSampleRate):
(WebCore::AudioDestinationMac::AudioDestinationMac):
(WebCore::AudioDestinationMac::configure):
* platform/audio/mac/AudioDestinationMac.h:
(AudioDestinationMac):
* platform/audio/mac/AudioSessionMac.cpp: Removed.
* platform/audio/mac/AudioSessionManagerMac.cpp: Removed.
2013-05-20 Jeffrey Pfau <jpfau@apple.com>
Active DOM object resumption should match reason for suspending
https://bugs.webkit.org/show_bug.cgi?id=116476
Add a reason to the arguments for resuming active DOM object and
scheduled tasks and ensure that it matches the suspend reason before
actually resuming the objects.
Reviewed by Joseph Pecoraro.
No new tests, no change in functionality.
* bindings/js/PageScriptDebugServer.cpp:
(WebCore::PageScriptDebugServer::setJavaScriptPaused): Add matching resume reason
* dom/Document.cpp:
(WebCore::Document::resumeActiveDOMObjects): Check for matching resume reason
(WebCore::Document::resumeScheduledTasks): Check for matching resume reason
* dom/Document.h:
(Document):
* dom/ScriptExecutionContext.cpp:
(WebCore::ScriptExecutionContext::resumeActiveDOMObjects): Check for matching resume reason
* dom/ScriptExecutionContext.h:
(ScriptExecutionContext):
(WebCore::ScriptExecutionContext::reasonForSuspendingActiveDOMObjects): Expose suspend reason to subclasses
* history/CachedFrame.cpp:
(WebCore::CachedFrameBase::restore): Add matching resume reason
* page/Frame.cpp:
(WebCore::Frame::resumeActiveDOMObjectsAndAnimations): Add matching resume reason
* page/PageGroupLoadDeferrer.cpp:
(WebCore::PageGroupLoadDeferrer::~PageGroupLoadDeferrer): Add matching resume reason
2013-05-22 Dean Jackson <dino@apple.com>
Don't snapshot plugins that can't be snapshotted
https://bugs.webkit.org/show_bug.cgi?id=116490
Reviewed by Tim Horton.
Some plugins, such as QuickTime, don't support snapshotting. We're
planning on another way to capture snapshots, but in the meantime make
sure that they don't fail to initialise because they were told to
not use accelerated rendering.
* WebCore.exp.in: Export restartSnapshottedPlugin so that it can be used from WK2.
* html/HTMLPlugInImageElement.cpp:
(WebCore::HTMLPlugInImageElement::restartSimilarPlugIns): Don't set the play state before restarting.
(WebCore::HTMLPlugInImageElement::userDidClickSnapshot): Make sure we indicated that this snapshotted plugin was clicked.
* html/HTMLPlugInImageElement.h: Move restartSnapshottedPlugin from protected to public.
* rendering/RenderSnapshottedPlugIn.cpp:
(WebCore::RenderSnapshottedPlugIn::handleEvent): Don't set play state here. Let the restart functions do it.
2013-05-22 Max Vujovic <mvujovic@adobe.com>
[CSS Shaders] valueForCustomFilterTransformParameter should check that renderer is a RenderBox
https://bugs.webkit.org/show_bug.cgi?id=116464
Reviewed by Alexandru Chiculita.
If the renderer is not a RenderBox, we just use a zero size to compute the transform,
like in CSSComputedStyleDeclaration::computedTransform.
Test: css3/filters/custom/custom-filter-crash-inline-computed-style.html
* css/CSSComputedStyleDeclaration.cpp:
(WebCore::valueForCustomFilterTransformParameter):
2013-05-22 Simon Fraser <simon.fraser@apple.com>
Fix assertion in the getComputedStyle-background-shorthand.html test
https://bugs.webkit.org/show_bug.cgi?id=116639
Reviewed by Ryosuke Niwa.
getComputedStyle-background-shorthand.html was asserting under the newly added
code in willBeRemovedFromTree(). The assertion was caused by too many calls to
FrameView::removeSlowRepaintObject(), which happened because we called it for
RenderTexts, which share style with their parent renderer.
RenderText overrides styleWillChange() to do nothing, so we never
call add/removeSlowRepaintObject() for them. Thus we should also skip this
work in willBeRemovedFromTree() for RenderTexts.
* rendering/RenderObject.cpp:
(WebCore::RenderObject::willBeRemovedFromTree):
2013-05-22 Bem Jones-Bey <bjonesbe@adobe.com>
Heap-use-after-free in WebCore::RenderLayerModelObject::hasSelfPaintingLayer
https://bugs.webkit.org/show_bug.cgi?id=116626
Reviewed by David Hyatt.
This is a port of a Blink bug fix by Emil Eklund.
Account for saturated estimated position in RenderBlock::layoutBlockChild.
If the estimated top position is saturated the comparison with oldLogicalTop
might yield a false negative as adding and removing margins, borders etc from
a saturated number might yield incorrect results. If this is the case always
mark for layout.
Minimal test case impractical. See bug for raw fuzzer test case.
* platform/LayoutUnit.h:
(WebCore::LayoutUnit::mightBeSaturated): Add helper method for checking whether
a number might be saturated.
* rendering/RenderBlock.cpp:
(WebCore::RenderBlock::layoutBlockChild): Check if logicalTopEstimate is likely
to be saturated and if so mark for layout.
2013-05-22 Benjamin Poulain <benjamin@webkit.org>
Remove CSSPropertySourceData emptyCSSPropertySourceData
https://bugs.webkit.org/show_bug.cgi?id=116517
Reviewed by Darin Adler.
This was added for chromium and does not seem to be used
anywhere anymore.
* css/CSSParser.cpp:
(WebCore::CSSParser::CSSParser):
* css/CSSPropertySourceData.cpp:
* css/CSSPropertySourceData.h:
2013-05-22 Csaba Osztrogonác <ossy@webkit.org>
Buildfix for !ENABLE(FULLSCREEN_API) platforms.
Rubber-stamped by Ryosuke Niwa.
* rendering/RenderInline.cpp: Missing #if guard added.
(WebCore::RenderInline::splitInlines):
2013-05-22 Ryosuke Niwa <rniwa@webkit.org>
Fix a typo in 150469.
* editing/Editor.cpp:
(WebCore::dispatchEditableContentChangedEvents):
2013-05-22 Ryosuke Niwa <rniwa@webkit.org>
REGRESSION: ASSERTION FAILED: obj->isRenderInline() || obj == this, Bad cast in WebCore::RenderBlock::createLineBoxes
https://bugs.webkit.org/show_bug.cgi?id=110622
Reviewed by David Hyatt.
Merge https://chromium.googlesource.com/chromium/blink/+/998ad358eed702b873dd54697b3fa3f952e0feb7
Inserting an element before the fullscreened element could crash if it caused a containing inline to be split,
since the splitting logic doesn't expect the fullscreened element to be wrapped in a RenderFullScreen. This patch changes
inline splitting to be aware of RenderFullScreen.
Test: fullscreen/full-screen-inline-split-crash.html
* rendering/RenderInline.cpp:
(WebCore::RenderInline::splitInlines):
2013-05-22 Simon Fraser <simon.fraser@apple.com>
Fix issues with focus rings on search fields
https://bugs.webkit.org/show_bug.cgi?id=116591
Reviewed by Darin Adler.
On a future OS, the rect returned by _focusRingVisibleRect should
be in the coordinate system of the that NSView, not the base
coordinate system, so fix the code that sets and reads the global
focusRingClipRect variable accordingly.
* platform/graphics/mac/WebLayer.mm:
(drawLayerContents):
* platform/mac/ThemeMac.mm:
(-[WebCoreFlippedView _focusRingVisibleRect]):
2013-05-22 Simon Fraser <simon.fraser@apple.com>
New Flickr doesn't get fast scrolling but should
https://bugs.webkit.org/show_bug.cgi?id=116514
Reviewed by Darin Adler.
RenderObject increments and decrements a counter of slow repaint objects on
FrameView when it sees style changes related to background-attachment:fixed.
However, it omitted to decrement the count when a renderer with a fixed background
was destroyed.
This caused Flickr to never fall into fast scrolling mode, since it toggled
display:none on an element with a fixed background during loading, then removed
the fixed background.
Did some minor cleanup of #ENABLE(FAST_MOBILE_SCROLLING) crap.
Tests: platform/mac-wk2/tiled-drawing/slow-scrolling-background-toggle.html
platform/mac-wk2/tiled-drawing/slow-scrolling-hidden-background-toggle.html
platform/mac-wk2/tiled-drawing/slow-scrolling.html
* rendering/RenderObject.cpp:
(WebCore::shouldRepaintFixedBackgroundsOnScroll):
(WebCore::RenderObject::styleWillChange):
(WebCore::RenderObject::willBeRemovedFromTree):
2013-05-22 Robert Hogan <robert@webkit.org>
Need to Remove Anonymous Wrappers When All Children Become Inline
https://bugs.webkit.org/show_bug.cgi?id=115687
Reviewed by David Hyatt.
Remove a simple subset of anonymous wrappers, i.e. anonymous blocks without continuations,
when a block becoming float or positioned removes the need for them.
Test: fast/block/remove-anonymous-wrappers-when-element-changes-to-float-or-positioned.html
* rendering/RenderBlock.h:
(RenderBlock):
* rendering/RenderObject.cpp:
(WebCore):
(WebCore::RenderObject::removeAnonymousWrappersFromLineIfNecessary):
(WebCore::RenderObject::styleWillChange):
(WebCore::RenderObject::styleDidChange):
* rendering/RenderObject.h:
(RenderObject):
2013-05-22 Bruno de Oliveira Abinader <bruno.abinader@basyskom.com>
[css] Update ETextDecorations enum to TextDecorations
https://bugs.webkit.org/show_bug.cgi?id=116581
Reviewed by Andreas Kling.
Currently, ETextDecorations enum uses a C-like coding style for its
enumeration values, as well as a 'E' prefix that surely had some meaning
in the past, but not nowadays.
No behavior changes, covered by existing tests.
* accessibility/AccessibilityRenderObject.cpp:
(WebCore::AccessibilityRenderObject::hasPlainText):
(WebCore::AccessibilityRenderObject::hasUnderline):
* accessibility/atk/WebKitAccessibleInterfaceText.cpp:
(getAttributeSetForAccessibilityObject):
* accessibility/ios/WebAccessibilityObjectWrapperIOS.mm:
(AXAttributeStringSetStyle):
* accessibility/mac/WebAccessibilityObjectWrapperMac.mm:
(AXAttributeStringSetStyle):
* css/CSSComputedStyleDeclaration.cpp:
(WebCore::renderTextDecorationFlagsToCSSValue):
* css/CSSPrimitiveValueMappings.h:
(WebCore::CSSPrimitiveValue::operator TextDecoration):
* css/DeprecatedStyleBuilder.cpp:
(WebCore::ApplyPropertyTextDecoration::applyValue):
(WebCore::ApplyPropertyTextDecoration::createHandler):
* editing/mac/EditorMac.mm:
(WebCore::Editor::fontAttributesForSelectionStart):
* platform/mac/HTMLConverter.mm:
(+[WebHTMLConverter editingAttributedStringFromRange:]):
* rendering/InlineTextBox.cpp:
(WebCore::InlineTextBox::paint):
(WebCore::InlineTextBox::paintDecoration):
* rendering/InlineTextBox.h:
* rendering/RenderObject.cpp:
(WebCore::RenderObject::getTextDecorationColors):
* rendering/style/RenderStyle.h:
* rendering/style/RenderStyleConstants.h:
(WebCore::operator|):
(WebCore::operator|=):
* rendering/style/StyleVisualData.h:
(StyleVisualData):
* rendering/svg/SVGInlineTextBox.cpp:
(WebCore::SVGInlineTextBox::paint):
(WebCore::positionOffsetForDecoration):
(WebCore::thicknessForDecoration):
(WebCore::findRenderObjectDefininingTextDecoration):
(WebCore::SVGInlineTextBox::paintDecoration):
(WebCore::SVGInlineTextBox::paintDecorationWithStyle):
* rendering/svg/SVGInlineTextBox.h:
2013-05-22 Lori Anderson <lori@rkymtnhi.com>
[GStreamer] Allow multiple log levels in media player
https://bugs.webkit.org/show_bug.cgi?id=116618
Reviewed by Philippe Normand.
No new tests, just changing logging.
* platform/graphics/gstreamer/GStreamerUtilities.h:
* platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:
(WebCore::MediaPlayerPrivateGStreamer::load):
(WebCore::MediaPlayerPrivateGStreamer::pause):
(WebCore::MediaPlayerPrivateGStreamer::seek):
(WebCore::MediaPlayerPrivateGStreamer::setRate):
(WebCore::MediaPlayerPrivateGStreamer::handleMessage):
2013-05-22 Beth Dakin <bdakin@apple.com>
The LayoutMilestones didLayout callback sometimes fires with a milestone value of 0
https://bugs.webkit.org/show_bug.cgi?id=116623
Reviewed by Geoffrey Garen.
Make sure we have actually achieved some milestones before calling didLayout().
* page/FrameView.cpp:
(WebCore::FrameView::performPostLayoutTasks):
2013-05-22 Mario Sanchez Prada <mario.prada@samsung.com>
[GTK] Reimplement atk_text_get_text_*_offset for CHAR boundary
https://bugs.webkit.org/show_bug.cgi?id=114870
Reviewed by Martin Robinson.
Re-implement this functions without using GailTextUtil nor Pango.
* accessibility/atk/WebKitAccessibleInterfaceText.cpp:
(webkitAccessibleTextGetChar): New function.
(webkitAccessibleTextGetTextForOffset): Call the new function for CHAR.
2013-05-22 Antoine Quint <graouts@apple.com>
[Mac] Captions menu isn't internationalized, doesn't use rtl layout for rtl languages
https://bugs.webkit.org/show_bug.cgi?id=116605
Reviewed by Eric Carlson.
Ensure that rtl languages are properly recognized by the captions menu such that text
layout and alignment is natural.
* css/mediaControls.css:
(::-webkit-media-controls):
Remove the forced "direction: ltr" property which was forcing all layout to be
left-to-right.
* css/mediaControlsQuickTime.css:
(video::-webkit-media-controls-closed-captions-track-list):
Remove the forced "text-align: left" property which was forcing all caption
titles to be left-aligned.
(video::-webkit-media-controls-closed-captions-track-list h3):
Use "-webkit-margin-start" instead of "padding-left" to position the heading
such that it adds the margin on the left for ltr languages and on the right
for rtl languages.
(video::-webkit-media-controls-closed-captions-track-list li):
Set "position: relative" such that the ::before pseudo-class can use "position: absolute"
to position itself relative to the caption title rather than the list element.
(video::-webkit-media-controls-closed-captions-track-list li.selected::before):
(video::-webkit-media-controls-closed-captions-track-list li.selected:hover::before):
Make the checkmarks a ::before pseudo-class rather than a background-image such that
we may control its positioning using the internationlization-friendly "-webkit-margin-start"
property.
* html/shadow/MediaControlElements.cpp:
(WebCore::MediaControlClosedCaptionsContainerElement::create):
Set the "dir" attribute to "auto" such that rtl languages are correctly handled. This
means that the first string displayed within the captions container, currently the
"Subtitles" <h3> element, defines the direction for the whole container. It is therefore
crucial that this string is properly localized in rtl languages as falling back to
english would mean the entire caption container is using ltr.
2013-05-22 Hugo Parente Lima <hugo.lima@openbossa.org>
WebCore fails to compile with -Werror=maybe-uninitialized on GCC 4.8.0
https://bugs.webkit.org/show_bug.cgi?id=116340
Reviewed by Christophe Dumez.
No new tests, just a simple build fix.
* inspector/InspectorDOMStorageAgent.cpp:
(WebCore::InspectorDOMStorageAgent::setDOMStorageItem): Init frame variable.
(WebCore::InspectorDOMStorageAgent::removeDOMStorageItem): Init frame variable.
2013-05-22 Christophe Dumez <ch.dumez@sisa.samsung.com>
Have IDL interface names match their global constructor
https://bugs.webkit.org/show_bug.cgi?id=116520
Reviewed by Kentaro Hara.
Have IDL interface names match their global constructor name on DOMWindow.idl
using [InterfaceName] extended attribute. This affects in particular webkit
prefixed constructors. This is mandated by Web IDL specification:
http://dev.w3.org/2006/webapi/WebIDL/#es-interfaces
As a consequence, we can now get rid of [NoInterfaceObject] extended attribute
for those interfaces and have their global constructors automatically generated
by the bindings generator.
No new tests, no behavior change for layout tests.
* Modules/mediasource/MediaSource.idl:
* Modules/mediasource/SourceBuffer.idl:
* Modules/mediasource/SourceBufferList.idl:
* Modules/mediastream/MediaStream.idl:
* Modules/mediastream/RTCPeerConnection.idl:
* Modules/speech/SpeechGrammar.idl:
* Modules/speech/SpeechGrammarList.idl:
* Modules/speech/SpeechRecognition.idl:
* Modules/speech/SpeechRecognitionError.idl:
* Modules/speech/SpeechRecognitionEvent.idl:
* Modules/webaudio/OfflineAudioContext.idl:
* Modules/webaudio/PannerNode.idl:
* dom/ShadowRoot.idl:
* page/DOMWindow.idl:
2013-05-21 Mihai Tica <mitica@adobe.com>
Update the background blending implementation to match the changes done
in the spec. This implies that background color blending is removed and
the background layers won't blend with the content behind the element
any more.
https://bugs.webkit.org/show_bug.cgi?id=116212
Reviewed by Dean Jackson.
* rendering/RenderBox.cpp:
(WebCore::RenderBox::paintFillLayers):
* rendering/RenderBoxModelObject.cpp:
(WebCore::RenderBoxModelObject::paintFillLayerExtended):
2013-05-21 Ryosuke Niwa <rniwa@webkit.org>
Use-after-free in DOMSelection::containsNode
https://bugs.webkit.org/show_bug.cgi?id=116468
Reviewed by Andreas Kling.
Retain the node pointer. Also bail out early if the node was not in the document
since Range::compareBoundaryPoints sets ec to WRONG_DOCUMENT_ERR otherwise.
Test: editing/selection/contains-node-crash.html
* page/DOMSelection.cpp:
(WebCore::DOMSelection::containsNode):
* page/DOMSelection.h:
(DOMSelection):
2013-05-21 Joseph Pecoraro <pecoraro@apple.com>
Web Inspector: InspectorFrontendHost::loadResourceSynchronously() builds ASCII-only results
https://bugs.webkit.org/show_bug.cgi?id=116569
Merge: https://chromium.googlesource.com/chromium/blink/+/7f1cfecfe34f4dbc6ce1ef0250b13f2058128eeb
Reviewed by Timothy Hatcher.
Test: inspector/load-resource-synchronously-utf8.html
* inspector/InspectorFrontendHost.cpp:
(WebCore::InspectorFrontendHost::loadResourceSynchronously):
2013-05-21 Andy Estes <aestes@apple.com>
Allow session storage for third-party origins even if third-party data access is blocked.
https://bugs.webkit.org/show_bug.cgi?id=116532
Reviewed by Anders Carlsson.
In http://trac.webkit.org/changeset/149326 we relaxed our policy for
localStorage when third-party data blocking is enabled to create a
transient, session-scoped storage area for the third-party origin
instead of throwing an exception. Since this gives essentially the same
behavior as sessionStorage, we might as well also allow sessionStorage
for third-party origins.
Test: http/tests/security/cross-origin-session-storage-third-party-blocked.html
* WebCore.exp.in: Updated the symbol for
SecurityOrigin::canAccessStorage.
* page/DOMWindow.cpp:
(WebCore::DOMWindow::sessionStorage): Called canAccessSessionStorage()
rather than canAccessLocalStorage().
* page/SecurityOrigin.cpp:
(WebCore::SecurityOrigin::canAccessStorage): Passed in an enum
indicating if access should be allowed from third-party origins.
* page/SecurityOrigin.h:
(WebCore::SecurityOrigin::canAccessSessionStorage): Called
canAccessStorage() with AlwaysAllowFromThirdParty.
(SecurityOrigin):
2013-05-21 Hugo Parente Lima <hugo.lima@openbossa.org>
[EFL] Add missing #if guards on drag support methods
https://bugs.webkit.org/show_bug.cgi?id=116574
Reviewed by Christophe Dumez.
* platform/efl/PasteboardEfl.cpp:
(WebCore):
2013-05-21 Antti Koivisto <antti@apple.com>
Remove stub HTMLContentElement
https://bugs.webkit.org/show_bug.cgi?id=116580
Reviewed by Andreas Kling.
Inherit DetailsContentElement and DetailsSummaryElement directly from InsertionPoint instead.
* html/HTMLDetailsElement.cpp:
(WebCore::DetailsContentElement::DetailsContentElement):
(WebCore::DetailsSummaryElement::DetailsSummaryElement):
* html/HTMLSummaryElement.cpp:
(WebCore::SummaryContentElement::SummaryContentElement):
* html/shadow/HTMLContentElement.cpp:
(WebCore::HTMLContentElement::contentTagName):
* html/shadow/HTMLContentElement.h:
(WebCore::isHTMLContentElement):
* html/shadow/InsertionPoint.cpp:
(WebCore::InsertionPoint::setResetStyleInheritance):
* html/shadow/InsertionPoint.h:
Also remove some leftover selector code.
(WebCore::InsertionPoint::insertionPointType):
2013-05-21 Andreas Kling <akling@apple.com>
Robustify repaint of previous caret node when moving FrameSelection.
<http://webkit.org/b/116558>
Reviewed by Ryosuke Niwa.
As a follow-up to r150396, also repaint the caret rects if the previous node is contenteditable.
* editing/FrameSelection.cpp:
(WebCore::FrameSelection::recomputeCaretRect):
2013-05-21 Ryosuke Niwa <rniwa@webkit.org>
Unreviewed build fix after r150469. We need to bail out here when DOM is mutated by an event listener such that
the split text nodes no longer exist right next to each other.
* editing/InsertParagraphSeparatorCommand.cpp:
(WebCore::InsertParagraphSeparatorCommand::doApply):
2013-05-21 Antti Koivisto <antti@apple.com>
Remove ScopeContentDistribution
https://bugs.webkit.org/show_bug.cgi?id=116576
Reviewed by Andreas Kling.
With maximum one ShadowRoot per Element this can be smashed into ContentDistributor.
* dom/ShadowRoot.cpp:
(WebCore):
* dom/ShadowRoot.h:
(WebCore):
* html/shadow/ContentDistributor.cpp:
(WebCore::ContentDistributor::ContentDistributor):
(WebCore):
(WebCore::ContentDistributor::~ContentDistributor):
(WebCore::ContentDistributor::invalidateInsertionPointList):
(WebCore::ContentDistributor::ensureInsertionPointList):
(WebCore::ContentDistributor::distribute):
(WebCore::ContentDistributor::invalidate):
* html/shadow/ContentDistributor.h:
(WebCore):
(ContentDistributor):
* html/shadow/InsertionPoint.cpp:
(WebCore::InsertionPoint::InsertionPoint):
(WebCore::InsertionPoint::insertedInto):
(WebCore::InsertionPoint::removedFrom):
Simplify insertion point list invalidation.
* html/shadow/InsertionPoint.h:
2013-05-21 Zoltan Horvath <zoltan@webkit.org>
[CSS Regions][CSS Exclusions] Multiple regions with shape-insides should respect positioned shapes and overflow
https://bugs.webkit.org/show_bug.cgi?id=115001
Reviewed by David Hyatt.
In r150375 I implemented the new overflow behavior for shape-inside on regions, but it covered only the simple cases
when you had only one region. This patch adds support for the new overflow behavior for multiple regions with multiple
positioned shape-insides and overflow.
Tests: fast/regions/shape-inside/shape-inside-on-regions-block-content-overflow-multiple-shapes.html
fast/regions/shape-inside/shape-inside-on-regions-inline-content-overflow-multiple-shapes.html
* rendering/RenderBlockLineLayout.cpp:
(WebCore::RenderBlock::updateLineBoundariesForExclusions): Cover cases when content flows into the next region, update the
line segments for the overflow.
(WebCore::RenderBlock::adjustLogicalLineTopAndLogicalHeightIfNeeded): In flow thread case we don't want to adjust the height
in two places.
2013-05-21 Commit Queue <commit-queue@webkit.org>
Unreviewed, rolling out r150425.
http://trac.webkit.org/changeset/150425
https://bugs.webkit.org/show_bug.cgi?id=116573
Not the right fix for WebKit2 (Requested by rniwa on #webkit).
* testing/Internals.cpp:
(WebCore::Internals::resetToConsistentState):
2013-05-20 Ryosuke Niwa <rniwa@webkit.org>
dispatchEvent call can execute javascript and blow away endRoot from underneath
https://bugs.webkit.org/show_bug.cgi?id=116483
Reviewed by Andreas Kling.
Merge https://chromium.googlesource.com/chromium/blink/+/798cba0af9b2aff21e475e2e08ea3ca5e97dfc2c.
Test: editing/undo/undo-after-event-edited.html
* editing/Editor.cpp:
(WebCore::dispatchEditableContentChangedEvents):
2013-05-21 Antti Koivisto <antti@apple.com>
Remove ContentDistribution
https://bugs.webkit.org/show_bug.cgi?id=116527
Reviewed by Andreas Kling.
Resolving distribution on traversal is simpler.
* WebCore.exp.in:
* dom/ComposedShadowTreeWalker.cpp:
(WebCore::ComposedShadowTreeWalker::traverseNode):
(WebCore::ComposedShadowTreeWalker::traverseDistributedNodes):
(WebCore::ComposedShadowTreeWalker::traverseSiblingOrBackToInsertionPoint):
* html/HTMLDetailsElement.cpp:
* html/shadow/ContentDistributor.cpp:
(WebCore::ContentDistributor::distributeSelectionsTo):
* html/shadow/ContentDistributor.h:
* html/shadow/HTMLContentElement.idl:
Remove getDistributedNodes().
* html/shadow/InsertionPoint.cpp:
(WebCore::InsertionPoint::InsertionPoint):
(WebCore::InsertionPoint::attach):
(WebCore::InsertionPoint::detach):
(WebCore):
(WebCore::InsertionPoint::firstDistributed):
(WebCore::InsertionPoint::lastDistributed):
(WebCore::InsertionPoint::nextDistributedTo):
(WebCore::InsertionPoint::previousDistributedTo):
Rename for clarity.
* html/shadow/InsertionPoint.h:
(WebCore::InsertionPoint::hasDistribution):
(WebCore::InsertionPoint::setHasDistribution):
(WebCore::InsertionPoint::clearDistribution):
(WebCore::InsertionPoint::matchTypeFor):
(InsertionPoint):
2013-05-21 Martin Robinson <mrobinson@igalia.com>
[GTK] [CMake] Add support for building WebKit2
https://bugs.webkit.org/show_bug.cgi?id=116372
Reviewed by Gustavo Noronha Silva.
* PlatformGTK.cmake: Add missing source files, include directories, and WebP properties.
2013-05-21 Jer Noble <jer.noble@apple.com>
REGRESSION(r101810): Media controls status text missing for live-stream videos.
https://bugs.webkit.org/show_bug.cgi?id=116547
Reviewed by Eric Carlson.
Un-reverse the logic in loadedMetadata() so that the status text isn't
hidden (when it should be shown) for live-stream videos.
* html/shadow/MediaControlsApple.cpp:
(WebCore::MediaControlsApple::loadedMetadata):
2013-05-21 Jer Noble <jer.noble@apple.com>
Implement overlap-avoidance for in-band text track cues.
https://bugs.webkit.org/show_bug.cgi?id=116540
Reviewed by Eric Carlson.
In-band (or Generic) cues need special casing for certain features
present in in-band tracks, like paint-on and roll-up modes. To avoid
the problem of overlap avoidance forcing a caption meant to appear
below a cue to appear above it when a larger font size is selected,
impose an additional sort ordering for "generic cues". Instead of
cues being ordered by the order they appear in the track, "generic
cues" further sorted by their position within the video area, such
that cues at the bottom of the video area appear first, and later
cues are pushed up to avoid them, preserving the desired apparent
ordering.
* html/HTMLMediaElement.cpp:
(WebCore::compareCueInterval): Added; wrapper around
TextTrackCue::isOrderedBefore.
(WebCore::HTMLMediaElement::updateActiveTextTrackCues):
After creating the list of current cues, sort them.
* html/track/TextTrackCue.cpp:
(WebCore::TextTrackCue::isOrderedBefore): Added; implementation moved
from TextTrackCueList::add().
* html/track/TextTrackCue.h:
* html/track/TextTrackCueGeneric.cpp:
(WebCore::TextTrackCueGeneric::isOrderedBefore): Added override;
impose additional oredring on generic cues.
* html/track/TextTrackCueGeneric.h:
* html/track/TextTrackCueList.cpp:
(WebCore::TextTrackCueList::add): Moved ordering test into
isOrderedBefore().
* rendering/RenderTextTrackCue.cpp:
(WebCore::RenderTextTrackCue::repositionGenericCue):
Call repositionCueSnapToLinesNotSet() after positioning the cue.
2013-05-20 Jer Noble <jer.noble@apple.com>
Implement overlap avoidance for cues with snap-to-lines flag not set
https://bugs.webkit.org/show_bug.cgi?id=84296
Reviewed by Eric Carlson.
Test: media/track/track-cue-overlap-snap-to-lines-not-set.html
Support overlap avoidance for the non-snap-to-lines part of the WebVTT spec.
* rendering/RenderTextTrackCue.cpp:
(WebCore::RenderTextTrackCue::isOutside): Split implementation into rectIsWithinContainer().
(WebCore::RenderTextTrackCue::rectIsWithinContainer): Ditto.
(WebCore::RenderTextTrackCue::isOverlapping): Split into overlappingObject() and overlappingObjectForRect().
(WebCore::RenderTextTrackCue::overlappingObject): Ditto.
(WebCore::RenderTextTrackCue::overlappingObjectForRect): Ditto.
(WebCore::RenderTextTrackCue::moveIfNecessaryToKeepWithinContainer): Added.
(WebCore::RenderTextTrackCue::findNonOverlappingPosition): When an overlapping object is found, move the
cue to just above or below that object and try again.
(WebCore::RenderTextTrackCue::repositionCueSnapToLinesSet): Move implementation into moveIfNecessaryToKeepWithinContainer().
(WebCore::RenderTextTrackCue::repositionCueSnapToLinesNotSet): Add implementanton based on above.
* rendering/RenderTextTrackCue.h:
2013-05-21 Alberto Garcia <agarcia@igalia.com>
Remove GraphicsLayerClient::contentsVisible()
https://bugs.webkit.org/show_bug.cgi?id=116523
Reviewed by Darin Adler.
This is dead code from the BlackBerry port.
* platform/graphics/GraphicsLayerClient.h:
* rendering/RenderLayerBacking.cpp:
2013-05-21 Zan Dobersek <zdobersek@igalia.com>
PLATFORM(*) macros used in Source/WebCore/loader/archive/ArchiveFactory.cpp
https://bugs.webkit.org/show_bug.cgi?id=116453
Reviewed by Alexey Proskuryakov.
* loader/archive/ArchiveFactory.cpp: Remove a redundant PLATFORM(QT) macro when checking whether
to include the LegacyWebArchive.h header that's specific to the WebArchive support. The Qt port
does not enable the WebArchive feature at all (which is enabled only on AppleMac, AppleWin and iOS
platforms) so there's no reason to additionally condition the header include with building on
non-Qt platforms.
2013-05-21 Alberto Garcia <agarcia@igalia.com>
Add BlackBerry definition of NativeImagePtr
https://bugs.webkit.org/show_bug.cgi?id=116526
Reviewed by Darin Adler.
* platform/graphics/NativeImagePtr.h:
(Graphics):
(WebCore):
2013-05-21 Alberto Garcia <agarcia@igalia.com>
[BlackBerry] FontCache::getFontDataForCharacters() returns nullptr
https://bugs.webkit.org/show_bug.cgi?id=116529
Reviewed by Andreas Kling.
This cannot be converted to a PassRefPtr and breaks the build.
* platform/graphics/blackberry/FontCacheBlackBerry.cpp:
(WebCore::FontCache::getFontDataForCharacters):
2013-05-21 Iago Toral Quiroga <itoral@igalia.com>
[GTK] Always use EGL to create the GL context when running on Wayland
https://bugs.webkit.org/show_bug.cgi?id=115721
Reviewed by Martin Robinson.
* platform/graphics/cairo/GLContext.cpp:
(WebCore::GLContext::createContextForWindow):
(WebCore::GLContext::createOffscreenContext): Always use EGL to create the GL context
instead of GLX when running on Wayland and make createOffScreenContext reuse the code
in createContextWindow.
2013-05-21 Alberto Garcia <agarcia@igalia.com>
Add FloatRect::normalized() for BlackBerry
https://bugs.webkit.org/show_bug.cgi?id=116531
Reviewed by Carlos Garcia Campos.
This was added to FloatRectBlackBerry.cpp in r111072 when the
graphics platform code was upstreamed, but this change was
missing.
* platform/graphics/FloatRect.h:
(FloatRect):
2013-05-21 Balazs Kelemen <kbalazs@webkit.org>
[GStreamer] cleanup duration query
https://bugs.webkit.org/show_bug.cgi?id=116228
Reviewed by Philippe Normand.
Covered by existing tests.
* platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:
(WebCore::MediaPlayerPrivateGStreamer::duration):
We can also cache the duration here if the query succeeds.
(MediaPlayerPrivateGStreamer::updateStates):
Don't query when we are in GST_STATE_READY state because it never succeeds.
Do it instead when we reached a stable state.
(MediaPlayerPrivateGStreamer::cacheDuration): Return early if it is already
cached. Recaching is not necessary and now we call it a lot of times.
Only look into the state if the query failed.
* platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.h:
(MediaPlayerPrivateGStreamer): Made m_mediaDuration mutable to be
able to cache it in duration(). Internal cached values is one of
the sensible uses of mutable.
2013-05-21 Patrick Gansterer <paroga@webkit.org>
Build fix for !USE(ACCELERATED_COMPOSITING) after r150307.
* rendering/RenderLayerCompositor.h: Added missing #if USE(ACCELERATED_COMPOSITING).
2013-05-20 Antti Koivisto <antti@apple.com>
Simplify Shadow DOM distribution code
https://bugs.webkit.org/show_bug.cgi?id=116454
Reviewed by Andreas Kling.
Remove code supporting nested insertion points and distributing to multiple insertion points.
* html/HTMLDetailsElement.cpp:
(DetailsContentElement):
Make distribution to <details> and <summary> mutually exclusive.
* html/shadow/ContentDistributor.cpp:
(WebCore):
(WebCore::ContentDistributor::distribute):
(WebCore::ContentDistributor::invalidate):
(WebCore::ContentDistributor::distributeSelectionsTo):
* html/shadow/ContentDistributor.h:
* html/shadow/InsertionPoint.cpp:
(WebCore::resolveReprojection):
2013-05-21 Mihnea Ovidenie <mihnea@adobe.com>
[CSSRegions] Constrain auto-height region computation in a different way
https://bugs.webkit.org/show_bug.cgi?id=116310
Reviewed by Alexandru Chiculita.
After https://bugs.webkit.org/show_bug.cgi?id=74132, the region is a render block. We can use RenderBox::constrainContentBoxLogicalHeightByMinMax
instead of RenderBox::computeReplacedLogicalHeightRespectingMinMaxHeight to better reflect the fact that the region is not a replaced element.
Covered by existing regions tests, since when replaced-based the region had an intrinsic height of 0 and now, block-based, it does not have any children.
* rendering/RenderFlowThread.cpp:
(WebCore::RenderFlowThread::addForcedRegionBreak):
2013-05-21 Ryosuke Niwa <rniwa@webkit.org>
REGRESSION(r150393): editing/inserting/typing-at-end-of-line.html fails
https://bugs.webkit.org/show_bug.cgi?id=116516
Reviewed by Antti Koivisto.
The bug was caused by DRT not resetting various auto correction states.
Do that in Internals::resetToConsistentState.
* testing/Internals.cpp:
(WebCore::Internals::resetToConsistentState):
2013-05-20 Zan Dobersek <zdobersek@igalia.com>
[GTK] Fix concatenations of string literals that are not C++11-compliant
https://bugs.webkit.org/show_bug.cgi?id=116449
Reviewed by Martin Robinson.
Fix the problematic concatenations of string literals so they are compilable under the C++11 standard. This
is simply a matter of separating the string and the string literal that are being concatenated with a space.
* platform/graphics/gtk/FullscreenVideoControllerGtk.cpp:
* platform/gtk/FileSystemGtk.cpp:
(WebCore::sharedResourcesPath):
2013-05-20 Zan Dobersek <zdobersek@igalia.com>
[GTK] Support application/x-mimearchive mimetype for MHTML archives instead of message/rfc822
https://bugs.webkit.org/show_bug.cgi?id=116442
Reviewed by Martin Robinson.
* loader/archive/ArchiveFactory.cpp:
(WebCore::archiveMIMETypes): Like EFL and Qt, register the application/x-mimearchive mime type as a MHTML archive type
and stop propagating the message/rfc822 mime type as such. This also removes a couple of PLATFORM ifdefs.
2013-05-20 Benjamin Poulain <bpoulain@apple.com>
Minor String fixes in CSS
https://bugs.webkit.org/show_bug.cgi?id=116291
Reviewed by Darin Adler.
Some trival changes to make up for a bad day :)
* css/CSSImageSetValue.cpp:
(WebCore::CSSImageSetValue::customCssText):
* css/CSSImageValue.cpp:
(WebCore::CSSImageValue::customCssText):
* css/CSSImportRule.cpp:
(WebCore::CSSImportRule::cssText):
* css/CSSInheritedValue.cpp:
(WebCore::CSSInheritedValue::customCssText):
* css/CSSInitialValue.cpp:
(WebCore::CSSInitialValue::customCssText):
* css/CSSPrimitiveValue.cpp:
(WebCore::CSSPrimitiveValue::customCssText):
* css/CSSPropertySourceData.cpp:
(WebCore::CSSPropertySourceData::toString):
* css/CSSSelector.cpp:
(WebCore::CSSSelector::selectorText):
* css/CSSStyleRule.cpp:
(WebCore::CSSStyleRule::generateSelectorText):
* css/CSSStyleSheet.h:
(WebCore::CSSStyleSheet::type):
* css/CSSTimingFunctionValue.cpp:
(WebCore::CSSLinearTimingFunctionValue::customCssText):
(WebCore::CSSCubicBezierTimingFunctionValue::customCssText):
* css/CSSValueList.cpp:
(WebCore::CSSValueList::customCssText):
(WebCore::CSSValueList::customSerializeResolvingVariables):
* css/MediaQueryExp.cpp:
(WebCore::MediaQueryExp::serialize):
* css/WebKitCSSFilterValue.cpp:
(WebCore::WebKitCSSFilterValue::customCssText):
* css/WebKitCSSKeyframesRule.cpp:
(WebCore::StyleRuleKeyframes::findKeyframeIndex):
(WebCore::WebKitCSSKeyframesRule::cssText):
* css/WebKitCSSMatFunctionValue.cpp:
(WebCore::WebKitCSSMatFunctionValue::customCssText):
* css/WebKitCSSMixFunctionValue.cpp:
(WebCore::WebKitCSSMixFunctionValue::customCssText):
2013-05-20 Ryosuke Niwa <rniwa@webkit.org>
Null pointer deference in WebCore::AppendNodeCommand::create
https://bugs.webkit.org/show_bug.cgi?id=116479
Reviewed by Andreas Kling.
Merge https://chromium.googlesource.com/chromium/blink/+/5cb43002a44f67a60ecf5a7ed76de2d0bcf89eb2
DeleteSelection::makeStylingElementsDirectChildrenOfEditableRootToPreventStyleLoss() make style and link elements
to be the direct children of the editable root. However, these style and link elements are not necessary editable
and WebKit crashes when they are not.
Test: editing/deleting/delete-uneditable-style.html
* editing/DeleteSelectionCommand.cpp:
(WebCore::DeleteSelectionCommand::makeStylingElementsDirectChildrenOfEditableRootToPreventStyleLoss):
2013-05-20 Beth Dakin <bdakin@apple.com>
Scrollbars still show sometimes even when WKPageSetSuppressScrollbarAnimations()
is set
https://bugs.webkit.org/show_bug.cgi?id=116493
-and corresponding-
<rdar://problem/13912871>
Reviewed by Dean Jackson.
We need to be more aggressive with our approach since AppKit may still ask the
scrollbars to paint here.
scrollbarAnimationsAreSuppressed() will allow us to find out if the setting has
been set.
* page/FrameView.cpp:
(WebCore::FrameView::scrollbarAnimationsAreSuppressed):
* page/FrameView.h:
* platform/ScrollableArea.h:
(WebCore::ScrollableArea::scrollbarAnimationsAreSuppressed):
* rendering/RenderLayer.cpp:
(WebCore::RenderLayer::scrollbarAnimationsAreSuppressed):
* rendering/RenderLayer.h:
(RenderLayer):
* rendering/RenderListBox.cpp:
(WebCore::RenderListBox::scrollbarAnimationsAreSuppressed):
* rendering/RenderListBox.h:
Dont allow animations if scrollbars are suppressed.
* platform/mac/ScrollAnimatorMac.mm:
(-[WebScrollbarPainterDelegate scrollerImp:animateKnobAlphaTo:duration:]):
Call cancelAnimations() to prevent a just-started animation from continuing.
(WebCore::ScrollAnimatorMac::finishCurrentScrollAnimations):
2013-05-20 Andreas Kling <akling@apple.com>
Avoid caret repaints if we're not showing carets anyway.
<http://webkit.org/b/116489>
Reviewed by Simon Fraser.
When moving the selection, check if we're inside a contenteditable element (or in caret browsing mode)
before repainting the caret's previous location.
* editing/FrameSelection.cpp:
(WebCore::FrameSelection::recomputeCaretRect):
2013-05-20 Simon Fraser <simon.fraser@apple.com>
position:sticky should stick for the enclosing overflow ancestor
https://bugs.webkit.org/show_bug.cgi?id=100054
Reviewed by Beth Dakin.
Make position: -webkit-sticky be constrained by an enclosing ancestor
with non-visible overflow if there is one, rather than being constained
always by the viewport.
Test: fast/css/sticky/sticky-top-overflow.html
* rendering/RenderBoxModelObject.cpp:
(WebCore::RenderBoxModelObject::computeStickyPositionConstraints): Rename
viewportRect to constrainingRect, since it isn't just about the viewport any more.
Fix an issue where just adding stickyLocation to absContainerFrame.location() was
incorrect when the container is scrolled; we also have to take the scroll offset
into account, and that offset is stored in the layer tree.
(WebCore::RenderBoxModelObject::stickyPositionOffset):
Look for an enclosing layer with overflow clipping, and, if found, use it to
compute the sticky constraint rect.
* rendering/RenderLayer.h: Add a helpful IncludeSelfOrNot, and fix several member functions
to use it place of hard-to-read boolean arguments.
Add enclosingOverflowClipLayer(IncludeSelfOrNot).
(WebCore::RenderLayer::ancestorCompositingLayer):
* rendering/RenderLayer.cpp:
(WebCore::RenderLayer::enclosingOverflowClipLayer): New function, finds the enclosing
layer with overflow clip.
(WebCore::RenderLayer::enclosingCompositingLayer): Use IncludeSelfOrNot.
(WebCore::RenderLayer::enclosingCompositingLayerForRepaint): Ditto.
(WebCore::RenderLayer::enclosingFilterLayer): Ditto.
* rendering/RenderLayerCompositor.cpp:
(WebCore::RenderLayerCompositor::repaintInCompositedAncestor): Use IncludeSelfOrNot.
(WebCore::isViewportConstrainedFixedOrStickyLayer): Renamed from isRootmostFixedOrStickyLayer
and moved up so we can use it in requiresCompositingForPosition().
(WebCore::RenderLayerCompositor::requiresCompositingForPosition): Only make sticky composited if
it's viewport-constrained.
(WebCore::RenderLayerCompositor::updateViewportConstraintStatus):
(WebCore::RenderLayerCompositor::computeStickyViewportConstraints): Declare StickyPositionViewportConstraints
one line down to just before it gets used.
2013-05-20 Jeff Rogers <jrogers@blackberry.com>
Remove DISABLE_ROUNDED_CORNER_CLIPPING
https://bugs.webkit.org/show_bug.cgi?id=115531
Reviewed by Andreas Kling.
BlackBerry port is no longer using this.
* rendering/RenderLayer.cpp:
(WebCore::inContainingBlockChain):
(WebCore::RenderLayer::clipToRect):
2013-05-20 Tim Horton <timothy_horton@apple.com>
Clients should have a way to extend rendering suppression
https://bugs.webkit.org/show_bug.cgi?id=116463
<rdar://problem/13738496>
Reviewed by Andy Estes.
* WebCore.exp.in:
Export FrameView::setVisualUpdatesAllowedByClient.
* dom/Document.cpp:
(WebCore::Document::setVisualUpdatesAllowed):
Move rendering-suppression watchdog into setVisualUpdatesAllowed(bool).
setVisualUpdatesAllowed(ReadyState) should not re-enable visual updates
if the client is itself disabling visual updates.
(WebCore::Document::visualUpdatesSuppressionTimerFired):
If the watchdog fires and the client is still disabling visual
updates, we should not re-enable visual updates, but instead
wait for the client.
(WebCore::Document::setVisualUpdatesAllowedByClient):
Actually re-enable visual updates if we deferred the re-enabling above
(when the page finishes loading, but the client had them disabled).
* dom/Document.h:
(Document): Add setVisualUpdatesAllowedByClient.
* page/FrameView.cpp:
(WebCore::FrameView::FrameView): Visual updates are allowed by default.
(WebCore::FrameView::setVisualUpdatesAllowedByClient):
Forward through to the document, but we also need to persist the state
here in FrameView so that it survives through navigation.
* page/FrameView.h:
(WebCore::FrameView::setVisualUpdatesAllowedByClient): Added.
(WebCore::FrameView::visualUpdatesAllowedByClient): Added.
Added storage for m_visualUpdatesAllowedByClient.
2013-05-20 Hans Muller <hmuller@adobe.com>
[CSS Exclusions] Add CSS parsing support for image URI shape-inside and shape-outside values
https://bugs.webkit.org/show_bug.cgi?id=116349
Reviewed by Alexandru Chiculita.
Add support for parsing image URI values for the shape-inside and shape-outside CSS properties.
Extended the ExclusionShapeValue class to support tracking the property's StyleImage value.
The ExclusionShapeValue::type enums were changed from all upper case to "Intercase" by order
of the style bot.
The existing CSS parsing tests were extended to check URI values.
* css/CSSComputedStyleDeclaration.cpp:
(WebCore::CSSComputedStyleDeclaration::getPropertyCSSValue):
* css/CSSParser.cpp:
(WebCore::CSSParser::parseValue):
* css/DeprecatedStyleBuilder.cpp:
(WebCore::ApplyPropertyExclusionShape::applyValue):
* css/StyleResolver.cpp:
(WebCore::StyleResolver::loadPendingImages):
* rendering/style/ExclusionShapeValue.h:
(WebCore::ExclusionShapeValue::createImageValue):
(ExclusionShapeValue):
(WebCore::ExclusionShapeValue::image):
(WebCore::ExclusionShapeValue::setImage):
(WebCore::ExclusionShapeValue::ExclusionShapeValue):
2013-05-20 Radu Stavila <stavila@adobe.com>
[CSSRegions] Fix offsetLeft / offsetTop for elements inside named flow
https://bugs.webkit.org/show_bug.cgi?id=115899
Reviewed by David Hyatt.
Elements in named flows that have the body as their offsetParent, need to compute their
offsetLeft and offsetTop values relative to the body.
Tests: fast/regions/offsetLeft-offsetTop-in-multiple-regions.html
fast/regions/offsetLeft-offsetTop-in-region-absolute-sticky-fixed.html
fast/regions/offsetLeft-offsetTop-in-region-float-vert-rl.html
fast/regions/offsetLeft-offsetTop-in-region-float.html
fast/regions/offsetLeft-offsetTop-inlines-region-in-element.html
* rendering/RenderBoxModelObject.cpp:
(WebCore::RenderBoxModelObject::adjustedPositionRelativeToOffsetParent):
* rendering/RenderFlowThread.cpp:
(WebCore):
(WebCore::RenderFlowThread::adjustedPositionRelativeToOffsetParent):
* rendering/RenderFlowThread.h:
2013-05-20 Zoltan Horvath <zoltan@webkit.org>
[CSS Regions][CSS Exclusions] shape-inside on regions should respect positioned shapes and overflow
https://bugs.webkit.org/show_bug.cgi?id=116252
Reviewed by David Hyatt.
Regions should respect shape-inside properties which have specified top offset. Since the content which overflows from the
shape should be pushed after the content box (for details check out r148975), I implemented overflowthe behavior for simple
cases when you have only one region. I'm going to implement it for additional regions in a follow up patch.
Tests: fast/regions/shape-inside/shape-inside-on-regions-block-content-basic-overflow-shape-top-offset.html
fast/regions/shape-inside/shape-inside-on-regions-inline-content-basic-overflow-shape-top-offset.html
* rendering/RenderBlockLineLayout.cpp:
(WebCore::RenderBlock::updateLineBoundariesForExclusions): Handle the flow thread case, push the overflowing content after the
content box. Respect existing shape-inside on region tests.
(WebCore::RenderBlock::layoutRunsAndFloatsInRange): Set the correct logical top position for the shape-inside in
the case of regions. Respect the region's margins and paddings.
2013-05-20 Darin Adler <darin@apple.com>
Remove custom binding for the Clipboard clearData function
https://bugs.webkit.org/show_bug.cgi?id=116421
Reviewed by Andreas Kling.
* bindings/js/JSClipboardCustom.cpp: Removed the clearData binding.
* dom/Clipboard.idl: Removed [Custom].
* dom/Clipboard.cpp:
(WebCore::Clipboard::clearData): Renamed from clearAllData.
* dom/Clipboard.h: Rename clearAllData to clearData so we just use
overloading for the one with and without a MIME type.
* platform/ios/ClipboardIOS.h: Rename clearAllData to clearData.
* platform/ios/ClipboardIOS.mm:
(WebCore::ClipboardIOS::clearData): Ditto.
* platform/qt/ClipboardQt.cpp:
(WebCore::ClipboardQt::clearData). Ditto.
* platform/qt/ClipboardQt.h: Ditto.
* platform/win/ClipboardWin.cpp:
(WebCore::ClipboardWin::clearData): Ditto.
* platform/win/ClipboardWin.h: Ditto.
2013-05-20 Eric Carlson <eric.carlson@apple.com>
[iOS] media/event-queue-crash.html ASSERTs in notifyChildInserted
https://bugs.webkit.org/show_bug.cgi?id=116444
Reviewed by Jer Noble.
No new tests, covered by existing tests.
* html/HTMLMediaElement.cpp:
(WebCore::HTMLMediaElement::configureMediaControls): Only create media controls when the
element is in a Document.
2013-05-20 Antoine Quint <graouts@apple.com>
[Mac] captions menu should behave more like a menu
https://bugs.webkit.org/show_bug.cgi?id=116436
Reviewed by Eric Carlson.
Let the captions menu behave more like a native Mac menu by hiding it when
clicking anywhere on the page and preventing the page from scrolling when
attempting to scroll the captions menu when it cannot scroll in the requested
direction.
Test: media/video-controls-captions-trackmenu-hide-on-click-outside.html
* dom/EventListener.h:
Add the new MediaControlsAppleEventListenerType.
* html/shadow/MediaControlsApple.cpp:
(WebCore::MediaControlsApple::defaultEventHandler):
(WebCore::MediaControlsApple::hide):
(WebCore::MediaControlsApple::makeTransparent):
(WebCore::MediaControlsApple::changedClosedCaptionsVisibility):
(WebCore::MediaControlsApple::reportedError):
(WebCore::MediaControlsApple::toggleClosedCaptionTrackList):
Use the hideClosedCaptionTrackList() and showClosedCaptionTrackList()
methods to hide and show the captions menu instead of calling hide()
and show() directly on m_closedCaptionsContainer.
(WebCore::MediaControlsApple::showClosedCaptionTrackList):
Show the m_closedCaptionsContainer and register a "mousewheel" event
listener on it as well as a "click" event listener on the entire document.
(WebCore::MediaControlsApple::hideClosedCaptionTrackList):
Hide the m_closedCaptionsContainer and remove the "mousewheel" event
listener on it as well as the "click" event listener on the entire document.
(WebCore::MediaControlsApple::shouldClosedCaptionsContainerPreventPageScrolling):
New private utility to determine whether the m_closedCaptionsContainer can scroll
in the provided scroll direction.
(WebCore::MediaControlsApple::eventListener):
Obtain the event listener used for "mousewheel" and "click" event handlers.
(WebCore::MediaControlsAppleEventListener::handleEvent):
Event handler for the "mousewheel" and "click" events. If we get a "click" event, we
toggle the captions menu visibility and if we get a "mousewheel" event, we call into
shouldClosedCaptionsContainerPreventPageScrolling() to see if we can scroll in the
current scroll direction, and if not prevent the event from resulting in a scroll by
calling preventDefault().
(WebCore::MediaControlsAppleEventListener::operator==):
Required for the successful subclassing of EventListener.
* html/shadow/MediaControlsApple.h:
(MediaControlsAppleEventListener):
(WebCore::MediaControlsAppleEventListener::create):
(WebCore::MediaControlsAppleEventListener::cast):
(WebCore::MediaControlsAppleEventListener::MediaControlsAppleEventListener):
New subclass of EventListener required to provide a custom event listener for the
"mousewheel" and "click" events registered in showClosedCaptionTrackList() and
hideClosedCaptionTrackList().
2013-05-18 Rashmi Shyamasundar <rashmi.s2@samsung.com>
[Cairo] Canvas-shadow behavior is not being as expected
https://bugs.webkit.org/show_bug.cgi?id=108897
Reviewed by Martin Robinson.
ShadowBlur::endShadowLayer copies the image from shadowContext to cairoContext.
CairoContext-path should be empty for doing this copy. Otherwise, the
original-image area will also get filled with the shadow.
Test: fast/canvas/canvas-image-shadow.html
* platform/graphics/cairo/GraphicsContextCairo.cpp:
(WebCore::drawPathShadow):
2013-05-20 Lamarque V. Souza <Lamarque.Souza@basyskom.com>
-webkit-text-underline-position should not be inherited
https://bugs.webkit.org/show_bug.cgi?id=116363
Reviewed by Dean Jackson.
Specification says text-underline-position should not be inherited.
No new tests, this updates existing tests.
* css/CSSProperty.cpp:
(WebCore::CSSProperty::isInheritedProperty): Make
CSSPropertyWebkitTextUnderlinePosition return false.
* rendering/style/RenderStyle.h: Treat TextUnderlinePosition as
non-inherited.
* rendering/style/StyleRareInheritedData.cpp:
(WebCore::StyleRareInheritedData::StyleRareInheritedData):
(WebCore::StyleRareInheritedData::operator==): Remove m_textUnderlinePosition.
* rendering/style/StyleRareInheritedData.h:
(StyleRareInheritedData):
* rendering/style/StyleRareNonInheritedData.cpp:
(WebCore::StyleRareNonInheritedData::StyleRareNonInheritedData):
(WebCore::StyleRareNonInheritedData::operator==): Add m_textUnderlinePosition.
* rendering/style/StyleRareNonInheritedData.h:
(StyleRareNonInheritedData):
2013-05-20 Lamarque V. Souza <Lamarque.Souza@basyskom.com>
Add compile asserts for the size of RootInlineBox and InlineTextbox
https://bugs.webkit.org/show_bug.cgi?id=116337
Reviewed by Darin Adler.
Add compile asserts to ensure RootInlineBox and InlineTextbox stay small.
* rendering/InlineTextBox.cpp:
(SameSizeAsInlineTextBox):
(WebCore):
* rendering/RootInlineBox.cpp:
(SameSizeAsRootInlineBox):
(WebCore):
2013-05-20 Xan Lopez <xlopez@igalia.com>
[BlackBerry] LocalizedStringsBlackBerry: add dummy text track strings
https://bugs.webkit.org/show_bug.cgi?id=116300
Reviewed by Rob Buis.
These are dummy implementations necessary to make WebKit link.
* platform/blackberry/LocalizedStringsBlackBerry.cpp:
(WebCore::weekFormatInLDML):
(WebCore):
(WebCore::textTrackClosedCaptionsText):
(WebCore::textTrackSubtitlesText):
(WebCore::textTrackOffText):
(WebCore::textTrackNoLabelText):
2013-05-19 Darin Adler <darin@apple.com>
[Mac] Improve string use in PasteboardMac
https://bugs.webkit.org/show_bug.cgi?id=116418
Reviewed by Sam Weinig.
Did a Ben Poulain all over this file.
* platform/mac/PasteboardMac.mm:
(WebCore::Pasteboard::plainText): Add the newline separately to the string builder.
Prepending it to the string first just does more allocations for no good reason.
(WebCore::Pasteboard::documentFragment): Use emptyString() instead of "" and use
ASCIILiteral where appropriate.
(WebCore::cocoaTypeFromHTMLClipboardType): More ASCIILiteral.
(WebCore::Pasteboard::clear): Use early return instead of a nested if here.
Use emptyString() instead of "".
(WebCore::addHTMLClipboardTypesForCocoaType): More ASCIILiteral.
2013-05-19 Anders Carlsson <andersca@apple.com>
Remove link prerendering code
https://bugs.webkit.org/show_bug.cgi?id=116415
Reviewed by Darin Adler.
* Configurations/FeatureDefines.xcconfig:
* GNUmakefile.list.am:
* Target.pri:
* WebCore.vcproj/WebCore.vcproj:
* WebCore.vcxproj/WebCore.vcxproj:
* WebCore.vcxproj/WebCore.vcxproj.filters:
* WebCore.xcodeproj/project.pbxproj:
* dom/Document.cpp:
(WebCore::Document::Document):
* dom/Document.h:
(WebCore):
(Document):
* dom/EventNames.h:
(WebCore):
* html/HTMLLinkElement.cpp:
* html/HTMLLinkElement.h:
* html/LinkRelAttribute.cpp:
(WebCore::LinkRelAttribute::LinkRelAttribute):
* html/LinkRelAttribute.h:
(LinkRelAttribute):
* loader/LinkLoader.cpp:
(WebCore::LinkLoader::~LinkLoader):
(WebCore::LinkLoader::loadLink):
(WebCore::LinkLoader::released):
* loader/LinkLoader.h:
(WebCore):
(LinkLoader):
* loader/LinkLoaderClient.h:
(LinkLoaderClient):
* loader/Prerenderer.cpp: Removed.
* loader/Prerenderer.h: Removed.
* loader/PrerendererClient.cpp: Removed.
* loader/PrerendererClient.h: Removed.
* platform/PrerenderClient.h: Removed.
* platform/PrerenderHandle.h: Removed.
2013-05-19 Simon Fraser <simon.fraser@apple.com>
Change the terminology used by rendering code when painting a given node and its children from "paintingRoot" to "subtreePaintRoot"
https://bugs.webkit.org/show_bug.cgi?id=116417
Reviewed by Sam Weinig.
PaintInfo and RenderLayer code referred to a "paintingRoot". This is only set when
FrameView::setNodeToDraw() has been called and is used to restrict painting to
some part of the subtree, but it could easily be misinterpreted, and confused with
the "rootLayer" used by RenderLayer (which is usually not the layer associated with
the paintingRoot).
Change the terminology from "paintingRoot" to "subtreePaintRoot" root to make the
purpose of this variable more obvious.
No behavior change.
* page/FrameView.cpp: Add a comment for setNodeToDraw(); in future this should
be called setSubtreePaintRoot() or something. Not done in this patch to avoid
risk; this function is exported from WebCore.
* rendering/InlineFlowBox.cpp:
(WebCore::InlineFlowBox::paint):
* rendering/PaintInfo.h:
(WebCore::PaintInfo::PaintInfo):
(WebCore::PaintInfo::updateSubtreePaintRootForChildren):
(WebCore::PaintInfo::shouldPaintWithinRoot):
* rendering/RenderBlock.cpp:
(WebCore::RenderBlock::paintContents):
* rendering/RenderBox.cpp:
(WebCore::RenderBox::paint):
* rendering/RenderLayer.cpp:
(WebCore::RenderLayer::paint):
(WebCore::RenderLayer::paintOverlayScrollbars):
(WebCore::RenderLayer::paintLayerContents):
(WebCore::RenderLayer::paintLayerByApplyingTransform):
(WebCore::RenderLayer::paintBackgroundForFragments):
(WebCore::RenderLayer::paintForegroundForFragments):
(WebCore::RenderLayer::paintForegroundForFragmentsWithPhase):
(WebCore::RenderLayer::paintOutlineForFragments):
(WebCore::RenderLayer::paintMaskForFragments):
* rendering/RenderLayer.h:
(WebCore::RenderLayer::LayerPaintingInfo::LayerPaintingInfo):
* rendering/RenderObject.cpp: Add a comment to recommend changing the name of
paintingRootRect() to refer to a subtree paint. Not done in this patch to avoid
risk; this function is exported from WebCore.
* rendering/RenderSnapshottedPlugIn.cpp:
(WebCore::RenderSnapshottedPlugIn::paint):
* rendering/RenderTable.cpp:
(WebCore::RenderTable::paintObject):
* rendering/svg/RenderSVGContainer.cpp:
(WebCore::RenderSVGContainer::paint):
2013-05-19 Darin Adler <darin@apple.com>
Use Element instead of Node in DragState, also redo DragState struct
https://bugs.webkit.org/show_bug.cgi?id=116411
Reviewed by Sam Weinig.
The drag source is an element, so use RefPtr<Element> instead of RefPtr<Node>.
Also, the entire drag state is about dragging, so no need for the word "drag" in the
name of its members. Also, it's a struct, so the members don't need m_ prefixes.
* page/DragController.cpp: Removed unneeded include of Node.h since it's included by
Element.h, which is also included.
(WebCore::DragController::draggableElement): Renamed from Node to Element and changed
the types and names of arguments accordingly. Also made this function handle a
startElement of 0 so callers don't need to. Also updated for changes to DragState members.
(WebCore::DragController::startDrag): Updated for changes to DragState members.
Since dragSource can only be an element, was able to get rid of isElementNode checks.
* page/DragController.h: Fixed style of forward declarations of structs. Updated for
change of draggableNode to draggableElement. Also removed declarations of nonexistent
selectionDraggingRect and doDrag functions.
* page/DragState.h: Rewrote practically this whole header. Added an include of Element
instead of Node since that's what we use now. Removed includes that are redundant.
There's no problem copying a DragState, so removed WTF_MAKE_NONCOPYABLE. There's no need
to allocate a DragState on the heap, so removed WTF_MAKE_FAST_ALLOCATED. The event dispatch
boolean is never set to a constant, so there's no need for a policy enum; it can just be
a boolean. Removed the "m_" prefixes from the struct members, since this is a struct with
public members and we don't use the prefix in those cases. Removed the word "drag" from the
struct member names since this entire struct is about dragging and has drag in its name.
Left the comments mostly intact, even though I'm not certain of their value.
* page/EventHandler.cpp:
(WebCore::EventHandler::handleMousePressEvent): Updated for changes to DragState.
(WebCore::EventHandler::eventMayStartDrag):
Use innerElement instead of innerNode to call draggableElement instead of draggableNode.
(WebCore::EventHandler::updateDragAndDrop): Updated for changes to DragState.
(WebCore::EventHandler::cancelDragAndDrop): Ditto.
(WebCore::EventHandler::handleWheelEvent): Added FIXME.
(WebCore::EventHandler::dragHysteresisExceeded): Updated for changes to DragState.
(WebCore::EventHandler::freeClipboard): Updated for changes to DragState. Also re-added
code to release the clipboard object, which is needed here to avoid keeping it around in
memory until the next drag.
(WebCore::EventHandler::dragSourceEndedAt): Updated for changes to DragState.
(WebCore::EventHandler::updateDragStateAfterEditDragIfNeeded): Ditto.
(WebCore::EventHandler::dispatchDragSrcEvent): Ditto.
(WebCore::EventHandler::handleDrag): Updated for changes to DragState. Use innerElement
instead of innerNode to call draggableElement instead of draggableNode. No longer need to
null check innerElement because draggableElement does that. Removed unneeded else that was
setting m_dragSrc to zero since it's guaranteed to already be zero.
2013-05-19 Anders Carlsson <andersca@apple.com>
Remove ChromeClient::webView()
https://bugs.webkit.org/show_bug.cgi?id=116054
Reviewed by Darin Adler.
This blatantly horrible layer violation was only used to know if a ChromeClient is an empty
client or not. We already have a (slightly less horrible) way to do that.
* loader/EmptyClients.h:
* page/ChromeClient.h:
(ChromeClient):
2013-05-19 Darin Adler <darin@apple.com>
Eliminate the Editor::newGeneralClipboard function
https://bugs.webkit.org/show_bug.cgi?id=116410
Reviewed by Andreas Kling.
This is one of the clean-ups made possible by the changes to the DOM clipboard class.
I had been waiting until all the platforms were moved over to it, but it turns out to be
easy to do this now, just with #ifdefs.
* PlatformBlackBerry.cmake: Deleted EditorBlackBerry.cpp.
* editing/Editor.cpp:
(WebCore::Editor::dispatchCPPEvent): Call Clipboard::createForCopyAndPaste directly when
using the new version of the Clipboard class. Also some small style cleanup nearby.
* editing/blackberry/EditorBlackBerry.cpp: Removed. The only function in this file was
newGeneralClipboard.
* editing/mac/EditorMac.mm: Deleted newGeneralClipboard.
* platform/efl/ClipboardEfl.cpp: Ditto.
* platform/gtk/ClipboardGtk.cpp: Ditto.
2013-05-19 Martin Robinson <mrobinson@igalia.com>
GtkSelectionData length is off by one
https://bugs.webkit.org/show_bug.cgi?id=113962
Reviewed by Anders Carlsson.
No new tests. Since drag data is interpreted as a null-terminated string
this is difficult to test with a C program and we have no infrastructure
built for using GIR tests.
* platform/gtk/PasteboardHelper.cpp:
(WebCore::PasteboardHelper::fillSelectionData): Instead of including the null
character in the paste data length, just include the string. This matches the behavior
of Firefox.
2013-05-18 Simon Fraser <simon.fraser@apple.com>
Hoist several chunks of code at the top of RenderLayer::paintLayerContents() onto new functions
https://bugs.webkit.org/show_bug.cgi?id=116406
Reviewed by Andreas Kling.
RenderLayer::paintLayerContents() was getting polluted with code related to filters,
clipping and font subpixel quantization, and hard to follow.
Move three hunks of code into new functions:
setupFontSubpixelQuantization() now contains the code related to whether we disable
font subpixel quantization on the context.
setupClipPath() now contains code related to clipping to shapes and references.
setupFilters() and applyFilters() contain code related to CSS filters.
As part of this, the interaction with FilterEffectRendererHelper was simplified.
It was convenient for setupFilters() to return a FilterEffectRendererHelper object
if successful, so we use an OwnPtr<FilterEffectRendererHelper> now. In addition,
the GraphicsContext swapping was moved from FilterEffectRendererHelper code into RenderLayer
to make it easier to follow. FilterEffectRendererHelper no longer holds on to
the old GraphicsContext.
No behavior change.
* rendering/FilterEffectRenderer.cpp:
(WebCore::FilterEffectRendererHelper::filterContext):
(WebCore::FilterEffectRendererHelper::beginFilterEffect):
(WebCore::FilterEffectRendererHelper::applyFilterEffect):
* rendering/FilterEffectRenderer.h:
(WebCore::FilterEffectRendererHelper::FilterEffectRendererHelper):
(WebCore::FilterEffectRendererHelper::hasStartedFilterEffect):
(FilterEffectRendererHelper):
* rendering/RenderLayer.cpp:
(WebCore::RenderLayer::setupFontSubpixelQuantization):
(WebCore::RenderLayer::setupClipPath):
(WebCore::RenderLayer::setupFilters):
(WebCore::RenderLayer::applyFilters):
(WebCore::RenderLayer::paintLayerContents):
* rendering/RenderLayer.h:
2013-05-18 Simon Fraser <simon.fraser@apple.com>
Refactor RenderStyle::diff()
https://bugs.webkit.org/show_bug.cgi?id=116397
Reviewed by Andreas Kling.
RenderStyle::diff() was prone to being changed incorrectly, since there was
a poorly documented ordering requirement: style changes that cause layout
have to be detected before those that cause only repainting.
In addition, the existing code made it impossible to separately ask whether
a given style change requires a repaint, if we've already detected that it
requires a positioned-movement-only layout.
Fix by factoring the code into member functions that check for each type
of style change.
No behavior change.
* rendering/style/RenderStyle.cpp:
(WebCore::positionChangeIsMovementOnly):
(WebCore::RenderStyle::changeRequiresLayout):
(WebCore::RenderStyle::changeRequiresPositionedLayoutOnly):
(WebCore::RenderStyle::changeRequiresLayerRepaint):
(WebCore::RenderStyle::changeRequiresRepaint):
(WebCore::RenderStyle::changeRequiresRepaintIfText):
(WebCore::RenderStyle::changeRequiresRecompositeLayer):
(WebCore::RenderStyle::diff):
* rendering/style/RenderStyle.h:
2013-05-18 Anders Carlsson <andersca@apple.com>
Simplify the StorageArea setter functions
https://bugs.webkit.org/show_bug.cgi?id=116402
Reviewed by Sam Weinig.
Move more security checking code to Storage so more code can be shared between WebKit1 and WebKit2.
* inspector/InspectorDOMStorageAgent.cpp:
(WebCore::InspectorDOMStorageAgent::setDOMStorageItem):
(WebCore::InspectorDOMStorageAgent::removeDOMStorageItem):
* storage/Storage.cpp:
(WebCore::Storage::setItem):
(WebCore::Storage::removeItem):
(WebCore::Storage::clear):
* storage/StorageArea.h:
(StorageArea):
* storage/StorageAreaImpl.cpp:
(WebCore::StorageAreaImpl::setItem):
(WebCore::StorageAreaImpl::removeItem):
(WebCore::StorageAreaImpl::clear):
* storage/StorageAreaImpl.h:
(StorageAreaImpl):
2013-05-18 Anders Carlsson <andersca@apple.com>
Simplify StorageArea getter functions
https://bugs.webkit.org/show_bug.cgi?id=116399
Reviewed by Sam Weinig.
Move the security and private browsing checks from StorageArea to Storage so we can share
more code between WebKit1 and WebKit2.
* inspector/InspectorDOMStorageAgent.cpp:
(WebCore::InspectorDOMStorageAgent::getDOMStorageItems):
Update to new StorageArea interface. The security checks are unnecessary here anyway because
InspectorDOMStorageAgent::findStorageArea will only return a StorageArea that can be accessed
by the frame's security origin.
* storage/Storage.cpp:
(WebCore::Storage::key):
(WebCore::Storage::getItem):
(WebCore::Storage::contains):
* storage/StorageArea.h:
(StorageArea):
* storage/StorageAreaImpl.cpp:
(WebCore::StorageAreaImpl::key):
(WebCore::StorageAreaImpl::item):
(WebCore::StorageAreaImpl::contains):
* storage/StorageAreaImpl.h:
(StorageAreaImpl):
2013-05-17 Simon Fraser <simon.fraser@apple.com>
Garbage on page background while http://canberraballoons.com.au is loading
https://bugs.webkit.org/show_bug.cgi?id=116384
<rdar://problem/13930328>
Reviewed by Dan Bernstein.
This page loads a large JPEG image as the body background.
ImageSource::frameHasAlphaAtIndex() always claims that JPEG images
are opaque, but this isn't true if the frame is only partially loaded.
However, this would cause FillLayer::hasOpaqueImage() to report that the
background image is opaque, so we'd skip painting the background color.
Unpainted content in an opaque layer results in garbage.
Fix by having ImageSource::frameHasAlphaAtIndex() always return true
for frames that are not complete. When the image load completes, we
recompute metadata and correctly determine that the frame is opaque.
* platform/graphics/cg/ImageSourceCG.cpp:
(WebCore::ImageSource::frameHasAlphaAtIndex):
2013-05-18 Timothy Hatcher <timothy@apple.com>
Simplify EventLoop::cycle() on Mac.
https://webkit.org/b/116392
Reviewed by Anders Carlsson.
* platform/mac/EventLoopMac.mm:
(WebCore::EventLoop::cycle): Use CFRunLoopRunInMode instead.
2013-05-18 Andreas Kling <akling@apple.com>
Use CSSParserSelector::appendTagHistory() from CSS grammar.
<http://webkit.org/b/116382>
Reviewed by Antti Koivisto.
CSSParserSelector already knows how to append another component to itself,
no need to duplicate that logic in the grammar.
* css/CSSGrammar.y.in:
2013-05-18 Patrick Gansterer <paroga@webkit.org>
[CMake] Replace *_LIBRARY_NAME with *_OUTPUT_NAME
https://bugs.webkit.org/show_bug.cgi?id=114554
Reviewed by Gyuyoung Kim.
Using variables as target names is very uncommon in CMake.
The usual way to specify the name of the resulting binary
is to set the OUTPUT_NAME target property.
* CMakeLists.txt:
2013-05-18 Carlos Garcia Campos <cgarcia@igalia.com>
[GTK] Move GTK port off legacy clipboard
https://bugs.webkit.org/show_bug.cgi?id=116221
Reviewed by Martin Robinson.
Merge clipboard methods into PasteboardGtk that now wraps a
DataObjectGtk.
* GNUmakefile.list.am: Remove ClipboardGtk.h.
* dom/Clipboard.h: Remove GTK from the list of ports using legacy
clipboard.
* page/gtk/EventHandlerGtk.cpp:
(WebCore::EventHandler::createDraggingClipboard): Use
Clipboard::createForDragAndDrop().
* platform/Pasteboard.h:
(Pasteboard):
* platform/gtk/ClipboardGtk.cpp:
(WebCore::Editor::newGeneralClipboard): Use
Clipboard::createForCopyAndPaste().
(WebCore::Clipboard::createDragImage):
(WebCore::Clipboard::declareAndWriteDragImage):
* platform/gtk/ClipboardGtk.h: Removed.
* platform/gtk/DragDataGtk.cpp:
* platform/gtk/PasteboardGtk.cpp:
(WebCore::Pasteboard::create): Create a new Pasteboard for a given
GtkClipboard or DataObjectGtk.
(WebCore::Pasteboard::createForCopyAndPaste): Create a Pasteboard
for the GDK_SELECTION_CLIPBOARD clipboard.
(WebCore::Pasteboard::createPrivate): Create a Pasteboard without
a GtkClipboard associated.
(WebCore::Pasteboard::createForDragAndDrop): Create a Pasteboard
for drag and drop operations.
(WebCore::selectionClipboard): Return a static Pasteboard for the
GDK_SELECTION_CLIPBOARD clipboard.
(WebCore::primaryClipboard): Return a static Pasteboard for the
GDK_SELECTION_PRIMARY clipboard.
(WebCore::Pasteboard::generalPasteboard): Return
selectionClipboard() or primaryClipboard() depending on whether
primary selection clipboard is the active one or not.
(WebCore::Pasteboard::Pasteboard):
(WebCore::Pasteboard::~Pasteboard):
(WebCore::Pasteboard::dataObject): Return the wrapped DataObjectGtk.
(WebCore::dataObjectTypeFromHTMLClipboardType): Copied from
ClipboardGtk.cpp.
(WebCore::Pasteboard::writeString): Adapted to upate the wrapped
DataObjectGtk and the GtkClipboard if needed.
(WebCore::Pasteboard::writeSelection): Ditto.
(WebCore::Pasteboard::writePlainText): Ditto.
(WebCore::Pasteboard::writeURL): Ditto.
(WebCore::Pasteboard::writeImage): Ditto.
(WebCore::Pasteboard::writePasteboard): Copy the wrapped
DataObjectGtk from the DataObjectGtk of the given Pasteboard and
upsate the GtkClipboard if needed.
(WebCore::Pasteboard::clear): Copied from ClipboardGtk.cpp.
(WebCore::Pasteboard::canSmartReplace): Check if current
GtkClipboard supports smart replace.
(WebCore::Pasteboard::setDragImage):
(WebCore::Pasteboard::documentFragment): Adapted to use the
wrapped DataObjectGtk reading from the current GtkClipboard if
present.
(WebCore::Pasteboard::plainText): Ditto.
(WebCore::Pasteboard::hasData): Copied from ClipboardGtk.cpp.
(WebCore::Pasteboard::types): Ditto.
(WebCore::Pasteboard::readString): Ditto.
(WebCore::Pasteboard::readFilenames): Ditto.
2013-05-18 Alberto Garcia <agarcia@igalia.com>
[GTK] Parallel build fails if gtk-doc is enabled
https://bugs.webkit.org/show_bug.cgi?id=116227
Reviewed by Martin Robinson.
* GNUmakefile.am:
Don't overwrite noinst_DATA, modify its existing value instead.
2013-05-17 Michelangelo De Simone <michelangelo@webkit.org>
CSSParser parsing of CSSPropertyFontStretch falls into CSSPropertyGeometry
https://bugs.webkit.org/show_bug.cgi?id=116370
CSSPropertyFontStretch mistakenly fell through the shader parsing logic.
Reviewed by Alexandru Chiculita.
No new test possible, the feature is not implemented nor exposed.
* css/CSSParser.cpp:
(WebCore::CSSParser::parseValue):
2013-05-17 Timothy Hatcher <timothy@apple.com>
Force the script debug server to continue when disabling the debugger.
There might be some cases where the debugger will stay in the nested run loop
which cause weird issues.
Speculative fix for: https://webkit.org/b/111438
Reviewed by Joseph Pecoraro.
* inspector/InspectorDebuggerAgent.cpp:
(WebCore::InspectorDebuggerAgent::disable):
2013-05-16 Darin Adler <darin@apple.com>
[BlackBerry] Get BlackBerry port off legacy clipboard
https://bugs.webkit.org/show_bug.cgi?id=116287
Reviewed by Rob Buis.
* PlatformBlackBerry.cmake: Removed ClipboardBlackBerry.cpp.
* dom/Clipboard.h: Removed BLACKBERRY from the list of platforms that
use the legacy clipboard.
* editing/blackberry/EditorBlackBerry.cpp:
(WebCore::Editor::newGeneralClipboard): Changed to just create a copy
and paste clipboard.
* page/blackberry/EventHandlerBlackBerry.cpp: Removed a drag-related
function that wasn't doing any good.
* platform/blackberry/ClipboardBlackBerry.cpp: Removed.
* platform/blackberry/ClipboardBlackBerry.h: Removed.
* platform/blackberry/PasteboardBlackBerry.cpp:
(WebCore::Pasteboard::createForCopyAndPaste): Added.
(WebCore::Pasteboard::createPrivate): Added.
(WebCore::Pasteboard::hasData): Added. Moved code here from ClipboardBlackBerry.cpp.
(WebCore::Pasteboard::clear): Ditto.
(WebCore::Pasteboard::readString): Ditto.
(WebCore::Pasteboard::writeString): Ditto.
(WebCore::Pasteboard::types): Ditto.
(WebCore::Pasteboard::readFilenames): Ditto.
2013-05-17 Andreas Kling <akling@apple.com>
Ads on theverge.com cause repaints when hovered, even though content doesn't visibly change.
<http://webkit.org/b/116344>
Reviewed by Darin Adler.
Teach RenderStyle::diff() to ignore differences in the outline value if both styles have non-visible outlines.
* rendering/style/RenderStyle.cpp:
(WebCore::RenderStyle::diff):
* rendering/style/StyleBackgroundData.cpp:
(WebCore::StyleBackgroundData::isEquivalentForPainting):
* rendering/style/StyleBackgroundData.h:
(StyleBackgroundData):
2013-05-17 Andreas Kling <akling@apple.com>
Plug leak in CSSSelectorList::deleteSelectors().
<http://webkit.org/b/116371>
<rdar://problem/13930698>
Reviewed by Ryosuke Niwa.
Don't forget to destroy the very last selector in the list.
* css/CSSSelectorList.cpp:
(WebCore::CSSSelectorList::deleteSelectors):
2013-05-17 Anders Carlsson <andersca@apple.com>
Share code between WebKit1 and WebKit2 StorageArea subclasses
https://bugs.webkit.org/show_bug.cgi?id=116367
Reviewed by Andreas Kling.
* inspector/InspectorDOMStorageAgent.cpp:
(WebCore::InspectorDOMStorageAgent::getDOMStorageItems):
Remove ec parameter.
* inspector/InspectorDOMStorageAgent.h:
Add forward declaration.
* page/DOMWindow.cpp:
(WebCore::DOMWindow::sessionStorage):
(WebCore::DOMWindow::localStorage):
Storage::StorageArea returns a reference now.
* storage/Storage.cpp:
(WebCore::Storage::length):
Check that the storage area can be accessed by the frame, and that it's not disabled by private browsing.
Then call down to the (now simplified) StorageArea::length().
(WebCore::Storage::isDisabledByPrivateBrowsing):
New helper function that's based on StorageAreaImpl::disabledByPrivateBrowsingInFrame, but reordered
to make it easier to follow.
* storage/Storage.h:
(WebCore::Storage::area):
Return a reference.
* storage/StorageAreaImpl.cpp:
(WebCore::StorageAreaImpl::storageType):
Add this new virtual member funciton that's needed by Storage::isDisabledByPrivateBrowsing.
(WebCore::StorageAreaImpl::length):
Remove unneeded code.
2013-05-17 Commit Queue <commit-queue@webkit.org>
Unreviewed, rolling out r150294.
http://trac.webkit.org/changeset/150294
https://bugs.webkit.org/show_bug.cgi?id=116369
Caused 31 tests to fail (Requested by rniwa on #webkit).
* WebCore.exp.in:
* rendering/InlineFlowBox.h:
* rendering/InlineTextBox.h:
(InlineTextBox):
* rendering/RenderApplet.h:
* rendering/RenderBR.h:
* rendering/RenderBlock.h:
(RenderBlock):
(WebCore::RenderBlock::virtualContinuation):
* rendering/RenderBox.h:
(WebCore::RenderBox::borderBoundingBox):
(RenderBox):
(WebCore::RenderBox::marginLogicalLeft):
(WebCore::RenderBox::marginLogicalRight):
* rendering/RenderBoxModelObject.h:
(WebCore::RenderBoxModelObject::isBoxModelObject):
* rendering/RenderButton.h:
* rendering/RenderCombineText.h:
* rendering/RenderCounter.h:
* rendering/RenderDeprecatedFlexibleBox.h:
* rendering/RenderDetailsMarker.h:
* rendering/RenderEmbeddedObject.h:
(RenderEmbeddedObject):
(WebCore::RenderEmbeddedObject::isEmbeddedObject):
(WebCore::RenderEmbeddedObject::virtualChildren):
* rendering/RenderFieldset.h:
* rendering/RenderFileUploadControl.h:
* rendering/RenderFlexibleBox.h:
* rendering/RenderFlowThread.h:
* rendering/RenderFrame.h:
* rendering/RenderFrameSet.h:
* rendering/RenderFullScreen.cpp:
* rendering/RenderFullScreen.h:
* rendering/RenderGrid.h:
* rendering/RenderHTMLCanvas.h:
* rendering/RenderIFrame.h:
* rendering/RenderImage.h:
(RenderImage):
(WebCore::RenderImage::isRenderImage):
* rendering/RenderInline.h:
(RenderInline):
(WebCore::RenderInline::virtualContinuation):
(WebCore::RenderInline::virtualChildren):
(WebCore::RenderInline::isRenderInline):
(WebCore::RenderInline::layout):
(WebCore::RenderInline::requiresLayer):
(WebCore::RenderInline::offsetWidth):
(WebCore::RenderInline::offsetHeight):
(WebCore::RenderInline::borderBoundingBox):
(WebCore::RenderInline::dirtyLinesFromChangedChild):
* rendering/RenderLayerModelObject.h:
* rendering/RenderListBox.h:
* rendering/RenderListItem.h:
* rendering/RenderListMarker.h:
* rendering/RenderMedia.h:
(WebCore::RenderMedia::virtualChildren):
(WebCore::RenderMedia::canHaveChildren):
(WebCore::RenderMedia::isMedia):
(WebCore::RenderMedia::isImage):
(WebCore::RenderMedia::requiresForcedStyleRecalcPropagation):
* rendering/RenderMediaControlElements.h:
* rendering/RenderMenuList.h:
* rendering/RenderMeter.h:
* rendering/RenderMultiColumnBlock.h:
* rendering/RenderMultiColumnFlowThread.h:
* rendering/RenderMultiColumnSet.h:
* rendering/RenderNamedFlowThread.h:
* rendering/RenderPart.h:
(RenderPart):
(WebCore::RenderPart::isRenderPart):
(WebCore::RenderPart::renderName):
* rendering/RenderProgress.h:
* rendering/RenderRegion.h:
(WebCore::RenderRegion::isRenderRegion):
* rendering/RenderRegionSet.h:
* rendering/RenderReplaced.h:
(RenderReplaced):
(WebCore::RenderReplaced::renderName):
* rendering/RenderReplica.h:
* rendering/RenderRuby.h:
* rendering/RenderRubyBase.h:
* rendering/RenderRubyRun.h:
* rendering/RenderRubyText.h:
* rendering/RenderScrollbarPart.h:
* rendering/RenderSearchField.h:
* rendering/RenderSlider.h:
* rendering/RenderSnapshottedPlugIn.h:
(RenderSnapshottedPlugIn):
* rendering/RenderTable.h:
(RenderTable):
(WebCore::RenderTable::renderName):
(WebCore::RenderTable::isTable):
(WebCore::RenderTable::avoidsFloats):
* rendering/RenderTableCaption.h:
* rendering/RenderTableCell.h:
* rendering/RenderTableCol.h:
* rendering/RenderTableRow.h:
* rendering/RenderTableSection.h:
* rendering/RenderText.h:
(RenderText):
(WebCore::RenderText::marginLeft):
(WebCore::RenderText::marginRight):
(WebCore::RenderText::styleWillChange):
(WebCore::RenderText::length):
(WebCore::RenderText::paint):
(WebCore::RenderText::layout):
* rendering/RenderTextControl.h:
(RenderTextControl):
(WebCore::RenderTextControl::renderName):
(WebCore::RenderTextControl::isTextControl):
(WebCore::RenderTextControl::avoidsFloats):
* rendering/RenderTextControlMultiLine.h:
* rendering/RenderTextControlSingleLine.h:
(RenderTextControlSingleLine):
(WebCore::RenderTextControlSingleLine::isTextField):
* rendering/RenderTextFragment.h:
* rendering/RenderTextTrackCue.h:
* rendering/RenderVideo.h:
* rendering/RenderView.h:
* rendering/RenderWidget.h:
(RenderWidget):
(WebCore::RenderWidget::isWidget):
* rendering/RenderWordBreak.h:
* rendering/RootInlineBox.h:
(RootInlineBox):
* rendering/mathml/RenderMathMLBlock.h:
* rendering/svg/RenderSVGBlock.h:
(RenderSVGBlock):
* rendering/svg/RenderSVGContainer.h:
(WebCore::RenderSVGContainer::setNeedsBoundariesUpdate):
(WebCore::RenderSVGContainer::virtualChildren):
(WebCore::RenderSVGContainer::isSVGContainer):
(WebCore::RenderSVGContainer::renderName):
(RenderSVGContainer):
(WebCore::RenderSVGContainer::objectBoundingBox):
(WebCore::RenderSVGContainer::strokeBoundingBox):
(WebCore::RenderSVGContainer::repaintRectInLocalCoordinates):
* rendering/svg/RenderSVGEllipse.h:
* rendering/svg/RenderSVGForeignObject.h:
* rendering/svg/RenderSVGGradientStop.h:
* rendering/svg/RenderSVGHiddenContainer.h:
(WebCore::RenderSVGHiddenContainer::renderName):
(RenderSVGHiddenContainer):
(WebCore::RenderSVGHiddenContainer::isSVGHiddenContainer):
* rendering/svg/RenderSVGImage.h:
* rendering/svg/RenderSVGInline.h:
(WebCore::RenderSVGInline::renderName):
(WebCore::RenderSVGInline::requiresLayer):
(WebCore::RenderSVGInline::isSVGInline):
(RenderSVGInline):
* rendering/svg/RenderSVGInlineText.h:
* rendering/svg/RenderSVGModelObject.h:
(WebCore::RenderSVGModelObject::requiresLayer):
(RenderSVGModelObject):
* rendering/svg/RenderSVGPath.h:
* rendering/svg/RenderSVGRect.h:
* rendering/svg/RenderSVGResourceClipper.h:
* rendering/svg/RenderSVGResourceContainer.h:
(RenderSVGResourceContainer):
(WebCore::RenderSVGResourceContainer::isSVGResourceContainer):
(WebCore::RenderSVGResourceContainer::toRenderSVGResourceContainer):
* rendering/svg/RenderSVGResourceFilter.h:
* rendering/svg/RenderSVGResourceFilterPrimitive.h:
* rendering/svg/RenderSVGResourceGradient.h:
(RenderSVGResourceGradient):
(WebCore::RenderSVGResourceGradient::resourceBoundingBox):
* rendering/svg/RenderSVGResourceLinearGradient.h:
* rendering/svg/RenderSVGResourceMarker.h:
* rendering/svg/RenderSVGResourceMasker.h:
* rendering/svg/RenderSVGResourcePattern.h:
* rendering/svg/RenderSVGResourceRadialGradient.h:
* rendering/svg/RenderSVGRoot.h:
* rendering/svg/RenderSVGShape.h:
(WebCore::RenderSVGShape::setNeedsBoundariesUpdate):
(WebCore::RenderSVGShape::setNeedsTransformUpdate):
(WebCore::RenderSVGShape::repaintRectInLocalCoordinates):
(WebCore::RenderSVGShape::localToParentTransform):
(WebCore::RenderSVGShape::localTransform):
(WebCore::RenderSVGShape::isSVGShape):
(RenderSVGShape):
(WebCore::RenderSVGShape::objectBoundingBox):
(WebCore::RenderSVGShape::strokeBoundingBox):
* rendering/svg/RenderSVGTSpan.h:
* rendering/svg/RenderSVGText.h:
* rendering/svg/RenderSVGTextPath.h:
* rendering/svg/RenderSVGTransformableContainer.h:
* rendering/svg/RenderSVGViewportContainer.h:
2013-05-17 Christophe Dumez <ch.dumez@sisa.samsung.com>
Get rid of Custom code for Audio global constructor
https://bugs.webkit.org/show_bug.cgi?id=116343
Reviewed by Geoffrey Garen.
Remove custom code for Audio global constructor. It is no longer needed
now that the the bindings generator no longer require custom code for
named constructors and now that [EnabledAtRuntime] extended attribute is
supported for global constructors.
HTMLAudioElement global constructors are now automatically generated.
No new tests, no behavior change for layout tests.
* bindings/js/JSDOMWindowCustom.cpp:
* html/HTMLAudioElement.idl:
* page/DOMWindow.idl:
2013-05-17 Alexey Proskuryakov <ap@apple.com>
<rdar://problem/13819878> Disable SharedWorker when in multiple web process model
https://bugs.webkit.org/show_bug.cgi?id=116359
Reviewed by Anders Carlsson.
This feature was already RuntimeEnabled. Call through layers to get the answer from
a platform strategy.
* workers/DefaultSharedWorkerRepository.cpp:
(WebCore::DefaultSharedWorkerRepository::isAvailable):
* workers/DefaultSharedWorkerRepository.h:
* workers/SharedWorkerRepository.cpp:
(WebCore::SharedWorkerRepository::isAvailable):
* workers/SharedWorkerStrategy.h:
(WebCore::SharedWorkerStrategy::isAvailable):
2013-05-17 Anders Carlsson <andersca@apple.com>
Move Storage member functions out of line
https://bugs.webkit.org/show_bug.cgi?id=116364
Reviewed by Andreas Kling.
This is preparation for sharing more code between the WebKit1 and WebKit2 storage area subclasses.
Also remove unnecessary null checks and make m_storageArea const.
* storage/Storage.cpp:
(WebCore::Storage::length):
(WebCore::Storage::key):
(WebCore::Storage::getItem):
(WebCore::Storage::setItem):
(WebCore::Storage::removeItem):
(WebCore::Storage::clear):
(WebCore::Storage::contains):
* storage/Storage.h:
(WebCore::Storage::area):
2013-05-17 Beth Dakin <bdakin@apple.com>
Headers and footers will sometimes disappear and re-appear during page loads
https://bugs.webkit.org/show_bug.cgi?id=116336
-and corresponding-
<rdar://problem/13886753>
Reviewed by Simon Fraser.
This patch changes the WebCore-level API that WebKit uses to create a banner.
Specifically this patch removes FrameView::setWantsLayerForHeader(), which created
and returned a layer. Instead, WK2 will call Page::addHeaderWithHeight(). When the
layer has been created, it will call back into WK2 via ChromeClient. This will
allow WebCore to re-create the header/footer layers as needed whenever the
FrameView/RenderLayerCompositor have been destroyed and recreated.
Remove references to old FrameView functions. Add references to new Page
functions.
* WebCore.exp.in:
New ChromeClient functions will pass the new layers up to WK2.
* page/ChromeClient.h:
(WebCore::ChromeClient::didAddHeaderLayer):
(WebCore::ChromeClient::didAddFooterLayer):
(ChromeClient):
Remove setWantsLayerForHeader/Footer.
* page/FrameView.cpp:
* page/FrameView.h:
(FrameView):
Page now caches the header and footer height. When the FrameView/RLC have been
destroyed, and the cached layer/height information on those classes has been lost,
this data on Page will persist so that we can build the layers back up.
* page/Page.cpp:
(WebCore::Page::Page):
(WebCore::Page::addHeaderWithHeight):
(WebCore::Page::addFooterWithHeight):
* page/Page.h:
(WebCore::Page::headerHeight):
(WebCore::Page::footerHeight):
As soon as the root gets a backing, recreate the header and footer layers if
needed.
* rendering/RenderLayerCompositor.cpp:
(WebCore::RenderLayerCompositor::updateBacking):
Call into ChromeClient.
(WebCore::RenderLayerCompositor::updateLayerForHeader):
(WebCore::RenderLayerCompositor::updateLayerForFooter):
2013-05-18 Claudio Saavedra <csaavedra@igalia.com>
[CSS] Minor cleanups in CSS variables handling
https://bugs.webkit.org/show_bug.cgi?id=116318
Reviewed by Ryosuke Niwa.
No new tests, only a cleanup.
* css/CSSParser.cpp:
(WebCore::CSSParserString::substring): Optimize.
(WebCore::CSSParser::createPrimitiveVariableNameValue):
Remove intermediate variable.
2013-05-17 Alexey Proskuryakov <ap@apple.com>
[Mac] Add DOMWindowConstructors.idl to Xcode project file
https://bugs.webkit.org/show_bug.cgi?id=116351
Reviewed by Anders Carlsson.
* WebCore.xcodeproj/project.pbxproj: Added the file, so that Xcode includes it
in searches.
2013-05-17 Ryosuke Niwa <rniwa@webkit.org>
Remove the declaration of Element::detachAttrNodeAtIndex erroneously added in r150072.
* dom/Element.h:
(Element):
2013-05-17 Anders Carlsson <andersca@apple.com>
WKKeyValueStorageManagerGetKeyValueStorageOrigins should get origins from the UI process
https://bugs.webkit.org/show_bug.cgi?id=116346
<rdar://problem/13852829>
Reviewed by Andreas Kling.
Export the UTF8Encoding symbol.
* WebCore.exp.in:
2013-05-17 Andreas Kling <akling@apple.com>
Apply FINAL to the RenderObject hierarchy.
<http://webkit.org/b/115977>
Mostly from Blink r148795 by <cevans@chromium.org>
<http://src.chromium.org/viewvc/blink?view=revision&revision=148795>
Re-landing without devirtualization tweaks.
* rendering/: Beat things with the FINAL stick.
* WebCore.exp.in: Export a now-needed symbol.
2013-05-17 Alexey Proskuryakov <ap@apple.com>
Build fix.
* loader/FrameLoader.cpp: (WebCore::FrameLoader::willTransitionToCommitted):
Frame:editor() now returns a reference.
2013-05-17 Christophe Dumez <ch.dumez@sisa.samsung.com>
Get rid of [ConstructorParameters] extended attributes
https://bugs.webkit.org/show_bug.cgi?id=116308
Reviewed by Kentaro Hara.
Get rid of WebKit-specific [ConstructorParameters] IDL extended attribute. Instead,
[CustomConstructor] arguments are now explicitly specified, similarly to [Constructor]
arguments and the constructor object's "length" property is now automatically
computed for custom constructors as well.
This is less error-prone as the value is not hardcoded, more consistent with
[Constructor] extended attribute and gives more information about the custom constructor
in the IDL file. We also get rid of a WebKit-specific IDL attribute which is always
nice.
No new tests, already covered by fast/js/constructor-length.html.
* Modules/mediastream/MediaStream.idl:
* Modules/webaudio/AudioContext.idl:
* Modules/websockets/WebSocket.idl:
* bindings/scripts/CodeGeneratorJS.pm:
(GenerateConstructorHelperMethods):
* bindings/scripts/IDLAttributes.txt:
* bindings/scripts/IDLParser.pm:
(applyTypedefs):
(parseAttributeRest):
(copyExtendedAttributes):
(parseExtendedAttributeRest):
(applyExtendedAttributeList):
* bindings/scripts/test/JS/JSFloat64Array.cpp:
(WebCore::JSFloat64ArrayConstructor::finishCreation):
* bindings/scripts/test/TestTypedArray.idl:
* dom/MutationObserver.idl:
* fileapi/Blob.idl:
* html/DOMFormData.idl:
* html/canvas/ArrayBuffer.idl:
* html/canvas/DataView.idl:
* page/WebKitPoint.idl:
* workers/SharedWorker.idl:
* workers/Worker.idl:
2013-05-17 Alexey Proskuryakov <ap@apple.com>
Text input is largely broken when there are subframes loading
http://bugs.webkit.org/show_bug.cgi?id=59121
<rdar://problem/9320468>
Reviewed by Darin Adler.
This addresses text input being abandoned when another frame in a page is navigated.
There are still many opportunities for improvement:
- Track other cases where WebCore interferes may want to cancel input without
direct user action (e.g. deleting the whole editable element on a timer).
- Fix how dictionary panel and autocorrection are dismissed (they still have the
same issue, and get dismissed with any frame navigation).
Test: platform/mac/editing/input/unconfirmed-text-navigation-with-page-cache.html
* loader/FrameLoader.h:
* loader/FrameLoader.cpp:
(WebCore::FrameLoader::willTransitionToCommitted): Make sure that we
do not keep an inline session in a frame that's no longer active, as WebKit2 no
longer takes care of this case (and more of the logic should be in WebCore anyway).
(WebCore::FrameLoader::commitProvisionalLoad): Added a hook that gets invoked right
before transitioning to committed state starts. We may want to move more code here
eventually, e.g. from Frame::setView.
2013-05-17 Christophe Dumez <ch.dumez@sisa.samsung.com>
Get rid of [CustomGetter] for global named constructors
https://bugs.webkit.org/show_bug.cgi?id=116116
Reviewed by Geoffrey Garen.
Improve the JSC bindings generator so that global named constructors no longer
require a [CustomGetter] IDL extended attribute. As a consequence, attributes
on the global window object can now be automatically generated for interfaces
that have a [NamedConstructor], namely HTMLOptionElement.
The HTMLAudioElement global constructors are still manually defined because it
requires custom code at the moment to check if the media player is available.
No new tests, no behavior change.
* bindings/js/JSDOMWindowCustom.cpp:
* bindings/scripts/CodeGeneratorJS.pm:
* bindings/scripts/preprocess-idls.pl:
* bindings/scripts/test/JS/JSTestNamedConstructor.cpp:
* bindings/scripts/test/JS/JSTestNamedConstructor.h:
* html/HTMLOptionElement.idl:
* page/DOMWindow.idl:
2013-05-17 Joseph Pecoraro <pecoraro@apple.com>
Web Inspector: SyntaxError evaluating "1+1; //@ sourceURL=test" in console
https://bugs.webkit.org/show_bug.cgi?id=116292
Add a newline after the expression so a single line comment doesn't
erroneously comment out the closing brace of the with block.
Reviewed by Timothy Hatcher.
Test: inspector/console/console-eval-comment.html
* inspector/InjectedScriptSource.js:
2013-05-17 David Hyatt <hyatt@apple.com>
fast/flexbox/auto-height-with-flex.html failing only on release builds.
https://bugs.webkit.org/show_bug.cgi?id=116240
Reviewed by Darin Adler.
Fix the mainAxisContentExtent method so no overflow occurs, since it
doesn't work right on release builds.
* rendering/RenderFlexibleBox.cpp:
(WebCore::RenderFlexibleBox::mainAxisContentExtent):
2013-05-17 Christophe Dumez <ch.dumez@sisa.samsung.com>
Add [EnabledAtRuntime] extended attribute support for global constructors
https://bugs.webkit.org/show_bug.cgi?id=116147
Reviewed by Geoffrey Garen.
Add [EnabledAtRuntime] extended attribute support for global constructors.
This patch adds [EnabledAtRuntime] extended attribute to SharedWorker and
WebSocket IDL interfaces so that their global constructors on the global
Window object can now be automatically generated.
The behavior on JavaScript side is unchanged. We simply leverage
RuntimeEnabledFeatures class and the new [EnabledAtRuntime] IDL extended
attribute to generate the code for global constructors getters instead
of using custom code.
No new tests, no behavior change for layout tests.
* GNUmakefile.list.am:
* Modules/websockets/WebSocket.cpp: Enable WebSockets at runtime by default.
* Modules/websockets/WebSocket.idl:
* Target.pri:
* UseJSC.cmake:
* WebCore.vcproj/WebCore.vcproj:
* WebCore.vcxproj/WebCore.vcxproj:
* WebCore.vcxproj/WebCore.vcxproj.filters:
* WebCore.xcodeproj/project.pbxproj:
* bindings/js/JSBindingsAllInOne.cpp:
* bindings/js/JSDOMWindowCustom.cpp:
(WebCore):
* bindings/js/JSDOMWindowWebSocketCustom.cpp: Removed.
* bindings/scripts/CodeGeneratorJS.pm:
(ToMethodName):
(GetRuntimeEnableFunctionName):
(GenerateImplementation):
* bindings/scripts/IDLAttributes.txt:
* page/DOMWindow.idl:
* workers/SharedWorker.idl:
2013-05-17 Darin Adler <darin@apple.com>
[EFL] Move EFL port off legacy clipboard
https://bugs.webkit.org/show_bug.cgi?id=116181
Reviewed by Anders Carlsson.
* dom/Clipboard.h: Switched EFL away from "legacy" mode for Clipboard.
* page/efl/EventHandlerEfl.cpp:
(WebCore::EventHandler::createDraggingClipboard): Changed to call Clipboard member function.
* platform/efl/ClipboardEfl.cpp: Deleted most of the functions.
(WebCore::Editor::newGeneralClipboard): Changed to call Clipboard member function.
(WebCore::Clipboard::createDragImage): Moved from ClipboardEfl to Clipboard.
(WebCore::Clipboard::declareAndWriteDragImage): Moved from ClipboardEfl to Clipboard.
(WebCore::Clipboard::items): Ditto.
* platform/efl/PasteboardEfl.cpp: A lot of copyright notices for a file that
has no code in it other than notImplemented lines! I didn't add a new one.
(WebCore::Pasteboard::createForCopyAndPaste): Added.
(WebCore::Pasteboard::createPrivate): Added.
(WebCore::Pasteboard::createForDragAndDrop): Added.
(WebCore::Pasteboard::hasData): Added.
(WebCore::Pasteboard::readString): Added.
(WebCore::Pasteboard::writeString): Added.
(WebCore::Pasteboard::types): Added.
(WebCore::Pasteboard::readFilenames): Added.
(WebCore::Pasteboard::setDragImage): Added.
(WebCore::Pasteboard::writePasteboard): Added.
2013-05-17 Frédéric Wang <fred.wang@free.fr>
Bad spacing inside MathML formulas when text-indent is specified
https://bugs.webkit.org/show_bug.cgi?id=106600
Reviewed by Martin Robinson.
When MathML is used in a HTML page that modifies the CSS text-indent,
large gaps appear inside the mathematical expressions. Resetting it to
0 on the math root (as Gecko does) fixes the issue.
Tests: mathml/presentation/text-indent.html
mathml/presentation/text-indent-expected.html
* css/mathml.css:
(math): reset text-indent to its default value.
2013-05-17 Alberto Garcia <agarcia@igalia.com>
Fix code that expects Page::chrome() to return a pointer
https://bugs.webkit.org/show_bug.cgi?id=116313
Reviewed by Darin Adler.
Page::chrome() returns a reference after r150214.
* platform/network/blackberry/NetworkManager.cpp:
(WebCore::NetworkManager::startJob):
* platform/network/blackberry/SocketStreamHandleBlackBerry.cpp:
(WebCore::SocketStreamHandle::SocketStreamHandle):
* testing/Internals.cpp:
(WebCore::Internals::resetToConsistentState):
(WebCore::Internals::setEnableMockPagePopup):
2013-05-17 Alberto Garcia <agarcia@igalia.com>
[BlackBerry] ImageBlackBerry: add missing BlendMode parameter
https://bugs.webkit.org/show_bug.cgi?id=116316
Reviewed by Carlos Garcia Campos.
When the new BitmapImage::draw() method was added in r147110 it
didn't include the BlendMode parameter, which has been there since
r137011.
* platform/graphics/blackberry/ImageBlackBerry.cpp:
(WebCore::BitmapImage::draw):
2013-05-16 Jer Noble <jer.noble@apple.com>
Some media/track tests fail or assert on Mac
https://bugs.webkit.org/show_bug.cgi?id=97132
Reviewed by Simon Fraser.
Rationalize the font and padding behavior of cues and cue boxes; ::cue pseudo elements cannot have padding
values applied via CSS (due to padding not being included in the whitelist of applicable CSS properties).
Also, the font values were being applied to the box at one level and the cue at another, leading to incorrect
layout in the snapToLines case. Padding has been removed from the cue, and the font settings are now applied
to the box exclusively.
Additionally, a few drive-by changes were made in TextTrackCue to the return values of displayTreeInternal() &
element(), which previously returned a PassRefPtr<> instead of a plain pointer.
* css/mediaControls.css:
(video::-webkit-media-text-track-container): Move the font size to the display selector.
(video::cue): Remove the display:inline and padding:2px declarations.
(video::-webkit-media-text-track-display): Remove the -webkit-line-content now that the ::cue has no padding.
* html/track/TextTrackCue.cpp:
(WebCore::TextTrackCue::TextTrackCue): The background box is now a span, rather than a forced-inline div.
(WebCore::TextTrackCue::displayTreeInternal): Return a plain pointer.
(WebCore::TextTrackCue::getDisplayTree): Ditto.
(WebCore::TextTrackCue::setFontSize): Set the font on the box, not the cue.
* html/track/TextTrackCue.h:
(WebCore::TextTrackCue::element): Return a plain pointer.
* html/track/TextTrackCueGeneric.cpp:
(WebCore::TextTrackCueGenericBoxElement::applyCSSProperties): The cue element is now a span, not a div.
* page/CaptionUserPreferencesMac.mm:
(WebCore::CaptionUserPreferencesMac::captionsWindowCSS): Whitespace.
(WebCore::CaptionUserPreferencesMac::captionsBackgroundCSS): Do not set padding on the cue.
2013-05-16 Andreas Kling <akling@apple.com>
Changes in text-only properties shouldn't cause repaints unless there is actually text.
<http://webkit.org/b/116250>
Reviewed by Antti Koivisto.
Add a new StyleDifferenceRepaintIfText value to the repertoire of RenderStyle::diff().
This result means that the renderer only needs to repaint if one of its immediate children contains text.
This lets us avoid repainting the same pixels when hovering over constructs like:
<style>
a { text-decoration: none; }
a:hover { text-decoration: underline; }
</style>
<a href="http://is.gd/andersca">
<img src="cool-hat.jpg">
</a>
Since the change in text-decoration has no effect on the rendering of the <img> element,
we'll now be smart enough to avoid repainting it.
* rendering/style/RenderStyleConstants.h:
* rendering/style/RenderStyle.cpp:
(WebCore::RenderStyle::diff):
Move checking of text-only properties until the very end, and return StyleDifferenceRepaintIfText
in case a difference is found, giving precedence to StyleDifferenceRepaint.
* rendering/RenderObject.h:
* rendering/RenderObject.cpp:
(WebCore::RenderObject::hasImmediateNonWhitespaceTextChild):
Helper to check if a RenderObject has at least one RenderText child containing more than just
collapsible whitespace.
(WebCore::RenderObject::shouldRepaintForStyleDifference):
Helper to check if a StyleDifference is either ...Repaint or ...RepaintIfText and the renderer
has an immediate text child.
(WebCore::RenderObject::styleWillChange):
(WebCore::RenderObject::setStyle):
Don't repaint for StyleDifferenceRepaintIfText unless hasImmediateNonWhitespaceTextChild().
* rendering/RenderBox.cpp:
(WebCore::RenderBox::styleDidChange):
* rendering/svg/SVGResourcesCache.cpp:
(WebCore::SVGResourcesCache::clientStyleChanged):
Tweak for new StyleDifference enum value.
* rendering/RenderText.h:
* rendering/RenderText.cpp:
(WebCore::RenderText::isAllCollapsibleWhitespace):
Made this const.
2013-05-17 Lamarque V. Souza <Lamarque.Souza@basyskom.com>
Improve -webkit-text-underline-position memory usage.
https://bugs.webkit.org/show_bug.cgi?id=116108
Reviewed by Benjamin Poulain.
Remove m_maxLogicalTop private variable from RootInlineBox to reduce
the overall memory used to render RootInlineBoxes (eight bytes per RootInlineBox
instance in a 64-bit machine). RootInline::maxLogicalTop() now computes
the maxLogicalTop value everytime it is called. In a typical page
computeMaxLogicalTop is called less than 10 times for each
InlineTextBox that uses -webkit-text-underline-position. That is a small
price users of -webkit-text-underline-position will pay so that
everybody can benefit from the memory reduction in RootInlineBox.
No new tests, no change in behavior.
* rendering/InlineFlowBox.cpp:
(WebCore::InlineFlowBox::computeMaxLogicalTop): Make it const.
* rendering/InlineFlowBox.h:
* rendering/RootInlineBox.cpp:
(WebCore::RootInlineBox::RootInlineBox): Remove m_maxLogicalTop.
(WebCore::RootInlineBox::alignBoxesInBlockDirection): Remove
computeMaxLogicalTop call and obsolete comment.
(WebCore):
(WebCore::RootInlineBox::maxLogicalTop): Compute maxLogicalTop before
returning its value.
* rendering/RootInlineBox.h:
(RootInlineBox):
2013-05-17 Alexis Menard <alexis@webkit.org>
Make sure to call release() on our smart pointers when we should.
https://bugs.webkit.org/show_bug.cgi?id=116307
Reviewed by Andreas Kling.
Call release() when we should call it. There is probably more occurence
of this problem on the codebase but this is a first bunch of fixes.
No new tests : existing ones should cover.
* css/CSSComputedStyleDeclaration.cpp:
(WebCore::valueForNinePieceImage):
(WebCore::getBorderRadiusShorthandValue):
(WebCore::CSSComputedStyleDeclaration::valueForFilter):
(WebCore::CSSComputedStyleDeclaration::getPropertyCSSValue):
(WebCore::CSSComputedStyleDeclaration::getCSSPropertyValuesForSidesShorthand):
(WebCore::CSSComputedStyleDeclaration::getCSSPropertyValuesForGridShorthand):
* css/CSSParser.cpp:
(WebCore::CSSParser::parseBorderImage):
* html/HTMLBodyElement.cpp:
(WebCore::HTMLBodyElement::collectStyleForPresentationAttribute):
2013-05-17 Allan Sandfeld Jensen <allan.jensen@digia.com>
Make PNGImageDecoder::rowAvailable auto-vectorizable
https://bugs.webkit.org/show_bug.cgi?id=116151
Reviewed by Benjamin Poulain.
Changed the main loops under PNGImageDecoder::rowAvailable so that they
avoid branches and non-sequential table look ups.
Together with automatic vectorization by the compiler this provides around
4x speed-up with AVX or 2x speed-up on generic x64. Shaving off 12-40% on
PNG decoding in general.
* platform/graphics/Color.cpp:
(WebCore::premultipliedARGBFromColor):
* platform/graphics/Color.h:
(WebCore::fastDivideBy255):
* platform/graphics/filters/FEBlend.cpp:
* platform/image-decoders/png/PNGImageDecoder.cpp:
(WebCore::setPixelRGB):
(WebCore::setPixelRGBA):
(WebCore::setPixelRGBA_Premultiplied):
(WebCore::PNGImageDecoder::rowAvailable):
2013-05-17 Joseph Pecoraro <pecoraro@apple.com>
Web Inspector: Allow "//# sourceMappingURL" syntax alongside "//@"
https://bugs.webkit.org/show_bug.cgi?id=116290
Follow an update to the spec and support the new and old syntax.
Reviewed by Timothy Hatcher.
* inspector/ContentSearchUtils.cpp:
(WebCore::ContentSearchUtils::scriptCommentPattern):
(WebCore::ContentSearchUtils::stylesheetCommentPattern):
* inspector/front-end/SASSSourceMapping.js:
(WebInspector.SASSSourceMapping.prototype._loadAndProcessSourceMap):
2013-05-17 Christophe Dumez <ch.dumez@sisa.samsung.com>
Remove custom code for MessageEvent.ports getter
https://bugs.webkit.org/show_bug.cgi?id=116304
Reviewed by Kentaro Hara.
Remove Custom code for the "ports" attribute getter in MessageEvent
IDL interface. The JSC bindings generator already supports attributes
of type MessagePortArray.
No new tests, already covered by existing layout tests and bindings
tests.
* bindings/js/JSMessageEventCustom.cpp: Remove Custom code for ports getter.
* bindings/scripts/CodeGeneratorJS.pm:
(NativeToJSValue): Small tweak to correctly handle the case where impl->ports()
returns NULL and avoid crashing in this case.
* bindings/scripts/test/JS/JSTestSerializedScriptValueInterface.cpp: Rebaseline due
to bindings generator tweak.
* dom/MessageEvent.idl: Remove [CustomGetter] extended attribute for 'ports' attribute
and switch to MessagePortArray type.
2013-05-16 Jesus Sanchez-Palencia <jesus.palencia@openbossa.org>
Add stubs for ContextMenu and ContextMenuItem
https://bugs.webkit.org/show_bug.cgi?id=116235
Reviewed by Antonio Gomes.
No new tests needed, only a refactor.
Add ContextMenuNone.cpp and ContextMenuItemNone.cpp
so ports using ENABLE(CROSS_PLATFORM_CONTEXT_MENU) don't
need to replicate these stubs.
* PlatformEfl.cmake:
* Target.pri:
* platform/ContextMenuNone.cpp: Added.
(WebCore):
(WebCore::ContextMenu::ContextMenu):
(WebCore::ContextMenu::getContextMenuItems):
(WebCore::ContextMenu::createPlatformContextMenuFromItems):
(WebCore::ContextMenu::platformContextMenu):
* platform/ContextMenuItemNone.cpp: Added.
(WebCore):
(WebCore::ContextMenuItem::platformContextMenuItem):
* platform/efl/ContextMenuEfl.cpp: Removed.
* platform/efl/ContextMenuItemEfl.cpp: Removed.
* platform/qt/ContextMenuQt.cpp: Removed.
* platform/qt/ContextMenuItemQt.cpp: Removed.
2013-05-16 Alexis Menard <alexis@webkit.org>
Regression: Event#stopPropagation() does not halt bubbling for webkitTransitionEnd
https://bugs.webkit.org/show_bug.cgi?id=115656
Reviewed by Darin Adler.
If we create a prefixed event to dispatch it (in the case we have only
prefixed event listeners in client's code) then we need to make sure to
keep it in sync with the original unprefixed event after it has been
dispatched. While being dispatched the event can be modified by
client's code and when propagated back to outer elements, attributes were
not updated. This patch changes the old design of creating a separate event
for the prefixed case and now change the type of the event (so the name) before
dispatching it, keeping the attributes if changed and then rename it
back to unprefixed when the dispatching is finished.
Tests: transitions/transition-end-event-prefixed-01.html
transitions/transition-end-event-prefixed-02.html
transitions/transition-end-event-prefixed-03.html
* dom/Event.h:
(WebCore::Event::setType):
* dom/EventTarget.cpp:
(WebCore::EventTarget::fireEventListeners):
2013-05-16 Mike Fenton <mifenton@rim.com>
[BlackBerry] Strip invoke URLs when writing to the clipboard.
https://bugs.webkit.org/show_bug.cgi?id=116226
Reviewed by Rob Buis.
PR 333516.
Invoke URLs should not be included in the paste data.
Internally Reviewed by Gen Mak.
* platform/blackberry/PasteboardBlackBerry.cpp:
(WebCore::Pasteboard::writeSelection):
2013-05-16 Eduardo Lima Mitev <elima@igalia.com>
Missing UNUSED_PARAM macro for textPosition argument in WebKitAccessibleInterfaceText
https://bugs.webkit.org/show_bug.cgi?id=116230
Reviewed by Chris Fleizach.
No new functionality, no new tests.
* accessibility/atk/WebKitAccessibleInterfaceText.cpp:
(webkitAccessibleTextGetTextForOffset): List textPosition argument as
unused parameter for all platforms except GTK.
2013-05-16 Jaehun Lim <ljaehun.lim@samsung.com>
Frame flattening prevents <HTML> in <OBJECT> from having scrollbars
https://bugs.webkit.org/show_bug.cgi?id=115884
Reviewed by Antonio Gomes.
Frame flattening should be applied when the frame owner is frame or iframe. But when
the frame owner is object element, frame flattening prevents it from having scrollbars.
In this situation, we can't scroll the html document in object element.
This patch adds two helper functions to verify flattening conditions.
Test: fast/frames/flattening/scrolling-in-object.html
* page/FrameView.cpp:
(WebCore::frameFlatteningEnabled): Added. Helper to check whether flattening is enabled or not.
(WebCore::supportsFrameFlattening): Added. Helper to check whether the frame owner is <frame> or <iframe>.
(WebCore::FrameView::avoidScrollbarCreation):
(WebCore::FrameView::calculateScrollbarModesForLayout): Use frameFlatteningEnabled().
(WebCore::FrameView::layout): Use frameFlatteningEnabled().
(WebCore::FrameView::isInChildFrameWithFrameFlattening): Use frameFlatteningEnabled().
2013-05-16 Patrick Gansterer <paroga@webkit.org>
Port functions for pathhandling to Windows CE in FileSystemWin
https://bugs.webkit.org/show_bug.cgi?id=116208
Reviewed by Darin Adler.
This will allow us to remove FileSystemWinCE in a next step.
* platform/win/FileSystemWin.cpp:
(WebCore::pathByAppendingComponent):
(WebCore::pathGetFileName):
2013-05-16 Tim Horton <timothy_horton@apple.com>
PDFPlugins don't load when plugins are disabled, but they should
https://bugs.webkit.org/show_bug.cgi?id=75790
<rdar://problem/11650197>
Reviewed by Anders Carlsson.
Make it possible to load "application" plug-ins even if settings or the FrameLoaderClient
say that plug-ins should be disabled, providing a mechanism for WebKit* to offer built-in
functionality which happens to use the plug-in infrastructure, and which also doesn't
unexpectedly disappear for users with plug-ins off.
* WebCore.exp.in:
Export SubframeLoader::allowPlugins().
Update signature for PluginData::supportsMimeType to include the AllowedPluginTypes argument.
* dom/DOMImplementation.cpp:
(WebCore::DOMImplementation::createDocument):
Load PluginData even if plug-ins are disabled, but if that is the case, only
create a PluginDocument for application plug-ins.
* html/PluginDocument.cpp:
(WebCore::PluginDocumentParser::appendBytes):
Don't bail if plug-ins are disabled, because we could still be a PluginDocument
for an application plug-in.
* page/Page.cpp:
(WebCore::Page::pluginData):
Allow PluginData to be constructed even if plug-ins are disabled, as there might
be application plug-ins that we want to load anyway.
* platform/mac/MIMETypeRegistryMac.mm:
(WebCore::MIMETypeRegistry::isApplicationPluginMIMEType):
On Mac, if we have PDFPlugin, we can support PDF and PostScript with a native application plug-in.
* plugins/PluginData.cpp:
(WebCore::PluginData::supportsMimeType):
Add an AllowedPluginTypes argument to supportsMimeType, allowing callers to specify
whether they are looking for any plug-in, or are looking only for application plug-ins.
* plugins/PluginData.h:
(PluginInfo): Added an isApplicationPlugin field, to specify whether this is a "built-in" plug-in.
(PluginData): Add the aforementioned AllowedPluginTypes enum and the argument to supportsMimeType.
2013-05-16 Carlos Garcia Campos <cgarcia@igalia.com>
[BlackBerry] Crash due to an assert running test editing/execCommand/indent-paragraphs.html
https://bugs.webkit.org/show_bug.cgi?id=114944
Reviewed by Rob Buis.
It crashes in network platform code when trying to save an
invalid URL in the disk cache. That test contains references to
empty URLs like http://. Those empty URLs, are parsed as http:/ by
KURL and considered valid. BlackBerry network platform uses GURL
which considers those URLs invalid. We needed to check that the
URLs are valid for our platform before starting the network
operation.
Fixes a crash running test
editing/execCommand/indent-paragraphs.html.
* platform/network/blackberry/NetworkManager.cpp:
(WebCore::NetworkManager::startJob): Check if the request URL is
valid from the platform point of view right after creating the
platform network request and return early if the URL is invalid
with StatusErrorInvalidUrl error.
2013-05-16 Patrick Gansterer <paroga@webkit.org>
Remove unused function safeCreateFile() from WebCore
https://bugs.webkit.org/show_bug.cgi?id=116211
Reviewed by Anders Carlsson.
* platform/FileSystem.h:
* platform/win/FileSystemWin.cpp:
2013-05-16 Peter Gal <galpeter@inf.u-szeged.hu>
[curl] MIME type should be in lowercase
https://bugs.webkit.org/show_bug.cgi?id=116218
Reviewed by Benjamin Poulain.
Existing testcase: http/tests/mime/uppercase-mime-type.html
* platform/network/curl/ResourceHandleManager.cpp:
(WebCore::headerCallback): Convert the MIME type to lowercase.
2013-05-16 Seokju Kwon <seokju.kwon@gmail.com>
Web Inspector: Fix optional value of promptText in Inspector.json
https://bugs.webkit.org/show_bug.cgi?id=116203
Reviewed by Joseph Pecoraro.
Merge from https://chromiumcodereview.appspot.com/14672031.
No new tests needed.
* inspector/Inspector.json:
2013-05-16 Mary Wu <mary.wu@torchmobile.com.cn>
[BlackBerry] Unable to download blob resource
https://bugs.webkit.org/show_bug.cgi?id=115888
Reviewed by Benjamin Poulain.
Add BlobStream to handle over blob data from BlobResourceHandle to download stream.
RIM bug 331086, internally reviewed by Charles Wei and Leo Yang.
* PlatformBlackBerry.cmake:
* platform/network/blackberry/BlobStream.cpp: Added.
(WebCore):
(WebCore::BlobStream::BlobStream):
(WebCore::BlobStream::~BlobStream):
(WebCore::BlobStream::didReceiveData):
(WebCore::BlobStream::didFinishLoading):
(WebCore::BlobStream::didFail):
(WebCore::BlobStream::url):
(WebCore::BlobStream::mimeType):
* platform/network/blackberry/BlobStream.h: Added.
(WebCore):
(BlobStream):
2013-05-16 Anders Carlsson <andersca@apple.com>
Remove SystemTime header and implementations
https://bugs.webkit.org/show_bug.cgi?id=116200
Reviewed by Alexey Proskuryakov.
SystemTim just had a single function that's not called anymore. Remove it.
* GNUmakefile.list.am:
* PlatformBlackBerry.cmake:
* PlatformEfl.cmake:
* PlatformWinCE.cmake:
* Target.pri:
* WebCore.vcproj/WebCore.vcproj:
* WebCore.vcxproj/WebCore.vcxproj:
* WebCore.vcxproj/WebCore.vcxproj.filters:
* WebCore.xcodeproj/project.pbxproj:
* history/PageCache.cpp:
* platform/SystemTime.h: Removed.
* platform/blackberry/SystemTimeBlackBerry.cpp: Removed.
* platform/efl/SystemTimeEfl.cpp: Removed.
* platform/graphics/ca/GraphicsLayerCA.cpp:
* platform/mac/SystemTimeMac.cpp: Removed.
* platform/qt/TemporaryLinkStubsQt.cpp:
* platform/win/SystemTimeWin.cpp: Removed.
2013-05-16 Glenn Adams <glenn@skynav.com>
[Inspector] Don't filter syntax error caused by asterisk in CSS Property name.
https://bugs.webkit.org/show_bug.cgi?id=116196
Reviewed by Benjamin Poulain.
* inspector/InspectorConsoleAgent.cpp:
(WebCore::InspectorConsoleAgent::addMessageToConsole):
- Remove questionable IE7 related error filtering
2013-05-16 Andreas Kling <akling@apple.com>
Page::chrome() should return a reference.
<http://webkit.org/b/116185>
Reviewed by Anders Carlsson.
A Page's chrome() can never be null. Change Page::chrome() to return a reference to reflect this.
Also, make Page::m_chrome a const member variable so nobody will accidentally set it to null.
2013-05-16 Simon Fraser <simon.fraser@apple.com>
Content disappears when scrolling http://www.childrenscancer.org/zach/
https://bugs.webkit.org/show_bug.cgi?id=116206
Reviewed by Darin Adler.
When a RenderLayerBacking gains or loses a foregroundLayer or backgroundLayer,
we need to repaint the primary layer, since what paints into that primary
layer will change.
On the page in question, we gained/lost a foreground layer when scrolling because
the page popped an element into position:fixed.
Test: compositing/repaint/foreground-layer-change.html
* rendering/RenderLayerBacking.cpp:
(WebCore::RenderLayerBacking::updateForegroundLayer):
(WebCore::RenderLayerBacking::updateBackgroundLayer):
2013-05-16 Andy Estes <aestes@apple.com>
Do not indefinitely cache resources from blob URLs.
Reviewed by Alexey Proskuryakov.
Alexey pointed out after I landed r150169 that blob URLs backed by
files should return an error if the file changed after the URL was
created. By indefinitely caching them in memory, we don't give the
loader a chance to check for modification. Remove "blob" from the list
of schemes that should be indefinitely cached.
* platform/SchemeRegistry.cpp:
(WebCore::SchemeRegistry::shouldCacheResponsesFromURLSchemeIndefinitely):
2013-05-16 Claudio Saavedra <csaavedra@igalia.com>
[CSS] CSS Variables are case-sensitive
https://bugs.webkit.org/show_bug.cgi?id=116239
Reviewed by Ryosuke Niwa.
The CSS Variables specification states that variables are
case-sensitive, unlike other CSS properties.
Test: fast/css/variables/case-sensitive.html
* css/CSSParser.cpp:
(WebCore::CSSParserString::substring): Replace
the now unnecessary lowerSubstring() with this method.
Also, since the method is only used by the CSS variables
implementation, #ifdef it.
(WebCore::CSSParser::createPrimitiveVariableNameValue):
(WebCore::CSSParser::storeVariableDeclaration):
Do not normalize variable declarations to lowercase.
* css/CSSParserValues.h:
(CSSParserString): Replace the lowerSubstring() declaration
and wrap with #if/#endif.
2013-05-16 Brady Eidson <beidson@apple.com>
svg/as-image/img-zoom-svg-stylesheet.html crashes with NetworkProcess enabled.
<rdar://problem/13837408> and https://bugs.webkit.org/show_bug.cgi?id=115917
Reviewed by Sam Weinig.
Give WebKit2 the ability to not mis-cast.
* loader/FrameLoaderClient.h:
(WebCore::FrameLoaderClient::isEmptyFrameLoaderClient): Defaults to false, and include a FIXME
to remove it once https://bugs.webkit.org/show_bug.cgi?id=116233 is resolved.
* loader/EmptyClients.h: Make isEmptyFrameLoaderClient() return true, and add a FIXME to remove it.
2013-05-14 Martin Robinson <mrobinson@igalia.com>
[GTK] Add support for building WebCore to the cmake build
https://bugs.webkit.org/show_bug.cgi?id=116128
Reviewed by Gustavo Noronha Silva.
* PlatformGTK.cmake: Added.
* platform/gtk/GtkVersioning.c: Include "config.h" because we removed
the autotoolsconfig.h include from the header.
* platform/gtk/GtkVersioning.h: Remove autotoolsconfig.h include to support for
non-autotools build systems.
2013-05-15 Ryosuke Niwa <rniwa@webkit.org>
DocumentOrderedMap doesn't need to have two HashMaps
https://bugs.webkit.org/show_bug.cgi?id=116167
Reviewed by Geoffrey Garen.
Previously, we had two hash maps: m_map and m_duplicateCounts in DocumentOrderedMap to keep track
of the first element and the number of duplicates for a given name. This patch simplifies this structure
by having a single hash map that contains both the pointer and the number of duplicates.
In addition, this patch fixes a regression introduced in r149652 that window and document name maps
were not updated for some elements inside a SVG use element, and makes use of the newly added list of
the matching elements in SelectorQuery.
* dom/DocumentOrderedMap.cpp:
(WebCore::DocumentOrderedMap::clear): Updated to use the new hash map.
(WebCore::DocumentOrderedMap::add): Ditto.
(WebCore::DocumentOrderedMap::remove): Ditto.
(WebCore::DocumentOrderedMap::get): Ditto.
(WebCore::DocumentOrderedMap::getAllElementsById): Added.
* dom/DocumentOrderedMap.h:
(WebCore::DocumentOrderedMap::MapEntry::MapEntry): Added.
(WebCore::DocumentOrderedMap::containsSingle): Updated to use new hash map.
(WebCore::DocumentOrderedMap::contains): Ditto.
(WebCore::DocumentOrderedMap::containsMultiple): Ditto.
* dom/Element.cpp:
(WebCore::Element::insertedInto): This function didn't add this element to window and document's name maps
if the element had already been inserted into a tree scope, and the current call was inserting an ancestor
of the tree scope into the document. We were exiting early per scope != treeScope().
Fixed the bug by splitting updateId into two functions updateIdForTreeScope and updateIdForDocument.
The former is called when this element is inserted into a new tree scope, and the latter is called when
this element is inserted into a HTML document even if it had already been inside some tree scope.
(WebCore::Element::removedFrom): This function didn't remove this element from tree scope's id maps if
the tree scope wasn't a document. Fixed the bug by simply checking that the removal happens beneath the
current tree scope.
(WebCore::Element::updateName):
(WebCore::Element::updateNameForTreeScope): Renamed from updateName.
(WebCore::Element::updateNameForDocument): Extracted from updateName.
(WebCore::Element::updateId):
(WebCore::Element::updateIdForTreeScope): Renamed from updateId.
(WebCore::Element::updateIdForDocument): Extracted from updateId.
* dom/Element.h:
* dom/SelectorQuery.cpp:
(WebCore::SelectorDataList::canUseIdLookup): Refactored to return the id subselector instead of checking if
the first subselector happens to be matching an id.
(WebCore::SelectorDataList::execute): Use the subselector canUseIdLookup returned. Also make use of newly
added getAllElementsById when there are multiple matching elements for a given id.
* dom/SelectorQuery.h:
* dom/TreeScope.cpp:
(WebCore::TreeScope::getAllElementsById): Added.
* dom/TreeScope.h:
2013-05-15 Darin Adler <darin@apple.com>
[Mac] Make Clipboard::create functions for Mac platform independent by moving Pasteboard creation to Pasteboard functions
https://bugs.webkit.org/show_bug.cgi?id=116179
Reviewed by Andreas Kling.
* dom/Clipboard.cpp:
(WebCore::Clipboard::createForCopyAndPaste): Moved the function here from
ClipboardMac, and have it use Pasteboard functions that are not Mac-specific.
(WebCore::Clipboard::create): Ditto.
(WebCore::Clipboard::createForDragAndDrop): Ditto.
* platform/DragData.h:
(WebCore::DragData::pasteboardName): Made this const.
* platform/Pasteboard.h: Added new create functions, used by the clipboard
create functions above.
* platform/mac/ClipboardMac.mm: Removed the functions that were moved to the
Clipboard.cpp file.
* platform/mac/PasteboardMac.mm:
(WebCore::Pasteboard::createForCopyAndPaste): Added.
(WebCore::Pasteboard::createPrivate): Added.
(WebCore::Pasteboard::createForDragAndDrop): Added.
2013-05-15 Anders Carlsson <andersca@apple.com>
Fix a thinko.
We want to invalidate the file icon loader if it exists, not create it!
* html/FileInputType.cpp:
(WebCore::FileInputType::requestIcon):
2013-05-15 Darin Adler <darin@apple.com>
Move drag-specific Clipboard functions inside ENABLE(DRAG_SUPPORT)
https://bugs.webkit.org/show_bug.cgi?id=116176
Reviewed by Andreas Kling.
* dom/Clipboard.cpp:
(WebCore::Clipboard::writeRange):
(WebCore::Clipboard::writePlainText):
(WebCore::Clipboard::writeURL):
Move these three functions inside ENABLE(DRAG_SUPPORT). Even though their names do
not make it obvious, these are here only for use by dragging code. Later we may
refactor them away entirely, but for now it's good not to compile them in on any
platform that does not support dragging.
2013-05-15 Andy Estes <aestes@apple.com>
Resources from non-HTTP schemes should not be cached indefinitely
https://bugs.webkit.org/show_bug.cgi?id=113626
Reviewed by Ryosuke Niwa.
With the exception of schemes that we know will always return the same
result for a given URL, we should not indefinitely cache non-HTTP
resources when their freshness cannot be verified.
Writing a test for this is blocked on https://webkit.org/b/116199.
The following two existing tests of memory cache behavior were
converted to HTTP tests so that they continue to function as expected:
Tests: http/tests/cache/display-image-unset-allows-cached-image-load.html
http/tests/cache/willsendrequest-returns-null-for-memory-cache-load.html
* loader/cache/CachedResource.cpp:
(WebCore::CachedResource::freshnessLifetime): Returned a freshness
lifetime of 0 for non-HTTP schemes that can't be indefinitely cached.
* platform/SchemeRegistry.cpp:
(WebCore::SchemeRegistry::shouldCacheResponsesFromURLSchemeIndefinitely):
Checked whether the scheme is blob:, data:, or applewebdata:.
* platform/SchemeRegistry.h:
2013-05-15 Tim Horton <timothy_horton@apple.com>
makeRGBAFromNSColor throws an exception if given a color in a greyscale colorspace
https://bugs.webkit.org/show_bug.cgi?id=116198
<rdar://problem/13904395>
Reviewed by Simon Fraser.
Block Objective-C exceptions in makeRGBAFromNSColor.
Remove a comment saying that they're impossible.
Convert the incoming color to the DeviceRGB colorspace to match
existing color sources. Some rare cases (attributed strings that come
from PDFKit) can have DeviceGrayscale color spaces, which would
previously throw an exception here.
* platform/graphics/mac/ColorMac.mm:
(WebCore::makeRGBAFromNSColor):
2013-05-15 David Kilzer <ddkilzer@apple.com>
BUILD FIX (r150140): Frame::editor() should return a reference for iOS, too
* platform/ios/ClipboardIOS.mm:
(WebCore::ClipboardIOS::ClipboardIOS):
(WebCore::ClipboardIOS::hasData):
(WebCore::ClipboardIOS::clearData):
(WebCore::ClipboardIOS::clearAllData):
(WebCore::ClipboardIOS::getData):
(WebCore::ClipboardIOS::setData):
(WebCore::ClipboardIOS::types):
(WebCore::ClipboardIOS::writeRange):
* platform/ios/PasteboardIOS.mm:
(WebCore::Pasteboard::getStringSelection):
(WebCore::Pasteboard::writeSelection):
(WebCore::Pasteboard::writePlainText):
(WebCore::Pasteboard::writeImage):
(WebCore::Pasteboard::plainText):
(WebCore::documentFragmentWithRTF):
(WebCore::Pasteboard::documentFragmentForPasteboardItemAtIndex):
(WebCore::Pasteboard::documentFragment):
2013-05-15 Anders Carlsson <andersca@apple.com>
Stop using the factory pattern in FileIconLoaderClient
https://bugs.webkit.org/show_bug.cgi?id=116197
Reviewed by Andreas Kling.
Move the FileIconLoader member out of FileIconLoaderClient and into FileInputType and remove the factory gunk.
* html/FileInputType.cpp:
(WebCore::FileInputType::~FileInputType):
(WebCore::FileInputType::requestIcon):
* html/FileInputType.h:
(FileInputType):
* platform/FileIconLoader.cpp:
(WebCore::FileIconLoader::invalidate):
* platform/FileIconLoader.h:
(WebCore::FileIconLoaderClient::~FileIconLoaderClient):
(FileIconLoader):
2013-05-15 Anders Carlsson <andersca@apple.com>
Fix FileChooserClient design
https://bugs.webkit.org/show_bug.cgi?id=116195
Reviewed by Andreas Kling.
FileChooserClient doesn't match the standard WebCore client idiom of only having virtual member functions.
Instead it holds on to its FileChooser and it's even a factory for creating new file choosers(!).
Fix this by making it an abstract class, and moving FileChooser into FileInputType.
* html/FileInputType.cpp:
(WebCore::FileInputType::~FileInputType):
Invalidate the file chooser.
(WebCore::FileInputType::handleDOMActivateEvent):
Apply the file chooser settings.
(WebCore::FileInputType::applyFileChooserSettings):
Recreate the file chooser with new settings.
(WebCore::FileInputType::receiveDropForDirectoryUpload):
Apply the settings.
* platform/FileChooser.cpp:
(WebCore::FileChooser::invalidate):
Set m_client to null.
(WebCore::FileChooser::chooseFiles):
Early return.
* platform/FileChooser.h:
2013-05-15 Gavin Barraclough <barraclough@apple.com>
ScriptedAnimationController::setThrottled should extend MinimumAnimationInterval
https://bugs.webkit.org/show_bug.cgi?id=116193
Reviewed by Darin Adler
* dom/ScriptedAnimationController.cpp:
(WebCore::ScriptedAnimationController::ScriptedAnimationController):
(WebCore::ScriptedAnimationController::setThrottled):
(WebCore::ScriptedAnimationController::scheduleAnimation):
* dom/ScriptedAnimationController.h:
(ScriptedAnimationController):
- Fixes for review comments.
2013-05-15 Anders Carlsson <andersca@apple.com>
Move HTTPRequest class to WebKit2
https://bugs.webkit.org/show_bug.cgi?id=116192
Reviewed by Darin Adler.
HTTPRequest is only used by the "remote inspector" feature in WebKit2,
so there's no need to have it in WebCore.
* CMakeLists.txt:
* GNUmakefile.list.am:
* Target.pri:
* WebCore.vcproj/WebCore.vcproj:
* WebCore.vcxproj/WebCore.vcxproj:
* WebCore.vcxproj/WebCore.vcxproj.filters:
* WebCore.xcodeproj/project.pbxproj:
2013-05-15 Oliver Hunt <oliver@apple.com>
RefCountedArray needs to use vector initialisers for its backing store
https://bugs.webkit.org/show_bug.cgi?id=116194
Reviewed by Gavin Barraclough.
Update to use new functions for operating on the exception stack.
* bindings/js/ScriptCallStackFactory.cpp:
(WebCore::createScriptCallStackFromException):
2013-05-15 Gavin Barraclough <barraclough@apple.com>
ScriptedAnimationController::setThrottled should extend MinimumAnimationInterval
https://bugs.webkit.org/show_bug.cgi?id=116193
Reviewed by Simon Fraser.
* dom/ScriptedAnimationController.cpp:
(WebCore::ScriptedAnimationController::ScriptedAnimationController):
- initialize m_throttled
(WebCore::ScriptedAnimationController::setThrottled):
- sets m_throttled, reschedule when this changes.
(WebCore::ScriptedAnimationController::scheduleAnimation):
- if throtled don't use a display link, and extend the timeout.
* dom/ScriptedAnimationController.h:
(ScriptedAnimationController):
- Added m_throttled
2013-05-08 Gavin Barraclough <barraclough@apple.com>
Process suppression should throttle scripted animations
https://bugs.webkit.org/show_bug.cgi?id=115812
Reviewed by Simon Fraser.
<rdar://problem/13799726>
* WebCore.exp.in:
- Expose Page::setThrottled
* dom/Document.cpp:
(WebCore::Document::scriptedAnimationControllerSetThrottled):
(WebCore):
* dom/Document.h:
(Document):
- Forwards to ScriptedAnimationController::setThrottled
* dom/ScriptedAnimationController.cpp:
(WebCore::ScriptedAnimationController::setThrottled):
(WebCore):
* dom/ScriptedAnimationController.h:
- Force use of a timer.
(ScriptedAnimationController):
* page/Page.cpp:
(WebCore::Page::setThrottled):
(WebCore):
* page/Page.h:
(Page):
- When under throttling force the ScriptedAnimationController to use a timer.
2013-05-15 Igor Oliveira <igor.o@sisa.samsung.com>
Implement run-in remove child cases.
https://bugs.webkit.org/show_bug.cgi?id=86520
Move runin to original position when sibling element is destroyed.
Reviewed by David Hyatt.
Tests: fast/runin/runin-remove-child-simple.html
fast/runin/runin-sibling-inline.html
* rendering/RenderBlock.cpp:
(WebCore::RenderBlock::willBeDestroyed):
(WebCore::RenderBlock::moveRunInUnderSiblingBlockIfNeeded):
If moveRunInUnderSiblingBlockIfNeeded is called when the sibling run-in block
is being destroyed, it means that the run-in is moving to original position and
we do not need to do nothing.
2013-05-15 Anders Carlsson <andersca@apple.com>
Remove WebSocketHandshakeResponse class
https://bugs.webkit.org/show_bug.cgi?id=116190
Reviewed by Andreas Kling.
Just use ResourceResponse instead of WebSocketHandshakeResponse.
* CMakeLists.txt:
* GNUmakefile.list.am:
* Modules/websockets/WebSocketHandshake.cpp:
(WebCore::WebSocketHandshake::readServerHandshake):
(WebCore::WebSocketHandshake::serverWebSocketProtocol):
(WebCore::WebSocketHandshake::serverSetCookie):
(WebCore::WebSocketHandshake::serverSetCookie2):
(WebCore::WebSocketHandshake::serverUpgrade):
(WebCore::WebSocketHandshake::serverConnection):
(WebCore::WebSocketHandshake::serverWebSocketAccept):
(WebCore::WebSocketHandshake::serverHandshakeResponse):
(WebCore::WebSocketHandshake::readHTTPHeaders):
* Modules/websockets/WebSocketHandshake.h:
* Modules/websockets/WebSocketHandshakeResponse.cpp: Removed.
* Modules/websockets/WebSocketHandshakeResponse.h: Removed.
* Target.pri:
* WebCore.vcproj/WebCore.vcproj:
* WebCore.vcxproj/WebCore.vcxproj:
* WebCore.vcxproj/WebCore.vcxproj.filters:
* WebCore.xcodeproj/project.pbxproj:
* inspector/InspectorInstrumentation.cpp:
(WebCore):
(WebCore::InspectorInstrumentation::didReceiveWebSocketHandshakeResponseImpl):
* inspector/InspectorInstrumentation.h:
(InspectorInstrumentation):
(WebCore::InspectorInstrumentation::didReceiveWebSocketHandshakeResponse):
* inspector/InspectorResourceAgent.cpp:
(WebCore::InspectorResourceAgent::didReceiveWebSocketHandshakeResponse):
* inspector/InspectorResourceAgent.h:
(WebCore):
(InspectorResourceAgent):
2013-05-15 Eric Carlson <eric.carlson@apple.com>
[Mac] media engine may deliver NULL in-band "cue"
https://bugs.webkit.org/show_bug.cgi?id=116180
Reviewed by Jer Noble.
* platform/graphics/avfoundation/InbandTextTrackPrivateAVF.cpp:
(WebCore::InbandTextTrackPrivateAVF::processCue): NULL check before logging cue count.
2013-05-15 Darin Adler <darin@apple.com>
List platforms that still use the legacy clipboard instead of just saying "not Mac"
https://bugs.webkit.org/show_bug.cgi?id=116177
Reviewed by Andreas Kling.
* dom/Clipboard.h: Replaced the "!MAC || IOS" with a list of platforms still on the
legacy model.
2013-05-15 Yongjun Zhang <yongjun_zhang@apple.com>
We should clear mainResource in DocumentLoader::cancelMainResourceLoad.
https://bugs.webkit.org/show_bug.cgi?id=116119
Reviewed by Oliver Hunt.
MainResourceLoader::clearResource() was left out in r146239 when moving MainResourceLoader::cancel()
to DocumentLoader::cancelMainResourceLoad(), we need to add it back to make sure m_mainResource is
cleared when we cancel the loader.
No new tests needed.
* loader/DocumentLoader.cpp:
(WebCore::DocumentLoader::~DocumentLoader):
(WebCore::DocumentLoader::continueAfterNavigationPolicy):
(WebCore::DocumentLoader::cancelMainResourceLoad):
(WebCore::DocumentLoader::clearMainResource):
(WebCore):
* loader/DocumentLoader.h: add helper method clearMainResource()
(DocumentLoader):
2013-05-15 Joe Mason <jmason@blackberry.com>
[BlackBerry] When HTTP auth fails, only purge credentials that match the failed credentials
https://bugs.webkit.org/show_bug.cgi?id=116164
Reviewed by Rob Buis.
Internal PR: 338490
Internally Reviewed By: Lyon Chen
When there are multiple HTTP requests in flight with the same bad credentials (common with
proxy auth if the user mistyped their password), the first 407 that's received will cause
the credentials to be purged and the password dialog to open for new credentials. This means
that all 407's received after this should only purge the credentials if they have not
already been updated from the dialog; otherwise they will be wiping out credentials that
haven't failed yet.
* platform/network/blackberry/NetworkJob.cpp:
(WebCore::NetworkJob::sendRequestWithCredentials):
(WebCore::NetworkJob::purgeCredentials):
2013-05-15 Chris Fleizach <cfleizach@apple.com>
AX: Use caching when requesting children object on iOS
https://bugs.webkit.org/show_bug.cgi?id=116112
Reviewed by David Kilzer.
Building up the children list in the AX hierarchy can be time consuming. On iOS, this
is now much more noticeable (I believe due to the way tables calculate their AX ignored flag).
We can speed everything up if we just cache the isIgnored() attribute while building up children.
* accessibility/AXObjectCache.cpp:
(WebCore::AXAttributeCacheEnabler::AXAttributeCacheEnabler):
(WebCore):
(WebCore::AXAttributeCacheEnabler::~AXAttributeCacheEnabler):
* accessibility/AXObjectCache.h:
(AXAttributeCacheEnabler):
(WebCore):
* accessibility/ios/WebAccessibilityObjectWrapperIOS.mm:
(-[WebAccessibilityObjectWrapper accessibilityHitTest:]):
(-[WebAccessibilityObjectWrapper accessibilityElementCount]):
(-[WebAccessibilityObjectWrapper accessibilityElementAtIndex:]):
(-[WebAccessibilityObjectWrapper indexOfAccessibilityElement:]):
(-[WebAccessibilityObjectWrapper accessibilityContainer]):
2013-05-15 Anders Carlsson <andersca@apple.com>
Remove WebSocketHandshakeRequest class
https://bugs.webkit.org/show_bug.cgi?id=116178
Reviewed by Andreas Kling.
Turns out WebSocketHandshakeRequest is just used by the web inspector, and there's no reason
why we can't just use a ResourceRequest instead.
* CMakeLists.txt:
* GNUmakefile.list.am:
* Modules/websockets/WebSocketChannel.cpp:
(WebCore::WebSocketChannel::didOpenSocketStream):
* Modules/websockets/WebSocketHandshake.cpp:
(WebCore::WebSocketHandshake::clientHandshakeRequest):
* Modules/websockets/WebSocketHandshake.h:
(WebCore):
* Modules/websockets/WebSocketHandshakeRequest.cpp: Removed.
* Modules/websockets/WebSocketHandshakeRequest.h: Removed.
* Target.pri:
* WebCore.vcproj/WebCore.vcproj:
* WebCore.vcxproj/WebCore.vcxproj:
* WebCore.vcxproj/WebCore.vcxproj.filters:
* WebCore.xcodeproj/project.pbxproj:
* inspector/InspectorInstrumentation.cpp:
(WebCore):
(WebCore::InspectorInstrumentation::willSendWebSocketHandshakeRequestImpl):
* inspector/InspectorInstrumentation.h:
(InspectorInstrumentation):
(WebCore::InspectorInstrumentation::willSendWebSocketHandshakeRequest):
* inspector/InspectorResourceAgent.cpp:
(WebCore::InspectorResourceAgent::willSendWebSocketHandshakeRequest):
* inspector/InspectorResourceAgent.h:
(WebCore):
(InspectorResourceAgent):
* platform/network/HTTPRequest.cpp:
(WebCore):
2013-05-15 Darin Adler <darin@apple.com>
Try to fix iOS build.
* platform/Pasteboard.h: Fix #if so that we don't try to compile pasteboard name code
on iOS.
2013-05-13 Anders Carlsson <andersca@apple.com>
Frame::editor() should return a reference
https://bugs.webkit.org/show_bug.cgi?id=116037
Reviewed by Darin Adler.
A frame's editor can never be null. Change Frame::editor() to return a reference to reflect this.
Also, make Frame::m_editor a const member variable so nobody will accidentally set it to null.
* accessibility/AccessibilityObject.cpp:
(WebCore::AccessibilityObject::hasMisspelling):
* accessibility/mac/WebAccessibilityObjectWrapperMac.mm:
(AXAttributeStringSetSpelling):
* dom/ContainerNode.cpp:
(WebCore::ContainerNode::cloneChildNodes):
* dom/Document.cpp:
(WebCore::acceptsEditingFocus):
(WebCore::Document::setFocusedNode):
(WebCore::command):
* editing/AlternativeTextController.cpp:
(WebCore::AlternativeTextController::timerFired):
(WebCore::AlternativeTextController::applyDictationAlternative):
* editing/CompositeEditCommand.cpp:
(WebCore::EditCommandComposition::unapply):
(WebCore::EditCommandComposition::reapply):
(WebCore::CompositeEditCommand::apply):
(WebCore::CompositeEditCommand::moveParagraphs):
* editing/DeleteButton.cpp:
(WebCore::DeleteButton::defaultEventHandler):
* editing/DeleteButtonController.cpp:
(WebCore::DeleteButtonController::show):
* editing/DeleteButtonController.h:
(WebCore::DeleteButtonControllerDisableScope::DeleteButtonControllerDisableScope):
(WebCore::DeleteButtonControllerDisableScope::~DeleteButtonControllerDisableScope):
* editing/DeleteSelectionCommand.cpp:
(WebCore::DeleteSelectionCommand::mergeParagraphs):
(WebCore::DeleteSelectionCommand::doApply):
* editing/EditCommand.cpp:
(WebCore::EditCommand::EditCommand):
* editing/EditingStyle.cpp:
(WebCore::StyleChange::StyleChange):
* editing/Editor.cpp:
(WebCore::Editor::markMisspellingsAfterTypingToWord):
* editing/EditorCommand.cpp:
(WebCore::applyCommandToFrame):
(WebCore::executeToggleStyle):
(WebCore::executeApplyParagraphStyle):
(WebCore::expandSelectionToGranularity):
(WebCore::stateStyle):
(WebCore::valueStyle):
(WebCore::executeCopy):
(WebCore::executeCut):
(WebCore::executeDefaultParagraphSeparator):
(WebCore::executeDelete):
(WebCore::executeDeleteBackward):
(WebCore::executeDeleteBackwardByDecomposingPreviousCharacter):
(WebCore::executeDeleteForward):
(WebCore::executeDeleteToBeginningOfLine):
(WebCore::executeDeleteToBeginningOfParagraph):
(WebCore::executeDeleteToEndOfLine):
(WebCore::executeDeleteToEndOfParagraph):
(WebCore::executeDeleteToMark):
(WebCore::executeDeleteWordBackward):
(WebCore::executeDeleteWordForward):
(WebCore::executeFindString):
(WebCore::executeForwardDelete):
(WebCore::executeIgnoreSpelling):
(WebCore::executeInsertNewline):
(WebCore::executeMakeTextWritingDirectionLeftToRight):
(WebCore::executeMakeTextWritingDirectionNatural):
(WebCore::executeMakeTextWritingDirectionRightToLeft):
(WebCore::executeToggleOverwrite):
(WebCore::executePaste):
(WebCore::executePasteGlobalSelection):
(WebCore::executePasteAndMatchStyle):
(WebCore::executePasteAsPlainText):
(WebCore::executeRedo):
(WebCore::executeRemoveFormat):
(WebCore::executeSelectToMark):
(WebCore::executeSetMark):
(WebCore::executeStyleWithCSS):
(WebCore::executeUseCSS):
(WebCore::executeSwapWithMark):
(WebCore::executeTakeFindStringFromSelection):
(WebCore::executeTranspose):
(WebCore::executeUndo):
(WebCore::executeYank):
(WebCore::executeYankAndSelect):
(WebCore::supportedCopyCut):
(WebCore::supportedPaste):
(WebCore::enabledVisibleSelection):
(WebCore::enabledVisibleSelectionAndMark):
(WebCore::enableCaretInEditableText):
(WebCore::enabledCopy):
(WebCore::enabledCut):
(WebCore::enabledInEditableText):
(WebCore::enabledDelete):
(WebCore::enabledPaste):
(WebCore::enabledRedo):
(WebCore::enabledTakeFindStringFromSelection):
(WebCore::enabledUndo):
(WebCore::stateOrderedList):
(WebCore::stateStyleWithCSS):
(WebCore::stateUnorderedList):
(WebCore::valueDefaultParagraphSeparator):
* editing/FrameSelection.cpp:
(WebCore::shouldAlwaysUseDirectionalSelection):
(WebCore::FrameSelection::setSelection):
(WebCore::FrameSelection::nextWordPositionForPlatform):
(WebCore::FrameSelection::modifyMovingRight):
(WebCore::FrameSelection::modifyMovingLeft):
(WebCore::FrameSelection::modify):
(WebCore::shouldStopBlinkingDueToTypingCommand):
(WebCore::FrameSelection::shouldDeleteSelection):
(WebCore::FrameSelection::shouldChangeSelection):
* editing/InsertTextCommand.cpp:
(WebCore::InsertTextCommand::doApply):
* editing/SpellChecker.cpp:
(WebCore::SpellChecker::didCheck):
* editing/SpellingCorrectionCommand.cpp:
* editing/TypingCommand.cpp:
(WebCore::TypingCommand::insertText):
(WebCore::TypingCommand::lastTypingCommandIfStillOpenForTyping):
(WebCore::TypingCommand::markMisspellingsAfterTyping):
(WebCore::TypingCommand::typingAddedToOpenCommand):
(WebCore::TypingCommand::deleteKeyPressed):
(WebCore::TypingCommand::forwardDeleteKeyPressed):
* editing/htmlediting.cpp:
(WebCore::createDefaultParagraphElement):
* editing/mac/EditorMac.mm:
(WebCore::Editor::pasteWithPasteboard):
* editing/markup.cpp:
(WebCore::createMarkup):
* html/HTMLInputElement.cpp:
(WebCore::HTMLInputElement::endEditing):
* html/HTMLTextAreaElement.cpp:
(WebCore::HTMLTextAreaElement::subtreeHasChanged):
* html/TextFieldInputType.cpp:
(WebCore::TextFieldInputType::handleKeydownEvent):
(WebCore::TextFieldInputType::didSetValueByUserEdit):
* loader/FrameLoader.cpp:
(WebCore::FrameLoader::closeURL):
(WebCore::FrameLoader::didOpenURL):
(WebCore::FrameLoader::clear):
* page/ContextMenuController.cpp:
(WebCore::insertUnicodeCharacter):
(WebCore::ContextMenuController::contextMenuItemSelected):
(WebCore::ContextMenuController::populate):
(WebCore::ContextMenuController::checkOrEnableIfNeeded):
* page/DOMWindow.cpp:
(WebCore::DOMWindow::find):
* page/DragController.cpp:
(WebCore::DragController::dispatchTextInputEventFor):
(WebCore::DragController::concludeEditDrag):
(WebCore::DragController::startDrag):
* page/EventHandler.cpp:
(WebCore::EventHandler::selectClosestWordFromMouseEvent):
(WebCore::EventHandler::handleMousePressEventSingleClick):
(WebCore::EventHandler::handlePasteGlobalSelection):
(WebCore::EventHandler::sendContextMenuEvent):
(WebCore::EventHandler::sendContextMenuEventForKey):
(WebCore::EventHandler::keyEvent):
(WebCore::EventHandler::defaultKeyboardEventHandler):
(WebCore::EventHandler::defaultTextInputEventHandler):
(WebCore::EventHandler::defaultBackspaceEventHandler):
* page/FocusController.cpp:
(WebCore::relinquishesEditingFocus):
* page/Frame.cpp:
(WebCore::Frame::rangeForPoint):
* page/Frame.h:
(Frame):
(WebCore::Frame::editor):
* page/Page.cpp:
(WebCore::Page::findString):
(WebCore::Page::findStringMatchingRanges):
(WebCore::Page::rangeOfString):
(WebCore::Page::markAllMatchesForText):
(WebCore::Page::setDeviceScaleFactor):
* platform/mac/ClipboardMac.mm:
(WebCore::ClipboardMac::writeRange):
* platform/mac/DragDataMac.mm:
(WebCore::DragData::asURL):
* platform/mac/PasteboardMac.mm:
(WebCore::Pasteboard::getStringSelection):
(WebCore::Pasteboard::getDataSelection):
(WebCore::Pasteboard::writeSelectionForTypes):
(WebCore::writeURLForTypes):
(WebCore::Pasteboard::plainText):
(WebCore::documentFragmentWithRTF):
(WebCore::Pasteboard::documentFragment):
* rendering/HitTestResult.cpp:
(WebCore::HitTestResult::dictationAlternatives):
* rendering/InlineTextBox.cpp:
(WebCore::InlineTextBox::paint):
(WebCore::InlineTextBox::paintTextMatchMarker):
* rendering/RenderBlock.cpp:
(WebCore::RenderBlock::positionForPointWithInlineChildren):
* testing/Internals.cpp:
(WebCore::spellchecker):
(WebCore::Internals::resetToConsistentState):
(WebCore::Internals::hasSpellingMarker):
(WebCore::Internals::hasAutocorrectedMarker):
(WebCore::Internals::setContinuousSpellCheckingEnabled):
(WebCore::Internals::setAutomaticQuoteSubstitutionEnabled):
(WebCore::Internals::setAutomaticLinkDetectionEnabled):
(WebCore::Internals::setAutomaticDashSubstitutionEnabled):
(WebCore::Internals::setAutomaticTextReplacementEnabled):
(WebCore::Internals::setAutomaticSpellingCorrectionEnabled):
(WebCore::Internals::isOverwriteModeEnabled):
(WebCore::Internals::toggleOverwriteModeEnabled):
(WebCore::Internals::hasGrammarMarker):
2013-05-15 Darin Adler <darin@apple.com>
[Mac] Make Clipboard class no longer polymorphic by removing the last virtual functions
https://bugs.webkit.org/show_bug.cgi?id=116166
Reviewed by Anders Carlsson.
* WebCore.exp.in: Add ~Clipboard since it's no longer a virtual function, but to the
non-iOS section, since iOS is still using the legacy version of Clipboard.
* dom/Clipboard.h: Mark items non-virtual, too. It's not implemented on Mac yet.
2013-05-15 Dongseong Hwang <dongseong.hwang@intel.com>
Remove an overloaded strokeRect in <canvas>
https://bugs.webkit.org/show_bug.cgi?id=116017
Reviewed by Benjamin Poulain.
The canvas spec [1] does not define strokeRect with 5 arguments, so this issue
remains only strokeRect with 4 arguments.
[1] http://www.w3.org/TR/2dcontext2/
Covered by existing tests: canvas/philip/tests/2d.missingargs.html
* html/canvas/CanvasRenderingContext2D.cpp:
(WebCore::CanvasRenderingContext2D::strokeRect):
* html/canvas/CanvasRenderingContext2D.h:
(CanvasRenderingContext2D):
* html/canvas/CanvasRenderingContext2D.idl:
2013-05-15 Bruno de Oliveira Abinader <bruno.abinader@basyskom.com>
[css3-text] text-decoration-line now accepts "blink" as valid value
https://bugs.webkit.org/show_bug.cgi?id=116104
Reviewed by Andreas Kling.
As of November 13th 2012, the W3C specification has been updated to
accept "blink" as a valid property value in text-decoration-line. Though
accepting the value as valid, it is ignored as CSS Level 1
text-decoration property currently does.
Updated related layout tests to reflect changes in specification.
* css/CSSParser.cpp:
(WebCore::CSSParser::parseValue):
(WebCore::CSSParser::parseTextDecoration):
2013-05-14 Simon Fraser <simon.fraser@apple.com>
Revert http://trac.webkit.org/changeset/150047
It introduced unwanted behavioral differences between
Retina and non-Retina Mac hardware.
* platform/graphics/ca/GraphicsLayerCA.cpp:
(WebCore::GraphicsLayerCA::requiresTiledLayer):
(WebCore::GraphicsLayerCA::computePixelAlignment):
2013-05-15 Darin Adler <darin@apple.com>
[Mac] Remove the ClipboardMac class and header file
https://bugs.webkit.org/show_bug.cgi?id=116165
Reviewed by Anders Carlsson.
* WebCore.xcodeproj/project.pbxproj: Remove ClipboardMac.h.
* editing/mac/EditorMac.mm: Import Clipboard.h rather than ClipboardMac.h.
* page/mac/EventHandlerMac.mm: Ditto.
* platform/mac/ClipboardMac.h: Removed.
* platform/mac/ClipboardMac.mm: Import Clipboard.h rather than ClipboardMac.h.
Deleted ClipboardMac constructor.
2013-05-15 Darin Adler <darin@apple.com>
[Mac] Change Clipboard::create functions so they don't use ClipboardMac::create any more
https://bugs.webkit.org/show_bug.cgi?id=116163
Reviewed by Anders Carlsson.
* dom/Clipboard.h: Made the file drag boolean default to false, better for most callers.
* platform/mac/ClipboardMac.mm: Remove #if ENABLE(DRAG_SUPPORT); that's always on for Mac
and it's not helpful to have the conditionals in here. It's helpful in cross-platform
source files.
(WebCore::Clipboard::create): Create a Pasteboard and then create a Clipboard with new.
Later could refactor to have the Pasteboard creation be platform-specific, and make these
functions platform-independent.
(WebCore::Clipboard::createForDragAndDrop): Ditto.
(WebCore::Clipboard::createForCopyAndPaste): Ditto.
2013-05-15 Darin Adler <darin@apple.com>
[Mac] Remove call to ClipboardMac::create from Editor::newGeneralClipboard
https://bugs.webkit.org/show_bug.cgi?id=116162
Reviewed by Andreas Kling.
* dom/Clipboard.h: Add createForCopyAndPaste function.
* editing/mac/EditorMac.mm:
(WebCore::Editor::newGeneralClipboard): Call createForCopyAndPaste.
* platform/mac/ClipboardMac.mm:
(WebCore::Clipboard::createForCopyAndPaste): Added. Moved code here from
Editor::newGeneralClipboard.
2013-05-15 Darin Adler <darin@apple.com>
[Mac] Remove call to ClipboardMac::create from EventHandler::createDraggingClipboard
https://bugs.webkit.org/show_bug.cgi?id=116161
Reviewed by Andreas Kling.
* dom/Clipboard.h: Added createForDragAndDrop function.
* page/mac/EventHandlerMac.mm:
(WebCore::EventHandler::createDraggingClipboard): Changed to use new Clipboard function
instead of ClipboardMac::create.
* platform/mac/ClipboardMac.mm:
(WebCore::Clipboard::createForDragAndDrop): Added. For now it does exactly what the
EventHandler::createDraggingClipboard function did, soon to be refactored better.
2013-05-15 Darin Adler <darin@apple.com>
[Mac] Thin out the ClipboardMac class and header file to prepare for deleting them
https://bugs.webkit.org/show_bug.cgi?id=116159
Reviewed by Andreas Kling.
* dom/Clipboard.h:
(WebCore::Clipboard::pasteboard): Added. For clients that have a DOM clipboard
object and need to get to the Pasteboard platform abstraction.
* editing/Editor.cpp:
(WebCore::Editor::dispatchCPPEvent): Call writePasteboard instead of writeClipboard.
Our long term plan is to delete writeClipboard.
* platform/Pasteboard.h: Added writePasteboard function.
(WebCore::Pasteboard::name): Made this const.
* platform/mac/ClipboardMac.h: Deleted unneeded includes and forward declarations.
Deleted all the data members and the virtual destructor.
* platform/mac/ClipboardMac.mm: Deleted the many includes that are no longer needed.
Deleted the destructor, since it's now automatically generated. Deleted the comment
on an #endif since it's only a few source lines away from the #if.
(WebCore::ClipboardMac::ClipboardMac): Deleted the code to set the data members,
since they are no longer used.
* platform/mac/PasteboardMac.mm: Changed include to Clipboard.h instead of ClipboardMac.h.
(WebCore::Pasteboard::writePasteboard): Replaced writeClipboard with this.
2013-05-15 Seokju Kwon <seokju.kwon@gmail.com>
Web Inspector: Get rid of addNativeSnapshotChunk and HeapSnapshotChunk from Memory domain
https://bugs.webkit.org/show_bug.cgi?id=116144
Reviewed by Timothy Hatcher.
No new tests, no behavior change.
* inspector/Inspector.json:
2013-05-15 Jocelyn Turcotte <jocelyn.turcotte@digia.com>
[Qt] Fix a crash under ~PingLoader when the QNAM on the page has been destroyed.
https://bugs.webkit.org/show_bug.cgi?id=116035
Reviewed by Allan Sandfeld Jensen.
The previous fix only moved the crash location from WebKit down to QNetworkReplyHttpImpl
which expects its QNetworkAccessManager to still be alive.
Fix it by watching the QNetworkReply's destroyed() signal and avoid the dangling pointer
instead. The QNetworkReply doesn't need to be aborted in this case anyway.
* platform/network/qt/QNetworkReplyHandler.cpp:
(WebCore::QNetworkReplyWrapper::QNetworkReplyWrapper):
(WebCore::QNetworkReplyWrapper::release):
(WebCore::QNetworkReplyWrapper::stopForwarding):
Rename resetConnections to stopForwarding since not all connections are related
to data forwarding to the client anymore.
(WebCore::QNetworkReplyWrapper::receiveMetaData):
(WebCore::QNetworkReplyWrapper::replyDestroyed):
(WebCore::QNetworkReplyWrapper::didReceiveFinished):
* platform/network/qt/QNetworkReplyHandler.h:
(QNetworkReplyWrapper):
2013-05-15 Darin Adler <darin@apple.com>
[Mac] Make Clipboard::declareAndWriteDragImage non-virtual
https://bugs.webkit.org/show_bug.cgi?id=116156
Reviewed by Anders Carlsson.
* dom/Clipboard.h: Make declareAndWriteDragImage non-virtual for non-legacy.
* platform/Pasteboard.h:
(WebCore::Pasteboard::name): Added. Can be used in Mac platform code to do
pasteboard operations directly instead of through the Pasteboard class
functions. Not sure if we'll need it long term or not.
* platform/mac/ClipboardMac.h: Removed declareAndWriteDragImage function.
* platform/mac/ClipboardMac.mm:
(WebCore::Clipboard::declareAndWriteDragImage): Made this function a Clipboard
member instead of ClipboardMac.
2013-05-15 Peter Gal <galpeter@inf.u-szeged.hu>
[curl] Remove version #if guards
https://bugs.webkit.org/show_bug.cgi?id=116152
Reviewed by Brent Fulgham.
No tests required.
* platform/network/curl/ResourceHandleCurl.cpp:
(WebCore::ResourceHandle::platformSetDefersLoading): Removed version guard.
* platform/network/curl/ResourceHandleManager.cpp:
(WebCore::writeCallback): Ditto.
(WebCore::headerCallback): Ditto.
(WebCore::readCallback): Ditto.
(WebCore::ResourceHandleManager::dispatchSynchronousJob): Ditto.
(WebCore::ResourceHandleManager::initializeHandle): Ditto.
2013-05-15 David Kilzer <ddkilzer@apple.com>
BUILD FIX (r150089): Make WebCoreTestShim build for iOS
* Configurations/WebCoreTestShim.xcconfig: Exclude
WebCoreTestShimLibrary.cpp when building for iOS.
2013-05-15 Radu Stavila <stavila@adobe.com>
[CSSRegions] Implement offsetParent for elements inside named flow
https://bugs.webkit.org/show_bug.cgi?id=113276
In the offsetParent algorithm, the nearest ancestor search skips from the topmost named flow elements directly to the body element.
http://dev.w3.org/csswg/css-regions/#cssomview-offset-attributes
As a result of this change, the DumpRenderTree tool would crash in
WebCore::RenderBoxModelObject::adjustedPositionRelativeToOffsetParent when running the selecting-text-through-different-region-flows.html
test. The RenderObjects inside a flow are attached to the RenderFlowThread. However, the RenderFlowThread is attached to the
RenderView directly, meaning that we are going to bypass the <body>'s RenderObject while iterating the parents.
Reviewed by Darin Adler.
Tests: fast/regions/offsetParent-body-in-flow-thread.html
fast/regions/offsetParent-in-flow-thread.html
* rendering/RenderBoxModelObject.cpp:
(WebCore::RenderBoxModelObject::adjustedPositionRelativeToOffsetParent):
* rendering/RenderObject.cpp:
(WebCore::RenderObject::offsetParent):
2013-05-15 Darin Adler <darin@apple.com>
[Mac] Make Clipboard::createDragImage non-virtual
https://bugs.webkit.org/show_bug.cgi?id=116136
Reviewed by Benjamin Poulain.
* dom/Clipboard.h: Made createDragImage non-virtual for non-legacy.
* platform/mac/ClipboardMac.h: Removed frame argument from create function
and constructor. Removed createDragImage and dragNSImage. Removed m_frame
data member.
* platform/mac/ClipboardMac.mm:
(WebCore::ClipboardMac::ClipboardMac): Removed frame argument and code
to initialize m_frame.
(WebCore::Clipboard::createDragImage): Merged the createDragImage and
dragNSImage functions, since they were the same thing. Changed code to get
the frame from the drag image element. Made the createDragImage function
a Clipboard member instead of ClipboardMac.
2013-05-15 Patrick Gansterer <paroga@webkit.org>
[WINCE] Fix calls to GlyphPage::setGlyphDataForIndex()
https://bugs.webkit.org/show_bug.cgi?id=116137
Reviewed by Andreas Kling.
Use zero for the glyp when the fontData pointer is null.
This aligns GlyphPageTreeNodeWinCE with the other implementations
and makes all ASSERT() pass in setGlyphDataForIndex().
* platform/graphics/wince/GlyphPageTreeNodeWinCE.cpp:
(WebCore::GlyphPage::fill):
2013-05-15 Benjamin Poulain <bpoulain@apple.com>
Do not bloat HTMLTokenizer with a giant inline InputStreamPreprocessor::peek
https://bugs.webkit.org/show_bug.cgi?id=116066
Reviewed by Ryosuke Niwa.
Merge https://chromium.googlesource.com/chromium/blink/+/45e0337b2f2db535ab08365f6e763a5015e4d990.
On x86_64, this removes 40kb from the binary. On my machine it is completely neutral on performance.
* html/parser/InputStreamPreprocessor.h:
(WebCore::InputStreamPreprocessor::peek):
(InputStreamPreprocessor):
(WebCore::InputStreamPreprocessor::advance):
(WebCore::InputStreamPreprocessor::skipNextNewLine):
(WebCore::InputStreamPreprocessor::reset):
(WebCore::InputStreamPreprocessor::processNextInputCharacter):
2013-05-14 Carlos Garcia Campos <cgarcia@igalia.com>
Remove WTF_USE_PLATFORM_STRATEGIES
https://bugs.webkit.org/show_bug.cgi?id=114431
Reviewed by Darin Adler.
* Modules/webdatabase/DatabaseManager.cpp:
(WebCore::DatabaseManager::DatabaseManager):
* dom/ContainerNode.cpp:
(WebCore::ContainerNode::suspendPostAttachCallbacks):
(WebCore::ContainerNode::resumePostAttachCallbacks):
* dom/VisitedLinkState.cpp:
(WebCore::VisitedLinkState::determineLinkStateSlowCase):
* loader/CookieJar.cpp:
(WebCore::cookies):
(WebCore::setCookies):
(WebCore::cookiesEnabled):
(WebCore::cookieRequestHeaderFieldValue):
(WebCore::getRawCookies):
(WebCore::deleteCookie):
* loader/FrameLoader.cpp:
(WebCore::FrameLoader::loadResourceSynchronously):
* loader/HistoryController.cpp:
(WebCore::addVisitedLink):
* loader/LoaderStrategy.cpp:
* loader/LoaderStrategy.h:
* loader/ResourceLoadScheduler.cpp:
(WebCore::resourceLoadScheduler):
* loader/ResourceLoader.cpp:
(WebCore::ResourceLoader::releaseResources):
(WebCore::ResourceLoader::willSendRequest):
* loader/cache/CachedResource.cpp:
(WebCore::CachedResource::load):
* loader/cache/CachedResourceLoader.cpp:
(WebCore::CachedResourceLoader::performPostLoadActions):
* platform/CookiesStrategy.h:
* platform/DatabaseStrategy.cpp:
* platform/DatabaseStrategy.h:
* platform/PasteboardStrategy.h:
* platform/PlatformStrategies.cpp:
* platform/PlatformStrategies.h:
* platform/VisitedLinkStrategy.h:
* platform/mac/PasteboardMac.mm:
* platform/network/BlobRegistry.cpp:
(WebCore::blobRegistry):
* plugins/PluginData.cpp:
(WebCore::PluginData::initPlugins):
* plugins/PluginStrategy.h:
* storage/StorageNamespace.cpp:
(WebCore::StorageNamespace::localStorageNamespace):
(WebCore::StorageNamespace::transientLocalStorageNamespace):
(WebCore::StorageNamespace::sessionStorageNamespace):
* storage/StorageStrategy.cpp:
* storage/StorageStrategy.h:
* workers/SharedWorkerStrategy.h:
2013-05-15 Dávid Szabolcs <David.Szabolcs@stud.u-szeged.hu>
[curl] Add support for HttpOnly cookies
https://bugs.webkit.org/show_bug.cgi?id=116102
Reviewed by Brent Fulgham.
* platform/network/curl/CookieJarCurl.cpp:
(WebCore::addMatchingCurlCookie):
(WebCore::cookiesForSession):
(WebCore::cookiesForDOM):
(WebCore):
(WebCore::cookieRequestHeaderFieldValue):
2013-05-14 Carlos Garcia Campos <cgarcia@igalia.com>
REGRESSION(r147548): Broken comboboxes
https://bugs.webkit.org/show_bug.cgi?id=115475
Reviewed by Gustavo Noronha Silva.
The problem is that r147548 made the popup to be closed when a
blur event is received. Right before showing the popup the input
element is focused, so that after the the popup is shown the focus
event is emitted and the event handler is called again hiding the
popup.
* html/HTMLSelectElement.cpp:
(WebCore::HTMLSelectElement::menuListDefaultEventHandler): Check
element has lost the focus before closing the popup menu.
2013-05-14 Darin Adler <darin@apple.com>
[Mac] Move setDragImage from ClipboardMac to PasteboardMac
https://bugs.webkit.org/show_bug.cgi?id=116036
Reviewed by Anders Carlsson.
* dom/Clipboard.cpp:
(WebCore::Clipboard::~Clipboard): Stop loading the drag image when
the clipboard object is deallocated. It would be better if there was
a more-well-defined time to stop the load.
(WebCore::Clipboard::setDragImage): Added. Sets up a drag image
based on a CachedImage. This tells the image loader to load the image
and updates the drag image when the image arrives. Copied from the
code in ClipboardMac, but refactored to use a separate loader object.
(WebCore::Clipboard::setDragImageElement): Added. Sets up a drag image
based on an element.
(WebCore::Clipboard::updateDragImage): Added. Common code to update
drag image when a new one is set or when a drag image load completes.
(WebCore::DragImageLoader::create): Added.
(WebCore::DragImageLoader::DragImageLoader): Ditto.
(WebCore::DragImageLoader::startLoading): Ditto.
(WebCore::DragImageLoader::stopLoading): Ditto.
(WebCore::DragImageLoader::imageChanged): Ditto.
* dom/Clipboard.h: Made setDragImage and setDragImageElement non-virtual
for non-legacy. Added updateDragImage and m_dragImageLoader.
* platform/Pasteboard.h: Added setDragImage function.
* platform/mac/ClipboardMac.h: Removed CachedImageClient as a base class
for ClipboardMac. Removed setDragImage and setDragImageElement.
* platform/mac/ClipboardMac.mm: Removed setDragImage and setDragImageElement.
(WebCore::ClipboardMac::~ClipboardMac): Removed code to remove self as
client loading the drag image. This is now in the Clipboard base class.
* platform/mac/PasteboardMac.mm:
(WebCore::Pasteboard::setDragImage): Added. Contains code moved here
from ClipboardMac.
2013-05-14 Ryosuke Niwa <rniwa@webkit.org>
Use ElementTraversal in SelectorDataList::execute
https://bugs.webkit.org/show_bug.cgi?id=116131
Reviewed by Darin Adler.
Use ElementTraversal::firstWithin and ElementTraversal::next to simplify the code.
* dom/SelectorQuery.cpp:
(WebCore::SelectorDataList::execute):
2013-05-14 Tim Horton <timothy_horton@apple.com>
[wk2] Not updating tiled backing coverage when main frame scrollability changes
https://bugs.webkit.org/show_bug.cgi?id=116123
<rdar://problem/13836559>
Reviewed by Simon Fraser.
Export FrameView::adjustTiledBackingCoverage.
* WebCore.exp.in:
2013-05-14 Alexey Proskuryakov <ap@apple.com>
[Mac] Add a testing shim for secure event input functions
https://bugs.webkit.org/show_bug.cgi?id=116122
Reviewed by Mark Rowe.
Added a new target with a dynamic library that interposes secure event input functions.
We need this to avoid interfering with user session state.
* Configurations/WebCoreTestShim.xcconfig: Added.
* WebCore.xcodeproj/project.pbxproj:
* platform/mac/DynamicLinkerInterposing.h: Moved from Source/WebKit2/Shared/mac/DyldInterpose.h.
* testing/WebCoreTestShimLibrary.cpp: Added.
(shimEnableSecureEventInput):
(shimDisableSecureEventInput):
(shimIsSecureEventInputEnabled):
2013-05-14 Benjamin Poulain <bpoulain@apple.com>
Get rid of Gradient::getColor()
https://bugs.webkit.org/show_bug.cgi?id=116089
Reviewed by Andreas Kling.
This code is now useless, remove it.
* html/canvas/CanvasGradient.h:
(CanvasGradient):
* platform/graphics/Gradient.cpp:
(WebCore::Gradient::Gradient):
(WebCore::Gradient::hash):
* platform/graphics/Gradient.h:
(Gradient):
2013-05-14 David Hyatt <hyatt@apple.com>
REGRESSION: united.com has overlapping elements and is broken by flex box changes.
https://bugs.webkit.org/show_bug.cgi?id=115329
<rdar://problem/13690610>
The new flexbox spec says that flex-basis omitted in the flex shorthand defaults to
0 when flex-grow/shrink are set. This has undesirable behavior when objects don't
end up flexing at all, and it's something the spec is going to eventually address.
For now, though, to fix the regression, I'm making a targeted "hack" to deliberately
violate the spec, but to do so as minimally as possible. This hack detects if there
is infinite available space on a line, and if so, it treats a flex-basis of 0 like
auto.
This means that when height is constrained and set by a container, flexing will do
the right thing. Basically any time you end up actually flexing, the spec behavior
should happen. If you're just laying out at intrinsic sizes, though, and no flexing
is going to occur, we ignore a flex-basis of 0 and just use the child's normal size.
Note that widths don't have to be patched because the preferred logical widths
algorithm is broken right now and not checking flex-basis. If it did, we'd have seen
the same bug in the width direction.
This width issue is covered by https://bugs.webkit.org/show_bug.cgi?id=116117
Reviewed by Simon Fraser.
Added fast/flexbox/auto-height-with-flex.html
* rendering/RenderFlexibleBox.cpp:
(WebCore::RenderFlexibleBox::mainAxisContentExtent):
Make sure we return LayoutUnit::max when you have infinite free space and not
max - borderPadding.
(WebCore::RenderFlexibleBox::preferredMainAxisContentExtentForChild):
Only clear override size if it was set. Only mark for relayout if we did
an override size clear (i.e., if we were actually flexed). Add a new parameter,
hasInfiniteLineLength, that - if set - causes us to special case flex-basis:0
and treat it like flex-basis:auto.
(WebCore::RenderFlexibleBox::layoutFlexItems):
Define hasInfiniteLineLength and pass it to all the functions that need it.
(WebCore::RenderFlexibleBox::computeMainAxisPreferredSizes):
Remove the code that marks for layout and does a layout so early. This code
is moving (and changing) to preferredMainAxisContentExtentForChild.
(WebCore::RenderFlexibleBox::computeNextFlexLine):
Computes whether or not we have infinite line length now.
(WebCore::RenderFlexibleBox::freezeViolations):
(WebCore::RenderFlexibleBox::resolveFlexibleLengths):
Propagate hasInfiniteLineLength through to preferredMainAxisContentExtentForChild.
* rendering/RenderFlexibleBox.h:
(RenderFlexibleBox):
Add hasInfiniteLineLength parameter to a bunch of functions.
2013-05-14 Andreas Kling <akling@apple.com>
Assertion failure in GlyphPage::setGlyphDataForIndex: (!glyph || fontData == m_fontDataForAllGlyphs)
<http://webkit.org/b/116113>
<rdar://problem/13833790>
Reviewed by Dan Bernstein.
If we're filling a full GlyphPage with a SimpleFontData that is actually a composite font reference,
we need to make sure we have per-glyph font data pointers, since it may end up using them.
Added GlyphPage::mayUseMixedFontDataWhenFilling() which can be implemented by the platform to let
GlyphPageTreeNode know that it should allocate a full-sized GlyphPage for mixed font data pointers
in case the font is a composite font reference, or if there are CJK ideographs in the text.
This code can be made smarter, but that's outside the scope of this change.
Fixes heavy asserting on bots running unreleased software.
* platform/graphics/GlyphPage.h:
(GlyphPage):
(WebCore::GlyphPage::mayUseMixedFontDataWhenFilling):
* platform/graphics/GlyphPageTreeNode.cpp:
(WebCore::GlyphPageTreeNode::initializePage):
* platform/graphics/mac/GlyphPageTreeNodeMac.cpp:
(WebCore::shouldUseCoreText):
(WebCore::GlyphPage::mayUseMixedFontDataWhenFilling):
2013-05-14 Bem Jones-Bey <bjonesbe@adobe.com>
Heap-use-after-free in WebCore::RenderBox::exclusionShapeOutsideInfo
https://bugs.webkit.org/show_bug.cgi?id=115566
Reviewed by David Hyatt.
When a portion of the render tree is being detached, anonymous blocks
will be combined as their children are deleted. In this process, the
anonymous block later in the tree is merged into the one preceeding it.
It can happen that the later block contains floats that the previous
block did not contain, and thus are not in the floating objects list for
the new block. This can result in the new block containing floats that
are not in it's floating objects list, but are in the floating objects
lists of siblings and parents. This can cause problems when the float
itself is deleted, since the deletion code assumes that if a float is not
in it's containing block's floating objects list, it isn't in any
floating objects list, causing dangling pointers in the floating objects
lists of the siblings and parents. In order to preserve this condition
(removing it has serious performance implications), we need to copy the
floating objects from the old block to the new block. The float's
metrics will likely all be wrong, but since the new block is already
marked for layout, this will get fixed before anything gets displayed.
Test: fast/block/float/float-append-child-crash.html
* rendering/RenderBlock.cpp:
(WebCore::RenderBlock::moveAllChildrenIncludingFloatsTo): Copy
floating objects list in addition to children.
(WebCore::RenderBlock::FloatingObject::clone): Added.
(WebCore::RenderBlock::removeChild): Use new method to copy children.
* rendering/RenderBlock.h:
(RenderBlock): Add method.
2013-05-14 Commit Queue <commit-queue@webkit.org>
Unreviewed, rolling out r150023.
http://trac.webkit.org/changeset/150023
https://bugs.webkit.org/show_bug.cgi?id=116120
Causes table layout issues (Bug 116118) and crashes on
buildbot waterfall pages. (Requested by ddkilzer on #webkit).
* rendering/RenderTableSection.cpp:
(WebCore::RenderTableSection::calcRowLogicalHeight):
* rendering/RenderTableSection.h:
(RenderTableSection):
2013-05-14 Antoine Quint <graouts@apple.com>
Snapshotted plug-ins shadow tree should reset style inheritance
https://bugs.webkit.org/show_bug.cgi?id=116098
Reset the styles such that only injected user-agent stylesheets affect
the rendering of snapshotted plug-ins' shadow content.
Reviewed by Darin Adler.
* html/HTMLPlugInImageElement.cpp:
(WebCore::HTMLPlugInImageElement::didAddUserAgentShadowRoot):
2013-05-14 Mihnea Ovidenie <mihnea@adobe.com>
[CSSRegions] Improve hit testing for empty regions
https://bugs.webkit.org/show_bug.cgi?id=115534
Reviewed by David Hyatt.
As a better follow up after WebKit bug https://bugs.webkit.org/show_bug.cgi?id=107752,
we can improve the code by not doing hit testing on the render flow thread object when
we are trying to hit test the render flow thread background. In this case, we should just bail out.
No new tests, covered by existing regions tests.
* rendering/RenderFlowThread.cpp:
(WebCore::RenderFlowThread::nodeAtPoint):
(WebCore):
(WebCore::RenderFlowThread::hitTestFlowThreadPortionInRegion):
* rendering/RenderFlowThread.h:
2013-05-14 Carlos Garcia Campos <cgarcia@igalia.com>
[BlackBerry] Handle network errors when starting a new job
https://bugs.webkit.org/show_bug.cgi?id=116101
Reviewed by Rob Buis.
Make startJob() return a network status that can be used by the
caller to create a network error.
* platform/network/blackberry/NetworkJob.cpp:
(WebCore::NetworkJob::initialize): createNetworkStream() should
always return a valid pointer so use an ASSERT instead of an early
return to make sure we have a valid stream.
(WebCore::NetworkJob::startNewJobWithRequest): Only return true if
the network job was started successfully.
* platform/network/blackberry/NetworkJob.h:
(NetworkJob): Make initialize method void instead of bool since it
can't fail.
* platform/network/blackberry/NetworkManager.cpp:
(WebCore::NetworkManager::startJob): Return a network error or
StatusSuccess.
* platform/network/blackberry/NetworkManager.h:
(NetworkManager):
* platform/network/blackberry/ResourceHandleBlackBerry.cpp:
(WebCore::ResourceHandle::start): Return true if job was started
successfully.
(WebCore::ResourceHandle::platformLoadResourceSynchronously):
Check return value of startJob and fill the ResourceError with the
network status returned to finish the load.
2013-05-14 Antoine Quint <graouts@apple.com>
[Mac] captions menu is not positioned correctly in full-screen
https://bugs.webkit.org/show_bug.cgi?id=116103
Update the positioning properties of the captions menu in full-screen
following the fix for https://webkit.org/b/115968.
Reviewed by Darin Adler.
* css/fullscreenQuickTime.css:
(video:-webkit-full-screen::-webkit-media-controls-closed-captions-container):
Add 50px to the bottom position since we're now positioned relative to the
media element, and use a calc() command to be right-aligned to the captions
icon in the media controller. The max-width and max-height properties follow
the same technique used for the non-full-screen mode.
2013-05-14 Zan Dobersek <zdobersek@igalia.com>
[GTK] Move generated ColorData.cpp, WebKitFontFamilyNames.(cpp|h) build targets into libPlatform
https://bugs.webkit.org/show_bug.cgi?id=115921
Reviewed by Gustavo Noronha Silva.
No new tests - no new functionality.
* GNUmakefile.am: Add platform_cppflags to the list of CPPFLAGS for libWebCoreSVG, libWebCore,
libWebCorePlatform, libWebCoreGtk. Remove generation rules for ColorData.cpp and WebKitFontFamilyNames.(cpp|h).
* GNUmakefile.list.am: Include the ColorData.cpp and WebKitFontFamilyNames.(cpp|h) build targers under
platform_built_sources.
* bindings/gobject/GNUmakefile.am: Add platform_cppflags to the list of libWebCoreDOM CPPFLAGS.
2013-05-14 Zan Dobersek <zdobersek@igalia.com>
[GTK] libPlatform, libPlatformGtk must depend on the related GNUmakefiles
https://bugs.webkit.org/show_bug.cgi?id=115937
Reviewed by Martin Robinson.
No new tests - no new functionality.
* GNUmakefile.am: Fix typos in two libraries' names - Webcore -> WebCore.
2013-05-13 Ryosuke Niwa <rniwa@webkit.org>
Removing Attr can delete a wrong Attribute in ElementData
https://bugs.webkit.org/show_bug.cgi?id=116077
Reviewed by Benjamin Poulain.
Merge https://chromium.googlesource.com/chromium/blink/+/e861452a292e185501e48940305947aa6a4e23c2
after simplifying and renaming functions to be more WebKit style.
The XML parser can produce elements with attributes whose names have
distinct prefixes, but the same expanded name. When one of these
attributes is put up for adoption, it may be its similarly named
sibling that is removed from its owner element. As a result the
original owner hangs onto the adopted attribute, despite the fact that
it is now in a different document. Sometimes it's just hard to let go.
Test: fast/dom/adopt-attribute-crash.svg
* dom/Element.cpp:
(WebCore::Element::setAttributeNode):
(WebCore::Element::removeAttributeNode):
(WebCore::ElementData::getAttributeItemIndex):
* dom/Element.h:
(ElementData):
(Element):
2013-05-14 Antti Koivisto <antti@apple.com>
Remove ::-webkit-distributed()
https://bugs.webkit.org/show_bug.cgi?id=116106
Reviewed by Andreas Kling.
This experimental Shadow DOM selector code is unused and has no owner.
* css/CSSGrammar.y.in:
* css/CSSParser.cpp:
(WebCore::CSSParser::rewriteSpecifiersWithNamespaceIfNeeded):
(WebCore::CSSParser::rewriteSpecifiersWithElementName):
* css/CSSParser.h:
* css/CSSParserValues.cpp:
(WebCore::CSSParserSelector::CSSParserSelector):
* css/CSSParserValues.h:
(CSSParserSelector):
* css/CSSSelector.cpp:
(WebCore::CSSSelector::pseudoId):
(WebCore::nameToPseudoTypeMap):
(WebCore::CSSSelector::selectorText):
* css/CSSSelector.h:
* css/CSSSelectorList.cpp:
* css/CSSSelectorList.h:
(CSSSelectorList):
* css/DocumentRuleSets.cpp:
(WebCore::DocumentRuleSets::resetAuthorStyle):
* css/DocumentRuleSets.h:
(DocumentRuleSets):
* css/ElementRuleCollector.cpp:
(WebCore::ElementRuleCollector::matchAuthorRules):
* css/ElementRuleCollector.h:
(ElementRuleCollector):
* css/RuleSet.cpp:
(WebCore::RuleSet::addChildRules):
* css/SelectorChecker.cpp:
(WebCore::SelectorChecker::match):
* css/SelectorFilter.cpp:
(WebCore::SelectorFilter::collectIdentifierHashes):
* html/shadow/InsertionPoint.cpp:
* html/shadow/InsertionPoint.h:
2013-05-14 Daker Fernandes Pinheiro <daker.pinheiro@openbossa.org>
Remove RenderTheme::supportsCalendarPicker
https://bugs.webkit.org/show_bug.cgi?id=116068
Reviewed by Benjamin Poulain.
No new tests needed because it doesn't affect behaviour.
This method was never overrided by any platform
and always leaded to the same behaviour.
The code which depended on it was also removed.
* html/BaseMultipleFieldsDateAndTimeInputType.cpp:
(WebCore::BaseMultipleFieldsDateAndTimeInputType::createShadowSubtree):
(WebCore::BaseMultipleFieldsDateAndTimeInputType::updatePickerIndicatorVisibility):
* html/BaseMultipleFieldsDateAndTimeInputType.h:
(BaseMultipleFieldsDateAndTimeInputType):
* page/ChromeClient.h:
(ChromeClient):
* rendering/RenderTheme.h:
2013-04-30 Balazs Kelemen <b.kelemen@sisa.samsung.com>
[GStreamer] cannot seek after video finished
https://bugs.webkit.org/show_bug.cgi?id=114044
Reviewed by Philippe Normand.
Test: media/video-seek-after-end.html
Reland without wrong assertion. If seek is called after didEnd the pipeline
state will not be in GST_STATE_NULL yet but it is not a problem because we handle that.
Rework the seeking logic to be able to seek after reseting the pipeline.
In addition to solve the actual problem this patch supposed to make seeking
more robust and correct.
The previous implementation tried to hide the complexity of asynchronous operations
on the pipeline. It did not handle the GST_MESSAGE_ASYNC_DONE message from the bus
but instead reported the seek as finished when it saw an asynchronous pending state
(GST_STATE_CHANGE_ASYNC) which could happen way before the seek is really done.
Now we pay attention to the GST_MESSAGE_ASYNC_DONE message to track the status of seeks.
Seeks are not the only operations executed asynchronously, changing the pipeling state is
similar. It means a seek can overlap with onother ongoing asynchronous operation.
This change address this by introducing an invariant for seeks, which is that we only request
a seek if there are no other ongoing asynchronous operations and the pipeline state is either
paused or playing (which is recommended anyway according to GStreamer's documentation).
This way we can be sure that the time when we get the next GST_MESSAGE_ASYNC_DONE message the
seek has been completed.
* platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:
(WebCore::toGstClockTime): Factored time conversation into a helper.
(WebCore::MediaPlayerPrivateGStreamer::MediaPlayerPrivateGStreamer):
(WebCore::MediaPlayerPrivateGStreamer::playbackPosition): The position might not be available
if the pipeline still has a pending state. As a workaround, if we are right after a seek we can
use the seek time. Avoiding this situation would be possible by not allowing any asynchronous
operation to overlap. I believe it would add a lot more complexity so I decided to rather introduce
this workaround. Otherwise those overlapping operations are handled fine by GStreamer.
(WebCore::MediaPlayerPrivateGStreamer::prepareToPlay): Do not reset internal state variables.
This function called when there is an intent to restart playback but it does not actually restart it.
(WebCore::MediaPlayerPrivateGStreamer::currentTime): Just removed a staling newline.
(WebCore::MediaPlayerPrivateGStreamer::seek): Take a look to the pipeline state and act upon that.
If there is an ongoing asynchronous operation make the seek pending, otherwise do it now.
Now we handle overlapping seeks as well because I saw that it can happen in some tests.
Added an early return for live streams as it doesn't makes sense to try seeking in them.
(WebCore::MediaPlayerPrivateGStreamer::handleMessage): Handle GST_MESSAGE_ASYNC_DONE and some refactoring.
(WebCore::MediaPlayerPrivateGStreamer::asyncStateChangeDone):
(WebCore::MediaPlayerPrivateGStreamer::updateStates): Only handle seeks in the pending case, the rest is
now handled in asyncStateChangeDone.
(WebCore::MediaPlayerPrivateGStreamer::cacheDuration): Do not reset the m_mediaDurationKnown if the pipeline
has an asynchronous pending state because it would fail. It does actually happen when we get a duration message
after restarting the pipeline and it would result in restarting playback from the start. It seems to be a bug
in GStreamer that it sends the duration message too early. Also sanitized this function by merging redundant branches.
* platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.h:
(MediaPlayerPrivateGStreamer):
2013-05-14 Zalan Bujtas <zalan@apple.com>
Ellipsis text is placed to wrong position, when the truncated text is fully cut off in RTL direction.
https://bugs.webkit.org/show_bug.cgi?id=115858
Reviewed by Darin Adler.
Take text direction into account to calculate ellipsis position in case of
full truncation.
Test: fast/css/text-overflow-ellipsis-full-truncate-rtl.html
* rendering/InlineTextBox.cpp:
(WebCore::InlineTextBox::placeEllipsisBox):
2013-05-14 Carlos Garcia Campos <cgarcia@igalia.com>
[BlackBerry] Implement platform strategies
https://bugs.webkit.org/show_bug.cgi?id=112162
Reviewed by Rob Buis.
This is just a refactoring, covered by existing tests.
* CMakeLists.txt: Move PlatformStrategies.cpp from platform
specific makefiles to the global one now that all platforms using
cmake implement platform strategies.
* PlatformBlackBerry.cmake:
* PlatformEfl.cmake:
* PlatformWinCE.cmake:
* loader/CookieJar.cpp: Remove the preprocessor error that is not
needed anymore.
* loader/blackberry/CookieJarBlackBerry.cpp: Removed.
* platform/network/blackberry/CookieJarBlackBerry.cpp: Added.
(WebCore):
(WebCore::setCookiesFromDOM):
(WebCore::cookiesForDOM):
(WebCore::cookieRequestHeaderFieldValue):
(WebCore::cookiesEnabled):
(WebCore::getRawCookies):
(WebCore::deleteCookie):
(WebCore::getHostnamesWithCookies):
(WebCore::deleteCookiesForHostname):
(WebCore::deleteAllCookies):
* plugins/blackberry/PluginDataBlackBerry.cpp: Removed.
2013-05-14 Jocelyn Turcotte <jocelyn.turcotte@digia.com>
[Qt] Fix a crash under ~PingLoader when the QNAM on the page has been destroyed.
https://bugs.webkit.org/show_bug.cgi?id=116035
Reviewed by Simon Hausmann.
Reproduced with arora which does destroy the QNetworkAccessManager in some situations.
The problem is that PingLoader can still be pending meanwhile, holding a ResourceHandle
with a dangling pointer to a QNetworkReply destroyed with the QNetworkAccessManager.
* platform/network/qt/QNetworkReplyHandler.cpp:
(WebCore::QNetworkReplyWrapper::QNetworkReplyWrapper):
Set the parent to 0 like we did before the introduction of QNetworkReplyWrapper.
(WebCore::QNetworkReplyWrapper::release):
2013-05-13 Eric Carlson <eric.carlson@apple.com>
[Mac] update in-band caption attributes
https://bugs.webkit.org/show_bug.cgi?id=116057
Reviewed by Dean Jackson.
* html/track/InbandTextTrack.cpp:
(WebCore::InbandTextTrack::updateCueFromCueData): Copy highlight color.
* html/track/TextTrackCueGeneric.cpp:
(WebCore::TextTrackCueGenericBoxElement::applyCSSProperties): "highlight" color sets the cue
background, "background" color sets the cue container background.
* html/track/TextTrackCueGeneric.h:
* platform/graphics/InbandTextTrackPrivateClient.h:
* platform/graphics/avfoundation/InbandTextTrackPrivateAVF.cpp:
(WebCore::InbandTextTrackPrivateAVF::processCueAttributes): Process "highlight" color.
2013-05-13 David Kilzer <ddkilzer@apple.com>
BUILD FIX (r150049): Fix RetainPtr<> type in PasteboardIOS.mm
* platform/ios/PasteboardIOS.mm:
(WebCore::Pasteboard::writeImage): Use RetainPtr<CFStringRef>
instead of RetainPtr<NSString>.
2013-05-13 Benjamin Poulain <bpoulain@apple.com>
Remove platform/graphic's Generator
https://bugs.webkit.org/show_bug.cgi?id=116084
Reviewed by Darin Adler.
The Generator no longer abstract anything useful, its only
implementation is Gradient.
* GNUmakefile.list.am:
* WebCore.exp.in:
* WebCore.vcproj/WebCore.vcproj:
* WebCore.vcxproj/WebCore.vcxproj:
* WebCore.vcxproj/WebCore.vcxproj.filters:
* WebCore.xcodeproj/project.pbxproj:
* platform/graphics/GeneratedImage.h:
* platform/graphics/Generator.h: Removed.
* platform/graphics/GeneratorGeneratedImage.cpp:
(WebCore::GeneratorGeneratedImage::draw):
(WebCore::GeneratorGeneratedImage::drawPattern):
* platform/graphics/GeneratorGeneratedImage.h:
(WebCore::GeneratorGeneratedImage::create):
(WebCore::GeneratorGeneratedImage::GeneratorGeneratedImage):
(GeneratorGeneratedImage):
* platform/graphics/Gradient.h:
(WebCore):
(Gradient):
* platform/graphics/GraphicsContext.cpp:
(WebCore::GraphicsContext::fillRect):
* platform/graphics/GraphicsContext.h:
(WebCore):
(GraphicsContext):
2013-05-13 David Kilzer <ddkilzer@apple.com>
Upstream iOS Clipboard and Pasteboard changes
<http://webkit.org/b/116062>
Reviewed by Darin Adler.
* WebCore.xcodeproj/project.pbxproj:
* dom/Clipboard.h:
* platform/Pasteboard.h:
* platform/ios/ClipboardIOS.h: Added.
* platform/ios/ClipboardIOS.mm: Added.
* platform/ios/PasteboardIOS.mm: Added.
2013-05-13 Huang Dongsung <luxtella@company100.net>
[Mac] Use pageScaleFactor * deviceScaleFactor in requiresTiledLayer() and computePixelAlignment() of GraphicsLayerCA.
https://bugs.webkit.org/show_bug.cgi?id=107359
Reviewed by Darin Adler.
Currently GraphicsLayerCA uses pageScaleFactor in requiresTiledLayer() and
computePixelAlignment(), but we must use pageScaleFactor * deviceScaleFactor in
them.
It is because:
1. requiresTiledLayer() uses the scale to compute an actual layer size in the device
pixel unit.
2. computePixelAlignment() uses the scale to compute an aligned layer position
in the device pixel unit.
No new tests. We can not test about requiresTiledLayer() because it depends on
gpu. computePixelAlignment() is correct now because fortunately Mac uses
only 2 (for retina display) as a deviceScaleFactor.
* platform/graphics/ca/GraphicsLayerCA.cpp:
(WebCore::GraphicsLayerCA::requiresTiledLayer):
(WebCore::GraphicsLayerCA::computePixelAlignment):
2013-05-13 Christophe Dumez <ch.dumez@sisa.samsung.com>
Rename BarInfo to BarProp and remove [NoInterfaceObject]
https://bugs.webkit.org/show_bug.cgi?id=116027
Reviewed by Andreas Kling.
Rename BarInfo to BarProp and remove [NoInterfaceObject] extended attribute from
the IDL interface to match the specification:
http://www.w3.org/html/wg/drafts/html/master/browsers.html#barprop
The new behavior also matches Firefox and Blink.
No new tests, covered by LayoutTests/fast/js/global-constructors-attributes.html.
* CMakeLists.txt:
* DerivedSources.cpp:
* DerivedSources.make:
* DerivedSources.pri:
* GNUmakefile.list.am:
* Target.pri:
* WebCore.order:
* WebCore.vcproj/WebCore.vcproj:
* WebCore.vcxproj/WebCore.vcxproj:
* WebCore.vcxproj/WebCore.vcxproj.filters:
* WebCore.xcodeproj/project.pbxproj:
* bindings/gobject/GNUmakefile.am:
* page/BarProp.cpp: Renamed from Source/WebCore/page/BarInfo.cpp.
* page/BarProp.h: Renamed from Source/WebCore/page/BarInfo.h.
* page/BarProp.idl: Renamed from Source/WebCore/page/BarInfo.idl.
* page/DOMWindow.cpp:
* page/DOMWindow.h:
* page/DOMWindow.idl:
2013-05-13 Anders Carlsson <andersca@apple.com>
Remove ChromeClient::willPopupMenu
https://bugs.webkit.org/show_bug.cgi?id=116063
Reviewed by Andreas Kling.
Remove ChromeClient::willPopupMenu.
* page/ChromeClient.h:
2013-05-13 Beth Dakin <bdakin@apple.com>
Headers and footers should be pinned to the left edge of the window when scrolling
horizontally
https://bugs.webkit.org/show_bug.cgi?id=116061
-and corresponding-
<rdar://problem/13599215>
Reviewed by Simon Fraser.
The scrolling thread will need to know about the header and footer layers in order
the implement this custom scrolling behavior.
These getters will fetch the header or footer layer from the FrameView as
appropriate.
* page/scrolling/ScrollingCoordinator.cpp:
(WebCore::ScrollingCoordinator::headerLayerForFrameView):
(WebCore::ScrollingCoordinator::footerLayerForFrameView):
* page/scrolling/ScrollingCoordinator.h:
When were scrolling on the main thread, adjust the position of the header and
footer layers here.
(WebCore::ScrollingCoordinator::updateMainFrameScrollPosition):
ScrollingStateScrollingNode now stores GraphicsLayers and PlatformLayers for the
header and footer, just like it already does for the counterScrollingLayer.
* page/scrolling/ScrollingStateScrollingNode.cpp:
(WebCore::ScrollingStateScrollingNode::ScrollingStateScrollingNode):
* page/scrolling/ScrollingStateScrollingNode.h:
(ScrollingStateScrollingNode):
(WebCore::ScrollingStateScrollingNode::headerLayer):
(WebCore::ScrollingStateScrollingNode::footerLayer):
Setters for the new layers.
* page/scrolling/mac/ScrollingCoordinatorMac.h:
(ScrollingCoordinatorMac):
* page/scrolling/mac/ScrollingCoordinatorMac.mm:
(WebCore::ScrollingCoordinatorMac::frameViewRootLayerDidChange):
(WebCore::ScrollingCoordinatorMac::setHeaderLayerForNode):
(WebCore::ScrollingCoordinatorMac::setFooterLayerForNode):
These setters and getters mirror the existing one for counterScrollingLayer.
* page/scrolling/mac/ScrollingStateScrollingNodeMac.mm:
(WebCore::ScrollingStateScrollingNode::headerPlatformLayer):
(WebCore::ScrollingStateScrollingNode::setHeaderLayer):
(WebCore::ScrollingStateScrollingNode::footerPlatformLayer):
(WebCore::ScrollingStateScrollingNode::setFooterLayer):
And the ScrollingTree will store CALayers for the header and footer.
* page/scrolling/mac/ScrollingTreeScrollingNodeMac.h:
(ScrollingTreeScrollingNodeMac):
* page/scrolling/mac/ScrollingTreeScrollingNodeMac.mm:
(WebCore::ScrollingTreeScrollingNodeMac::updateBeforeChildren):
This is where the magic happens when we are scrolling on the scrolling thread.
Adjust the horizontal position the behave like a fixed object, but keep the
vertical position what it was when layer was created.
(WebCore::ScrollingTreeScrollingNodeMac::setScrollLayerPosition):
RenderLayerCompositor must now provide getters for the header and footer.
* rendering/RenderLayerCompositor.h:
* rendering/RenderLayerCompositor.cpp:
(WebCore::RenderLayerCompositor::headerLayer):
(WebCore::RenderLayerCompositor::footerLayer):
Set the anchor point for when we adjust the position later on. Also call
frameViewRootLayerDidChange() to get the new layers picked up and sent to the
scrolling tree.
(WebCore::RenderLayerCompositor::updateLayerForHeader):
(WebCore::RenderLayerCompositor::updateLayerForFooter):
2013-05-12 Timothy Hatcher <timothy@apple.com>
Add support for updating the Web Inspector toolbar height.
https://bugs.webkit.org/show_bug.cgi?id=115996
Reviewed by Joseph Pecoraro and Benjamin Poulain.
* inspector/InspectorFrontendClient.h:
(InspectorFrontendClient):
* inspector/InspectorFrontendHost.cpp:
(WebCore::InspectorFrontendHost::setToolbarHeight):
* inspector/InspectorFrontendHost.h:
(InspectorFrontendHost):
* inspector/InspectorFrontendHost.idl:
* testing/Internals.cpp:
2013-05-13 Dean Jackson <dino@apple.com>
toDataURL can return an empty image in some cases
https://bugs.webkit.org/show_bug.cgi?id=115981
<rdar://problem/13760256>
Reviewed by Darin Adler.
In some accelerated rendering cases, calling toDataURL on
an off-screen canvas produced an empty image. The solution
was to force a CGContextFlush before extracting the data
for image generation.
While here, I collected the flushing code from other methods
into a single place. Also we were getting into a situation where
we called flush two times in a row.
Test: fast/canvas/toDataURL-not-empty.html
* platform/graphics/ImageBuffer.h:
(ImageBuffer): Define two new methods flushContext and flushContextIfNecessary.
* platform/graphics/cg/ImageBufferCG.cpp:
(WebCore::ImageBuffer::context): Call flushContextIfNecessary.
(WebCore::ImageBuffer::flushContextIfNecessary): Moved the 10.7 code in here.
(WebCore::ImageBuffer::flushContext): Calls CGContextFlush.
(WebCore::ImageBuffer::getUnmultipliedImageData): Call new helper.
(WebCore::ImageBuffer::getPremultipliedImageData): Call new helper.
(WebCore::ImageBuffer::toDataURL): Flush the CG context.
2013-05-13 David Hyatt <hyatt@apple.com>
Regressions in flexbox layout caused by the flexing optimizations.
https://bugs.webkit.org/show_bug.cgi?id=116058
<rdar://problem/13863647>
Reviewed by Beth Dakin.
Roll out the flex-related changes from r149597 so that the layout
algorithm goes back to the way it was. Leave the repainting optimizations
in place though.
* rendering/RenderDeprecatedFlexibleBox.cpp:
(WebCore::gatherFlexChildrenInfo):
(WebCore::RenderDeprecatedFlexibleBox::layoutHorizontalBox):
(WebCore::RenderDeprecatedFlexibleBox::layoutVerticalBox):
2013-05-13 Philippe Normand <pnormand@igalia.com>
Unreviewed, rolling out r150014.
http://trac.webkit.org/changeset/150014
https://bugs.webkit.org/show_bug.cgi?id=86410
Broke video playback on WK2 and some webgl tests
* platform/graphics/gstreamer/MediaPlayerPrivateGStreamerBase.cpp:
(WebCore::MediaPlayerPrivateGStreamerBase::MediaPlayerPrivateGStreamerBase):
(WebCore::MediaPlayerPrivateGStreamerBase::triggerRepaint):
(WebCore::MediaPlayerPrivateGStreamerBase::paint):
* platform/graphics/gstreamer/MediaPlayerPrivateGStreamerBase.h:
(MediaPlayerPrivateGStreamerBase):
2013-05-13 Christophe Dumez <ch.dumez@sisa.samsung.com>
Unreviewed, rolling out r150022.
http://trac.webkit.org/changeset/150022
https://bugs.webkit.org/show_bug.cgi?id=114044
Causes assertions in media tests
* platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:
(WebCore::MediaPlayerPrivateGStreamer::MediaPlayerPrivateGStreamer):
(WebCore::MediaPlayerPrivateGStreamer::playbackPosition):
(WebCore::MediaPlayerPrivateGStreamer::prepareToPlay):
(WebCore::MediaPlayerPrivateGStreamer::currentTime):
(WebCore::MediaPlayerPrivateGStreamer::seek):
(WebCore::MediaPlayerPrivateGStreamer::handleMessage):
* platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.h:
(MediaPlayerPrivateGStreamer):
2013-05-13 Bem Jones-Bey <bjonesbe@adobe.com>
Floats should not overhang from flex items
https://bugs.webkit.org/show_bug.cgi?id=115925
Reviewed by David Hyatt.
Allowing floats to overhand from flex items is not only against the
spec, it causes bad bugs. Fix this by having flex items properly avoid
floats.
Test: fast/block/float/float-not-removed-crash2.html
* rendering/RenderBox.cpp:
(WebCore::RenderBox::avoidsFloats): Add flex items to avoid floats.
* rendering/RenderBox.h:
(WebCore::RenderBox::isFlexItemIncludingDeprecated): Determine if the current box is a
flex item or deprecated flex item.
2013-05-13 Zoltan Horvath <zoltan@webkit.org>
[CSS Regions][CSS Exclusions] Shape-inside on regions should respect region borders and paddings
https://bugs.webkit.org/show_bug.cgi?id=115456
Reviewed by David Hyatt.
I refactored the computation logic of shape-inside on regions by removing access to RenderFlowThread from ExclusionShapeInfo's logicalTopOffset
function, this means all the logic is now existing in RenderBlockLineLayout.cpp. By modifying the logicalTopOffset it turned out that the borders
and padding hadn't worked correctly, since borders and paddings were counted twice in the shape-inside's computation. This patch adds the necessary
modifications to let it respect the borders and padding in the correct way. I created 2 new helper functions to prevent increasing the code size of
the layoutRunsAndFloatsInRange function.
I introduced 7 new tests to test for testing the correct behavior.
Tests: fast/regions/shape-inside/shape-inside-on-first-region-block-content.html
fast/regions/shape-inside/shape-inside-on-first-region-inline-content.html
fast/regions/shape-inside/shape-inside-on-second-region-block-content.html
fast/regions/shape-inside/shape-inside-on-second-region-inline-content.html
fast/regions/shape-inside/shape-inside-on-regions-inline-content.html
fast/regions/shape-inside/shape-inside-with-region-borders.html
fast/regions/shape-inside/shape-inside-with-region-padding.html
* rendering/ExclusionShapeInfo.cpp:
(WebCore): Remove FlowThread logic from logicalTopOffset move definition to header.
* rendering/ExclusionShapeInfo.h:
(WebCore::ExclusionShapeInfo::logicalTopOffset): Moved from cpp.
(WebCore::ExclusionShapeInfo::logicalLeftOffset): Add condition for RenderRegions.
* rendering/RenderBlock.h:
(RenderBlock): Add definition to the new helper members.
* rendering/RenderBlockLineLayout.cpp:
(WebCore::RenderBlock::layoutExclusionShapeInsideInfo): Modified the flow thread case to return the appropriate region.
(WebCore::RenderBlock::updateLineBoundariesForExclusions): Added new helper function. Modify the shape-inside on regions
line boundaries and position computation logic.
(WebCore::RenderBlock::adjustLogicalLineTopAndLogicalHeightIfNeeded): Added new helper function which handles the flow thread case also.
(WebCore::RenderBlock::layoutRunsAndFloatsInRange): Modified the code to use the helper functions.
2013-05-13 Bear Travis <betravis@adobe.com>
[css exclusions] Enable CSS Exclusions by default when CSS_EXCLUSIONS is set
https://bugs.webkit.org/show_bug.cgi?id=115919
Reviewed by Dean Jackson.
Change the RuntimeEnabledFeatures::isCSSExclusionsEnabled boolean to default
to true. CSS Exclusions can still be enabled / disabled in platforms by
setting the CSS_EXCLUSIONS compile flag in one of the FeatureDefine files.
Test: fast/exclusions/css-exclusions-enabled.html
* bindings/generic/RuntimeEnabledFeatures.cpp:
(WebCore):
2013-05-13 Suchit Agrawal <a.suchit@samsung.com>
Cell heights are disproportional when a row-spanning cell contains a block element that determines the height of the rows
https://bugs.webkit.org/show_bug.cgi?id=52185
Reviewed by David Hyatt.
Cells heights are not proper when rowspan cell have its own height and rowspan height
is more than the height of the rows present in rowspan.
After calculating logical height of the rows in the table, we are recalculating the height
of the rows present in rowspan. Based on the ratio of row's logical height, we are
distributing rowspan cell height in rows.
Test: fast/table/table-rowspan-height-distribution-in-rows.html
* rendering/RenderTableSection.cpp:
(WebCore):
Update the logical height of the rows based on rowspan cell height.
(WebCore::RenderTableSection::distributeRowSpanHeightToRows):
It calculates logical height of the rows in the table.
(WebCore::RenderTableSection::calcRowLogicalHeight):
Added new private API to distribute rowSpan cell height in rows.
* rendering/RenderTableSection.h:
(RenderTableSection):
2013-04-30 Balazs Kelemen <b.kelemen@sisa.samsung.com>
[GStreamer] cannot seek after video finished
https://bugs.webkit.org/show_bug.cgi?id=114044
Reviewed by Philippe Normand.
Test: media/video-seek-after-end.html
Rework the seeking logic to be able to seek after reseting the pipeline.
In addition to solve the actual problem this patch supposed to make seeking
more robust and correct.
The previous implementation tried to hide the complexity of asynchronous operations
on the pipeline. It did not handle the GST_MESSAGE_ASYNC_DONE message from the bus
but instead reported the seek as finished when it saw an asynchronous pending state
(GST_STATE_CHANGE_ASYNC) which could happen way before the seek is really done.
Now we pay attention to the GST_MESSAGE_ASYNC_DONE message to track the status of seeks.
Seeks are not the only operations executed asynchronously, changing the pipeling state is
similar. It means a seek can overlap with onother ongoing asynchronous operation.
This change address this by introducing an invariant for seeks, which is that we only request
a seek if there are no other ongoing asynchronous operations and the pipeline state is either
paused or playing (which is recommended anyway according to GStreamer's documentation).
This way we can be sure that the time when we get the next GST_MESSAGE_ASYNC_DONE message the
seek has been completed.
* platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:
(WebCore::toGstClockTime): Factored time conversation into a helper.
(WebCore::MediaPlayerPrivateGStreamer::MediaPlayerPrivateGStreamer):
(WebCore::MediaPlayerPrivateGStreamer::playbackPosition): The position might not be available
if the pipeline still has a pending state. As a workaround, if we are right after a seek we can
use the seek time. Avoiding this situation would be possible by not allowing any asynchronous
operation to overlap. I believe it would add a lot more complexity so I decided to rather introduce
this workaround. Otherwise those overlapping operations are handled fine by GStreamer.
(WebCore::MediaPlayerPrivateGStreamer::prepareToPlay): Do not reset internal state variables.
This function called when there is an intent to restart playback but it does not actually restart it.
(WebCore::MediaPlayerPrivateGStreamer::currentTime): Just removed a staling newline.
(WebCore::MediaPlayerPrivateGStreamer::seek): Take a look to the pipeline state and act upon that.
If there is an ongoing asynchronous operation make the seek pending, otherwise do it now.
Now we handle overlapping seeks as well because I saw that it can happen in some tests.
Added an early return for live streams as it doesn't makes sense to try seeking in them.
(WebCore::MediaPlayerPrivateGStreamer::handleMessage): Handle GST_MESSAGE_ASYNC_DONE and some refactoring.
(WebCore::MediaPlayerPrivateGStreamer::asyncStateChangeDone):
(WebCore::MediaPlayerPrivateGStreamer::updateStates): Only handle seeks in the pending case, the rest is
now handled in asyncStateChangeDone.
(WebCore::MediaPlayerPrivateGStreamer::cacheDuration): Do not reset the m_mediaDurationKnown if the pipeline
has an asynchronous pending state because it would fail. It does actually happen when we get a duration message
after restarting the pipeline and it would result in restarting playback from the start. It seems to be a bug
in GStreamer that it sends the duration message too early. Also sanitized this function by merging redundant branches.
* platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.h:
(MediaPlayerPrivateGStreamer):
2013-05-12 Darin Adler <darin@apple.com>
[Mac] Move writeRange/PlainText/URL from ClipboardMac to PasteboardMac
https://bugs.webkit.org/show_bug.cgi?id=116009
Reviewed by Andreas Kling.
* dom/Clipboard.cpp:
(WebCore::Clipboard::writeRange): Added. Moved from ClipboardMac,
but added some FIXMEs.
(WebCore::Clipboard::writePlainText): Ditto.
(WebCore::Clipboard::writeURL): Ditto.
* dom/Clipboard.h: Made writeURL, writeRange, and writePlainText
non-virtual in non-legacy clipboard implementations.
* platform/mac/ClipboardMac.h: Removed writeRange, writeURL, and
writePlainText.
* platform/mac/ClipboardMac.mm: Ditto.
2013-05-13 Noam Rosenthal <noam@webkit.org>
[CoordGfx] requestAnimationFrame performance issues
https://bugs.webkit.org/show_bug.cgi?id=112345
Reviewed by Jocelyn Turcotte.
Removed current requestAnimationFrame logic from CoordinatedGraphics. The new logic
is entirely in WebKit2 CoordinatedLayerTreeHost.
Covered by existing tests in fast/animations.
* platform/graphics/texmap/coordinated/CoordinatedGraphicsScene.cpp:
(WebCore::CoordinatedGraphicsScene::CoordinatedGraphicsScene):
(WebCore::CoordinatedGraphicsScene::paintToCurrentGLContext):
* platform/graphics/texmap/coordinated/CoordinatedGraphicsScene.h:
(CoordinatedGraphicsScene):
2013-05-13 Víctor Manuel Jáquez Leal <vjaquez@igalia.com>
[texmap][GStreamer] Composited Video support
https://bugs.webkit.org/show_bug.cgi?id=86410
Reviewed by Philippe Normand.
Enable the video accelerated compositing using the WebKit's
TextureMapper.
This patch does not use hardware accelerated video decoding. It
provides a generic path for system memory buffers.
No new tests, already covered by existing tests.
* platform/graphics/gstreamer/MediaPlayerPrivateGStreamerBase.cpp:
(WebCore::MediaPlayerPrivateGStreamerBase::MediaPlayerPrivateGStreamerBase):
(WebCore):
(WebCore::MediaPlayerPrivateGStreamerBase::updateTexture): update the
texture content with the new received video buffer.
(WebCore::MediaPlayerPrivateGStreamerBase::triggerRepaint): choose to
use the accelerated compositing or the normal code path
(WebCore::MediaPlayerPrivateGStreamerBase::paint): if accelerated
compositing is used this method is halted.
(WebCore::MediaPlayerPrivateGStreamerBase::paintToTextureMapper): get
a texture from the pool and draws it if it is already available.
* platform/graphics/gstreamer/MediaPlayerPrivateGStreamerBase.h:
(MediaPlayerPrivateGStreamerBase):
(WebCore::MediaPlayerPrivateGStreamerBase::platformLayer): returns itself
(WebCore::MediaPlayerPrivateGStreamerBase::supportsAcceleratedRendering):
returns true
2013-05-13 Andreas Kling <akling@apple.com>
Document: Use a DeferrableOneShotTimer to throw out StyleResolver when unused.
<http://webkit.org/b/115929>
Reviewed by Anders Carlsson.
Nothing exciting here, just replacing a rickety-looking punting mechanism with a proper
DeferrableOneShotTimer. Note that the timeout changes from 60 to 30 seconds because DOST
works by punting a full interval on next timeout.
* dom/Document.cpp:
(WebCore::Document::Document):
(WebCore::Document::didAccessStyleResolver):
(WebCore::Document::styleResolverThrowawayTimerFired):
* dom/Document.h:
(Document):
2013-05-13 Andreas Kling <akling@apple.com>
REGRESSION(r149287): FoldingText only shows me half of my text.
<http://webkit.org/b/115956>
<rdar://problem/13831099>
Reviewed by Antti Koivisto.
Check if the FrameView geometry changed post-layout, and send a resize event if needed.
This brings us closer to the original resize event behavior, with the exception that
setFrameRect() still fires an event right away if possible. This means we are still
guarded from FOUC's but frames that layout via [WebHTMLView layoutToMinimumPageWidth]
also get resize events like they used to.
No new tests, because I don't know how to test this.
* page/FrameView.h:
* page/FrameView.cpp:
(WebCore::FrameView::setFrameRect):
(WebCore::FrameView::performPostLayoutTasks):
(WebCore::FrameView::sendResizeEventIfNeeded):
Factor out the resize event logic from setFrameRect() so we can call it from both
there and performPostLayoutTasks(). sendResizeEventIfNeeded() only sends an event
if view geometry or zoom factor has changed since last time it was called.
2013-05-13 Antti Koivisto <antti@apple.com>
Remove unneeded counters from ScopeContentDistribution.
https://bugs.webkit.org/show_bug.cgi?id=116028
Reviewed by Andreas Kling.
They don't do much.
* WebCore.exp.in:
* dom/ShadowRoot.cpp:
(WebCore::ShadowRoot::ShadowRoot):
* dom/ShadowRoot.h:
No need for registration code anymore.
* html/shadow/ContentDistributor.cpp:
(WebCore::ScopeContentDistribution::ScopeContentDistribution):
Default m_insertionPointListIsValid to true to avoid crawling when there are no InsertionPoints.
(WebCore::ScopeContentDistribution::ensureInsertionPointList):
(WebCore::ScopeContentDistribution::registerInsertionPoint):
(WebCore::ScopeContentDistribution::unregisterInsertionPoint):
* html/shadow/ContentDistributor.h:
Remove distributeNodeChildrenTo, it was only used by the older/younger shadow root code.
* testing/Internals.cpp:
* testing/Internals.h:
* testing/Internals.idl:
2013-05-13 Seokju Kwon <seokju.kwon@gmail.com>
Web Inspector: Remove unused references from projects in Visual Studio
https://bugs.webkit.org/show_bug.cgi?id=116002
Reviewed by Csaba Osztrogonác.
nativeMemoryProfiler.css and NativeMemorySnapshotView.js were removed in r149807.
No new tests, no behavior change.
* WebCore.vcproj/WebCore.vcproj:
* WebCore.vcxproj/WebCore.vcxproj:
* WebCore.vcxproj/WebCore.vcxproj.filters:
2013-05-13 Zalan Bujtas <zalan@apple.com>
WebProcess consuming very high CPU on linkedin.com
https://bugs.webkit.org/show_bug.cgi?id=115601
Reviewed by Andreas Kling.
Disable WEB_TIMING_MINIMAL.
Turn off window.performance and performance.now(). Some JS frameworks expect
additional Web Timing APIs, when performance.now() is available.
* Configurations/FeatureDefines.xcconfig:
* dom/EventTargetFactory.in:
* page/DOMWindow.cpp:
(WebCore::DOMWindow::~DOMWindow):
(WebCore::DOMWindow::resetDOMWindowProperties):
(WebCore):
* page/DOMWindow.h:
(DOMWindow):
* page/DOMWindow.idl:
* page/Performance.cpp:
(WebCore::Performance::timing):
* page/Performance.h:
(Performance):
* page/Performance.idl:
2013-05-12 Eric Carlson <eric.carlson@apple.com>
REGRESSION (r149749): Video becomes invisible when it starts playing at newyorkbygehry.com
https://bugs.webkit.org/show_bug.cgi?id=115963
Reviewed by Dean Jackson.
Test: media/video-remove-insert-repaints.html
* html/HTMLMediaElement.cpp:
(WebCore::HTMLMediaElement::insertedInto): Set m_inActiveDocument when inserted into a document.
(WebCore::HTMLMediaElement::removedFrom): Fix logging.
2013-05-12 David Kilzer <ddkilzer@apple.com>
Move sudden termination symbols to the Mac-only section
* WebCore.exp.in: Move the sudden termination symbols to the
!PLATFORM(IOS) section for reals this time.
2013-05-12 Darin Adler <darin@apple.com>
Fix Mac build.
* platform/mac/PasteboardMac.mm: Add back include of ClipboardMac.h
that was removed by accident a couple of patches back.
2013-05-12 Darin Adler <darin@apple.com>
[Mac] Moved files function from ClipboardMac to PasteboardMac
https://bugs.webkit.org/show_bug.cgi?id=116008
Reviewed by Anders Carlsson.
* dom/Clipboard.cpp:
(WebCore::Clipboard::files): Added. Moved the DOM-depdendent and
platform-independent part of the files function in ClipboardMac here.
* dom/Clipboard.h: Made files function non-virtual in non-legacy case.
* platform/Pasteboard.h: Removed static member function
absoluteURLsFromPasteboardFilenames since it can now be private to
PasteboardMac. Added member function readFilenames.
* platform/mac/ClipboardMac.h: Removed function member files and also
now-unused data member m_clipboardContents.
* platform/mac/ClipboardMac.mm: Removed files function.
(WebCore::ClipboardMac::ClipboardMac): Removed code to initialize
m_clipboardContents.
* platform/mac/PasteboardMac.mm:
(WebCore::absoluteURLsFromPasteboardFilenames): Changed from a static
member function to a file-local function.
(WebCore::absoluteURLsFromPasteboard): Changed to call the function
above in its new location.
(WebCore::Pasteboard::readFilenames): Added. Code from ClipboardMac,
minus the DOM-specific parts. Added a FIXME about the peculiar round
trip through NSURL this code takes.
2013-05-12 Anders Carlsson <andersca@apple.com>
Fix WebKit2 build.
* WebCore.exp.in:
Put WebCore::disableSuddenTermination and WebCore::enableSuddenTermination symbols in the right section.
2013-05-12 Darin Adler <darin@apple.com>
[Mac] Move types function from ClipboardMac to PasteboardMac
https://bugs.webkit.org/show_bug.cgi?id=116007
Reviewed by Anders Carlsson.
* dom/Clipboard.cpp:
(WebCore::Clipboard::types): Added. Calls through to Pasteboard
after doing checks needed at this level.
* dom/Clipboard.h: Made types function non-virtual in non-legacy case,
and removed non-helpful comment.
* platform/Pasteboard.h: Updated includes and comments at the top of
the file a bit. Removed static member function addHTMLClipboardTypesForCocoaType,
since it can now be private to PasteboardMac. Added member function types.
* platform/mac/ClipboardMac.h: Removed types function.
* platform/mac/ClipboardMac.mm: Ditto.
* platform/mac/PasteboardMac.mm:
(WebCore::addHTMLClipboardTypesForCocoaType): Made this a file-local
function instead of a static member function.
(WebCore::Pasteboard::types): Added. Moved from ClipboardMac.
2013-05-12 Darin Adler <darin@apple.com>
[Mac] Move setData from ClipboardMac to PasteboardMac
https://bugs.webkit.org/show_bug.cgi?id=116006
Reviewed by Anders Carlsson.
* dom/Clipboard.cpp:
(WebCore::Clipboard::setData): Added. Calls through to Pasteboard
after doing checks needed at this level.
* dom/Clipboard.h: Made setData non-virtual in non-legacy case.
* platform/Pasteboard.h: Updated includes and forward declarations.
Removed static member function cocoaTypeFromHTMLClipboardType, since
it can now be private to PasteboardMac. Added static member function
addHTMLClipboardTypesForCocoaType, which is shared between the
ClipboardMac and PasteboardMac files for now. Added writeString.
* platform/mac/ClipboardMac.h: Removed setData.
* platform/mac/ClipboardMac.mm: Removed utiTypeFromCocoaType,
addHTMLClipboardTypesForCocoaType, and setData.
(WebCore::ClipboardMac::types): Call addHTMLClipboardTypesForCocoaType
as a Pasteboard static member function, for now.
* platform/mac/PasteboardMac.mm:
(WebCore::cocoaTypeFromHTMLClipboardType): Added. Moved from ClipboardMac.
(WebCore::Pasteboard::readString): Changed to call
cocoaTypeFromHTMLClipboardType as a file-local function, not a member
function (in fact, we didn't need to repeat the class name before, either,
so this is just removing something we didn't need).
(WebCore::utiTypeFromCocoaType): Added. Moved from ClipboardMac.
(WebCore::Pasteboard::addHTMLClipboardTypesForCocoaType): Ditto.
(WebCore::Pasteboard::writeString): Ditto.
2013-05-12 Darin Adler <darin@apple.com>
[Mac] Move getData from ClipboardMac to PasteboardMac
https://bugs.webkit.org/show_bug.cgi?id=116005
Reviewed by Anders Carlsson.
* dom/Clipboard.cpp:
(WebCore::Clipboard::Clipboard): Added a new boolean argument, forFileDrag,
to the constructor. Maybe we can find a better way to do this once we move
all the platforms over, but this boolean seems a good way to do it for now.
(WebCore::Clipboard::getData): Added. Calls through to Pasteboard after
doing the canReadData check, which is part of DOM rules, not the platform.
Also checks for the file drag case like the old ClipboardMac code did.
* dom/Clipboard.h: Made getData non-virtual in non-legacy case.
* platform/Pasteboard.h: Added a static member function named
absoluteURLsFromPasteboardFilenames, temporary so it can be shared between
ClipboardMac and PasteboardMac. Added a readString public function member,
and a m_changeCount data member. The type of m_changeCount is long since
that can always hold an NSInteger but yet is a type we can compile without
including the header file that defines NSInteger.
* platform/mac/ClipboardMac.h: Removed getData.
* platform/mac/ClipboardMac.mm: Removed getData.
(WebCore::ClipboardMac::ClipboardMac): Added code to pass in the new
forFileDrag boolean.
(WebCore::ClipboardMac::files): Call absoluteURLsFromPasteboardFilenames
as a static member function in Pasteboard since we moved it there.
* platform/mac/PasteboardMac.mm:
(WebCore::Pasteboard::Pasteboard): Initialize the change count, so later
pasteboard operations can check it.
(WebCore::Pasteboard::absoluteURLsFromPasteboardFilenames): Added. Moved
here from ClipboardMac.
(WebCore::absoluteURLsFromPasteboard): Ditto.
(WebCore::Pasteboard::readString): Added. Moved here from ClipboardMac.
2013-05-12 Anders Carlsson <andersca@apple.com>
Stop including UnusedParam.h
https://bugs.webkit.org/show_bug.cgi?id=116003
Reviewed by Sam Weinig.
UnusedParam.h is empty now so there's no need to include it anymore.
* Modules/encryptedmedia/CDMPrivateAVFoundation.mm:
* Modules/indexeddb/IDBFactoryBackendImpl.cpp:
* Modules/indexeddb/IDBObjectStore.cpp:
* Modules/webdatabase/DatabaseServer.cpp:
* Modules/webdatabase/DatabaseThread.cpp:
* bindings/js/JSDOMWindowBase.cpp:
* bindings/objc/DOMObject.mm:
* css/CSSCursorImageValue.cpp:
* css/DeprecatedStyleBuilder.cpp:
* dom/EventDispatcher.cpp:
* dom/Node.cpp:
* editing/AlternativeTextController.h:
* editing/Editor.cpp:
* html/HTMLPlugInElement.cpp:
* html/canvas/CanvasRenderingContext2D.cpp:
* html/canvas/OESVertexArrayObject.h:
* html/parser/HTMLConstructionSite.cpp:
* html/parser/HTMLTokenizer.cpp:
* html/track/InbandTextTrack.cpp:
* inspector/InspectorCanvasInstrumentation.h:
* inspector/InspectorConsoleInstrumentation.h:
* inspector/InspectorController.cpp:
* inspector/InspectorCounters.h:
* inspector/InspectorDatabaseInstrumentation.h:
* inspector/InspectorInstrumentation.h:
* loader/DocumentThreadableLoader.cpp:
* loader/PingLoader.cpp:
* loader/appcache/ApplicationCacheGroup.cpp:
* loader/cache/CachedResourceLoader.cpp:
* loader/mac/DocumentLoaderMac.cpp:
* page/ChromeClient.h:
* page/Console.cpp:
* page/FrameView.cpp:
* page/PageConsole.cpp:
* page/animation/AnimationController.cpp:
* page/animation/ImplicitAnimation.cpp:
* page/animation/KeyframeAnimation.cpp:
* platform/LocalizedStrings.cpp:
* platform/ScrollAnimator.h:
* platform/ThreadGlobalData.cpp:
* platform/blackberry/AsyncFileSystemBlackBerry.cpp:
* platform/graphics/Font.cpp:
* platform/graphics/GlyphBuffer.h:
* platform/graphics/Gradient.cpp:
* platform/graphics/ShadowBlur.cpp:
* platform/graphics/SimpleFontData.cpp:
* platform/graphics/SimpleFontData.h:
* platform/graphics/avfoundation/InbandTextTrackPrivateAVF.cpp:
* platform/graphics/avfoundation/MediaPlayerPrivateAVFoundation.cpp:
* platform/graphics/avfoundation/cf/MediaPlayerPrivateAVFoundationCF.cpp:
* platform/graphics/avfoundation/objc/InbandTextTrackPrivateAVFObjC.mm:
* platform/graphics/avfoundation/objc/InbandTextTrackPrivateLegacyAVFObjC.mm:
* platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
* platform/graphics/blackberry/GradientBlackBerry.cpp:
* platform/graphics/blackberry/GraphicsContextBlackBerry.cpp:
* platform/graphics/ca/mac/PlatformCAAnimationMac.mm:
* platform/graphics/ca/mac/PlatformCALayerMac.mm:
* platform/graphics/ca/mac/WebTileLayer.mm:
* platform/graphics/ca/win/PlatformCAAnimationWin.cpp:
* platform/graphics/cg/GraphicsContextCG.cpp:
* platform/graphics/cg/ImageBufferCG.cpp:
* platform/graphics/cg/ImageSourceCG.cpp:
* platform/graphics/clutter/PlatformClutterAnimation.cpp:
* platform/graphics/filters/ValidatedCustomFilterOperation.cpp:
* platform/graphics/gstreamer/GStreamerVersioning.cpp:
* platform/graphics/mac/GraphicsContext3DMac.mm:
* platform/graphics/mac/MediaPlayerPrivateQTKit.mm:
* platform/graphics/mac/SimpleFontDataMac.mm:
* platform/graphics/mac/WebGLLayer.mm:
* platform/graphics/mac/WebLayer.mm:
* platform/graphics/mac/WebTiledLayer.mm:
* platform/graphics/opengl/GraphicsContext3DOpenGL.cpp:
* platform/graphics/opengl/GraphicsContext3DOpenGLCommon.cpp:
* platform/graphics/qt/GraphicsContext3DQt.cpp:
* platform/graphics/texmap/TextureMapper.h:
* platform/graphics/wince/ImageBufferWinCE.cpp:
* platform/mac/PasteboardMac.mm:
* platform/mac/ScrollAnimatorMac.mm:
* platform/mac/ScrollViewMac.mm:
* platform/mac/ScrollbarThemeMac.mm:
* platform/mac/SharedTimerMac.mm:
* platform/mac/WebCoreFullScreenPlaceholderView.mm:
* platform/mac/WebCoreObjCExtras.mm:
* platform/mac/WebFontCache.mm:
* platform/mac/WebVideoFullscreenController.mm:
* platform/mac/WebVideoFullscreenHUDWindowController.mm:
* platform/mac/WebWindowAnimation.mm:
* platform/network/blackberry/CredentialStorageBlackBerry.cpp:
* platform/network/cf/ResourceErrorCF.cpp:
* platform/network/mac/CookieStorageMac.mm:
* platform/network/mac/ResourceHandleMac.mm:
* platform/network/win/ResourceHandleWin.cpp:
* platform/text/TextEncodingDetectorICU.cpp:
* rendering/RenderFlowThread.h:
* rendering/RenderImage.cpp:
* rendering/RenderLayer.cpp:
* rendering/RenderObject.cpp:
* rendering/RenderTreeAsText.cpp:
* rendering/svg/RenderSVGResourceClipper.cpp:
* rendering/svg/RenderSVGResourceFilter.cpp:
* rendering/svg/RenderSVGResourceGradient.cpp:
* rendering/svg/RenderSVGResourceMasker.cpp:
* rendering/svg/SVGRenderSupport.cpp:
* rendering/svg/SVGTextLayoutEngineSpacing.cpp:
* workers/WorkerContext.cpp:
* workers/WorkerScriptLoader.cpp:
* xml/XMLHttpRequest.cpp:
* xml/parser/XMLDocumentParserLibxml2.cpp:
2013-05-12 Darin Adler <darin@apple.com>
[Mac] Move clearAllData from ClipboardMac to PasteboardMac
https://bugs.webkit.org/show_bug.cgi?id=116001
Reviewed by Andreas Kling.
* dom/Clipboard.cpp:
(WebCore::Clipboard::clearAllData): Added. Calls through to Pasteboard after
doing the canWriteData check, which is part of DOM rules, not the platform.
* dom/Clipboard.h: Made clearAllData non-virtual in non-legacy case.
* platform/mac/ClipboardMac.h: Removed clearAllData.
* platform/mac/ClipboardMac.mm: Ditto.
2013-05-12 Darin Adler <darin@apple.com>
[Mac] Move clearData from ClipboardMac to PasteboardMac
https://bugs.webkit.org/show_bug.cgi?id=116000
Reviewed by Andreas Kling.
* dom/Clipboard.cpp:
(WebCore::Clipboard::clearData): Added. Calls through to Pasteboard after
doing the canWriteData check, which is part of DOM rules, not the platform.
* dom/Clipboard.h: Made clearData non-virtual in non-legacy case.
* platform/Pasteboard.h: Added an overload of the clear function that takes
a single type and clears only that type. Also temporarily exported the
cocoaTypeFromHTMLClipboardType function as a static member so it can be used
in both ClipboardMac and PasteboardMac during the transition.
* platform/mac/ClipboardMac.h: Removed clearData.
* platform/mac/ClipboardMac.mm: Removed clearData.
(WebCore::ClipboardMac::getData): Changed to call cocoaTypeFromHTMLClipboardType
as a Pasteboard class static member function.
(WebCore::ClipboardMac::setData): Ditto.
* platform/mac/PasteboardMac.mm:
(WebCore::Pasteboard::cocoaTypeFromHTMLClipboardType): Moved here from
ClipboardMac.
(WebCore::Pasteboard::clear): Added. Moved here from ClipboardMac.
2013-05-12 Darin Adler <darin@apple.com>
[Mac] Move hasData from ClipboardMac to PasteboardMac
https://bugs.webkit.org/show_bug.cgi?id=115999
Reviewed by Andreas Kling.
* dom/Clipboard.cpp:
(WebCore::Clipboard::hasData): Added. Calls through to Pasteboard.
* dom/Clipboard.h: Added LEGACY_VIRTUAL and LEGACY_PURE macros,
only for within this header file. These help us keep many functions
as pure virtual in the legacy style Clipboard class, but have them
be non-virtual in the normal/future style. Use LEGACY_VIRTUAL and
LEGACY_PURE to make the hasData member non-virtual.
* platform/Pasteboard.h: Added hasData, and added some blank lines and a FIXME.
* platform/mac/ClipboardMac.h: Removed hasData override.
* platform/mac/ClipboardMac.mm: Ditto.
* platform/mac/PasteboardMac.mm:
(WebCore::Pasteboard::hasData): Added. Moved code here from ClipboardMac.
2013-05-12 David Kilzer <ddkilzer@apple.com>
BUILD FIX (r149971): sudden termination is a Mac-only concept
* WebCore.exp.in: Move sudden termination symbols to Mac-only
section.
2013-05-12 Andreas Kling <akling@apple.com>
Node: Use FINAL instead of the non-virtual shadowing hack.
<http://webkit.org/b/115995>
Reviewed by Anders Carlsson.
Decorate Element/Attr implementations of prefix/localName/namespaceURI getters with FINAL
so that call sites with a more specific pointer type than Node* can avoid the virtual dispatch.
* dom/Attr.h:
* dom/Element.h:
* dom/Node.cpp:
* dom/Node.h:
2013-05-11 Darin Adler <darin@apple.com>
[Mac] Give every Clipboard an underlying Pasteboard
https://bugs.webkit.org/show_bug.cgi?id=115979
Reviewed by Andreas Kling.
This is the first step in Clipboard and Pasteboard refactoring
to fix the overlap and many layering violations.
* dom/Clipboard.cpp:
(WebCore::Clipboard::Clipboard): Add an m_pasteboard data member,
Mac-only for now, but eventually for all platforms.
(WebCore::Clipboard::~Clipboard): No longer inline the destructor.
* dom/Clipboard.h: Add WTF_USE_LEGACY_STYLE_ABSTRACT_CLIPBOARD_CLASS
flag, currently true for all non-Mac platforms. Make the constructor
no longer inline. Added a PassOwnPtr<Pasteboard> argument to the
constructor and an OwnPtr<Pasteboard> data member.
* platform/Pasteboard.h: Added a create function to make it easy
to create a pasteboard given a pasteboard name.
* platform/mac/ClipboardMac.mm:
(WebCore::ClipboardMac::ClipboardMac): Create a pasteboard and pass
it to the Clipboard constructor.
* platform/mac/PasteboardMac.mm:
(WebCore::Pasteboard::create): Added.
2013-05-12 Andreas Kling <akling@apple.com>
Unload event listeners should prevent Safari from insta-killing the web process on last tab close.
<http://webkit.org/b/115988>
<rdar://problem/13870943>
Reviewed by Anders Carlsson.
Add two methods to Chrome (and ChromeClient):
- enableSuddenTermination()
- disableSuddenTermination()
..and call these from DOMWindow instead of the free global functions.
For WebKit1, it just calls the NSProcessInfo methods to keep behavior the same.
For WebKit2, the new methods plumb through the information to the UI process.
Also updated the DOMWindow logic to think in terms of per-DOMWindow sudden termination counters
instead of a process-global one, since that gets confusing in a WK2 world.
When a DOMWindow transitions between having/not having unload/beforeunload event listeners,
we send a notification to the Chrome.
* WebCore.exp.in:
* WebCore.xcodeproj/project.pbxproj:
* page/Chrome.h:
(WebCore::Chrome::enableSuddenTermination):
(WebCore::Chrome::disableSuddenTermination):
* page/ChromeClient.h:
(WebCore::ChromeClient::enableSuddenTermination):
(WebCore::ChromeClient::disableSuddenTermination):
* page/DOMWindow.cpp:
(WebCore::addUnloadEventListener):
(WebCore::removeUnloadEventListener):
(WebCore::removeAllUnloadEventListeners):
(WebCore::addBeforeUnloadEventListener):
(WebCore::removeBeforeUnloadEventListener):
(WebCore::removeAllBeforeUnloadEventListeners):
(WebCore::DOMWindow::dispatchAllPendingBeforeUnloadEvents):
(WebCore::DOMWindow::dispatchAllPendingUnloadEvents):
(WebCore::DOMWindow::enableSuddenTermination):
(WebCore::DOMWindow::disableSuddenTermination):
* page/DOMWindow.h:
(DOMWindow):
2013-05-12 Anders Carlsson <andersca@apple.com>
Remove Complex.h from WTF
https://bugs.webkit.org/show_bug.cgi?id=115989
Reviewed by Beth Dakin.
Replace Complex declarations with std::complex<double>. Pass by value since the struct
is small enough to go into two registers on X86-64.
* Modules/webaudio/RealtimeAnalyser.cpp:
(WebCore::RealtimeAnalyser::doFFTAnalysis):
(WebCore::RealtimeAnalyser::getFloatFrequencyData):
(WebCore::RealtimeAnalyser::getByteFrequencyData):
(WebCore::RealtimeAnalyser::getByteTimeDomainData):
* platform/audio/Biquad.cpp:
(WebCore::Biquad::setZeroPolePairs):
(WebCore::Biquad::setAllpassPole):
(WebCore::Biquad::getFrequencyResponse):
* platform/audio/Biquad.h:
* platform/audio/FFTFrame.cpp:
(WebCore::FFTFrame::interpolateFrequencyComponents):
(WebCore::FFTFrame::extractAverageGroupDelay):
(WebCore::FFTFrame::addConstantGroupDelay):
2013-05-12 Simon Fraser <simon.fraser@apple.com>
Dropdowns on http://www.exploratorium.edu don't show anything
https://bugs.webkit.org/show_bug.cgi?id=115991
Reviewed by Dan Bernstein.
We can't optimize away the backing store of a layer by saying that
it paints into a composited ancestor if its composited bounds are not contained
by that ancestor.
Test: compositing/backing/no-backing-for-clip-overhang.html
* rendering/RenderLayerBacking.cpp:
(WebCore::RenderLayerBacking::updateGraphicsLayerGeometry): Pass in our
previously computed composited bounds relative to our composited ancestor,
and its composited bounds.
* rendering/RenderLayerCompositor.cpp:
(WebCore::RenderLayerCompositor::requiresOwnBackingStore): If the ancestor's
composited bounds don't contain the layer's composited bounds, the layer
needs its own backing store.
* rendering/RenderLayerCompositor.h:
2013-05-12 Commit Queue <commit-queue@webkit.org>
Unreviewed, rolling out r149955.
http://trac.webkit.org/changeset/149955
https://bugs.webkit.org/show_bug.cgi?id=115990
Broke lots of tests (Requested by smfr on #webkit).
* WebCore.exp.in:
* rendering/InlineFlowBox.h:
* rendering/InlineTextBox.h:
(InlineTextBox):
* rendering/RenderApplet.h:
* rendering/RenderBR.h:
* rendering/RenderBlock.h:
(RenderBlock):
(WebCore::RenderBlock::virtualContinuation):
(WebCore::RenderBlock::virtualChildren):
(WebCore::RenderBlock::isRenderBlock):
(WebCore::RenderBlock::isBlockFlow):
(WebCore::RenderBlock::isInlineBlockOrInlineTable):
(WebCore::RenderBlock::dirtyLinesFromChangedChild):
(WebCore::RenderBlock::collapsedMarginBefore):
(WebCore::RenderBlock::collapsedMarginAfter):
* rendering/RenderBox.h:
(WebCore::RenderBox::borderBoundingBox):
(RenderBox):
(WebCore::RenderBox::marginLogicalLeft):
(WebCore::RenderBox::marginLogicalRight):
* rendering/RenderBoxModelObject.h:
(WebCore::RenderBoxModelObject::isBoxModelObject):
* rendering/RenderButton.h:
* rendering/RenderCombineText.h:
* rendering/RenderCounter.h:
* rendering/RenderDeprecatedFlexibleBox.h:
* rendering/RenderDetailsMarker.h:
* rendering/RenderEmbeddedObject.h:
(RenderEmbeddedObject):
(WebCore::RenderEmbeddedObject::isEmbeddedObject):
(WebCore::RenderEmbeddedObject::virtualChildren):
* rendering/RenderFieldset.h:
* rendering/RenderFileUploadControl.h:
* rendering/RenderFlexibleBox.h:
* rendering/RenderFlowThread.h:
* rendering/RenderFrame.h:
* rendering/RenderFrameSet.h:
* rendering/RenderFullScreen.cpp:
* rendering/RenderFullScreen.h:
* rendering/RenderGrid.h:
* rendering/RenderHTMLCanvas.h:
* rendering/RenderIFrame.h:
* rendering/RenderImage.h:
(RenderImage):
(WebCore::RenderImage::isRenderImage):
* rendering/RenderInline.h:
(RenderInline):
(WebCore::RenderInline::virtualContinuation):
(WebCore::RenderInline::virtualChildren):
(WebCore::RenderInline::isRenderInline):
(WebCore::RenderInline::layout):
(WebCore::RenderInline::requiresLayer):
(WebCore::RenderInline::offsetWidth):
(WebCore::RenderInline::offsetHeight):
(WebCore::RenderInline::borderBoundingBox):
(WebCore::RenderInline::dirtyLinesFromChangedChild):
* rendering/RenderLayerModelObject.h:
* rendering/RenderListBox.h:
* rendering/RenderListItem.h:
* rendering/RenderListMarker.h:
* rendering/RenderMedia.h:
(WebCore::RenderMedia::virtualChildren):
(WebCore::RenderMedia::canHaveChildren):
(WebCore::RenderMedia::isMedia):
(WebCore::RenderMedia::isImage):
(WebCore::RenderMedia::requiresForcedStyleRecalcPropagation):
* rendering/RenderMediaControlElements.h:
* rendering/RenderMenuList.h:
* rendering/RenderMeter.h:
* rendering/RenderMultiColumnBlock.h:
* rendering/RenderMultiColumnFlowThread.h:
* rendering/RenderMultiColumnSet.h:
* rendering/RenderNamedFlowThread.h:
* rendering/RenderPart.h:
(RenderPart):
(WebCore::RenderPart::isRenderPart):
(WebCore::RenderPart::renderName):
* rendering/RenderProgress.h:
* rendering/RenderRegion.h:
(WebCore::RenderRegion::isRenderRegion):
* rendering/RenderRegionSet.h:
* rendering/RenderReplaced.h:
(RenderReplaced):
(WebCore::RenderReplaced::renderName):
* rendering/RenderReplica.h:
* rendering/RenderRuby.h:
* rendering/RenderRubyBase.h:
* rendering/RenderRubyRun.h:
* rendering/RenderRubyText.h:
* rendering/RenderScrollbarPart.h:
* rendering/RenderSearchField.h:
* rendering/RenderSlider.h:
* rendering/RenderSnapshottedPlugIn.h:
(RenderSnapshottedPlugIn):
* rendering/RenderTable.h:
(RenderTable):
(WebCore::RenderTable::renderName):
(WebCore::RenderTable::isTable):
(WebCore::RenderTable::avoidsFloats):
* rendering/RenderTableCaption.h:
* rendering/RenderTableCell.h:
* rendering/RenderTableCol.h:
* rendering/RenderTableRow.h:
* rendering/RenderTableSection.h:
* rendering/RenderText.h:
(RenderText):
(WebCore::RenderText::marginLeft):
(WebCore::RenderText::marginRight):
(WebCore::RenderText::styleWillChange):
(WebCore::RenderText::length):
(WebCore::RenderText::paint):
(WebCore::RenderText::layout):
* rendering/RenderTextControl.h:
(RenderTextControl):
(WebCore::RenderTextControl::renderName):
(WebCore::RenderTextControl::isTextControl):
(WebCore::RenderTextControl::avoidsFloats):
* rendering/RenderTextControlMultiLine.h:
* rendering/RenderTextControlSingleLine.h:
(RenderTextControlSingleLine):
(WebCore::RenderTextControlSingleLine::isTextField):
* rendering/RenderTextFragment.h:
* rendering/RenderTextTrackCue.h:
* rendering/RenderVideo.h:
* rendering/RenderView.h:
* rendering/RenderWidget.h:
(RenderWidget):
(WebCore::RenderWidget::isWidget):
* rendering/RenderWordBreak.h:
* rendering/RootInlineBox.h:
(RootInlineBox):
* rendering/mathml/RenderMathMLBlock.h:
* rendering/svg/RenderSVGBlock.h:
(RenderSVGBlock):
* rendering/svg/RenderSVGContainer.h:
(WebCore::RenderSVGContainer::setNeedsBoundariesUpdate):
(WebCore::RenderSVGContainer::virtualChildren):
(WebCore::RenderSVGContainer::isSVGContainer):
(WebCore::RenderSVGContainer::renderName):
(RenderSVGContainer):
(WebCore::RenderSVGContainer::objectBoundingBox):
(WebCore::RenderSVGContainer::strokeBoundingBox):
(WebCore::RenderSVGContainer::repaintRectInLocalCoordinates):
* rendering/svg/RenderSVGEllipse.h:
* rendering/svg/RenderSVGForeignObject.h:
* rendering/svg/RenderSVGGradientStop.h:
* rendering/svg/RenderSVGHiddenContainer.h:
(WebCore::RenderSVGHiddenContainer::renderName):
(RenderSVGHiddenContainer):
(WebCore::RenderSVGHiddenContainer::isSVGHiddenContainer):
* rendering/svg/RenderSVGImage.h:
* rendering/svg/RenderSVGInline.h:
(WebCore::RenderSVGInline::renderName):
(WebCore::RenderSVGInline::requiresLayer):
(WebCore::RenderSVGInline::isSVGInline):
(RenderSVGInline):
* rendering/svg/RenderSVGInlineText.h:
* rendering/svg/RenderSVGModelObject.h:
(WebCore::RenderSVGModelObject::requiresLayer):
(RenderSVGModelObject):
* rendering/svg/RenderSVGPath.h:
* rendering/svg/RenderSVGRect.h:
* rendering/svg/RenderSVGResourceClipper.h:
* rendering/svg/RenderSVGResourceContainer.h:
(RenderSVGResourceContainer):
(WebCore::RenderSVGResourceContainer::isSVGResourceContainer):
(WebCore::RenderSVGResourceContainer::toRenderSVGResourceContainer):
* rendering/svg/RenderSVGResourceFilter.h:
* rendering/svg/RenderSVGResourceFilterPrimitive.h:
* rendering/svg/RenderSVGResourceGradient.h:
(RenderSVGResourceGradient):
(WebCore::RenderSVGResourceGradient::resourceBoundingBox):
* rendering/svg/RenderSVGResourceLinearGradient.h:
* rendering/svg/RenderSVGResourceMarker.h:
* rendering/svg/RenderSVGResourceMasker.h:
* rendering/svg/RenderSVGResourcePattern.h:
* rendering/svg/RenderSVGResourceRadialGradient.h:
* rendering/svg/RenderSVGRoot.h:
* rendering/svg/RenderSVGShape.h:
(WebCore::RenderSVGShape::setNeedsBoundariesUpdate):
(WebCore::RenderSVGShape::setNeedsTransformUpdate):
(WebCore::RenderSVGShape::repaintRectInLocalCoordinates):
(WebCore::RenderSVGShape::localToParentTransform):
(WebCore::RenderSVGShape::localTransform):
(WebCore::RenderSVGShape::isSVGShape):
(RenderSVGShape):
(WebCore::RenderSVGShape::objectBoundingBox):
(WebCore::RenderSVGShape::strokeBoundingBox):
* rendering/svg/RenderSVGTSpan.h:
* rendering/svg/RenderSVGText.h:
* rendering/svg/RenderSVGTextPath.h:
* rendering/svg/RenderSVGTransformableContainer.h:
* rendering/svg/RenderSVGViewportContainer.h:
2013-05-12 Anders Carlsson <andersca@apple.com>
Simplify AutodrainedPool
https://bugs.webkit.org/show_bug.cgi?id=115986
Reviewed by Andreas Kling.
Remove calls to AutodrainedPool::cycle as well as the iteration counter passed to the constructor.
Instead, just declare RAII pools where it seems necessary.
* Modules/webdatabase/DatabaseThread.cpp:
(WebCore::DatabaseThread::databaseThread):
* fileapi/FileThread.cpp:
(WebCore::FileThread::runLoop):
* loader/icon/IconDatabase.cpp:
(WebCore::IconDatabase::setIconDataForIconURL):
(WebCore::IconDatabase::performURLImport):
(WebCore::IconDatabase::readFromDatabase):
2013-05-12 Andreas Kling <akling@apple.com>
Apply FINAL to the Node hierarchy.
<http://webkit.org/b/115984>
Mostly from Blink r149454 by <cevans@chromium.org>
<http://src.chromium.org/viewvc/blink?view=revision&revision=149454>
A couple of the stable DOM/ microbenchmarks are perf positive on Linux clang:
- CloneNodes time reduced from 162.4 to 156.5 ms.
- CreateNodes time reduced from 113.9 to 104.9 ms.
* dom/: Beat things with the FINAL stick.
* html/: Ditto.
* svg/: Ditto.
2013-05-12 Andreas Kling <akling@apple.com>
Devirtualize some things on Document.
From Blink r149967 by <esprehn@chromium.org>
<http://src.chromium.org/viewvc/blink?view=revision&revision=149967>
Several methods on Document are virtual but don't override a super class method
and don't need to be virtual. This patch devirtualizes:
- createElementNS()
- finishedParsing()
- suspendScriptedAnimationControllerCallbacks()
- resumeScriptedAnimationControllerCallbacks()
It also removes the suspend and resume callbacks from ScriptExecutionContext
since they didn't need to be there.
* dom/Document.h:
* dom/ScriptExecutionContext.h:
2013-05-12 Andreas Kling <akling@apple.com>
Remove redundant call to removeAllEventListeners() in Document::open().
From Blink r150175 by <dcheng@chromium.org>
<http://src.chromium.org/viewvc/blink?view=revision&revision=150175>
Document::open() already calls Document::removeAllEventListeners(), which
removes the event listeners from the DOMWindow it's attached to, so
there's no need to do it manually here as well.
* dom/Document.cpp:
(WebCore::Document::open):
2013-05-12 Andreas Kling <akling@apple.com>
Apply FINAL to the RenderObject hierarchy.
<http://webkit.org/b/115977>
Mostly from Blink r148795 by <cevans@chromium.org>
<http://src.chromium.org/viewvc/blink?view=revision&revision=148795>
* rendering/: Beat things with the FINAL stick.
* WebCore.exp.in: Export a now-needed symbol.
2013-05-12 Carlos Garcia Campos <cgarcia@igalia.com>
[GTK] Remove unnecessary GTK_CHECK_VERSION #ifdefs
https://bugs.webkit.org/show_bug.cgi?id=115914
Reviewed by Martin Robinson.
* platform/graphics/gtk/FullscreenVideoControllerGtk.cpp:
(WebCore::FullscreenVideoControllerGtk::hideHud):
(WebCore::FullscreenVideoControllerGtk::initializeWindow):
* platform/gtk/GtkVersioning.c:
* platform/gtk/GtkVersioning.h:
* platform/gtk/WidgetRenderingContext.cpp:
(WebCore::WidgetRenderingContext::WidgetRenderingContext):
* plugins/gtk/gtk2xtbin.c:
(gtk_xtbin_realize):
2013-05-11 Brent Fulgham <bfulgham@apple.com>
[Windows] Unreviewed build fix after r149932
* make-export-file-generator: Don't attempt to import
(or use) non-existent cxxabi functions on Windows.
2013-05-11 Simon Fraser <simon.fraser@apple.com>
Add more info to compositing log channel output
https://bugs.webkit.org/show_bug.cgi?id=115978
Reviewed by Dean Jackson.
Add to compositing log channel output whether a layer paints
into its compositing ancestor.
* rendering/RenderLayerCompositor.cpp:
(WebCore::RenderLayerCompositor::logLayerInfo):
2013-05-10 Simon Fraser <simon.fraser@apple.com>
REGRESSION: Fixed background on ColterReed.com scrolls
https://bugs.webkit.org/show_bug.cgi?id=115951
Reviewed by Beth Dakin.
The logic for painting the fixed root background into its own layer was
broken when the document element's layer was composited. This could be caused
by a negative z-index child of the body, or by an explicit compositing-causing
style on the <html>.
There were two issues. First, when painting the layer for the fixed root
background, we would simply short-circuit the fixed background paint in
RenderLayer::paintLayer(), when checking for a composited layer. We have
to continue to paint through the composited <html> layer to get the root
background in this case.
Secondly, RenderLayerBacking::paintIntoLayer() would only set the PaintLayerPaintingSkipRootBackground
flag if this RenderLayerBacking had a m_backgroundLayer. However, when the <html> is
composited, we need to skip painting the root layer for both the RenderView's backing,
and for the <html>'s backing. Checking whether there is *any* layer that paints
the fixed root background (i.e. checking compositor()->fixedRootBackgroundLayer())
is a simple way to fix this test.
Tests: platform/mac-wk2/tiled-drawing/fixed-background/fixed-background-composited-html.html
platform/mac-wk2/tiled-drawing/fixed-background/fixed-background-negative-z-index-fixed.html
* rendering/RenderLayer.cpp:
(WebCore::paintForFixedRootBackground):
(WebCore::RenderLayer::paintLayer):
* rendering/RenderLayerBacking.cpp:
(WebCore::RenderLayerBacking::paintIntoLayer):
2013-05-11 Simon Fraser <simon.fraser@apple.com>
Possible crash when going Back while loading PDF
https://bugs.webkit.org/show_bug.cgi?id=115972
Reviewed by Dan Bernstein.
It's possible for m_frame to be null when Document::findUnsafeParentScrollPropagationBoundary()
is called, so null-check currentFrame.
* dom/Document.cpp:
(WebCore::Document::findUnsafeParentScrollPropagationBoundary):
2013-05-11 Alexey Proskuryakov <ap@apple.com>
<rdar://problem/13823864> TextCodecICU complains about ambiguous codec names with current ICU release
https://bugs.webkit.org/show_bug.cgi?id=115953
Reviewed by Darin Adler.
Store and use canonical converter name to create converters.
As a side effect, we now actually reuse cached converters - previously we would compare
a standard encoding name to internal canonical one, which rarely match.
* platform/text/TextCodecICU.h:
* platform/text/TextCodecICU.cpp:
(WebCore::TextCodecICU::create): Pass canonical ICU converter name to constructor.
(WebCore::TextCodecICU::registerEncodingNames):
- Updated terminology.
- Added a comment that special cases should be kept in sync between registerEncodingNames
and registerCodecs.
- Moved maccyrillic alias to a correct section. It's not present in ICU even today.
- Changed a few aliases to actually map to standard name, not to an overridden one
(this doesn't change behavior since addToTextEncodingNameMap looks up canonical
name, but is clearer).
(WebCore::TextCodecICU::registerCodecs): Store a converter name to use with each
canonical encoding name.
(WebCore::TextCodecICU::TextCodecICU): Ditto.
(WebCore::TextCodecICU::releaseICUConverter): Reset the converter to remove any
leftover data.
(WebCore::TextCodecICU::createICUConverter):
- Compare converter name to converter name, not to another alias name.
- Use proper string comparison instead of pointer comparison.
- When creating a converter, assert that the name is not ambigous - canonical
converter names should never be, otherwise there would be no way to create
the converter without ambiguity.
2013-05-11 Antoine Quint <graouts@apple.com>
[Mac] The captions menu should not use a canned max-width and max-height
https://bugs.webkit.org/show_bug.cgi?id=115968
Reviewed by Eric Carlson.
Use more real estate to display the captions menu should the caption names
be long.
* css/mediaControlsQuickTime.css:
(video::-webkit-media-controls-closed-captions-container):
(video::-webkit-media-controls-closed-captions-track-list):
Make the captions menu scale to a max-width and max-height to allow 4px
above and below the menu, except on the right where it always aligns with
the captions icon in the media controller.
* html/shadow/MediaControlsApple.cpp:
(WebCore::MediaControlsApple::createControls):
Move the captions menu element to be a child of the controls instead of
the panel such that it may scale relative to the controls when using %
CSS values.
2013-05-11 Jochen Eisinger <jochen@chromium.org>
Disallow a window to focus itself via javascript URLs or using target _self
https://bugs.webkit.org/show_bug.cgi?id=115906
Reviewed by Geoffrey Garen.
Test: fast/dom/Window/window-focus-self.html
* loader/FrameLoader.cpp:
(WebCore::createWindow):
* page/DOMWindow.cpp:
(WebCore::DOMWindow::focus):
2013-05-11 Christophe Dumez <ch.dumez@sisa.samsung.com>
Fix several style warnings in generated bindings
https://bugs.webkit.org/show_bug.cgi?id=115961
Reviewed by Kentaro Hara.
Fix several style errors in the bindings generated under
Source/WebCore/bindings/scripts/test/
No new tests, no behavior change.
* bindings/scripts/CodeGeneratorCPP.pm:
(GenerateImplementation):
(WriteData):
* bindings/scripts/CodeGeneratorJS.pm:
(GenerateHeader):
(GenerateImplementation):
(WriteData):
* bindings/scripts/CodeGeneratorObjC.pm:
(GenerateHeader):
* bindings/scripts/test/CPP/WebDOMFloat64Array.cpp:
* bindings/scripts/test/CPP/WebDOMTestActiveDOMObject.cpp:
* bindings/scripts/test/CPP/WebDOMTestCallback.cpp:
* bindings/scripts/test/CPP/WebDOMTestCustomNamedGetter.cpp:
* bindings/scripts/test/CPP/WebDOMTestEventConstructor.cpp:
* bindings/scripts/test/CPP/WebDOMTestEventTarget.cpp:
* bindings/scripts/test/CPP/WebDOMTestException.cpp:
* bindings/scripts/test/CPP/WebDOMTestInterface.cpp:
* bindings/scripts/test/CPP/WebDOMTestMediaQueryListListener.cpp:
* bindings/scripts/test/CPP/WebDOMTestNamedConstructor.cpp:
* bindings/scripts/test/CPP/WebDOMTestNode.cpp:
* bindings/scripts/test/CPP/WebDOMTestObj.cpp:
* bindings/scripts/test/CPP/WebDOMTestOverloadedConstructors.cpp:
* bindings/scripts/test/CPP/WebDOMTestSerializedScriptValueInterface.cpp:
* bindings/scripts/test/CPP/WebDOMTestTypedefs.cpp:
* bindings/scripts/test/JS/JSTestActiveDOMObject.cpp:
(WebCore::toJS):
* bindings/scripts/test/JS/JSTestActiveDOMObject.h:
(WebCore::JSTestActiveDOMObject::releaseImplIfNotNull):
* bindings/scripts/test/JS/JSTestCustomNamedGetter.cpp:
(WebCore::toJS):
* bindings/scripts/test/JS/JSTestCustomNamedGetter.h:
(WebCore::JSTestCustomNamedGetter::releaseImplIfNotNull):
* bindings/scripts/test/JS/JSTestEventConstructor.cpp:
(WebCore::toJS):
* bindings/scripts/test/JS/JSTestEventConstructor.h:
(WebCore::JSTestEventConstructor::releaseImplIfNotNull):
* bindings/scripts/test/JS/JSTestEventTarget.cpp:
(WebCore::toJS):
* bindings/scripts/test/JS/JSTestEventTarget.h:
(WebCore::JSTestEventTarget::releaseImplIfNotNull):
* bindings/scripts/test/JS/JSTestException.cpp:
(WebCore::toJS):
* bindings/scripts/test/JS/JSTestException.h:
(WebCore::JSTestException::releaseImplIfNotNull):
* bindings/scripts/test/JS/JSTestInterface.cpp:
(WebCore::toJS):
* bindings/scripts/test/JS/JSTestInterface.h:
(WebCore::JSTestInterface::releaseImplIfNotNull):
* bindings/scripts/test/JS/JSTestMediaQueryListListener.cpp:
(WebCore::toJS):
* bindings/scripts/test/JS/JSTestMediaQueryListListener.h:
(WebCore::JSTestMediaQueryListListener::releaseImplIfNotNull):
* bindings/scripts/test/JS/JSTestNamedConstructor.cpp:
(WebCore::toJS):
* bindings/scripts/test/JS/JSTestNamedConstructor.h:
(WebCore::JSTestNamedConstructor::releaseImplIfNotNull):
* bindings/scripts/test/JS/JSTestObj.cpp:
(WebCore::toJS):
* bindings/scripts/test/JS/JSTestObj.h:
(WebCore::JSTestObj::releaseImplIfNotNull):
* bindings/scripts/test/JS/JSTestOverloadedConstructors.cpp:
(WebCore::toJS):
* bindings/scripts/test/JS/JSTestOverloadedConstructors.h:
(WebCore::JSTestOverloadedConstructors::releaseImplIfNotNull):
* bindings/scripts/test/JS/JSTestSerializedScriptValueInterface.cpp:
(WebCore::toJS):
* bindings/scripts/test/JS/JSTestSerializedScriptValueInterface.h:
(WebCore::JSTestSerializedScriptValueInterface::releaseImplIfNotNull):
* bindings/scripts/test/JS/JSTestTypedefs.cpp:
(WebCore::toJS):
* bindings/scripts/test/JS/JSTestTypedefs.h:
(WebCore::JSTestTypedefs::releaseImplIfNotNull):
* bindings/scripts/test/ObjC/DOMFloat64ArrayInternal.h:
(WebCore):
* bindings/scripts/test/ObjC/DOMTestActiveDOMObjectInternal.h:
(WebCore):
* bindings/scripts/test/ObjC/DOMTestCallbackInternal.h:
(WebCore):
* bindings/scripts/test/ObjC/DOMTestCustomNamedGetterInternal.h:
(WebCore):
* bindings/scripts/test/ObjC/DOMTestEventConstructorInternal.h:
(WebCore):
* bindings/scripts/test/ObjC/DOMTestEventTargetInternal.h:
(WebCore):
* bindings/scripts/test/ObjC/DOMTestExceptionInternal.h:
(WebCore):
* bindings/scripts/test/ObjC/DOMTestInterfaceInternal.h:
(WebCore):
* bindings/scripts/test/ObjC/DOMTestMediaQueryListListenerInternal.h:
(WebCore):
* bindings/scripts/test/ObjC/DOMTestNamedConstructorInternal.h:
(WebCore):
* bindings/scripts/test/ObjC/DOMTestNodeInternal.h:
(WebCore):
* bindings/scripts/test/ObjC/DOMTestObjInternal.h:
(WebCore):
* bindings/scripts/test/ObjC/DOMTestOverloadedConstructorsInternal.h:
(WebCore):
* bindings/scripts/test/ObjC/DOMTestSerializedScriptValueInterfaceInternal.h:
(WebCore):
* bindings/scripts/test/ObjC/DOMTestTypedefsInternal.h:
(WebCore):
2013-05-11 Anders Carlsson <andersca@apple.com>
Make it a build error to put invalid C++ symbol names in WebCore.exp.in
https://bugs.webkit.org/show_bug.cgi?id=115958
Reviewed by Andreas Kling.
While invalid C++ symbols will eventually show up as a link error since the symbol won't be found,
this makes it easier to catch invalid symbols inside of #ifdefs.
* make-export-file-generator:
Try to demangle C++ symbols before printing them.
2013-05-11 David Kilzer <ddkilzer@apple.com>
BUILD FIX (r149718): Move exported symbol into ENABLE(FULLSCREEN_API) section
Fixes the following build failure when ENABLE(FULLSCREEN_API) is
off:
Undefined symbols for architecture i386:
"__ZNK7WebCore7Element25containsFullScreenElementEv", referenced from:
-exported_symbol[s_list] command line option
* WebCore.exp.in: Move the symbol.
2013-05-11 Robert Hogan <robert@webkit.org>
Unreviewed, remove some lint accidentally left in r149929.
* rendering/InlineFlowBox.cpp:
(WebCore::verticalAlignApplies):
2013-03-17 Robert Hogan <robert@webkit.org>
Text flow broken in elements with vertical align top/bottom and inline elements taller than line-height
https://bugs.webkit.org/show_bug.cgi?id=111974
Reviewed by Ryosuke Niwa.
Per http://www.w3.org/TR/CSS2/visudet.html#propdef-vertical-align 'vertical-align' only applies to inline and table-cell
elements.
Test: fast/css/vertical-align-block-elements.html
* rendering/InlineFlowBox.cpp:
(WebCore::isTextInBlockElement):
(WebCore):
(WebCore::InlineFlowBox::adjustMaxAscentAndDescent):
(WebCore::InlineFlowBox::computeLogicalBoxHeights):
(WebCore::InlineFlowBox::placeBoxesInBlockDirection):
2013-05-11 Benjamin Poulain <bpoulain@apple.com>
Make CanvasStyle a plain object instead of an RefCounted object
https://bugs.webkit.org/show_bug.cgi?id=115775
Reviewed by Andreas Kling.
CanvasStyle is just 2 words wide. We do not gain anything from allocating
it on the heap. Change the object to be just a type and some data.
* bindings/js/JSCanvasRenderingContext2DCustom.cpp:
(WebCore::toJS):
(WebCore::toHTMLCanvasStyle):
* html/HTMLCanvasElement.cpp:
* html/canvas/CanvasRenderingContext2D.cpp:
(WebCore::CanvasRenderingContext2D::State::State):
(WebCore::CanvasRenderingContext2D::setStrokeStyle):
(WebCore::CanvasRenderingContext2D::setFillStyle):
(WebCore::CanvasRenderingContext2D::setStrokeColor):
(WebCore::CanvasRenderingContext2D::setFillColor):
(WebCore::CanvasRenderingContext2D::fullCanvasCompositedFill):
(WebCore::CanvasRenderingContext2D::drawTextInternal):
* html/canvas/CanvasRenderingContext2D.h:
(WebCore::CanvasRenderingContext2D::strokeStyle):
(CanvasRenderingContext2D):
(WebCore::CanvasRenderingContext2D::fillStyle):
(State):
* html/canvas/CanvasStyle.cpp:
(WebCore::CanvasStyle::CanvasStyle):
(WebCore::CanvasStyle::createFromString):
(WebCore::CanvasStyle::createFromStringWithOverrideAlpha):
(WebCore::CanvasStyle::isEquivalentColor):
(WebCore):
(WebCore::CanvasStyle::operator=):
(WebCore::CanvasStyle::applyStrokeColor):
(WebCore::CanvasStyle::applyFillColor):
* html/canvas/CanvasStyle.h:
(CanvasStyle):
(WebCore::CanvasStyle::isValid):
(WebCore::CanvasStyle::CanvasStyle):
(WebCore):
(WebCore::CanvasStyle::operator=):
2013-05-11 Benjamin Poulain <benjamin@webkit.org>
Gradient::platformGradient: Vector reserveCapacity -> reserveInitialCapacity
https://bugs.webkit.org/show_bug.cgi?id=115779
Reviewed by Andreas Kling.
* platform/graphics/cg/GradientCG.cpp:
(WebCore::Gradient::platformGradient): Clang is surprisingly smart at removing
all the branches of this function. Remove two more with reserveInitialCapacity.
2013-05-10 Alexey Proskuryakov <ap@apple.com>
<rdar://problem/13666412> Clean up some edge cases of URL parsing.
https://bugs.webkit.org/show_bug.cgi?id=104919
Reviewed by Darin Adler.
Test: fast/url/segments-userinfo-vs-host.html
* page/SecurityOrigin.cpp:
(WebCore::schemeRequiresHost):
(WebCore::shouldTreatAsUniqueOrigin):
Updated function name and comments (host is not the same as authority). We still
need this check - KURL can still produce http URLs with an empty host (even as this
patch reduces the number of such cases). So can Gecko and current draft of URL
Standard.
It would be good to have a guarantee that such useless URLs can not come out of
URL parser, as relying on downstream code re-parsing the URL correctly would be fragile.
* platform/KURL.cpp:
(WebCore::hostPortIsEmptyButCredentialsArePresent): Updated an argument name for
correctness.
(WebCore::KURL::parse):
1. Reverted behavior changes from <http://trac.webkit.org/changeset/82181> - I could
find no reason to allow "@" in hostnames, and having a URL like this re-parsed by
a different parser would likely produce different results. It's better to just treat
these edge case URLs as invalid.
2. When hostname component is a lone colon, preserve it in parsed URL string,
as otherwise path would get pushed in its place when re-parsing.
3. When authority component is a lone colon, don't forget to "//" after scheme, too.
4. Added some assertions about contents of authority component, to catch potential
mis-parsing earlier.
2013-05-10 Alexey Proskuryakov <ap@apple.com>
Make TextCodecICU not depend on TextEncoding
https://bugs.webkit.org/show_bug.cgi?id=115848
Reviewed by Darin Adler.
* platform/text/TextCodecICU.cpp:
(WebCore::TextCodecICU::create):
(WebCore::TextCodecICU::TextCodecICU):
(WebCore::TextCodecICU::createICUConverter):
(WebCore::TextCodecICU::decode):
(WebCore::TextCodecICU::encode):
* platform/text/TextCodecICU.h:
Use a plain encoding string in platform encoder wrapper, not a higher level concept.
2013-05-10 Laszlo Gombos <l.gombos@samsung.com>
Remove Mac OS X Leopard (10.5) support
https://bugs.webkit.org/show_bug.cgi?id=107964
Reviewed by Ryosuke Niwa.
Removed the code for 10.5 and removed if-def for 10.6.
No new tests, covered by existing tests.
* platform/LocalizedStrings.cpp:
(WebCore::contextMenuItemTagLookUpInDictionary):
* platform/graphics/cg/GraphicsContextCG.cpp:
* platform/mac/EmptyProtocolDefinitions.h:
* platform/mac/NSScrollerImpDetails.h:
* platform/mac/WebCoreSystemInterface.h:
* platform/text/mac/HyphenationMac.mm:
2013-05-10 Laszlo Gombos <l.gombos@samsung.com>
Remove USE(OS_RANDOMNESS)
https://bugs.webkit.org/show_bug.cgi?id=108095
Reviewed by Darin Adler.
Remove the USE(OS_RANDOMNESS) guard as it is turned on for all
ports.
No new tests as this is covered by existing tests.
* page/Crypto.cpp:
(WebCore::Crypto::getRandomValues):
* platform/UUID.cpp:
(WebCore::createCanonicalUUIDString):
2013-05-10 Christophe Dumez <ch.dumez@sisa.samsung.com>
Remove [NoInterfaceObject] from several WebAudio IDL interfaces
https://bugs.webkit.org/show_bug.cgi?id=115894
Reviewed by Darin Adler.
Several WebAudio IDL interfaces had [NoInterfaceObject] extended attribute set,
meaning that there was no corresponding attribute on the global window object.
This behavior is not according to the specification:
https://dvcs.w3.org/hg/audio/raw-file/tip/webaudio/specification.html
This patch removes the [NoInterfaceObject] extended attribute where needed to
match the specification.
No new tests, already covered by existing tests.
* Modules/webaudio/AnalyserNode.idl:
* Modules/webaudio/AudioBuffer.idl:
* Modules/webaudio/AudioBufferSourceNode.idl:
* Modules/webaudio/AudioDestinationNode.idl:
* Modules/webaudio/AudioListener.idl:
* Modules/webaudio/AudioNode.idl:
* Modules/webaudio/AudioParam.idl:
* Modules/webaudio/BiquadFilterNode.idl:
* Modules/webaudio/ChannelMergerNode.idl:
* Modules/webaudio/ChannelSplitterNode.idl:
* Modules/webaudio/ConvolverNode.idl:
* Modules/webaudio/DelayNode.idl:
* Modules/webaudio/DynamicsCompressorNode.idl:
* Modules/webaudio/GainNode.idl:
* Modules/webaudio/MediaElementAudioSourceNode.idl:
* Modules/webaudio/MediaStreamAudioDestinationNode.idl:
* Modules/webaudio/MediaStreamAudioSourceNode.idl:
* Modules/webaudio/OscillatorNode.idl:
* Modules/webaudio/ScriptProcessorNode.idl:
* Modules/webaudio/WaveShaperNode.idl:
* Modules/webaudio/WaveTable.idl:
2013-05-10 Simon Fraser <simon.fraser@apple.com>
REGRESSION (r145680): No box shadow rendered on element with positioned child that obscures it
https://bugs.webkit.org/show_bug.cgi?id=115840
Reviewed by Antti Koivisto.
In r107836, we moved some box-shadow painting into the paintFillLayer code for performance.
However, in r145680 we started to skip background painting when we know the background is
obscured. This broke shadow painting in some cases.
Fix by always painting the background fill layers if we know that they will also
paint the shadow.
Test: fast/box-shadow/box-shadow-obscured-backgrounds.html
* rendering/RenderBox.cpp:
(WebCore::RenderBox::paintBackground):
2013-05-10 Simon Fraser <simon.fraser@apple.com>
REGRESSION (r143626): Element shows as garbage in image gallery
https://bugs.webkit.org/show_bug.cgi?id=115946
Reviewed by Antti Koivisto.
RenderLayer::backgroundIsKnownToBeOpaqueInRect() used hasVisibleContent()
to check whether the layer's content was hidden via the visibility property.
However, this assumed that a passing hasVisibleContent() check meant that the
entire area was covered by the renderers and layers checked layer.
This is not always true. It's possible to have a visibility:hidden layer
with a non-covering visbility:visible child, or even a single RenderText
child that happens to have visibility:visible style. In these situations,
hasVisibleContent() returns true but the entire area is not painted.
So we have to fall back to on a more conservative check using the
visibility style, which will give is a reliable answer for the current layer.
Tests: compositing/contents-opaque/hidden-with-visible-child.html
compositing/contents-opaque/hidden-with-visible-text.html
* rendering/RenderLayer.cpp:
(WebCore::RenderLayer::backgroundIsKnownToBeOpaqueInRect):
2013-05-10 Simon Fraser <simon.fraser@apple.com>
Garbage down left side of nytimes.com page (if subscriber)
https://bugs.webkit.org/show_bug.cgi?id=115839
Reviewed by Antti Koivisto.
RenderLayer::backgroundIsKnownToBeOpaqueInRect() would incorrectly return true
for layers where the given rect wasn't contained in the background rect, but
where some child layer obscured the rect, even though clipping hid part
of that child layer.
So bail from RenderLayer::backgroundIsKnownToBeOpaqueInRect() if we have
any overflow clipping. This could be enhanced in future to test whether child
layers obscure the clipping rect, but that would be more expensive.
Test: compositing/contents-opaque/overflow-hidden-child-layers.html
* rendering/RenderLayer.cpp:
(WebCore::RenderLayer::backgroundIsKnownToBeOpaqueInRect):
2013-05-10 Eric Carlson <eric.carlson@apple.com>
In-band captions not visible immediately after track mode change
https://bugs.webkit.org/show_bug.cgi?id=115922
Reviewed by Dean Jackson.
Test: media/track/track-in-band-mode.html
* html/HTMLMediaElement.cpp:
(WebCore::HTMLMediaElement::textTrackModeChanged): Add cues for all loaded tracks, regardless
of track type.
2013-05-10 Timothy Hatcher <timothy@apple.com>
Web Inspector: determine the resource type in InspectorResourceAgent::willSendRequest.
This allows the Network timeline and Resources sidebar to filter Resources earlier,
before the server sends a response. Useful for long polling (comet) XHRs.
https://webkit.org/b/74935
rdar://problem/13726105
Reviewed by Joseph Pecoraro.
* inspector/Inspector.json:
(Network.requestWillBeSent): Added.
* inspector/InspectorResourceAgent.cpp:
(WebCore::InspectorResourceAgent::willSendRequest): Send the type if it isn't Other along in requestWillBeSent.
(WebCore::InspectorResourceAgent::didReceiveResponse): Don't determine the type here anymore. Clear the CachedResource
if isNotModified like the old code path did by not setting cachedResource if !isNotModified.
2013-05-10 Laszlo Gombos <l.gombos@samsung.com>
[CMake] Consolidate list of files to build for WebCore plugin support
https://bugs.webkit.org/show_bug.cgi?id=104429
Reviewed by Rob Buis.
Move the common files to support plugins and the logic for disabling
plugins) to CMakeLists.txt from PlatformXXX.cmake.
No new tests as there is no new functionality.
* CMakeLists.txt:
* PlatformBlackBerry.cmake:
* PlatformEfl.cmake:
* PlatformWinCE.cmake:
2013-05-10 Robert Hogan <robert@webkit.org>
REGRESSION(r148121): Empty Span does not get a linebox when it's in an anonymous block
https://bugs.webkit.org/show_bug.cgi?id=115818
Reviewed by David Hyatt.
r148121 only worried about split inlines inside anonymous blocks - it ought to have
catered for empty inlines, with no continuations, inside a single solitary anonymous block too.
Test: fast/inline/anonymous-block-with-empty-inline.html
* rendering/RenderBlockLineLayout.cpp:
(WebCore::hasInlineDirectionBordersPaddingOrMargin):
2013-05-10 Zan Dobersek <zdobersek@igalia.com>
[GTK] Remove unnecessary includes in WidgetGtk.cpp
https://bugs.webkit.org/show_bug.cgi?id=115912
Reviewed by Andreas Kling.
No new tests - no new functionality.
* platform/gtk/WidgetGtk.cpp: Remove the unnecessary includes of the Chrome.h, Frame.h, FrameView.h,
Page.h and RenderObject.h headers as the included declarations are not used anywhere. ScrollView.h is
included instead as it is required and was previously included by one of the removed header inclusions.
2013-05-10 Zan Dobersek <zdobersek@igalia.com>
[Cairo] Remove the unnecessary ImageData.h include in ImageBufferCairo.cpp
https://bugs.webkit.org/show_bug.cgi?id=115911
Reviewed by Carlos Garcia Campos.
No new tests - no new functionality.
* platform/graphics/cairo/ImageBufferCairo.cpp: Remove the ImageData.h include
as the included declarations are not used anywhere.
2013-05-10 Zan Dobersek <zdobersek@igalia.com>
[Cairo] Remove the unnecessary CSSParser.h include in GradientCairo.cpp
https://bugs.webkit.org/show_bug.cgi?id=115910
Reviewed by Laszlo Gombos.
No new tests - no new functionality.
* platform/graphics/cairo/GradientCairo.cpp: Remove the CSSParser.h include
as the included declarations are not used anywhere.
2013-05-10 Dean Jackson <dino@apple.com>
Include tab character as a word end for kerning
https://bugs.webkit.org/show_bug.cgi?id=115915
<rdar://problem/13861491>
Reviewed by Enrica Casucci.
This is a follow-up to https://bugs.webkit.org/show_bug.cgi?id=112507
which only looked for a space character as a word end. It should
look for tab characters too.
Test: fast/text/word-space-with-kerning-4.html
* rendering/RenderBlockLineLayout.cpp:
(WebCore::setLogicalWidthForTextRun): Look for ' '.
2013-05-10 Anders Carlsson <andersca@apple.com>
Remove EventTracer
https://bugs.webkit.org/show_bug.cgi?id=115916
Reviewed by Sam Weinig.
EventTracer is dead code, remove it.
* CMakeLists.txt:
* GNUmakefile.list.am:
* Target.pri:
* WebCore.vcproj/WebCore.vcproj:
* WebCore.vcxproj/WebCore.vcxproj:
* WebCore.vcxproj/WebCore.vcxproj.filters:
* WebCore.xcodeproj/project.pbxproj:
* platform/EventTracer.cpp: Removed.
* platform/EventTracer.h: Removed.
2013-05-10 Zan Dobersek <zdobersek@igalia.com>
[GTK] Generated files are regenerated always
https://bugs.webkit.org/show_bug.cgi?id=115908
Reviewed by Carlos Garcia Campos.
No new tests - no change in functionality.
* GNUmakefile.am: Don't treat the window constructors IDL file as a dependency of the JavaScriptCore bindings.
The file is generated during the IDL preprocessing, and the JSC bindings already depend on that step through
the idl_supplemental_dependencies file. Because of that the window constructors IDL file has a phony target
which seems to confuse the bindings generation rule into thinking that a complete regeration of the bindings is required.
2013-05-10 Andreas Kling <akling@apple.com>
Caching of generated images in CSS should be smarter.
<http://webkit.org/b/115902>
<rdar://problem/13542727>
Reviewed by Antti Koivisto.
Add an IntSize => GeneratorGeneratedImage cache at the CSSImageGeneratorValue level.
CSSGradientValue is currently the only CSSImageGeneratorValue subclass that makes use of the cache.
Generated images are kept for 3 seconds after last use.
The main problem with the previous approach was that background renderers (e.g <body>, <tr>, etc)
would be passed to multiple CSSImageGeneratorValue::getImage() calls with different sizes requested
for each of the descendent renderers that inherit their background from the same parent.
The cache wasn't smart enough for this, it just thought the background renderer was changing size
a lot, and would regenerate the image over and over.
We already had caching of intermediate image buffers for GeneratorGeneratedImage::drawPattern().
This removes the eviction timer from that cache so that the intermediate images can live a bit longer.
(WebCore::CSSImageGeneratorValue::cachedImageForSize):
(WebCore::CSSImageGeneratorValue::saveCachedImageForSize):
Renamed from getImage() and putImage().
(WebCore::CSSImageGeneratorValue::evictCachedGeneratedImage):
(WebCore::CSSImageGeneratorValue::CachedGeneratedImage::CachedGeneratedImage):
(WebCore::CSSImageGeneratorValue::CachedGeneratedImage::evictionTimerFired):
Let the CachedGeneratedImage throw itself out from cache when the timer fires.
* css/CSSImageGeneratorValue.h:
(CachedGeneratedImage):
Exactly what it sounds like. These go into CSSImageGeneratorValue::m_images with the size
as the hash key.
* platform/graphics/GeneratorGeneratedImage.cpp:
(WebCore::GeneratorGeneratedImage::drawPattern):
* platform/graphics/GeneratorGeneratedImage.h:
(WebCore::GeneratorGeneratedImage::~GeneratorGeneratedImage):
(WebCore::GeneratorGeneratedImage::GeneratorGeneratedImage):
Keep the intermediate image for drawPattern() until destruction instead of dropping it on
a timer. These objects are now evicted by the CSSImageGeneratorValue's image cache
after 3 seconds of disuse rather than kept for the lifetime of the renderer.
* css/CSSCanvasValue.cpp:
(WebCore::CSSCanvasValue::canvasChanged):
(WebCore::CSSCanvasValue::canvasResized):
* css/CSSCrossfadeValue.cpp:
(WebCore::CSSCrossfadeValue::crossfadeChanged):
* rendering/style/StyleGeneratedImage.cpp:
(WebCore::StyleGeneratedImage::addClient):
* css/CSSImageGeneratorValue.cpp:
(WebCore::CSSImageGeneratorValue::addClient):
(WebCore::CSSImageGeneratorValue::removeClient):
CSSImageGeneratorValue::m_clients is now a HashCountedSet<RenderObject*>, tweak accordingly.
2013-05-10 Anders Carlsson <andersca@apple.com>
Remove MemoryUsageSupport class
https://bugs.webkit.org/show_bug.cgi?id=115913
Reviewed by Andreas Kling.
MemoryUsageSupport was just used by a single call site in InspectorTimelineAgent,
and the function called always returns zero on all platforms! Remove it.
* CMakeLists.txt:
* GNUmakefile.list.am:
* Target.pri:
* WebCore.vcproj/WebCore.vcproj:
* WebCore.vcxproj/WebCore.vcxproj:
* WebCore.vcxproj/WebCore.vcxproj.filters:
* WebCore.xcodeproj/project.pbxproj:
* inspector/InspectorMemoryAgent.cpp:
* inspector/InspectorTimelineAgent.cpp:
(WebCore):
(WebCore::InspectorTimelineAgent::setNativeHeapStatistics):
* platform/MemoryUsageSupport.cpp: Removed.
* platform/MemoryUsageSupport.h: Removed.
* platform/qt/MemoryUsageSupportQt.cpp: Removed.
2013-05-10 Ryosuke Niwa <rniwa@webkit.org>
REGRESSION (r149652): Videos do not play on cnn.com, just black box
https://bugs.webkit.org/show_bug.cgi?id=115887
Reviewed by Antti Koivisto.
The bug was caused by window and document named item maps counting the same element twice
when it has the same id and name attribute values. Fixed the bug by avoiding to add or remove
an element per id and name attribute updates when it had already been added or removed by
name and id attribute updates respectively.
We do this by checking whether the other attribute affects the element's precense in window
and document named item maps and avoiding to add or remove the attribute when they do and
the other attribute is present in updateId and updateName.
Consider a scenario when an object element has id "foo", and name attribute is about to be also
set to "foo". If the id attribute doesn't affect element's presense in window or document
named item maps, we're done. If it does, then the maps already have this element so we don't
want to add it again. Conversely, if the element already has id and name attributes set to
"foo", and we're moving the id attribute, then we want to remove the element from the maps only
if the id doesn't affect the presence of the element in the maps.
Unfortuntely, this logic doesn't work when we're inserting or removing an element on its entirely
because updateId and updateName are called when both id and name attributes are present so skip
this step (AlwaysUpdateHTMLDocumentNamedItemMaps) for the id attribute to break the symmetry.
Test: fast/dom/HTMLDocument/image-with-same-id-and-name.html
fast/dom/HTMLDocument/object-with-same-id-and-name.html
* dom/Element.cpp:
(WebCore::Element::insertedInto): Call updateId and updateName with
AlwaysUpdateHTMLDocumentNamedItemMaps.
(WebCore::Element::removedFrom): Ditto.
(WebCore::Element::updateName): Don't add or remove this element if the id attribute has already
done so except when we're inserting, removing, or cloning an element.
(WebCore::Element::updateId): Ditto for the name attribute.
(WebCore::Element::cloneAttributesFromElement): Added a comment and assert that we never call this
function when this element is in the document. We can't update window and documemt named item
maps here because image element's id attribute value, for example, is present in the document's
named item map if it has a name attribute. Since this function calls updateId and updateName
before updating attributes, this check is going to fail in DocumentNameCollection's
nodeMatchesIfIdAttributeMatch and bad things will happen.
* dom/Element.h:
* editing/ReplaceNodeWithSpanCommand.cpp:
(WebCore::swapInNodePreservingAttributesAndChildren): Clone children and attributes before
inserting the swapped span to avoid hitting the assertion in cloneAttributesFromElement we added.
* html/HTMLImageElement.cpp:
(WebCore::HTMLImageElement::parseAttribute):
* html/HTMLObjectElement.cpp:
(WebCore::HTMLObjectElement::updateDocNamedItem):
2013-05-09 Dean Jackson <dino@apple.com>
Don't trust character widths for internal OS X fonts in form controls
https://bugs.webkit.org/show_bug.cgi?id=115883
<rdar://problem/13817757>
Reviewed by Darin Adler.
We ignore the character width for a bunch of fonts when predicting
the width of a form control. Some of the internal fonts in OS X are
not in the ignored list. Rather than add them, simply test for
fonts whose family begins with a period character ".".
* rendering/RenderTextControl.cpp:
(WebCore::RenderTextControl::hasValidAvgCharWidth): Return false for
any family that starts with "."
2013-05-10 Carlos Garcia Campos <cgarcia@igalia.com>
[GTK] Remove unnecessary GLIB_CHECK_VERSION #ifdefs
https://bugs.webkit.org/show_bug.cgi?id=115904
Reviewed by Martin Robinson.
* bindings/gobject/WebKitDOMEventTarget.cpp:
* platform/gtk/GtkVersioning.c:
* platform/gtk/GtkVersioning.h:
2013-05-10 Zoltan Arvai <zarvai@inf.u-szeged.hu>
Unreviewed. Fix the ENABLE(SHARED_WORKERS) build after r149864.
* workers/SharedWorkerThread.cpp: include "SecurityOrigin.h"
2013-05-10 Claudio Saavedra <csaavedra@igalia.com>
Fix build after r149864.
Unreviewed build fix.
* loader/ThreadableLoader.h: include <wtf/text/AtomicString.h>
when building with RESOURCE_TIMING enabled.
2013-05-10 Anders Carlsson <andersca@apple.com>
Fix build.
* bindings/js/ScriptController.cpp:
2013-05-10 Anders Carlsson <andersca@apple.com>
Remove ScriptInstance.h
https://bugs.webkit.org/show_bug.cgi?id=115900
Reviewed by Andreas Kling.
Remove yet another abstraction now that we don't support V8.
* GNUmakefile.list.am:
* WebCore.vcproj/WebCore.vcproj:
* WebCore.vcxproj/WebCore.vcxproj:
* WebCore.vcxproj/WebCore.vcxproj.filters:
* WebCore.xcodeproj/project.pbxproj:
* bindings/js/ScriptController.h:
(Bindings):
(ScriptController):
* bindings/js/ScriptControllerMac.mm:
(WebCore::ScriptController::createScriptInstanceForWidget):
* bindings/js/ScriptInstance.h: Removed.
* html/HTMLPlugInElement.cpp:
(WebCore::HTMLPlugInElement::getInstance):
* html/HTMLPlugInElement.h:
(Bindings):
(HTMLPlugInElement):
* platform/graphics/wince/MediaPlayerProxy.h:
(WebMediaPlayerProxy):
* rendering/RenderEmbeddedObject.cpp:
* rendering/RenderSnapshottedPlugIn.cpp:
2013-05-10 Anders Carlsson <andersca@apple.com>
Unreviewed, rolling out r149866.
http://trac.webkit.org/changeset/149866
https://bugs.webkit.org/show_bug.cgi?id=115898
Broke tests
* dom/Document.cpp:
(WebCore::Document::setDomain):
(WebCore::Document::initSecurityContext):
* page/SecurityOrigin.cpp:
(WebCore::SecurityOrigin::SecurityOrigin):
(WebCore::SecurityOrigin::isolatedCopy):
(WebCore::SecurityOrigin::setDomainFromDOM):
(WebCore::SecurityOrigin::grantUniversalAccess):
* page/SecurityOrigin.h:
(SecurityOrigin):
2013-05-10 Andrei Bucur <abucur@adobe.com>
Remove overflow dead code
https://bugs.webkit.org/show_bug.cgi?id=115893
Reviewed by Antti Koivisto.
The patch removes unused public overflow accesor functions from RenderOverflow and InlineFlowBox.
Tests: no tests, code cleanup.
* rendering/InlineFlowBox.h: Removed logicalLeftLayoutOverflow and logicalRightLayoutOverflow.
* rendering/RenderOverflow.h: Removed setMinYLayoutOverflow, setMaxYLayoutOverflow,
setMinXLayoutOverflow, setMaxXLayoutOverflow, setMinYVisualOverflow, setMaxYVisualOverflow,
setMinXVisualOverflow and setMaxXVisualOverflow.
2013-05-10 Anders Carlsson <andersca@apple.com>
Begin making SecurityOrigin immutable
https://bugs.webkit.org/show_bug.cgi?id=115898
Reviewed by Andreas Kling.
Replace SecurityOrigin::setDomainFromDOM and SecurityOrigin::grantUniversalAccess with
member functions that return new SecurityOrigin objects.
* dom/Document.cpp:
(WebCore::Document::setDomain):
Update the security origin to one returned by copyWithDomainSetFromDOM.
(WebCore::Document::initSecurityContext):
Set the security origin to one returned by copyWithUniversalAccessGranted().
* page/SecurityOrigin.cpp:
(WebCore::SecurityOrigin::SecurityOrigin):
Add a new constructor that takes all the member variables as parameters. This is a little unwieldy at the moment,
but all the boolean parameters could be replaced by a bitmask of flags.
(WebCore::SecurityOrigin::isolatedCopy):
Call the new constructor.
(WebCore::SecurityOrigin::copyWithDomainSetFromDOM):
Return a new security origin with m_domainWasSetInDOM set to true and the domain updated.
(WebCore::SecurityOrigin::copyWithUniversalAccessGranted):
Return a new security origin with m_universalAccess set to true.
2013-05-10 Anders Carlsson <andersca@apple.com>
Remove ScriptController::updateSecurityOrigin
https://bugs.webkit.org/show_bug.cgi?id=115895
Reviewed by Antti Koivisto.
ScriptController::updateSecurityOrigin is just dead code now that the V8 bindings are gone.
* bindings/js/ScriptController.cpp:
* bindings/js/ScriptController.h:
* dom/Document.cpp:
(WebCore::Document::setIsViewSource):
(WebCore::Document::setDomain):
* dom/Document.h:
(Document):
* dom/SecurityContext.cpp:
(WebCore::SecurityContext::enforceSandboxFlags):
* dom/SecurityContext.h:
(SecurityContext):
2013-05-10 Anders Carlsson <andersca@apple.com>
Stop including SecurityOrigin.h where unnecessary
https://bugs.webkit.org/show_bug.cgi?id=115897
Reviewed by Antti Koivisto.
Move rarely called functions out of line so headers don't have to include SecurityOrigin.h
* Modules/indexeddb/IDBFactoryBackendImpl.h:
* Modules/webdatabase/DatabaseBackendBase.cpp:
(WebCore::DatabaseBackendBase::databaseDebugName):
* Modules/webdatabase/DatabaseBackendBase.h:
(DatabaseBackendBase):
* Modules/webdatabase/DatabaseSync.h:
* bindings/js/JSDOMWindowCustom.h:
* html/parser/XSSAuditor.cpp:
* loader/ThreadableLoader.cpp:
(WebCore::ThreadableLoaderOptions::ThreadableLoaderOptions):
(WebCore::ThreadableLoaderOptions::~ThreadableLoaderOptions):
(WebCore::ThreadableLoader::create):
* loader/ThreadableLoader.h:
(ThreadableLoaderOptions):
* loader/WorkerThreadableLoader.cpp:
* workers/DedicatedWorkerContext.cpp:
* workers/DedicatedWorkerThread.cpp:
* workers/SharedWorkerContext.cpp:
* workers/WorkerThread.cpp:
* workers/WorkerThread.h:
2013-05-10 Carlos Garcia Campos <cgarcia@igalia.com>
Unreviewed. Fix GTK+ build after r149839.
* platform/gtk/RenderThemeGtk3.cpp:
(WebCore::gtkStyleChangedCallback):
2013-05-09 Chris Fleizach <cfleizach@apple.com>
AX: VoiceOver is no longer seeing items in poorly formed tables
https://bugs.webkit.org/show_bug.cgi?id=115837
Reviewed by Darin Adler.
In case the author didn't include the rows of a table as the
direct children, a table needs to dive down its descendant chain
until the rows are found.
I also took the opportunity to clean up a bit around what the different
meanings of table are in the accessibility classes.
Test: accessibility/poorly-formed-aria-table.html
* accessibility/AccessibilityARIAGrid.cpp:
(WebCore::AccessibilityARIAGrid::addRowDescendant):
(WebCore::AccessibilityARIAGrid::addChildren):
* accessibility/AccessibilityARIAGrid.h:
(AccessibilityARIAGrid):
* accessibility/AccessibilityARIAGridRow.cpp:
(WebCore::AccessibilityARIAGridRow::parentTable):
(WebCore):
* accessibility/AccessibilityARIAGridRow.h:
(AccessibilityARIAGridRow):
* accessibility/AccessibilityObject.h:
(WebCore::AccessibilityObject::isTable):
* accessibility/AccessibilityTable.h:
(AccessibilityTable):
(WebCore::AccessibilityTable::isTable):
(WebCore::toAccessibilityTable):
* accessibility/AccessibilityTableRow.cpp:
(WebCore::AccessibilityTableRow::parentTable):
2013-05-09 Yael Aharon <yael.aharon@intel.com>
REGRESSION: Disabled multiline select element now responds to (certain) clicks
https://bugs.webkit.org/show_bug.cgi?id=115710
Reviewed by Kent Tamura.
After http://trac.webkit.org/changeset/140286, select elements can scroll whether they
are disabled or not. While they scroll, they also change the selected item.
This patch allows the select element to scroll, but does not change the selection
if the select element is disabled.
Test: fast/forms/select/listbox-disabled-scroll-no-onchange.html
Test: fast/forms/select/listbox-disabled-no-autoscroll.html
* rendering/RenderListBox.cpp:
(WebCore::RenderListBox::autoscroll):
* rendering/RenderListBox.cpp:
(WebCore::RenderListBox::stopAutoscroll):
2013-05-09 Anders Carlsson <andersca@apple.com>
Clean up SecurityOrigin::databaseIdentifier
https://bugs.webkit.org/show_bug.cgi?id=115882
Reviewed by Beth Dakin.
Remove m_encodedHost and just call encodeHost from databaseIdentifier().
Also, use a StringBuilder when constructing the database identifier to avoid allocating
temporary String objects over and over.
* page/SecurityOrigin.cpp:
(WebCore::SecurityOrigin::SecurityOrigin):
(WebCore):
(WebCore::SecurityOrigin::createFromDatabaseIdentifier):
(WebCore::SecurityOrigin::databaseIdentifier):
* page/SecurityOrigin.h:
(SecurityOrigin):
2013-05-09 Anders Carlsson <andersca@apple.com>
Remove m_securityOrigin from XMLHttpRequest
https://bugs.webkit.org/show_bug.cgi?id=115881
Reviewed by Alexey Proskuryakov.
The security origin passed to XMLHttpRequest::create was always null, so just get rid of the member variable completely.
* xml/XMLHttpRequest.cpp:
(WebCore::XMLHttpRequest::create):
(WebCore::XMLHttpRequest::XMLHttpRequest):
(WebCore::XMLHttpRequest::securityOrigin):
* xml/XMLHttpRequest.h:
(XMLHttpRequest):
2013-05-09 Christophe Dumez <ch.dumez@sisa.samsung.com>
[NoInterfaceObject] extended attribute should be removed for several interfaces
https://bugs.webkit.org/show_bug.cgi?id=115852
Reviewed by Benjamin Poulain.
Remove [NoInterfaceObject] extended attribute from the following Web IDL
interfaces: SecurityPolicy, History, Location, Navigator, Performance,
PerformanceEntry, PerformanceMark, PerformanceMeasure, PerformanceNavigation,
PerformanceResourceTiming, PerformanceTiming and Screen.
These interfaces should not have the [NoInterfaceObject] extended attribute
according to their respective specifications:
- http://www.w3.org/html/wg/drafts/html/master/browsers.html#the-history-interface
- http://www.w3.org/html/wg/drafts/html/master/browsers.html#the-location-interface
- https://dvcs.w3.org/hg/content-security-policy/raw-file/tip/csp-specification.dev.html#securitypolicy
- http://www.w3.org/html/wg/drafts/html/master/webappapis.html#the-navigator-object
- http://www.w3.org/TR/navigation-timing/#performance
- https://dvcs.w3.org/hg/webperf/raw-file/tip/specs/PerformanceTimeline/Overview.html#sec-PerformanceEntry-interface
- http://www.w3.org/TR/navigation-timing/#performancenavigation
- http://www.w3.org/TR/navigation-timing/#performancetiming
- http://www.w3.org/TR/user-timing/#performancemark
- http://www.w3.org/TR/user-timing/#performancemeasure
- http://www.w3c-test.org/webperf/specs/ResourceTiming/#performanceresourcetiming
- http://dev.w3.org/csswg/cssom-view/#the-screen-interface
The new behavior is consistent with the specifications, Firefox and soon Blink.
No new tests, already covered by existing tests.
* page/DOMSecurityPolicy.idl:
* page/History.idl:
* page/Location.idl:
* page/Navigator.idl:
* page/Performance.idl:
* page/PerformanceEntry.idl:
* page/PerformanceMark.idl:
* page/PerformanceMeasure.idl:
* page/PerformanceNavigation.idl:
* page/PerformanceResourceTiming.idl:
* page/PerformanceTiming.idl:
* page/Screen.idl:
2013-05-09 Robert Hogan <robert@webkit.org>
REGRESSION (Safari 3-Safari 4): Replaced element with percent height in table has incorrect height
https://bugs.webkit.org/show_bug.cgi?id=26394
Reviewed by David Hyatt.
Text controls or any object that has scrollable content should not flex inside a table cell.
This makes our behaviour the same as IE, FF and Opera (Presto).
* rendering/RenderTableSection.cpp:
(WebCore::RenderTableSection::layoutRows):
2013-05-09 Anders Carlsson <andersca@apple.com>
Build fix.
* WebCore.exp.in:
2013-05-09 Anders Carlsson <andersca@apple.com>
Add a StorageStrategy hook for creating transient local storage namespaces
https://bugs.webkit.org/show_bug.cgi?id=115870
Reviewed by Geoffrey Garen.
* WebCore.exp.in:
Export symbol needed by WebKit2.
* dom/Document.cpp:
(WebCore::Document::topOrigin):
* dom/Document.h:
* dom/ScriptExecutionContext.h:
* workers/WorkerContext.h:
Remove const qualifier from topOrigin() to avoid ugly const_casts when assigning into a RefPtr<SecurityOrigin> variable.
* page/PageGroup.cpp:
(WebCore::PageGroup::transientLocalStorage):
Do a single hash lookup instead of three and use the SecurityOrigin itself as the hash key instead of a string representation of it.
* page/PageGroup.h:
Update HashMap declaration.
* storage/StorageNamespace.cpp:
(WebCore::StorageNamespace::transientLocalStorageNamespace):
Add new implementation that will optionally call out to the storage strategy.
* storage/StorageNamespaceImpl.cpp:
(WebCore::StorageNamespaceImpl::transientLocalStorageNamespace):
Move the default implementation here from PageGroup.
* storage/StorageStrategy.cpp:
(WebCore::StorageStrategy::transientLocalStorageNamespace):
Call the default implementation.
2013-05-09 Enrica Casucci <enrica@apple.com>
A change in system environment should force all CSS properties to be recomputed.
https://bugs.webkit.org/show_bug.cgi?id=115872
<rdar://problem/13781171>
Reviewed by Antti Koivisto.
When a change in the global environment occurs, for example system colors,
we need to make sure all the CSS properties are recomputed and not fetched
from the cache. For this reason we invalidate the properties cache.
I've also renamed the function to give it a more meaningful name.
* page/Page.cpp:
(WebCore::Page::updateStyleForAllPagesAfterGlobalChangeInEnvironment):
* page/Page.h:
* rendering/RenderTheme.cpp:
(WebCore::RenderTheme::platformColorsDidChange):
2013-05-09 Antti Koivisto <antti@apple.com>
Reoptimize free-standing :focus/link/visited/-webkit-any-link selectors.
<http://webkit.org/b/115590>
Reviewed by Darin Adler.
Common pseudo selectors should go into their respective rule buckets instead of ending up in the universal one.
* css/RuleSet.cpp:
(WebCore::RuleSet::findBestRuleSetAndAdd):
Check tag selectors with * local name (usually created for namespace) for a suitable narrower bucket too.
2013-05-09 Darin Adler <darin@apple.com>
RenderQuote has giant function for language to quotes map
https://bugs.webkit.org/show_bug.cgi?id=115807
Reviewed by Anders Carlsson.
* rendering/RenderQuote.cpp:
(WebCore::RenderQuote::RenderQuote): Updated for m_isAttached name change.
(WebCore::RenderQuote::~RenderQuote): Updated for name change, and also split
assertion with && in it into two separate assertions.
(WebCore::checkNumberOfDistinctQuoteCharacters): Added. Helper function that is used
to check that the number of distinct quote characters is small enough to fit into
our fixed size array below.
(WebCore::quotesForLanguage): Replaces the old quotesDataLanguageMap function.
Returns a pointer to a struct that contains the four quote characters. This new
function doesn't have the massive amount of code that the old one did. We use the
standard library bsearch function to do a binary search.
(WebCore::stringForQuoteCharacter): Added. This returns a string for a given quote
character; one string for any given character.
(WebCore::quotationMarkString): Added. Returns the string for the quotation mark.
(WebCore::apostropheStringImpl): Added. Returns the string for the apostrophe.
(WebCore::RenderQuote::originalText): Rewrote this to include all the logic that
used to be in the quotesData function.
(WebCore::RenderQuote::attachQuote): Tweak assertions as above. Removed unneeded
special case for the first quote in a RenderView; sharing the code is better and
there is no significant performance difference. Also use m_isAttached directly
when looking at predecessores so there is no need for an isAttached function.
(WebCore::RenderQuote::detachQuote): Updated assertions and for name change.
(WebCore::RenderQuote::updateDepth): Ditto.
* rendering/RenderQuote.h: Removed unneeded includes. Marked the class FINAL since
we call the originalText function in the class and we don't want to do a virtual
function dispatch for that. Removed uneeded const from an argument. Removed a
stray semicolon. Removed the quotesData and isAttached functions, since they are no
longer needed. Renamed m_attached to m_isAttached.
* rendering/style/QuotesData.cpp: Removed the overload of QuotesData::create that
takes four quote strings. This was only used to build up the quotes table.
* rendering/style/QuotesData.h: Ditto.
2013-05-09 Max Feil <mfeil@rim.com>
shouldUsePluginDocument() needs to be respected when a document is created
https://bugs.webkit.org/show_bug.cgi?id=110308
Reviewed by Rob Buis.
In DOMImplementation::createDocument() we should create
a PluginDocument for mime types that return "true" for
shouldAlwaysUsePluginDocument(), even if there is no pluginData
for them. This lets a client choose plugins for which the "missing
plugin" text or icon should appear more consistently. Otherwise
plugins referenced by iFrames will be treated as an HTMLDocument,
possibly resulting in binary files rendered as gibberish text.
Layout test platform/blackberry/plugins/swf-as-src-of-iframe.html
* dom/DOMImplementation.cpp:
(WebCore::DOMImplementation::createDocument):
2013-05-09 Timothy Hatcher <timothy@apple.com>
Fix an exception when hovering native functions while paused in the debugger.
https://webkit.org/b/115866
rdar://problem/13681982
Reviewed by Darin Adler and Joseph Pecoraro.
* inspector/InjectedScriptSource.js:
(InjectedScript.prototype.getFunctionDetails): Return an error if the details
is null or undefined.
2013-05-09 Darin Adler <darin@apple.com>
[Mac] CFError leak under Objective-C garbage collection
https://bugs.webkit.org/show_bug.cgi?id=115862
Reviewed by Benjamin Poulain.
* platform/network/mac/ResourceErrorMac.mm:
(WebCore::ResourceError::nsError): Use adoptCF instead of adoptNS since
the CFError needs a CFRelease, not an -[NSObject release].
2013-05-09 Alberto Garcia <agarcia@igalia.com>
BlackBerry: fix call to PluginLayerWebKitThread::setHolePunchRect()
https://bugs.webkit.org/show_bug.cgi?id=114953
Reviewed by Rob Buis.
data->layer needs a cast in order to call setHolePunchRect().
* plugins/blackberry/NPCallbacksBlackBerry.cpp:
(WebCore::npSetHolePunchHandler):
2013-05-09 Mike Fenton <mifenton@rim.com>
[BlackBerry] Style updates required based on new check-webkit-style
https://bugs.webkit.org/show_bug.cgi?id=115857
Reviewed by Rob Buis.
Update WebCore/platform/graphics BlackBerry sources
to match check-webkit-style updates.
Internally reviewed by Jakob Petsovits.
* platform/graphics/blackberry/CanvasLayerWebKitThread.cpp:
* platform/graphics/blackberry/GraphicsContext3DBlackBerry.cpp:
(WebCore::GraphicsContext3D::readPixelsIMG):
(WebCore::GraphicsContext3D::paintToCanvas):
* platform/graphics/blackberry/GraphicsLayerBlackBerry.cpp:
(WebCore::GraphicsLayerBlackBerry::updateLayerPosition):
* platform/graphics/blackberry/IntRectBlackBerry.cpp:
(WebCore::IntRect::IntRect):
* platform/graphics/blackberry/LayerCompositingThread.h:
(WTF::::deref):
* platform/graphics/blackberry/LayerFilterRenderer.cpp:
(WebCore::LayerFilterRenderer::initializeSharedGLObjects):
(WebCore::LayerFilterRenderer::actionsForOperations):
(WebCore::LayerFilterRenderer::applyActions):
* platform/graphics/blackberry/LayerRenderer.cpp:
(WebCore::LayerRenderer::setViewport):
(WebCore::LayerRenderer::compositeBuffer):
(WebCore::LayerRenderer::drawColor):
(WebCore::LayerRenderer::compositeLayersRecursive):
* platform/graphics/blackberry/LayerWebKitThread.cpp:
(WebCore::LayerWebKitThread::setFrame):
* platform/graphics/blackberry/MediaPlayerPrivateBlackBerry.cpp:
(WebCore::MediaPlayerPrivate::play):
(WebCore::MediaPlayerPrivate::waitMetadataTimerFired):
* platform/image-decoders/blackberry/JPEGImageDecoder.cpp:
(WebCore::JPEGImageDecoder::JPEGImageDecoder):
2013-05-09 Mike Fenton <mifenton@rim.com>
[BlackBerry] Style updates required based on new check-webkit-style
https://bugs.webkit.org/show_bug.cgi?id=115857
Reviewed by Rob Buis.
Update WebCore/platform/network/blackberry
to match check-webkit-style updates.
* platform/network/blackberry/NetworkJob.cpp:
(WebCore::NetworkJob::initialize):
(WebCore::NetworkJob::handleSetCookieHeader):
(WebCore::NetworkJob::sendResponseIfNeeded):
(WebCore::NetworkJob::shouldSendClientData):
* platform/network/blackberry/NetworkJob.h:
(NetworkJob):
* platform/network/blackberry/NetworkManager.cpp:
(WebCore::NetworkManager::startJob):
* platform/network/blackberry/rss/RSSFilterStream.cpp:
(WebCore::isRSSContent):
(WebCore::transcode):
2013-05-09 Mike Fenton <mifenton@rim.com>
[BlackBerry] Style updates required based on new check-webkit-style
https://bugs.webkit.org/show_bug.cgi?id=115857
Reviewed by Rob Buis.
Update WebCore/platform/blackberry to match check-webkit-style updates.
No functional changes.
* platform/blackberry/CookieDatabaseBackingStore/CookieDatabaseBackingStore.h:
* platform/blackberry/CookieManager.cpp:
(WebCore::CookieManager::getRawCookies):
* platform/blackberry/CookieMap.h:
(WebCore::CookieMap::count):
* platform/blackberry/CookieParser.cpp:
(WebCore::CookieParser::parseOneCookie):
* platform/blackberry/LoggingBlackBerry.cpp:
* platform/blackberry/PageClientBlackBerry.h:
(Platform):
(Graphics):
(WebCore):
* platform/blackberry/ParsedCookie.cpp:
(WebCore::ParsedCookie::appendWebCoreCookie):
* platform/blackberry/RenderThemeBlackBerry.cpp:
(WebCore::RenderThemeBlackBerry::paintSearchFieldCancelButton):
(WebCore::RenderThemeBlackBerry::paintButton):
(WebCore::RenderThemeBlackBerry::paintSliderThumb):
* platform/blackberry/SSLKeyGeneratorBlackBerry.cpp:
(WebCore::signedPublicKeyAndChallengeString):
* platform/blackberry/ScrollAnimatorBlackBerry.h:
2013-05-09 Chris Rogers <crogers@google.com>
Require use of AudioBus::create() to avoid ref-counting issues
https://bugs.webkit.org/show_bug.cgi?id=115836
Reviewed by Andreas Kling.
There were a couple of places still embedding raw AudioBus objects as
member variables or local variables causing ref-counting problems
now that AudioBus is ref-counted. Make AudioBus constructor private
to enforce use of AudioBus::create().
Adapted from Blink patch:
https://chromiumcodereview.appspot.com/14628008/
* Modules/webaudio/AudioDestinationNode.h:
(WebCore::AudioDestinationNode::LocalAudioInputProvider::LocalAudioInputProvider):
(WebCore::AudioDestinationNode::LocalAudioInputProvider::set):
(WebCore::AudioDestinationNode::LocalAudioInputProvider::provideInput):
(LocalAudioInputProvider):
* Modules/webaudio/AudioNodeInput.cpp:
(WebCore::AudioNodeInput::AudioNodeInput):
(WebCore::AudioNodeInput::updateInternalBus):
* Modules/webaudio/AudioNodeOutput.cpp:
(WebCore::AudioNodeOutput::AudioNodeOutput):
(WebCore::AudioNodeOutput::updateInternalBus):
* Modules/webaudio/AudioParam.cpp:
(WebCore::AudioParam::calculateFinalValues):
* Modules/webaudio/ConvolverNode.cpp:
(WebCore::ConvolverNode::setBuffer):
* Modules/webaudio/MediaStreamAudioDestinationNode.cpp:
(WebCore::MediaStreamAudioDestinationNode::MediaStreamAudioDestinationNode):
(WebCore::MediaStreamAudioDestinationNode::process):
* Modules/webaudio/MediaStreamAudioDestinationNode.h:
* Modules/webaudio/OfflineAudioDestinationNode.cpp:
(WebCore::OfflineAudioDestinationNode::OfflineAudioDestinationNode):
* Modules/webaudio/ScriptProcessorNode.cpp:
(WebCore::ScriptProcessorNode::ScriptProcessorNode):
(WebCore::ScriptProcessorNode::process):
* Modules/webaudio/ScriptProcessorNode.h:
(ScriptProcessorNode):
* platform/audio/AudioBus.cpp:
(WebCore::AudioBus::create):
(WebCore):
(WebCore::AudioBus::AudioBus):
(WebCore::AudioBus::createBufferFromRange):
(WebCore::AudioBus::createBySampleRateConverting):
(WebCore::AudioBus::createByMixingToMono):
* platform/audio/AudioBus.h:
(AudioBus):
* platform/audio/AudioFIFO.cpp:
(WebCore::AudioFIFO::AudioFIFO):
(WebCore::AudioFIFO::consume):
(WebCore::AudioFIFO::push):
* platform/audio/AudioFIFO.h:
(AudioFIFO):
* platform/audio/AudioPullFIFO.cpp:
(WebCore::AudioPullFIFO::AudioPullFIFO):
(WebCore::AudioPullFIFO::fillBuffer):
* platform/audio/AudioPullFIFO.h:
(AudioPullFIFO):
* platform/audio/AudioResampler.cpp:
(WebCore::AudioResampler::AudioResampler):
(WebCore::AudioResampler::configureChannels):
* platform/audio/MultiChannelResampler.cpp:
* platform/audio/Reverb.cpp:
(WebCore::Reverb::initialize):
* platform/audio/SincResampler.cpp:
(WebCore::SincResampler::consumeSource):
(WebCore):
* platform/audio/gstreamer/AudioDestinationGStreamer.cpp:
(WebCore::AudioDestinationGStreamer::AudioDestinationGStreamer):
* platform/audio/gstreamer/AudioDestinationGStreamer.h:
(AudioDestinationGStreamer):
* platform/audio/gstreamer/AudioFileReaderGStreamer.cpp:
(WebCore::AudioFileReader::createBus):
* platform/audio/ios/AudioDestinationIOS.cpp:
(WebCore::AudioDestinationIOS::AudioDestinationIOS):
(WebCore::AudioDestinationIOS::render):
* platform/audio/ios/AudioDestinationIOS.h:
(AudioDestinationIOS):
* platform/audio/mac/AudioDestinationMac.cpp:
(WebCore::AudioDestinationMac::AudioDestinationMac):
(WebCore::AudioDestinationMac::render):
* platform/audio/mac/AudioDestinationMac.h:
(AudioDestinationMac):
* platform/audio/mac/AudioFileReaderMac.cpp:
(WebCore::AudioFileReader::createBus):
2013-05-09 Alberto Garcia <agarcia@igalia.com>
[BlackBerry] Upstream the input popups
https://bugs.webkit.org/show_bug.cgi?id=114608
Reviewed by Rob Buis.
This patch contains contributions from many members of the
BlackBerry WebKit team, including:
Chris Hutten-Czapski
David Hoon
Jessica Cao
Rob Buis
Tiancheng Jiang
* Resources/blackberry/colorControlBlackBerry.css: Added.
(.color-picker-popup-area):
(.color-picker-content):
(.color-picker-block):
(#color-picker-swatch-block):
(.color-picker-switcher):
(.color-picker-check-mark):
(.color-picker-option):
(.color-picker-button):
(.color-picker-highlight):
(input):
(.color-picker-sharp):
(.color-picker-off):
(.color-picker-inactive-font):
(.color-picker-row):
(.color-picker-hex-style):
(.color-picker-input):
(.color-picker-well):
(.color-picker-input .color-picker-well):
(.color-picker-slider):
(.color-picker-slider-output):
(.color-picker-range):
(.color-picker-range::-webkit-slider-thumb):
(.color-picker-range::-webkit-slider-thumb:active):
(.red-ranger-bg):
(.green-ranger-bg):
(.blue-ranger-bg):
(@media only screen and (height: 768px)):
(@media only screen and (height: 720px)):
* Resources/blackberry/colorControlBlackBerry.js: Added.
(.):
* Resources/blackberry/popupControlBlackBerry.css:
(body):
(.popup-area):
(.popup-header):
(.popup-content):
(.popup-buttons):
(.popup-button):
(@media only screen and (width: 720px) and (height: 720px)):
* Resources/blackberry/selectControlBlackBerry.css:
(.popup-content):
(@media (min-height: 918px)):
(.option):
(@media only screen and (width: 720px) and (height: 720px)):
(.contents):
(.option:active):
(.selected):
(.selected .contents::after):
(.text):
(.disabled):
(.optgroup):
(.optgroup-option):
* Resources/blackberry/selectControlBlackBerry.js:
(.):
* Resources/blackberry/timeControlBlackBerry.css: Added.
(#popup-content-time):
(.column):
(.column:not(:last-child)):
(.cell):
(.yearmonthdate .cell div:last-child):
(.row-highlight-container):
(.row-highlight-filler):
(.row-highlight):
(.tall-bit):
(@media only screen and (width: 720px) and (height: 720px)):
* Resources/blackberry/timeControlBlackBerry.js: Added.
(.):
2013-05-09 Rob Buis <rbuis@rim.com>
[BlackBerry] texmap code generates warnings
https://bugs.webkit.org/show_bug.cgi?id=115815
Reviewed by Benjamin Poulain.
Add USE(TEXTURE_MAPPER) guards since Source/WebCore/CMakeLists.txt includes
these files unconditionally.
* platform/graphics/texmap/GraphicsLayerTextureMapper.cpp:
* platform/graphics/texmap/GraphicsLayerTextureMapper.h:
* platform/graphics/texmap/TextureMapper.h:
* platform/graphics/texmap/TextureMapperBackingStore.cpp:
* platform/graphics/texmap/TextureMapperBackingStore.h:
* platform/graphics/texmap/TextureMapperFPSCounter.cpp:
* platform/graphics/texmap/TextureMapperFPSCounter.h:
* platform/graphics/texmap/TextureMapperGL.cpp:
* platform/graphics/texmap/TextureMapperGL.h:
* platform/graphics/texmap/TextureMapperLayer.cpp:
* platform/graphics/texmap/TextureMapperLayer.h:
* platform/graphics/texmap/TextureMapperTile.cpp:
* platform/graphics/texmap/TextureMapperTile.h:
* platform/graphics/texmap/TextureMapperTiledBackingStore.cpp:
* platform/graphics/texmap/TextureMapperTiledBackingStore.h:
2013-05-09 Alberto Garcia <agarcia@igalia.com>
PluginDatabase: add plugin directory for the BlackBerry port.
https://bugs.webkit.org/show_bug.cgi?id=114943
Reviewed by Rob Buis.
XP_UNIX is defined for the BlackBerry port, but we don't want to
share the same code here.
* plugins/PluginDatabase.cpp:
(WebCore::PluginDatabase::defaultPluginDirectories):
(WebCore::PluginDatabase::isPreferredPluginDirectory):
2013-05-09 Seokju Kwon <seokju.kwon@gmail.com>
Web Inspector: Remove Memory Distribution and Memory Snapshots Panels
https://bugs.webkit.org/show_bug.cgi?id=115850
Reviewed by Andreas Kling.
Removed the Memory Instrumentation Code after r148921.
No new tests, no behavior change.
* inspector/compile-front-end.py:
* inspector/front-end/NativeMemorySnapshotView.js: Removed.
* inspector/front-end/ProfilesPanel.js:
(WebInspector.ProfilesPanel):
* inspector/front-end/Settings.js:
(WebInspector.Settings):
(WebInspector.ExperimentsSettings):
* inspector/front-end/SettingsScreen.js:
* inspector/front-end/WebKit.qrc:
* inspector/front-end/inspector.css:
* inspector/front-end/inspector.js:
(WebInspector._panelDescriptors):
* inspector/front-end/nativeMemoryProfiler.css: Removed.
2013-05-09 Zan Dobersek <zdobersek@igalia.com>
Unreviewed GTK build fix after r149796.
* GNUmakefile.am: Add a phony target for the window constructors file and include it among
the dependencies for the non-generated code.
2013-05-09 Christophe Dumez <ch.dumez@sisa.samsung.com>
Unreviewed build fix for Qt minimal build.
r149796 broke builds that have WEB_SOCKETS flag disabled.
* page/DOMWindow.idl:
2013-05-09 Christophe Dumez <ch.dumez@sisa.samsung.com>
Add support for [NoInterfaceObject] Web IDL extended attribute
https://bugs.webkit.org/show_bug.cgi?id=115714
Reviewed by Kentaro Hara.
*Constructor attributes on the global DOMWindow object are now automatically
generated for each non-callback interface that is not declared with the
[NoInterfaceObject] extended attribute. It is thus no longer needed for
developers to manually add *Constructor attributes for their new interfaces
unless they wish to register an "extra" constructor for their interface.
This patch does not modify at all the behavior on JS side. To achieve this,
[NoInterfaceObject] extended attribute is added to interfaces that should
not have it according to specification (e.g. History, Location, ...).
This can be improved later as the behavior should not change with this
patch.
No new tests, no behavior change.
* CMakeLists.txt:
* DerivedSources.make:
* DerivedSources.pri:
* GNUmakefile.am:
* GNUmakefile.list.am:
* Modules/battery/BatteryManager.idl:
* Modules/encryptedmedia/MediaKeyMessageEvent.idl:
* Modules/encryptedmedia/MediaKeyNeededEvent.idl:
* Modules/encryptedmedia/MediaKeySession.idl:
* Modules/encryptedmedia/MediaKeys.idl:
* Modules/filesystem/DOMFileSystem.idl:
* Modules/filesystem/DOMFileSystemSync.idl:
* Modules/filesystem/DirectoryEntry.idl:
* Modules/filesystem/DirectoryEntrySync.idl:
* Modules/filesystem/DirectoryReader.idl:
* Modules/filesystem/DirectoryReaderSync.idl:
* Modules/filesystem/Entry.idl:
* Modules/filesystem/EntryArray.idl:
* Modules/filesystem/EntryArraySync.idl:
* Modules/filesystem/EntrySync.idl:
* Modules/filesystem/FileEntry.idl:
* Modules/filesystem/FileEntrySync.idl:
* Modules/filesystem/FileWriter.idl:
* Modules/filesystem/FileWriterSync.idl:
* Modules/filesystem/Metadata.idl:
* Modules/gamepad/Gamepad.idl:
* Modules/gamepad/GamepadList.idl:
* Modules/geolocation/Coordinates.idl:
* Modules/geolocation/Geolocation.idl:
* Modules/geolocation/Geoposition.idl:
* Modules/geolocation/PositionError.idl:
* Modules/indexeddb/DOMWindowIndexedDatabase.idl:
* Modules/indexeddb/IDBAny.idl:
* Modules/mediasource/MediaSource.idl:
* Modules/mediasource/SourceBuffer.idl:
* Modules/mediasource/SourceBufferList.idl:
* Modules/mediastream/DOMWindowMediaStream.idl: Removed.
* Modules/mediastream/MediaStream.idl:
* Modules/mediastream/MediaStreamTrack.idl:
* Modules/mediastream/MediaStreamTrackEvent.idl:
* Modules/mediastream/NavigatorUserMediaError.idl:
* Modules/mediastream/RTCDTMFSender.idl:
* Modules/mediastream/RTCDTMFToneChangeEvent.idl:
* Modules/mediastream/RTCDataChannel.idl:
* Modules/mediastream/RTCDataChannelEvent.idl:
* Modules/mediastream/RTCIceCandidateEvent.idl:
* Modules/mediastream/RTCPeerConnection.idl:
* Modules/mediastream/RTCStatsReport.idl:
* Modules/mediastream/RTCStatsResponse.idl:
* Modules/networkinfo/NetworkInfoConnection.idl:
* Modules/notifications/DOMWindowNotifications.idl:
* Modules/notifications/NotificationCenter.idl:
* Modules/quota/StorageInfo.idl:
* Modules/quota/StorageQuota.idl:
* Modules/speech/DOMWindowSpeech.idl: Removed.
* Modules/speech/DOMWindowSpeechSynthesis.idl:
* Modules/speech/SpeechGrammar.idl:
* Modules/speech/SpeechGrammarList.idl:
* Modules/speech/SpeechRecognition.idl:
* Modules/speech/SpeechRecognitionAlternative.idl:
* Modules/speech/SpeechRecognitionError.idl:
* Modules/speech/SpeechRecognitionEvent.idl:
* Modules/speech/SpeechRecognitionResult.idl:
* Modules/speech/SpeechRecognitionResultList.idl:
* Modules/speech/SpeechSynthesis.idl:
* Modules/speech/SpeechSynthesisVoice.idl:
* Modules/webaudio/AnalyserNode.idl:
* Modules/webaudio/AudioBuffer.idl:
* Modules/webaudio/AudioBufferSourceNode.idl:
* Modules/webaudio/AudioContext.idl:
* Modules/webaudio/AudioDestinationNode.idl:
* Modules/webaudio/AudioListener.idl:
* Modules/webaudio/AudioNode.idl:
* Modules/webaudio/AudioParam.idl:
* Modules/webaudio/AudioSourceNode.idl:
* Modules/webaudio/BiquadFilterNode.idl:
* Modules/webaudio/ChannelMergerNode.idl:
* Modules/webaudio/ChannelSplitterNode.idl:
* Modules/webaudio/ConvolverNode.idl:
* Modules/webaudio/DOMWindowWebAudio.idl: Removed.
* Modules/webaudio/DelayNode.idl:
* Modules/webaudio/DynamicsCompressorNode.idl:
* Modules/webaudio/GainNode.idl:
* Modules/webaudio/MediaElementAudioSourceNode.idl:
* Modules/webaudio/MediaStreamAudioDestinationNode.idl:
* Modules/webaudio/MediaStreamAudioSourceNode.idl:
* Modules/webaudio/OfflineAudioContext.idl:
* Modules/webaudio/OscillatorNode.idl:
* Modules/webaudio/PannerNode.idl:
* Modules/webaudio/ScriptProcessorNode.idl:
* Modules/webaudio/WaveShaperNode.idl:
* Modules/webaudio/WaveTable.idl:
* Modules/webdatabase/DOMWindowWebDatabase.idl:
* Modules/webdatabase/Database.idl:
* Modules/webdatabase/DatabaseSync.idl:
* Modules/webdatabase/SQLError.idl:
* Modules/webdatabase/SQLResultSet.idl:
* Modules/webdatabase/SQLResultSetRowList.idl:
* Modules/webdatabase/SQLTransaction.idl:
* Modules/webdatabase/SQLTransactionSync.idl:
* Modules/websockets/DOMWindowWebSocket.idl: Removed.
* Modules/websockets/WebSocket.idl:
* PlatformBlackBerry.cmake:
* UseJSC.cmake:
* WebCore.xcodeproj/project.pbxproj:
* bindings/scripts/IDLAttributes.txt:
* bindings/scripts/IDLParser.pm:
(parseTypedef):
* bindings/scripts/preprocess-idls.pl:
(GenerateConstructorAttribute):
(getFileContents):
(getPartialInterfaceNameFromIDL):
(isCallbackInterfaceFromIDL):
(trim):
(getInterfaceExtendedAttributesFromIDL):
* css/CSSFontFaceLoadEvent.idl:
* css/CSSFontFaceRule.idl:
* css/CSSSupportsRule.idl:
* css/CSSUnknownRule.idl:
* css/DOMWindowCSS.idl:
* css/FontLoader.idl:
* css/MediaQueryList.idl:
* css/MediaQueryListListener.idl:
* css/StyleMedia.idl:
* dom/CustomElementConstructor.idl:
* dom/DOMError.idl:
* dom/DOMNamedFlowCollection.idl:
* dom/DataTransferItem.idl:
* dom/DataTransferItemList.idl:
* dom/EventListener.idl:
* dom/EventTarget.idl:
* dom/NodeIterator.idl:
* dom/ShadowRoot.idl:
* dom/TreeWalker.idl:
* dom/WebKitNamedFlow.idl:
* fileapi/FileException.idl:
* fileapi/FileReaderSync.idl:
* html/HTMLAudioElement.idl:
* html/HTMLDetailsElement.idl:
* html/HTMLOptionElement.idl:
* html/MediaError.idl:
* html/MediaKeyError.idl:
* html/MicroDataItemValue.idl:
* html/RadioNodeList.idl:
* html/ValidityState.idl:
* html/canvas/CanvasRenderingContext.idl:
* html/canvas/DOMPath.idl:
* html/canvas/EXTDrawBuffers.idl:
* html/canvas/EXTTextureFilterAnisotropic.idl:
* html/canvas/OESElementIndexUint.idl:
* html/canvas/OESStandardDerivatives.idl:
* html/canvas/OESTextureFloat.idl:
* html/canvas/OESTextureHalfFloat.idl:
* html/canvas/OESVertexArrayObject.idl:
* html/canvas/WebGLCompressedTextureATC.idl:
* html/canvas/WebGLCompressedTexturePVRTC.idl:
* html/canvas/WebGLCompressedTextureS3TC.idl:
* html/canvas/WebGLContextAttributes.idl:
* html/canvas/WebGLDebugRendererInfo.idl:
* html/canvas/WebGLDebugShaders.idl:
* html/canvas/WebGLDepthTexture.idl:
* html/canvas/WebGLLoseContext.idl:
* html/canvas/WebGLVertexArrayObjectOES.idl:
* html/track/AudioTrack.idl:
* html/track/AudioTrackList.idl:
* html/track/TextTrackRegionList.idl:
* html/track/VideoTrack.idl:
* html/track/VideoTrackList.idl:
* inspector/InjectedScriptHost.idl:
* inspector/InspectorFrontendHost.idl:
* inspector/JavaScriptCallFrame.idl:
* inspector/ScriptProfile.idl:
* inspector/ScriptProfileNode.idl:
* loader/appcache/DOMApplicationCache.idl:
* page/AbstractView.idl:
* page/BarInfo.idl:
* page/Console.idl:
* page/Crypto.idl:
* page/DOMSecurityPolicy.idl:
* page/DOMWindow.idl:
* page/History.idl:
* page/Location.idl:
* page/MemoryInfo.idl:
* page/Navigator.idl:
* page/PagePopupController.idl:
* page/Performance.idl:
* page/PerformanceEntry.idl:
* page/PerformanceEntryList.idl:
* page/PerformanceMark.idl:
* page/PerformanceMeasure.idl:
* page/PerformanceNavigation.idl:
* page/PerformanceResourceTiming.idl:
* page/PerformanceTiming.idl:
* page/Screen.idl:
* page/SpeechInputResult.idl:
* page/SpeechInputResultList.idl:
* page/WorkerNavigator.idl:
* page/make_settings.pl:
(generateInternalSettingsIdlFile):
* svg/ElementTimeControl.idl:
* svg/SVGAnimationElement.idl:
* svg/SVGExternalResourcesRequired.idl:
* svg/SVGFilterPrimitiveStandardAttributes.idl:
* svg/SVGFitToViewBox.idl:
* svg/SVGLangSpace.idl:
* svg/SVGLocatable.idl:
* svg/SVGStyledElement.idl:
* svg/SVGTests.idl:
* svg/SVGTransformable.idl:
* svg/SVGURIReference.idl:
* testing/InternalSettings.idl:
* testing/Internals.idl:
* testing/MallocStatistics.idl:
* testing/TypeConversions.idl:
* workers/AbstractWorker.idl:
* workers/DedicatedWorkerContext.idl:
* workers/SharedWorker.idl:
* workers/SharedWorkerContext.idl:
* workers/WorkerContext.idl:
* workers/WorkerLocation.idl:
* xml/XPathExpression.idl:
* xml/XPathNSResolver.idl:
2013-05-09 ChangSeok Oh <changseok.oh@collabora.com>
[GTK][AC] Buildfix after r149694
https://bugs.webkit.org/show_bug.cgi?id=115797
Reviewed by Gustavo Noronha Silva.
Some interfaces, such as a return value and parameters of functions are changed.
No new tests since no functionality changed.
* platform/graphics/clutter/GraphicsLayerClutter.cpp:
(WebCore::animationHasStepsTimingFunction):
(WebCore::GraphicsLayerClutter::timingFunctionForAnimationValue):
(WebCore::GraphicsLayerClutter::setTransformAnimationKeyframes):
(WebCore::GraphicsLayerClutter::setTransformAnimationEndpoints):
(WebCore::GraphicsLayerClutter::createTransformAnimationsFromKeyframes):
(WebCore::GraphicsLayerClutter::setAnimationEndpoints):
(WebCore::GraphicsLayerClutter::setAnimationKeyframes):
* platform/graphics/clutter/GraphicsLayerClutter.h:
(GraphicsLayerClutter):
2013-05-08 Rob Buis <rbuis@rim.com>
Fix some compiler warnings (miscellaneous)
https://bugs.webkit.org/show_bug.cgi?id=80790
Reviewed by Brent Fulgham.
Get rid of the following warning for BlackBerry:
NavigatorContentUtils.cpp:60:78: warning: comparison of unsigned expression < 0 is always false [-Wtype-limits]
by not compiling any of the code to add protocols to the protocol whitelist.
* Modules/navigatorcontentutils/NavigatorContentUtils.cpp:
(WebCore::initProtocolHandlerWhitelist):
2013-05-08 peavo@outlook.com <peavo@outlook.com>
[Windows] The function seekFile() is not implemented.
https://bugs.webkit.org/show_bug.cgi?id=115246
Reviewed by Brent Fulgham.
Implemented seekFile() function for Windows.
* platform/win/FileSystemWin.cpp:
(WebCore::seekFile):
2013-05-08 Seokju Kwon <seokju.kwon@gmail.com>
Web Inspector: Fix a typo in Settings.js
https://bugs.webkit.org/show_bug.cgi?id=115849
Reviewed by Joseph Pecoraro.
No new tests, no behavior change.
* inspector/front-end/Settings.js:
(WebInspector.Settings):
2013-05-08 Ryosuke Niwa <rniwa@webkit.org>
SecurityOrigin doesnt need to forward declare or include Document
https://bugs.webkit.org/show_bug.cgi?id=115847
Reviewed by Alexey Proskuryakov.
Merge https://chromium.googlesource.com/chromium/blink/+/fc7a88caa9c41f3471d8994a530643e5225f82fc.
Removed unused Document forward declaration+include from SecurityOrigin.
* page/SecurityOrigin.cpp:
* page/SecurityOrigin.h:
2013-05-08 David Kilzer <ddkilzer@apple.com>
BUILD FIX: Don't use adoptCF() with NSDictionary * object
Fixes the following build failure:
In file included from Source/WebCore/platform/network/mac/ResourceErrorMac.mm:27:
In file included from Source/WebCore/platform/network/cf/ResourceError.h:31:
/usr/local/include/wtf/RetainPtr.h:81:13: error: static_assert failed "Don't use adoptCF with Objective-C pointer types, use adoptNS."
static_assert(!std::is_convertible<T, id>::value, "Don't use adoptCF with Objective-C pointer types, use adoptNS.");
^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/local/include/wtf/RetainPtr.h:274:16: note: in instantiation of member function 'WTF::RetainPtr<NSDictionary *>::RetainPtr' requested here
return RetainPtr<T>(AdoptCF, o);
^
Source/WebCore/platform/network/mac/ResourceErrorMac.mm:214:44: note: in instantiation of function template specialization 'WTF::adoptCF<NSDictionary *>' requested here
RetainPtr<NSDictionary> userInfo = adoptCF((NSDictionary *) CFErrorCopyUserInfo(error));
^
1 error generated.
* platform/network/mac/ResourceErrorMac.mm:
(WebCore::ResourceError::nsError): Switch from adoptCF() to
adoptNS(). This is in USE(CFNETWORK) code, so it's not
exercised on the Mac.
2013-05-08 Ryosuke Niwa <rniwa@webkit.org>
Remove Editor::setSelectionOffsets
https://bugs.webkit.org/show_bug.cgi?id=115831
Reviewed by Andreas Kling.
Removed the function added in r120985 for Chromium Android port.
* editing/Editor.cpp:
* editing/Editor.h:
2013-05-07 Ryosuke Niwa <rniwa@webkit.org>
Potential use-after-free of Frame
https://bugs.webkit.org/show_bug.cgi?id=115774
Reviewed by Simon Fraser.
Merge https://chromium.googlesource.com/chromium/blink/+/c5b4a6db82e8280c7fc55ee3dc3a84c6b026e66e.
* page/Frame.cpp:
(WebCore::Frame::setPrinting):
(WebCore::Frame::setPageAndTextZoomFactors):
(WebCore::Frame::deviceOrPageScaleFactorChanged):
2013-05-08 Roger Fong <roger_fong@apple.com>
Unreviewed build fix, AppleWin port.
* platform/graphics/avfoundation/InbandTextTrackPrivateAVF.cpp:
* platform/graphics/avfoundation/InbandTextTrackPrivateAVF.h:
* platform/graphics/avfoundation/MediaPlayerPrivateAVFoundation.cpp:
(WebCore::MediaPlayerPrivateAVFoundation::MediaPlayerPrivateAVFoundation):
(WebCore::MediaPlayerPrivateAVFoundation::seek):
(WebCore::MediaPlayerPrivateAVFoundation::seekCompleted):
(WebCore::MediaPlayerPrivateAVFoundation::dispatchNotification):
(WebCore):
* platform/graphics/avfoundation/MediaPlayerPrivateAVFoundation.h:
(MediaPlayerPrivateAVFoundation):
2013-05-08 Xingnan Wang <xingnan.wang@intel.com>
Heap-use-after-free in WebCore::AudioNodeOutput::pull
https://bugs.webkit.org/show_bug.cgi?id=111362
Reviewed by Chris Rogers.
* Modules/webaudio/AudioBuffer.cpp:
(WebCore::AudioBuffer::createFromAudioFileData):
* Modules/webaudio/AudioNodeInput.cpp:
(WebCore::AudioNodeInput::AudioNodeInput):
(WebCore::AudioNodeInput::updateInternalBus):
* Modules/webaudio/AudioNodeInput.h:
(AudioNodeInput):
* Modules/webaudio/AudioNodeOutput.cpp:
(WebCore::AudioNodeOutput::AudioNodeOutput):
(WebCore::AudioNodeOutput::updateInternalBus):
(WebCore::AudioNodeOutput::pull):
(WebCore::AudioNodeOutput::bus):
* Modules/webaudio/AudioNodeOutput.h:
(AudioNodeOutput):
* Modules/webaudio/OfflineAudioDestinationNode.cpp:
(WebCore::OfflineAudioDestinationNode::OfflineAudioDestinationNode):
* Modules/webaudio/OfflineAudioDestinationNode.h:
(OfflineAudioDestinationNode):
* platform/audio/AudioBus.cpp:
(WebCore::AudioBus::createBufferFromRange):
(WebCore::AudioBus::createBySampleRateConverting):
(WebCore::AudioBus::createByMixingToMono):
* platform/audio/AudioBus.h:
(AudioBus):
* platform/audio/AudioFileReader.h:
(WebCore):
* platform/audio/AudioResampler.cpp:
(WebCore::AudioResampler::AudioResampler):
(WebCore::AudioResampler::configureChannels):
* platform/audio/AudioResampler.h:
(AudioResampler):
* platform/audio/HRTFElevation.cpp:
(WebCore::getConcatenatedImpulseResponsesForSubject):
(WebCore::HRTFElevation::calculateKernelsForAzimuthElevation):
* platform/audio/MultiChannelResampler.cpp:
* platform/audio/Reverb.cpp:
(WebCore::Reverb::initialize):
* platform/audio/Reverb.h:
(Reverb):
* platform/audio/efl/AudioBusEfl.cpp:
(WebCore::AudioBus::loadPlatformResource):
* platform/audio/gstreamer/AudioFileReaderGStreamer.cpp:
(AudioFileReader):
(WebCore::AudioFileReader::createBus):
(WebCore::createBusFromAudioFile):
(WebCore::createBusFromInMemoryAudioFile):
* platform/audio/gtk/AudioBusGtk.cpp:
(WebCore::AudioBus::loadPlatformResource):
* platform/audio/mac/AudioBusMac.mm:
(WebCore::AudioBus::loadPlatformResource):
* platform/audio/mac/AudioFileReaderMac.cpp:
(WebCore::AudioFileReader::createBus):
(WebCore::createBusFromAudioFile):
(WebCore::createBusFromInMemoryAudioFile):
* platform/audio/mac/AudioFileReaderMac.h:
(AudioFileReader):
* platform/audio/qt/AudioBusQt.cpp:
(WebCore::AudioBus::loadPlatformResource):
2013-05-08 Eli Fidler <efidler@blackberry.com>
[BlackBerry] Fix usage of BlackBerry::Platform::String
https://bugs.webkit.org/show_bug.cgi?id=115781
Reviewed by Rob Buis.
BlackBerry PRs 304193 and 327181
Internally Reviewed by Mike Lattanzio, Arvid Nilsson, Joe Mason, Jeff Rogers, and George Staikos
We currently have a problem where we're passing UTF-8 encoded data into
the char* constructors of BlackBerry::Platform::String. This means the string
thinks its data is not UTF-8.
* platform/blackberry/ClipboardBlackBerry.cpp:
(WebCore::ClipboardBlackBerry::setData):
(WebCore::ClipboardBlackBerry::writeURL):
(WebCore::ClipboardBlackBerry::writePlainText):
* platform/blackberry/CookieManager.cpp:
(WebCore::CookieManager::getRawCookies):
(WebCore::CookieManager::getBackingStoreCookies):
* platform/blackberry/CookieParser.cpp:
(WebCore::CookieParser::CookieParser):
(WebCore::CookieParser::parseOneCookie):
* platform/blackberry/CursorBlackBerry.cpp:
(WebCore::Cursor::Cursor):
* platform/blackberry/PlatformBlob.cpp:
(WebCore::PlatformBlob::nextDataItem):
* platform/blackberry/WorkerAsyncFileSystemBlackBerry.cpp:
(WebCore::WorkerAsyncFileSystemBlackBerry::openFileSystemOnMainThread):
(WebCore::WorkerAsyncFileSystemBlackBerry::deleteFileSystemOnMainThread):
(WebCore::WorkerAsyncFileSystemBlackBerry::moveOnMainThread):
(WebCore::WorkerAsyncFileSystemBlackBerry::copyOnMainThread):
(WebCore::WorkerAsyncFileSystemBlackBerry::removeOnMainThread):
(WebCore::WorkerAsyncFileSystemBlackBerry::removeRecursivelyOnMainThread):
(WebCore::WorkerAsyncFileSystemBlackBerry::readMetadataOnMainThread):
(WebCore::WorkerAsyncFileSystemBlackBerry::createFileOnMainThread):
(WebCore::WorkerAsyncFileSystemBlackBerry::createDirectoryOnMainThread):
(WebCore::WorkerAsyncFileSystemBlackBerry::fileExistsOnMainThread):
(WebCore::WorkerAsyncFileSystemBlackBerry::directoryExistsOnMainThread):
(WebCore::WorkerAsyncFileSystemBlackBerry::readDirectoryOnMainThread):
(WebCore::WorkerAsyncFileSystemBlackBerry::createWriterOnMainThread):
(WebCore::WorkerAsyncFileSystemBlackBerry::createSnapshotFileAndReadMetadataOnMainThread):
* platform/graphics/blackberry/ImageBlackBerry.cpp:
(WebCore::Image::loadPlatformResource):
* platform/graphics/blackberry/MediaPlayerPrivateBlackBerry.cpp:
(WebCore::MediaPlayerPrivate::load):
(WebCore::MediaPlayerPrivate::notifyChallengeResult):
(WebCore::toWebMediaStreamSource):
(WebCore::toWebMediaStreamDescriptor):
* platform/network/blackberry/NetworkManager.cpp:
(WebCore::NetworkManager::startJob):
* platform/network/blackberry/SocketStreamHandleBlackBerry.cpp:
(WebCore::SocketStreamHandle::SocketStreamHandle):
* platform/network/blackberry/rss/RSSFilterStream.cpp:
(WebCore::RSSFilterStream::notifyStatusReceived):
(WebCore::RSSFilterStream::notifyHeadersReceived):
(WebCore::RSSFilterStream::convertContentToHtml):
(WebCore::RSSFilterStream::charset):
(WebCore::RSSFilterStream::removeHeader):
(WebCore::RSSFilterStream::updateHeader):
(WebCore::RSSFilterStream::updateRSSHeaders):
* platform/network/blackberry/rss/RSSFilterStream.h:
* platform/text/blackberry/StringBlackBerry.cpp:
(WTF::String::operator BlackBerry::Platform::String):
2013-05-08 Anders Carlsson <andersca@apple.com>
Assert at compile time that we don't pass Objective-C object pointers to adoptCF
https://bugs.webkit.org/show_bug.cgi?id=115823
Reviewed by Geoffrey Garen.
* platform/graphics/ca/mac/TileController.mm:
(WebCore::TileController::TileController):
Use adoptNS for CALayer.
2013-05-08 Eric Carlson <eric.carlson@apple.com>
TextTrackCue should support empty content
https://bugs.webkit.org/show_bug.cgi?id=115821
Reviewed by Jer Noble.
Test: media/track/track-cue-empty-text-crash.html
* html/shadow/MediaControlElements.cpp:
(WebCore::MediaControlTextTrackContainerElement::updateDisplay): Don't bother trying to render
cues with no content.
* html/track/TextTrackCue.cpp:
(WebCore::TextTrackCue::getCueAsHTML): Return early if there isn't a node tree.
(WebCore::TextTrackCue::createCueRenderingTree): Ditto.
(WebCore::TextTrackCue::determineTextDirection): Ditto.
(WebCore::TextTrackCue::updateDisplayTree): Return early if there isn't a cue rendering tree.
2013-05-08 Roger Fong <roger_fong@apple.com>
Unreviewed AppleWin build fix.
* platform/graphics/avfoundation/cf/MediaPlayerPrivateAVFoundationCF.h:
(MediaPlayerPrivateAVFoundationCF):
(WebCore::MediaPlayerPrivateAVFoundationCF::currentTrack):
2013-05-08 José Dapena Paz <jdapena@igalia.com> and Zan Dobersek <zdobersek@igalia.com>
[GTK] Plumb the Automake build system for the Battery Status API feature
https://bugs.webkit.org/show_bug.cgi?id=115718
Reviewed by Martin Robinson.
No new tests - no new functionality. The feature is not enabled yet, though all the relevant tests
pass when it is.
* GNUmakefile.am: Add the Modules/battery directory to the list of search paths for header inclusions.
Include the same directory under the IDL_PATH variable so the IDL files it contains are processed.
List these IDL files using a wildcard under the EXTRA_DIST list.
* GNUmakefile.list.am: Add the build targets for the module source files, IDLs and resulting JS bindings.
* bindings/gobject/GNUmakefile.am: Add the build targets for the GObject DOM bindings.
2013-05-08 Roger Fong <roger_fong@apple.com>
Unreviewed. AppleWin VS2010 build fix.
* WebCore.vcxproj/WebCore.vcxproj:
* WebCore.vcxproj/WebCore.vcxproj.filters:
2013-05-08 Darin Adler <darin@apple.com>
REGRESSION(r149700): fast/css-generated-content/close-quote-negative-depth.html
https://bugs.webkit.org/show_bug.cgi?id=115776
Reviewed by Anders Carlsson.
I changed depth to more closely match what is in the CSS3 specification.
There may be a more optimal way to make it work, but this seems the most straightforward.
* rendering/RenderQuote.cpp:
(WebCore::RenderQuote::RenderQuote): Initialize m_depth to -1 because that depth
is consistent with the empty string that is the initial value of the text. The
real depth will be calculated when the node is attached.
(WebCore::RenderQuote::originalText): Removed the "depth - 1" logic that
used to be done for close quotes. Instead, the updateDepth function now correctly
subtracts one for the close quote itself, not just afterward. Also added an early
exit when the depth is negative; these changes together fix the bug.
(WebCore::RenderQuote::attachQuote): Added a call to updateDepth even for the render
quote head, we now need that to set the depth either to 0 or to -1.
(WebCore::RenderQuote::detachQuote): Removed code to set m_depth to 0; if we are not
resetting the text then m_depth should be left matching the text, otherwise updateDepth
might not do its job correctly if the quote is later re-attached. What matters is that
m_depth and the text are in sync.
(WebCore::RenderQuote::updateDepth): Changed updating logic in two ways. First,
compute the depth in a local variable rather than computing it in a data member
after first saving off the old value of the data member. That's clearer style.
Second, add the code to change negative depths to zero when propagating to the
next quote in the chain, which matches how the standard is written, and decrement
the depth of the close quote itself, not the quote after the close quote.
2013-05-08 Eric Carlson <eric.carlson@apple.com>
Prevent crash when track is deleted during video element deletion.
https://bugs.webkit.org/show_bug.cgi?id=106183
Reviewed by Dean Jackson.
Test: media/track/track-remove-crash.html
* html/HTMLMediaElement.cpp:
(WebCore::HTMLMediaElement::removedFrom): Set m_inActiveDocument to false so we
do not process text track cues or dispatch related events.
2013-05-08 Eric Carlson <eric.carlson@apple.com>
[Mac] Unreviewed buildfix after r149741.
* platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
(WebCore::MediaPlayerPrivateAVFoundationObjC::setClosedCaptionsVisible):
2013-05-08 Eric Carlson <eric.carlson@apple.com>
[Mac] Inband text tracks are not in track menu on Lion
https://bugs.webkit.org/show_bug.cgi?id=115740
Reviewed by Dean Jackson.
No new tests, covered by existing tests.
* html/HTMLMediaElement.cpp:
(WebCore::HTMLMediaElement::HTMLMediaElement): Remove m_legacyWebKitClosedCaptionsVisible.
(WebCore::HTMLMediaElement::setClosedCaptionsVisible): Set m_closedCaptionsVisible
to false immediately, it will be reset to the appropriate value if necessary.
(WebCore::HTMLMediaElement::setWebkitClosedCaptionsVisible): Remove m_legacyWebKitClosedCaptionsVisible.
(WebCore::HTMLMediaElement::webkitClosedCaptionsVisible): Remove m_legacyWebKitClosedCaptionsVisible.
* html/HTMLMediaElement.h:
* platform/graphics/avfoundation/InbandTextTrackPrivateAVF.cpp: Remove
HAVE(AVFOUNDATION_TEXT_TRACK_SUPPORT) requirement. AVFOUNDATION_TEXT_TRACK_SUPPORT ->
AVFOUNDATION_MEDIA_SELECTION_GROUP
* platform/graphics/avfoundation/InbandTextTrackPrivateAVF.h: Ditto.
* platform/graphics/avfoundation/MediaPlayerPrivateAVFoundation.cpp:
(WebCore::MediaPlayerPrivateAVFoundation::MediaPlayerPrivateAVFoundation): Ditto.
(WebCore::MediaPlayerPrivateAVFoundation::seek): Ditto.
(WebCore::MediaPlayerPrivateAVFoundation::seekCompleted): Ditto.
(WebCore::MediaPlayerPrivateAVFoundation::dispatchNotification): Ditto.
(WebCore::MediaPlayerPrivateAVFoundation::trackModeChanged): Ditto.
* platform/graphics/avfoundation/MediaPlayerPrivateAVFoundation.h: Ditto.
* platform/graphics/avfoundation/objc/InbandTextTrackPrivateLegacyAVFObjC.h: Ditto.
* platform/graphics/avfoundation/objc/InbandTextTrackPrivateLegacyAVFObjC.mm:
(WebCore::InbandTextTrackPrivateLegacyAVFObjC::kind): Don't look at media characteristics,
a legacy CC track is always Captions.
(WebCore::InbandTextTrackPrivateLegacyAVFObjC::isClosedCaptions): Ditto.
(WebCore::InbandTextTrackPrivateLegacyAVFObjC::containsOnlyForcedSubtitles): Ditto.
(WebCore::InbandTextTrackPrivateLegacyAVFObjC::isMainProgramContent): Ditto.
(WebCore::InbandTextTrackPrivateLegacyAVFObjC::isEasyToRead): Ditto.
(WebCore::InbandTextTrackPrivateLegacyAVFObjC::label): Use different AVFoundation API on 10.7.
* platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.h:
* platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
(WebCore::MediaPlayerPrivateAVFoundationObjC::MediaPlayerPrivateAVFoundationObjC): AVFOUNDATION_TEXT_TRACK_SUPPORT ->
AVFOUNDATION_MEDIA_SELECTION_GROUP.
(WebCore::MediaPlayerPrivateAVFoundationObjC::cancelLoad): Ditto.
(WebCore::MediaPlayerPrivateAVFoundationObjC::setClosedCaptionsVisible): Do nothing. AVFOUNDATION_TEXT_TRACK_SUPPORT ->
AVFOUNDATION_MEDIA_SELECTION_GROUP.
(WebCore::MediaPlayerPrivateAVFoundationObjC::tracksChanged): Support legacy CC tracks
only on 10.8. AVFOUNDATION_TEXT_TRACK_SUPPORT -> AVFOUNDATION_MEDIA_SELECTION_GROUP
(WebCore::MediaPlayerPrivateAVFoundationObjC::processLegacyClosedCaptionsTracks): Ditto.
(WebCore::MediaPlayerPrivateAVFoundationObjC::setCurrentTrack): Ditto.
(WebCore::MediaPlayerPrivateAVFoundationObjC::languageOfPrimaryAudioTrack): AVFOUNDATION_TEXT_TRACK_SUPPORT ->
AVFOUNDATION_MEDIA_SELECTION_GROUP
2013-05-08 Sergio Villar Senin <svillar@igalia.com>
Allow blank spaces before colon (:) on CSS variable definition
https://bugs.webkit.org/show_bug.cgi?id=115802
Reviewed by Darin Adler.
Test: css3/css-variable-definition.html
Modified the grammar to allow blank spaces before the colon on CSS
variable definitions.
* css/CSSGrammar.y.in:
2013-05-08 Gustavo Noronha Silva <gustavo.noronha@collabora.com>
[GStreamer] Does memory buffering even with preload set to none
https://bugs.webkit.org/show_bug.cgi?id=115754
Reviewed by Philippe Normand.
Covered by existing tests.
Revision 148840 fixed on-disk buffering being done when preload is set to none,
but memory buffering is still being done. That is because setting the state to
paused causes GStreamer to start loading the media, to gather information. Only
doing that when committing the load avoids that while maintaining the tested
behaviour unchanged.
* platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:
(WebCore::MediaPlayerPrivateGStreamer::load): move setting pause state to commitLoad.
(WebCore::MediaPlayerPrivateGStreamer::commitLoad): see above.
2013-05-08 Andreas Kling <akling@apple.com>
SVGStyledElement::getPresentationAttribute() does not need to be virtual.
From Blink r149888 by <cevans@chromium.org>
<http://src.chromium.org/viewvc/blink?view=revision&revision=149888>
* svg/SVGStyledElement.h:
2013-05-08 Allan Sandfeld Jensen <allan.jensen@digia.com>
Crash when loading link to audio file
https://bugs.webkit.org/show_bug.cgi?id=115794
Reviewed by Jocelyn Turcotte.
Do not access a null pointer frame.
* loader/appcache/ApplicationCacheHost.cpp:
(WebCore::ApplicationCacheHost::isApplicationCacheEnabled):
2013-05-08 Christophe Dumez <ch.dumez@sisa.samsung.com>
Remove unused [TransferList] extended attribute
https://bugs.webkit.org/show_bug.cgi?id=115788
Reviewed by Kentaro Hara.
Remove [TransferList] extended attribute and corresponding tests as it has no
effect on the generated JSC bindings.
No new tests, no behavior change.
* bindings/scripts/IDLAttributes.txt:
* bindings/scripts/test/CPP/WebDOMTestSerializedScriptValueInterface.cpp:
* bindings/scripts/test/CPP/WebDOMTestSerializedScriptValueInterface.h:
(WebDOMTestSerializedScriptValueInterface):
* bindings/scripts/test/CPP/WebDOMTestTypedefs.cpp:
* bindings/scripts/test/CPP/WebDOMTestTypedefs.h:
(WebDOMTestTypedefs):
* bindings/scripts/test/GObject/WebKitDOMTestSerializedScriptValueInterface.cpp:
* bindings/scripts/test/GObject/WebKitDOMTestSerializedScriptValueInterface.h:
* bindings/scripts/test/GObject/WebKitDOMTestTypedefs.cpp:
* bindings/scripts/test/GObject/WebKitDOMTestTypedefs.h:
* bindings/scripts/test/JS/JSTestSerializedScriptValueInterface.cpp:
(WebCore):
(WebCore::JSTestSerializedScriptValueInterfaceConstructor::finishCreation):
* bindings/scripts/test/JS/JSTestSerializedScriptValueInterface.h:
(JSTestSerializedScriptValueInterfacePrototype):
(JSTestSerializedScriptValueInterfaceConstructor):
* bindings/scripts/test/JS/JSTestTypedefs.cpp:
(WebCore):
* bindings/scripts/test/JS/JSTestTypedefs.h:
(WebCore):
* bindings/scripts/test/ObjC/DOMTestSerializedScriptValueInterface.h:
* bindings/scripts/test/ObjC/DOMTestSerializedScriptValueInterface.mm:
* bindings/scripts/test/ObjC/DOMTestTypedefs.h:
* bindings/scripts/test/ObjC/DOMTestTypedefs.mm:
* bindings/scripts/test/TestSerializedScriptValueInterface.idl:
* bindings/scripts/test/TestTypedefs.idl:
2013-05-08 Dongseong Hwang <dongseong.hwang@intel.com>
Make optional arguments in CanvasRenderingContext2D match the spec.
https://bugs.webkit.org/show_bug.cgi?id=115723
Reviewed by Dean Jackson.
WebKit r98985 set many arguments optional although the canvas spec[1] does not
indicate. So this patch corrects CanvasRenderingContext2D.idl to match the spec.
[1] http://www.w3.org/html/wg/drafts/2dcontext/html5_canvas/
Covered by existing tests:
canvas/philip/tests/2d.missingargs.html
fast/canvas/canvas-overloads-strokeRect.html
inspector/profiler/canvas2d/canvas2d-profiler-capturing-basics.html
* html/canvas/CanvasRenderingContext2D.idl:
2013-05-08 Ryosuke Niwa <rniwa@webkit.org>
Remove unused method and de-virtualize others in Element.h
https://bugs.webkit.org/show_bug.cgi?id=115770
Reviewed by Andreas Kling.
Merge https://chromium.googlesource.com/chromium/blink/+/c2c2ff9cb69f46f5cc9d289b2bfbdb8ab5bd3e49
The de-virtualization possibilities were noted whilst "FINALizing" the Node
hierarchy. If a method is successfully marked FINAL but then fails when marked
OVERRIDE as well, the method by definition does not need to be virtual.
* WebCore.exp.in:
* dom/Element.h:
(WebCore::Element::hasAuthorShadowRoot):
2013-05-06 Darin Adler <darin@apple.com>
Use adoptCF and adoptNS in more places
https://bugs.webkit.org/show_bug.cgi?id=115657
Reviewed by Sam Weinig.
This is similar to my last set of changes, but covers code that I missed with
global replace using the Safari Xcode workspace.
* platform/cf/win/CertificateCFWin.cpp:
(WebCore::copyCertificateToData):
* platform/graphics/avfoundation/cf/MediaPlayerPrivateAVFoundationCF.cpp:
(WebCore::MediaPlayerPrivateAVFoundationCF::platformBufferedTimeRanges):
(WebCore::MediaPlayerPrivateAVFoundationCF::platformMinTimeSeekable):
(WebCore::MediaPlayerPrivateAVFoundationCF::platformMaxTimeSeekable):
(WebCore::MediaPlayerPrivateAVFoundationCF::platformMaxTimeLoaded):
(WebCore::MediaPlayerPrivateAVFoundationCF::totalBytes):
(WebCore::mimeTypeCache):
(WebCore::MediaPlayerPrivateAVFoundationCF::tracksChanged):
(WebCore::MediaPlayerPrivateAVFoundationCF::sizeChanged):
(WebCore::AVFWrapper::createAssetForURL):
(WebCore::AVFWrapper::createPlayer):
(WebCore::AVFWrapper::createPlayerItem):
(WebCore::AVFWrapper::setAsset):
(WebCore::AVFWrapper::platformLayer):
(WebCore::AVFWrapper::createAVCFVideoLayer):
(WebCore::AVFWrapper::createImageGenerator):
* platform/graphics/avfoundation/objc/InbandTextTrackPrivateLegacyAVFObjC.mm:
(WebCore::InbandTextTrackPrivateLegacyAVFObjC::language):
* platform/graphics/ca/win/PlatformCAAnimationWin.cpp:
(toCACFTimingFunction):
(PlatformCAAnimation::PlatformCAAnimation):
(PlatformCAAnimation::setFromValue):
(PlatformCAAnimation::setToValue):
(PlatformCAAnimation::setValues):
(PlatformCAAnimation::setKeyTimes):
(PlatformCAAnimation::setTimingFunctions):
* platform/graphics/ca/win/PlatformCALayerWin.cpp:
(PlatformCALayer::PlatformCALayer):
(PlatformCALayer::setBackgroundColor):
(PlatformCALayer::setBorderColor):
* platform/graphics/ca/win/PlatformCALayerWinInternal.cpp:
(PlatformCALayerWinInternal::PlatformCALayerWinInternal):
(PlatformCALayerWinInternal::addTile):
* platform/graphics/ca/win/WKCACFViewLayerTreeHost.cpp:
(WebCore::WKCACFViewLayerTreeHost::WKCACFViewLayerTreeHost):
* platform/graphics/gstreamer/PlatformVideoWindowMac.mm:
(PlatformVideoWindow::PlatformVideoWindow):
* platform/graphics/win/FontCustomPlatformData.cpp:
(WebCore::FontCustomPlatformData::fontPlatformData):
* platform/graphics/win/FontPlatformDataCGWin.cpp:
(WebCore::getPostScriptName):
(WebCore::FontPlatformData::platformDataInit):
* platform/graphics/win/GraphicsContextCGWin.cpp:
(WebCore::GraphicsContext::drawWindowsBitmap):
* platform/graphics/win/ImageCGWin.cpp:
(WebCore::BitmapImage::create):
* platform/graphics/win/MediaPlayerPrivateFullscreenWindow.cpp:
(WebCore::MediaPlayerPrivateFullscreenWindow::setRootChildLayer):
* platform/graphics/win/MediaPlayerPrivateQuickTimeVisualContext.cpp:
(WebCore::MediaPlayerPrivateQuickTimeVisualContext::rfc2616DateStringFromTime):
(WebCore::QTCFDictionaryCreateWithDataCallback):
(WebCore::MediaPlayerPrivateQuickTimeVisualContext::retrieveCurrentImage):
* platform/graphics/win/WKCAImageQueue.cpp:
(WebCore::WKCAImageQueue::WKCAImageQueue):
* platform/image-decoders/ImageDecoder.h:
(WebCore::ImageDecoder::qcmsOutputDeviceProfile):
* platform/network/cf/AuthenticationCF.cpp:
(WebCore::core):
* platform/network/cf/CookieJarCFNet.cpp:
(WebCore::cookieDomain):
(WebCore::cookieName):
(WebCore::cookiePath):
(WebCore::cookieValue):
(WebCore::filterCookies):
(WebCore::setCookiesFromDOM):
(WebCore::cookiesForDOM):
(WebCore::cookieRequestHeaderFieldValue):
(WebCore::getRawCookies):
(WebCore::deleteCookie):
(WebCore::getHostnamesWithCookies):
(WebCore::deleteCookiesForHostname):
* platform/network/curl/ResourceHandleManager.cpp:
(WebCore::certificatePath):
* platform/win/ClipboardUtilitiesWin.cpp:
(WebCore::urlFromPath):
(WebCore::getURL):
* platform/win/LocalizedStringsWin.cpp:
(WebCore::createWebKitBundle):
(WebCore::localizedString):
* platform/win/SearchPopupMenuWin.cpp:
(WebCore::SearchPopupMenuWin::saveRecentSearches):
(WebCore::SearchPopupMenuWin::loadRecentSearches):
* plugins/mac/PluginPackageMac.cpp:
(WebCore::stringListFromResourceId):
(WebCore::PluginPackage::fetchInfo):
(WebCore::PluginPackage::load):
* plugins/mac/PluginViewMac.mm:
(WebCore::PluginView::platformStart):
* rendering/RenderThemeSafari.cpp:
(WebCore::RenderThemeSafari::platformFocusRingColor):
(WebCore::RenderThemeSafari::paintMenuListButtonGradients):
(WebCore::RenderThemeSafari::paintSliderTrack):
Use adoptCF and adoptNS throughout.
2013-05-07 Benjamin Poulain <bpoulain@apple.com>
Make CanvasStyle's CMYKAValues allocated on the heap and move the pointer in the union.
https://bugs.webkit.org/show_bug.cgi?id=115764
Reviewed by Andreas Kling.
CMYKA input is uncommon enough that we should not pay the price for
every CanvasStyle.
Make those values heap allocated and put the pointer in the union. Since
the RGBA32 values are needed for CMYKA, a RGBA32 value is added to the structure.
* html/canvas/CanvasStyle.cpp:
(WebCore::CanvasStyle::CanvasStyle):
(WebCore::CanvasStyle::~CanvasStyle):
(WebCore::CanvasStyle::isEquivalentColor):
(WebCore::CanvasStyle::isEquivalentCMYKA):
(WebCore::CanvasStyle::applyStrokeColor):
(WebCore::CanvasStyle::applyFillColor):
* html/canvas/CanvasStyle.h:
(CanvasStyle):
(CMYKAValues):
(WebCore::CanvasStyle::CMYKAValues::CMYKAValues):
(WebCore::CanvasStyle::color):
(WebCore):
2013-05-07 Darin Adler <darin@apple.com>
Use OwnPtr instead of deleteAllValues for requests in PluginView
https://bugs.webkit.org/show_bug.cgi?id=115731
Reviewed by Sam Weinig.
* plugins/PluginView.cpp:
(WebCore::PluginView::~PluginView): Removed the call to deleteAllValues.
(WebCore::PluginView::requestTimerFired): Use release to remove an OwnPtr
from m_requests rather than an explicit delete. Also use !isEmpty instead
of size > 0.
(WebCore::PluginView::scheduleRequest): Changed argument type to PassOwnPtr.
(WebCore::PluginView::load): Use adoptPtr to call scheduleRequest.
* plugins/PluginView.h: Changed argument type of scheduleRequest to
PassOwnPtr, and m_requests to a Vector<OwnPtr>.
2013-05-07 Antti Koivisto <antti@apple.com>
Remove SelectRuleFeatureSet
https://bugs.webkit.org/show_bug.cgi?id=115757
Reviewed by Benjamin Poulain.
This is dead code.
* CMakeLists.txt:
* GNUmakefile.list.am:
* Target.pri:
* WebCore.exp.in:
* WebCore.vcproj/WebCore.vcproj:
* WebCore.xcodeproj/project.pbxproj:
* dom/Element.cpp:
(WebCore::Element::attributeChanged):
(WebCore):
(WebCore::Element::didAffectSelector):
* dom/Element.h:
(Element):
* dom/ElementShadow.h:
(WebCore::ElementShadow::invalidateDistribution):
* html/shadow/ContentDistributor.cpp:
(WebCore::ContentDistributor::ContentDistributor):
(WebCore):
* html/shadow/ContentDistributor.h:
(ContentDistributor):
* html/shadow/InsertionPoint.cpp:
(WebCore::InsertionPoint::insertedInto):
(WebCore::InsertionPoint::removedFrom):
* html/shadow/InsertionPoint.h:
(InsertionPoint):
* html/shadow/SelectRuleFeatureSet.cpp: Removed.
* html/shadow/SelectRuleFeatureSet.h: Removed.
* testing/Internals.cpp:
(WebCore):
* testing/Internals.idl:
2013-05-07 Anders Carlsson <andersca@apple.com>
Store the quotes in the same allocation as the QuotesData object
https://bugs.webkit.org/show_bug.cgi?id=115768
Reviewed by Andreas Kling.
Since the QuotesData object is immutable we don't need a Vector to store the quote pairs,
they can just be stored after the class data.
* rendering/style/QuotesData.cpp:
(WebCore::sizeForQuotesDataWithQuoteCount):
Helper function for computing the allocation size.
(WebCore::QuotesData::create):
Use fastMalloc + placement new.
(WebCore::QuotesData::QuotesData):
Use placement new to allocate the quote pairs.
(WebCore::QuotesData::~QuotesData):
Destroy the quote pairs.
(WebCore::QuotesData::openQuote):
Stop using Vector.
(WebCore::QuotesData::closeQuote):
Ditto.
(WebCore::operator==):
Ditto.
* rendering/style/QuotesData.h:
2013-05-07 Benjamin Poulain <bpoulain@apple.com>
We should not ref() the RefPtr twice in CanvasStyle
Reviewed by Darin Adler.
* html/canvas/CanvasStyle.cpp:
(WebCore::CanvasStyle::CanvasStyle):
We leak the ref of PassRefPtr, we should not ref() it a second time.
2013-05-07 Ryosuke Niwa <rniwa@webkit.org>
Devirtualize Document class type checking
https://bugs.webkit.org/show_bug.cgi?id=115755
Reviewed by Benjamin Poulain.
Merge https://chromium.googlesource.com/chromium/blink/+/dae5adc768d5ce6bff301df6515745da8ea24950
Document has a bunch of virtual bool is*Document() methods on it, but it also has
two bools for XHTML and HTML documents which is silly. We can merge them all
together into an enum of values and devirtualize the type checking methods.
* dom/Document.cpp:
(WebCore::Document::Document):
(WebCore::Document::createElement):
* dom/Document.h:
(WebCore::Document::create):
(WebCore::Document::createXHTML):
(WebCore::Document::isHTMLDocument):
(WebCore::Document::isXHTMLDocument):
(WebCore::Document::isImageDocument):
(WebCore::Document::isSVGDocument):
(WebCore::Document::isPluginDocument):
(WebCore::Document::isMediaDocument):
(WebCore::Document):
* html/HTMLDocument.cpp:
(WebCore::HTMLDocument::HTMLDocument):
* html/HTMLDocument.h:
(WebCore::HTMLDocument):
* html/ImageDocument.cpp:
(WebCore::ImageDocument::ImageDocument):
* html/ImageDocument.h:
(WebCore::ImageDocument):
* html/MediaDocument.cpp:
(WebCore::MediaDocument::MediaDocument):
* html/MediaDocument.h:
(WebCore::MediaDocument):
* html/PluginDocument.cpp:
(WebCore::PluginDocument::PluginDocument):
* html/PluginDocument.h:
(WebCore::PluginDocument):
* loader/PlaceholderDocument.h:
(WebCore::PlaceholderDocument::PlaceholderDocument):
* svg/SVGDocument.cpp:
(WebCore::SVGDocument::SVGDocument):
* svg/SVGDocument.h:
(WebCore::SVGDocument):
2013-05-07 Anders Carlsson <andersca@apple.com>
Begin unraveling the mess that is QuotesData
https://bugs.webkit.org/show_bug.cgi?id=115765
Reviewed by Andreas Kling.
Change QuotesData to be an immutable object and fix other things that are broken.
* css/StyleResolver.cpp:
(WebCore::StyleResolver::applyProperty):
QuotesData::addPair is gone. Instead, create the Vector up front and pass it to QuotesData.
* rendering/RenderQuote.cpp:
(WebCore::RenderQuote::originalText):
Update for renames.
* rendering/style/QuotesData.cpp:
(WebCore::QuotesData::create):
Remove the create overload that wasn't used. Add a new create overload that takes a Vector.
(WebCore::QuotesData::openQuote):
Rename this from getOpenQuote and clean it up.
(WebCore::QuotesData::closeQuote):
Rename this from getCloseQuote and clean it up.
(WebCore::operator==):
Replace the equals member function with a proper equality operator.
* rendering/style/RenderStyle.cpp:
(WebCore::RenderStyle::diff):
Stop calling QuotesData::equals. Use the same idiom as used for other properties.
(WebCore::RenderStyle::setQuotes):
* rendering/style/StyleRareInheritedData.cpp:
Use operator==.
(WebCore::quotesDataEquivalent):
Add helper function.
(WebCore::StyleRareInheritedData::operator==):
Call quotesDataEquivalent.
2013-05-06 Enrica Casucci <enrica@apple.com>
Support -webkit-system-font on OS X.
https://bugs.webkit.org/show_bug.cgi?id=115758
<rdar://problem/13433854>
Reviewed by Dean Jackson.
Test: platform/mac/fast/text/systemFont.html
* platform/mac/WebFontCache.mm:
(+[WebFontCache internalFontWithFamily:traits:weight:size:]):
2013-05-07 Benjamin Poulain <bpoulain@apple.com>
Move CanvasGradient and CanvasPattern in the union of CanvasStyle
https://bugs.webkit.org/show_bug.cgi?id=115759
Reviewed by Andreas Kling.
The Gradient and Pattern are exclusive with the other values, but they
were left out of the union because they are ref-counted.
This patch moves them in the union, and simply does the ref-counting manually.
* html/canvas/CanvasStyle.cpp:
(WebCore::CanvasStyle::CanvasStyle):
(WebCore::CanvasStyle::~CanvasStyle):
* html/canvas/CanvasStyle.h:
(CanvasStyle):
(WebCore::CanvasStyle::canvasGradient):
(WebCore::CanvasStyle::canvasPattern):
2013-05-07 Anders Carlsson <andersca@apple.com>
Remove custom allocator support from PODArena
https://bugs.webkit.org/show_bug.cgi?id=115762
Reviewed by Andreas Kling.
Nobody uses PODArena with a custom allocator, so just get rid of it and always use fastMalloc/fastFree.
* platform/PODArena.h:
(WebCore::PODArena::PODArena):
(WebCore::PODArena::allocateBase):
(WebCore::PODArena::Chunk::Chunk):
(WebCore::PODArena::Chunk::~Chunk):
(Chunk):
* platform/PODFreeListArena.h:
(WebCore::PODFreeListArena::allocate):
(WebCore::PODFreeListArena::FreeListChunk::FreeListChunk):
2013-05-07 Anders Carlsson <andersca@apple.com>
Clean up KeyframeValueList and related classes
https://bugs.webkit.org/show_bug.cgi?id=115738
Reviewed by Simon Fraser.
Add static create() functions to the AnimationValue subclasses, and change a bunch of parameters
and return values that can never be null from pointer types to reference types to better indicate this.
* platform/graphics/GraphicsLayer.cpp:
(WebCore::filterOperationsAt):
(WebCore::GraphicsLayer::validateFilterOperations):
(WebCore::operationsAt):
(WebCore::GraphicsLayer::validateTransformOperations):
* platform/graphics/GraphicsLayer.h:
(AnimationValue):
(WebCore::AnimationValue::AnimationValue):
(WebCore::FloatAnimationValue::create):
(FloatAnimationValue):
(WebCore::FloatAnimationValue::FloatAnimationValue):
(WebCore::TransformAnimationValue::create):
(TransformAnimationValue):
(WebCore::TransformAnimationValue::value):
(WebCore::TransformAnimationValue::TransformAnimationValue):
(WebCore::FilterAnimationValue::create):
(WebCore::FilterAnimationValue::value):
(WebCore::FilterAnimationValue::FilterAnimationValue):
(FilterAnimationValue):
(WebCore::KeyframeValueList::~KeyframeValueList):
(KeyframeValueList):
(WebCore::KeyframeValueList::at):
* platform/graphics/ca/GraphicsLayerCA.cpp:
(WebCore::animationHasStepsTimingFunction):
(WebCore::GraphicsLayerCA::createTransformAnimationsFromKeyframes):
(WebCore::GraphicsLayerCA::createFilterAnimationsFromKeyframes):
(WebCore::GraphicsLayerCA::timingFunctionForAnimationValue):
(WebCore::GraphicsLayerCA::setAnimationEndpoints):
(WebCore::GraphicsLayerCA::setAnimationKeyframes):
(WebCore::GraphicsLayerCA::setTransformAnimationEndpoints):
(WebCore::GraphicsLayerCA::setTransformAnimationKeyframes):
(WebCore::GraphicsLayerCA::setFilterAnimationEndpoints):
(WebCore::GraphicsLayerCA::setFilterAnimationKeyframes):
* platform/graphics/ca/GraphicsLayerCA.h:
(GraphicsLayerCA):
* rendering/RenderLayerBacking.cpp:
(WebCore::RenderLayerBacking::startAnimation):
(WebCore::RenderLayerBacking::startTransition):
2013-05-07 Anders Carlsson <andersca@apple.com>
Add and remove databases and origins from the database tracker
https://bugs.webkit.org/show_bug.cgi?id=115752
Reviewed by Andreas Kling.
Add symbols needed by WebKit2.
* WebCore.exp.in:
2013-05-07 Beth Dakin <bdakin@apple.com>
Still possible to fire paint-related LayoutMilestones before CA has committed the
changes
https://bugs.webkit.org/show_bug.cgi?id=115753
-and corresponding-
<rdar://problem/13822315>
Reviewed by Simon Fraser.
To ensure we wait for the CA commit, we should wait until the end of the runloop
with a zero-delay timer.
* rendering/RenderLayerCompositor.cpp:
(WebCore::RenderLayerCompositor::RenderLayerCompositor):
(WebCore::RenderLayerCompositor::flushPendingLayerChanges):
(WebCore::RenderLayerCompositor::paintRelatedMilestonesTimerFired):
(WebCore):
* rendering/RenderLayerCompositor.h:
(RenderLayerCompositor):
2013-05-07 Chris Fleizach <cfleizach@apple.com>
Bug 115694 - Fix bad cast to RenderHTMLCanvas
https://bugs.webkit.org/show_bug.cgi?id=115694
Reviewed by Ryosuke Niwa.
Don't cast to RenderHTML until we check what kind of object it is.
* accessibility/AccessibilityRenderObject.cpp:
(WebCore::AccessibilityRenderObject::computeAccessibilityIsIgnored):
2013-05-07 Anders Carlsson <andersca@apple.com>
The storage database tracker should know when databases come and go
https://bugs.webkit.org/show_bug.cgi?id=115748
Reviewed by Andreas Kling.
Export symbol needed by WebKit2.
* WebCore.exp.in:
2013-05-07 Darin Adler <darin@apple.com>
Use OwnPtr instead of deleteAllValues in SVGResourcesCache
https://bugs.webkit.org/show_bug.cgi?id=115729
Reviewed by Benjamin Poulain.
* rendering/svg/SVGResourcesCache.cpp:
(WebCore::SVGResourcesCache::~SVGResourcesCache): Removed call to deleteAllValues.
(WebCore::SVGResourcesCache::addResourcesFromRenderObject): Use adoptPtr and release
to create new SVGResources object.
(WebCore::SVGResourcesCache::removeResourcesFromRenderObject): Use take to remove
the SVGResources from the map rather than a get combined with delete/take.
(WebCore::SVGResourcesCache::cachedResourcesForRenderObject): Removed unneeded
call to contains, since get already returns 0 if there is no item in the map.
(WebCore::SVGResourcesCache::resourceDestroyed): Use typedef for the map type so
we don't have to repeat the type.
* rendering/svg/SVGResourcesCache.h: Added typedef CacheMap, and changed value
type to OwnPtr.
2013-05-07 Anders Carlsson <andersca@apple.com>
REGRESSION(r149647): Assertion failure in LocalStorageDatabaseTracker::setLocalStorageDirectoryInternal
https://bugs.webkit.org/show_bug.cgi?id=115711
Reviewed by Andreas Kling.
Export SQLiteDatabase::close.
* WebCore.exp.in:
2013-05-06 Ryosuke Niwa <rniwa@webkit.org>
Add an 'isReadOnly' member to IDL parse tree structure
https://bugs.webkit.org/show_bug.cgi?id=115704
Reviewed by Kentaro Hara.
Add an 'isReadOnly' member to IDL parse tree structure by merging
https://chromium.googlesource.com/chromium/blink/+/d6add80ecd08bcd88a6ae0e1698d929830b3bd8b
and update Objective-C, C++, and GObject binding generators to use isReadOnly.
* bindings/scripts/CodeGeneratorCPP.pm:
(GenerateHeader):
(GenerateImplementation):
* bindings/scripts/CodeGeneratorGObject.pm:
(GetWriteableProperties):
(GenerateProperty):
(GenerateFunctions):
* bindings/scripts/CodeGeneratorJS.pm:
(IsReadonly):
* bindings/scripts/CodeGeneratorObjC.pm:
(GenerateHeader):
(GenerateImplementation):
* bindings/scripts/IDLParser.pm:
(parseAttributeRest):
(parseExceptionField):
(parseAttributeRestOld):
2013-05-07 Darin Adler <darin@apple.com>
Use OwnPtr instead of deleteAllValues in SMILTimeContainer
https://bugs.webkit.org/show_bug.cgi?id=115730
Reviewed by Geoffrey Garen.
* svg/animation/SMILTimeContainer.cpp:
(WebCore::SMILTimeContainer::~SMILTimeContainer): Removed call to deleteAllValues.
(WebCore::SMILTimeContainer::schedule): Use add instead of get/set to put a new
AnimationsVector into the map as needed.
(WebCore::SMILTimeContainer::setElapsed): Added get since values are OwnPtr now.
(WebCore::SMILTimeContainer::updateAnimations): Ditto.
* svg/animation/SMILTimeContainer.h: Changed value type of GroupedAnimationsMap
to OwnPtr instead of raw pointer.
2013-05-07 Anders Carlsson <andersca@apple.com>
Remove AlwaysInline.h from WTF
https://bugs.webkit.org/show_bug.cgi?id=115727
Reviewed by Brent Fulgham.
The macro that used to be in AlwaysInline.h is now in Compiler.h so there's no reason
to keep AlwaysInline.h around anymore.
* WebCore.vcproj/WebCore.vcproj:
* bindings/js/JSDOMWindowCustom.h:
* bindings/scripts/CodeGeneratorJS.pm:
(GenerateHeader):
* platform/graphics/filters/FEConvolveMatrix.h:
* rendering/InlineIterator.h:
* rendering/InlineTextBox.cpp:
* rendering/RenderBlockLineLayout.cpp:
* rendering/RenderText.cpp:
2013-05-07 peavo@outlook.com <peavo@outlook.com>
[Curl] POST requests sometimes fail.
https://bugs.webkit.org/show_bug.cgi?id=111844
Reviewed by Brent Fulgham.
Curl adds the header 'Expect: 100-Continue' when sending a POST request.
When we receive the header 'HTTP/1.1 100 Continue', we should not call
ResourceHandleClient::didReceiveResponse(), as this will cancel the request,
because the MIME type is empty in this case, causing the POST request to fail.
This header is only sent as an info header, or provisional response.
In addition, this patch changes the classification of http code 304 (Not modified).
It is not reported as a redirect anymore, but as a response
(ResourceHandleClient::didReceiveResponse() is called.
* platform/network/curl/ResourceHandleManager.cpp:
(WebCore::isHttpInfo): Added helper method to determine if http code is http info.
(WebCore::isHttpRedirect): Added helper method to determine if http code is http redirect.
(WebCore::headerCallback): Just return when receiving the header'HTTP/1.1 100 Continue'.
2013-05-07 Carlos Garcia Campos <cgarcia@igalia.com>
[X11][BlackBerry] Check if MOZ_X11 is defined instead of XP_UNIX npruntime_internal.h
https://bugs.webkit.org/show_bug.cgi?id=113687
Reviewed by Anders Carlsson.
It's assumed that all UNIX platforms use X11 for plugins, which is
not the case of BlackBerry.
* bridge/npruntime_internal.h: Use MOZ_X11 instead of XP_UNIX.
2013-05-07 Mikhail Pozdnyakov <mikhail.pozdnyakov@intel.com>
HashTraits<RefPtr<P> >::PeekType should be raw pointer for better performance
https://bugs.webkit.org/show_bug.cgi?id=115646
Reviewed by Darin Adler.
No new tests, no new functionality.
* accessibility/AXObjectCache.cpp:
(WebCore::AXObjectCache::get):
(WebCore::AXObjectCache::remove):
* accessibility/AXObjectCache.h:
(WebCore::AXObjectCache::objectFromAXID):
* css/CSSImageGeneratorValue.cpp:
(WebCore::CSSImageGeneratorValue::getImage):
* css/InspectorCSSOMWrappers.cpp:
(WebCore::InspectorCSSOMWrappers::getWrapperForRuleInSheets):
* css/StyleResolver.cpp:
(WebCore::StyleResolver::loadPendingSVGDocuments):
* html/HTMLAnchorElement.cpp:
(WebCore::HTMLAnchorElement::rootEditableElementForSelectionOnMouseDown):
* html/HTMLFormElement.cpp:
(WebCore::HTMLFormElement::elementForAlias):
* html/shadow/ContentDistributor.cpp:
(WebCore::ContentDistributor::findInsertionPointFor):
* loader/appcache/ApplicationCache.cpp:
(WebCore::ApplicationCache::resourceForURL):
* loader/archive/ArchiveResourceCollection.cpp:
(WebCore::ArchiveResourceCollection::archiveResourceForURL):
* page/PageGroup.cpp:
(WebCore::PageGroup::transientLocalStorage):
* page/animation/CompositeAnimation.cpp:
(WebCore::CompositeAnimation::updateTransitions):
(WebCore::CompositeAnimation::pauseTransitionAtTime):
* platform/graphics/ca/GraphicsLayerCA.cpp:
(WebCore::GraphicsLayerCA::updateMaskLayer):
* platform/network/BlobRegistryImpl.cpp:
(WebCore::BlobRegistryImpl::getBlobDataFromURL):
* plugins/PluginDatabase.cpp:
(WebCore::PluginDatabase::pluginForMIMEType):
(WebCore::PluginDatabase::MIMETypeForExtension):
* rendering/RenderCounter.cpp:
(WebCore::makeCounterNode):
(showCounterRendererTree):
* svg/graphics/filters/SVGFilterBuilder.cpp:
(WebCore::SVGFilterBuilder::getEffectById):
Updated accordingly to new HashMap<.., RefPtr>::get() semantics.
2013-05-06 Darin Adler <darin@apple.com>
Use OwnPtr instead of deleteAllValues in KeyframeValueList
https://bugs.webkit.org/show_bug.cgi?id=115652
Reviewed by Simon Fraser.
Also made a few related style fixes in the functions touched.
* platform/graphics/GraphicsLayer.cpp:
(WebCore::KeyframeValueList::insert): Change argument type to PassOwnPtr
and update use of m_values since it has OwnPtr now instead of raw pointer.
* platform/graphics/GraphicsLayer.h: Move conditional includes to a
separate paragraph, removed an unneeded forward class declaration.
(WebCore::AnimationValue::AnimationValue): Marked this constructor explicit
and removed an unneeded if statement.
(WebCore::AnimationValue::clone): Changed to use adoptPtr and PassOwnPtr.
(WebCore::FloatAnimationValue::clone): Changed this to return a PassOwnPtr.
(WebCore::TransformAnimationValue::TransformAnimationValue): Marked explicit.
(WebCore::TransformAnimationValue::clone): Changed to use adoptPtr and PassOwnPtr.
(WebCore::FilterAnimationValue::FilterAnimationValue): Marked explicit.
(WebCore::FilterAnimationValue::clone): Changed to use adoptPtr and PassOwnPtr.
(WebCore::KeyframeValueList::KeyframeValueList): Marked explicit.
(WebCore::KeyframeValueList::~KeyframeValueList): Removed, since the default
destructor works without an explicit deleteAllValues call.
(WebCore::KeyframeValueList::at): Added call to get needed since the vector
contains OwnPtr now.
(WebCore::KeyframeValueList::insert): Changed to take PassOwnPtr and then
removed now-redundant comment saying "takes ownership of the pointer".
(WebCore::KeyframeValueList::m_values): Changed type to Vector<OwnPtr>.
* rendering/RenderLayerBacking.cpp:
(WebCore::RenderLayerBacking::startAnimation): Added adoptPtr next to the
all the places new was done before calling KeyframeValueList::insert. Also
simplified the booleans and #if in this function.
(WebCore::RenderLayerBacking::startTransition): Ditto.
2013-05-06 Ryosuke Niwa <rniwa@webkit.org>
[Replaceable] attributes must be readonly
https://bugs.webkit.org/show_bug.cgi?id=115692
Reviewed by Kentaro Hara.
Merge https://chromium.googlesource.com/chromium/blink/+/ac61fbfe875d3c3c37d529683139ceb0ad4330bb.
Web IDL specification says [Replaceable] attributes are readonly:
http://www.w3.org/TR/2012/CR-WebIDL-20120419/#Replaceable
Update the two instances of [Replaceable] in WebCore that didn't have readonly modifier to match
the specifcation and the rest of WebCore. There should be no behavioral changes as the code generator
already assumed [Replaceable] attributes are readonly.
* html/HTMLDocument.idl:
* page/DOMWindow.idl:
2013-05-06 Darin Adler <darin@apple.com>
Use OwnPtr instead of deleteAllValues in DocumentMarkerController
https://bugs.webkit.org/show_bug.cgi?id=115655
Reviewed by Andreas Kling.
* dom/DocumentMarkerController.cpp:
(WebCore::DocumentMarkerController::~DocumentMarkerController): Added here
so the destructor isn't implicitly inline.
(WebCore::DocumentMarkerController::detach): Removed now-unneeded code to
call deleteAllValues. Also moved code to set m_possiblyExistingMarkerTypes
to after clearing m_markers to be consistent with how other functions do it.
(WebCore::DocumentMarkerController::addMarker): Changed code to use the
add idiom to avoid double hash table lookup. Changed to use adoptPtr since
the map now contains OwnPtr.
(WebCore::DocumentMarkerController::removeMarkers): Removed explicit calls
to delete list since removing the entry from the map now deletes the list.
Moved the code to check if m_markers has become empty so it's only called
when we actually remove something from m_markers.
(WebCore::DocumentMarkerController::markerContainingPoint): Added get().
(WebCore::DocumentMarkerController::renderedRectsForMarkers): Added get().
(WebCore::DocumentMarkerController::removeMarkers): Changed to use a new
interface to removeMarkersFromList. This eliminated the need to copy the
entire map when removing markers; instead we can just copy the keys.
(WebCore::DocumentMarkerController::removeMarkersFromList): Changed to use
an iterator instead of being passed the key/value pair from the map. Also
rearranged the logic so there is less repeated code and removed some now-
unneeded comments.
(WebCore::DocumentMarkerController::repaintMarkers): Added get().
(WebCore::DocumentMarkerController::invalidateRenderedRectsForMarkersInRect):
Added get().
(WebCore::DocumentMarkerController::showMarkers): Added get().
* dom/DocumentMarkerController.h: Removed implementation of the destructor
that called the detach function; that was just sharing the now-unneeded
call to deleteAllValues. Changed the type of the map to use an OwnPtr for
the value. Changed the interface of removeMarkersFromList to take a map
iterator instead of a key/value pair.
2013-05-06 Beth Dakin <bdakin@apple.com>
Reproducible crash in RenderBoxModelObject::adjustedPositionRelativeToOffsetParent()
https://bugs.webkit.org/show_bug.cgi?id=115685
-and corresponding-
<rdar://problem/13700734>
Reviewed by Sam Weinig.
This fix here is just to rollout the change that caused this regression, which is
http://trac.webkit.org/changeset/147395 . That change was not intended to cause any
behavioral differences. The change made it so RenderObject::offsetParent() returned
an Element* instead of a RenderBoxModelObject*. However, can muddle things when the
object we are returning is a continuation. Multiple RenderObjects have the same
Element in a continuation, so this new code can lead to a crash in
adjustedPositionRelativeToOffsetParent() when we expect to walk the RenderObject
chain and find the offsetParent in the Elements parent chain. But we might crash in
some complicated continuation scenarios because we lost this disambiguation of which
RenderObject to start with.
Roll out.
* dom/Element.cpp:
(WebCore::Element::offsetParent):
* rendering/RenderBoxModelObject.cpp:
(WebCore::RenderBoxModelObject::adjustedPositionRelativeToOffsetParent):
* rendering/RenderObject.cpp:
(WebCore::RenderObject::offsetParent):
* rendering/RenderObject.h:
(RenderObject):
2013-05-06 Ryosuke Niwa <rniwa@webkit.org>
Unify ways to cache named item in HTMLCollections
https://bugs.webkit.org/show_bug.cgi?id=115584
Reviewed by Antti Koivisto.
Refactor the code to share the same infrastructure for both id and name attributes maps.
Also get rid of shouldRegisterAsNamedItem and shouldRegisterAsExtraNamedItem from various Element subclasses
as these member functions were duplicating the information in HTMLNameCollection.cpp. Nevertheless, HTMLImageElement
and HTMLObjectElement still update HTMLDocument's window and document name getter maps when their presence as named
item changes due to an attribute change and children changes respectively.
* bindings/js/JSDOMWindowCustom.cpp:
(WebCore::namedItemGetter): Use windowNamedItemMap().containsSingle() instead of collection->hasExactlyOneItem() to
avoid instantiating HTMLCollection until we know for sure we're returning multiple items.
(WebCore::JSDOMWindow::getOwnPropertySlot): Call windowNamedItemMap().contains() instead of document->hasNamedItem()
since the latter has been removed.
(WebCore::JSDOMWindow::getOwnPropertySlotByIndex): Ditto.
(WebCore::JSDOMWindow::getOwnPropertyDescriptor): Ditto.
* bindings/js/JSHTMLDocumentCustom.cpp:
(WebCore::JSHTMLDocument::canGetItemsForName): Call documentNamedItemMap().contains() instead of
document->hasExtraNamedItem() since the latter has been removed.
(WebCore::JSHTMLDocument::nameGetter): Use documentNamedItemMap().containsSingle() instead of
collection->hasExactlyOneItem() to avoid instantiating HTMLCollection when we're returning the first item.
* dom/Document.cpp:
(WebCore::Document::windowNamedItems): Instantiate WindowNameCollection, which is a subclass of HTMLNameCollection,
instead of HTMLNameCollection since the latter class no longer has a public constructor.
(WebCore::Document::documentNamedItems): Ditto; instantiate DocumentNameCollection.
* dom/DocumentOrderedMap.cpp:
(WebCore::keyMatchesName): Added for name attribute.
(WebCore::keyMatchesWindowNamedItem): Added for window name getter.
(WebCore::keyMatchesDocumentNamedItem): Added for document name getter.
(WebCore::DocumentOrderedMap::getElementByName): Added for name attribute.
(WebCore::DocumentOrderedMap::getElementByWindowNamedItem): Added for window name getter.
(WebCore::DocumentOrderedMap::getElementByDocumentNamedItem): Added for document name getter.
* dom/DocumentOrderedMap.h:
(WebCore::DocumentOrderedMap::containsSingle): Added.
(WebCore::DocumentOrderedMap::containsMultiple): Fixed the bug that containsMultiple returns true even when
the duplicate count has been reduced to 1. Unfortunately this behavior change is not testable because the old code
worked properly (though less efficient) even if this function returned a wrong value.
* dom/Element.cpp:
(WebCore::Element::insertedInto):
(WebCore::Element::removedFrom):
(WebCore::Element::updateName): Added. Updates TreeScope's name attribute map as well as HTMLDocument's window name
and document name maps.
(WebCore::Element::updateId): Added the code to update HTMLDocument's window name and document name maps.
* dom/Element.h:
(Element): Removed shouldRegisterAsNamedItem, shouldRegisterAsExtraNamedItem, updateNamedItemRegistration, and
updateExtraNamedItemRegistration as they're no longer used.
* dom/TreeScope.cpp:
(SameSizeAsTreeScope):
(WebCore::TreeScope::getElementByName): Added.
(WebCore::TreeScope::addElementByName): Added.
(WebCore::TreeScope::removeElementByName): Added.
* dom/TreeScope.h:
(WebCore::TreeScope::hasElementWithName): Added.
(WebCore::TreeScope::containsMultipleElementsWithName): Added.
* html/HTMLAppletElement.h:
(HTMLAppletElement):
* html/HTMLCollection.cpp:
(WebCore::isMatchingElement): Use HTMLNameCollection subclasses' nodeMatches.
(WebCore::HTMLCollection::namedItem): Added a fast path for named item.
(WebCore::HTMLCollection::hasNamedItem): Use namedItem to avoid the work in the fast path.
* html/HTMLCollection.h:
(HTMLCollection): Removed checkForNameMatch.
* html/HTMLDocument.cpp:
(WebCore): Removed various member functions related to m_namedItemCounts and m_extraNamedItemCounts.
* html/HTMLDocument.h:
(WebCore::HTMLDocument::documentNamedItemMap): Added.
(WebCore::HTMLDocument::windowNamedItemMap): Added.
(HTMLDocument): Replaced m_namedItemCounts and m_extraNamedItemCounts by m_documentNamedItem and m_windowNamedItem.
Note that they're not one to one.
* html/HTMLEmbedElement.h:
(HTMLEmbedElement):
* html/HTMLFormElement.h:
(HTMLFormElement):
* html/HTMLIFrameElement.cpp: Removed the code to track the element's name since we already do this in Element.
(WebCore::HTMLIFrameElement::parseAttribute):
* html/HTMLIFrameElement.h:
(HTMLIFrameElement):
* html/HTMLImageElement.cpp:
(WebCore::HTMLImageElement::parseAttribute): Update the HTMLDocument's maps when the name attribute's existence
changes its presence on window and document name getters in turn. This behavior change, again, appears to be
untestable due to the old being more graceful when DocumentOrderedMap returned a wrong value.
* html/HTMLImageElement.h:
* html/HTMLNameCollection.cpp:
(WebCore::HTMLNameCollection::HTMLNameCollection): No longer overrides itemAfter. This enables backwards traversals
of the tree along with other optimizations in HTMLCollection.
(WebCore::WindowNameCollection::nodeMatchesIfNameAttributeMatch): Added. Used in Element::updateName to determine
whether add() or remove() should be called on HTMLDocument's maps.
(WebCore::WindowNameCollection::nodeMatches): Added.
(WebCore::DocumentNameCollection::nodeMatchesIfIdAttributeMatch): Added. Used in Element::updateName to determine
whether add() or remove() should be called on HTMLDocument's maps.
(WebCore::DocumentNameCollection::nodeMatchesIfNameAttributeMatch): Ditto.
(WebCore::DocumentNameCollection::nodeMatches): Added.
* html/HTMLNameCollection.h:
(HTMLNameCollection): Removed create since this class shouldn't be instantiated on its own.
(WebCore::WindowNameCollection): Added.
(WebCore::WindowNameCollection::create): Added.
(WebCore::WindowNameCollection::nodeMatches): Added.
(WebCore::WindowNameCollection::nodeMatchesIfIdAttributeMatch): Added.
(WebCore::WindowNameCollection::WindowNameCollection): Added.
(WebCore::DocumentNameCollection): Added.
(WebCore::DocumentNameCollection::create): Added.
(WebCore::DocumentNameCollection::nodeMatches): Added.
(WebCore::DocumentNameCollection::DocumentNameCollection): Added.
* html/HTMLObjectElement.cpp:
(WebCore::HTMLObjectElement::updateDocNamedItem): Update both window and document getter maps of HTMLDocument when
the visibility of this element changes due to the DOM mutations in the subtree.
* html/HTMLObjectElement.h:
(WebCore::HTMLObjectElement):
(WebCore::toHTMLObjectElement): Added.
2013-05-06 Andreas Kling <akling@apple.com>
Flaky Test: fast/frames/crash-remove-iframe-during-object-beforeload.html
<http://webkit.org/b/115674>
Reviewed by Alexey Proskuryakov.
Don't cache the Document::renderer() in a local since layout may blow it away.
* dom/Document.cpp:
(WebCore::Document::implicitClose):
2013-05-06 Anders Carlsson <andersca@apple.com>
More work on LocalStorageDatabaseTracker
https://bugs.webkit.org/show_bug.cgi?id=115680
Reviewed by Andreas Kling.
Export symbols needed by WebKit2.
* WebCore.exp.in:
2013-05-06 Manuel Rego Casasnovas <rego@igalia.com>
[GTK] Add webkit_uri_scheme_request_finish_error
https://bugs.webkit.org/show_bug.cgi?id=94316
Reviewed by Anders Carlsson.
No behaviour change, covered by existing tests.
* platform/network/soup/ResourceError.h:
(ResourceError): Rename genericIOError() to genericGError().
* platform/network/soup/ResourceErrorSoup.cpp:
(WebCore::ResourceError::httpError): Use genercicGError() instead of
genericIOError().
(WebCore::ResourceError::genericGError): Use error domain instead of
always return a G_IO_ERROR.
* platform/network/soup/ResourceHandleSoup.cpp: Use genericGError()
instead of genericIOError().
(WebCore::redirectSkipCallback):
(WebCore::readCallback):
2013-05-06 Bem Jones-Bey <bjonesbe@adobe.com>
Heap-use-after-free in WebCore::InlineFlowBox::deleteLine
https://bugs.webkit.org/show_bug.cgi?id=114772
Reviewed by David Hyatt.
Fix the new use after free issues in Ruby.
Test: fast/ruby/ruby-svg-crash.html
* rendering/RenderRubyRun.cpp:
(WebCore::RenderRubyRun::removeChild):
2013-05-06 Robert Hogan <robert@webkit.org>
REGRESSION(r140024): child of fixed div inside of absolute div does not get resized when window is resized
https://bugs.webkit.org/show_bug.cgi?id=115379
Reviewed by David Hyatt.
When detecting whether a fixed pos object needed to move with an absolute ancestor we checked
whether the logical width of the fixed pos object had changed. This check prevented the fixed pos
object from detecting later on that it needed to relayout its children in layoutBlock(). So recompute the width
for our check instead of updating it.
Test: fast/block/positioning/child-of-fixed-pos-after-movement.html
* rendering/RenderBlock.cpp:
(WebCore::RenderBlock::markFixedPositionObjectForLayoutIfNeeded):
2013-05-06 Mike Lattanzio <mlattanzio@blackberry.com>
[BlackBerry] Enable and Expose Text Autosizing through BlackBerry::WebKit::WebSettings
https://bugs.webkit.org/show_bug.cgi?id=113808
Reviewed by Rob Buis.
Added TextAutosizer.cpp to the BlackBerry build.
* PlatformBlackBerry.cmake:
2013-05-06 Darin Adler <darin@apple.com>
Use OwnPtr instead of deleteAllValues in SVGAttributeToPropertyMap
https://bugs.webkit.org/show_bug.cgi?id=115653
Reviewed by Andreas Kling.
Also made a few style fixes to the code at the same time.
* svg/properties/SVGAttributeToPropertyMap.cpp:
(WebCore::SVGAttributeToPropertyMap::addProperties): Changed argument to
const because there was no reason for it to be non-const. Added calls to
get() since the items in the map are now OwnPtr. Added a couple FIXMEs
about performance mistakes.
(WebCore::SVGAttributeToPropertyMap::addProperty): Added a FIXME about
a small performance mistake, and updated to use OwnPtr instead of raw
pointers.
(WebCore::SVGAttributeToPropertyMap::synchronizeProperties): Added a call
to get().
* svg/properties/SVGAttributeToPropertyMap.h: Removed now-unneeded
constructor and destructor definitions. Changed the type for the
addProperties to be const&. Added a comment about incorrect function
naming. Changed the type of the map data member to use OwnPtr.
2013-05-06 Antti Koivisto <antti@apple.com>
Remove more code that was only needed for younger/older shadow trees
https://bugs.webkit.org/show_bug.cgi?id=115662
Reviewed by Andreas Kling.
This is dead code.
* WebCore.exp.in:
* dom/ComposedShadowTreeWalker.cpp:
(WebCore::nodeCanBeDistributed):
(WebCore::ComposedShadowTreeWalker::traverseParentBackToShadowRootOrHost):
* dom/EventPathWalker.cpp:
(WebCore::EventPathWalker::moveToParent):
* html/shadow/ContentDistributor.cpp:
(WebCore::ScopeContentDistribution::ScopeContentDistribution):
(WebCore::ScopeContentDistribution::registerInsertionPoint):
(WebCore::ScopeContentDistribution::unregisterInsertionPoint):
(WebCore):
(WebCore::ScopeContentDistribution::hasInsertionPoint):
(WebCore::ContentDistributor::invalidate):
* html/shadow/ContentDistributor.h:
(ScopeContentDistribution):
* html/shadow/InsertionPoint.cpp:
(WebCore::InsertionPoint::contains):
(WebCore::resolveReprojection):
(WebCore::collectInsertionPointsWhereNodeIsDistributed):
* html/shadow/InsertionPoint.h:
* testing/Internals.cpp:
(WebCore):
* testing/Internals.h:
(Internals):
* testing/Internals.idl:
2013-05-06 Tiancheng Jiang <tijiang@rim.com>
[BlackBerry] Update HTML5 progress bar UX.
https://bugs.webkit.org/show_bug.cgi?id=115284.
Reviewed by Rob Buis.
BlackBerry PR 331729.
Internally Reviewed by Jeff Rogers.
Use GL render to paint progress bar to meet UX specs.
Also change the slider range to GL render.
* platform/blackberry/RenderThemeBlackBerry.cpp:
(WebCore):
(WebCore::RenderThemeBlackBerry::paintSliderTrack):
(WebCore::RenderThemeBlackBerry::paintProgressTrackRect):
(WebCore::drawProgressTexture):
(WebCore::RenderThemeBlackBerry::paintProgressBar):
* platform/blackberry/RenderThemeBlackBerry.h:
(RenderThemeBlackBerry):
2013-05-06 Bem Jones-Bey <bjonesbe@adobe.com>
[CSS Exclusions] remove unused -webkit-wrap property
https://bugs.webkit.org/show_bug.cgi?id=102105
Reviewed by Darin Adler.
Remove -webkit-wrap property and all mentions. This property doesn't
exist in the spec anymore, and was never implemented more than just
parsing the property.
* WebCore.order:
* css/CSSComputedStyleDeclaration.cpp:
(WebCore::CSSComputedStyleDeclaration::getPropertyCSSValue):
* css/CSSParser.cpp:
(WebCore::CSSParser::parseValue):
* css/CSSProperty.cpp:
(WebCore::CSSProperty::isInheritedProperty):
* css/CSSPropertyNames.in:
* css/StylePropertySet.cpp:
(WebCore::StylePropertySet::getPropertyValue):
(WebCore::StylePropertySet::asText):
* css/StylePropertyShorthand.cpp:
(WebCore::shorthandForProperty):
* css/StylePropertyShorthand.h:
(WebCore):
* css/StyleResolver.cpp:
(WebCore::StyleResolver::applyProperty):
2013-05-06 Anders Carlsson <andersca@apple.com>
Write storage changes to disk
https://bugs.webkit.org/show_bug.cgi?id=115660
Reviewed by Andreas Kling.
Export symbols needed by WebKit2.
* WebCore.exp.in:
2013-05-06 Tiancheng Jiang <tijiang@rim.com>
[BlackBerry] Update HTML5 progress bar UX.
https://bugs.webkit.org/show_bug.cgi?id=115284.
Reviewed by Rob Buis.
BlackBerry PR 331729.
Internally Reviewed by Jeff Rogers.
* platform/blackberry/RenderThemeBlackBerry.cpp:
(WebCore):
(WebCore::createLinearGradient):
(WebCore::RenderThemeBlackBerry::paintSliderTrack):
(WebCore::RenderThemeBlackBerry::paintSliderTrackRect):
(WebCore::RenderThemeBlackBerry::paintProgressBar):
* platform/blackberry/RenderThemeBlackBerry.h:
(RenderThemeBlackBerry):
2013-05-06 Víctor Manuel Jáquez Leal <vjaquez@igalia.com>
[texmap] draw content if graphics layer displays a video
https://bugs.webkit.org/show_bug.cgi?id=114742
Reviewed by Noam Rosenthal.
Bug #86410 focuses on having composited/accelerated video using the
TextureMapper. But the video is not rendered fast by using the
repaint() method. In the case of the TextureMapper it is required to
call a content display as fast as possible.
This patch adds the class TextureMapperPlatformLayer::Client with the
method setLayerNeedsDisplay(). The GraphicsLayerTextureMapper
implements this new class and the new method calls
setContentsNeedsDisplay(), causing a faster content display when
requested.
No new tests. Covered by existing tests.
* platform/graphics/texmap/GraphicsLayerTextureMapper.cpp:
(WebCore::GraphicsLayerTextureMapper::setContentsToMedia): sets itself
as the TextureMapperPlatformLayer's client
* platform/graphics/texmap/GraphicsLayerTextureMapper.h:
(WebCore::GraphicsLayerTextureMapper::setLayerNeedsDisplay):
TextureMapperPlatformLayer::Client::setLayerNeedsDisplay implementation
(GraphicsLayerTextureMapper):
* platform/graphics/texmap/TextureMapperPlatformLayer.h:
(Client): New class
(WebCore::TextureMapperPlatformLayer::TextureMapperPlatformLayer):
(WebCore::TextureMapperPlatformLayer::setClient): client setter
(WebCore::TextureMapperPlatformLayer::setLayerNeedsDisplay): facade
for client's method
2013-05-02 David Hyatt <hyatt@apple.com>
Improve the performance of RenderDeprecatedFlexibleBox.
https://bugs.webkit.org/show_bug.cgi?id=115543.
Optimize deprecated flexible box layout to be much faster. This patch implements
the following optimizations in the deprecated flexible box:
(1) Defer repainting of children until they have been placed into their final
positions. This is done by collecting all of the old frame rects into a Vector
and then doing a walk after layout is finished to repaint any of the children if
they moved from that position. This code matches the new RenderFlexibleBox's system
for repainting moved children.
(2) Implement support for layout deltas. We keep a Vector of layout deltas for each
child as we shift them around, and every time we lay a child out again, we apply that
child's current layout delta to avoid repainting at the new position. RenderFlexibleBox
does not have support for layout deltas yet, so we'll need to implement this in the
new flexbox code as well.
(3) Optimize flexible objects to avoid laying them out unflexed. When laying out
horizontal and vertical boxes now, we lay out the inflexible items first. We then
check to see if the inflexible extent of all those children has changed.
If this extent didn't change, and the flexible items either don't need layout or there
is only one flexing item, then we avoid laying out the item in an unflexed state
and simply lay out one time with the flex applied instead. The new RenderFlexibleBox
does not have these optimizations and would benefit from them in the block-direction box
case (it uses preferred logical widths in the inline-direction box case, and so avoided
layouts in that direction already).
Reviewed by Beth Dakin.
* rendering/RenderDeprecatedFlexibleBox.cpp:
(WebCore::appendChildFrameRects):
Cache all of the old child frame rects so that we can compare them with the final
positions for repaintDuringLayoutIfMoved. This collection is identical to what the
new flexbox code does.
(WebCore::appendChildLayoutDeltas):
Build up a vector that tracks layout deltas. We apply these layout deltas every
time we lay out a child so that any repainting done during layout ignores our shifted
position and just keeps using the old position. The new flexbox does not have this
code yet.
(WebCore::repaintChildrenDuringLayoutIfMoved):
After final placement of children, we do a single pass over all of the children and
repaint them if they shifted their positions. This matches how the new flexbox works.
(WebCore::RenderDeprecatedFlexibleBox::layoutBlock):
Collect the frame rects and layout deltas, and defer repainting of children to the
end of layout.
(WebCore::gatherFlexChildrenInfo):
Don't clear flex overrides when gathering flex information. Add additional information
such as the number of flexing items so that we can use it to optimize flex layout.
(WebCore::layoutChildIfNeededApplyingDelta):
A helper for applying your current layout delta for a child when laying that child out.
(WebCore::RenderDeprecatedFlexibleBox::layoutHorizontalBox):
(WebCore::RenderDeprecatedFlexibleBox::layoutVerticalBox):
Both methods are patched to aggregate layout deltas as children move around during
the multiple passes. In addition we now optimize layout in a couple of cases, such
as when the inflexible space stays the same (thus giving a flexible object the
same amount of available space, avoiding a need to lay out unflexed first).
(WebCore::RenderDeprecatedFlexibleBox::placeChild):
Patched to add to our cached layout delta for that child when we do a movement.
* rendering/RenderDeprecatedFlexibleBox.h:
Changes to method signatures.
2013-05-04 Andy Estes <aestes@apple.com>
REGRESSION (r125592): Reproducible crash in DOMWindow::open when a delegate closes the new window in decidePolicyForNavigationAction
https://bugs.webkit.org/show_bug.cgi?id=115609
Reviewed by Oliver Hunt.
When a window created by window.open() is navigated, the embedder might
close it in decidePolicyForNavigationAction. If this happens, we end up
with a pointer to a deleted Frame.
Fix this by keeping a strong reference to the Frame created by
createWindow(). We can later determine if the window was closed by
checking if the new Frame has a detached Page.
Added an API test: WebKit1.CloseNewWindowInNavigationPolicyDelegate.
* page/DOMWindow.cpp:
(WebCore::DOMWindow::createWindow):
2013-05-06 Zan Dobersek <zdobersek@igalia.com>
[GTK] Move GeolocationProviderGeoclue into libPlatform
https://bugs.webkit.org/show_bug.cgi?id=115591
Reviewed by Martin Robinson.
No new tests - no new functionality.
* GNUmakefile.am: Remove the Source/WebCore/platform/geoclue directory from the webkitgtk_cppflags list.
* GNUmakefile.list.am: Move the GeolocationProviderGeoclue(Client) sources under platform_sources.
2013-05-06 Zoltan Arvai <zarvai@inf.u-szeged.hu>
[Qt][Win] Unreviewed buildfix after r149579.
* plugins/win/PluginDatabaseWin.cpp:
(WebCore::addQtWebKitPluginPath):
2013-05-06 Antoine Quint <graouts@apple.com>
Manage the presentation of the snapshotted plug-in using JavaScript
https://bugs.webkit.org/show_bug.cgi?id=115548
Reviewed by Dean Jackson.
* Resources/plugIns.js:
(createOverlay):
Implement the createOverlay(shadowRoot, titleText, subtitleText) method
that is called from WebCore (HTMLPlugInImageElement::didAddUserAgentShadowRoot)
to allow the injected script to customize the shadow root for a snapshotted
plug-in. This is a default implementation, clients are expected to customize
this by providing their own JS file with enhanced behavior.
* css/CSSDefaultStyleSheets.cpp:
(WebCore::CSSDefaultStyleSheets::ensureDefaultStyleSheetsForElement):
Since we no longer have a default shadow tree generated in C++, it makes little
sense for clients to extend the default snapshotted plug-in stylesheet, so we
only insert it if no custom one is provided by the chrome client.
* css/plugIns.css:
Better styling of the default snapshotted plug-in overlay look by using CSS
flex boxes. Also using more explicit selector as an optimization.
* dom/Document.cpp:
(WebCore::Document::ensurePlugInsInjectedScript):
Expose a new method to allow HTMLPlugInImageElement instances to ensure that
the JavaScript code required to customize the snapshotted plug-in's shadow root
is indeed injected in the current document. The actual injection would only
happen once per document so all snapshotted plug-ins share the same scripting
context.
* dom/Document.h:
Expose the new ensurePlugInsInjectedScript method and the m_hasInjectedPlugInsScript
property used to ensure injection happens only once per document.
* html/HTMLPlugInImageElement.cpp:
(WebCore::titleText):
(WebCore::subtitleText):
Store the localized strings for each mime-type in a static hash map as it can be
costly to retrieve them each time from the client. It is expected the chrome client
will want to provide localized strings taking into account the snapshotted plug-in's
mime-type, so we're adding this as a parameter.
(WebCore::HTMLPlugInImageElement::checkSnapshotStatus):
Dispatch a "resize" event to the shadow root to notify the injected script that the
snapshotted plug-in's metrics have changed and to allow the overlay to update itself
as a result.
(WebCore::HTMLPlugInImageElement::didAddUserAgentShadowRoot):
Remove all the DOM generation code in favor of an approach where we create a shared
DOM scripting world in which we inject JavaScript code that will perform the same
task but will additionally be provided by the client in order to provide a completely
custom overlay for the snapshotted plug-in. The sole contract is for the JavaScript
to implement a createOverlay(shadowRoot, titleText, subtitleText) method.
(WebCore::HTMLPlugInImageElement::partOfSnapshotOverlay):
Renamed method to be generic to the overlay as opposed to text labels and use the
element with CSS class name "snapshot-overlay" as the comparison node.
* html/HTMLPlugInImageElement.h:
(HTMLPlugInImageElement):
Removing a couple of unused members since we no longer generate the shadow DOM from C++
and rename the partOfSnapshotLabel method to partOfSnapshotOverlay.
* page/ChromeClient.h:
(WebCore::ChromeClient::plugInStartLabelTitle):
(WebCore::ChromeClient::plugInStartLabelSubtitle):
(WebCore::ChromeClient::plugInExtraScript):
Pass in the mime-type to plugInStartLabelTitle and plugInStartLabelSubtitle and expose
a new plugInExtraScript method to allow the chrome client to provide a custom JS file
for the management of the shadow root.
* rendering/RenderSnapshottedPlugIn.cpp:
(WebCore::RenderSnapshottedPlugIn::handleEvent):
Update the terminology from "label" to "overlay" per the changes made in HTMLPlugInImageElement.
2013-05-06 Robert Hogan <robert@webkit.org>
REGRESSION(r140907) - Backport blink r149612 to fix vertical-align and rowspan issue
https://bugs.webkit.org/show_bug.cgi?id=115611
Patch by Julien Chaffraix.
Reviewed by Benjamin Poulain.
Backport phttps://src.chromium.org/viewvc/blink?view=rev&revision=149612 from
https://chromiumcodereview.appspot.com/14105010
Fix the rows' height computation with vertical-align: baseline and rowspan.
r140907 was careful in avoiding updating the baseline descent for
spanning cells. However it still added the non-spanning cells baseline
descent to the spanning cells' row height computation.
This change avoids the previous issue by not adding the baseline
descent in this case.
Test: fast/table/baseline-align-rowspan.html
* rendering/RenderTableSection.cpp:
(WebCore::RenderTableSection::calcRowLogicalHeight):
2013-05-05 Anders Carlsson <andersca@apple.com>
Remove Vector::prepend
https://bugs.webkit.org/show_bug.cgi?id=115618
Reviewed by Geoffrey Garen.
Replace calls to Vector::prepend with either Vector::insert,
or a combination of Vector::append and Vector::reverse.
* accessibility/AccessibilityObject.cpp:
(WebCore::AccessibilityObject::scrollToGlobalPoint):
* css/CSSGradientValue.cpp:
(WebCore::CSSGradientValue::addStops):
* css/CSSValueList.h:
(WebCore::CSSValueList::prepend):
* dom/Document.cpp:
(WebCore::Document::iconURLs):
* editing/TextIterator.cpp:
(WebCore::SearchBuffer::prependContext):
* editing/VisibleUnits.cpp:
(WebCore::previousBoundary):
(WebCore::nextBoundary):
* history/HistoryItem.cpp:
(WebCore::HistoryItem::padDailyCountsForNewVisit):
(WebCore::HistoryItem::collapseDailyVisitsToWeekly):
* inspector/InjectedScriptHost.cpp:
(WebCore::InjectedScriptHost::addInspectedObject):
* platform/graphics/SVGGlyph.cpp:
(WebCore::charactersWithArabicForm):
2013-05-05 Sam Weinig <sam@webkit.org>
Remove empty function SQLiteFileSystem::registerSQLiteVFS() and its callers
https://bugs.webkit.org/show_bug.cgi?id=115619
Reviewed by Dan Bernstein.
* Modules/webdatabase/DatabaseTracker.cpp:
* platform/sql/SQLiteFileSystem.cpp:
* platform/sql/SQLiteFileSystem.h:
* storage/StorageTracker.cpp:
2013-05-05 Chris Fleizach <cfleizach@apple.com>
AX: aria-checked not exposed correctly on menuitemcheckbox or menuitemradio roles
https://bugs.webkit.org/show_bug.cgi?id=115499
Reviewed by Tim Horton.
Expose isChecked() for menu item objects.
Return the Mac-platform specific value that you find on menu items for "checked" menu items.
Test: platform/mac/accessibility/aria-menuitem-checked-value.html
* accessibility/AccessibilityNodeObject.cpp:
(WebCore::AccessibilityNodeObject::isChecked):
* accessibility/mac/WebAccessibilityObjectWrapperMac.mm:
(-[WebAccessibilityObjectWrapper accessibilityAttributeValue:]):
2013-05-05 Tim Horton <timothy_horton@apple.com>
[wk2] Page Overlays: deviceScaleFactor doesn't update when the display changes
https://bugs.webkit.org/show_bug.cgi?id=115577
<rdar://problem/13762583>
Reviewed by Darin Adler.
* WebCore.exp.in:
Export GraphicsLayer::noteDeviceOrPageScaleFactorChangedIncludingDescendants
2013-05-05 Anders Carlsson <andersca@apple.com>
Remove the Vector::append overload that takes a Vector
https://bugs.webkit.org/show_bug.cgi?id=115535
Reviewed by Andreas Kling.
Use Vector::appendVector instead.
* Modules/indexeddb/IDBBackingStore.cpp:
(WebCore::IDBBackingStore::putRecord):
(WebCore::IDBBackingStore::putIndexDataForRecord):
* Modules/indexeddb/IDBLevelDBCoding.cpp:
(WebCore::IDBLevelDBCoding::encodeStringWithLength):
(WebCore::IDBLevelDBCoding::encodeIDBKey):
(WebCore::IDBLevelDBCoding::encodeIDBKeyPath):
(WebCore::IDBLevelDBCoding::SchemaVersionKey::encode):
(WebCore::IDBLevelDBCoding::MaxDatabaseIdKey::encode):
(WebCore::IDBLevelDBCoding::DataVersionKey::encode):
(WebCore::IDBLevelDBCoding::DatabaseFreeListKey::encode):
(WebCore::IDBLevelDBCoding::DatabaseNameKey::encode):
(WebCore::IDBLevelDBCoding::DatabaseMetaDataKey::encode):
(WebCore::IDBLevelDBCoding::ObjectStoreMetaDataKey::encode):
(WebCore::IDBLevelDBCoding::IndexMetaDataKey::encode):
(WebCore::IDBLevelDBCoding::ObjectStoreFreeListKey::encode):
(WebCore::IDBLevelDBCoding::IndexFreeListKey::encode):
(WebCore::IDBLevelDBCoding::ObjectStoreNamesKey::encode):
(WebCore::IDBLevelDBCoding::IndexNamesKey::encode):
(WebCore::IDBLevelDBCoding::ObjectStoreDataKey::encode):
(WebCore::IDBLevelDBCoding::ExistsEntryKey::encode):
(WebCore::IDBLevelDBCoding::IndexDataKey::encode):
* Modules/webaudio/AudioContext.cpp:
(WebCore::AudioContext::clear):
(WebCore::AudioContext::scheduleNodeDeletion):
* accessibility/AccessibilityARIAGrid.cpp:
(WebCore::AccessibilityARIAGrid::addTableCellChild):
* accessibility/AccessibilityTable.cpp:
(WebCore::AccessibilityTable::cells):
* css/RuleFeature.cpp:
(WebCore::RuleFeatureSet::add):
* css/StyleResolver.cpp:
(WebCore::StyleResolver::addToMatchedPropertiesCache):
* dom/DocumentStyleSheetCollection.cpp:
(WebCore::collectActiveCSSStyleSheetsFromSeamlessParents):
(WebCore::DocumentStyleSheetCollection::updateActiveStyleSheets):
* dom/Range.cpp:
(WebCore::Range::getBorderAndTextQuads):
* html/FormController.cpp:
(WebCore::FormController::getReferencedFilePaths):
* html/canvas/CanvasRenderingContext2D.cpp:
(WebCore::CanvasRenderingContext2D::setLineDash):
* html/parser/HTMLFormattingElementList.cpp:
(WebCore::HTMLFormattingElementList::tryToEnsureNoahsArkConditionQuickly):
* html/track/WebVTTToken.h:
(WebCore::WebVTTToken::addNewClass):
(WebCore::WebVTTToken::addNewAnnotation):
* page/CaptionUserPreferencesMac.mm:
(WebCore::CaptionUserPreferencesMac::preferredLanguages):
* platform/FileChooser.cpp:
(WebCore::FileChooserSettings::acceptTypes):
* platform/SharedBufferChunkReader.cpp:
(WebCore::SharedBufferChunkReader::nextChunk):
* platform/graphics/MediaPlayer.cpp:
(WebCore::MediaPlayer::getSitesInMediaCache):
* platform/graphics/ca/GraphicsLayerCA.cpp:
(WebCore::GraphicsLayerCA::updateSublayerList):
* platform/mac/PasteboardMac.mm:
(WebCore::createWritableTypesForImage):
(WebCore::writableTypesForImage):
(WebCore::Pasteboard::writeSelectionForTypes):
* platform/network/FormDataBuilder.cpp:
(WebCore::FormDataBuilder::generateUniqueBoundaryString):
* plugins/PluginDatabase.cpp:
(WebCore::PluginDatabase::defaultPluginDirectories):
* rendering/RenderBlockLineLayout.cpp:
(WebCore::constructBidiRunsForSegment):
* rendering/RenderLayerCompositor.cpp:
(WebCore::RenderLayerCompositor::OverlapMap::popCompositingContainer):
* rendering/RenderTableSection.cpp:
(WebCore::RenderTableSection::splitColumn):
* svg/SVGGlyphMap.h:
(WebCore::SVGGlyphMap::collectGlyphsForString):
* xml/XPathNodeSet.h:
(WebCore::XPath::NodeSet::append):
2013-05-05 Anders Carlsson <andersca@apple.com>
Try to fix the Windows build.
Make plugIns.js have a non-zero length.
* Resources/plugIns.js:
2013-05-04 Dean Jackson <dino@apple.com>
Animations and Transitions should not start when globally suspended
https://bugs.webkit.org/show_bug.cgi?id=114915
Reviewed by Sam Weinig.
When the Document's AnimationController was suspended, we still
started new transitions and animations. Change this so that
animations enter a paused-but-new state, where they are frozen
until the AnimationController resumes. At that time, it is as
if they had just appeared: any delay counts down before
the animation starts.
For transitions, the change in value must still happen, but
it does so immediately. No transitionend event should be fired.
This produces a slightly confusing behaviour, because any
in-progress transitions are suspended, but any new style changes
happen instantly. This might sound contradictory, but in general
suspending the document is a rare (and dangerous) thing to do.
Previously, the Document would call resumeAnimations as it loaded,
effectively starting all the animations. This meant if you suspended
animations before loading a document, it was ignored as soon as the
load finished. Now there is a separate method startAnimationsIfNotSuspended
which checks to see if the document is suspended as it loads.
In order to handle this case, I added a new state to the Animation
machinery: AnimationStatePausedNew. This is an animation that was created
in the suspended state.
Tests: animations/added-while-suspended.html
transitions/started-while-suspended.html
* WebCore.exp.in: Export AnimationController::isSuspended().
* dom/Document.cpp:
(WebCore::Document::implicitClose):
resumeAnimationsForDocument() -> startAnimationsIfNotSuspended()
* page/animation/AnimationBase.cpp:
(WebCore::nameForState): New name for AnimationStatePausedNew.
(WebCore::AnimationBase::updateStateMachine): Handle new state AnimationStatePausedNew. The
most important change is that when go from PausedNew to Running, we jump back into
the New state and continue from there.
(WebCore::AnimationBase::updatePlayState): suspended -> isSuspended
* page/animation/AnimationBase.h: New state: AnimationStatePausedNew
(WebCore::AnimationBase::waitingToStart): Add AnimationStatePausedNew.
(WebCore::AnimationBase::paused): Add AnimationStatePausedNew.
(WebCore::AnimationBase::isNew): Add AnimationStatePausedNew.
* page/animation/AnimationController.cpp:
(WebCore::AnimationControllerPrivate::AnimationControllerPrivate): Initialise m_suspended.
(WebCore::AnimationControllerPrivate::clear): suspended -> isSuspended
(WebCore::AnimationControllerPrivate::updateAnimations): Ditto.
(WebCore::AnimationControllerPrivate::updateAnimationTimerForRenderer): Ditto.
(WebCore::AnimationControllerPrivate::suspendAnimations): Update m_suspended.
(WebCore::AnimationControllerPrivate::resumeAnimations): Ditto.
(WebCore::AnimationControllerPrivate::suspendAnimationsForDocument):
(WebCore::AnimationControllerPrivate::resumeAnimationsForDocument):
(WebCore::AnimationControllerPrivate::startAnimationsIfNotSuspended): New method that will
only resume animations if we were not globally suspended.
(WebCore::AnimationController::isSuspended): New method.
(WebCore::AnimationController::suspendAnimations): Add logging.
(WebCore::AnimationController::resumeAnimations): Add logging.
(WebCore::AnimationController::suspendAnimationsForDocument): Add logging.
(WebCore::AnimationController::resumeAnimationsForDocument): Add logging.
(WebCore::AnimationController::startAnimationsIfNotSuspended): Calls private method.
* page/animation/AnimationController.h:
(AnimationController): Add isSuspended() and animationsForDocumentMayStart().
* page/animation/AnimationControllerPrivate.h:
(WebCore::AnimationControllerPrivate::isSuspended): New method.
(AnimationControllerPrivate): Add m_isSuspended member.
* page/animation/CompositeAnimation.cpp:
(WebCore::CompositeAnimation::CompositeAnimation): Moved from header - initialise m_isSuspended.
(WebCore::CompositeAnimation::updateTransitions): Do not create ImplicitAnimation if suspended.
(WebCore::CompositeAnimation::updateKeyframeAnimations): Move to AnimationStatePausedNew if suspended.
(WebCore::CompositeAnimation::suspendAnimations): m_suspended -> m_isSuspended
(WebCore::CompositeAnimation::resumeAnimations): Ditto.
* page/animation/CompositeAnimation.h:
(WebCore::CompositeAnimation::isSuspended): Renamed from suspended()
* page/animation/KeyframeAnimation.cpp:
(WebCore::KeyframeAnimation::animate): If we're in the AnimationStatePausedNew state, then
we need to go to the first frame (to handle fill mode).
* testing/Internals.cpp:
(WebCore::Internals::animationsAreSuspended): New exposed method to reflect AnimationController.
* testing/Internals.h: Add animationsAreSuspended.
* testing/Internals.idl: Ditto.
2013-05-04 Sam Weinig <sam@webkit.org>
Move PopupMenuMac and SearchPopupMenuMac to Source/WebKit/mac
matching where they are in WebKit2.
Reviewed by Anders Carlsson.
* WebCore.exp.in:
* WebCore.xcodeproj/project.pbxproj:
* platform/mac/PopupMenuMac.h: Removed.
* platform/mac/PopupMenuMac.mm: Removed.
* platform/mac/SearchPopupMenuMac.h: Removed.
* platform/mac/SearchPopupMenuMac.mm: Removed.
2013-05-04 Christophe Dumez <ch.dumez@sisa.samsung.com>
Get rid of special cases in AddIncludesForTypeInImpl
https://bugs.webkit.org/show_bug.cgi?id=115602
Reviewed by Benjamin Poulain.
Get rid of the special cases in AddIncludesForTypeInImpl subroutine in the
JS bindings generator. Those are no longer needed and special cases should
be avoided in the generator.
No new tests, no behavior change.
* bindings/scripts/CodeGeneratorJS.pm:
(AddIncludesForTypeInImpl):
2013-05-04 Christophe Dumez <ch.dumez@sisa.samsung.com>
Get rid of AddIncludesForSVGAnimatedType in bindings generator
https://bugs.webkit.org/show_bug.cgi?id=115603
Reviewed by Benjamin Poulain.
Remove AddIncludesForSVGAnimatedType subroutine from the bindings generator
as it is a special case which is no longer needed.
No new tests, no behavior change.
* bindings/scripts/CodeGeneratorJS.pm:
(GenerateImplementation):
2013-05-04 Antoine Quint <graouts@apple.com>
Update code generators to handle a new JavaScript file for snapshotted plug-ins
https://bugs.webkit.org/show_bug.cgi?id=115596
Reviewed by Dean Jackson.
In preparation for https://webkit.org/b/115548, adding a new JS file at
Resources/plugIns.js that we will use to provide presentation for the
snapshotted plug-ins overlay.
* CMakeLists.txt:
* DerivedSources.cpp:
* DerivedSources.make:
* DerivedSources.pri:
* GNUmakefile.am:
* GNUmakefile.list.am:
* Resources/plugIns.js: Added.
* WebCore.vcproj/WebCore.vcproj:
* WebCore.vcxproj/WebCore.vcxproj:
* WebCore.vcxproj/WebCore.vcxproj.filters:
* WebCore.xcodeproj/project.pbxproj:
2013-05-04 Andreas Kling <akling@apple.com>
REGRESSION(r142647): Flaky Test: fast/frames/crash-remove-iframe-during-object-beforeload.html
<http://webkit.org/b/115322>
<rdar://problem/13810719>
Reviewed by Anders Carlsson.
Don't cache the FrameView::renderView() in a local since updating Widgets may blow it away.
* page/FrameView.cpp:
(WebCore::FrameView::performPostLayoutTasks):
2013-05-04 Andreas Kling <akling@apple.com>
Remove GraphicsContext::strokeArc(), which is unused.
From Blink r149608 by <jbroman@chromium.org>
<http://src.chromium.org/viewvc/blink?view=revision&revision=149608>
This is no longer used since almost a year ago, when HAVE(PATH_BASED_BORDER_RADIUS_DRAWING) was inlined.
* platform/graphics/GraphicsContext.h:
* platform/graphics/blackberry/GraphicsContextBlackBerry.cpp:
* platform/graphics/cairo/GraphicsContextCairo.cpp:
* platform/graphics/cg/GraphicsContextCG.cpp:
* platform/graphics/wince/GraphicsContextWinCE.cpp:
2013-05-04 Andreas Kling <akling@apple.com>
Remove unused CSSSelector::isCustomPseudoType().
From Blink r149574 by <dominicc@chromium.org>
<http://src.chromium.org/viewvc/blink?view=revision&revision=149574>
* css/CSSSelector.h:
* css/CSSSelector.cpp:
2013-05-04 Andreas Kling <akling@apple.com>
Remove ShadowRoot's previous/next ShadowRoot pointers.
<http://webkit.org/b/115588>
Reviewed by Anders Carlsson.
ShadowRoot no longer inherits from DoublyLinkedListNode<ShadowRoot> because that code wasn't
doing anything anymore. Shrinks ShadowRoot by two pointers.
* dom/ElementShadow.h:
* dom/ShadowRoot.cpp:
(SameSizeAsShadowRoot):
(WebCore::ShadowRoot::ShadowRoot):
(WebCore::ShadowRoot::~ShadowRoot):
* dom/ShadowRoot.h:
2013-05-04 Andreas Kling <akling@apple.com>
RenderObject: don't change GraphicsContext state when not drawing dashed/dotted lines.
From Blink r149546 by <jbroman@chromium.org>
<http://src.chromium.org/viewvc/blink?view=revision&revision=149546>
Previously, there was asymmetry between changing and restoring state (certain state
would be restored only if thickness was positive, i.e. a line was actually drawn.)
* rendering/RenderObject.cpp:
(WebCore::RenderObject::drawLineForBoxSide):
2013-05-03 Andreas Kling <akling@apple.com>
Remove CSS selector profiler branches from ElementRuleCollector loop.
<http://webkit.org/b/115581>
Reviewed by Antti Koivisto.
Templatize the method so we don't have to check for active inspector frontends on every
pass through the loop.
Time spent in this loop goes down from 0.5% to 0.2% on iTunes Store, WebCore binary size
goes up 480 bytes (sorry Benjamin, I'll make it up to you.)
* css/ElementRuleCollector.h:
* css/ElementRuleCollector.cpp:
(WebCore::ElementRuleCollector::collectMatchingRulesForList):
(WebCore::ElementRuleCollector::doCollectMatchingRulesForList):
2013-04-30 Robert Hogan <robert@webkit.org>
REGRESSION(r140907): Incorrect baseline on cells after updating vertical-align
https://bugs.webkit.org/show_bug.cgi?id=115432
Reviewed by Julien Chaffraix.
If a cell changes vertical-align any intrinsic padding it has is now redundant. It
needs to calculate its new height from RenderTableRow::layout() and then find its
new intrinsic padding in RenderTableSection::layoutRows().
Test: fast/table/correct-baseline-after-style-change.html
* rendering/RenderTableCell.cpp:
(WebCore::RenderTableCell::styleDidChange):
2013-05-03 Arnaud Renevier <a.renevier@sisa.samsung.com>
incorrect repainting when a table has a transform
https://bugs.webkit.org/show_bug.cgi?id=109867
Reviewed by Simon Fraser.
Disable LayoutState when table, tableRow or tableSection render
objects have transforms or reflections.
Tests: fast/repaint/reflection-table-layout.html
fast/repaint/transform-table-layout.html
* rendering/RenderTable.cpp:
(WebCore::RenderTable::layout):
* rendering/RenderTableRow.cpp:
(WebCore::RenderTableRow::layout):
* rendering/RenderTableSection.cpp:
(WebCore::RenderTableSection::layout):
(WebCore::RenderTableSection::layoutRows):
2013-05-03 Antti Koivisto <antti@apple.com>
Remove concept of younger and older shadow trees
https://bugs.webkit.org/show_bug.cgi?id=115570
Reviewed by Andreas Kling.
Younger and older shadow trees are an obscure corner of the Shadow DOM spec.
Support only one shadow tree per element. This simplifies many things.
* dom/ComposedShadowTreeWalker.cpp:
(WebCore::ComposedShadowTreeWalker::traverseChild):
(WebCore::ComposedShadowTreeWalker::traverseSiblingInCurrentTree):
(WebCore):
(WebCore::ComposedShadowTreeWalker::traverseParent):
(WebCore::ComposedShadowTreeWalker::traverseParentInCurrentTree):
(WebCore::ComposedShadowTreeWalker::traverseParentBackToShadowRootOrHost):
* dom/ComposedShadowTreeWalker.h:
(WebCore::ComposedShadowTreeWalker::assertPrecondition):
(ComposedShadowTreeWalker):
* dom/ContainerNodeAlgorithms.cpp:
(WebCore::ChildNodeInsertionNotifier::notifyDescendantInsertedIntoDocument):
(WebCore::ChildNodeInsertionNotifier::notifyDescendantInsertedIntoTree):
(WebCore::ChildNodeRemovalNotifier::notifyDescendantRemovedFromDocument):
(WebCore::ChildNodeRemovalNotifier::notifyDescendantRemovedFromTree):
(WebCore::ChildFrameDisconnector::collectFrameOwners):
(WebCore::assertConnectedSubrameCountIsConsistent):
* dom/Document.cpp:
(WebCore::Document::buildAccessKeyMap):
* dom/Element.cpp:
(WebCore::Element::authorShadowRoot):
(WebCore::Element::userAgentShadowRoot):
(WebCore::Element::ensureUserAgentShadowRoot):
* dom/Element.h:
(Element):
(WebCore::Element::hasAuthorShadowRoot):
* dom/Element.idl:
* dom/ElementShadow.cpp:
(WebCore::ElementShadow::addShadowRoot):
Allow only one ShadowRoot per ElementShadow. Remove linked list handling.
(WebCore::ElementShadow::removeAllShadowRoots):
(WebCore::ElementShadow::attach):
(WebCore::ElementShadow::detach):
(WebCore::ElementShadow::childNeedsStyleRecalc):
(WebCore::ElementShadow::needsStyleRecalc):
(WebCore::ElementShadow::recalcStyle):
(WebCore::ElementShadow::removeAllEventListeners):
* dom/ElementShadow.h:
(WebCore::ElementShadow::shadowRoot):
(ElementShadow):
(WebCore::ElementShadow::host):
(WebCore::Node::shadowRoot):
(WebCore):
* dom/Node.cpp:
(WebCore):
(WebCore::Node::showNodePathForThis):
(WebCore::traverseTreeAndMark):
(WebCore::showSubTreeAcrossFrame):
* dom/Node.h:
(Node):
* dom/ShadowRoot.cpp:
(WebCore::ShadowRoot::insertedInto):
* dom/ShadowRoot.h:
(ShadowRoot):
Remove LinkedList base.
* dom/TreeScopeAdopter.cpp:
(WebCore::TreeScopeAdopter::moveTreeToNewScope):
(WebCore::TreeScopeAdopter::moveTreeToNewDocument):
* html/shadow/ContentDistributor.cpp:
(WebCore::ContentDistributor::distribute):
(WebCore::ContentDistributor::invalidate):
(WebCore::ContentDistributor::ensureSelectFeatureSet):
* inspector/InspectorDOMAgent.cpp:
(WebCore::InspectorDOMAgent::unbind):
(WebCore::InspectorDOMAgent::buildObjectForNode):
* page/FocusController.cpp:
(WebCore::FocusNavigationScope::FocusNavigationScope):
(WebCore::FocusNavigationScope::focusNavigationScopeOwnedByShadowHost):
* rendering/RenderFileUploadControl.cpp:
(WebCore::RenderFileUploadControl::uploadButton):
* svg/SVGTRefElement.cpp:
(WebCore::SVGTRefElement::updateReferencedText):
(WebCore::SVGTRefElement::detachTarget):
* svg/SVGUseElement.cpp:
(WebCore::SVGUseElement::clearResourceReferences):
(WebCore::SVGUseElement::buildShadowAndInstanceTree):
(WebCore::SVGUseElement::buildShadowTree):
* testing/Internals.cpp:
(WebCore::Internals::ensureShadowRoot):
(WebCore::Internals::shadowRoot):
(WebCore):
* testing/Internals.h:
(Internals):
* testing/Internals.idl:
2013-05-03 Martin Robinson <mrobinson@igalia.com>
Simplify the #ifdefs in GraphicsContext3D.h
https://bugs.webkit.org/show_bug.cgi?id=115568
Reviewed by Daniel Bates.
* platform/graphics/GraphicsContext3D.h:
(GraphicsContext3D): Combine #ifdefs paths that have a common
implementation. This reduces the #ifdef paths from many to just three.
* platform/graphics/cairo/GraphicsContext3DCairo.cpp:
(WebCore::GraphicsContext3D::platformTexture): Move the implementation
here to simplify the header.
* platform/graphics/efl/GraphicsContext3DEfl.cpp:
(WebCore::GraphicsContext3D::platformTexture): Ditto.
(WebCore):
2013-05-03 Brendan Long <b.long@cablelabs.com>
[Qt] Build with --video-track fails because String(AtomicString) is ambiguous
https://bugs.webkit.org/show_bug.cgi?id=115551
Reviewed by Benjamin Poulain.
* html/HTMLMediaElement.cpp:
(WebCore::HTMLMediaElement::configureTextTrackGroup):
Change String(textTrack->kind()) to textTrack->kind().string(), and same thing with language.
2013-05-03 Xabier Rodriguez Calvar <calvaris@igalia.com>
[GStreamer] GStreamer log crashes in MediaPlayerPrivateGStreamerBase because of uninitialized category
https://bugs.webkit.org/show_bug.cgi?id=115575
Reviewed by Philippe Normand.
No new tests needed.
* platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:
Using extern debug category.
* platform/graphics/gstreamer/MediaPlayerPrivateGStreamerBase.cpp:
Declaring debug category as not static.
2013-05-03 Brent Fulgham <bfulgham@webkit.org>
[WinCairo] Unreviewed VS2010 Build Correction.
* WebCore.vcxproj/WebCore.vcxproj: Exclude CG-only
SubimageCacheWithTimer.cpp from WinCairo build.
2013-05-03 Viatcheslav Ostapenko <viatchslav.o@samsung.com>
[Cairo] Anti-aliasing should not be always disabled for lines
https://bugs.webkit.org/show_bug.cgi?id=109535
Reviewed by Martin Robinson.
Don't disable antialiasing for text lines because it produces ugly picture if
page is scaled.
Test: fast/css3-text/css3-text-decoration/text-decoration-line-scaled.html
* platform/graphics/cairo/GraphicsContextCairo.cpp:
(WebCore::drawLineOnCairoContext):
2013-05-03 Daniel Bates <dbates@webkit.org>
Remove unnecessary include HTMLNames.h from RenderThemeGtk.cpp
https://bugs.webkit.org/show_bug.cgi?id=115571
Reviewed by Martin Robinson.
* platform/gtk/RenderThemeGtk.cpp:
2013-05-03 Alexey Proskuryakov <ap@apple.com>
[Mac] setMetadataURL incorrectly treats path bytes as Latin-1
https://bugs.webkit.org/show_bug.cgi?id=115557
Reviewed by Sam Weinig.
* platform/mac/FileSystemMac.mm: (WebCore::setMetaData): Use the correct constructor.
2013-05-03 Andrei Bucur <abucur@adobe.com>
Move pixelSnappedLayoutOverflowRect and maxLayoutOverflow from RenderBox
https://bugs.webkit.org/show_bug.cgi?id=115550
Reviewed by Simon Fraser.
The patch moves pixelSnappedLayoutOverflowRect and maxLayoutOverflow out
of RenderBox somewhere logically closer to their usage place.
pixelSnappedLayoutOverflowRect - moved to RenderView because it's called only
for RenderView at this moment.
There are other places when the overflow rect is pixel snapped but only after
the rect is adjusted for writing modes or inflated.
maxLayoutOverflow - moved to RenderTreeAsText.cpp as a static function because
it's used only there.
Tests: no new functional change.
* rendering/RenderBox.h: The functions declarations are removed.
* rendering/RenderTreeAsText.cpp:
(WebCore::maxLayoutOverflow):
* rendering/RenderView.h:
(WebCore::RenderView::pixelSnappedLayoutOverflowRect):
2013-05-03 Andreas Kling <akling@apple.com>
StyleResolver: Have "list of matched rules" API vend internal types instead of CSSOM wrappers.
<http://webkit.org/b/115563>
Reviewed by Antti Koivisto.
Change styleRulesForElement() and pseudoStyleRulesForElement() to return Vectors of StyleRuleBase
instead of CSSRuleLists. This defers instantiating CSSOM wrappers until they're actually needed
for exposure to web API.
* page/DOMWindow.cpp:
(WebCore::DOMWindow::getMatchedCSSRules):
Create a StaticCSSRuleList and populate it with CSSOM wrappers for the matched rules.
This is the one place where we expose this functionality to the web.
* css/ElementRuleCollector.h:
* css/ElementRuleCollector.cpp:
(WebCore::ElementRuleCollector::matchedRuleList):
(WebCore::ElementRuleCollector::sortAndTransferMatchedRules):
Collect internal StyleRuleBase pointers here instead of creating wrappers.
* css/StyleResolver.h:
* css/StyleResolver.cpp:
(WebCore::StyleResolver::styleRulesForElement):
(WebCore::StyleResolver::pseudoStyleRulesForElement):
Vend said pointers.
* editing/EditingStyle.cpp:
(WebCore::styleFromMatchedRulesForElement):
Dodge CSSOM wrapper instantiation (Woop woop!)
* inspector/InspectorCSSAgent.h:
* inspector/InspectorCSSAgent.cpp:
(WebCore::InspectorCSSAgent::buildObjectForRule):
Split buildObjectForRule() into two versions, one for CSSStyleRule and one for StyleRule.
The CSSStyleRule one doesn't need a special path for parent-less rules, since those always
come in through the StyleRule interface instead. This factoring can be improved further
after this change.
(WebCore::InspectorCSSAgent::getMatchedStylesForNode):
(WebCore::InspectorCSSAgent::buildArrayForRuleList):
(WebCore::InspectorCSSAgent::buildArrayForMatchedRuleList):
Tweaked for changes in StyleResolver API.
2013-05-03 Alexey Proskuryakov <ap@apple.com>
REGRESSION (r145042): Downloading a file sometimes results in could not create
a sandbox extension Console message and file stays as a .download file
https://bugs.webkit.org/show_bug.cgi?id=115559
<rdar://problem/13785101>
Reviewed by Sam Weinig.
CString is evil, it has two lengths which can be different - specifically, fileSystemRepresentation()
creates a string with maximum possible buffer size. This was confusing resolveSymlinksInPath().
* platform/cf/FileSystemCF.cpp: (WebCore::fileSystemRepresentation):
Change fileSystemRepresentation to be less surprising. Really, we should rip apart
CString and update callers to use better defined semantics, but this is the one function
that repeatedly causes problems in practice.
2013-05-03 Andreas Kling <akling@apple.com>
CSSRule style declarations getters shouldn't be const.
<http://webkit.org/b/115572>
Reviewed by Antti Koivisto.
Accessing the CSSStyleDeclaration for a CSSRule is a potentially mutating operation,
and should not be const.
* css/CSSFontFaceRule.cpp:
(WebCore::CSSFontFaceRule::style):
* css/CSSFontFaceRule.h:
* css/CSSPageRule.cpp:
(WebCore::CSSPageRule::style):
* css/CSSPageRule.h:
* css/CSSStyleRule.cpp:
(WebCore::CSSStyleRule::style):
* css/CSSStyleRule.h:
(CSSStyleRule):
* css/WebKitCSSFilterRule.cpp:
(WebCore::WebKitCSSFilterRule::style):
* css/WebKitCSSFilterRule.h:
* css/WebKitCSSKeyframeRule.cpp:
(WebCore::WebKitCSSKeyframeRule::style):
* css/WebKitCSSKeyframeRule.h:
(WebKitCSSKeyframeRule):
* css/WebKitCSSViewportRule.cpp:
(WebCore::WebKitCSSViewportRule::style):
* css/WebKitCSSViewportRule.h:
2013-05-03 Andreas Kling <akling@apple.com>
Use NotNull tag for placement new in WebCore.
<http://webkit.org/b/115569>
Reviewed by Antti Koivisto.
Avoid emitting null checks where we use placement new to construct objects into safe locations.
* css/StylePropertySet.cpp:
(WebCore::ImmutableStylePropertySet::create):
* dom/Element.cpp:
(WebCore::ShareableElementData::createWithAttributes):
(WebCore::ShareableElementData::ShareableElementData):
(WebCore::UniqueElementData::makeShareableCopy):
* dom/QualifiedName.cpp:
(WebCore::QualifiedName::init):
(WebCore::createQualifiedName):
* dom/make_names.pl:
(printNamesCppFile):
* platform/ThreadGlobalData.h:
(WebCore::threadGlobalData):
* platform/graphics/GlyphPage.h:
(WebCore::GlyphPage::createForMixedFontData):
2013-01-11 Andreas Kling <akling@apple.com>
Simplify CSSSelectorList creation/adoption.
<http://webkit.org/b/106649>
Reviewed by Antti Koivisto.
Remove the optimization that special-cased construction of CSSSelectorLists with a single entry.
This is in preparation for changing the way we store the selector lists on style rules.
* css/CSSParser.h:
* css/CSSSelector.h:
Remove move(PassOwnPtr<CSSSelector> from, CSSSelector* to), inlining it into
CSSSelectorList::adoptSelectorVector instead.
* css/CSSSelectorList.cpp:
(WebCore::CSSSelectorList::CSSSelectorList):
(WebCore::CSSSelectorList::deleteSelectors):
Handle all selector list lengths the same way.
(WebCore::CSSSelectorList::adoptSelectorVector):
Merge move() from CSSSelector.h into this code since it was the only call site.
Also some minor readability cleanups.
2013-05-03 Antti Koivisto <antti@apple.com>
Remove HTMLShadowElement
https://bugs.webkit.org/show_bug.cgi?id=115555
Reviewed by Andreas Kling.
This is not used internally.
* CMakeLists.txt:
* DerivedSources.cpp:
* DerivedSources.make:
* DerivedSources.pri:
* GNUmakefile.list.am:
* Target.pri:
* WebCore.vcproj/WebCore.vcproj:
* WebCore.vcxproj/WebCore.vcxproj:
* WebCore.vcxproj/WebCore.vcxproj.filters:
* WebCore.xcodeproj/project.pbxproj:
* dom/ComposedShadowTreeWalker.cpp:
* dom/NodeRenderingContext.cpp:
* html/HTMLElementsAllInOne.cpp:
* html/HTMLTagNames.in:
* html/InputType.cpp:
(WebCore::InputType::destroyShadowSubtree):
* html/shadow/ContentDistributor.cpp:
(WebCore::ContentDistributor::distribute):
* html/shadow/HTMLShadowElement.cpp: Removed.
* html/shadow/HTMLShadowElement.h: Removed.
* html/shadow/HTMLShadowElement.idl: Removed.
* page/DOMWindow.idl:
2013-05-03 Mikhail Pozdnyakov <mikhail.pozdnyakov@intel.com>
Remove WTF::ListRefPtr class
https://bugs.webkit.org/show_bug.cgi?id=115516
Reviewed by Anders Carlsson.
ListRefPtr was used only by FontFamily class, besides it strongly depended
on FontFamily class semantics which made it non-generic and inappropriate
for being present inside WTF.
This patch removes WTF::ListRefPtr class and moves its the functionality
into FontFamily class.
No new tests, no change in the behavior.
* page/FrameTree.h:
(FrameTree):
* platform/graphics/FontFamily.h:
(FontFamily):
(WebCore::FontFamily::~FontFamily):
(WebCore):
2013-05-03 Allan Sandfeld Jensen <allan.jensen@digia.com>
Crash when calling QWebFrame::evaluateJavaScript
https://bugs.webkit.org/show_bug.cgi?id=113434
Reviewed by Simon Hausmann.
We must take the JS API lock before accessing internal JS methods.
* bridge/qt/qt_runtime.cpp:
(JSC::Bindings::unwrapBoxedPrimitive):
(JSC::Bindings::getGregorianDateTimeUTC):
(JSC::Bindings::convertQVariantToValue):
2013-05-02 Xan Lopez <xlopez@igalia.com>
[GTK] Fine tune dependencies for glslang generated files
https://bugs.webkit.org/show_bug.cgi?id=115537
Reviewed by Martin Robinson.
Make glslang.* explictly depend on glslang_tab.*, since the
dependency does exist. Otherwise Make might decide to compile
things ahead of time and fail.
* GNUmakefile.am:
2013-05-02 KyungTae Kim <ktf.kim@samsung.com>
Fix build warnings on ResourceHandleClient.h
https://bugs.webkit.org/show_bug.cgi?id=115540
Reviewed by Alexey Proskuryakov.
Comment out the parameter names for 'getOrCreateReadBuffer' to fix -Wunused-parameter build warnings.
* platform/network/ResourceHandleClient.h:
(WebCore::ResourceHandleClient::getOrCreateReadBuffer):
2013-05-02 Roger Fong <roger_fong@apple.com>
Following r149463, set Path for WebCore makefile as well.
* WebCore.vcxproj/WebCore.make:
2013-05-02 Eric Carlson <eric.carlson@apple.com>
Unreviewed fix for Mac Lion build after r149503.
* platform/graphics/avfoundation/objc/InbandTextTrackPrivateLegacyAVFObjC.h:
* platform/graphics/avfoundation/objc/InbandTextTrackPrivateLegacyAVFObjC.mm:
2013-05-02 David Kilzer <ddkilzer@apple.com>
BUILD FIX: Move Mac-only symbols into the shared symbol list
* WebCore.exp.in: Move symbols.
2013-05-02 Antti Koivisto <antti@apple.com>
Shadow DOM removal: Get rid of ContentSelectorQuery
https://bugs.webkit.org/show_bug.cgi?id=115533
Reviewed by Anders Carlsson.
This is only used for Shadow DOM distribution. <details> element works fine without it.
* CMakeLists.txt:
* GNUmakefile.list.am:
* Target.pri:
* WebCore.vcproj/WebCore.vcproj:
* WebCore.vcxproj/WebCore.vcxproj:
* WebCore.vcxproj/WebCore.vcxproj.filters:
* WebCore.xcodeproj/project.pbxproj:
* html/shadow/ContentDistributor.cpp:
(WebCore::ContentDistributor::distributeSelectionsTo):
* html/shadow/ContentSelectorQuery.cpp: Removed.
* html/shadow/ContentSelectorQuery.h: Removed.
* html/shadow/HTMLContentElement.cpp:
2013-05-02 Arnaud Renevier <a.renevier@sisa.samsung.com>
border-radius clipping a canvas does not always clip
https://bugs.webkit.org/show_bug.cgi?id=113343
Reviewed by Simon Fraser.
clipToRect method clip context to clipRect, and then clip to rounded
rect if clipRect has a radius. But currently, clipToRect exit early if
clipToRect is equal to paintDirtyRect.
This patch allows clipping to rounded corner ever if clipToRect is
equal to paintDirtyRect.
Test: fast/overflow/border-radius-clipping-2.html
* rendering/RenderLayer.cpp:
(WebCore::RenderLayer::clipToRect):
2013-05-02 Eric Carlson <eric.carlson@apple.com>
Caption menu does not include in-band captions
https://bugs.webkit.org/show_bug.cgi?id=111934
Reviewed by Dean Jackson.
No new tests, upated existing tests for these changes.
* WebCore.xcodeproj/project.pbxproj: Add new files.
* html/HTMLMediaElement.cpp:
(WebCore::HTMLMediaElement::HTMLMediaElement): Initialize m_legacyWebKitClosedCaptionsVisible.
(WebCore::HTMLMediaElement::loadInternal): Clear the LoadMediaResource from m_pendingActionFlags
in case there is a pending async load.
(WebCore::HTMLMediaElement::configureTextTrackGroup): Always log the track score.
(WebCore::HTMLMediaElement::configureTextTracks): Call configureTextTrackDisplay so
m_legacyWebKitClosedCaptionsVisible is always updated immediately.
(WebCore::HTMLMediaElement::setWebkitClosedCaptionsVisible): Use m_legacyWebKitClosedCaptionsVisible.
(WebCore::HTMLMediaElement::webkitClosedCaptionsVisible): Ditto.
* html/HTMLMediaElement.h:
* page/CaptionUserPreferences.cpp:
(WebCore::CaptionUserPreferences::CaptionUserPreferences): Initialize m_displayMode to ForcedOnly
because it is no longer used for testing only.
(WebCore::CaptionUserPreferences::notify): Post notifications when not in testing-only mode.
* page/CaptionUserPreferencesMac.h:
* page/CaptionUserPreferencesMac.mm:
(WebCore::CaptionUserPreferencesMac::textTrackSelectionScore): Calculate a track score when
webkitClosedCaptionsVisible has been set.
(WebCore::CaptionUserPreferencesMac::sortedTrackListForMenu): Don't filter track list when we
don't have the media accessibility framework. Make logging more informative.
* platform/graphics/avfoundation/InbandTextTrackPrivateAVF.h:
* platform/graphics/avfoundation/MediaPlayerPrivateAVFoundation.h:
* platform/graphics/avfoundation/objc/InbandTextTrackPrivateAVFObjC.h:
(WebCore::InbandTextTrackPrivateAVFObjC::create): Take a AVFInbandTrackParent instead of a
MediaPlayerPrivateAVFoundationObjC.
* platform/graphics/avfoundation/objc/InbandTextTrackPrivateAVFObjC.mm:
(WebCore::InbandTextTrackPrivateAVFObjC::InbandTextTrackPrivateAVFObjC): Ditto.
* platform/graphics/avfoundation/objc/InbandTextTrackPrivateLegacyAVFObjC.h: Added.
* platform/graphics/avfoundation/objc/InbandTextTrackPrivateLegacyAVFObjC.mm: Added.
* platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.h:
* platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
(WebCore::MediaPlayerPrivateAVFoundationObjC::cancelLoad): We only have legible output when
HAVE_AVFOUNDATION_LEGIBLE_OUTPUT_SUPPORT is defined.
(WebCore::MediaPlayerPrivateAVFoundationObjC::createAVPlayer): Ditto.
(WebCore::MediaPlayerPrivateAVFoundationObjC::createAVPlayerItem): Ditto.
(WebCore::MediaPlayerPrivateAVFoundationObjC::tracksChanged): Create a legacy CC track if
there are no media selection options and there is a CC AVAssetTrack.
(WebCore::MediaPlayerPrivateAVFoundationObjC::processLegacyCCTracks): New, process CC tracks.
(WebCore::MediaPlayerPrivateAVFoundationObjC::processNewAndRemovedTextTracks): New, refactored
common setup/cleanup code from processMediaSelectionOptions.
(WebCore::MediaPlayerPrivateAVFoundationObjC::processMediaSelectionOptions): Renamed from
processTextTracks. Move common setup/cleanup code to processNewAndRemovedTextTracks.
(WebCore::MediaPlayerPrivateAVFoundationObjC::setCurrentTrack): Deal with legacy CC tracks.
2013-05-02 Eric Carlson <eric.carlson@apple.com>
[Mac] caption track menu includes "easy to read" in-band tracks twice
https://bugs.webkit.org/show_bug.cgi?id=115529
Reviewed by Dean Jackson.
* page/CaptionUserPreferencesMac.mm:
(WebCore::CaptionUserPreferencesMac::sortedTrackListForMenu): Check to see if a track is
easy-to-read after checking if it is forced only.
2013-05-02 Antti Koivisto <antti@apple.com>
Remove SiblingTraversalStrategies.h
https://bugs.webkit.org/show_bug.cgi?id=115532
Reviewed by Andreas Kling.
* GNUmakefile.list.am:
* Target.pri:
* WebCore.vcproj/WebCore.vcproj:
* WebCore.vcxproj/WebCore.vcxproj:
* WebCore.vcxproj/WebCore.vcxproj.filters:
* WebCore.xcodeproj/project.pbxproj:
* css/SiblingTraversalStrategies.h: Removed.
2013-05-02 Antti Koivisto <antti@apple.com>
Shadow DOM removal: Make SelectorChecker non-generic
https://bugs.webkit.org/show_bug.cgi?id=115526
Reviewed by Andreas Kling.
Without Shadow DOM distribution we don't need SiblingTraversalStrategies anymore.
* css/ElementRuleCollector.cpp:
(WebCore::ElementRuleCollector::ruleMatches):
* css/SelectorChecker.cpp:
(WebCore):
(WebCore::isFirstChildElement):
(WebCore::isLastChildElement):
(WebCore::isFirstOfType):
(WebCore::isLastOfType):
(WebCore::countElementsBefore):
(WebCore::countElementsOfTypeBefore):
(WebCore::countElementsAfter):
(WebCore::countElementsOfTypeAfter):
(WebCore::SelectorChecker::match):
(WebCore::SelectorChecker::checkOne):
* css/SelectorChecker.h:
(SelectorChecker):
* css/SiblingTraversalStrategies.h:
* css/StyleResolver.h:
(WebCore::checkRegionSelector):
* dom/SelectorQuery.cpp:
(WebCore::SelectorDataList::selectorMatches):
* html/shadow/ContentSelectorQuery.cpp:
(WebCore::ContentSelectorDataList::checkContentSelector):
2013-05-02 Anders Carlsson <andersca@apple.com>
Simplify WebCoreObjCExtras by using WTF::bind
https://bugs.webkit.org/show_bug.cgi?id=115524
Reviewed by Andreas Kling.
* platform/mac/WebCoreObjCExtras.mm:
(deallocCallback):
(WebCoreObjCScheduleDeallocateOnMainThread):
2013-05-02 Alexey Proskuryakov <ap@apple.com>
<rdar://problem/13740375> Non-ASCII downloaded file names are garbled when using NetworkProcess
https://bugs.webkit.org/show_bug.cgi?id=115520
Reviewed by Darin Adler.
Covered by existing tests when using NetworkProcess.
* WebCore.exp.in:
* platform/network/ResourceRequestBase.h:
(WebCore::ResourceRequestBase::responseContentDispositionEncodingFallbackArray):
Added a getter for encoding fallback array.
* platform/network/mac/ResourceRequestMac.mm:
(WebCore::ResourceRequest::doUpdateResourceRequest):
(WebCore::ResourceRequest::doUpdatePlatformRequest):
Removed obsolete checks for presence of fallback array methods, they were available
since 10.6.8.
2013-05-01 Enrica Casucci <enrica@apple.com>
text-combine: horizontal does not work properly for some fonts.
https://bugs.webkit.org/show_bug.cgi?id=115503.
Reviewed by Dave Hyatt.
For some fonts that don't have width variants, we fail to combine glyphs
because we believe they don't fit. That decision is made comparing the run width
with the font computed size multiplied by a margin factor.
I've increased the margin from 10% to 15%.
Test: fast/text/text-combine-different-fonts.html
* rendering/RenderCombineText.cpp:
2013-05-01 Joseph Pecoraro <pecoraro@apple.com>
Null check plugInClient earlier in snapshotting path
https://bugs.webkit.org/show_bug.cgi?id=115498
Reviewed by Darin Adler.
* html/HTMLPlugInImageElement.cpp:
(WebCore::HTMLPlugInImageElement::subframeLoaderWillCreatePlugIn):
2013-05-01 Seokju Kwon <seokju.kwon@gmail.com>
Web Inspector: Fix check-inspector-strings script and fix localized strings
https://bugs.webkit.org/show_bug.cgi?id=115495
Reviewed by Joseph Pecoraro.
No new tests, because there is no change in behavior.
* English.lproj/localizedStrings.js:
2013-05-01 Tim Horton <timothy_horton@apple.com>
<object data="<some data URL>"> MIME types aren't case-insensitive
https://bugs.webkit.org/show_bug.cgi?id=115494
Reviewed by Darin Adler.
Test: fast/images/object-data-url-case-insensitivity.html
MIME types are defined to be case-insensitive, but many places in WebCore
only compare them against lower-case strings. Most entry points for MIME
types lower-case them, but mimeTypeFromDataURL doesn't, causing, for example,
data:image/png;... to work, but data:iMaGe/PNG;... to fail.
To fix this, lower-case the string returned from mimeTypeFromDataURL.
* platform/KURL.cpp:
(WebCore::mimeTypeFromDataURL):
2013-05-01 Ryosuke Niwa <rniwa@webkit.org>
[Mac] Text replacement should use correction indicator
https://bugs.webkit.org/show_bug.cgi?id=115471
Reviewed by Darin Adler.
Support autocorrection panel for text replacements by making AlternativeTextTypeCorrection
handle text replacements as well as automatic spelling correction.
No new tests. Unfortunately this feature is not testable as is. We need to provide some
internals or testRunner methods to make this feature testable in the long term.
* editing/AlternativeTextController.cpp:
(WebCore::AlternativeTextController::timerFired): Trigger both TextCheckingTypeReplacement
and TextCheckingTypeShowCorrectionPanel.
* editing/Editor.cpp:
(WebCore::Editor::markAndReplaceFor): Autocorrection panel maybe used for both
TextCheckingTypeReplacement and TextCheckingTypeShowCorrectionPanel.
2013-05-01 Tim Horton <timothy_horton@apple.com>
Move knowledge of PDF/PostScript MIME types into MIMETypeRegistry
https://bugs.webkit.org/show_bug.cgi?id=115487
Reviewed by Darin Adler.
No new tests, just a refactoring.
* WebCore.exp.in:
Export newly-added isPDFOrPostScriptMIMEType and getPDFAndPostScriptMIMETypes.
* dom/DOMImplementation.cpp:
(WebCore::DOMImplementation::createDocument):
Adopt MIMETypeRegistry::isPDFOrPostScriptMIMEType instead of duplicating
the list of MIME types. The previous list did not include PostScript, but
it seems reasonable to put plugins ahead of built-in support for it in addition to PDF.
* platform/MIMETypeRegistry.cpp:
(WebCore::initializePDFAndPostScriptMIMETypes): Added.
(WebCore::initializeMIMETypeRegistry): Call initializePDFAndPostScriptMIMETypes.
(WebCore::MIMETypeRegistry::isPDFOrPostScriptMIMEType):
Consult our new HashSet to see if the given MIME type is one of those used for PDF or PS.
(WebCore::MIMETypeRegistry::getPDFAndPostScriptMIMETypes): Added.
* platform/MIMETypeRegistry.h:
(MIMETypeRegistry): Add isPDFOrPostScriptMIMEType and getPDFAndPostScriptMIMETypes.
2013-05-01 Anders Carlsson <andersca@apple.com>
Implement LocalStorageDatabase::importItems
https://bugs.webkit.org/show_bug.cgi?id=115493
Reviewed by Andreas Kling.
Export symbols needed by WebKit2.
* WebCore.exp.in:
2013-05-01 Anders Carlsson <andersca@apple.com>
Begin work on loading items from the local storage database
https://bugs.webkit.org/show_bug.cgi?id=115489
Reviewed by Andreas Kling.
Export symbols and SQLite headers needed.
* WebCore.exp.in:
* WebCore.xcodeproj/project.pbxproj:
2013-05-01 Hans Muller <hmuller@adobe.com>
[CSS Exclusions] Programmatic layout tests fail when subpixel layout is disabled
https://bugs.webkit.org/show_bug.cgi?id=115455
First round of changes to restore platform/mac exclusion tests that started failing when
subpixel layout was turned off.
Reviewed by Dirk Schulze.
* rendering/ExclusionPolygon.cpp:
(WebCore::appendArc): Ensure that the 3rd of 5 added vertices is in the center of the arc.
(WebCore::ExclusionPolygon::firstIncludedIntervalLogicalTop): Use ceiledLayoutUnit() for downwards-snapping first fit location.
* rendering/ExclusionRectangle.cpp:
(WebCore::ExclusionRectangle::firstIncludedIntervalLogicalTop): Ditto.
2013-05-01 Enrica Casucci <enrica@apple.com>
Incorrect layout for blocks containing ideographs with -webkit-linebox-contain: glyphs, font, inline-box.
https://bugs.webkit.org/show_bug.cgi?id=115478.
Reviewed by Dave Hyatt.
Test: fast/block/lineboxcontain/block-with-ideographs.xhtml
When computing ascent and descent we need to take into account
the baseline type. RootInlineBox::ascentAndDescentForBox failed
to do that in few cases.
* rendering/RootInlineBox.cpp:
(WebCore::RootInlineBox::ascentAndDescentForBox):
2013-05-01 Anders Carlsson <andersca@apple.com>
Add LocalStorageDatabase class
https://bugs.webkit.org/show_bug.cgi?id=115486
Reviewed by Sam Weinig.
Export symbols needed by WebKit2.
* WebCore.exp.in:
2013-05-01 Eric Carlson <eric.carlson@apple.com>
[Mac Lion] Assertion failure in MediaControlTextTrackContainerElement::updateDisplay()
https://bugs.webkit.org/show_bug.cgi?id=115289
Reviewed by Jer Noble.
No new tests, this is a speculative fix for an infrequent assertion.
* html/HTMLMediaElement.cpp:
(WebCore::HTMLMediaElement::textTrackRemoveCue): Mark the cue as inactive when it is removed
from the active set.
2013-05-01 Joseph Pecoraro <pecoraro@apple.com>
TextTrackMenu crashes in ports where MediaElement players are lazily created
https://bugs.webkit.org/show_bug.cgi?id=115485
Null check the player for ports, like iOS, that lazily create the player.
Reviewed by Eric Carlson.
* html/HTMLMediaElement.cpp:
(WebCore::HTMLMediaElement::platformTextTrackMenu):
(WebCore::HTMLMediaElement::closeCaptionTracksChanged):
2013-05-01 Anders Carlsson <andersca@apple.com>
Add FunctionDispatcher class and make RunLoop derive from it
https://bugs.webkit.org/show_bug.cgi?id=115480
Reviewed by Sam Weinig.
Change RunLoop to be a subclass of FunctionDispatcher.
* platform/RunLoop.h:
(RunLoop):
2013-05-01 Eric Carlson <eric.carlson@apple.com>
HTMLMediaElement::updateActiveTextTrackCues can do unnecessary work
https://bugs.webkit.org/show_bug.cgi?id=81856
Reviewed by Jer Noble.
No new tests, covered by existing tests.
* html/HTMLMediaElement.h:
(WebCore::HTMLMediaElement::ignoreTrackDisplayUpdateRequests): Add an early return when there
is obviously no work to be done.
2013-04-30 Jer Noble <jer.noble@apple.com>
Closed caption lines overlap
https://bugs.webkit.org/show_bug.cgi?id=115438
<rdar://problem/13351747>
Reviewed by Eric Carlson.
Take the line-box padding into account when determining line hight by setting
the -webkit-line-box-contain property to include 'inline-box'.
* css/mediaControls.css:
(video::-webkit-media-text-track-container):
2013-05-01 David Kilzer <ddkilzer@apple.com>
BUILD FIX (r149410): CFRunLoopStop() doesn't know what to do with a RetainPtr<CFRunLoopRef>
Fixes the following build failure:
WebCore/platform/cf/RunLoopCF.cpp:82:5: error: no matching function for call to 'CFRunLoopStop'
CFRunLoopStop(m_runLoop);
^~~~~~~~~~~~~
* platform/cf/RunLoopCF.cpp:
(WebCore::RunLoop::stop): Call RetainPtr::get().
2013-05-01 Per-Erik Brodin <per-erik.brodin@ericsson.com>
EventSource: Loss of reconnect time precision due to integer division
https://bugs.webkit.org/show_bug.cgi?id=115358
Make sure precision is not lost when converting the reconnect time from milliseconds to seconds.
Reviewed by Alexey Proskuryakov.
Test: http/tests/eventsource/eventsource-retry-precision.html
* page/EventSource.cpp:
(WebCore::EventSource::scheduleReconnect):
2013-05-01 Andreas Kling <akling@apple.com>
REGRESSION(r149287): Assertion failure in fast/frames/flattening/iframe-flattening-crash.html
<http://webkit.org/b/115386>
<rdar://problem/13769995>
Reviewed by Antti Koivisto.
Only send synchronous resize events for the main frame. Subframes change size during layout,
so it never really makes sense for them to use synchronous dispatch anyway.
* page/FrameView.cpp:
(WebCore::FrameView::dispatchResizeEvent):
2013-05-01 Csaba Osztrogonác <ossy@webkit.org>
Unreviewed trivial buildfix after r149432.
* testing/Internals.cpp:
(WebCore):
2013-05-01 Sergio Villar Senin <svillar@igalia.com>
Show a block cursor in overtype mode
https://bugs.webkit.org/show_bug.cgi?id=114819
Reviewed by Ryosuke Niwa.
Test: editing/selection/block-cursor-overtype-mode.html
Overtype mode will use block cursor instead of a caret to
highlight the next character to be replaced. It will fully cover
the next character to be replaced (except at the end of a line
where the usual blinking caret will be shown).
This new block cursor is internally implemented as a selection
(not exposed to JavaScript) because the selection code knows how
to deal with bidi text.
* WebCore.exp.in: Export symbols for testing purposes.
* WebCore.order: Ditto.
* editing/Editor.cpp:
(WebCore::Editor::toggleOverwriteModeEnabled): Added a call to
FrameLoader::setShouldShowBlockCursor.
(WebCore):
* editing/Editor.h:
(Editor):
* editing/FrameSelection.cpp:
(WebCore::FrameSelection::FrameSelection):
(WebCore::FrameSelection::updateAppearance): Use a 1-character
long selection to paint the cursor in overtype mode.
(WebCore::FrameSelection::setShouldShowBlockCursor):
(WebCore):
* editing/FrameSelection.h:
(WebCore::FrameSelection::shouldShowBlockCursor):
(FrameSelection):
* testing/Internals.cpp:
(WebCore):
(WebCore::Internals::selectionBounds): Added a new method which
returns the IntRect issued by FrameSelection::bounds().
* testing/Internals.h: Ditto.
* testing/Internals.idl: Ditto.
2013-04-30 Darin Adler <darin@apple.com>
[Mac] Remove adoptNS/retain pairs, since the two cancel each other out
https://bugs.webkit.org/show_bug.cgi?id=115426
Reviewed by Anders Carlsson.
* platform/graphics/ca/mac/PlatformCAAnimationMac.mm:
(PlatformCAAnimation::PlatformCAAnimation):
* platform/graphics/ca/mac/PlatformCAFiltersMac.mm:
(PlatformCAFilters::filterValueForOperation):
* platform/network/mac/ResourceResponseMac.mm:
(WebCore::ResourceResponse::nsURLResponse):
Remove adoptNS and release from code that is doing both.
2013-04-29 Sam Weinig <sam@webkit.org>
Add API to allow WebKit2 banners to get mouse events
https://bugs.webkit.org/show_bug.cgi?id=115395
Reviewed by Beth Dakin.
* WebCore.exp.in:
* platform/ScrollView.cpp:
(WebCore::ScrollView::rootViewToTotalContents):
* platform/ScrollView.h:
Add and expose rootViewToTotalContents().
2013-04-30 Anders Carlsson <andersca@apple.com>
Make RunLoop ref-counted
https://bugs.webkit.org/show_bug.cgi?id=115384
Reviewed by Benjamin Poulain.
Add a RunLoop::Holder class which creates and holds the ref-counted RunLoop object.
* platform/RunLoop.cpp:
(RunLoop::Holder):
(WebCore::RunLoop::Holder::Holder):
(WebCore::RunLoop::Holder::runLoop):
(WebCore::RunLoop::current):
* platform/RunLoop.h:
2013-04-30 Anders Carlsson <andersca@apple.com>
Clean up RunLoop code
https://bugs.webkit.org/show_bug.cgi?id=115454
Reviewed by Andreas Kling.
Delete a couple of functions from RunLoopCF.cpp and just use the generic ones in RunLoop.cpp,
use RetainPtr instead of manual retain/release. Always use an AutoreleasePool when calling performWork or timers.
* platform/RunLoop.cpp:
(WebCore::RunLoop::setUseApplicationRunLoopOnMainRunLoop):
(WebCore):
* platform/RunLoop.h:
(TimerBase):
(RunLoop):
* platform/cf/RunLoopCF.cpp:
(WebCore::RunLoop::performWork):
(WebCore::RunLoop::RunLoop):
(WebCore::RunLoop::~RunLoop):
(WebCore::RunLoop::wakeUp):
(WebCore::RunLoop::TimerBase::timerFired):
(WebCore::RunLoop::TimerBase::TimerBase):
(WebCore::RunLoop::TimerBase::start):
(WebCore::RunLoop::TimerBase::stop):
(WebCore::RunLoop::TimerBase::isActive):
* platform/mac/RunLoopMac.mm:
(WebCore::RunLoop::run):
(WebCore::RunLoop::stop):
2013-04-30 David Hyatt <hyatt@apple.com>
<button> ignores margin-bottom.
https://bugs.webkit.org/show_bug.cgi?id=114940
Reviewed by Beth Dakin.
Make sure that the inner block inside the <button> (flexbox) acts like it
establishes a block formatting context, i.e., it should refuse to collapse
its margins with its children. This causes margins to stay inside the <button>
and be honored, adding to the button's overall height.
Basically we have to remove the restriction that anonymous blocks can't be
BFCs on the bottom margin.
Added fast/forms/content-with-margins-inside-button.html
* rendering/RenderBlock.cpp:
(WebCore::RenderBlock::handleAfterSideOfBlock):
2013-04-30 Andrei Bucur <abucur@adobe.com>
Cleanup HTMLOListElement<->RenderListItem bridge
https://bugs.webkit.org/show_bug.cgi?id=115434
Reviewed by Darin Adler.
Refactor the way HTMLOListElement is accessing its list items. Instead
of exposing the nextListItem function, wrap the desiredfunctionality
in static methods on RenderListItem. This should make the code more readable.
I've also added more constness to some functions in RenderListItem.
Tests: No new tests, just refactoring.
* html/HTMLOListElement.cpp:
(WebCore::HTMLOListElement::updateItemValues): Use updateItemValuesForOrderedList.
(WebCore::HTMLOListElement::recalculateItemCount): Use itemCountForOrderedList.
* rendering/RenderListItem.cpp:
(WebCore::isList): Add more constness.
(WebCore::nextListItem): Make local to the CPP and add constness.
(WebCore::previousListItem): Add constness.
(WebCore::RenderListItem::updateItemValuesForOrderedList): Called by OL elements.
(WebCore::RenderListItem::itemCountForOrderedList): Called by OL elements.
(WebCore::previousOrNextItem):
* rendering/RenderListItem.h: Add updateItemValuesForOrderedList and itemCountForOrderedList.
2013-04-30 Anders Carlsson <andersca@apple.com>
More StorageTracker cleanup
https://bugs.webkit.org/show_bug.cgi?id=115435
Reviewed by Andreas Kling.
Use bind instead of "onMainThread" helper functions.
* storage/StorageAreaSync.cpp:
(WebCore::StorageAreaSync::deleteEmptyDatabase):
* storage/StorageTracker.cpp:
(WebCore::StorageTracker::syncImportOriginIdentifiers):
(WebCore::StorageTracker::syncFileSystemAndTrackerDatabase):
(WebCore::StorageTracker::deleteOriginWithIdentifier):
* storage/StorageTracker.h:
(StorageTracker):
2013-04-30 Geoffrey Garen <ggaren@apple.com>
Objective-C JavaScriptCore API should publicly support bridging to C
https://bugs.webkit.org/show_bug.cgi?id=115447
Reviewed by Mark Hahnenberg.
* bindings/js/ScriptControllerMac.mm:
(WebCore::ScriptController::javaScriptContext):
* bindings/objc/WebScriptObject.mm:
(-[WebScriptObject JSValue]):
2013-04-30 Simon Fraser <simon.fraser@apple.com>
Fix an issue with JSPerformance.cpp in the WebCore.xcodeproj where
it was being recognized as a diretory rather than a file, introduced
in r149359.
* WebCore.xcodeproj/project.pbxproj:
2013-04-30 Beth Dakin <bdakin@apple.com>
Page::pageCount() is inaccurate when we allow the first paint in App Mode
https://bugs.webkit.org/show_bug.cgi?id=115442
-and corresponding-
<rdar://problem/13758445>
Reviewed by Dave Hyatt.
We should set the height here all the time, even if it is the first layout.
* rendering/RenderBlock.cpp:
(WebCore::RenderBlock::checkForPaginationLogicalHeightChange):
2013-04-30 Andreas Kling <akling@apple.com>
Don't create StyleResolvers just to invalidate them.
<http://webkit.org/b/115436>
Reviewed by Geoffrey Garen.
Renamed Document::styleResolver() to ensureStyleResolver() so it's clear that it never returns null.
Removed a bunch of unnecessary null-checks I spotted while doing this.
Also fixed Element::willModifyAttribute() and FrameView::setFrameRect() to not create a StyleResolver
and immediately invalidate it in some cases.
* css/FontLoader.cpp:
(WebCore::FontLoader::loadFont):
(WebCore::FontLoader::checkFont):
(WebCore::FontLoader::resolveFontStyle):
* css/MediaQueryMatcher.cpp:
(WebCore::MediaQueryMatcher::prepareEvaluator):
* css/StyleMedia.cpp:
(WebCore::StyleMedia::matchMedium):
* dom/Document.cpp:
(WebCore::Document::styleForElementIgnoringPendingStylesheets):
(WebCore::Document::styleForPage):
* dom/Document.h:
(WebCore::Document::ensureStyleResolver):
* dom/DocumentStyleSheetCollection.cpp:
(WebCore::DocumentStyleSheetCollection::combineCSSFeatureFlags):
(WebCore::DocumentStyleSheetCollection::resetCSSFeatureFlags):
(WebCore::DocumentStyleSheetCollection::updateActiveStyleSheets):
* dom/Element.cpp:
(WebCore::StyleResolverParentPusher::push):
(WebCore::StyleResolverParentPusher::~StyleResolverParentPusher):
(WebCore::Element::styleForRenderer):
(WebCore::Element::recalcStyle):
(WebCore::Element::willModifyAttribute):
* dom/NodeRenderingContext.cpp:
(WebCore::NodeRenderingContext::createRendererForTextIfNeeded):
* dom/ShadowRoot.cpp:
(WebCore::ShadowRoot::recalcStyle):
(WebCore::ShadowRoot::attach):
* dom/Text.cpp:
(WebCore::Text::recalcTextStyle):
* editing/EditingStyle.cpp:
(WebCore::styleFromMatchedRulesForElement):
* html/HTMLCanvasElement.cpp:
* html/HTMLCanvasElement.h:
* html/HTMLInputElement.cpp:
(WebCore::HTMLInputElement::customStyleForRenderer):
* html/HTMLOptGroupElement.cpp:
(WebCore::HTMLOptGroupElement::updateNonRenderStyle):
* html/HTMLOptionElement.cpp:
(WebCore::HTMLOptionElement::updateNonRenderStyle):
* html/HTMLPlugInImageElement.cpp:
(WebCore::HTMLPlugInImageElement::customStyleForRenderer):
* html/canvas/CanvasRenderingContext2D.cpp:
(WebCore::CanvasRenderingContext2D::setFont):
* html/shadow/DateTimeEditElement.cpp:
(WebCore::DateTimeEditElement::customStyleForRenderer):
* inspector/InspectorCSSAgent.cpp:
(WebCore::InspectorCSSAgent::getMatchedStylesForNode):
* page/DOMWindow.cpp:
(WebCore::DOMWindow::getMatchedCSSRules):
* page/FrameView.cpp:
(WebCore::FrameView::setFrameRect):
* page/animation/KeyframeAnimation.cpp:
(WebCore::KeyframeAnimation::KeyframeAnimation):
* rendering/RenderListBox.cpp:
(WebCore::RenderListBox::updateFromElement):
(WebCore::RenderListBox::paintItemForeground):
* rendering/RenderMenuList.cpp:
(WebCore::RenderMenuList::fontSelector):
* rendering/RenderObject.cpp:
(WebCore::RenderObject::getUncachedPseudoStyle):
* rendering/RenderRegion.cpp:
(WebCore::RenderRegion::checkRegionStyle):
(WebCore::RenderRegion::computeStyleInRegion):
* rendering/RenderSearchField.cpp:
(WebCore::RenderSearchField::fontSelector):
* rendering/svg/RenderSVGInlineText.cpp:
(WebCore::RenderSVGInlineText::computeNewScaledFontForStyle):
* svg/SVGElement.cpp:
(WebCore::SVGElement::customStyleForRenderer):
* svg/SVGElementRareData.h:
(WebCore::SVGElementRareData::overrideComputedStyle):
2013-04-30 Simon Fraser <simon.fraser@apple.com>
Cap max CALayer tree depth to avoid crashes
https://bugs.webkit.org/show_bug.cgi?id=115431
<rdar://problem/13401861>
Reviewed by Tim Horton.
Core Animation can crash if fed deeply nested layer trees.
Avoid this by capping CALayer tree depth at some empirically-determined
level.
Test: compositing/layer-creation/deep-tree.html
* platform/graphics/ca/GraphicsLayerCA.h:
(WebCore::GraphicsLayerCA::CommitState::CommitState): Add treeDepth to the CommitState.
* platform/graphics/ca/GraphicsLayerCA.cpp: Set cMaxLayerTreeDepth to 250
(WebCore::GraphicsLayerCA::flushCompositingStateForThisLayerOnly): We need a dummy CommitState
here. It is not expected that flushCompositingStateForThisLayerOnly() will be called for
a layer in the middle of the hierarchy, only for custom-managed leaf layers, so we don't try
to compute the correct tree depth.
(WebCore::GraphicsLayerCA::recursiveCommitChanges): Pass in the commitState. Since this is
copied for each frame, no need to decrement commitState.treeDepth.
(WebCore::GraphicsLayerCA::commitLayerChangesBeforeSublayers): Increment treeDepth once or
twice. If we've reached max, be sure to set the ChildrenChanged flag. We delay tree truncation
until commitLayerChangesAfterSublayers() since ChildrenChanged can be set again when children
are being processed.
(WebCore::GraphicsLayerCA::commitLayerChangesAfterSublayers):
(WebCore::GraphicsLayerCA::updateSublayerList): If we've hit max depth, just set
empty sublayers.
2013-04-30 Darin Adler <darin@apple.com>
Formatting tweaks
https://bugs.webkit.org/show_bug.cgi?id=115427
Reviewed by Andreas Kling.
* platform/graphics/cg/GraphicsContext3DCG.cpp:
(WebCore::GraphicsContext3D::ImageExtractor::extractImage): Fixed indenting to match
normal WebKit style.
* platform/mac/ScrollAnimatorMac.mm:
(WebCore::ScrollAnimatorMac::pinnedInDirection): Removed an excess "+" that is harmless
but strange.
* platform/mac/SharedBufferMac.mm: Tweaked blank lines for better paragraphing.
2013-04-30 Ryosuke Niwa <rniwa@webkit.org>
Simplify ContainerNode::removeChildren
https://bugs.webkit.org/show_bug.cgi?id=115398
Reviewed by Andreas Kling.
Back port https://chromium.googlesource.com/chromium/blink/+/b981f01cd065236b5ff7e3a8446d15b384c1b557
by Andrei Bucur, which includes both this and his r148754.
* dom/ContainerNode.cpp:
(WebCore::ContainerNode::removeChildren):
2013-04-30 Carlos Garcia Campos <cgarcia@igalia.com>
[SOUP] Move default buffer handling from ResourceHandleClient to ResourceHandlesoup
https://bugs.webkit.org/show_bug.cgi?id=115364
Reviewed by Martin Robinson.
ResourceHandleClient that is cross-platform file is not the right
place for the default ResourceHandle read buffer. We can make
getBuffer return 0 by default and handle it in ResourceHandleSoup,
creating a default buffer when the client doesn't provide one.
* platform/graphics/gstreamer/WebKitWebSourceGStreamer.cpp:
(StreamingClient::getOrCreateReadBuffer): Adapt to API change.
* platform/network/ResourceHandle.h:
(ResourceHandle): Add ensureReadBuffer().
* platform/network/ResourceHandleClient.cpp:
(WebCore::ResourceHandleClient::~ResourceHandleClient): Remove
soup specific code.
* platform/network/ResourceHandleClient.h:
(WebCore::ResourceHandleClient::getOrCreateReadBuffer): Rename
getBuffer() as getOrCreateReadBuffer() and use a reference for the
out parameter instead of a pointer.
(ResourceHandleClient): Remove soup specific code.
* platform/network/ResourceHandleInternal.h:
(WebCore::ResourceHandleInternal::ResourceHandleInternal): Rename
m_buffer and m_bufferSize as m_readBufferPtr and m_readBufferSize
and add m_readBuffer to be used as default read buffer.
* platform/network/soup/ResourceHandleSoup.cpp:
(WebCore::ResourceHandle::ensureReadBuffer): Helper function to
make usre we have a read buffer before a read operation. It first
checks if the client provides a buffer and if it doesn't it
creates or reuses the default buffer.
(WebCore::redirectSkipCallback): Call ensureReadBuffer() and adapt
to variable name changes.
(WebCore::cleanupSoupRequestOperation): Adapt to variable name
changes.
(WebCore::nextMultipartResponsePartCallback): Call
ensureReadBuffer() and adapt to variable name changes.
(WebCore::sendRequestCallback): Ditto.
(WebCore::readCallback): Ditto.
2013-04-30 Andreas Kling <akling@apple.com>
REGRESSION(r149287): Assertion failure in fast/frames/flattening/iframe-flattening-crash.html
<http://webkit.org/b/115386>
<rdar://problem/13769995>
Reviewed by Darin Adler.
Put the resize event on the Document's event queue if it happens while layout is in progress.
This avoids re-entering layout while laying out flattened subframes.
Also move the little logic for the resize event from EventHandler to FrameView (the only client.)
* page/EventHandler.cpp:
* page/EventHandler.h:
* page/FrameView.cpp:
(WebCore::FrameView::dispatchResizeEvent):
2013-04-30 Anders Carlsson <andersca@apple.com>
Fix build.
* WebCore.exp.in:
* storage/StorageTracker.h:
(StorageTracker):
2013-04-30 Anders Carlsson <andersca@apple.com>
More StorageTracker cleanup
https://bugs.webkit.org/show_bug.cgi?id=115429
Reviewed by Andreas Kling.
Make a bunch of member functions private, and remove StorageTracker::syncLocalStorage.
* WebCore.exp.in:
* storage/StorageTracker.cpp:
* storage/StorageTracker.h:
(StorageTracker):
2013-04-30 Andreas Kling <akling@apple.com>
REGRESSION(r149313) Crash at WebCore::FrameView::setFrameRect() when navigating back to previous page while find banner is displayed.
<http://webkit.org/b/115421>
<rdar://problem/13765739>
Reviewed by Antti Koivisto.
Add missing null-checks for Document and StyleResolver when re-evaluating media queries due to viewport changes.
No layout test, since we can't show the find banner from WebCore, and I can't think of another way to
trigger a back navigation to a Document-less Frame that would also change the FrameView's size.
* page/FrameView.cpp:
(WebCore::FrameView::setFrameRect):
2013-04-30 Glenn Adams <glenn@skynav.com>
The bison grammar for @supports should return 0 in case of an error
https://bugs.webkit.org/show_bug.cgi?id=115402
Reviewed by Darin Adler.
Back ported from https://chromium.googlesource.com/chromium/blink/+/74399c27c8b93286bae03a1d6371735935b34d85.
Test: css3/supports-crash.html
* css/CSSGrammar.y.in:
2013-04-30 Darin Adler <darin@apple.com>
[CG] Over-release in MIME type registry code
https://bugs.webkit.org/show_bug.cgi?id=115423
Reviewed by Eric Carlson.
Sam Weinig spotted these by code inspection. I don't know how to make a test demonstrating
the problem, but this is clearly an over-release.
* platform/MIMETypeRegistry.cpp:
(WebCore::initializeSupportedImageMIMETypes): Removed incorrect adoptCF call on a string we
are getting from a CFArray.
(WebCore::initializeSupportedImageMIMETypesForEncoding): Ditto.
2013-04-30 Mike Lattanzio <mlattanzio@blackberry.com>
[BlackBerry] ImageBuffer::copyImage leaking memory
https://bugs.webkit.org/show_bug.cgi?id=115359
Reviewed by George Staikos.
Use a WebCore::Vector to ensure the temporary data is destroyed.
The TiledImage does not take ownership of the data.
* platform/graphics/blackberry/ImageBufferBlackBerry.cpp:
(WebCore::ImageBuffer::copyImage):
2013-04-30 Noam Rosenthal <noam@webkit.org>
[Texmap] Avoid using overlap/non-overlap region in cases where the overhead is bigger than the gain
https://bugs.webkit.org/show_bug.cgi?id=115226
Reviewed by Allan Sandfeld Jensen.
When there are several fragmeneted overlap regions, or when the overlap region is bigger than the
non-overlap region, it's more efficient to have a single intermediate surface rather than split
the rendering to overlap/non-overlap.
Covered by tests in compositing/overlap-blending.
* platform/graphics/texmap/TextureMapperLayer.cpp:
(WebCore::TextureMapperLayer::shouldBlend):
Readability fix.
(WebCore::TextureMapperLayer::paintUsingOverlapRegions):
Consolidate to one overlap rect when one of the following occurs:
- The overlap region's area is larger than the non-overlap region area.
- There are many fragmented overlap regions and no non-overlap regions.
2013-04-30 Christophe Dumez <ch.dumez@sisa.samsung.com>
Stop using "in" keyword in IDL files
https://bugs.webkit.org/show_bug.cgi?id=115418
Reviewed by Kentaro Hara.
Stop using "in" keyword in IDL files as this is no longer part of the
Web IDL specification and it brings no additional information.
For now, the IDL parser will still accept the "in" keyword for operation
argument to not break anything. However, we should remove support for it
later on.
No new tests, no behavior change.
* Modules/battery/BatteryManager.idl:
* Modules/encryptedmedia/MediaKeySession.idl:
* Modules/encryptedmedia/MediaKeys.idl:
* Modules/filesystem/DOMWindowFileSystem.idl:
* Modules/filesystem/DirectoryEntry.idl:
* Modules/filesystem/DirectoryEntrySync.idl:
* Modules/filesystem/DirectoryReader.idl:
* Modules/filesystem/EntriesCallback.idl:
* Modules/filesystem/Entry.idl:
* Modules/filesystem/EntryArray.idl:
* Modules/filesystem/EntryArraySync.idl:
* Modules/filesystem/EntryCallback.idl:
* Modules/filesystem/EntrySync.idl:
* Modules/filesystem/ErrorCallback.idl:
* Modules/filesystem/FileCallback.idl:
* Modules/filesystem/FileEntry.idl:
* Modules/filesystem/FileSystemCallback.idl:
* Modules/filesystem/FileWriter.idl:
* Modules/filesystem/FileWriterCallback.idl:
* Modules/filesystem/FileWriterSync.idl:
* Modules/filesystem/MetadataCallback.idl:
* Modules/filesystem/WorkerContextFileSystem.idl:
* Modules/gamepad/GamepadList.idl:
* Modules/geolocation/Geolocation.idl:
* Modules/geolocation/PositionCallback.idl:
* Modules/geolocation/PositionErrorCallback.idl:
* Modules/indexeddb/IDBCursor.idl:
* Modules/indexeddb/IDBDatabase.idl:
* Modules/indexeddb/IDBFactory.idl:
* Modules/indexeddb/IDBIndex.idl:
* Modules/indexeddb/IDBKeyRange.idl:
* Modules/indexeddb/IDBObjectStore.idl:
* Modules/indexeddb/IDBRequest.idl:
* Modules/indexeddb/IDBTransaction.idl:
* Modules/mediasource/MediaSource.idl:
* Modules/mediasource/SourceBuffer.idl:
* Modules/mediasource/SourceBufferList.idl:
* Modules/mediastream/MediaStream.idl:
* Modules/mediastream/MediaStreamTrack.idl:
* Modules/mediastream/NavigatorMediaStream.idl:
* Modules/mediastream/NavigatorUserMediaErrorCallback.idl:
* Modules/mediastream/NavigatorUserMediaSuccessCallback.idl:
* Modules/mediastream/RTCDTMFSender.idl:
* Modules/mediastream/RTCDataChannel.idl:
* Modules/mediastream/RTCErrorCallback.idl:
* Modules/mediastream/RTCIceCandidate.idl:
* Modules/mediastream/RTCPeerConnection.idl:
* Modules/mediastream/RTCSessionDescription.idl:
* Modules/mediastream/RTCSessionDescriptionCallback.idl:
* Modules/mediastream/RTCStatsCallback.idl:
* Modules/mediastream/RTCStatsReport.idl:
* Modules/mediastream/RTCStatsResponse.idl:
* Modules/navigatorcontentutils/NavigatorContentUtils.idl:
* Modules/networkinfo/NetworkInfoConnection.idl:
* Modules/notifications/Notification.idl:
* Modules/notifications/NotificationCenter.idl:
* Modules/notifications/NotificationPermissionCallback.idl:
* Modules/quota/StorageErrorCallback.idl:
* Modules/quota/StorageInfo.idl:
* Modules/quota/StorageQuota.idl:
* Modules/quota/StorageQuotaCallback.idl:
* Modules/quota/StorageUsageCallback.idl:
* Modules/speech/SpeechGrammarList.idl:
* Modules/speech/SpeechRecognition.idl:
* Modules/speech/SpeechRecognitionResult.idl:
* Modules/speech/SpeechRecognitionResultList.idl:
* Modules/speech/SpeechSynthesisUtterance.idl:
* Modules/vibration/NavigatorVibration.idl:
* Modules/webaudio/AnalyserNode.idl:
* Modules/webaudio/AudioBuffer.idl:
* Modules/webaudio/AudioBufferCallback.idl:
* Modules/webaudio/AudioBufferSourceNode.idl:
* Modules/webaudio/AudioContext.idl:
* Modules/webaudio/AudioListener.idl:
* Modules/webaudio/AudioNode.idl:
* Modules/webaudio/AudioParam.idl:
* Modules/webaudio/BiquadFilterNode.idl:
* Modules/webaudio/OfflineAudioContext.idl:
* Modules/webaudio/OscillatorNode.idl:
* Modules/webaudio/PannerNode.idl:
* Modules/webdatabase/DOMWindowWebDatabase.idl:
* Modules/webdatabase/Database.idl:
* Modules/webdatabase/DatabaseCallback.idl:
* Modules/webdatabase/DatabaseSync.idl:
* Modules/webdatabase/SQLResultSetRowList.idl:
* Modules/webdatabase/SQLStatementCallback.idl:
* Modules/webdatabase/SQLStatementErrorCallback.idl:
* Modules/webdatabase/SQLTransaction.idl:
* Modules/webdatabase/SQLTransactionCallback.idl:
* Modules/webdatabase/SQLTransactionErrorCallback.idl:
* Modules/webdatabase/SQLTransactionSync.idl:
* Modules/webdatabase/SQLTransactionSyncCallback.idl:
* Modules/webdatabase/WorkerContextWebDatabase.idl:
* Modules/websockets/WebSocket.idl:
* bindings/scripts/test/TestCallback.idl:
* bindings/scripts/test/TestCustomNamedGetter.idl:
* bindings/scripts/test/TestDomainSecurity.idl:
* bindings/scripts/test/TestEventTarget.idl:
* bindings/scripts/test/TestInterface.idl:
* bindings/scripts/test/TestMediaQueryListListener.idl:
* bindings/scripts/test/TestNamedConstructor.idl:
* bindings/scripts/test/TestObj.idl:
* bindings/scripts/test/TestOverloadedConstructors.idl:
* bindings/scripts/test/TestSerializedScriptValueInterface.idl:
* bindings/scripts/test/TestSupplemental.idl:
* bindings/scripts/test/TestTypedArray.idl:
* bindings/scripts/test/TestTypedefs.idl:
* css/CSSHostRule.idl:
* css/CSSMediaRule.idl:
* css/CSSPrimitiveValue.idl:
* css/CSSRuleList.idl:
* css/CSSStyleDeclaration.idl:
* css/CSSStyleSheet.idl:
* css/CSSSupportsRule.idl:
* css/CSSValueList.idl:
* css/FontLoader.idl:
* css/MediaList.idl:
* css/MediaQueryList.idl:
* css/MediaQueryListListener.idl:
* css/StyleMedia.idl:
* css/StyleSheetList.idl:
* css/WebKitCSSKeyframesRule.idl:
* css/WebKitCSSMatrix.idl:
* dom/CharacterData.idl:
* dom/ClientRectList.idl:
* dom/Clipboard.idl:
* dom/CompositionEvent.idl:
* dom/CustomEvent.idl:
* dom/DOMImplementation.idl:
* dom/DOMNamedFlowCollection.idl:
* dom/DOMStringList.idl:
* dom/DataTransferItem.idl:
* dom/DataTransferItemList.idl:
* dom/DeviceMotionEvent.idl:
* dom/DeviceOrientationEvent.idl:
* dom/Document.idl:
* dom/DocumentFragment.idl:
* dom/Element.idl:
* dom/Event.idl:
* dom/EventListener.idl:
* dom/EventTarget.idl:
* dom/HashChangeEvent.idl:
* dom/KeyboardEvent.idl:
* dom/MessageEvent.idl:
* dom/MessagePort.idl:
* dom/MouseEvent.idl:
* dom/MutationEvent.idl:
* dom/MutationObserver.idl:
* dom/NamedNodeMap.idl:
* dom/Node.idl:
* dom/NodeFilter.idl:
* dom/NodeList.idl:
* dom/OverflowEvent.idl:
* dom/PropertyNodeList.idl:
* dom/Range.idl:
* dom/RequestAnimationFrameCallback.idl:
* dom/ShadowRoot.idl:
* dom/StringCallback.idl:
* dom/Text.idl:
* dom/TextEvent.idl:
* dom/TouchEvent.idl:
* dom/TouchList.idl:
* dom/UIEvent.idl:
* dom/WebKitNamedFlow.idl:
* dom/WheelEvent.idl:
* fileapi/Blob.idl:
* fileapi/FileList.idl:
* fileapi/FileReader.idl:
* fileapi/FileReaderSync.idl:
* html/DOMFormData.idl:
* html/DOMTokenList.idl:
* html/DOMURL.idl:
* html/HTMLAllCollection.idl:
* html/HTMLAudioElement.idl:
* html/HTMLButtonElement.idl:
* html/HTMLCanvasElement.idl:
* html/HTMLCollection.idl:
* html/HTMLDocument.idl:
* html/HTMLElement.idl:
* html/HTMLFieldSetElement.idl:
* html/HTMLFormControlsCollection.idl:
* html/HTMLInputElement.idl:
* html/HTMLKeygenElement.idl:
* html/HTMLMediaElement.idl:
* html/HTMLObjectElement.idl:
* html/HTMLOptionElement.idl:
* html/HTMLOptionsCollection.idl:
* html/HTMLOutputElement.idl:
* html/HTMLPropertiesCollection.idl:
* html/HTMLSelectElement.idl:
* html/HTMLTableElement.idl:
* html/HTMLTableRowElement.idl:
* html/HTMLTableSectionElement.idl:
* html/HTMLTextAreaElement.idl:
* html/MediaController.idl:
* html/TimeRanges.idl:
* html/canvas/ArrayBuffer.idl:
* html/canvas/CanvasGradient.idl:
* html/canvas/CanvasRenderingContext2D.idl:
* html/canvas/DOMPath.idl:
* html/canvas/DataView.idl:
* html/canvas/EXTDrawBuffers.idl:
* html/canvas/Float32Array.idl:
* html/canvas/Float64Array.idl:
* html/canvas/Int16Array.idl:
* html/canvas/Int32Array.idl:
* html/canvas/Int8Array.idl:
* html/canvas/OESVertexArrayObject.idl:
* html/canvas/Uint16Array.idl:
* html/canvas/Uint32Array.idl:
* html/canvas/Uint8Array.idl:
* html/canvas/Uint8ClampedArray.idl:
* html/canvas/WebGLDebugShaders.idl:
* html/canvas/WebGLRenderingContext.idl:
* html/track/AudioTrackList.idl:
* html/track/TextTrack.idl:
* html/track/TextTrackCue.idl:
* html/track/TextTrackCueList.idl:
* html/track/TextTrackList.idl:
* html/track/TextTrackRegionList.idl:
* html/track/VideoTrackList.idl:
* inspector/InjectedScriptHost.idl:
* inspector/InspectorFrontendHost.idl:
* inspector/JavaScriptCallFrame.idl:
* loader/appcache/DOMApplicationCache.idl:
* page/Console.idl:
* page/Crypto.idl:
* page/DOMSecurityPolicy.idl:
* page/DOMSelection.idl:
* page/DOMWindow.idl:
* page/EventSource.idl:
* page/History.idl:
* page/Location.idl:
* page/PagePopupController.idl:
* page/Performance.idl:
* page/PerformanceEntryList.idl:
* page/SpeechInputResultList.idl:
* plugins/DOMMimeTypeArray.idl:
* plugins/DOMPlugin.idl:
* plugins/DOMPluginArray.idl:
* storage/Storage.idl:
* storage/StorageEvent.idl:
* svg/ElementTimeControl.idl:
* svg/SVGAngle.idl:
* svg/SVGColor.idl:
* svg/SVGDocument.idl:
* svg/SVGElementInstanceList.idl:
* svg/SVGFEDropShadowElement.idl:
* svg/SVGFEGaussianBlurElement.idl:
* svg/SVGFEMorphologyElement.idl:
* svg/SVGFilterElement.idl:
* svg/SVGLength.idl:
* svg/SVGLengthList.idl:
* svg/SVGLocatable.idl:
* svg/SVGMarkerElement.idl:
* svg/SVGMatrix.idl:
* svg/SVGNumberList.idl:
* svg/SVGPaint.idl:
* svg/SVGPathElement.idl:
* svg/SVGPathSegList.idl:
* svg/SVGPoint.idl:
* svg/SVGPointList.idl:
* svg/SVGSVGElement.idl:
* svg/SVGStringList.idl:
* svg/SVGStyledElement.idl:
* svg/SVGTests.idl:
* svg/SVGTextContentElement.idl:
* svg/SVGTransform.idl:
* svg/SVGTransformList.idl:
* testing/InternalSettings.idl:
* testing/Internals.idl:
* workers/AbstractWorker.idl:
* workers/DedicatedWorkerContext.idl:
* workers/SharedWorker.idl:
* workers/Worker.idl:
* workers/WorkerContext.idl:
* xml/DOMParser.idl:
* xml/XMLHttpRequest.idl:
* xml/XMLHttpRequestUpload.idl:
* xml/XMLSerializer.idl:
* xml/XPathEvaluator.idl:
* xml/XPathExpression.idl:
* xml/XPathNSResolver.idl:
* xml/XPathResult.idl:
* xml/XSLTProcessor.idl:
2013-04-30 Noam Rosenthal <noam@webkit.org>
[Texmap] Use fewer intermediate surfaces when compositing filters
https://bugs.webkit.org/show_bug.cgi?id=115224
Reviewed by Allan Sandfeld Jensen.
Until now, when rendering CSS filters, the filters were applied to the texture
and then the resulting texture would be composited to the target surface with
its transform/opacity.
This requires at least two intermediate surface passes for every filtered layer.
This patch makes it so that the last filter pass is applied together with the
resulting surface's opacity and transform, during composition.
Tested by css3/filters tests, whichn now scroll/zoom a lot faster.
* platform/graphics/texmap/TextureMapper.h:
(WebCore::BitmapTexture::applyFilters):
* platform/graphics/texmap/TextureMapperGL.cpp:
(WebCore::TextureMapperGLData::TextureMapperGLData):
(TextureMapperGLData):
(WebCore):
(WebCore::optionsForFilterType):
(WebCore::getPassesRequiredForFilter):
(WebCore::gauss):
(WebCore::gaussianKernel):
(WebCore::prepareFilterProgram):
(WebCore::TextureMapperGL::drawTexture):
(WebCore::TextureMapperGL::drawFiltered):
(WebCore::isCustomFilter):
* platform/graphics/texmap/TextureMapperGL.h:
(TextureMapperGL):
(BitmapTextureGL):
(FilterInfo):
* platform/graphics/texmap/TextureMapperImageBuffer.cpp:
(WebCore::BitmapTextureImageBuffer::applyFilters):
* platform/graphics/texmap/TextureMapperImageBuffer.h:
(BitmapTextureImageBuffer):
(WebCore::BitmapTextureGL::FilterInfo::FilterInfo):
(WebCore::BitmapTextureGL::filterInfo):
(WebCore::BitmapTextureGL::applyFilters):
Modify TextureMapperGL to remember the last filter operation applied
to a BitmapTexture and apply it when the texture is composited.
* platform/graphics/texmap/TextureMapperLayer.cpp:
(WebCore::TextureMapperLayer::paintIntoSurface):
Simplify the call to applyFilters, since now TextureMapperGL is responsible
for maintaining the content texture.
2013-04-30 Christophe Dumez <ch.dumez@sisa.samsung.com>
[EFL] Enable scaled cursors
https://bugs.webkit.org/show_bug.cgi?id=106242
Reviewed by Gyuyoung Kim.
Correctly copy WebCore::Cursor's m_imageScaleFactor
member in CursorEfl.cpp when MOUSE_CURSOR_SCALE is
enabled.
No new tests, already covered by existing tests.
* platform/efl/CursorEfl.cpp:
(WebCore::Cursor::Cursor):
(WebCore::Cursor::operator=):
2013-04-30 Thiago Marcos P. Santos <thiago.santos@intel.com>
CSSParser::parseFontFamily should allow the keyword "default" as part of a font name
https://bugs.webkit.org/show_bug.cgi?id=107231
Reviewed by Ryosuke Niwa.
Make sure that using the keyword "default" as font family doesn't
invalidate the whole declaration. It is also OK to use a font that
has "default" as part of a composite name (i.e. "default foo").
This matches the behavior of Firefox and IE.
Test: fast/css/font-family-parse-keyword.html
* css/CSSParser.cpp:
(WebCore::CSSParser::parseFontFamily):
2013-04-30 Zalan Bujtas <zalan@apple.com>
Animations fail to start on http://www.google.com/insidesearch/howsearchworks/thestory/
https://bugs.webkit.org/show_bug.cgi?id=111244
Reviewed by David Kilzer.
Enable performance.now() as a minimal subset of Web Timing API.
It returns DOMHighResTimeStamp, a monotonically increasing value representing the
number of milliseconds from the start of the navigation of the current document.
JS libraries use this API to check against the requestAnimationFrame() timestamp.
Test: fast/dom/Window/web-timing-minimal-performance-now.html
* Configurations/FeatureDefines.xcconfig:
* WebCore.xcodeproj/project.pbxproj:
* dom/EventTargetFactory.in:
* page/DOMWindow.cpp:
(WebCore::DOMWindow::~DOMWindow):
(WebCore::DOMWindow::resetDOMWindowProperties):
(WebCore):
* page/DOMWindow.h:
(DOMWindow):
* page/DOMWindow.idl:
* page/Performance.cpp:
(WebCore):
* page/Performance.h:
(Performance):
* page/Performance.idl:
2013-04-30 Commit Queue <rniwa@webkit.org>
Unreviewed, rolling out r149338.
http://trac.webkit.org/changeset/149338
https://bugs.webkit.org/show_bug.cgi?id=115409
Broke layout/perf/API tests on non-Mac:
ThreadSpecific<RefPtr<RunLoop>> does not initialize RunLoop
(Requested by rakuco on #webkit).
* platform/RunLoop.cpp:
(WebCore::RunLoop::current):
* platform/RunLoop.h:
(RunLoop):
* platform/cf/RunLoopCF.cpp:
(WebCore::RunLoop::initializeMainRunLoop):
(WebCore::RunLoop::current):
(WebCore::RunLoop::~RunLoop):
* platform/efl/RunLoopEfl.cpp:
(WebCore::RunLoop::~RunLoop):
* platform/gtk/RunLoopGtk.cpp:
(WebCore::RunLoop::~RunLoop):
* platform/win/RunLoopWin.cpp:
(WebCore::RunLoop::~RunLoop):
2013-04-30 Alberto Garcia <agarcia@igalia.com>
ImageBufferData: add BlackBerry header
https://bugs.webkit.org/show_bug.cgi?id=115408
Reviewed by Carlos Garcia Campos.
* platform/graphics/ImageBufferData.h:
2013-04-30 Christophe Dumez <ch.dumez@sisa.samsung.com>
Replace "Optional" extended attribute by proper Web IDL "optional" keyword
https://bugs.webkit.org/show_bug.cgi?id=115380
Reviewed by Kentaro Hara.
Replace [Optional] with standard WebIDL optional type prefix:
http://dev.w3.org/2006/webapi/WebIDL/#dfn-optional-argument
The default behavior now matches WebIDL: [Optional] => optional
Two cases where WebKit has extended bindings behavior still
require a non-standard IDL attribute:
[Optional=DefaultIsNullString] => [Default=NullString] optional
[Optional=DefaultIsUndefined] => [Default=Undefined] optional
Based on corresponding Blink patch from Joshua Bell for compatibility.
No new tests, no behavior change.
* Modules/battery/BatteryManager.idl:
* Modules/encryptedmedia/MediaKeySession.idl:
* Modules/encryptedmedia/MediaKeys.idl:
* Modules/filesystem/DOMWindowFileSystem.idl:
* Modules/filesystem/DirectoryEntry.idl:
* Modules/filesystem/DirectoryReader.idl:
* Modules/filesystem/Entry.idl:
* Modules/filesystem/FileEntry.idl:
* Modules/filesystem/FileWriter.idl:
* Modules/filesystem/WorkerContextFileSystem.idl:
* Modules/gamepad/GamepadList.idl:
* Modules/geolocation/Geolocation.idl:
* Modules/indexeddb/IDBCursor.idl:
* Modules/indexeddb/IDBDatabase.idl:
* Modules/indexeddb/IDBFactory.idl:
* Modules/indexeddb/IDBIndex.idl:
* Modules/indexeddb/IDBKeyRange.idl:
* Modules/indexeddb/IDBObjectStore.idl:
* Modules/indexeddb/IDBRequest.idl:
* Modules/indexeddb/IDBTransaction.idl:
* Modules/mediasource/MediaSource.idl:
* Modules/mediasource/SourceBufferList.idl:
* Modules/mediastream/MediaStream.idl:
* Modules/mediastream/MediaStreamTrack.idl:
* Modules/mediastream/NavigatorMediaStream.idl:
* Modules/mediastream/RTCDTMFSender.idl:
* Modules/mediastream/RTCDataChannel.idl:
* Modules/mediastream/RTCPeerConnection.idl:
* Modules/mediastream/RTCStatsResponse.idl:
* Modules/networkinfo/NetworkInfoConnection.idl:
* Modules/notifications/Notification.idl:
* Modules/notifications/NotificationCenter.idl:
* Modules/quota/StorageInfo.idl:
* Modules/quota/StorageQuota.idl:
* Modules/speech/SpeechGrammarList.idl:
* Modules/speech/SpeechRecognition.idl:
* Modules/speech/SpeechSynthesisUtterance.idl:
* Modules/webaudio/AudioContext.idl:
* Modules/webaudio/AudioNode.idl:
* Modules/webdatabase/DOMWindowWebDatabase.idl:
* Modules/webdatabase/Database.idl:
* Modules/webdatabase/DatabaseSync.idl:
* Modules/webdatabase/SQLTransaction.idl:
* Modules/webdatabase/WorkerContextWebDatabase.idl:
* Modules/websockets/WebSocket.idl:
* bindings/scripts/CodeGeneratorJS.pm:
(GetFunctionLength):
(GenerateFunctionParametersCheck):
(GenerateArgumentsCountCheck):
(GenerateParametersCheck):
(GenerateConstructorDefinition):
* bindings/scripts/IDLAttributes.txt:
* bindings/scripts/IDLParser.pm:
(parseOptionalOrRequiredArgument):
* bindings/scripts/test/TestEventTarget.idl:
* bindings/scripts/test/TestInterface.idl:
* bindings/scripts/test/TestNamedConstructor.idl:
* bindings/scripts/test/TestObj.idl:
* bindings/scripts/test/TestSerializedScriptValueInterface.idl:
* bindings/scripts/test/TestTypedefs.idl: optional cannot be used in a typedef.
* css/CSSHostRule.idl:
* css/CSSMediaRule.idl:
* css/CSSPrimitiveValue.idl:
* css/CSSRuleList.idl:
* css/CSSStyleDeclaration.idl:
* css/CSSStyleSheet.idl:
* css/CSSSupportsRule.idl:
* css/CSSValueList.idl:
* css/FontLoader.idl:
* css/MediaList.idl:
* css/MediaQueryList.idl:
* css/MediaQueryListListener.idl:
* css/StyleMedia.idl:
* css/StyleSheetList.idl:
* css/WebKitCSSKeyframesRule.idl:
* css/WebKitCSSMatrix.idl:
* dom/CharacterData.idl:
* dom/ClientRectList.idl:
* dom/Clipboard.idl:
* dom/CompositionEvent.idl:
* dom/CustomEvent.idl:
* dom/DOMImplementation.idl:
* dom/DOMStringList.idl:
* dom/DataTransferItem.idl:
* dom/DataTransferItemList.idl:
* dom/DeviceMotionEvent.idl:
* dom/DeviceOrientationEvent.idl:
* dom/Document.idl:
* dom/Element.idl:
* dom/Event.idl:
* dom/EventTarget.idl:
* dom/HashChangeEvent.idl:
* dom/KeyboardEvent.idl:
* dom/MessageEvent.idl:
* dom/MessagePort.idl:
* dom/MouseEvent.idl:
* dom/MutationEvent.idl:
* dom/NamedNodeMap.idl:
* dom/Node.idl:
* dom/NodeFilter.idl:
* dom/NodeList.idl:
* dom/OverflowEvent.idl:
* dom/Range.idl:
* dom/ShadowRoot.idl:
* dom/Text.idl:
* dom/TextEvent.idl:
* dom/TouchEvent.idl:
* dom/UIEvent.idl:
* dom/WebKitNamedFlow.idl:
* dom/WheelEvent.idl:
* fileapi/Blob.idl:
* fileapi/FileReader.idl:
* fileapi/FileReaderSync.idl:
* html/DOMFormData.idl:
* html/DOMTokenList.idl:
* html/HTMLAllCollection.idl:
* html/HTMLAudioElement.idl:
* html/HTMLCanvasElement.idl:
* html/HTMLCollection.idl:
* html/HTMLDocument.idl:
* html/HTMLElement.idl:
* html/HTMLFormControlsCollection.idl:
* html/HTMLInputElement.idl:
* html/HTMLMediaElement.idl:
* html/HTMLOptionElement.idl:
* html/HTMLOptionsCollection.idl:
* html/HTMLSelectElement.idl:
* html/HTMLTableElement.idl:
* html/HTMLTableRowElement.idl:
* html/HTMLTableSectionElement.idl:
* html/HTMLTextAreaElement.idl:
* html/MediaController.idl:
* html/canvas/ArrayBuffer.idl:
* html/canvas/CanvasGradient.idl:
* html/canvas/CanvasRenderingContext2D.idl:
* html/canvas/DOMPath.idl:
* html/canvas/DataView.idl:
* html/canvas/Float32Array.idl:
* html/canvas/Float64Array.idl:
* html/canvas/Int16Array.idl:
* html/canvas/Int32Array.idl:
* html/canvas/Int8Array.idl:
* html/canvas/OESVertexArrayObject.idl:
* html/canvas/Uint16Array.idl:
* html/canvas/Uint32Array.idl:
* html/canvas/Uint8Array.idl:
* html/canvas/Uint8ClampedArray.idl:
* html/track/AudioTrackList.idl:
* html/track/TextTrack.idl:
* html/track/TextTrackCue.idl:
* html/track/TextTrackList.idl:
* html/track/VideoTrackList.idl:
* loader/appcache/DOMApplicationCache.idl:
* page/DOMSelection.idl:
* page/DOMWindow.idl:
* page/EventSource.idl:
* page/History.idl:
* page/Location.idl:
* page/Performance.idl:
* plugins/DOMMimeTypeArray.idl:
* plugins/DOMPlugin.idl:
* plugins/DOMPluginArray.idl:
* storage/StorageEvent.idl:
* svg/ElementTimeControl.idl:
* svg/SVGDocument.idl:
* svg/SVGElementInstanceList.idl:
* svg/SVGFEDropShadowElement.idl:
* svg/SVGFEGaussianBlurElement.idl:
* svg/SVGFEMorphologyElement.idl:
* svg/SVGFilterElement.idl:
* svg/SVGLocatable.idl:
* svg/SVGMarkerElement.idl:
* svg/SVGPathElement.idl:
* svg/SVGSVGElement.idl:
* svg/SVGStyledElement.idl:
* svg/SVGTests.idl:
* svg/SVGTextContentElement.idl:
* testing/Internals.idl:
* workers/AbstractWorker.idl:
* workers/DedicatedWorkerContext.idl:
* workers/SharedWorker.idl:
* workers/Worker.idl:
* workers/WorkerContext.idl:
* xml/DOMParser.idl:
* xml/XMLHttpRequest.idl:
* xml/XMLHttpRequestUpload.idl:
* xml/XMLSerializer.idl:
* xml/XPathEvaluator.idl:
* xml/XPathExpression.idl:
* xml/XPathNSResolver.idl:
* xml/XPathResult.idl:
* xml/XSLTProcessor.idl:
2013-04-30 Jocelyn Turcotte <jocelyn.turcotte@digia.com>
Fix the USE(3D_GRAPHICS) build with the standard OpenGL on Windows
https://bugs.webkit.org/show_bug.cgi?id=114684
Reviewed by Simon Hausmann.
Currently USE(3D_GRAPHICS) is only supported with OpenGLES through ANGLE
on Windows. Allow building with the stock opengl32.lib on Windows by adding
missing glCompressedTex* entries in OpenGLShims.
Those are used in Source/WebCore/platform/graphics/opengl/GraphicsContext3DOpenGLCommon.cpp
and will be substituted by the preprocessor.
* platform/graphics/OpenGLShims.cpp:
(WebCore::initializeOpenGLShims):
* platform/graphics/OpenGLShims.h:
(_OpenGLFunctionTable):
2013-04-29 Alberto Garcia <agarcia@igalia.com>
Remove all remaining Skia code
https://bugs.webkit.org/show_bug.cgi?id=115263
Reviewed by Benjamin Poulain.
* html/HTMLCanvasElement.cpp:
(WebCore): Remove the MaxSkiaDim constant, which was a leftover
from r149193.
* platform/graphics/harfbuzz/FontHarfBuzz.cpp: Removed.
* platform/graphics/harfbuzz/FontPlatformDataHarfBuzz.cpp: Removed.
* platform/graphics/harfbuzz/FontPlatformDataHarfBuzz.h: Removed.
* platform/graphics/harfbuzz/HarfBuzzFaceSkia.cpp: Removed.
2013-04-29 Anders Carlsson <andersca@apple.com>
Fix build.
* platform/graphics/SimpleFontData.cpp:
(WebCore::SimpleFontData::DerivedFontData::~DerivedFontData):
* platform/graphics/mac/SimpleFontDataMac.mm:
(WebCore::SimpleFontData::getCompositeFontReferenceFontData):
2013-04-29 Simon Fraser <simon.fraser@apple.com>
Don't do CGContext flipping when painting subframes in WebKit1 on post-MountainLion OSes
https://bugs.webkit.org/show_bug.cgi?id=115392
<rdar://problem/13421519>
Reviewed by Beth Dakin.
Sync up with AppKit behavior changes that could cause subviews to be flipped when
painted.
* platform/mac/WidgetMac.mm:
(WebCore::Widget::paint):
2013-04-29 Chris Fleizach <cfleizach@apple.com>
WEB SPEECH: need to identify the default voice per language
https://bugs.webkit.org/show_bug.cgi?id=115366
Reviewed by Tim Horton.
Use a WKSystemInterface method to determine which voice per language is the default voice.
When looking for a voice, there may not be a default at all, so we need to search until we
find a default.
* WebCore.exp.in:
* platform/mac/PlatformSpeechSynthesizerMac.mm:
(-[WebSpeechSynthesisWrapper speakUtterance:WebCore::]):
(WebCore::PlatformSpeechSynthesizer::initializeVoiceList):
* platform/mac/WebCoreSystemInterface.h:
* platform/mac/WebCoreSystemInterface.mm:
2013-04-29 James Craig <james@cookiecrook.com>
Settings.in selectionIncludesAltImageText should default to true, due to update in HTML spec.
https://bugs.webkit.org/show_bug.cgi?id=115283
Reviewed by Chris Fleizach.
Config change due to this spec update:
https://www.w3.org/Bugs/Public/show_bug.cgi?id=21403
http://html5.org/tools/web-apps-tracker?from=7854&to=7855
Updated existing test coverage.
* page/Settings.in:
2013-04-29 Anders Carlsson <andersca@apple.com>
Make RunLoop ref-counted
https://bugs.webkit.org/show_bug.cgi?id=115384
Reviewed by Sam Weinig.
This is a step towards creating a shared base class that both RunLoop and WorkQueue will derive from.
* platform/RunLoop.cpp:
(WebCore::RunLoop::current):
(WebCore::RunLoop::~RunLoop):
(WebCore):
* platform/RunLoop.h:
(RunLoop):
* platform/cf/RunLoopCF.cpp:
(WebCore::RunLoop::initializeMainRunLoop):
(WebCore::RunLoop::current):
(WebCore::RunLoop::~RunLoop):
2013-04-29 Brent Fulgham <bfulgham@webkit.org>
[Windows, WinCairo] Remove link and include directives for pthread.
https://bugs.webkit.org/show_bug.cgi?id=115381
Reviewed by Benjamin Poulain.
Update various VS2005 and VS2010 property sheets to remove
reference to the pthreads Include path and instructions to
link to the pthreads library.
* WebCore.vcproj/QTMovieWinCommon.vsprops:
* WebCore.vcproj/WebCoreCommon.vsprops:
* WebCore.vcproj/WebCoreDebug.vsprops:
* WebCore.vcproj/WebCoreDebugAll.vsprops:
* WebCore.vcproj/WebCoreProduction.vsprops:
* WebCore.vcproj/WebCorePthreads.vsprops: Removed.
* WebCore.vcproj/WebCoreRelease.vsprops:
* WebCore.vcxproj/WebCoreCommon.props:
* WebCore.vcxproj/WebCoreDebug.props:
* WebCore.vcxproj/WebCoreDebugWinCairo.props:
* WebCore.vcxproj/WebCoreProduction.props:
* WebCore.vcxproj/WebCorePthreads.props: Removed.
* WebCore.vcxproj/WebCoreRelease.props:
* WebCore.vcxproj/WebCoreReleaseWinCairo.props:
2013-04-29 Benjamin Poulain <benjamin@webkit.org>
Do not allocate Static Strings for Notification::permissionString
https://bugs.webkit.org/show_bug.cgi?id=115316
Reviewed by Geoffrey Garen.
The code is not nearly hot enough to justify keeping this memory around.
* Modules/notifications/Notification.cpp:
(WebCore::Notification::permission):
(WebCore::Notification::permissionString):
* Modules/notifications/Notification.h:
(Notification):
2013-04-29 Anders Carlsson <andersca@apple.com>
Remove StorageTracker::originsLoaded
https://bugs.webkit.org/show_bug.cgi?id=115382
Reviewed by Sam Weinig.
Remove m_finishedImportingOriginIdentifiers.
* storage/StorageTracker.cpp:
(WebCore::StorageTracker::StorageTracker):
(WebCore::StorageTracker::finishedImportingOriginIdentifiers):
* storage/StorageTracker.h:
(StorageTracker):
2013-04-29 Anders Carlsson <andersca@apple.com>
Get rid of StorageTracker::setClient
https://bugs.webkit.org/show_bug.cgi?id=115376
Reviewed by Sam Weinig.
* WebCore.exp.in:
* storage/StorageTracker.cpp:
* storage/StorageTracker.h:
(StorageTracker):
2013-04-22 Jeffrey Pfau <jpfau@apple.com>
Change approach to third-party blocking for LocalStorage
https://bugs.webkit.org/show_bug.cgi?id=115004
Reviewed by Maciej Stachowiak.
Instead of outright blocking LocalStorage that's used in a third-party
context, silently partition it based on the origin of the top context.
These partitions are then discarded when the page group is unloaded.
No new tests; modified existing tests to account for changes.
* page/DOMWindow.cpp:
(WebCore::DOMWindow::localStorage):
* page/PageGroup.cpp:
(WebCore::PageGroup::localStorage):
(WebCore):
(WebCore::PageGroup::transientLocalStorage):
* page/PageGroup.h:
(PageGroup):
* page/SecurityOrigin.cpp:
(WebCore::SecurityOrigin::canAccessStorage):
2013-04-29 Yi Shen <max.hong.shen@gmail.com>
HTML Editing: Insertion point jumps when using link detection
https://bugs.webkit.org/show_bug.cgi?id=82198
Reviewed by Ryosuke Niwa.
Add links should be done only when typing a word separator (e.g. space or dot) which
breaks the text into two parts - the link and the rest of the text. Reflected in
code, we should only add link when the caret position is at the right end location of
TextChecking result. Otherwise, the text on the right of a word separator could be
highlighted as a link and the insertion point jumps unexpectedly.
Tests: update editing/inserting/typing-space-to-trigger-smart-link.html
* editing/Editor.cpp:
(WebCore::Editor::markAndReplaceFor):
2013-04-29 Beth Dakin <bdakin@apple.com>
Need a LayoutMilestone to fire when we have done our first paint after suppressing
incremental layout
https://bugs.webkit.org/show_bug.cgi?id=115330
-and corresponding-
<rdar://problem/12722365>
Reviewed by Simon Fraser.
To meet the needs of all of our clients, we really need two milestones. One
indicating that a layout has happened after setVisualUpdatesAllowed(true), and
another indicating that painting has happened.
If layout is needed when setVisualUpdatesAllowed(true) is called, we need to
update it so that we can guarantee the first paint is really happening at this
time. Also fire the DidFirstLayoutAfterSuppressedIncrementalRendering milestone,
and call add DidFirstPaintAfterSuppressedIncrementalRendering to the FrameView's
pending paint milestones.
up the painting milestone.
* dom/Document.cpp:
(WebCore::Document::setVisualUpdatesAllowed):
FrameView now stores m_milestonesPendingPaint. We'll send and clear them once we
have painted.
* page/FrameView.cpp:
(WebCore::FrameView::FrameView):
(WebCore::FrameView::paintContents):
(WebCore::FrameView::addPaintPendingMilestones):
(WebCore::FrameView::firePaintRelatedMilestones):
* page/FrameView.h:
(WebCore::FrameView::milestonesPendingPaint):
Two new milestones.
* page/LayoutMilestones.h:
(WebCore):
We don't need m_headerLayerAwaitingFirstFlush anymore since we can use FrameView's
pending paint milestones instead.
* rendering/RenderLayerCompositor.cpp:
(WebCore::RenderLayerCompositor::RenderLayerCompositor):
(WebCore::RenderLayerCompositor::flushPendingLayerChanges):
(WebCore::RenderLayerCompositor::updateLayerForHeader):
* rendering/RenderLayerCompositor.h:
(RenderLayerCompositor):
2013-04-29 David Hyatt <hyatt@apple.com>
[Mac] Links can't be hovered or clicked with overlay scrollbars hidden.
https://bugs.webkit.org/show_bug.cgi?id=99379
This is also <rdar://problem/10929565> Overlay scrollbars prevent hit-testing on
content underneath them, even when hidden
Reviewed by Beth Dakin.
* rendering/RenderLayer.cpp:
(WebCore::RenderLayer::verticalScrollbarWidth):
(WebCore::RenderLayer::horizontalScrollbarHeight):
2013-04-29 Anders Carlsson <andersca@apple.com>
Begin cleaning up StorageTracker
https://bugs.webkit.org/show_bug.cgi?id=115373
Reviewed by Andreas Kling.
Rename Mutexes to use "Mutex" and not "Guard".
Don't use static locals for ".localstorage" and "*.localstorage" strings.
Put end iterator declarations together with begin declarations.
* storage/StorageTracker.cpp:
(WebCore::StorageTracker::setDatabaseDirectoryPath):
(WebCore::StorageTracker::trackerDatabasePath):
(WebCore::StorageTracker::openTrackerDatabase):
(WebCore::StorageTracker::finishedImportingOriginIdentifiers):
(WebCore::StorageTracker::syncImportOriginIdentifiers):
(WebCore::StorageTracker::syncFileSystemAndTrackerDatabase):
(WebCore::StorageTracker::setOriginDetails):
(WebCore::StorageTracker::syncSetOriginDetails):
(WebCore::StorageTracker::origins):
(WebCore::StorageTracker::deleteAllOrigins):
(WebCore::StorageTracker::syncDeleteAllOrigins):
(WebCore::StorageTracker::deleteOrigin):
(WebCore::StorageTracker::syncDeleteOrigin):
(WebCore::StorageTracker::willDeleteAllOrigins):
(WebCore::StorageTracker::willDeleteOrigin):
(WebCore::StorageTracker::canDeleteOrigin):
(WebCore::StorageTracker::cancelDeletingOrigin):
(WebCore::StorageTracker::setClient):
(WebCore::StorageTracker::databasePathForOrigin):
(WebCore::StorageTracker::diskUsageForOrigin):
* storage/StorageTracker.h:
(StorageTracker):
2013-04-29 Andreas Kling <akling@apple.com>
Don't check for @media rules affected by viewport changes in every layout.
<http://webkit.org/b/115370>
<rdar://problem/13765739>
Reviewed by Antti Koivisto.
Move the logic that checks if any @media rules are affected by a change in the viewport
size to FrameView::setFrameRect(). This way it's no longer necessary to do the style
recalc synchronously, which allows us to coalesce multiple updates in some cases.
* page/FrameView.cpp:
(WebCore::FrameView::setFrameRect):
(WebCore::FrameView::layout):
2013-04-29 Anders Carlsson <andersca@apple.com>
Remove the last StorageSyncManager function
https://bugs.webkit.org/show_bug.cgi?id=115371
Reviewed by Sam Weinig.
Move the import scheduling to the StorageAreaSync constructor. Remove code to set m_importComplete to true
since that could only happen if the StorageSyncManager's thread is null which doesn't make any sense.
* storage/StorageAreaSync.cpp:
(WebCore::StorageAreaSync::StorageAreaSync):
(WebCore::StorageAreaSync::create):
* storage/StorageSyncManager.cpp:
* storage/StorageSyncManager.h:
(StorageSyncManager):
2013-04-29 Daker Fernandes Pinheiro <daker.pinheiro@openbossa.org>
Remove unused method RenderMeter::valueRatio()
https://bugs.webkit.org/show_bug.cgi?id=115266
Reviewed by Darin Adler.
The removed method is not used anywhere.
No new tests are required.
* rendering/RenderMeter.cpp:
* rendering/RenderMeter.h:
(RenderMeter):
2013-04-29 Anders Carlsson <andersca@apple.com>
Remove two more StorageSyncManager wrapper functions
https://bugs.webkit.org/show_bug.cgi?id=115367
Reviewed by Andreas Kling.
* storage/StorageAreaSync.cpp:
(WebCore::StorageAreaSync::scheduleFinalSync):
(WebCore::StorageAreaSync::syncTimerFired):
* storage/StorageSyncManager.cpp:
* storage/StorageSyncManager.h:
2013-04-29 Stephen Chenney <schenney@chromium.org>
SVGElement destructor can use invalid iterator
https://bugs.webkit.org/show_bug.cgi?id=115361
Reviewed by Philip Rogers.
When an SVGElement object has rare data, its destructor gets a
hash map iterator for the rare data, uses it to clear resources,
then uses the iterator to delete the rare data. However, the resource
cleanup can delete other SVG elements, thus modifying the hash map
from which the iterator came and hence invalidating the iterator
itself.
The fix is to re-get the iterator before deleting the rare data.
Test: svg/custom/svg-element-destructor-iteration-crash.html
* svg/SVGElement.cpp:
(WebCore::SVGElement::~SVGElement): Get a new iterator after clearing rare data.
2013-04-29 Brady Eidson <beidson@apple.com>
REGRESSION: We see authentication challenge sheets for favicon requests.
<rdar://problem/13753470> and https://bugs.webkit.org/show_bug.cgi?id=115288
Reviewed by Alexey Proskuryakov.
No new tests (Not in a tested config, might fix existing test).
Rename ClientCrossOriginCredentialPolicy to ClientCredentialPolicy, make it be three options.
and move it to ResourceHandleTypes where it belongs:
* loader/ResourceLoaderOptions.h:
* platform/network/ResourceHandleTypes.h:
Expose the ClientCredentialPolicy the ResourceLoader was created with:
* loader/ResourceLoader.h:
(WebCore::ResourceLoader::clientCredentialPolicy):
Rework the “should ask client” clause for the new values of ClientCredentialPolicy:
* loader/ResourceLoader.cpp:
(WebCore::ResourceLoader::didReceiveAuthenticationChallenge):
Rework loadResourceSynchronously() to include a ClientCredentialPolicy argument:
* loader/FrameLoader.cpp:
(WebCore::FrameLoader::loadResourceSynchronously):
* loader/FrameLoader.h:
* loader/LoaderStrategy.cpp:
(WebCore::LoaderStrategy::loadResourceSynchronously):
* loader/LoaderStrategy.h:
Never ask the client for credentials for icon loads:
* loader/icon/IconLoader.cpp:
(WebCore::IconLoader::startLoading):
Update all other users of ClientCredentialPolicy to the appropriate new value,
and update all users of loadResourceSynchronously to the new function signature:
* inspector/InspectorFrontendHost.cpp:
(WebCore::InspectorFrontendHost::loadResourceSynchronously):
* loader/DocumentLoader.cpp:
(WebCore::DocumentLoader::startLoadingMainResource):
* loader/DocumentThreadableLoader.cpp:
(WebCore::DocumentThreadableLoader::loadRequest):
* loader/FrameLoader.cpp:
(WebCore::FrameLoader::loadResourceSynchronously):
* loader/FrameLoader.h:
(FrameLoader):
* loader/LoaderStrategy.cpp:
(WebCore::LoaderStrategy::loadResourceSynchronously):
* loader/LoaderStrategy.h:
(LoaderStrategy):
* loader/NetscapePlugInStreamLoader.cpp:
(WebCore::NetscapePlugInStreamLoader::NetscapePlugInStreamLoader):
* loader/cache/CachedResourceLoader.cpp:
(WebCore::CachedResourceLoader::requestUserCSSStyleSheet):
(WebCore::CachedResourceLoader::defaultCachedResourceOptions):
* xml/XSLTProcessorLibxslt.cpp:
(WebCore::docLoaderFunc):
* xml/parser/XMLDocumentParserLibxml2.cpp:
(WebCore::openFunc):
* WebCore.exp.in:
2013-04-29 Anders Carlsson <andersca@apple.com>
Add a StorageSyncManager::dispatch helper function
https://bugs.webkit.org/show_bug.cgi?id=115365
Reviewed by Andreas Kling.
* storage/StorageSyncManager.cpp:
(WebCore::StorageSyncManager::dispatch):
(WebCore):
(WebCore::StorageSyncManager::close):
(WebCore::StorageSyncManager::scheduleImport):
(WebCore::StorageSyncManager::scheduleSync):
(WebCore::StorageSyncManager::scheduleDeleteEmptyDatabase):
* storage/StorageSyncManager.h:
(StorageSyncManager):
2013-04-29 Anders Carlsson <andersca@apple.com>
Re-indent StorageSyncManager and remove SecurityOrigin forward declaration.
Rubber-stamped by Andreas Kling.
* storage/StorageSyncManager.h:
2013-04-27 Anders Carlsson <andersca@apple.com>
Get rid of StorageTask
https://bugs.webkit.org/show_bug.cgi?id=115313
Reviewed by Andreas Kling.
* CMakeLists.txt:
* GNUmakefile.list.am:
* Target.pri:
* WebCore.vcproj/WebCore.vcproj:
* WebCore.vcxproj/WebCore.vcxproj:
* WebCore.vcxproj/WebCore.vcxproj.filters:
* WebCore.xcodeproj/project.pbxproj:
* storage/StorageSyncManager.cpp:
* storage/StorageTask.cpp: Removed.
* storage/StorageTask.h: Removed.
* storage/StorageThread.cpp:
(WebCore::StorageThread::threadEntryPoint):
(WebCore::StorageThread::dispatch):
(WebCore::StorageThread::terminate):
* storage/StorageThread.h:
(StorageThread):
* storage/StorageTracker.cpp:
2013-04-29 Andreas Kling <akling@apple.com>
Add branch-prediction hint to FAST_RETURN_IF_NO_FRONTENDS.
<http://webkit.org/b/115357>
Reviewed by Anders Carlsson.
Since this macro is used in some very hot code paths, give the compiler an extra hint
to try and minimize the impact it has when the inspector is not active.
* inspector/InspectorInstrumentation.h:
2013-04-29 Patrick Gansterer <paroga@webkit.org>
[WIN] Add WTF_USE_IMLANG_FONT_LINK2
https://bugs.webkit.org/show_bug.cgi?id=115198
Reviewed by Andreas Kling.
Add this new define to have a central place for switching
the IMLangFontLinkType and adop all usages of the type.
This makes the usage of the code easier on desktop pcs.
* platform/graphics/FontCache.h:
(WebCore):
* platform/graphics/wince/FontCacheWinCE.cpp:
(WebCore::currentFontContainsCharacter):
(WebCore::createMLangFont):
(WebCore::FontCache::getFontDataForCharacters):
* platform/graphics/wince/SimpleFontDataWinCE.cpp:
(WebCore::SimpleFontData::containsCharacters):
2013-04-29 Noam Rosenthal <noam@webkit.org>
Get rid of "non-composited contents" in CoordinatedLayerTreeHost
https://bugs.webkit.org/show_bug.cgi?id=110355
Reviewed by Jocelyn Turcotte.
When in force compositing mode, always assume that the main layer needs
a backing store. Make setVisibleContentRectTrajectoryVector and accumulatedCoverRect
recursive so that they don't rely on a specialized layer.
No new testable behavior, changes to coverRect and trajectory vector only
affect tiling latency in rare cases that are not trivial to test.
* platform/graphics/texmap/coordinated/CoordinatedGraphicsLayer.cpp:
(WebCore::CoordinatedGraphicsLayer:setVisibleContentRectTrajectoryVector):
Make the trajectory vector recursive, though limited only to layers with
translate/identity. This allows us to keep the trajectory vector while removing
the non-composited contents specialization.
(WebCore::CoordinatedGraphicsLayer::accumulatedCoverRect):
Added accumulatedCoverRect, so that the coverRect calculations for the UI process
are not bound to the non-composited contents layer.
(WebCore::CoordinatedGraphicsLayer::findDescendantWithContentsRecursively):
Instead of saving a reference to the non-composited contents layer, we assume that
the first layer we found recursively which has contents is the one to be used for
coverRect/trajectory calculations.
(WebCore):
* platform/graphics/texmap/coordinated/CoordinatedGraphicsLayer.h:
(CoordinatedGraphicsLayer):
* rendering/RenderLayerBacking.cpp:
(WebCore::RenderLayerBacking::paintsIntoWindow):
Always create a layer for the non-composited contents when in forceCompositing mode.
2013-04-29 Dirk Schulze <krit@webkit.org>
Animate clip rect() between different Length types
https://bugs.webkit.org/show_bug.cgi?id=115336
Reviewed by Andreas Kling.
At the moment the animation for the 'clip' property
has an early return if the type of two Length values
does not match. This patch removes this early return.
Modified existing tests to cover the changes.
* page/animation/CSSPropertyAnimation.cpp:
(WebCore::blendFunc):
2013-04-29 Andreas Kling <akling@apple.com>
When updating geometry, send JavaScript resize before before layout/paint.
<http://webkit.org/b/115199>
<rdar://problem/13735535>
Reviewed by Geoffrey Garen.
Make the "resize" event synchronous and dispatch it before doing any automatic
resize-induced layout. This avoids unnecessary work in cases where an event handler
does something that dirties style.
It also avoids a kind of JS-side FOUC that happens if we drop out to the runloop
and paint before the resize event handler runs; for example, when viewing a popup
on <http://lokeshdhakar.com/projects/lightbox2/> and resizing the window, the dark
overlay sometimes resizes out of sync with the web view, since a paint may happen
between automatic layout and the resize event.
* page/EventHandler.h:
* page/EventHandler.cpp:
(WebCore::EventHandler::dispatchResizeEvent):
* page/FrameView.h:
* page/FrameView.cpp:
(WebCore::FrameView::dispatchResizeEvent):
Renamed sendResizeEvent() to dispatchResizeEvent() and made it dispatch the event
synchronously instead of adding it to the DocumentEventQueue.
(WebCore::FrameView::performPostLayoutTasks):
(WebCore::FrameView::setFrameRect):
Dispatch the "resize" event right when the new frame rect is set.
2013-04-29 Patrick Gansterer <paroga@webkit.org>
Remove OS(WINCE) from (Render|Scrollbar)ThemeWin.cpp
https://bugs.webkit.org/show_bug.cgi?id=115348
Reviewed by Andreas Kling.
Compile DIBPixelData.cpp on Windows CE too, which allows us
to get rid of a few #if OS(WINCE) in other code parts.
* PlatformWinCE.cmake:
* platform/graphics/win/DIBPixelData.cpp:
(WebCore::DIBPixelData::setRGBABitmapAlpha):
* platform/win/ScrollbarThemeWin.cpp:
(WebCore::ScrollbarThemeWin::paintTrackPiece):
(WebCore::ScrollbarThemeWin::paintButton):
(WebCore::ScrollbarThemeWin::paintThumb):
* rendering/RenderThemeWin.cpp:
(WebCore::drawControl):
2013-04-29 Eli Fidler <efidler@blackberry.com>
[BlackBerry] Fake-bold monospace fonts need to use non-fake-bold advances
https://bugs.webkit.org/show_bug.cgi?id=115280
Reviewed by George Staikos.
BlackBerry PR 330864
Tested by fast/css/css3-ch-unit.html
* platform/graphics/blackberry/FontPlatformDataBlackBerry.cpp:
(WebCore::FontPlatformData::applyState):
(WebCore::FontPlatformData::isFixedPitch):
* platform/graphics/blackberry/ITypeUtils.h:
* platform/graphics/blackberry/SimpleFontDataBlackBerry.cpp:
(WebCore::SimpleFontData::platformWidthForGlyph):
2013-04-29 ChangSeok Oh <changseok.oh@collabora.com>
[GTK][AC] Clean up code related with the children management stuff for clutter based AC
https://bugs.webkit.org/show_bug.cgi?id=114260
Reviewed by Gustavo Noronha Silva.
Remove unused or usless code for children management stuff.
No new tests since no functionality changed.
* platform/graphics/clutter/GraphicsLayerActor.cpp:
(_GraphicsLayerActorPrivate):
(graphics_layer_actor_class_init):
(graphicsLayerActorAllocate):
(graphicsLayerActorDraw):
(graphicsLayerActorNew):
(graphicsLayerActorSetSublayers):
* platform/graphics/clutter/GraphicsLayerActor.h:
* platform/graphics/clutter/GraphicsLayerClutter.cpp:
(WebCore::idleDestroy):
(WebCore::GraphicsLayerClutter::ensureStructuralLayer):
(WebCore::GraphicsLayerClutter::updateLayerDrawsContent):
2013-04-29 Patrick Gansterer <paroga@webkit.org>
[WIN] Guard cfHDropFormat() with USE(CF) instead of OS(WINCE)
https://bugs.webkit.org/show_bug.cgi?id=115195
Reviewed by Andreas Kling.
USE(CF) is the correct guard, which works on desktop pcs too.
* platform/win/ClipboardWin.cpp:
(WebCore::ClipboardWin::files):
* platform/win/DragDataWin.cpp:
(WebCore::DragData::containsFiles):
(WebCore::DragData::numberOfFiles):
(WebCore::DragData::asFilenames):
2013-04-29 Carlos Garcia Campos <cgarcia@igalia.com>
Unreviewed. Fix make distcheck.
* GNUmakefile.am: Add missing scripts to EXTRA_DIST.
* GNUmakefile.list.am: Add missing files to compilation.
2013-04-29 Noam Rosenthal <noam@webkit.org>
[Qt] fast/canvas/webgl/webgl-composite-modes.html broken after r148433.
https://bugs.webkit.org/show_bug.cgi?id=115243
Reviewed by Jocelyn Turcotte.
When compositing a layer with a canvas or directly composited image, it is
wrong to use TextureMapperLayer::setBackingStore. Instead, setContentsLayer
should be used, which allows for the layer to have both a backing store and
a contents layer.
* platform/graphics/texmap/TextureMapperLayer.cpp:
(WebCore::TextureMapperLayer::paintSelf):
* platform/graphics/texmap/TextureMapperLayer.h:
(State):
(WebCore::TextureMapperLayer::State::State):
* platform/graphics/texmap/coordinated/CoordinatedGraphicsScene.cpp:
(WebCore::CoordinatedGraphicsScene::createCanvasIfNeeded):
(WebCore::CoordinatedGraphicsScene::destroyCanvasIfNeeded):
(WebCore::CoordinatedGraphicsScene::assignImageBackingToLayer):
2013-04-29 Patrick Gansterer <paroga@webkit.org>
Unreviewed build fix.
* bindings/js/WorkerScriptDebugServer.cpp: Added missing header.
2013-04-29 Patrick Gansterer <paroga@webkit.org>
Unreviewed build fix.
* platform/graphics/wince/FontWinCE.cpp:
(WebCore::generateComponents):
2013-04-29 Patrick Gansterer <paroga@webkit.org>
Remove OS(WINCE) from HTMLSelectElement.cpp
https://bugs.webkit.org/show_bug.cgi?id=115194
Reviewed by Andreas Kling.
Use the same files like the the other PLATFORM(WIN) ports use.
* PlatformWinCE.cmake:
* html/HTMLSelectElement.cpp:
(WebCore):
2013-04-25 Ryosuke Niwa <rniwa@webkit.org>
StaticHashSetNodeList is unnecessary
https://bugs.webkit.org/show_bug.cgi?id=115219
Reviewed by Antonio Gomes.
Moved Document::nodesFromRect into Internals::nodesFromRect per
https://chromium.googlesource.com/chromium/blink/+/78207c5c34383fbb807bb9347deb67168f09bb04.
Also made TouchAdjustment functions use HashListSet directly instead of wrapping it inside
a StaticHashSetNodeList since there was no need to use the latter.
With these two changes, I deleted StaticHashSetNodeList.
* GNUmakefile.list.am:
* Target.pri:
* WebCore.exp.in:
* WebCore.xcodeproj/project.pbxproj:
* dom/Document.cpp:
(WebCore):
* dom/Document.h:
(Document):
* dom/StaticHashSetNodeList.cpp: Removed.
* dom/StaticHashSetNodeList.h: Removed.
* page/EventHandler.cpp:
(WebCore::EventHandler::bestClickableNodeForTouchPoint):
(WebCore::EventHandler::bestContextMenuNodeForTouchPoint):
(WebCore::EventHandler::bestZoomableAreaForTouchPoint):
* page/TouchAdjustment.cpp:
(WebCore::TouchAdjustment::compileSubtargetList):
(WebCore::TouchAdjustment::compileZoomableSubtargets):
(WebCore::findBestClickableCandidate):
(WebCore::findBestContextMenuCandidate):
(WebCore::findBestZoomableArea):
* page/TouchAdjustment.h:
(WebCore):
* testing/Internals.cpp:
(WebCore::Internals::nodesFromRect):
2013-04-28 Dean Jackson <dino@apple.com>
[Mac] Disable canvas backing store scaling (HIGH_DPI_CANVAS)
https://bugs.webkit.org/show_bug.cgi?id=115310
Reviewed by Simon Fraser.
Disable the automatic pixel doubling in canvas backing stores on high
dpi devices. This will potentially make canvases look worse of high dpi
displays, but only if they were ignoring devicePixelRatio. Since the
majority of high dpi displays *do not* auto-double (including mobile
devices and other desktop browsers), this provides consistency and less
chance of unnecessary memory use.
* Configurations/FeatureDefines.xcconfig: Remove ENABLE_HIGH_DPI_CANVAS_macosx.
2013-04-28 Christophe Dumez <ch.dumez@sisa.samsung.com>
Get rid of [Callback] IDL extended attribute for parameters
https://bugs.webkit.org/show_bug.cgi?id=115250
Reviewed by Kentaro Hara.
Remove the WebKit-specific [Callback] extended attribute and make the bindings
generator smart enough to know when a parameter is of callback type on its
own.
No new tests, no behavior change.
* DerivedSources.make: Use WebCore/Modules as IDL include path instead of using
subdirs. The generator will search recursively anyway and the list of subdirs was
incomplete.
* Modules/filesystem/DOMWindowFileSystem.idl:
* Modules/filesystem/DirectoryEntry.idl:
* Modules/filesystem/DirectoryReader.idl:
* Modules/filesystem/Entry.idl:
* Modules/filesystem/FileEntry.idl:
* Modules/filesystem/WorkerContextFileSystem.idl:
* Modules/mediastream/NavigatorMediaStream.idl:
* Modules/mediastream/RTCPeerConnection.idl:
* Modules/notifications/Notification.idl:
* Modules/notifications/NotificationCenter.idl:
* Modules/quota/StorageInfo.idl:
* Modules/quota/StorageQuota.idl:
* Modules/webaudio/AudioContext.idl:
* Modules/webdatabase/DOMWindowWebDatabase.idl:
* Modules/webdatabase/Database.idl:
* Modules/webdatabase/DatabaseSync.idl:
* Modules/webdatabase/SQLTransaction.idl:
* Modules/webdatabase/WorkerContextWebDatabase.idl:
* bindings/gobject/GNUmakefile.am: Add missing IDL include dirs.
* bindings/scripts/CodeGenerator.pm:
(IsWrapperType):
(IsCallbackInterface):
* bindings/scripts/CodeGeneratorGObject.pm:
(SkipFunction):
* bindings/scripts/CodeGeneratorJS.pm:
(GenerateParametersCheckExpression):
(GenerateParametersCheck):
* bindings/scripts/IDLAttributes.txt: Remove "Callback" extended attribute.
* bindings/scripts/test/CPP/WebDOMTestCallback.cpp:
(WebDOMTestCallback::callbackWithArrayParam):
(WebDOMTestCallback::callbackWithSerializedScriptValueParam):
(WebDOMTestCallback::callbackWithNonBoolReturnType):
(WebDOMTestCallback::callbackRequiresThisToPass):
* bindings/scripts/test/CPP/WebDOMTestCallback.h:
(WebDOMTestCallback):
* bindings/scripts/test/CPP/WebDOMTestObj.cpp:
(WebDOMTestObj::convert1):
(WebDOMTestObj::convert2):
(WebDOMTestObj::convert4):
(WebDOMTestObj::convert5):
* bindings/scripts/test/CPP/WebDOMTestObj.h:
* bindings/scripts/test/CPP/WebDOMTestSerializedScriptValueInterface.cpp:
(WebDOMTestSerializedScriptValueInterface::acceptTransferList):
(WebDOMTestSerializedScriptValueInterface::multiTransferList):
* bindings/scripts/test/CPP/WebDOMTestSerializedScriptValueInterface.h:
(WebDOMTestSerializedScriptValueInterface):
* bindings/scripts/test/CPP/WebDOMTestTypedefs.cpp:
(WebDOMTestTypedefs::multiTransferList):
* bindings/scripts/test/CPP/WebDOMTestTypedefs.h:
(WebDOMTestTypedefs):
* bindings/scripts/test/GObject/WebKitDOMTestCallback.cpp:
(webkit_dom_test_callback_callback_with_array_param):
(webkit_dom_test_callback_callback_with_serialized_script_value_param):
(webkit_dom_test_callback_callback_with_non_bool_return_type):
(webkit_dom_test_callback_callback_requires_this_to_pass):
* bindings/scripts/test/GObject/WebKitDOMTestCallback.h:
* bindings/scripts/test/GObject/WebKitDOMTestObj.cpp:
(webkit_dom_test_obj_convert1):
(webkit_dom_test_obj_convert2):
(webkit_dom_test_obj_convert4):
(webkit_dom_test_obj_convert5):
* bindings/scripts/test/GObject/WebKitDOMTestObj.h:
* bindings/scripts/test/GObject/WebKitDOMTestSerializedScriptValueInterface.cpp:
(webkit_dom_test_serialized_script_value_interface_accept_transfer_list):
(webkit_dom_test_serialized_script_value_interface_multi_transfer_list):
* bindings/scripts/test/GObject/WebKitDOMTestSerializedScriptValueInterface.h:
* bindings/scripts/test/GObject/WebKitDOMTestTypedefs.cpp:
(webkit_dom_test_typedefs_multi_transfer_list):
* bindings/scripts/test/GObject/WebKitDOMTestTypedefs.h:
* bindings/scripts/test/JS/JSTestCallback.cpp:
(WebCore::JSTestCallback::callbackWithArrayParam):
(WebCore::JSTestCallback::callbackWithSerializedScriptValueParam):
(WebCore::JSTestCallback::callbackRequiresThisToPass):
* bindings/scripts/test/JS/JSTestCallback.h:
(JSTestCallback):
* bindings/scripts/test/JS/JSTestObj.cpp:
(WebCore::jsTestObjPrototypeFunctionConvert1):
(WebCore::jsTestObjPrototypeFunctionConvert2):
(WebCore::jsTestObjPrototypeFunctionConvert4):
(WebCore::jsTestObjPrototypeFunctionConvert5):
* bindings/scripts/test/JS/JSTestSerializedScriptValueInterface.cpp:
(WebCore::JSTestSerializedScriptValueInterfaceConstructor::constructJSTestSerializedScriptValueInterface):
(WebCore::jsTestSerializedScriptValueInterfacePrototypeFunctionAcceptTransferList):
(WebCore::jsTestSerializedScriptValueInterfacePrototypeFunctionMultiTransferList):
* bindings/scripts/test/JS/JSTestTypedefs.cpp:
(WebCore::jsTestTypedefsPrototypeFunctionMultiTransferList):
* bindings/scripts/test/ObjC/DOMTestCallback.h:
* bindings/scripts/test/ObjC/DOMTestCallback.mm:
(-[DOMTestCallback callbackWithArrayParam:]):
(-[DOMTestCallback callbackWithSerializedScriptValueParam:strArg:]):
(-[DOMTestCallback callbackWithNonBoolReturnType:]):
(-[DOMTestCallback callbackRequiresThisToPass:testNodeParam:]):
* bindings/scripts/test/ObjC/DOMTestObj.h:
* bindings/scripts/test/ObjC/DOMTestObj.mm:
(-[DOMTestObj convert1:]):
(-[DOMTestObj convert2:]):
(-[DOMTestObj convert4:]):
(-[DOMTestObj convert5:]):
* bindings/scripts/test/ObjC/DOMTestSerializedScriptValueInterface.h:
* bindings/scripts/test/ObjC/DOMTestSerializedScriptValueInterface.mm:
(-[DOMTestSerializedScriptValueInterface acceptTransferList:transferList:]):
(-[DOMTestSerializedScriptValueInterface multiTransferList:tx:second:txx:]):
* bindings/scripts/test/ObjC/DOMTestTypedefs.h:
* bindings/scripts/test/ObjC/DOMTestTypedefs.mm:
(-[DOMTestTypedefs multiTransferList:tx:second:txx:]):
* bindings/scripts/test/TestCallback.idl: Use valid types instead of Class1, Class2, ...
so that the bindings generator does not complain about not being able to resolve
them.
* bindings/scripts/test/TestObj.idl: Use valid parameter types instead of 'a', 'b', 'd', 'e'
so that the bindings generator does not complain about them.
* bindings/scripts/test/TestSerializedScriptValueInterface.idl:
* bindings/scripts/test/TestTypedefs.idl:
* css/FontLoader.idl:
* dom/DataTransferItem.idl:
* page/DOMWindow.idl:
2013-04-27 Darin Adler <darin@apple.com>
Move from constructor and member function adoptCF/NS to free function adoptCF/NS.
https://bugs.webkit.org/show_bug.cgi?id=115307
Reviewed by Geoffrey Garen.
This change was done by a global replace followed by compiling and inspecting for
cases that needed to be tweaked by hand.
* accessibility/ios/AXObjectCacheIOS.mm:
(WebCore::AXObjectCache::attachWrapper):
* accessibility/mac/AXObjectCacheMac.mm:
(WebCore::AXObjectCache::attachWrapper):
* bridge/objc/objc_class.mm:
(JSC::Bindings::ObjcClass::methodNamed):
(JSC::Bindings::ObjcClass::fieldNamed):
* bridge/objc/objc_runtime.mm:
(JSC::Bindings::ObjcField::ObjcField):
* editing/mac/EditorMac.mm:
(WebCore::Editor::fontAttributesForSelectionStart):
* history/cf/HistoryPropertyList.cpp:
(WebCore::HistoryPropertyListWriter::releaseData):
* html/HTMLMediaElement.cpp:
(WebCore::createFileURLForApplicationCacheResource):
* loader/archive/cf/LegacyWebArchive.cpp:
(WebCore::LegacyWebArchive::createPropertyListRepresentation):
(WebCore::LegacyWebArchive::create):
(WebCore::LegacyWebArchive::rawDataRepresentation):
* loader/archive/cf/LegacyWebArchiveMac.mm:
(WebCore::LegacyWebArchive::createPropertyListRepresentation):
* loader/mac/ResourceLoaderMac.mm:
(WebCore::ResourceLoader::willCacheResponse):
* page/CaptionUserPreferencesMac.mm:
(WebCore::CaptionUserPreferencesMac::userPrefersCaptions):
(WebCore::CaptionUserPreferencesMac::userPrefersSubtitles):
(WebCore::CaptionUserPreferencesMac::captionsWindowCSS):
(WebCore::CaptionUserPreferencesMac::captionsBackgroundCSS):
(WebCore::CaptionUserPreferencesMac::captionsTextColor):
(WebCore::CaptionUserPreferencesMac::captionsDefaultFontCSS):
(WebCore::CaptionUserPreferencesMac::preferredLanguages):
(WebCore::trackDisplayName):
* platform/Language.cpp:
(WebCore::displayNameForLanguageLocale):
* platform/LocalizedStrings.cpp:
(WebCore::contextMenuItemTagSearchWeb):
(WebCore::imageTitle):
* platform/MIMETypeRegistry.cpp:
(WebCore::initializeSupportedImageMIMETypes):
(WebCore::initializeSupportedImageMIMETypesForEncoding):
* platform/audio/mac/AudioFileReaderMac.cpp:
(WebCore::AudioFileReader::AudioFileReader):
* platform/cf/KURLCFNet.cpp:
(WebCore::KURL::fileSystemPath):
* platform/cf/SharedBufferCF.cpp:
(WebCore::SharedBuffer::maybeTransferPlatformData):
* platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
(WebCore::MediaPlayerPrivateAVFoundationObjC::MediaPlayerPrivateAVFoundationObjC):
(WebCore::MediaPlayerPrivateAVFoundationObjC::createVideoLayer):
(WebCore::MediaPlayerPrivateAVFoundationObjC::createAVAssetForURL):
(WebCore::MediaPlayerPrivateAVFoundationObjC::createAVPlayer):
(WebCore::MediaPlayerPrivateAVFoundationObjC::createAVPlayerItem):
(WebCore::MediaPlayerPrivateAVFoundationObjC::createVideoOutput):
(WebCore::MediaPlayerPrivateAVFoundationObjC::paintWithVideoOutput):
* platform/graphics/ca/GraphicsLayerCA.cpp:
(WebCore::GraphicsLayerCA::setContentsToImage):
* platform/graphics/ca/mac/LayerFlushSchedulerMac.cpp:
(WebCore::LayerFlushScheduler::schedule):
* platform/graphics/ca/mac/PlatformCAAnimationMac.mm:
(PlatformCAAnimation::PlatformCAAnimation):
* platform/graphics/ca/mac/PlatformCAFiltersMac.mm:
(PlatformCAFilters::filterValueForOperation):
* platform/graphics/ca/mac/PlatformCALayerMac.mm:
(PlatformCALayer::PlatformCALayer):
(PlatformCALayer::addAnimationForKey):
(PlatformCALayer::setBackgroundColor):
(PlatformCALayer::setBorderColor):
* platform/graphics/cg/BitmapImageCG.cpp:
(WebCore::BitmapImage::checkForSolidColor):
(WebCore::BitmapImage::getCGImageArray):
* platform/graphics/cg/ColorCG.cpp:
(WebCore::cachedCGColor):
* platform/graphics/cg/GraphicsContext3DCG.cpp:
(WebCore::GraphicsContext3D::ImageExtractor::extractImage):
* platform/graphics/cg/GraphicsContextCG.cpp:
(WebCore::GraphicsContext::applyStrokePattern):
(WebCore::GraphicsContext::applyFillPattern):
(WebCore::GraphicsContext::setURLForRect):
* platform/graphics/cg/ImageBufferCG.cpp:
(WebCore::createIOSurface):
(WebCore::ImageBuffer::ImageBuffer):
(WebCore::ImageBuffer::copyImage):
(WebCore::ImageBuffer::draw):
(WebCore::ImageBuffer::clip):
(WebCore::ImageBuffer::putByteArray):
(WebCore::CGImageEncodeToData):
(WebCore::CGImageToDataURL):
(WebCore::ImageBuffer::toDataURL):
(WebCore::ImageDataToDataURL):
* platform/graphics/cg/ImageBufferDataCG.cpp:
(WebCore::ImageBufferData::getData):
(WebCore::ImageBufferData::putData):
* platform/graphics/cg/ImageCG.cpp:
(WebCore::Image::imageWithColorSpace):
(WebCore::Image::drawPattern):
* platform/graphics/cg/ImageSourceCG.cpp:
(WebCore::ImageSource::setData):
(WebCore::ImageSource::isSizeAvailable):
(WebCore::ImageSource::frameSizeAtIndex):
(WebCore::ImageSource::orientationAtIndex):
(WebCore::ImageSource::getHotSpot):
(WebCore::ImageSource::repetitionCount):
(WebCore::ImageSource::createFrameAtIndex):
(WebCore::ImageSource::frameDurationAtIndex):
* platform/graphics/cg/PDFDocumentImage.cpp:
(WebCore::PDFDocumentImage::dataChanged):
* platform/graphics/cg/PathCG.cpp:
(WebCore::createScratchContext):
(WebCore::Path::contains):
* platform/graphics/cocoa/FontPlatformDataCocoa.mm:
(WebCore::FontPlatformData::FontPlatformData):
(WebCore::FontPlatformData::setFont):
(WebCore::createFeatureSettingDictionary):
(WebCore::cascadeToLastResortFontDescriptor):
(WebCore::cascadeToLastResortAndDisableSwashesFontDescriptor):
(WebCore::FontPlatformData::ctFont):
(WebCore::FontPlatformData::description):
* platform/graphics/gpu/mac/DrawingBufferMac.mm:
(WebCore::DrawingBuffer::DrawingBuffer):
* platform/graphics/mac/ComplexTextControllerCoreText.mm:
(-[WebCascadeList objectAtIndex:]):
(WebCore::ComplexTextController::collectComplexTextRunsForCharacters):
* platform/graphics/mac/FontCustomPlatformData.cpp:
(WebCore::createFontCustomPlatformData):
* platform/graphics/mac/GlyphPageTreeNodeMac.cpp:
(WebCore::GlyphPage::fill):
* platform/graphics/mac/GraphicsContext3DMac.mm:
(WebCore::GraphicsContext3D::GraphicsContext3D):
* platform/graphics/mac/GraphicsContextMac.mm:
(WebCore::GraphicsContext::drawFocusRing):
(WebCore::linearRGBColorSpaceRef):
* platform/graphics/mac/ImageMac.mm:
(WebCore::BitmapImage::getTIFFRepresentation):
(WebCore::BitmapImage::getNSImage):
* platform/graphics/mac/MediaPlayerPrivateQTKit.mm:
(WebCore::MediaPlayerPrivateQTKit::MediaPlayerPrivateQTKit):
(WebCore::MediaPlayerPrivateQTKit::createQTMovie):
(WebCore::MediaPlayerPrivateQTKit::createQTMovieView):
(WebCore::MediaPlayerPrivateQTKit::createQTVideoRenderer):
(WebCore::MediaPlayerPrivateQTKit::createQTMovieLayer):
(WebCore::MediaPlayerPrivateQTKit::setPreservesPitch):
(WebCore::addFileTypesToCache):
* platform/graphics/mac/SimpleFontDataCoreText.cpp:
(WebCore::SimpleFontData::getCFStringAttributes):
* platform/graphics/mac/SimpleFontDataMac.mm:
(WebCore::fontHasVerticalGlyphs):
(WebCore::SimpleFontData::getCompositeFontReferenceFontData):
(WebCore::SimpleFontData::platformCharWidthInit):
(WebCore::SimpleFontData::canRenderCombiningCharacterSequence):
* platform/graphics/mac/WebGLLayer.mm:
(-[WebGLLayer copyImageSnapshotWithColorSpace:]):
* platform/mac/ContentFilterMac.mm:
(WebCore::ContentFilter::ContentFilter):
* platform/mac/ContextMenuItemMac.mm:
(WebCore::ContextMenuItem::ContextMenuItem):
* platform/mac/CursorMac.mm:
(WebCore::createCustomCursor):
(WebCore::createNamedCursor):
* platform/mac/DisplaySleepDisabler.cpp:
(WebCore::DisplaySleepDisabler::DisplaySleepDisabler):
* platform/mac/DragImageMac.mm:
(WebCore::dissolveDragImageToFraction):
(WebCore::createDragImageFromImage):
* platform/mac/HTMLConverter.mm:
(+[WebHTMLConverter editingAttributedStringFromRange:]):
* platform/mac/Language.mm:
(WebCore::httpStyleLanguageCode):
(WebCore::platformUserPreferredLanguages):
* platform/mac/LocalizedStringsMac.cpp:
(WebCore::localizedString):
* platform/mac/PasteboardMac.mm:
(WebCore::Pasteboard::getDataSelection):
(WebCore::Pasteboard::writeSelectionForTypes):
(WebCore::fragmentFromWebArchive):
* platform/mac/PlatformClockCM.mm:
(PlatformClockCM::PlatformClockCM):
(PlatformClockCM::initializeWithTimingSource):
* platform/mac/PlatformPasteboardMac.mm:
(WebCore::PlatformPasteboard::addTypes):
(WebCore::PlatformPasteboard::setTypes):
(WebCore::PlatformPasteboard::setPathnamesForType):
* platform/mac/PlatformSpeechSynthesizerMac.mm:
(WebCore::PlatformSpeechSynthesizer::speak):
* platform/mac/PopupMenuMac.mm:
(WebCore::PopupMenuMac::populate):
(WebCore::PopupMenuMac::show):
* platform/mac/ScrollAnimatorMac.mm:
(-[WebScrollbarPainterDelegate setUpAlphaAnimation:scrollerPainter:part:WebCore::animateAlphaTo:duration:]):
(-[WebScrollbarPainterDelegate scrollerImp:animateUIStateTransitionWithDuration:]):
(-[WebScrollbarPainterDelegate scrollerImp:animateExpansionTransitionWithDuration:]):
(WebCore::ScrollAnimatorMac::ScrollAnimatorMac):
(WebCore::ScrollAnimatorMac::didAddVerticalScrollbar):
(WebCore::ScrollAnimatorMac::didAddHorizontalScrollbar):
* platform/mac/SharedBufferMac.mm:
(WebCore::SharedBuffer::createCFData):
* platform/mac/WebCoreNSStringExtras.mm:
(stringEncodingForResource):
* platform/network/ProtectionSpace.cpp:
(WebCore::ProtectionSpace::receivesCredentialSecurely):
* platform/network/SynchronousLoaderClient.cpp:
(WebCore::SynchronousLoaderClient::platformBadResponseError):
* platform/network/cf/CredentialStorageCFNet.cpp:
(WebCore::CredentialStorage::getFromPersistentStorage):
* platform/network/cf/DNSCFNet.cpp:
(WebCore::DNSResolveQueue::platformProxyIsEnabledInSystemPreferences):
* platform/network/cf/FormDataStreamCFNet.cpp:
(WebCore::advanceCurrentStream):
* platform/network/cf/NetworkStorageSessionCFNet.cpp:
(WebCore::overrideCookieStorage):
* platform/network/cf/ProxyServerCFNet.cpp:
(WebCore::proxyAutoConfigurationResultCallback):
(WebCore::processProxyServers):
(WebCore::addProxyServersForURL):
* platform/network/cf/ResourceErrorCF.cpp:
(WebCore::ResourceError::platformLazyInit):
(WebCore::ResourceError::cfError):
* platform/network/cf/ResourceHandleCFNet.cpp:
(WebCore::willSendRequest):
(WebCore::ResourceHandle::createCFURLConnection):
(WebCore::ResourceHandle::didReceiveAuthenticationChallenge):
(WebCore::ResourceHandle::receivedCredential):
(WebCore::ResourceHandle::handleDataArray):
* platform/network/cf/ResourceRequestCFNet.cpp:
(WebCore::setHeaderFields):
(WebCore::ResourceRequest::doUpdatePlatformRequest):
(WebCore::ResourceRequest::doUpdatePlatformHTTPBody):
(WebCore::ResourceRequest::doUpdateResourceRequest):
(WebCore::ResourceRequest::setStorageSession):
* platform/network/cf/ResourceResponseCFNet.cpp:
(WebCore::ResourceResponse::cfURLResponse):
(WebCore::ResourceResponse::platformLazyInit):
* platform/network/cf/SocketStreamHandleCFNet.cpp:
(WebCore::SocketStreamHandle::SocketStreamHandle):
(WebCore::SocketStreamHandle::executePACFileURL):
(WebCore::SocketStreamHandle::chooseProxy):
(WebCore::SocketStreamHandle::createStreams):
(WebCore::SocketStreamHandle::addCONNECTCredentials):
(WebCore::SocketStreamHandle::readStreamCallback):
(WebCore::SocketStreamHandle::writeStreamCallback):
(WebCore::SocketStreamHandle::reportErrorToClient):
* platform/network/mac/AuthenticationMac.mm:
(WebCore::mac):
(WebCore::AuthenticationChallenge::setAuthenticationClient):
* platform/network/mac/CookieJarMac.mm:
(WebCore::filterCookies):
* platform/network/mac/NetworkStateNotifierMac.cpp:
(WebCore::NetworkStateNotifier::updateState):
(WebCore::NetworkStateNotifier::NetworkStateNotifier):
* platform/network/mac/ResourceErrorMac.mm:
(WebCore::createNSErrorFromResourceErrorBase):
(WebCore::ResourceError::nsError):
* platform/network/mac/ResourceHandleMac.mm:
(WebCore::ResourceHandle::createNSURLConnection):
* platform/network/mac/ResourceRequestMac.mm:
(WebCore::ResourceRequest::updateNSURLRequest):
(WebCore::ResourceRequest::doUpdatePlatformRequest):
(WebCore::ResourceRequest::doUpdatePlatformHTTPBody):
(WebCore::ResourceRequest::setStorageSession):
* platform/network/mac/ResourceResponseMac.mm:
(WebCore::ResourceResponse::initNSURLResponse):
(WebCore::ResourceResponse::nsURLResponse):
(WebCore::ResourceResponse::platformLazyInit):
* platform/network/mac/UTIUtilities.mm:
(WebCore::mimeTypeFromUTITree):
* platform/network/mac/WebCoreURLResponse.mm:
(WebCore::adjustMIMETypeIfNecessary):
* platform/text/cf/HyphenationCF.cpp:
(WebCore::::createValueForNullKey):
(WebCore::lastHyphenLocation):
* platform/text/mac/HyphenationMac.mm:
(WebCore::::createValueForKey):
(WebCore::lastHyphenLocation):
* platform/text/mac/LocaleMac.mm:
(WebCore::determineLocale):
(WebCore::LocaleMac::LocaleMac):
(WebCore::LocaleMac::initializeLocaleData):
* platform/text/mac/TextBreakIteratorInternalICUMac.mm:
(WebCore::textBreakLocalePreference):
(WebCore::canonicalLanguageIdentifier):
* rendering/RenderThemeMac.mm:
(WebCore::RenderThemeMac::RenderThemeMac):
(WebCore::RenderThemeMac::levelIndicatorFor):
(WebCore::RenderThemeMac::paintMenuListButtonGradients):
(WebCore::RenderThemeMac::paintSliderTrack):
(WebCore::RenderThemeMac::popupButton):
(WebCore::RenderThemeMac::search):
(WebCore::RenderThemeMac::searchMenuTemplate):
(WebCore::RenderThemeMac::sliderThumbHorizontal):
(WebCore::RenderThemeMac::sliderThumbVertical):
(WebCore::RenderThemeMac::textField):
Use adoptNS and adoptCF free functions.
2013-04-27 Ryosuke Niwa <rniwa@webkit.org>
Pressing mouse button inside a dragstart event causes a crash
https://bugs.webkit.org/show_bug.cgi?id=115296
Reviewed by Darin Adler.
Add a missing null pointer check. We should better encapsulate the states in DragState in the long term
but this is good enough for now.
Test: fast/events/mousedown-inside-dragstart-should-not-cause-crash.html
* page/EventHandler.cpp:
(WebCore::EventHandler::handleDrag):
2013-04-27 Gyuyoung Kim <gyuyoung.kim@samsung.com>
Unreviewed build fix when disabling video and video-track.
* platform/graphics/gstreamer/VideoSinkGStreamer.cpp:
2013-04-27 Geoffrey Garen <ggaren@apple.com>
WebGL shouldn't allocate a "length" Identifier just to move some numbers around
https://bugs.webkit.org/show_bug.cgi?id=115317
Reviewed by Dean Jackson.
Saw this while debugging an ammo.js bug.
* bindings/js/JSArrayBufferViewHelper.h:
(WebCore::setWebGLArrayWithTypedArrayArgument):
(WebCore::setWebGLArrayHelper):
(WebCore::constructArrayBufferViewWithTypedArrayArgument):
(WebCore::constructArrayBufferView):
* bindings/js/JSWebGLRenderingContextCustom.cpp:
(WebCore::toVector): Use the pre-computed "length" identifier instead of
allocating a new one for each vector operation. There are lots more
optimizations we could do here. This is a start.
2013-04-27 Anders Carlsson <andersca@apple.com>
Remove two more StorageTask types
https://bugs.webkit.org/show_bug.cgi?id=115312
Reviewed by Dean Jackson.
* storage/StorageTask.cpp:
(WebCore::StorageTask::performTask):
* storage/StorageTask.h:
* storage/StorageTracker.cpp:
(WebCore::StorageTracker::setOriginDetails):
(WebCore::StorageTracker::deleteOrigin):
* storage/StorageTracker.h:
2013-04-27 Anders Carlsson <andersca@apple.com>
Get rid of more uses of StorageTask
https://bugs.webkit.org/show_bug.cgi?id=115311
Reviewed by Dean Jackson.
Make StorageAreaSync derive from ThreadSafeRefCounted as well, since it's passed between threads.
* storage/StorageAreaSync.h:
* storage/StorageSyncManager.cpp:
(WebCore::StorageSyncManager::scheduleImport):
(WebCore::StorageSyncManager::scheduleSync):
(WebCore::StorageSyncManager::scheduleDeleteEmptyDatabase):
* storage/StorageTask.cpp:
(WebCore::StorageTask::StorageTask):
(WebCore::StorageTask::performTask):
* storage/StorageTask.h:
(StorageTask):
2013-04-27 Anders Carlsson <andersca@apple.com>
Indent StorageAreaSync to match the style guidelines.
Rubber-stamped by Andreas Kling.
* storage/StorageAreaSync.h:
2013-04-27 Anders Carlsson <andersca@apple.com>
Replace uses of StorageTask with StorageThread::dispatch and WTF::bind
https://bugs.webkit.org/show_bug.cgi?id=115309
Reviewed by Andreas Kling.
* storage/StorageTask.cpp:
(WebCore::StorageTask::StorageTask):
(WebCore::StorageTask::performTask):
* storage/StorageTask.h:
* storage/StorageThread.cpp:
(WebCore::StorageThread::terminate):
(WebCore::StorageThread::releaseFastMallocFreeMemoryInAllThreads):
* storage/StorageThread.h:
* storage/StorageTracker.cpp:
(WebCore::StorageTracker::importOriginIdentifiers):
(WebCore::StorageTracker::deleteAllOrigins):
2013-04-27 Anders Carlsson <andersca@apple.com>
Add StorageThread::dispatch
https://bugs.webkit.org/show_bug.cgi?id=115308
Reviewed by Andreas Kling.
StorageThread::dispatch takes a Function<void ()> and runs it on the storage thread. This will be used to eventually get rid of StorageTask.
* storage/StorageTask.cpp:
(WebCore::StorageTask::StorageTask):
(WebCore::StorageTask::performTask):
* storage/StorageTask.h:
(WebCore::StorageTask::createDispatch):
* storage/StorageThread.cpp:
(WebCore::StorageThread::dispatch):
* storage/StorageThread.h:
(StorageThread):
2013-04-27 Jer Noble <jer.noble@apple.com>
REGRESSION (r147261): Audio controls background not displayed after loading audio file
https://bugs.webkit.org/show_bug.cgi?id=115221
Reviewed by Darin Adler.
As in r147261, set a flex-shrink: 0 to avoid shrinking the media controls panel
below the specified height.
No new tests; fixes the media/media-document-audio-repaint.html test.
* css/mediaControlsQuickTime.css:
(audio::-webkit-media-controls-panel, video::-webkit-media-controls-panel):
2013-04-26 Jer Noble <jer.noble@apple.com>
Video playback has corruption on the edges of the video
https://bugs.webkit.org/show_bug.cgi?id=115216
Reviewed by Simon Fraser.
Test: media/video-poster-background.html
RenderImage correctly answers foregroundIsKnownToBeOpaqueInRect() method
when a poster image is displayed, but once the video begins playing and
the poster image is no longer displayed, RenderImage will continue to
answer 'true' even when the video does not occupy the entire render box.
Override foregroundIsKnownToBeOpaqueInRect() in order to more correctly
answer the question for the video layer.
* rendering/RenderImage.h: Make foregroundIsKnownToBeOpaqueInRect() protected
(vs. private).
* rendering/RenderVideo.cpp:
(WebCore::RenderVideo::foregroundIsKnownToBeOpaqueInRect): Added. Return
true if the rect parameter is entirely contained by the video box.
* rendering/RenderVideo.h:
2013-04-26 Hans Muller <hmuller@adobe.com>
[CSS Exclusions] ExclusionShape bounding box methods should return LayoutRects
https://bugs.webkit.org/show_bug.cgi?id=115117
Reviewed by Dirk Schulze.
Redefined the ExclusionShape API in terms of LayoutUnits, instead of floats: all of the
ExclusionShape methods now have LayoutUnit parameters and return LayoutUnit values.
This is more natural, since the callers work exclusively in LayoutUnits.
This is strictly a refactoring, no new tests were needed.
* rendering/ExclusionPolygon.cpp:
(WebCore::ExclusionPolygon::getExcludedIntervals):
(WebCore::ExclusionPolygon::getIncludedIntervals):
(WebCore::ExclusionPolygon::firstIncludedIntervalLogicalTop):
* rendering/ExclusionPolygon.h:
* rendering/ExclusionRectangle.cpp:
(WebCore::ExclusionRectangle::getExcludedIntervals):
(WebCore::ExclusionRectangle::getIncludedIntervals):
(WebCore::ExclusionRectangle::firstIncludedIntervalLogicalTop):
* rendering/ExclusionRectangle.h:
* rendering/ExclusionShape.cpp:
(WebCore::ExclusionShape::createExclusionShape):
* rendering/ExclusionShape.h:
(LineSegment):
(ExclusionShape):
* rendering/ExclusionShapeInfo.cpp:
(WebCore):
(WebCore::::computedShape):
* rendering/ExclusionShapeInfo.h:
(WebCore):
(WebCore::ExclusionShapeInfo::shapeLogicalTop):
(WebCore::ExclusionShapeInfo::shapeLogicalBottom):
(ExclusionShapeInfo):
* rendering/ExclusionShapeInsideInfo.cpp:
(WebCore::ExclusionShapeInsideInfo::adjustLogicalLineTop):
* rendering/ExclusionShapeInsideInfo.h:
* rendering/ExclusionShapeOutsideInfo.h:
2013-04-26 Jer Noble <jer.noble@apple.com>
Nil-check the results of -[AVPlayerItemVideoOutput copyPixelBufferForItemTime:itemTimeForDisplay:].
https://bugs.webkit.org/show_bug.cgi?id=115265
Reviewed by Eric Carlson.
copyPixelBufferForItemTime:itemTimeForDisplay: can return nil, even
when hasNewPixelBufferForItemTime: returns YES. Check the results
before passing the buffer on to VTPixelTransferSessionTransferImage()
which does not NULL-check its parameters.
* platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
(WebCore::MediaPlayerPrivateAVFoundationObjC::createPixelBuffer):
2013-04-26 Roger Fong <roger_fong@apple.com>
Uninflate caret rect.
http://bugs.webkit.org/show_bug.cgi?id=114997.
<rdar://problem/12629007>.
Reviewed by Timothy Horton.
Inflation was causing painting errors with focus rings.
It is no longer needed after disabling subpixel layout.
* editing/FrameSelection.cpp:
(WebCore::repaintCaretForLocalRect):
2013-04-26 Roger Fong <roger_fong@apple.com>
Unreviewed build fix.
* platform/LayoutUnit.h:
(WebCore::LayoutUnit::LayoutUnit):
2013-04-26 Michael Saboff <msaboff@apple.com>
WebCore ObjC bridge is missing support for bool type
https://bugs.webkit.org/show_bug.cgi?id=115276
Reviewed by Geoffrey Garen.
Added code to handle conversion between ObjC and JS booleans.
* bridge/objc/objc_instance.mm:
(ObjcInstance::invokeObjcMethod):
* bridge/objc/objc_utility.h:
* bridge/objc/objc_utility.mm:
(JSC::Bindings::convertValueToObjcValue):
(JSC::Bindings::convertObjcValueToValue):
(JSC::Bindings::objcValueTypeForType):
2013-04-26 Roger Fong <roger_fong@apple.com>
Make Apple Windows VS2010 build results into and get dependencies from __32 suffixed folders.
Make the DebugSuffix configuration use _debug dependencies.
* WebCore.vcxproj/QTMovieWin/QTMovieWin.vcxproj:
* WebCore.vcxproj/QTMovieWin/QTMovieWinCairoDebug.props:
* WebCore.vcxproj/QTMovieWin/QTMovieWinCairoRelease.props:
* WebCore.vcxproj/QTMovieWin/QTMovieWinCommon.props:
* WebCore.vcxproj/QTMovieWin/QTMovieWinDebug.props:
* WebCore.vcxproj/QTMovieWin/QTMovieWinPostBuild.cmd:
* WebCore.vcxproj/QTMovieWin/QTMovieWinProduction.props:
* WebCore.vcxproj/QTMovieWin/QTMovieWinRelease.props:
* WebCore.vcxproj/WebCore.make:
* WebCore.vcxproj/WebCore.vcxproj:
* WebCore.vcxproj/WebCore.vcxproj.filters:
* WebCore.vcxproj/WebCoreCommon.props:
* WebCore.vcxproj/WebCoreDebug.props:
* WebCore.vcxproj/WebCoreDebugWinCairo.props:
* WebCore.vcxproj/WebCoreGenerated.make:
* WebCore.vcxproj/WebCoreGenerated.vcxproj:
* WebCore.vcxproj/WebCoreGeneratedCommon.props:
* WebCore.vcxproj/WebCoreGeneratedDebug.props:
* WebCore.vcxproj/WebCoreGeneratedDebugWinCairo.props:
* WebCore.vcxproj/WebCoreGeneratedProduction.props:
* WebCore.vcxproj/WebCoreGeneratedRelease.props:
* WebCore.vcxproj/WebCoreGeneratedReleaseWinCairo.props:
* WebCore.vcxproj/WebCoreProduction.props:
* WebCore.vcxproj/WebCoreRelease.props:
* WebCore.vcxproj/WebCoreReleaseWinCairo.props:
* WebCore.vcxproj/WebCoreTestSupport.vcxproj:
* WebCore.vcxproj/build-generated-files.sh:
* WebCore.vcxproj/copyForwardingHeaders.cmd:
* WebCore.vcxproj/copyWebCoreResourceFiles.cmd:
2013-04-26 Roger Fong <roger_fong@apple.com>
Disable sub-pixel layout on mac.
https://bugs.webkit.org/show_bug.cgi?id=114999.
Reviewed by Simon Fraser.
* Configurations/FeatureDefines.xcconfig:
* WebCore.exp.in:
Export symbol needed to be added for IntRect(const LayoutRect&) constructor,
which is now being used in pixelSnappedIntRect(const LayoutRect&) in LayoutRect.h after disabling sub-pixel layout.
2013-04-26 Simon Fraser <simon.fraser@apple.com>
Layer-backed WebViews don't repaint content outside the visible area
https://bugs.webkit.org/show_bug.cgi?id=115275
Reviewed by Beth Dakin.
Export ScrollView::setPaintsEntireContents(bool).
* WebCore.exp.in:
2013-04-26 Daker Fernandes Pinheiro <daker.pinheiro@openbossa.org>
Change RenderMeter::valueRatio() visibility to public
https://bugs.webkit.org/show_bug.cgi?id=115266
This function is currently unused.
However, it is necessary to implement a RenderTheme capable of rendering Meter elements.
Reviewed by Alexis Menard.
No new tests, because no behaviour is changed.
* rendering/RenderMeter.h:
(RenderMeter):
2013-04-26 Timothy Hatcher <timothy@apple.com>
Add Runtime.parse to the Inspector protocol.
This will be used to parse console expressions for errors
before evaluating them fully.
https://webkit.org/b/115242
Reviewed by Oliver Hunt.
* ForwardingHeaders/parser/ParserError.h: Added.
* inspector/Inspector.json:
* inspector/InspectorRuntimeAgent.cpp:
(WebCore::InspectorRuntimeAgent::parse):
* inspector/InspectorRuntimeAgent.h:
(InspectorRuntimeAgent):
2013-04-26 Benjamin Poulain <bpoulain@apple.com>
Fix the copyright years after r149057
* page/DiagnosticLoggingKeys.cpp: I accidentally removed a year from
the copyright in r149057.
2013-04-26 Konrad Piascik <kpiascik@blackberry.com>
Web Inspector: Crash due to null items from getDOMStorageItems
https://bugs.webkit.org/show_bug.cgi?id=115176
Reviewed by Joseph Pecoraro.
findStorageArea was returning a null storageArea causing the items
input paramater to not be set. This was happening without any error
being set at all. Set an error to prevent a crash when we try to
convert the result to a JSON string.
Added tests to check if session and local storage are empty that
they are still functional.
* inspector/InspectorDOMStorageAgent.cpp:
(WebCore::InspectorDOMStorageAgent::getDOMStorageItems):
2013-04-26 Martin Robinson <mrobinson@igalia.com>
Remove the remaining Skia #ifdefs
https://bugs.webkit.org/show_bug.cgi?id=114886
Reviewed by Benjamin Poulain.
* html/HTMLCanvasElement.cpp: Remove Skia #ifdef references.
* platform/graphics/BitmapImage.cpp: Ditto.
* platform/graphics/FloatPoint.h: Ditto.
* platform/graphics/FloatRect.h: Ditto.
* platform/graphics/FontCache.h: Ditto.
* platform/graphics/Gradient.cpp: Ditto.
* platform/graphics/Gradient.h: Ditto.
* platform/graphics/GraphicsContext.cpp: Ditto.
* platform/graphics/GraphicsContext.h: Ditto.
* platform/graphics/GraphicsContext3D.h: Ditto.
* platform/graphics/ImageBuffer.cpp: Ditto.
* platform/graphics/ImageBuffer.h: Ditto.
* platform/graphics/ImageBufferData.h: Ditto.
* platform/graphics/IntPoint.h: Ditto.
* platform/graphics/IntRect.h: Ditto.
* platform/graphics/NativeImagePtr.h: Ditto.
* platform/graphics/Path.h: Ditto.
* platform/graphics/Pattern.cpp: Ditto.
* platform/graphics/Pattern.h: Ditto.
* platform/graphics/filters/FEBlend.h: Ditto.
* platform/graphics/filters/FEColorMatrix.h: Ditto.
* platform/graphics/filters/FEComponentTransfer.h: Ditto.
* platform/graphics/filters/FEComposite.h: Ditto.
* platform/graphics/filters/FEConvolveMatrix.h: Ditto.
* platform/graphics/filters/FEDisplacementMap.h: Ditto.
* platform/graphics/filters/FEGaussianBlur.h: Ditto.
* platform/graphics/filters/FELighting.h: Ditto.
* platform/graphics/filters/FEMorphology.h: Ditto.
* platform/graphics/filters/FEOffset.h: Ditto.
* platform/graphics/filters/FilterEffect.cpp: Ditto.
* platform/graphics/filters/FilterEffect.h: Ditto.
* platform/graphics/transforms/AffineTransform.h: Ditto.
* platform/graphics/transforms/TransformationMatrix.h: Ditto.
* platform/image-decoders/ImageDecoder.cpp: Ditto.
* platform/image-decoders/ImageDecoder.h: Ditto.
* platform/image-decoders/jpeg/JPEGImageDecoder.cpp: Ditto.
* platform/image-decoders/webp/WEBPImageDecoder.cpp: Ditto.
* platform/mac/LocalCurrentGraphicsContext.h: Ditto.
* platform/mac/LocalCurrentGraphicsContext.mm: Ditto.
* rendering/svg/RenderSVGResourceSolidColor.cpp: Ditto.
* svg/graphics/SVGImage.cpp: Ditto.
* svg/graphics/SVGImage.h: Ditto.
2013-04-26 Allan Sandfeld Jensen <allan.jensen@digia.com>
Assert in JSC::Heap::unprotect when closing facebook.com web site
https://bugs.webkit.org/show_bug.cgi?id=115058
Reviewed by Darin Adler.
Grab a JSLock before calling RootObject::invalidate().
* bindings/js/ScriptController.cpp:
(WebCore::ScriptController::~ScriptController):
2013-04-26 Eric Carlson <eric.carlson@apple.com>
[Mac] in-band cues sometimes have incorrect duration
https://bugs.webkit.org/show_bug.cgi?id=115200
Reviewed by Jer Noble.
No new tests, this is not possible to test in DRT.
* html/track/InbandTextTrack.cpp:
(WebCore::InbandTextTrack::addGenericCue): Don't add completed cues to the map.
(WebCore::InbandTextTrack::removeGenericCue): Log when a cue is removed from the track.
* platform/graphics/avfoundation/InbandTextTrackPrivateAVF.cpp:
(WebCore::InbandTextTrackPrivateAVF::InbandTextTrackPrivateAVF): Initialize m_pendingCueStatus.
(WebCore::InbandTextTrackPrivateAVF::processCue): Never call update() on a cue that is delivered
while seeking.
(WebCore::InbandTextTrackPrivateAVF::beginSeeking): Flush all incomplete cues, remember that
we are seeking.
(WebCore::InbandTextTrackPrivateAVF::resetCueValues):
* platform/graphics/avfoundation/InbandTextTrackPrivateAVF.h:
* platform/graphics/avfoundation/MediaPlayerPrivateAVFoundation.cpp:
(WebCore::MediaPlayerPrivateAVFoundation::seek): Call track->beginSeeking() instead of resetCueValues().
(WebCore::MediaPlayerPrivateAVFoundation::seekCompleted): Call track->endSeeking().
* platform/graphics/avfoundation/objc/InbandTextTrackPrivateAVFObjC.mm:
(WebCore::InbandTextTrackPrivateAVFObjC::kind): Include class name in Kind enum values to
avoid compile error.
2013-04-26 Andreas Kling <akling@apple.com>
Remove wxWebKit from WebCore.
<http://webkit.org/b/115255>
Reviewed by Anders Carlsson.
* DerivedSources.make:
* WebCorePrefix.h:
* bindings/js/JSInspectorFrontendHostCustom.cpp:
(WebCore::JSInspectorFrontendHost::port):
* config.h:
* html/HTMLFormElement.cpp:
* platform/ContextMenu.h:
(ContextMenu):
* platform/ContextMenuItem.h:
* platform/Cursor.h:
* platform/DragData.h:
* platform/DragImage.h:
* platform/FileSystem.h:
* platform/PlatformExportMacros.h:
* platform/PlatformKeyboardEvent.h:
(PlatformKeyboardEvent):
* platform/PlatformMenuDescription.h:
* platform/PlatformMouseEvent.h:
(PlatformMouseEvent):
* platform/PlatformWheelEvent.h:
(PlatformWheelEvent):
* platform/ScrollView.cpp:
* platform/ScrollView.h:
(ScrollView):
* platform/Widget.h:
* platform/win/SharedTimerWin.cpp:
2013-04-26 Zalan Bujtas <zalan@apple.com>
use-after-free removing a frame from its parent in a beforeload event of an OBJECT element
https://bugs.webkit.org/show_bug.cgi?id=113964
Object elements have the tendecny to modify or even fully remove
the containing Document inside beforeload callback. While Document is removed,
RenderArena gets destroyed. Retained RenderWidgets fails to function with NULL arena.
Protect RendereArena from getting wiped out, when Document is removed
during FrameView::updateWidget().
Reviewed by Antti Koivisto.
Test: fast/frames/crash-remove-iframe-during-object-beforeload.html
* dom/Document.cpp:
(WebCore::Document::attach):
* dom/Document.h:
(Document):
* page/FrameView.cpp:
(WebCore::FrameView::updateWidgets):
* rendering/RenderArena.h:
(RenderArena):
(WebCore::RenderArena::create):
2013-04-26 Christophe Dumez <ch.dumez@sisa.samsung.com>
Optimize function and interface object length computation in bindings generator
https://bugs.webkit.org/show_bug.cgi?id=115247
Reviewed by Kentaro Hara.
Introduce new GetFunctionLength() function that efficiently compute the length
of a function (i.e. its number of mandatory parameters).
We now call GetFunctionLength() instead of GenerateFunctionParametersCheck()
whenever we care only interested in the function length and not the actual
expression for checking the parameters. This is much more efficient as
GenerateFunctionParametersCheck() does a lot more processing than we need in
this case.
No new tests, no behavior change.
* bindings/scripts/CodeGeneratorJS.pm:
(GetFunctionLength):
(GenerateImplementation):
(GenerateConstructorHelperMethods):
2013-04-26 Andreas Kling <akling@apple.com>
Web Audio: Remove reduplicative addInput() in AnalyserNode.
<http://webkit.org/b/115244>
From Blink r149155 by <james.wei@intel.com>:
The parent class BasicInspectorNode already called addInput() and addOutput().
So it is reduplicative to call them in AnalyserNode.
* Modules/webaudio/AnalyserNode.cpp:
(WebCore::AnalyserNode::AnalyserNode):
* Modules/webaudio/AudioBasicInspectorNode.cpp:
(WebCore::AudioBasicInspectorNode::AudioBasicInspectorNode):
* Modules/webaudio/AudioBasicInspectorNode.h:
(AudioBasicInspectorNode):
* Modules/webaudio/MediaStreamAudioDestinationNode.cpp:
(WebCore::MediaStreamAudioDestinationNode::MediaStreamAudioDestinationNode):
2013-04-26 Allan Sandfeld Jensen <allan.jensen@digia.com>
Mouseenter and mouseleave events not supported
https://bugs.webkit.org/show_bug.cgi?id=18930
Reviewed by David Hyatt.
Implements mouseenter and mouseleave events from W3C DOM Level 3 Events.
These event are already supported by all other major browsers.
To avoid performance regressions the new events are only dispatched when
there are event listeners for them.
Tests: fast/events/mouseenter-mouseleave-capture.html
fast/events/mouseenter-mouseleave.html
* bindings/scripts/CodeGenerator.pm:
* dom/Document.cpp:
(WebCore::Document::prepareMouseEvent):
(WebCore::Document::updateHoverActiveState):
* dom/Document.h:
(Document):
* dom/Document.idl:
* dom/Element.h:
(Element):
* dom/Element.idl:
* dom/EventListenerMap.cpp:
(WebCore::EventListenerMap::containsCapturing):
* dom/EventListenerMap.h:
(EventListenerMap):
* dom/EventNames.h:
* dom/EventTarget.h:
(EventTarget):
(WebCore::EventTarget::hasCapturingEventListeners):
* dom/MouseEvent.cpp:
(WebCore::MouseEvent::create):
(WebCore::MouseEvent::toElement):
(WebCore::MouseEvent::fromElement):
* html/HTMLAttributeNames.in:
* html/HTMLElement.cpp:
(WebCore::HTMLElement::eventNameForAttributeName):
* page/DOMWindow.h:
(DOMWindow):
* page/DOMWindow.idl:
* svg/SVGElement.cpp:
(WebCore::SVGElement::parseAttribute):
* svg/SVGElementInstance.h:
(SVGElementInstance):
* svg/SVGElementInstance.idl:
2013-04-26 Christophe Dumez <ch.dumez@sisa.samsung.com>
Add support for Web IDL partial interfaces to the bindings generator
https://bugs.webkit.org/show_bug.cgi?id=115228
Reviewed by Kentaro Hara.
Add support for Web IDL partial interfaces to the bindings generator:
http://dev.w3.org/2006/webapi/WebIDL/#dfn-partial-interface
Also drop support for the the WebKit-specific [Supplemental] extended
attribute and use partial interfaces instead in existing IDL files.
No new tests, no behavior change.
* Modules/battery/NavigatorBattery.idl:
* Modules/filesystem/DOMWindowFileSystem.idl:
* Modules/filesystem/DataTransferItemFileSystem.idl:
* Modules/filesystem/HTMLInputElementFileSystem.idl:
* Modules/filesystem/WorkerContextFileSystem.idl:
* Modules/gamepad/NavigatorGamepad.idl:
* Modules/geolocation/NavigatorGeolocation.idl:
* Modules/indexeddb/DOMWindowIndexedDatabase.idl:
* Modules/indexeddb/WorkerContextIndexedDatabase.idl:
* Modules/mediastream/DOMWindowMediaStream.idl:
* Modules/mediastream/NavigatorMediaStream.idl:
* Modules/navigatorcontentutils/NavigatorContentUtils.idl:
* Modules/networkinfo/NavigatorNetworkInfoConnection.idl:
* Modules/notifications/DOMWindowNotifications.idl:
* Modules/notifications/WorkerContextNotifications.idl:
* Modules/quota/DOMWindowQuota.idl:
* Modules/quota/NavigatorStorageQuota.idl:
* Modules/quota/WorkerNavigatorStorageQuota.idl:
* Modules/speech/DOMWindowSpeech.idl:
* Modules/speech/DOMWindowSpeechSynthesis.idl:
* Modules/vibration/NavigatorVibration.idl:
* Modules/webaudio/DOMWindowWebAudio.idl:
* Modules/webdatabase/DOMWindowWebDatabase.idl:
* Modules/webdatabase/WorkerContextWebDatabase.idl:
* Modules/websockets/DOMWindowWebSocket.idl:
* Modules/websockets/WorkerContextWebSocket.idl:
* bindings/scripts/IDLAttributes.txt:
* bindings/scripts/IDLParser.pm:
(parsePartialDefinition):
* bindings/scripts/generate-bindings.pl:
* bindings/scripts/preprocess-idls.pl:
(getPartialInterfaceNameFromIDLFile):
* bindings/scripts/test/TestSupplemental.idl:
* page/DOMWindowPagePopup.idl:
2013-04-25 Mihnea Ovidenie <mihnea@adobe.com>
[CSS Regions] Hit testing is broken for absolutely positioned regions that have overflow: hidden
https://bugs.webkit.org/show_bug.cgi?id=113874
Reviewed by David Hyatt.
Test: fast/regions/hit-test-abspos-overflow-region.html
When a region is an out-of-flow positioned object with an overflow clip, we need
to make sure that hit testing works also for cases other than foreground (content)
hit testing. This patch moves the previous hit testing code, that delegated foreground
hit testing to the region's flow thread hit testing, into the hitTestContent method,
now that RenderRegion is RenderBlock based.
* rendering/RenderRegion.cpp:
(WebCore::RenderRegion::hitTestContents):
* rendering/RenderRegion.h:
(RenderRegion):
2013-04-25 Ryosuke Niwa <rniwa@webkit.org>
Copy and paste can strip !important CSS rules due to a bug in mergeStyleFromRules
https://bugs.webkit.org/show_bug.cgi?id=115217
Reviewed by Darin Adler.
The bug was caused by mergeStyleFromRules overriding "important" style rules with "unimportant" inline styles.
Fixed the bug by using addParsedProperty, which respects !important, in MutableStylePropertySet's
mergeAndOverrideOnConflict, which was only used in editing code. Now that we've fixed this function, we can use
it in ViewportStyleResolver::addViewportRule as well.
Test: editing/pasteboard/copy-paste-with-important-rules.html
* css/StylePropertySet.cpp:
(WebCore::MutableStylePropertySet::mergeAndOverrideOnConflict): Fixed to respect !important.
* css/ViewportStyleResolver.cpp:
(WebCore::ViewportStyleResolver::addViewportRule): Use mergeAndOverrideOnConflict now that the code is identical.
2013-04-25 Andreas Kling <akling@apple.com>
StylePropertySet::getPropertyShorthand() should return a String.
<http://webkit.org/b/115213>
Reviewed by Anders Carlsson.
Return a String directly from getPropertyShorthand() instead of forcing clients
to call getPropertyNameString().
* css/PropertySetCSSStyleDeclaration.cpp:
(WebCore::PropertySetCSSStyleDeclaration::getPropertyShorthand):
* css/StylePropertySet.cpp:
(WebCore::StylePropertySet::getPropertyShorthand):
* css/StylePropertySet.h:
(StylePropertySet):
2013-04-25 Chris Fleizach <cfleizach@apple.com>
WEB SPEECH: language support does not work as expected
https://bugs.webkit.org/show_bug.cgi?id=115119
Reviewed by Alexey Proskuryakov.
Make the Mac platform synthesizer have access to all the voices installed on the system.
* WebCore.exp.in:
* platform/mac/PlatformSpeechSynthesizerMac.mm:
(WebCore::PlatformSpeechSynthesizer::initializeVoiceList):
* platform/mac/WebCoreSystemInterface.h:
* platform/mac/WebCoreSystemInterface.mm:
2013-04-25 Chris Fleizach <cfleizach@apple.com>
<meter> element not exposed to accessibility
https://bugs.webkit.org/show_bug.cgi?id=109023
rdar://problem/13658964
Reviewed by Tim Horton.
Makes the <meter> element appear in the AX tree by reusing the
AccessibilityProgressIndicator element to handle either progress or meter
elements.
Test: accessibility/meter-element.html
* accessibility/AXObjectCache.cpp:
(WebCore::createFromRenderer):
(WebCore::AXObjectCache::getOrCreate):
* accessibility/AccessibilityNodeObject.cpp:
(WebCore::AccessibilityNodeObject::canHaveChildren):
(WebCore::AccessibilityNodeObject::visibleText):
* accessibility/AccessibilityProgressIndicator.cpp:
(WebCore::AccessibilityProgressIndicator::AccessibilityProgressIndicator):
(WebCore::AccessibilityProgressIndicator::create):
(WebCore::AccessibilityProgressIndicator::valueForRange):
(WebCore::AccessibilityProgressIndicator::maxValueForRange):
(WebCore::AccessibilityProgressIndicator::minValueForRange):
(WebCore::AccessibilityProgressIndicator::progressElement):
(WebCore::AccessibilityProgressIndicator::meterElement):
* accessibility/AccessibilityProgressIndicator.h:
(AccessibilityProgressIndicator):
* accessibility/AccessibilityRenderObject.cpp:
(WebCore::AccessibilityRenderObject::firstChild):
(WebCore::AccessibilityRenderObject::lastChild):
These methods are modified to handle when there is no rendered children, but there are Node
children. The node children are desired when calculating text within a node, for example.
2013-04-25 Qiankun Miao <qiankun.miao@intel.com>
[CSS Shaders] Remove the meshType from the CustomFilterOperation
https://bugs.webkit.org/show_bug.cgi?id=102529
Reviewed by Dean Jackson.
No new tests, no new functionality.
MeshType can be accessed from program, so remove the m_meshType
related code in CustomFilterOperation.
* css/StyleResolver.cpp:
(WebCore::StyleResolver::createCustomFilterOperationWithInlineSyntax):
* platform/graphics/filters/CustomFilterOperation.cpp:
(WebCore::CustomFilterOperation::CustomFilterOperation):
(WebCore::CustomFilterOperation::blend):
* platform/graphics/filters/CustomFilterOperation.h:
(WebCore::CustomFilterOperation::create):
(WebCore::CustomFilterOperation::meshType):
(CustomFilterOperation):
(WebCore::CustomFilterOperation::operator==):
* platform/graphics/texmap/coordinated/CoordinatedCustomFilterOperation.h:
(WebCore::CoordinatedCustomFilterOperation::CoordinatedCustomFilterOperation):
2013-04-25 Kent Tamura <tkent@chromium.org>
Ignore invalid regular expressions for input[pattern].
https://bugs.webkit.org/show_bug.cgi?id=115204
Reviewed by Darin Adler.
According to the specification, we should not proceed regular expression
matching if a pattern attribute value is an invalid regular
expression. We had a bug that invalid expressions such as
pattern=")foo(" made RegularExpression objects successfully.
http://www.whatwg.org/specs/web-apps/current-work/multipage/common-input-element-attributes.html#the-pattern-attribute
> If an input element has a pattern attribute specified, and the
> attribute's value, when compiled as a JavaScript regular expression with
> the global, ignoreCase, and multiline flags disabled (see ECMA262
> Edition 5, sections 15.10.7.2 through 15.10.7.4), compiles successfully,
> then the resulting regular expression is the element's compiled pattern
> regular expression. If the element has no such attribute, or if the
> value doesn't compile successfully, then the element has no compiled
> pattern regular expression.
This imports a part of Blink r148951.
Tests: Update fast/forms/ValidityState-patternMismatch.html
* html/BaseTextInputType.cpp:
(WebCore::BaseTextInputType::patternMismatch):
Check correctness of pattern attribute value before wrapping with parentheses.
* platform/text/RegularExpression.cpp:
(WebCore::RegularExpression::isValid): Added.
* platform/text/RegularExpression.h:
(RegularExpression): Declare isValid.
2013-04-25 Antoine Quint <graouts@apple.com>
Glyphs may fail to render when using SVG font
https://bugs.webkit.org/show_bug.cgi?id=115193
Reviewed by Simon Fraser.
Calling SimpleFontData::applyTransforms() when the font used is
an SVG font makes little sense since Core Text doesnt know or
understand SVG fonts and would be passed some other, unrelated
platform font.
* platform/graphics/SimpleFontData.h:
(WebCore::SimpleFontData::applyTransforms):
2013-04-25 Jer Noble <jer.noble@apple.com>
Media elements shouldn't resume playback when a page is restored from the back/forward cache if the WKView isn't in a window
https://bugs.webkit.org/show_bug.cgi?id=115191
Reviewed by Eric Carlson.
If a page is suspended, then resumed when its WebView or WKView has been removed from a window,
the page's media elements will unpause. Check whether media is allowed to start during resume()
via Page::canMediaStart() and if not, register for mediaCanStart notifications. Then, in
mediaCanStart() if the media is force-paused, unpause it.
* html/HTMLMediaElement.cpp:
(WebCore::HTMLMediaElement::suspend):
(WebCore::HTMLMediaElement::resume):
(WebCore::HTMLMediaElement::mediaCanStart):
* html/HTMLMediaElement.h:
(WebCore::HTMLMediaElement::pageConsentRequiredForResume):
2013-04-25 Andreas Kling <akling@apple.com>
Remove ENABLE(PARSED_STYLE_SHEET_CACHING) and make it always-on.
Rubber-stamped by Anders Koivisto.
* PlatformWinCE.cmake:
* accessibility/AccessibilityObject.h:
* html/HTMLLinkElement.cpp:
(WebCore::HTMLLinkElement::setCSSStyleSheet):
2013-04-25 Patrick Gansterer <paroga@webkit.org>
Remove OS(WINCE) from AccessibilityObject.h
https://bugs.webkit.org/show_bug.cgi?id=115192
Reviewed by Andreas Kling.
Use the same files like the the other PLATFORM(WIN) ports use.
* PlatformWinCE.cmake:
* accessibility/AccessibilityObject.h:
(AccessibilityObject):
2013-04-25 Alberto Garcia <agarcia@igalia.com>
Add definition of GlyphBufferGlyph for BlackBerry
https://bugs.webkit.org/show_bug.cgi?id=115183
Reviewed by Xan Lopez.
BlackBerry uses an unsigned int.
* platform/graphics/GlyphBuffer.h:
(WebCore):
2013-04-25 Joseph Pecoraro <pecoraro@apple.com>
ScriptExecutionContext log exception should include a column number
https://bugs.webkit.org/show_bug.cgi?id=114315
Reviewed by Oliver Hunt.
Test: inspector/console/console-exception-stack-traces.html
* bindings/js/ScriptCallStackFactory.h:
* bindings/js/ScriptCallStackFactory.cpp:
(WebCore::createScriptCallStackFromException):
Generate a ScriptCallStack from an exception. Use the vm.exceptionStack
if available, and fallback to the exception object where needed.
* bindings/js/JSDOMBinding.cpp:
(WebCore::reportException):
Always include a non-empty call stack with exceptions.
Where not provided, fallback to the exception object.
* dom/Document.h:
* dom/Document.cpp:
(WebCore::Document::logExceptionToConsole):
* dom/ScriptExecutionContext.h:
* dom/ScriptExecutionContext.cpp:
(WebCore::ScriptExecutionContext::PendingException::PendingException):
(ScriptExecutionContext::PendingException):
(WebCore::ScriptExecutionContext::reportException):
* workers/DefaultSharedWorkerRepository.cpp:
* workers/SharedWorkerContext.cpp:
(WebCore::SharedWorkerContext::logExceptionToConsole):
* workers/SharedWorkerContext.h:
* workers/WorkerContext.cpp:
(WebCore::WorkerContext::logExceptionToConsole):
* workers/WorkerContext.h:
* workers/WorkerMessagingProxy.cpp:
(WebCore::WorkerExceptionTask::performTask):
Plumb columnNumber through as needed.
2013-04-25 Gregg Tavares <gman@chromium.org>
Fix build files so WebGLDebugXXX extensions can be used if enabled.
https://bugs.webkit.org/show_bug.cgi?id=113976
Reviewed by Dean Jackson.
No new tests as no new functionality.
* DerivedSources.make:
* GNUmakefile.list.am:
* WebCore.xcodeproj/project.pbxproj:
* bindings/js/JSWebGLRenderingContextCustom.cpp:
2013-04-25 Ryosuke Niwa <rniwa@webkit.org>
cloneChildNodes looks for deleteButtonController in each level of recursion
https://bugs.webkit.org/show_bug.cgi?id=115146
Reviewed by Andreas Kling.
Obtain the delete button controller upfront, and shallow copy descendents of each child
so that we don't look for the delete button controller inside cloneNode called on each child.
Performance Tests: DOM/CloneNodes.html
* dom/ContainerNode.cpp:
(WebCore::cloneChildNodesAvoidingDeleteButon): Extracted.
(WebCore::ContainerNode::cloneChildNodes):
2013-04-25 Ryosuke Niwa <rniwa@webkit.org>
HTMLOptionsCollection's namedItem and name getter should return the first item
https://bugs.webkit.org/show_bug.cgi?id=115150
Reviewed by Andreas Kling.
Following the resolution in http://lists.whatwg.org/pipermail/whatwg-whatwg.org/2012-December/038355.html,
the spefication has been updated to only return the first item when there are multiple items of the same name
in HTMLOptionsCollection; this new behavior matches that of Firefox and Opera (Presto).
Implement this new behavior to remove the custom binding code and use the fast path in namedItem and name
getter of HTMLOptionsCollection. (Obtaining all items for a given name is expensive!).
Tests: fast/dom/HTMLSelectElement/named-options.html
fast/dom/html-collections-named-getter.html
* bindings/js/JSHTMLOptionsCollectionCustom.cpp:
(WebCore): Removed the custom bindings for name getter and namedItem.
* html/HTMLOptionsCollection.idl:
2013-04-25 Joseph Pecoraro <pecoraro@apple.com>
Web Inspector: ConsoleMessage should include line and column number where possible
https://bugs.webkit.org/show_bug.cgi?id=114929
- adds "m_column" to WebCore::ConsoleMessage
- adds "column" to Console.ConsoleMessage in the inspector protocol
- set the column number for console.* functions (Console.cpp)
- set the column number for XSLT errors (XSLTProcessor)
- plumb columnNumber everywhere else it is needed, set it to 0 and file
bugs for all cases missing columnNumber that could provide it.
Reviewed by Timothy Hatcher.
Test: inspector/console/console-url-line-column.html
inspector/console/console-messages-stack-traces.html
* inspector/ConsoleMessage.h:
* inspector/ConsoleMessage.cpp:
(WebCore::ConsoleMessage::ConsoleMessage):
(WebCore::ConsoleMessage::autogenerateMetadata):
(WebCore::ConsoleMessage::addToFrontend):
(WebCore::ConsoleMessage::isEqual):
Add m_column and set it where appropriate.
* inspector/Inspector.json:
Add column property to Console.ConsoleMessage.
* page/Console.cpp:
(WebCore::internalAddMessage):
(WebCore::Console::profile):
Set columnNumber like lineNumber from the last stack frame.
(WebCore::Console::groupEnd):
Line and column are unused in this message type, set both to 0.
* xml/XSLTProcessorLibxslt.cpp:
(WebCore::XSLTProcessor::parseErrorFunc):
* xml/XSLTProcessorQt.cpp:
(WebCore::XSLTMessageHandler::handleMessage):
Add real column numbers, the XSLT handlers already had it available.
* bindings/js/JSCustomXPathNSResolver.cpp:
(WebCore::JSCustomXPathNSResolver::lookupNamespaceURI):
* css/CSSParser.cpp:
(WebCore::CSSParser::logError):
* dom/ScriptExecutionContext.h:
* dom/ScriptExecutionContext.cpp:
(WebCore::ScriptExecutionContext::addConsoleMessage):
* dom/Document.cpp:
(WebCore::Document::logExceptionToConsole):
(WebCore::Document::addMessage):
* dom/Document.h:
* inspector/InspectorConsoleAgent.cpp:
(WebCore::InspectorConsoleAgent::addMessageToConsole):
(WebCore::InspectorConsoleAgent::stopTiming):
(WebCore::InspectorConsoleAgent::didFinishXHRLoading):
(WebCore::InspectorConsoleAgent::didReceiveResponse):
(WebCore::InspectorConsoleAgent::didFailLoading):
* inspector/InspectorConsoleAgent.h:
* inspector/InspectorConsoleInstrumentation.h:
(WebCore::InspectorInstrumentation::addMessageToConsole):
(WebCore::InspectorInstrumentation::addStartProfilingMessageToConsole):
* inspector/InspectorInstrumentation.cpp:
(WebCore::InspectorInstrumentation::addMessageToConsoleImpl):
(WebCore::InspectorInstrumentation::addStartProfilingMessageToConsoleImpl):
(WebCore::InspectorInstrumentation::addProfileImpl):
* inspector/InspectorInstrumentation.h:
(InspectorInstrumentation):
* inspector/InspectorProfilerAgent.cpp:
(WebCore::InspectorProfilerAgent::addProfile):
(WebCore::InspectorProfilerAgent::addProfileFinishedMessageToConsole):
(WebCore::InspectorProfilerAgent::addStartProfilingMessageToConsole):
(WebCore::InspectorProfilerAgent::start):
(WebCore::InspectorProfilerAgent::stop):
* inspector/InspectorProfilerAgent.h:
(InspectorProfilerAgent):
* loader/EmptyClients.h:
(WebCore::EmptyChromeClient::addMessageToConsole):
* page/ChromeClient.h:
(WebCore::ChromeClient::addMessageToConsole):
* page/ContentSecurityPolicy.cpp:
(WebCore::ContentSecurityPolicy::logToConsole):
* page/PageConsole.cpp:
(WebCore::PageConsole::addMessage):
* page/PageConsole.h:
* workers/DefaultSharedWorkerRepository.cpp:
(SharedWorkerProxy):
(WebCore::postExceptionTask):
(WebCore::SharedWorkerProxy::postExceptionToWorkerObject):
(WebCore::postConsoleMessageTask):
(WebCore::SharedWorkerProxy::postConsoleMessageToWorkerObject):
* workers/SharedWorkerContext.cpp:
(WebCore::SharedWorkerContext::logExceptionToConsole):
* workers/WorkerContext.cpp:
(WebCore::WorkerContext::logExceptionToConsole):
(WebCore::WorkerContext::addConsoleMessage):
(WebCore::WorkerContext::addMessage):
(WebCore::WorkerContext::addMessageToWorkerConsole):
* workers/WorkerContext.h:
* workers/WorkerMessagingProxy.cpp:
(WebCore::WorkerExceptionTask::create):
(WebCore::WorkerExceptionTask::WorkerExceptionTask):
(WebCore::WorkerExceptionTask::performTask):
(WorkerExceptionTask):
(WebCore::WorkerMessagingProxy::postExceptionToWorkerObject):
(WebCore::postConsoleMessageTask):
(WebCore::WorkerMessagingProxy::postConsoleMessageToWorkerObject):
* workers/WorkerMessagingProxy.h:
(WorkerMessagingProxy):
* workers/WorkerReportingProxy.h:
(WorkerReportingProxy):
Plumb columnNumber through where appropriate. File bugs where missing.
2013-04-25 Allan Sandfeld Jensen <allan.jensen@digia.com>
[Qt] Animated opacity does not trigger accelerated compositing
https://bugs.webkit.org/show_bug.cgi?id=115107
Reviewed by Simon Fraser.
Add extra option to also trigger compositing on animated opacity.
* page/ChromeClient.h:
* rendering/RenderLayerCompositor.cpp:
(WebCore::RenderLayerCompositor::requiresCompositingForAnimation):
2013-04-25 Lamarque V. Souza <Lamarque.Souza@basyskom.com>
Sec-WebSocket-Extensions header field must not appear more than once in an HTTP response.
https://bugs.webkit.org/show_bug.cgi?id=115128
Reviewed by Alexey Proskuryakov.
According to WebSocket specification Sec-WebSocket-Extensions header field
must not appear more than once in an HTTP response. It is ok if it appears
more than once in client request. Also add a check for invalid UTF-8
characters when parsing Sec-WebSocket-Extensions quoted string.
Test: http/tests/websocket/tests/hybi/handshake-fail-by-more-extensions-header.html
* Modules/websockets/WebSocketExtensionParser.cpp:
(WebCore::WebSocketExtensionParser::consumeQuotedString): Return false if there is
invalid character in the quoted string being parsed.
* Modules/websockets/WebSocketHandshake.cpp:
(WebCore::WebSocketHandshake::readHTTPHeaders): Check if Sec-WebSocket-Extensions
appears more than once in header response. Abort handshake if it does.
2013-04-25 Raphael Kubo da Costa <raphael.kubo.da.costa@intel.com>
REGRESSION(r148758): Remove WTFLogAlways call from IconLoader.
https://bugs.webkit.org/show_bug.cgi?id=115182
Reviewed by Dan Bernstein.
The call added in r148758 was apparently a leftover from some debugging
session, and it makes the Interactive/window-resize.html performance
test randomly fail on Qt and EFL due to WTFLogAlways writing to stderr.
* loader/icon/IconLoader.cpp:
(WebCore::IconLoader::notifyFinished):
2013-04-25 Christophe Dumez <ch.dumez@sisa.samsung.com>
Add support for Web IDL callback interfaces to the bindings generator
https://bugs.webkit.org/show_bug.cgi?id=115179
Reviewed by Kentaro Hara.
Add support in the bindings generator for Web IDL callback interfaces:
http://dev.w3.org/2006/webapi/WebIDL/#dfn-callback-interface
Drop support for the WebKit-specific [Callback] extended attributes
on Web IDL interfaces and update existing IDL files to use proper
callback interfaces instead.
No new tests, no behavior change.
* Modules/filesystem/EntriesCallback.idl:
* Modules/filesystem/EntryCallback.idl:
* Modules/filesystem/ErrorCallback.idl:
* Modules/filesystem/FileCallback.idl:
* Modules/filesystem/FileSystemCallback.idl:
* Modules/filesystem/FileWriterCallback.idl:
* Modules/filesystem/MetadataCallback.idl:
* Modules/geolocation/PositionCallback.idl:
* Modules/geolocation/PositionErrorCallback.idl:
* Modules/mediastream/NavigatorUserMediaErrorCallback.idl:
* Modules/mediastream/NavigatorUserMediaSuccessCallback.idl:
* Modules/mediastream/RTCErrorCallback.idl:
* Modules/mediastream/RTCSessionDescriptionCallback.idl:
* Modules/mediastream/RTCStatsCallback.idl:
* Modules/notifications/NotificationPermissionCallback.idl:
* Modules/quota/StorageErrorCallback.idl:
* Modules/quota/StorageQuotaCallback.idl:
* Modules/quota/StorageUsageCallback.idl:
* Modules/webaudio/AudioBufferCallback.idl:
* Modules/webdatabase/DatabaseCallback.idl:
* Modules/webdatabase/SQLStatementCallback.idl:
* Modules/webdatabase/SQLStatementErrorCallback.idl:
* Modules/webdatabase/SQLTransactionCallback.idl:
* Modules/webdatabase/SQLTransactionErrorCallback.idl:
* Modules/webdatabase/SQLTransactionSyncCallback.idl:
* bindings/scripts/CodeGeneratorJS.pm:
(GenerateInterface):
* bindings/scripts/IDLParser.pm:
(parseCallbackRestOrInterface):
* bindings/scripts/test/TestCallback.idl:
* dom/RequestAnimationFrameCallback.idl:
* dom/StringCallback.idl:
* html/VoidCallback.idl:
2013-04-25 Adrian Perez de Castro <aperez@igalia.com>
[GStreamer] Add audio/speex MIME type as supported
https://bugs.webkit.org/show_bug.cgi?id=115032
Reviewed by Philippe Normand.
GStreamer has support for the Speex codec (http://www.speex.org).
Speex streams may be embedded in a Ogg container, or standalone.
The case of the Ogg container is already covered by the "*/ogg"
MIME types declared as supported by the GStreamer media playing
code, but for standalone streams to work, "audio/speex" has to
be added.
With this, and the needed GStreamer plugin installed, the GTK+
launcher is able to correctly play Speex streams served with
"Content-type: audio/speex".
* platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:
2013-04-25 Andreas Kling <akling@apple.com>
Add FINAL decorators to the InlineBox class hierarchy.
<http://webkit.org/b/115177>
Reviewed by Antti Koivisto.
From Blink r148628 by <cevans@chromium.org>:
FINAL is a macro in wtf/Compiler.h that does the correct thing if the compiler does not support "final")
The approach used is as simple as possible whilst being thorough.
So, leaf classes have FINAL applied to the whole class whereas intermediary classes have FINAL applied to relevant methods.
FINAL allows a compiler to devirtualize call sites and turn them into direct calls. As you might expect, this is perf positive:
(clang on Linux):
- line_layout.html goes from 120 runs/s -> 123 runs/2, +2.5%
- html5-full-render.html goes from 3176ms -> 3162ms, +0.4%
I have confidence that the former result is statistically significant (as the numbers are very very stable) but not the latter.
* rendering/EllipsisBox.h:
* rendering/InlineFlowBox.h:
* rendering/InlineTextBox.h:
* rendering/RootInlineBox.h:
* rendering/TrailingFloatsRootInlineBox.h:
* rendering/svg/SVGInlineFlowBox.h:
* rendering/svg/SVGInlineTextBox.h:
* rendering/svg/SVGRootInlineBox.h:
2013-04-25 Andreas Kling <akling@apple.com>
CSS parser: Add error recovery while parsing @-webkit-keyframes key values.
<http://webkit.org/b/115175>
From Blink r148714 by <apavlov@chromium.org>:
If not a percentage, "from", or "to" value is used in a key list, the rule is erroneous,
and due to the absense of recovery, the parser skips the following, valid CSS rule.
On a related note, keyframes, whose selectors contain invalid keys, should be discarded
altogether, according to <http://www.w3.org/TR/css3-animations/#keyframes>
Tests: animations/keyframes-invalid-keys.html
fast/css/webkit-keyframes-errors.html
* css/CSSGrammar.y.in:
* css/CSSParser.cpp:
(WebCore::CSSParser::rewriteSpecifiers):
2013-04-25 Antti Koivisto <antti@apple.com>
REGRESSION (r147797): Animations slideshows of images on www.thesuperficial.com are slow
https://bugs.webkit.org/show_bug.cgi?id=115172
Reviewed by Andreas Kling.
On this page ads dynamically loaded to subframes on slideshow navigation switch us to state where we throttle layer flushes.
Fix by ignoring any subframe-originated loads when determining throttling.
* loader/FrameLoader.cpp:
(WebCore::FrameLoader::loadProgressingStatusChanged):
* loader/ProgressTracker.cpp:
(WebCore::ProgressTracker::isMainLoadProgressing):
Rename, ignore subframe originated loads. Subframe loads that are initiated during the main load still count.
* loader/ProgressTracker.h:
(ProgressTracker):
* page/FrameView.cpp:
(WebCore::FrameView::updateLayerFlushThrottlingInAllFrames):
* page/FrameView.h:
(FrameView):
* rendering/RenderLayerBacking.cpp:
(WebCore::computeTileCoverage):
2013-04-25 Andreas Kling <akling@apple.com>
SVG: Fix viewBox animations on shapes with non-scaling-stroke.
<http://webkit.org/b/115173>
From Blink r149058 by <pdr@chromium.org>:
Previously hasAttribute() to determine if a viewBox was set in the transform
code for non-scaling-strokes. hasAttribute() should not be used in this case,
as it will return false if the attribute is not set but the value is animating.
This patch switches to checking if the viewBox is empty instead of checking for
the presence of the attribute.
Test: svg/stroke/animated-non-scaling-stroke.html
* svg/SVGSVGElement.cpp:
(WebCore::SVGSVGElement::localCoordinateSpaceTransform):
* svg/SVGSVGElement.h:
(WebCore::SVGSVGElement::hasEmptyViewBox):
2013-04-25 Andreas Kling <akling@apple.com>
Remove isPluginElement hack in Document::setFocusedNode()
<http://webkit.org/b/115171>
From Blink r148800 by <tkent@chromium.org>:
This hack is no longer necessary because r147591 made isFocusable for plugin
elements work correctly.
* dom/Document.cpp:
(WebCore::Document::setFocusedNode):
2013-04-25 Per-Erik Brodin <per-erik.brodin@ericsson.com>
EventSource: Synchronous loader callback not handled properly
https://bugs.webkit.org/show_bug.cgi?id=115104
When attempting a cross-origin request towards a non-HTTP URL, an early verification
of the protocol scheme will cause didFailAccessControlCheck to be called synchronously
before the loader has even finished being created. This special case was not handled
properly, since we tried to cancel a non-existing loader, which resulted in a crash.
In addition to checking whether a request is in flight before trying to cancel it,
this change also schedules the initial creation of the loader to happen asynchronously
when an EventSource is constructed, so that a script can register for the error event
before it is dispatched (as a result of passing a non-HTTP URL to the constructor).
Reviewed by Alexey Proskuryakov.
Test: http/tests/eventsource/eventsource-cors-non-http.html
* page/EventSource.cpp:
(WebCore::EventSource::EventSource):
(WebCore::EventSource::create):
(WebCore::EventSource::scheduleInitialConnect):
(WebCore):
(WebCore::EventSource::scheduleReconnect):
(WebCore::EventSource::connectTimerFired):
(WebCore::EventSource::close):
(WebCore::EventSource::abortConnectionAttempt):
* page/EventSource.h:
(EventSource):
2013-04-25 Patrick Gansterer <paroga@webkit.org>
Unreviewed WinCE build fix after r148545.
* page/wince/FrameWinCE.cpp:
2013-04-24 Kent Tamura <tkent@chromium.org>
Back references don't work in pattern attribute
https://bugs.webkit.org/show_bug.cgi?id=105875
Reviewed by Geoffrey Garen.
This imports a part of Blink r148951.
Tests: Update fast/forms/ValidityState-patternMismatch.html
* html/BaseTextInputType.cpp:
(WebCore::BaseTextInputType::patternMismatch):
Don't use capturing parentheses. They affected back references in
pattern attribute values.
2013-04-24 Tim Horton <timothy_horton@apple.com>
PDFPlugin: Cursor should become an i-beam when over selectable text
https://bugs.webkit.org/show_bug.cgi?id=115018
<rdar://problem/12645012>
Reviewed by Alexey Proskuryakov.
* WebCore.exp.in: Export the I-beam and arrow cursors.
2013-04-24 Simon Fraser <simon.fraser@apple.com>
Garbage at the top of http://www.technologyreview.com after scrolling
https://bugs.webkit.org/show_bug.cgi?id=114825
Reviewed by Tim Horton.
Garbage pixels are caused by GraphicsLayerCA setting a layer to be opaque,
but then not painting anything into it. On this page, the element is
toggled to be visibility:hidden on scrolling, but RenderLayer::backgroundIsKnownToBeOpaqueInRect()
failed to consider that as something that can cause backgrounds not to be opaque.
For the bug to happen, some subtle interactions with r142012 come into play
for the layer to remain visible, hence the slightly complex testcase.
Test: compositing/contents-opaque/visibility-hidden.html
* rendering/RenderLayer.cpp:
(WebCore::RenderLayer::backgroundIsKnownToBeOpaqueInRect):
2013-04-24 Simon Fraser <simon.fraser@apple.com>
Dump layer opaqueness in the Compositing log output
https://bugs.webkit.org/show_bug.cgi?id=115132
Reviewed by Tim Horton.
It's useful to see whether we consider layers to be opaque in the Compositing
log channel output, so dump it.
* rendering/RenderLayerCompositor.cpp:
(WebCore::RenderLayerCompositor::logLayerInfo):
2013-04-24 Seokju Kwon <seokju.kwon@gmail.com>
Add efl to JSInspectorFrontendHost::port()
https://bugs.webkit.org/show_bug.cgi?id=115137
Reviewed by Timothy Hatcher.
No new tests, because there is no change in behavior.
* bindings/js/JSInspectorFrontendHostCustom.cpp:
(WebCore::JSInspectorFrontendHost::port):
2013-04-24 Kangil Han <kangil.han@samsung.com>
Function parameter quotePair can be passed by reference
https://bugs.webkit.org/show_bug.cgi?id=115089
Reviewed by Alexey Proskuryakov.
Minor performance patch.
* rendering/style/QuotesData.cpp:
(WebCore::QuotesData::addPair):
* rendering/style/QuotesData.h:
(QuotesData):
2013-04-24 Brady Eidson <beidson@apple.com>
Implementors of CachedResource subclasses should be forced to decide if encoded data can be replaced.
https://bugs.webkit.org/show_bug.cgi?id=115140
Reviewed by Beth Dakin.
No new tests (No behavior change).
This makes mayTryReplaceEncodedData() return false in CachedResource, but overrides to true
in all CachedResource subclasses besides CachedFont (which already has an implementation).
* loader/cache/CachedCSSStyleSheet.h:
* loader/cache/CachedImage.h:
* loader/cache/CachedRawResource.h:
* loader/cache/CachedResource.h:
* loader/cache/CachedSVGDocument.h:
* loader/cache/CachedScript.h:
* loader/cache/CachedShader.h:
* loader/cache/CachedTextTrack.h:
* loader/cache/CachedXSLStyleSheet.h:
2013-04-24 Brady Eidson <beidson@apple.com>
Once a custom font is cached to disk, it starts failing to render until the page is refreshed.
<rdar://problem/13622998> and https://bugs.webkit.org/show_bug.cgi?id=115131
Reviewed by Alexey Proskuryakov.
No new tests (Not a tested config, nor are disk cache issues currently testable).
* loader/cache/CachedResource.h:
(WebCore::CachedResource:: mayTryReplaceEncodedData): Allow subclasses to refuse encoded data replacement.
* loader/cache/CachedResource.cpp:
(WebCore::CachedResource::tryReplaceEncodedData): Only try if shouldTryReplaceEncodedData() is true.
* loader/cache/CachedFont.cpp:
(WebCore::CachedFont::CachedFont):
(WebCore::CachedFont::ensureCustomFontData):
(WebCore::CachedFont::mayTryReplaceEncodedData): Return false if the custom font data has ever been created.
* loader/cache/CachedFont.h:
2013-04-24 Beth Dakin <bdakin@apple.com>
Vertical overlay scrollbar in iframes fades in and out rapidly when you scroll in
a circle
https://bugs.webkit.org/show_bug.cgi?id=115124
-and corresponding-
<rdar://problem/13168957>
Reviewed by Anders Carlsson.
With http://trac.webkit.org/changeset/119834 we started calling
ScrollbarPainterController's contentAreaScrolled/contentAreaScrolledInDirection
API on a zero-delay timer instead of calling it right away. This prevented some
crashes that we saw whenever this was called during a layout. However, that delay,
combined with the particulars of contentAreaScrolledInDirection cause this bug
where sometimes the scrollbars in an iframe will fade out very noticeably when
scrolling in a circle.
This change makes it so we will only use the zero-delay timer if the
ScrollableArea is not currently handling a wheel event. If it IS handling a wheel
event, then we will send the notifications to AppKit right away. I confirmed that
this change did not reintroduce the old crashes.
Keep track of whether we are currently handling a wheel event with the new member
variable m_isHandlingWheelEvent.
* page/EventHandler.cpp:
(WebCore::EventHandler::EventHandler):
(WebCore::EventHandler::handleWheelEvent):
* page/EventHandler.h:
(WebCore::EventHandler::isHandlingWheelEvent):
(EventHandler):
To prevent layering violations, the ScrollableArea sub-classes will have to access
this information from the EventHandler.
* page/FrameView.cpp:
(WebCore::FrameView::isHandlingWheelEvent):
* page/FrameView.h:
* platform/ScrollableArea.h:
(WebCore::ScrollableArea::isHandlingWheelEvent):
* rendering/RenderLayer.cpp:
(WebCore::RenderLayer::isHandlingWheelEvent):
* rendering/RenderLayer.h:
(RenderLayer):
* rendering/RenderListBox.cpp:
(WebCore::RenderListBox::isHandlingWheelEvent):
* rendering/RenderListBox.h:
sendContentAreaScrolledSoon() can be private. Also add new function
sendContentAreaScrolled().
* platform/mac/ScrollAnimatorMac.h:
(ScrollAnimatorMac):
If the ScrollableArea is handling a wheel event, call
sendContentAreaScrolled(), otherwise call sendContentAreaScrolledSoon()
* platform/mac/ScrollAnimatorMac.mm:
(WebCore::ScrollAnimatorMac::notifyContentAreaScrolled):
(WebCore::ScrollAnimatorMac::sendContentAreaScrolled):
Re-factored to use sendContentAreaScrolled()
(WebCore::ScrollAnimatorMac::sendContentAreaScrolledTimerFired):
2013-04-24 Ryosuke Niwa <rniwa@webkit.org>
Fix a merge error in r149007 (was missing a null check added in r148777).
* rendering/LogicalSelectionOffsetCaches.h:
(WebCore::containingBlockForAbsolutePosition):
2013-04-24 Otto Derek Cheung <otcheung@rim.com>
Battery API won't return updated battery status until client calls didChangeBatteryStatus
https://bugs.webkit.org/show_bug.cgi?id=114891
Reviewed by Rob Buis.
The BatteryStatus object in BatteryManager won't get updated until BatteryClient calls
didChangeBatteryStatus in BatteryController. Any attempts to call webkitBattery.charged()
or other get functions will always return the default values until the next battery status
change object gets passed to the controller.
We need to update the manager when we attach it to the controller, and update all
existing managers when the controller receives it's first battery status object.
* Modules/battery/BatteryController.cpp:
(WebCore::BatteryController::addListener):
(WebCore::BatteryController::updateBatteryStatus):
* Modules/battery/BatteryManager.cpp:
(WebCore::BatteryManager::didChangeBatteryStatus):
(WebCore::BatteryManager::updateBatteryStatus):
(WebCore):
* Modules/battery/BatteryManager.h:
(BatteryManager):
2013-04-24 Jacky Jiang <zhajiang@blackberry.com>
Clean up unused code in ViewportArguments.h
https://bugs.webkit.org/show_bug.cgi?id=115121
Reviewed by Benjamin Poulain.
The target-densityDPI emulation implementation has been removed by
r147893, so clean up the remaining code as well.
* dom/ViewportArguments.h:
2013-04-24 Andreas Kling <akling@apple.com>
ElementData should use 'unsigned' attribute indices.
<http://webkit.org/b/115103>
Reviewed by Antti Koivisto.
Switch to using 'unsigned' for attribute indices. This gives consistent behavior
on 32/64-bit, and the underlying storage is already limited by Vector's 32-bit capacity.
Added an ElementData::attributeNotFound constant (-1) since we can't use WTF::notFound.
* dom/Element.cpp:
(WebCore::Element::detachAttribute):
(WebCore::Element::removeAttribute):
(WebCore::Element::setAttribute):
(WebCore::Element::setSynchronizedLazyAttribute):
(WebCore::Element::setAttributeInternal):
(WebCore::Element::setAttributeNode):
(WebCore::Element::removeAttributeNode):
(WebCore::Element::removeAttributeInternal):
(WebCore::UniqueElementData::removeAttribute):
(WebCore::ElementData::getAttributeItemIndexSlowCase):
* dom/Element.h:
(ElementData):
(UniqueElementData):
(Element):
(WebCore::Element::getAttributeItemIndex):
(WebCore::Element::attributeCount):
(WebCore::ElementData::length):
(WebCore::ElementData::getAttributeItem):
(WebCore::ElementData::getAttributeItemIndex):
* dom/NamedNodeMap.cpp:
(WebCore::NamedNodeMap::removeNamedItem):
(WebCore::NamedNodeMap::removeNamedItemNS):
(WebCore::NamedNodeMap::length):
* dom/NamedNodeMap.h:
(NamedNodeMap):
2013-04-24 Andreas Kling <akling@apple.com>
ElementData::attributeItem() should bounds-check the index.
<http://webkit.org/b/115076>
Reviewed by Antti Koivisto.
Switch the ASSERT_WITH_SECURITY_IMPLICATION to a RELEASE_ASSERT.
* dom/Element.h:
(WebCore::ElementData::attributeItem):
2013-04-23 Andreas Kling <akling@apple.com>
Setting an inline style property to "" shouldn't cause style recalc unless the property was present.
<http://webkit.org/b/115122>
Reviewed by Antti Koivisto.
StylePropertySet::setProperty() handles empty strings by removing the property entirely.
If there was no property to remove, it shouldn't claim that it changed something, as that
will cause the CSSOM wrapper to mark the element for style recalc.
A common idiom that triggers this is excessive use of { element.style.display = ''; }
* css/StylePropertySet.cpp:
(WebCore::MutableStylePropertySet::setProperty):
2013-04-23 Ryosuke Niwa <rniwa@webkit.org>
Moving word boundaries backwards fails when there is a text node starting with an apostrophe
https://bugs.webkit.org/show_bug.cgi?id=115070
Reviewed by Alexey Proskuryakov.
The bug was caused by previousBoundary erroneously assuming that we don't need any more context if a word
boundary is found at the beginning of a string. For example, when "I'll" is split into two text nodes,
"I" and "'ll", there is a word boundary between "'" and "ll" in "'ll" so we need to examine the whole "I'll".
Fixed the bug by obtaining more context when the character starts exactly at offset 1 in a text node to
work around this bug. In the long term, we probably need to provide Foundation of the entire context since in
languages like Hebrew and some of European languages, there could be many accents and combining characters
between split into multiple text nodes as one variant is seen in the newly added test case.
Test: editing/selection/previous-word-boundary-across-text-nodes.html
* editing/VisibleUnits.cpp:
(WebCore::previousBoundary):
2013-04-24 Benjamin Poulain <bpoulain@apple.com>
Do not use static string in DiagnosticLoggingKeys
https://bugs.webkit.org/show_bug.cgi?id=115093
Reviewed by Andreas Kling.
The code is not hot enough to justify keeping the memory around.
This removes 3kb from the binary on x86_64.
* page/DiagnosticLoggingKeys.cpp:
(WebCore::DiagnosticLoggingKeys::mediaLoadedKey):
(WebCore::DiagnosticLoggingKeys::mediaLoadingFailedKey):
(WebCore::DiagnosticLoggingKeys::pluginLoadedKey):
(WebCore::DiagnosticLoggingKeys::pluginLoadingFailedKey):
(WebCore::DiagnosticLoggingKeys::pageContainsPluginKey):
(WebCore::DiagnosticLoggingKeys::pageContainsAtLeastOnePluginKey):
(WebCore::DiagnosticLoggingKeys::pageContainsMediaEngineKey):
(WebCore::DiagnosticLoggingKeys::pageContainsAtLeastOneMediaEngineKey):
(WebCore::DiagnosticLoggingKeys::passKey):
(WebCore::DiagnosticLoggingKeys::failKey):
(WebCore::DiagnosticLoggingKeys::noopKey):
* page/DiagnosticLoggingKeys.h:
(DiagnosticLoggingKeys):
2013-04-24 Benjamin Poulain <benjamin@webkit.org>
Remove wxWebKit #ifdefs from WebCore/platform/graphics
https://bugs.webkit.org/show_bug.cgi?id=115081
Reviewed by Geoffrey Garen.
* platform/graphics/BitmapImage.h:
(BitmapImage):
* platform/graphics/Color.h:
(Color):
* platform/graphics/FloatRect.h:
(FloatRect):
* platform/graphics/FloatSize.h:
(FloatSize):
* platform/graphics/FontPlatformData.h:
* platform/graphics/GlyphBuffer.h:
(WebCore):
(WebCore::GlyphBuffer::glyphAt):
(WebCore::GlyphBuffer::add):
* platform/graphics/Gradient.h:
* platform/graphics/GraphicsContext.h:
(GraphicsContext):
* platform/graphics/Image.cpp:
(WebCore::Image::drawTiled):
* platform/graphics/ImageBufferData.h:
* platform/graphics/IntPoint.h:
(IntPoint):
* platform/graphics/IntRect.h:
* platform/graphics/IntSize.h:
(IntSize):
* platform/graphics/NativeImagePtr.h:
(WebCore):
* platform/graphics/Path.h:
* platform/graphics/Pattern.h:
* platform/graphics/SimpleFontData.h:
(SimpleFontData):
(WebCore::SimpleFontData::widthForGlyph):
* platform/graphics/mac/ComplexTextController.cpp:
(WebCore::ComplexTextController::collectComplexTextRuns):
* platform/graphics/mac/ComplexTextControllerCoreText.mm:
(WebCore::ComplexTextController::collectComplexTextRunsForCharacters):
* platform/graphics/transforms/AffineTransform.h:
(AffineTransform):
* platform/graphics/transforms/TransformationMatrix.h:
(TransformationMatrix):
2013-04-24 Benjamin Poulain <benjamin@webkit.org>
Remove wxWebKit #ifdefs from WebCore/plugins
https://bugs.webkit.org/show_bug.cgi?id=115080
Reviewed by Geoffrey Garen.
* plugins/PluginView.h:
(PluginView):
* plugins/mac/PluginViewMac.mm:
(WebCore::nativeWindowFor):
(WebCore::cgHandleFor):
(WebCore::topLevelOffsetFor):
(WebCore::PluginView::platformStart):
* plugins/win/PluginViewWin.cpp:
(windowHandleForPageClient):
(WebCore::PluginView::handleMouseEvent):
(WebCore::PluginView::platformStart):
(WebCore::PluginView::snapshot):
2013-04-24 Benjamin Poulain <benjamin@webkit.org>
Remove wxWebKit #ifdefs from WebCore/page
https://bugs.webkit.org/show_bug.cgi?id=115079
Reviewed by Geoffrey Garen.
* page/FrameView.cpp:
(WebCore::FrameView::wheelEvent):
* page/Settings.cpp:
(WebCore):
* page/Settings.h:
(Settings):
2013-04-24 Chris Fleizach <cfleizach@apple.com>
AX: WAI-ARIA landmarks no longer speak type of landmark on iOS
https://bugs.webkit.org/show_bug.cgi?id=114547
Reviewed by David Kilzer.
We want iOS to speak the landmark type.
I've moved the landmark role description to the base Mac class and exposed
these localized strings to iOS (the ones used to return landmark descriptions).
I've also updated the accessibilityLabel to account for landmark type, but also
handle multiple label sources more gracefully by appending commas, which changed a few
tests in minor ways.
Test: platform/iphone-simulator/accessibility/landmark-type.html
* accessibility/ios/WebAccessibilityObjectWrapperIOS.mm:
(-[WebAccessibilityObjectWrapper accessibilityLabel]):
* accessibility/mac/WebAccessibilityObjectWrapperBase.h:
* accessibility/mac/WebAccessibilityObjectWrapperBase.mm:
(-[WebAccessibilityObjectWrapperBase ariaLandmarkRoleDescription]):
* accessibility/mac/WebAccessibilityObjectWrapperMac.mm:
(-[WebAccessibilityObjectWrapper roleDescription]):
* platform/LocalizedStrings.cpp:
(WebCore):
(WebCore::AXButtonActionVerb):
(WebCore::AXRadioButtonActionVerb):
(WebCore::AXTextFieldActionVerb):
(WebCore::AXCheckedCheckBoxActionVerb):
(WebCore::AXUncheckedCheckBoxActionVerb):
(WebCore::AXLinkActionVerb):
(WebCore::AXMenuListPopupActionVerb):
(WebCore::AXMenuListActionVerb):
* platform/LocalizedStrings.h:
(WebCore):
2013-04-24 Andreas Kling <akling@apple.com>
CSS attribute selectors cause unnecessary style recalc when setting attribute to same value.
<http://webkit.org/b/115116>
<rdar://problem/13727709>
Reviewed by Simon Fraser.
The logic that dirties the style if there's a relevant attribute selector in the document
shouldn't run if the attribute is being overwritten with an identical value.
Move this into willModifyAttribute() instead, since we need access to both the old and the new value.
This reduces unnecessary style recalculation in Mac App Store content.
* dom/Element.cpp:
(WebCore::Element::attributeChanged):
(WebCore::Element::willModifyAttribute):
2013-04-24 Jonathan Feldstein <jfeldstein@blackberry.com>
[BlackBerry] Fixes the San Angeles demo on khronos.org
https://bugs.webkit.org/show_bug.cgi?id=115106
Reviewed by Rob Buis
Internally Reviewed by Jeremy Nicholl and Arvid Nilsson
Fixes a bug in which the currently bound vertex array object's vertex array
state was being modified as opposed to the default vertex array state.
* platform/graphics/blackberry/EGLImageLayerWebKitThread.cpp:
(EGLImageLayerWebKitThread::blitToFrontBuffer):
2013-04-24 Nico Weber <thakis@chromium.org>
Fold RenderThemeMacShared into RenderThemeMac
https://bugs.webkit.org/show_bug.cgi?id=115086
Reviewed by Anders Carlsson.
No intended functionality change.
* WebCore.xcodeproj/project.pbxproj:
* rendering/RenderThemeMac.h:
(RenderThemeMac):
(WebCore::RenderThemeMac::supportsControlTints):
(WebCore::RenderThemeMac::scrollbarControlSizeForPart):
(WebCore::RenderThemeMac::supportsSelectionForegroundColors):
(WebCore::RenderThemeMac::supportsClosedCaptioning):
(WebCore::RenderThemeMac::updateActiveState):
* rendering/RenderThemeMac.mm:
(-[WebCoreRenderThemeNotificationObserver initWithTheme:WebCore::]):
(-[WebCoreRenderThemeNotificationObserver systemColorsDidChange:]):
(-[WebCoreTextFieldCell _coreUIDrawOptionsWithFrame:inView:includeFocus:]):
(WebCore::RenderThemeMac::RenderThemeMac):
(WebCore::RenderThemeMac::~RenderThemeMac):
(WebCore::RenderThemeMac::platformActiveSelectionBackgroundColor):
(WebCore):
(WebCore::RenderThemeMac::platformInactiveSelectionBackgroundColor):
(WebCore::RenderThemeMac::platformActiveListBoxSelectionBackgroundColor):
(WebCore::RenderThemeMac::platformActiveListBoxSelectionForegroundColor):
(WebCore::RenderThemeMac::platformInactiveListBoxSelectionForegroundColor):
(WebCore::RenderThemeMac::platformFocusRingColor):
(WebCore::RenderThemeMac::platformInactiveListBoxSelectionBackgroundColor):
(WebCore::toFontWeight):
(WebCore::RenderThemeMac::systemFont):
(WebCore::convertNSColorToColor):
(WebCore::menuBackgroundColor):
(WebCore::RenderThemeMac::platformColorsDidChange):
(WebCore::RenderThemeMac::systemColor):
(WebCore::RenderThemeMac::usesTestModeFocusRingColor):
(WebCore::RenderThemeMac::isControlStyled):
(WebCore::RenderThemeMac::adjustRepaintRect):
(WebCore::RenderThemeMac::inflateRect):
(WebCore::RenderThemeMac::convertToPaintingRect):
(WebCore::RenderThemeMac::updateCheckedState):
(WebCore::RenderThemeMac::updateEnabledState):
(WebCore::RenderThemeMac::updateFocusedState):
(WebCore::RenderThemeMac::updatePressedState):
(WebCore::RenderThemeMac::controlSupportsTints):
(WebCore::RenderThemeMac::controlSizeForFont):
(WebCore::RenderThemeMac::setControlSize):
(WebCore::RenderThemeMac::sizeForFont):
(WebCore::RenderThemeMac::sizeForSystemFont):
(WebCore::RenderThemeMac::setSizeFromFont):
(WebCore::RenderThemeMac::setFontFromControlSize):
(WebCore::RenderThemeMac::controlSizeForSystemFont):
(WebCore::RenderThemeMac::paintTextField):
(WebCore::RenderThemeMac::adjustTextFieldStyle):
(WebCore::RenderThemeMac::paintCapsLockIndicator):
(WebCore::RenderThemeMac::paintTextArea):
(WebCore::RenderThemeMac::adjustTextAreaStyle):
(WebCore::RenderThemeMac::popupButtonMargins):
(WebCore::RenderThemeMac::popupButtonSizes):
(WebCore::RenderThemeMac::popupButtonPadding):
(WebCore::RenderThemeMac::paintMenuList):
(WebCore::RenderThemeMac::meterSizeForBounds):
(WebCore::RenderThemeMac::paintMeter):
(WebCore::RenderThemeMac::supportsMeter):
(WebCore::RenderThemeMac::levelIndicatorStyleFor):
(WebCore::RenderThemeMac::levelIndicatorFor):
(WebCore::RenderThemeMac::progressBarSizes):
(WebCore::RenderThemeMac::progressBarMargins):
(WebCore::RenderThemeMac::minimumProgressBarHeight):
(WebCore::RenderThemeMac::animationRepeatIntervalForProgressBar):
(WebCore::RenderThemeMac::animationDurationForProgressBar):
(WebCore::RenderThemeMac::adjustProgressBarStyle):
(WebCore::RenderThemeMac::paintProgressBar):
(WebCore::TopGradientInterpolate):
(WebCore::BottomGradientInterpolate):
(WebCore::MainGradientInterpolate):
(WebCore::TrackGradientInterpolate):
(WebCore::RenderThemeMac::paintMenuListButtonGradients):
(WebCore::RenderThemeMac::paintMenuListButton):
(WebCore::menuListButtonSizes):
(WebCore::RenderThemeMac::adjustMenuListStyle):
(WebCore::RenderThemeMac::popupInternalPaddingLeft):
(WebCore::RenderThemeMac::popupInternalPaddingRight):
(WebCore::RenderThemeMac::popupInternalPaddingTop):
(WebCore::RenderThemeMac::popupInternalPaddingBottom):
(WebCore::RenderThemeMac::adjustMenuListButtonStyle):
(WebCore::RenderThemeMac::setPopupButtonCellState):
(WebCore::RenderThemeMac::menuListSizes):
(WebCore::RenderThemeMac::minimumMenuListSize):
(WebCore::RenderThemeMac::adjustSliderTrackStyle):
(WebCore::RenderThemeMac::paintSliderTrack):
(WebCore::RenderThemeMac::adjustSliderThumbStyle):
(WebCore::RenderThemeMac::paintSliderThumb):
(WebCore::RenderThemeMac::paintSearchField):
(WebCore::RenderThemeMac::setSearchCellState):
(WebCore::RenderThemeMac::searchFieldSizes):
(WebCore::RenderThemeMac::setSearchFieldSize):
(WebCore::RenderThemeMac::adjustSearchFieldStyle):
(WebCore::RenderThemeMac::paintSearchFieldCancelButton):
(WebCore::RenderThemeMac::cancelButtonSizes):
(WebCore::RenderThemeMac::adjustSearchFieldCancelButtonStyle):
(WebCore::RenderThemeMac::resultsButtonSizes):
(WebCore::RenderThemeMac::adjustSearchFieldDecorationStyle):
(WebCore::RenderThemeMac::paintSearchFieldDecoration):
(WebCore::RenderThemeMac::adjustSearchFieldResultsDecorationStyle):
(WebCore::RenderThemeMac::paintSearchFieldResultsDecoration):
(WebCore::RenderThemeMac::adjustSearchFieldResultsButtonStyle):
(WebCore::RenderThemeMac::paintSearchFieldResultsButton):
(WebCore::RenderThemeMac::paintSnapshottedPluginOverlay):
(WebCore::RenderThemeMac::sliderTickSize):
(WebCore::RenderThemeMac::sliderTickOffsetFromTrackCenter):
(WebCore::RenderThemeMac::adjustSliderThumbSize):
(WebCore::RenderThemeMac::shouldShowPlaceholderWhenFocused):
(WebCore::RenderThemeMac::popupButton):
(WebCore::RenderThemeMac::search):
(WebCore::RenderThemeMac::searchMenuTemplate):
(WebCore::RenderThemeMac::sliderThumbHorizontal):
(WebCore::RenderThemeMac::sliderThumbVertical):
(WebCore::RenderThemeMac::textField):
(WebCore::RenderThemeMac::fileListNameForWidth):
* rendering/RenderThemeMacShared.h: Removed.
* rendering/RenderThemeMacShared.mm: Removed.
2013-04-24 ChangSeok Oh <changseok.oh@collabora.com>
[GTK][AC] Visible rect doesn't update after resizing a window.
https://bugs.webkit.org/show_bug.cgi?id=115096
Reviewed by Gustavo Noronha Silva.
Once we set actor's a clip rect, we should update the rect when resizing the actor.
No new tests since no new functionality.
* platform/graphics/clutter/GraphicsLayerClutter.cpp:
(WebCore::GraphicsLayerClutter::setSize):
2013-04-24 ChangSeok Oh <changseok.oh@collabora.com>
[GTK][AC] Fix unexpected clear of ClutterContent.
https://bugs.webkit.org/show_bug.cgi?id=115099
Reviewed by Gustavo Noronha Silva.
adoptGRef doesn't increase a reference count. So if a actor has a valid ClutterContent,
it would be cleared unexpectedly by smart pointer when escaping a function.
No new tests, no functionality changed.
* platform/graphics/clutter/GraphicsLayerActor.cpp:
(graphicsLayerActorUpdateTexture):
2013-04-24 Alberto Garcia <agarcia@igalia.com>
DOMFileSystemBase: fix multiple definitions in the BlackBerry port
https://bugs.webkit.org/show_bug.cgi?id=114950
Reviewed by Xan Lopez.
The following methods are already defined in DOMFileSystemBlackBerry.cpp:
crackFileSystemURL()
createFileSystemURL()
isValidType()
supportsToURL()
* Modules/filesystem/DOMFileSystemBase.cpp:
(WebCore):
2013-04-24 George Staikos <gstaikos@rim.com>
[BlackBerry] Add support for JPEG image quality during encoding.
https://bugs.webkit.org/show_bug.cgi?id=105773
Reviewed by Xan Lopez.
PR 271611
Internally reviewed by Liam Quinn.
Pass the quality flag into the encoder, with a default of 65
Covered by existing tests.
* platform/image-encoders/JPEGImageEncoder.cpp:
(WebCore::compressRGBABigEndianToJPEG):
* platform/image-encoders/JPEGImageEncoder.h:
(WebCore):
2013-04-24 Csaba Osztrogonác <ossy@webkit.org>
Fix cast-align WebCore/platform/graphics/GraphicsContext3D.cpp on ARM
https://bugs.webkit.org/show_bug.cgi?id=115036
Reviewed by Benjamin Poulain.
* platform/graphics/GraphicsContext3D.cpp:
(WebCore):
2013-04-24 Andreas Kling <akling@apple.com>
Remove unnecessary MutableStylePropertySet casts.
<http://webkit.org/b/115075>
Reviewed by Geoffrey Garen.
Get rid of some now-unneeded static_casts that were left from the StylePropertySet
refactoring last weekend.
* css/StylePropertySet.cpp:
(WebCore::MutableStylePropertySet::setProperty):
* editing/EditingStyle.cpp:
(WebCore::EditingStyle::triStateOfStyle):
(WebCore::EditingStyle::removeStyleFromRulesAndContext):
2013-04-24 Kangil Han <kangil.han@samsung.com>
[Minor code cleanup] Remove duplicated condition check
https://bugs.webkit.org/show_bug.cgi?id=115082
Reviewed by Andreas Kling.
areRectsPartiallyAligned() has duplicated condition check, so remove it.
* page/SpatialNavigation.cpp:
(WebCore::areRectsPartiallyAligned):
2013-04-24 Krzysztof Wolanski <k.wolanski@samsung.com>
[EFL] Fix build warnings caused by missing images attributes for default buttons
https://bugs.webkit.org/show_bug.cgi?id=114955
Reviewed by Gyuyoung Kim.
Added default image for each button from mediacontrol catalog.
No new tests, because there is no change in behavior.
* platform/efl/DefaultTheme/widget/mediacontrol/fullscreenbutton/fullscreen_button.edc:
* platform/efl/DefaultTheme/widget/mediacontrol/mutebutton/mute_button.edc:
* platform/efl/DefaultTheme/widget/mediacontrol/playpausebutton/playpause_button.edc:
* platform/efl/DefaultTheme/widget/mediacontrol/seekbackwardbutton/seekbackward_button.edc:
* platform/efl/DefaultTheme/widget/mediacontrol/seekforwardbutton/seekforward_button.edc:
* platform/efl/DefaultTheme/widget/mediacontrol/togglecaptionsbutton/toggle_captions_button.edc:
2013-04-24 Christophe Dumez <ch.dumez@sisa.samsung.com>
Unreviewed build fix with gstreamer 0.10.x after r147555.
* platform/audio/gstreamer/WebKitWebAudioSourceGStreamer.cpp:
(webKitWebAudioSrcLoop):
== Rolled over to ChangeLog-2013-04-24 ==