ChangeLog-2013-10-13 [plain text]
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 scrollbar’s 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: Don’t 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:
2