1. 23 Aug, 2013 12 commits
    • commit-queue@webkit.org's avatar
      Fix srcset's image candidate algorithm when DPR exceeds all candidates · 058b9ddc
      commit-queue@webkit.org authored
      https://bugs.webkit.org/show_bug.cgi?id=120168
      
      Source/WebCore:
      
      When the DPR exceeded the 'x' qualifier of all image candidates, none was chosen.
      
      From the srcset spec: "If there are any entries in candidates that have an associated pixel density that is less than a
      user-agent-defined value giving the nominal pixel density of the display, then remove them, unless that would remove all the
      entries, in which case remove only the entries whose associated pixel density is less than the greatest such pixel density."
      
      Fixed by returning the last one in the list of candidates sorted by their qualifier, in case none of them is equal or greater than
      DPR.
      
      Patch by Yoav Weiss <yoav@yoav.ws> on 2013-08-23
      Reviewed by Andreas Kling.
      
      Test: fast/hidpi/image-srcset-fraction.html
      
      * html/parser/HTMLParserIdioms.cpp:
      (WebCore::bestFitSourceForImageAttributes):
      
      LayoutTests:
      
      From the srcset spec: "If there are any entries in candidates that have an associated pixel density that is less than a
      user-agent-defined value giving the nominal pixel density of the display, then remove them, unless that would remove all the
      entries, in which case remove only the entries whose associated pixel density is less than the greatest such pixel density."
      
      This test verifies that when all the candidates' qualifiers are smaller than the DPR, the highest one is returned.
      
      Patch by Yoav Weiss <yoav@yoav.ws> on 2013-08-23
      Reviewed by Andreas Kling.
      
      * fast/hidpi/image-srcset-fraction-expected.txt: Added.
      * fast/hidpi/image-srcset-fraction.html: Added.
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@154497 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      058b9ddc
    • cfleizach@apple.com's avatar
      <https://webkit.org/b/113895> Webkit exposes aria-expanded="undefined" as... · d67d4c4e
      cfleizach@apple.com authored
      <https://webkit.org/b/113895> Webkit exposes aria-expanded="undefined" as aria-expanded="false" (AXExpanded = NO)
      
      Reviewed by Darin Adler.
      
      Source/WebCore:
      
      Don't support the ARIA expanded attribute unless the value is one of the defined ARIA values (true/false).
      
      Test: platform/mac/accessibility/aria-expanded-not-exposed-when-undefined.html
      
      * accessibility/AccessibilityObject.cpp:
      (WebCore::AccessibilityObject::supportsARIAExpanded):
      
      LayoutTests:
      
      * platform/mac/accessibility/aria-expanded-not-exposed-when-undefined-expected.txt: Added.
      * platform/mac/accessibility/aria-expanded-not-exposed-when-undefined.html: Added.
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@154496 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      d67d4c4e
    • darin@apple.com's avatar
      <https://webkit.org/b/119945> Some cleanup for PasteboardIOS · c13a747c
      darin@apple.com authored
      Reviewed by Andreas Kling.
      
      * platform/ios/PasteboardIOS.mm:
      (WebCore::Pasteboard::setFrame): Moved this function up near the
      create functions and constructors.
      (WebCore::documentFragmentWithRTF): Tweaked formatting.
      (WebCore::Pasteboard::documentFragmentForPasteboardItemAtIndex):
      Ditto.
      (WebCore::utiTypeFromCocoaType): Changed to use early return and removed
      an unneeded local variable.
      (WebCore::cocoaTypeFromHTMLClipboardType): Renamed the quaint qType and
      pbType local variables, and tweaked formatting.
      (WebCore::Pasteboard::clear): Tweaked comment.
      (WebCore::Pasteboard::readString): Tweaked formatting.
      (WebCore::addHTMLClipboardTypesForCocoaType): Tweaked formatting.
      (WebCore::Pasteboard::writeString): Streamlined logic and tweaked formatting
      (WebCore::Pasteboard::types): Renamed pbType to just type.
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@154495 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      c13a747c
    • bjonesbe@adobe.com's avatar
      Attempt to make it more clear what FloatIntervalSearchAdaptor::collectIfNeeded is doing · b5306935
      bjonesbe@adobe.com authored
      https://bugs.webkit.org/show_bug.cgi?id=119816
      
      Reviewed by David Hyatt.
      
      This is a port from Blink of
      https://src.chromium.org/viewvc/blink?revision=155885&view=revision
      Original Patch by Eric Seidel
      
      Original comments:
      
      "It seemed to me that template specifications would be clearer than an
      if.  They also allow for compile-time error checking were a 3rd type
      of float to come into existance in CSS4. :p
      
      For any unfamiliar with this method, this the object used for
      performing a search on a RedBlackTree in WTF.
      
      We create one of these adaptors, specifying that we want to search for
      values in a specific (logical) Y interval, and this adaptor is called
      back for any values in the RBTree cooresponding to that interval
      range.
      
      The job of this adaptor is to collect the various values we care
      about, including the left or right-most offset of the floats in that
      Y-range as well as what the last (document order) float seen in that
      range.
      
      It also collects the remaining available height for the block but I'm
      less clear on how that parameter is used."
      
      Note that in addition to the original change, I have made the
      updateOffsetIfNeeded and rangesIntersect methods inline, as this was
      shown to be a performance win in
      https://src.chromium.org/viewvc/blink?revision=156064&view=revision
      and it seemed a rather trivial change to be subject to a separate
      patch when porting.
      
      No new tests, no behavior change.
      
      * rendering/RenderBlock.cpp:
      (WebCore::::updateOffsetIfNeeded):
      (WebCore::::collectIfNeeded):
      * rendering/RenderBlock.h:
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@154494 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      b5306935
    • ddkilzer@apple.com's avatar
      WebCore fails to link due to changes in Objective-C++ ABI in trunk clang · dda16d11
      ddkilzer@apple.com authored
      <http://webkit.org/b/120183>
      <rdar://problem/14764114>
      
      Reviewed by Eric Carlson.
      
      The trunk version of clang made an ABI change for Objective-C++
      parameters that caused WebCore to fail to link.  The short-term
      fix is to change the parameter type from id<protocol> to just id
      and add an ASSERT that the parameter still conforms to the
      protocol.
      
      * platform/DragData.h:
      (DragDataRef): Change typedef from id<NSDragInfo> to id.
      * platform/mac/DragDataMac.mm:
      (WebCore::DragData::DragData): Add ASSERT that checks that the
      DragDataRef object implements the NSDragInfo protocol.
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@154493 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      dda16d11
    • akling@apple.com's avatar
      RenderLayerCompositor::m_renderView should be a reference. · 3ab117a8
      akling@apple.com authored
      <https://webkit.org/b/120210>
      
      Reviewed by Antti Koivisto.
      
      The RenderLayerCompositor is always created by a RenderView passing itself to the constructor.
      By making m_renderView a reference, we flush out some unnecessary null checks.
      We also gain a pointer-free path to Settings through m_renderView.frameView().frame().settings()
      so we don't have to make those blocks conditional anymore, reducing ambiguity.
      
      * rendering/RenderLayerCompositor.cpp:
      * rendering/RenderLayerCompositor.h:
      * rendering/RenderView.cpp:
      (WebCore::RenderView::compositor):
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@154489 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      3ab117a8
    • akling@apple.com's avatar
      RenderView::frameView() should return a reference. · 61dc1430
      akling@apple.com authored
      <https://webkit.org/b/120208>
      
      Reviewed by Antti Koivisto.
      
      A RenderView should always have a corresponding FrameView, so make frameView()
      return a reference. Also remove a myriad of now-impossible null checks.
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@154488 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      61dc1430
    • allan.jensen@digia.com's avatar
      REGRESSION(r153939) Fix typo in Qt build-files · c3d98499
      allan.jensen@digia.com authored
      Reviewed by Antti Koivisto.
      
      Fix simple typo in Target.pri introduced in r153939.
      
      * Target.pri:
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@154482 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      c3d98499
    • antti@apple.com's avatar
      <https://webkit.org/b/120166> Add Traversal<ElementType> template · ecdc7b0a
      antti@apple.com authored
      Reviewed by Andreas Kling.
      
      It is common to traverse through a subtree looking for elements of specific type and then casting to the type. This pattern can be generalized.
              
      This patch adds a new Traversal<typename ElementType> template. It works like ElementTraversal except that the traversal is limited to the specified type.
      The patch also uses the template in a bunch of applicable places.
      
      * WebCore.exp.in:
      * accessibility/AccessibilityRenderObject.cpp:
      (WebCore::AccessibilityRenderObject::addImageMapChildren):
      * dom/Document.cpp:
      (WebCore::Document::removeTitle):
      (WebCore::Document::updateBaseURL):
      (WebCore::Document::processBaseElement):
      * dom/Element.h:
      * dom/ElementTraversal.h:
      (WebCore::::firstChildTemplate):
      (WebCore::::firstWithinTemplate):
      (WebCore::::lastChildTemplate):
      (WebCore::::lastWithinTemplate):
      (WebCore::::nextTemplate):
      (WebCore::::previousTemplate):
      (WebCore::::nextSiblingTemplate):
      (WebCore::::previousSiblingTemplate):
      (WebCore::::nextSkippingChildrenTemplate):
      (WebCore::::firstChild):
      (WebCore::::lastChild):
      (WebCore::::firstWithin):
      (WebCore::::lastWithin):
      (WebCore::::next):
      (WebCore::::previous):
      (WebCore::::nextSibling):
      (WebCore::::previousSibling):
      (WebCore::::nextSkippingChildren):
      (WebCore::ElementTraversal::previousIncludingPseudo):
      (WebCore::ElementTraversal::nextIncludingPseudo):
      (WebCore::ElementTraversal::nextIncludingPseudoSkippingChildren):
      (WebCore::ElementTraversal::pseudoAwarePreviousSibling):
      * dom/Node.cpp:
      (WebCore::Node::numberOfScopedHTMLStyleChildren):
      * dom/NodeIterator.cpp:
      (WebCore::NodeIterator::NodeIterator):
      * dom/NodeIterator.h:
      * dom/Traversal.cpp:
      (WebCore::NodeIteratorBase::NodeIteratorBase):
      (WebCore::NodeIteratorBase::acceptNode):
      * dom/Traversal.h:
              
          Renamed existing class called Traversal to less generic NodeIteratorBase.
      
      * dom/TreeScope.cpp:
      (WebCore::TreeScope::labelElementForId):
      (WebCore::TreeScope::findAnchor):
      * dom/TreeWalker.cpp:
      (WebCore::TreeWalker::TreeWalker):
      * dom/TreeWalker.h:
      * editing/FrameSelection.cpp:
      (WebCore::scanForForm):
      * editing/markup.cpp:
      (WebCore::createContextualFragment):
      * html/HTMLAnchorElement.h:
      (WebCore::isHTMLAnchorElement):
      (WebCore::HTMLAnchorElement):
      * html/HTMLAreaElement.h:
      (WebCore::isHTMLAreaElement):
      (WebCore::HTMLAreaElement):
      * html/HTMLBaseElement.h:
      (WebCore::isHTMLBaseElement):
      (WebCore::HTMLBaseElement):
      * html/HTMLElement.h:
      (WebCore::HTMLElement):
      * html/HTMLFieldSetElement.cpp:
      (WebCore::HTMLFieldSetElement::invalidateDisabledStateUnder):
      (WebCore::HTMLFieldSetElement::childrenChanged):
      (WebCore::HTMLFieldSetElement::legend):
      * html/HTMLFormControlElement.h:
      (WebCore::toHTMLFormControlElement):
      (WebCore::HTMLFormControlElement):
      * html/HTMLLabelElement.cpp:
      (WebCore::nodeAsSupportedLabelableElement):
      (WebCore::HTMLLabelElement::control):
      * html/HTMLLabelElement.h:
      (WebCore::isHTMLLabelElement):
      (WebCore::HTMLLabelElement):
      * html/HTMLLegendElement.h:
      (WebCore::isHTMLLegendElement):
      (WebCore::HTMLLegendElement):
      * html/HTMLMapElement.cpp:
      (WebCore::HTMLMapElement::mapMouseEvent):
      * html/HTMLMediaElement.cpp:
      (WebCore::HTMLMediaElement::finishParsingChildren):
      * html/HTMLStyleElement.h:
      (WebCore::isHTMLStyleElement):
      (WebCore::HTMLStyleElement):
      * html/HTMLTitleElement.h:
      (WebCore::HTMLTitleElement):
      * html/HTMLTrackElement.h:
      (WebCore::isHTMLTrackElement):
      (WebCore::HTMLTrackElement):
      * html/LabelableElement.h:
      (WebCore::isLabelableElement):
      (WebCore::LabelableElement):
      * rendering/FilterEffectRenderer.cpp:
      (WebCore::FilterEffectRenderer::buildReferenceFilter):
      * svg/SVGElement.h:
      (WebCore::SVGElement):
      * svg/SVGForeignObjectElement.h:
      (WebCore::isSVGForeignObjectElement):
      (WebCore::SVGForeignObjectElement):
      * svg/SVGSVGElement.cpp:
      (WebCore::SVGSVGElement::collectIntersectionOrEnclosureList):
      (WebCore::SVGSVGElement::getElementById):
      * svg/SVGStyledElement.cpp:
      (WebCore::SVGStyledElement::title):
      * svg/SVGTitleElement.h:
      (WebCore::SVGTitleElement):
      * svg/animation/SMILTimeContainer.cpp:
      (WebCore::SMILTimeContainer::updateDocumentOrderIndexes):
      * svg/animation/SVGSMILElement.cpp:
      (WebCore::SVGSMILElement::isSMILElement):
      * svg/animation/SVGSMILElement.h:
      (WebCore::SVGSMILElement):
      * svg/graphics/SVGImage.cpp:
      (WebCore::SVGImage::hasSingleSecurityOrigin):
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@154481 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      ecdc7b0a
    • a.bah@samsung.com's avatar
      <br> does not get deleted when inlined after some non-textual content. · b024701d
      a.bah@samsung.com authored
      https://bugs.webkit.org/show_bug.cgi?id=120006
      
      Patch by Arpita Bahuguna <a.bah@samsung.com> on 2013-08-23
      Reviewed by Ryosuke Niwa.
      
      Source/WebCore: 
      
      deleteSelectionCommand does not handle the case when a <br> element is
      inlined after some non-textual content (input controls, image etc.).
      
      When doing a back-delete at the start of a line following such a <br>
      the two contiguous lines should merge and the <br> should get deleted.
      Currently, even though the <br> is deleted, another placeholder <br>
      is incorrectly inserted at the same point, thus effectively there is no
      change.
      
      We are incorrectly computing the inline <br> to be at the start of an
      empty line even though the line is not empty.
      
      Test: editing/deleting/delete-inline-br.html
      
      * editing/DeleteSelectionCommand.cpp:
      (WebCore::DeleteSelectionCommand::handleSpecialCaseBRDelete):
      Adding a check to verify that the inline <br> is not on an empty line
      if the end node is not a <br> element itself and it's previous sibling
      is the start <br> element.
      
      Basically we check whether there is another node (end node) following
      the <br>, that the node is not a <br> itself, and that the end node's
      previous node is the start <br>.
      
      LayoutTests: 
      
      * editing/deleting/delete-inline-br-expected.txt: Added.
      * editing/deleting/delete-inline-br.html: Added.
      Added a testcase that verifies that the caret is placed at the correct
      position after performing a back-delete operation.
      
      * editing/deleting/delete-before-block-image-2-expected.txt:
      * platform/mac/editing/deleting/delete-br-004-expected.txt:
      * platform/mac/editing/deleting/delete-br-005-expected.txt:
      * platform/mac/editing/deleting/delete-br-006-expected.txt:
      * platform/qt/editing/deleting/delete-br-004-expected.txt:
      * platform/qt/editing/deleting/delete-br-005-expected.txt:
      * platform/qt/editing/deleting/delete-br-006-expected.txt:
      Rebaselining existing tests. No visual change in behavior for these tests.
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@154479 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      b024701d
    • reni@webkit.org's avatar
      Missing null-check in HTMLFormElement::rendererIsNeeded() · 7ee57d46
      reni@webkit.org authored
      https://bugs.webkit.org/show_bug.cgi?id=120159
      
      Reviewed by Ryosuke Niwa.
      
      Source/WebCore:
      
      Null-check parentRenderer in HTMLFormElement::rendererIsNeeded()
      and early return.
      
      Test: fast/forms/missing-parentrenderer-crash.html
      
      * html/HTMLFormElement.cpp:
      (WebCore::HTMLFormElement::rendererIsNeeded):
      
      LayoutTests:
      
      Test for the handling of null parentRederer.
      
      * fast/forms/missing-parentrenderer-crash-expected.txt: Added.
      * fast/forms/missing-parentrenderer-crash.html: Added.
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@154476 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      7ee57d46
    • zalan@apple.com's avatar
      MathML: ASSERTION FAILED: !isPreferredLogicalHeightDirty() in... · d9b9bdfc
      zalan@apple.com authored
      MathML: ASSERTION FAILED: !isPreferredLogicalHeightDirty() in RenderMathMLBlock::preferredLogicalHeight() const
      https://bugs.webkit.org/show_bug.cgi?id=120157
      
      Reviewed by Antti Koivisto.
      
      RenderListMarker needs to be inserted to the render tree before
      we start computing the preferred logical widths for the associated
      RenderListItem.
      
      Source/WebCore:
      
      Test: mathml/mn-as-list-item-assert.html
      
      * rendering/RenderListItem.cpp:
      (WebCore::RenderListItem::insertOrMoveMarkerRendererIfNeeded):
      (WebCore::RenderListItem::layout):
      (WebCore::RenderListItem::computePreferredLogicalWidths):
      * rendering/RenderListItem.h:
      
      LayoutTests:
      
      * mathml/mn-as-list-item-assert-expected.txt: Added.
      * mathml/mn-as-list-item-assert.html: Added.
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@154475 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      d9b9bdfc
  2. 22 Aug, 2013 14 commits
    • gyuyoung.kim@samsung.com's avatar
      Introduce toSVGLinearGradientElement(), and use it · 340b3c2a
      gyuyoung.kim@samsung.com authored
      https://bugs.webkit.org/show_bug.cgi?id=120154
      
      Reviewed by Andreas Kling.
      
      As a step to clean-up static_cast<SVGXXX>, toSVGLinearGradientElement() is added to clean-up
      static_cast<SVGLinearGradientElement*>.
      
      * rendering/svg/RenderSVGResourceLinearGradient.cpp:
      (WebCore::RenderSVGResourceLinearGradient::collectGradientAttributes):
      * rendering/svg/SVGRenderTreeAsText.cpp:
      (WebCore::writeSVGResourceContainer):
      * svg/SVGLinearGradientElement.cpp:
      (WebCore::SVGLinearGradientElement::collectGradientAttributes):
      * svg/SVGLinearGradientElement.h:
      (WebCore::toSVGLinearGradientElement):
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@154472 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      340b3c2a
    • simon.fraser@apple.com's avatar
      compositing/geometry/bounds-ignores-hidden-dynamic.html has incorrect initial rendering · bd93c753
      simon.fraser@apple.com authored
      https://bugs.webkit.org/show_bug.cgi?id=119825
      
      Source/WebCore:
      
      Reviewed by Tim Horton.
      
      r137526 and some earlier commits attempted to avoid unconditionally
      repainting layers when their size changes, because this was causing
      TiledBacking layers to repaint when the document size changed.
      
      However, the approach required that we have good information about
      whether size changes require a repaint, which in some cases is hard
      to determine, especially when RenderLayer changes affect our
      decisions about which layers are composited.
      
      Fix by pushing the decision about whether to repaint on size change
      into GraphicsLayer. The default is to repaint on size change,
      but GraphicsLayer provides a function that can be overridden to
      modify this behavior; GraphicsLayerCA does so to avoid repaints
      when layers with TiledBackings get resized.
      
      Test: compositing/repaint/repaint-on-layer-grouping-change.html
      
      * WebCore.exp.in: WebKit2 needs GraphicsLayer::setSize, which is no longer inline.
      * platform/graphics/GraphicsLayer.cpp:
      (WebCore::GraphicsLayer::setOffsetFromRenderer):
      (WebCore::GraphicsLayer::setSize):
      * platform/graphics/GraphicsLayer.h:
      (WebCore::GraphicsLayer::shouldRepaintOnSizeChange):
      * platform/graphics/ca/GraphicsLayerCA.cpp:
      (WebCore::GraphicsLayerCA::shouldRepaintOnSizeChange):
      * platform/graphics/ca/GraphicsLayerCA.h:
      * rendering/RenderLayerBacking.h: No longer need m_boundsConstrainedByClipping
      * rendering/RenderLayerBacking.cpp:
      (WebCore::RenderLayerBacking::RenderLayerBacking):
      (WebCore::RenderLayerBacking::updateCompositedBounds):
      (WebCore::RenderLayerBacking::updateGraphicsLayerGeometry): setSize takes
      care of repainting for us now, so we can remove all the conditional code.
      
      LayoutTests:
      
      Reviewed by Tim Horton.
      
      Test that dumps repaint rects on layers after visibility changes affect
      the layer hierarchy.
      
      * compositing/repaint/repaint-on-layer-grouping-change-expected.txt: Added.
      * compositing/repaint/repaint-on-layer-grouping-change.html: Added.
      * compositing/repaint/resize-repaint-expected.txt: Update result.
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@154470 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      bd93c753
    • simon.fraser@apple.com's avatar
      Repaint counters are sometimes not in the corner of the compositing layer · efa2c800
      simon.fraser@apple.com authored
      https://bugs.webkit.org/show_bug.cgi?id=120176
      
      Reviewed by Beth Dakin.
      
      Sometimes the repaint counters are not in the corner of the compositing layer;
      they are either inset, or partially or entirely outside the layer.
      
      Fix by making sure that we restore the CGContext before drawing
      the counter, since the WebCore code may have translated the CTM.
      
      The counter-painting code saves and restores the context itself,
      so this is safe.
      
      * platform/graphics/mac/WebLayer.mm:
      (drawLayerContents):
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@154469 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      efa2c800
    • timothy_horton@apple.com's avatar
      Unavailable plug-in indicator text is one pixel too low · 3e8b8d11
      timothy_horton@apple.com authored
      https://bugs.webkit.org/show_bug.cgi?id=120177
      <rdar://problem/14811951>
      
      Reviewed by Kevin Decker.
      
      Move the unavailable plug-in indicator text up one pixel.
      
      * rendering/RenderEmbeddedObject.cpp:
      (WebCore::RenderEmbeddedObject::paintReplaced):
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@154464 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      3e8b8d11
    • ch.dumez@sisa.samsung.com's avatar
      [SVG2] Merge SVGStyledElement and SVGElement · 7dd31bf9
      ch.dumez@sisa.samsung.com authored
      https://bugs.webkit.org/show_bug.cgi?id=107386
      
      Reviewed by Andreas Kling.
      
      Source/WebCore:
      
      Merge SVGStyledElement into SVGElement to simplify the SVG inheritance
      model and match the SVG2 specification:
      https://svgwg.org/svg2-draft/single-page.html#types-InterfaceSVGElement
      
      Test: svg/dom/svg2-inheritance.html
      
      * CMakeLists.txt:
      * DerivedSources.cpp:
      * DerivedSources.make:
      * DerivedSources.pri:
      * GNUmakefile.list.am:
      * Target.pri:
      * WebCore.order:
      * WebCore.vcxproj/WebCore.vcxproj:
      * WebCore.vcxproj/WebCore.vcxproj.filters:
      * WebCore.xcodeproj/project.pbxproj:
      * accessibility/AccessibilityNodeObject.cpp:
      (WebCore::AccessibilityNodeObject::alternativeText):
      (WebCore::AccessibilityNodeObject::accessibilityDescription):
      * css/SVGCSSStyleSelector.cpp:
      * rendering/style/SVGRenderStyle.cpp:
      * rendering/svg/RenderSVGContainer.cpp:
      (WebCore::RenderSVGContainer::RenderSVGContainer):
      * rendering/svg/RenderSVGContainer.h:
      * rendering/svg/RenderSVGHiddenContainer.cpp:
      (WebCore::RenderSVGHiddenContainer::RenderSVGHiddenContainer):
      * rendering/svg/RenderSVGHiddenContainer.h:
      * rendering/svg/RenderSVGModelObject.cpp:
      (WebCore::RenderSVGModelObject::RenderSVGModelObject):
      (WebCore::getElementCTM):
      * rendering/svg/RenderSVGModelObject.h:
      * rendering/svg/RenderSVGResourceClipper.cpp:
      (WebCore::RenderSVGResourceClipper::drawContentIntoMaskImage):
      (WebCore::RenderSVGResourceClipper::calculateClipContentRepaintRect):
      (WebCore::RenderSVGResourceClipper::hitTestClipContent):
      * rendering/svg/RenderSVGResourceContainer.cpp:
      (WebCore::RenderSVGResourceContainer::RenderSVGResourceContainer):
      * rendering/svg/RenderSVGResourceContainer.h:
      * rendering/svg/RenderSVGResourceFilter.cpp:
      * rendering/svg/RenderSVGResourceFilterPrimitive.h:
      * rendering/svg/RenderSVGResourceMarker.cpp:
      * rendering/svg/RenderSVGResourceMarker.h:
      * rendering/svg/RenderSVGResourceMasker.cpp:
      (WebCore::RenderSVGResourceMasker::drawContentIntoMaskImage):
      (WebCore::RenderSVGResourceMasker::calculateMaskContentRepaintRect):
      * rendering/svg/RenderSVGResourcePattern.cpp:
      (WebCore::RenderSVGResourcePattern::createTileImage):
      * rendering/svg/RenderSVGRoot.cpp:
      (WebCore::RenderSVGRoot::RenderSVGRoot):
      * rendering/svg/RenderSVGRoot.h:
      * rendering/svg/RenderSVGViewportContainer.cpp:
      (WebCore::RenderSVGViewportContainer::RenderSVGViewportContainer):
      * rendering/svg/RenderSVGViewportContainer.h:
      * rendering/svg/SVGRenderSupport.cpp:
      (WebCore::SVGRenderSupport::layoutChildren):
      * rendering/svg/SVGRenderTreeAsText.cpp:
      * rendering/svg/SVGResources.cpp:
      (WebCore::registerPendingResource):
      * rendering/svg/SVGResourcesCache.cpp:
      * svg/SVGAElement.cpp:
      (WebCore::SVGAElement::title):
      * svg/SVGAllInOne.cpp:
      * svg/SVGAltGlyphDefElement.h:
      * svg/SVGAltGlyphItemElement.h:
      * svg/SVGAnimateElement.cpp:
      * svg/SVGAnimatedType.cpp:
      (WebCore::SVGAnimatedType::valueAsString):
      (WebCore::SVGAnimatedType::setValueAsString):
      * svg/SVGAnimationElement.cpp:
      (WebCore::SVGAnimationElement::isTargetAttributeCSSProperty):
      (WebCore::SVGAnimationElement::computeCSSPropertyValue):
      (WebCore::SVGAnimationElement::adjustForInheritance):
      (WebCore::inheritsFromProperty):
      * svg/SVGComponentTransferFunctionElement.h:
      * svg/SVGCursorElement.h:
      * svg/SVGDescElement.cpp:
      (WebCore::SVGDescElement::SVGDescElement):
      * svg/SVGDescElement.h:
      * svg/SVGDescElement.idl:
      * svg/SVGElement.cpp:
      (WebCore::mapAttributeToCSSProperty):
      (WebCore::cssPropertyToTypeMap):
      (WebCore::SVGElement::SVGElement):
      (WebCore::SVGElement::~SVGElement):
      (WebCore::SVGElement::removedFrom):
      (WebCore::SVGElement::parseAttribute):
      (WebCore::SVGElement::animatedPropertyTypeForAttribute):
      (WebCore::collectInstancesForSVGElement):
      (WebCore::SVGElement::isAnimatableAttribute):
      (WebCore::SVGElement::title):
      (WebCore::SVGElement::rendererIsNeeded):
      (WebCore::SVGElement::cssPropertyIdForSVGAttributeName):
      (WebCore::SVGElement::isAnimatableCSSProperty):
      (WebCore::SVGElement::isPresentationAttribute):
      (WebCore::SVGElement::collectStyleForPresentationAttribute):
      (WebCore::SVGElement::isKnownAttribute):
      (WebCore::SVGElement::svgAttributeChanged):
      (WebCore::SVGElement::insertedInto):
      (WebCore::SVGElement::buildPendingResourcesIfNeeded):
      (WebCore::SVGElement::childrenChanged):
      (WebCore::SVGElement::getPresentationAttribute):
      (WebCore::SVGElement::instanceUpdatesBlocked):
      (WebCore::SVGElement::setInstanceUpdatesBlocked):
      (WebCore::SVGElement::localCoordinateSpaceTransform):
      (WebCore::SVGElement::updateRelativeLengthsInformation):
      (WebCore::SVGElement::isMouseFocusable):
      (WebCore::SVGElement::isKeyboardFocusable):
      * svg/SVGElement.h:
      (WebCore::SVGElement::supportsMarkers):
      (WebCore::SVGElement::hasRelativeLengths):
      (WebCore::SVGElement::needsPendingResourceHandling):
      (WebCore::SVGElement::selfHasRelativeLengths):
      (WebCore::SVGElement::updateRelativeLengthsInformation):
      * svg/SVGElement.idl:
      * svg/SVGElementInstance.cpp:
      (WebCore::SVGElementInstance::invalidateAllInstancesOfElement):
      (WebCore::SVGElementInstance::InstanceUpdateBlocker::InstanceUpdateBlocker):
      * svg/SVGElementInstance.h:
      * svg/SVGFEBlendElement.idl:
      * svg/SVGFEColorMatrixElement.idl:
      * svg/SVGFEComponentTransferElement.idl:
      * svg/SVGFECompositeElement.idl:
      * svg/SVGFEConvolveMatrixElement.idl:
      * svg/SVGFEDiffuseLightingElement.idl:
      * svg/SVGFEDisplacementMapElement.idl:
      * svg/SVGFEDropShadowElement.idl:
      * svg/SVGFEFloodElement.idl:
      * svg/SVGFEGaussianBlurElement.idl:
      * svg/SVGFEImageElement.idl:
      * svg/SVGFELightElement.h:
      * svg/SVGFEMergeElement.idl:
      * svg/SVGFEMergeNodeElement.h:
      * svg/SVGFEMorphologyElement.idl:
      * svg/SVGFEOffsetElement.idl:
      * svg/SVGFESpecularLightingElement.idl:
      * svg/SVGFETileElement.idl:
      * svg/SVGFETurbulenceElement.idl:
      * svg/SVGFilterElement.cpp:
      (WebCore::SVGFilterElement::SVGFilterElement):
      (WebCore::SVGFilterElement::parseAttribute):
      (WebCore::SVGFilterElement::svgAttributeChanged):
      (WebCore::SVGFilterElement::childrenChanged):
      * svg/SVGFilterElement.h:
      * svg/SVGFilterElement.idl:
      * svg/SVGFilterPrimitiveStandardAttributes.cpp:
      (WebCore::SVGFilterPrimitiveStandardAttributes::SVGFilterPrimitiveStandardAttributes):
      (WebCore::SVGFilterPrimitiveStandardAttributes::parseAttribute):
      (WebCore::SVGFilterPrimitiveStandardAttributes::svgAttributeChanged):
      (WebCore::SVGFilterPrimitiveStandardAttributes::childrenChanged):
      (WebCore::SVGFilterPrimitiveStandardAttributes::rendererIsNeeded):
      * svg/SVGFilterPrimitiveStandardAttributes.h:
      * svg/SVGFontElement.cpp:
      (WebCore::SVGFontElement::SVGFontElement):
      * svg/SVGFontElement.h:
      * svg/SVGFontFaceElement.cpp:
      * svg/SVGFontFaceElement.h:
      * svg/SVGFontFaceFormatElement.h:
      * svg/SVGFontFaceNameElement.h:
      * svg/SVGFontFaceSrcElement.h:
      * svg/SVGFontFaceUriElement.h:
      * svg/SVGGElement.cpp:
      (WebCore::SVGGElement::rendererIsNeeded):
      * svg/SVGGlyphElement.cpp:
      (WebCore::SVGGlyphElement::SVGGlyphElement):
      (WebCore::SVGGlyphElement::parseAttribute):
      (WebCore::SVGGlyphElement::insertedInto):
      (WebCore::SVGGlyphElement::removedFrom):
      * svg/SVGGlyphElement.h:
      * svg/SVGGlyphRefElement.cpp:
      (WebCore::SVGGlyphRefElement::SVGGlyphRefElement):
      (WebCore::SVGGlyphRefElement::parseAttribute):
      * svg/SVGGlyphRefElement.h:
      * svg/SVGGlyphRefElement.idl:
      * svg/SVGGradientElement.cpp:
      (WebCore::SVGGradientElement::SVGGradientElement):
      (WebCore::SVGGradientElement::parseAttribute):
      (WebCore::SVGGradientElement::svgAttributeChanged):
      (WebCore::SVGGradientElement::childrenChanged):
      * svg/SVGGradientElement.h:
      * svg/SVGGradientElement.idl:
      * svg/SVGGraphicsElement.cpp:
      (WebCore::SVGGraphicsElement::SVGGraphicsElement):
      (WebCore::SVGGraphicsElement::parseAttribute):
      (WebCore::SVGGraphicsElement::svgAttributeChanged):
      * svg/SVGGraphicsElement.h:
      * svg/SVGGraphicsElement.idl:
      * svg/SVGLocatable.cpp:
      (WebCore::SVGLocatable::computeCTM):
      * svg/SVGMPathElement.h:
      * svg/SVGMarkerElement.cpp:
      (WebCore::SVGMarkerElement::SVGMarkerElement):
      (WebCore::SVGMarkerElement::parseAttribute):
      (WebCore::SVGMarkerElement::svgAttributeChanged):
      (WebCore::SVGMarkerElement::childrenChanged):
      * svg/SVGMarkerElement.h:
      * svg/SVGMarkerElement.idl:
      * svg/SVGMaskElement.cpp:
      (WebCore::SVGMaskElement::SVGMaskElement):
      (WebCore::SVGMaskElement::parseAttribute):
      (WebCore::SVGMaskElement::svgAttributeChanged):
      (WebCore::SVGMaskElement::childrenChanged):
      * svg/SVGMaskElement.h:
      * svg/SVGMaskElement.idl:
      * svg/SVGMetadataElement.h:
      * svg/SVGMissingGlyphElement.cpp:
      (WebCore::SVGMissingGlyphElement::SVGMissingGlyphElement):
      * svg/SVGMissingGlyphElement.h:
      * svg/SVGMissingGlyphElement.idl:
      * svg/SVGPatternElement.cpp:
      (WebCore::SVGPatternElement::SVGPatternElement):
      (WebCore::SVGPatternElement::parseAttribute):
      (WebCore::SVGPatternElement::svgAttributeChanged):
      (WebCore::SVGPatternElement::childrenChanged):
      * svg/SVGPatternElement.h:
      * svg/SVGPatternElement.idl:
      * svg/SVGScriptElement.h:
      * svg/SVGStopElement.cpp:
      (WebCore::SVGStopElement::SVGStopElement):
      (WebCore::SVGStopElement::parseAttribute):
      (WebCore::SVGStopElement::svgAttributeChanged):
      * svg/SVGStopElement.h:
      * svg/SVGStopElement.idl:
      * svg/SVGStyleElement.h:
      * svg/SVGStyledElement.cpp: Removed.
      * svg/SVGStyledElement.h: Removed.
      * svg/SVGStyledElement.idl: Removed.
      * svg/SVGSymbolElement.cpp:
      (WebCore::SVGSymbolElement::SVGSymbolElement):
      (WebCore::SVGSymbolElement::parseAttribute):
      (WebCore::SVGSymbolElement::svgAttributeChanged):
      * svg/SVGSymbolElement.h:
      * svg/SVGSymbolElement.idl:
      * svg/SVGTRefElement.cpp:
      (WebCore::SVGTRefElement::insertedInto):
      (WebCore::SVGTRefElement::removedFrom):
      * svg/SVGTitleElement.cpp:
      (WebCore::SVGTitleElement::SVGTitleElement):
      (WebCore::SVGTitleElement::insertedInto):
      * svg/SVGTitleElement.h:
      * svg/SVGTitleElement.idl:
      * svg/SVGTransformable.cpp:
      * svg/SVGUseElement.cpp:
      (WebCore::SVGUseElement::selfHasRelativeLengths):
      * svg/SVGViewElement.cpp:
      (WebCore::SVGViewElement::SVGViewElement):
      (WebCore::SVGViewElement::parseAttribute):
      * svg/SVGViewElement.h:
      * svg/animation/SVGSMILElement.h:
      * svg/graphics/filters/SVGFEImage.cpp:
      (WebCore::FEImage::platformApplySoftware):
      
      LayoutTests:
      
      Add layout test to validate the SVG2 inheritance model.
      
      * svg/dom/svg2-inheritance-expected.txt: Added.
      * svg/dom/svg2-inheritance.html: Added.
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@154462 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      7dd31bf9
    • akling@apple.com's avatar
      FrameLoader::history() should return a reference. · 672cb851
      akling@apple.com authored
      <https://webkit.org/b/120163>
      
      Reviewed by Anders Carlsson.
      
      Rehued by Anders Carlsson.
      
      FrameLoader::m_history is never null, so make history() return a reference.
      Also made HistoryController::m_frame a reference, since HistoryController's
      lifetime is tied to FrameLoader, which is tied to the Frame.
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@154458 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      672cb851
    • simon.fraser@apple.com's avatar
      Reloading this video test shows garbage briefly · ed839845
      simon.fraser@apple.com authored
      https://bugs.webkit.org/show_bug.cgi?id=119377
      
      Reviewed by Anders Carlson.
      
      RenderVideo should not claim that it's foreground is opaque
      unless it has a video frame to display.
      
      * rendering/RenderVideo.cpp:
      (WebCore::RenderVideo::foregroundIsKnownToBeOpaqueInRect):
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@154455 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      ed839845
    • akling@apple.com's avatar
      Remove accidental cruft from r154449. · 7817de29
      akling@apple.com authored
      * rendering/RenderWidget.cpp:
      (WebCore::RenderWidget::destroy):
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@154452 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      7817de29
    • akling@apple.com's avatar
      FrameLoader: frame() and client() should return references. · 7f50aae5
      akling@apple.com authored
      <https://webkit.org/b/120158>
      
      Reviewed by Anders Carlsson.
      
      These two are never null so change them to return references.
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@154449 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      7f50aae5
    • abucur@adobe.com's avatar
      RenderNamedFlowThread should not create NodeRenderingContext objects · 948ea290
      abucur@adobe.com authored
      https://bugs.webkit.org/show_bug.cgi?id=119923
      
      Reviewed by Antti Koivisto.
      
      Port of https://chromium.googlesource.com/chromium/blink/+/949d7d7e7b8685454742a55cf0ca912bb9a7b177.
      Original patch by Elliott Sprehn.
      
      RenderNamedFlowThread should not create NodeRenderingContext objects
      
      RenderNamedFlowThread is using NodeRenderingContext to get the original
      parent renderer, but should just be using NodeRenderingTraversal::parent
      instead (which is what NodeRenderingContext does internally anyway).
      
      Tests: No change in functionality. No new tests.
      
      * rendering/RenderNamedFlowThread.cpp:
      (WebCore::RenderNamedFlowThread::isChildAllowed):
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@154447 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      948ea290
    • ch.dumez@sisa.samsung.com's avatar
      Introduce a SVGUnknownElement class for unknown SVG elements · eebecacc
      ch.dumez@sisa.samsung.com authored
      https://bugs.webkit.org/show_bug.cgi?id=120155
      
      Reviewed by Andreas Kling.
      
      Introduce a SVGUnknownElement class and have it override rendererIsNeeded() to return false.
      We now use SVGUnknownElement type (instead of SVGElement) for unknown SVG elements:
      - Unknown Elements in SVG namespace
      - Registered custom tag elements in SVG namespace:
        http://www.w3.org/TR/2013/WD-custom-elements-20130514/#registering-custom-elements
      
      As a consequence, SVGElement::rendererIsNeeded() is not longer required to return false and
      it will be able to behave as SVGStyledElement::rendererIsNeeded() once we merge
      SVGStyledElement into SVGElement.
      
      This is a pre-requirement to merging SVGStyledElement into SVGElement.
      
      No new tests, no behavior change.
      
      * GNUmakefile.list.am:
      * Target.pri:
      * WebCore.vcxproj/WebCore.vcxproj:
      * WebCore.vcxproj/WebCore.vcxproj.filters:
      * dom/CustomElementConstructor.cpp:
      (WebCore::CustomElementConstructor::createElementInternal):
      * dom/make_names.pl:
      (defaultParametersHash):
      (printJSElementIncludes):
      (printWrapperFunctions):
      (printWrapperFactoryCppFile):
      * svg/SVGElement.cpp:
      * svg/SVGElement.h:
      * svg/SVGUnknownElement.h: Added.
      (WebCore::SVGUnknownElement::create):
      (WebCore::SVGUnknownElement::SVGUnknownElement):
      * svg/svgtags.in:
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@154443 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      eebecacc
    • rwlbuis@webkit.org's avatar
      REGRESSION: Assertion failure !collection->hasExactlyOneItem() in WebCore::namedItemGetter · f02f5da6
      rwlbuis@webkit.org authored
      https://bugs.webkit.org/show_bug.cgi?id=118056
      
      Reviewed by Ryosuke Niwa.
      
      Source/WebCore:
      
      The assert is hit in Debug mode because the DocumentOrderedMap in HTMLDocument::m_windowNamedItem
      includes matched SVG elements, but the WindowNameCollection used to collect the elements does not.
      This means the HTMLCollection stripped of SVG elements could end up hitting the empty or single item
      assertion, which the testcase verifies.
      To fix this change WindowNameCollection to include both SVG and HTML elements so it matches DocumentOrderedMap.
      
      Tests: svg/custom/document-all-includes-svg.html
             svg/custom/window-named-item-lookup.html
      
      * html/HTMLCollection.cpp:
      (WebCore::isMatchingElement):
      (WebCore::HTMLCollection::updateNameCache):
      
      LayoutTests:
      
      Add test to verify that SVG and HTML elements with id's are both found when using document.all or named properties.
      
      * svg/custom/document-all-includes-svg-expected.txt: Added.
      * svg/custom/document-all-includes-svg.html: Added.
      * svg/custom/window-named-item-lookup-expected.txt: Added.
      * svg/custom/window-named-item-lookup.html: Added.
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@154441 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      f02f5da6
    • gyuyoung.kim@samsung.com's avatar
      Introduce toSVGRadialGradientElement(), and use it · da36125d
      gyuyoung.kim@samsung.com authored
      https://bugs.webkit.org/show_bug.cgi?id=120153
      
      Reviewed by Andreas Kling.
      
      As a step to clean-up static_cast<SVGXXX>, toSVGRadialGradientElement() is added to clean-up
      static_cast<SVGRadialGradientElement*>.
      
      * rendering/svg/RenderSVGResourceRadialGradient.cpp:
      (WebCore::RenderSVGResourceRadialGradient::collectGradientAttributes):
      * rendering/svg/SVGRenderTreeAsText.cpp:
      (WebCore::writeSVGResourceContainer):
      * svg/SVGRadialGradientElement.cpp:
      (WebCore::SVGRadialGradientElement::collectGradientAttributes):
      * svg/SVGRadialGradientElement.h:
      (WebCore::toSVGRadialGradientElement):
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@154440 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      da36125d
    • reni@webkit.org's avatar
      ASSERTION FAILED: extractedStyle in WebCore::ApplyStyleCommand::removeInlineStyleFromElement · 82857b28
      reni@webkit.org authored
      https://bugs.webkit.org/show_bug.cgi?id=119672
      
      Reviewed by Darin Adler.
      
      Source/WebCore:
      
      The last extractedStyle parameter of removeInlineStyleFromElement() is not mandatory and it's set
      to default 0. This way we have to check its existence before the usage.
      
      Test: editing/execCommand/extracted_style_assert.html
      
      * editing/ApplyStyleCommand.cpp:
      (WebCore::ApplyStyleCommand::removeInlineStyleFromElement):
      
      LayoutTests:
      
      Test with NULL extractedStyle.
      
      * editing/execCommand/extracted_style_assert-expected.txt: Added.
      * editing/execCommand/extracted_style_assert.html: Added.
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@154439 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      82857b28
  3. 21 Aug, 2013 14 commits
    • commit-queue@webkit.org's avatar
      Unreviewed, rolling out r154416. · 4ef33f9a
      commit-queue@webkit.org authored
      http://trac.webkit.org/changeset/154416
      https://bugs.webkit.org/show_bug.cgi?id=120147
      
      Broke Windows builds (Requested by rniwa on #webkit).
      
      Source/JavaScriptCore:
      
      * JavaScriptCore.vcxproj/JavaScriptCoreGenerated.make:
      * JavaScriptCore.vcxproj/LLInt/LLIntAssembly/LLIntAssembly.make:
      * JavaScriptCore.vcxproj/LLInt/LLIntAssembly/build-LLIntAssembly.sh:
      * JavaScriptCore.vcxproj/LLInt/LLIntDesiredOffsets/LLIntDesiredOffsets.make:
      * JavaScriptCore.vcxproj/LLInt/LLIntDesiredOffsets/build-LLIntDesiredOffsets.sh:
      * JavaScriptCore.vcxproj/build-generated-files.sh:
      
      Source/WebCore:
      
      * WebCore.vcxproj/WebCoreGenerated.make:
      * WebCore.vcxproj/WebCoreGeneratedWinCairo.make:
      * WebCore.vcxproj/WebCoreGeneratedWinCairoCommon.props:
      * WebCore.vcxproj/build-generated-files.sh:
      * WebCore.vcxproj/copyForwardingHeaders.cmd:
      * WebCore.vcxproj/copyWebCoreResourceFiles.cmd:
      
      Source/WebKit:
      
      * WebKit.vcxproj/WebKit/WebKitPostBuild.cmd:
      * WebKit.vcxproj/WebKitExportGenerator/WebKitExportGeneratorBuildCmd.cmd:
      * WebKit.vcxproj/WebKitExportGenerator/WebKitExportGeneratorPostBuild.cmd:
      * WebKit.vcxproj/WebKitExportGenerator/WebKitExportGeneratorPreBuild.cmd:
      
      Source/WTF:
      
      * WTF.vcxproj/WTFGenerated.make:
      * WTF.vcxproj/build-generated-files.sh:
      
      WebKitLibraries:
      
      * win/tools/vsprops/common.props:
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@154436 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      4ef33f9a
    • ryuan.choi@samsung.com's avatar
      [EFL] Unreviewed build fix after r154430. · 1403dc33
      ryuan.choi@samsung.com authored
      * rendering/style/StyleRareNonInheritedData.cpp:
      (WebCore::StyleRareNonInheritedData::hasFilters): Added CSS_FILTERS guard.
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@154435 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      1403dc33
    • simon.fraser@apple.com's avatar
      Setting -webkit-filter: in :active selector causes failure to redraw · 3d54f8b4
      simon.fraser@apple.com authored
      https://bugs.webkit.org/show_bug.cgi?id=120135
      
      Source/WebCore:
      
      Reviewed by Jer Noble.
      
      When removing a filter on an inline child of a compositing layer,
      the inline loses its RenderLayer and compositing layer, but we fail to
      repaint the compositing layer that the inline is now painting into.
      
      This worked correctly for opacity, because opacity toggles cause
      layouts (which then paint the correct layer), so do the same for filters.
      
      Test: css3/filters/remove-filter-repaint.html
      
      * rendering/style/RenderStyle.cpp:
      (WebCore::RenderStyle::changeRequiresLayout): Return true if we toggled
      between having filters and not. Drive-by cleanup, making use of new convenience
      function for hasOpacity().
      * rendering/style/StyleRareNonInheritedData.cpp:
      (WebCore::StyleRareNonInheritedData::hasFilters): Returns true if we have any
      filters.
      * rendering/style/StyleRareNonInheritedData.h:
      (WebCore::StyleRareNonInheritedData::hasOpacity): Convenience function that
      returns true if opacity is < 1.
      
      LayoutTests:
      
      Reviewed by Jer Noble.
      
      Ref test for removing a filter on an inline.
      
      * css3/filters/remove-filter-repaint-expected.html: Added.
      * css3/filters/remove-filter-repaint.html: Added.
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@154430 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      3d54f8b4
    • barraclough@apple.com's avatar
      https://bugs.webkit.org/show_bug.cgi?id=120139 · 61ff98cd
      barraclough@apple.com authored
      PropertyDescriptor argument to define methods should be const
      
      Rubber stamped by Sam Weinig.
      
      This should never be modified, and this way we can use rvalues.
      
      Source/JavaScriptCore: 
      
      * debugger/DebuggerActivation.cpp:
      (JSC::DebuggerActivation::defineOwnProperty):
      * debugger/DebuggerActivation.h:
      * runtime/Arguments.cpp:
      (JSC::Arguments::defineOwnProperty):
      * runtime/Arguments.h:
      * runtime/ClassInfo.h:
      * runtime/JSArray.cpp:
      (JSC::JSArray::defineOwnProperty):
      * runtime/JSArray.h:
      * runtime/JSArrayBuffer.cpp:
      (JSC::JSArrayBuffer::defineOwnProperty):
      * runtime/JSArrayBuffer.h:
      * runtime/JSArrayBufferView.cpp:
      (JSC::JSArrayBufferView::defineOwnProperty):
      * runtime/JSArrayBufferView.h:
      * runtime/JSCell.cpp:
      (JSC::JSCell::defineOwnProperty):
      * runtime/JSCell.h:
      * runtime/JSFunction.cpp:
      (JSC::JSFunction::defineOwnProperty):
      * runtime/JSFunction.h:
      * runtime/JSGenericTypedArrayView.h:
      * runtime/JSGenericTypedArrayViewInlines.h:
      (JSC::::defineOwnProperty):
      * runtime/JSGlobalObject.cpp:
      (JSC::JSGlobalObject::defineOwnProperty):
      * runtime/JSGlobalObject.h:
      * runtime/JSObject.cpp:
      (JSC::JSObject::putIndexedDescriptor):
      (JSC::JSObject::defineOwnIndexedProperty):
      (JSC::putDescriptor):
      (JSC::JSObject::defineOwnNonIndexProperty):
      (JSC::JSObject::defineOwnProperty):
      * runtime/JSObject.h:
      * runtime/JSProxy.cpp:
      (JSC::JSProxy::defineOwnProperty):
      * runtime/JSProxy.h:
      * runtime/RegExpMatchesArray.h:
      (JSC::RegExpMatchesArray::defineOwnProperty):
      * runtime/RegExpObject.cpp:
      (JSC::RegExpObject::defineOwnProperty):
      * runtime/RegExpObject.h:
      * runtime/StringObject.cpp:
      (JSC::StringObject::defineOwnProperty):
      * runtime/StringObject.h:
          - make PropertyDescriptor const
      
      Source/WebCore: 
      
      * bindings/js/JSDOMWindowCustom.cpp:
      (WebCore::JSDOMWindow::defineOwnProperty):
      * bindings/js/JSLocationCustom.cpp:
      (WebCore::JSLocation::defineOwnProperty):
      (WebCore::JSLocationPrototype::defineOwnProperty):
      * bindings/scripts/CodeGeneratorJS.pm:
      (GenerateHeader):
          - make PropertyDescriptor const
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@154422 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      61ff98cd
    • zhajiang@rim.com's avatar
      <https://webkit.org/b/120123> [BlackBerry] Incorrect origin of indexOfTile in... · 99b26bb2
      zhajiang@rim.com authored
      <https://webkit.org/b/120123> [BlackBerry] Incorrect origin of indexOfTile in LayerTiler can cause unnecessary texture jobs and waste memory
      
      Patch by Jacky Jiang <zhajiang@blackberry.com> on 2013-08-21
      Reviewed by Yong Li.
      Internally reviewed by Arvid Nilsson.
      
      JIRA 481356
      The origin of indexOfTile(origin) is incorrect in these two places. For
      example, if the maxXMaxYCorner of the rect is (768, 768), there can be
      three other redundant indexOfTile (0, 1), (1, 0), (1, 1) which can cause
      unnecessary texture jobs and waste memory.
      The origin should be the top left of the bottom right pixel of a rect.
      
      * platform/graphics/blackberry/LayerTiler.cpp:
      (WebCore::LayerTiler::updateTextureContentsIfNeeded):
      (WebCore::LayerTiler::processTextureJob):
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@154418 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      99b26bb2
    • simon.fraser@apple.com's avatar
      <https://webkit.org/b/116901> ASSERTION FAILED: !m_visibleDescendantStatusDirty on twitter · 115580e1
      simon.fraser@apple.com authored
      Reviewed by Beth Dakin.
      
      In order to make decisions about compositing, the m_hasVisibleDescendant bit on RenderLayers
      needs to be up-to-date when RenderLayerCompositor::computeCompositingRequirements is recursing
      over the RenderLayer tree.
      
      However, was possible for computeCompositingRequirements() to hit a layer whose m_visibleDescendantStatusDirty
      bit was set; we only clear this bit from collectLayers() (when updating z-order lists), and from styleChanged()
      which requires that style changed on the layer itself.
      
      Fix by always calling updateDescendantDependentFlags() from computeCompositingRequirements().
      
      Wasn't able to easily get a reduced testcase.
      
      * rendering/RenderLayerCompositor.cpp:
      (WebCore::RenderLayerCompositor::computeCompositingRequirements):
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@154417 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      115580e1
    • achristensen@apple.com's avatar
      <https://webkit.org/b/120137> Separating Win32 and Win64 builds. · 23db3941
      achristensen@apple.com authored
      Reviewed by Brent Fulgham.
      
      Source/JavaScriptCore: 
      
      * JavaScriptCore.vcxproj/JavaScriptCoreGenerated.make:
      * JavaScriptCore.vcxproj/LLInt/LLIntAssembly/LLIntAssembly.make:
      * JavaScriptCore.vcxproj/LLInt/LLIntDesiredOffsets/LLIntDesiredOffsets.make:
      Pass PlatformArchitecture as a command line parameter to bash scripts.
      * JavaScriptCore.vcxproj/LLInt/LLIntAssembly/build-LLIntAssembly.sh:
      * JavaScriptCore.vcxproj/LLInt/LLIntDesiredOffsets/build-LLIntDesiredOffsets.sh:
      * JavaScriptCore.vcxproj/build-generated-files.sh:
      Use PlatformArchitecture from command line to determine which object directory to use (obj32 or obj64).
      
      Source/WebCore: 
      
      * WebCore.vcxproj/WebCoreGenerated.make:
      * WebCore.vcxproj/WebCoreGeneratedWinCairo.make:
      Pass PlatformArchitecture as a command line parameter to bash scripts
      and use PlatformArchitecture to determine which directory to delete
      while cleaning (obj32 or obj64).
      * WebCore.vcxproj/WebCoreGeneratedWinCairoCommon.props:
      Export PlatformArchitecture to be used by make and cmd scripts.
      * WebCore.vcxproj/build-generated-files.sh:
      Use PlatformArchitecture from command line to determine which object directory to use (obj32 or obj64).
      * WebCore.vcxproj/copyForwardingHeaders.cmd:
      * WebCore.vcxproj/copyWebCoreResourceFiles.cmd:
      Use PlatformArchitecture to determine which directory to copy to (obj32 or obj64).
      
      Source/WebKit: 
      
      * WebKit.vcxproj/WebKit/WebKitPostBuild.cmd:
      * WebKit.vcxproj/WebKitExportGenerator/WebKitExportGeneratorBuildCmd.cmd:
      * WebKit.vcxproj/WebKitExportGenerator/WebKitExportGeneratorPostBuild.cmd:
      * WebKit.vcxproj/WebKitExportGenerator/WebKitExportGeneratorPreBuild.cmd:
      Use PlatformArchitecture to determine correct object directory (obj32 or obj64).
      
      Source/WTF: 
      
      * WTF.vcxproj/WTFGenerated.make:
      Pass PlatformArchitecture as a command line parameter to bash scripts.
      * WTF.vcxproj/build-generated-files.sh:
      Use PlatformArchitecture from command line to determine which object directory to use (obj32 or obj64).
      
      WebKitLibraries: 
      
      * win/tools/vsprops/common.props:
      Export PlatformArchitecture to be used by make and cmd scripts.
      Use PlatformArchitecture to determine correct build directory
      (lib32/bin32/obj32 or lib64/bin64/obj64).
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@154416 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      23db3941
    • timothy_horton@apple.com's avatar
      revalidateTiles and ensureTilesForRect can share a lot of code · c34a712b
      timothy_horton@apple.com authored
      https://bugs.webkit.org/show_bug.cgi?id=119282
      
      Missed the review comments, whoops.
      
      * platform/graphics/ca/mac/TileController.h:
      * platform/graphics/ca/mac/TileController.mm:
      (WebCore::TileController::prepopulateRect):
      (WebCore::TileController::revalidateTiles):
      (WebCore::TileController::ensureTilesForRect):
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@154415 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      c34a712b
    • akling@apple.com's avatar
      <https://webkit.org/b/120115> SVG elements always have custom style resolve callbacks. · 98ebb807
      akling@apple.com authored
      Reviewed by Antti Koivisto.
      
      Simplify SVGElement construction by making them opt in to custom style resolve callbacks
      by default, and removing the ability to pass a custom ConstructionType to some subclass
      constructors.
      
      * dom/Node.h:
      
          Add HasCustomStyleResolveCallbacksFlag to the CreateSVGElement mask.
      
      * svg/SVGElement.cpp:
      (WebCore::SVGElement::SVGElement):
      * svg/SVGElement.h:
      * svg/SVGGElement.cpp:
      (WebCore::SVGGElement::SVGGElement):
      * svg/SVGGElement.h:
      * svg/SVGGraphicsElement.cpp:
      (WebCore::SVGGraphicsElement::SVGGraphicsElement):
      * svg/SVGGraphicsElement.h:
      * svg/SVGImageElement.cpp:
      (WebCore::SVGImageElement::SVGImageElement):
      * svg/SVGStyledElement.cpp:
      (WebCore::SVGStyledElement::SVGStyledElement):
      * svg/SVGStyledElement.h:
      
          Remove calls to setHasCustomStyleResolveCallbacks() in SVGElement and subclasses.
          Also remove unnecessary ConstructionType argument from subclasses since nobody
          overrides it and everyone just uses CreateSVGElement.
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@154414 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      98ebb807
    • timothy_horton@apple.com's avatar
      revalidateTiles and ensureTilesForRect can share a lot of code · 30200348
      timothy_horton@apple.com authored
      https://bugs.webkit.org/show_bug.cgi?id=119282
      
      Reviewed by Simon Fraser.
      
      No new tests, just a refactoring.
      
      The bodies of ensureTilesForRect and revalidateTiles are nearly equivalent.
      
      * platform/graphics/ca/mac/TileController.h:
      Add an enum, NewTileType, to note whether the tiles created by ensureTilesForRect will
      be primary coverage tiles or secondary out-of-view tiles.
      
      * platform/graphics/ca/mac/TileController.mm:
      (WebCore::TileController::prepopulateRect):
      Move the code to see if we already have the requisite tiles in the
      primary coverage rect, as well as our call to updateTileCoverageMap,
      out into prepopulateRect, to generalize ensureTilesForRect.
      
      (WebCore::TileController::revalidateTiles):
      Make use of ensureTilesForRect. The platformCALayerDidCreateTiles call will happen there, now.
      
      (WebCore::TileController::ensureTilesForRect):
      Make ensureTilesForRect return the rect that it created tiles for, and only put
      tiles in a cohort if we're creating secondary tiles.
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@154413 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      30200348
    • timothy_horton@apple.com's avatar
      isReplacementObscured is wrong when the indicator is clipped by an iframe · 2d405bad
      timothy_horton@apple.com authored
      https://bugs.webkit.org/show_bug.cgi?id=120031
      <rdar://problem/14606819>
      
      Reviewed by Simon Fraser.
      
      Hit-test for plugin obscurity in the root document. To do this, we also need
      to convert the indicator rectangle into root view coordinates before
      hit testing its edges.
      
      This resolves the case where an iframe which clips its content was reporting
      the indicator as not obscured, despite the fact that it was obscured from the
      point of view of the user.
      
      Updated test plugins/unavailable-plugin-indicator-obscurity.html
      
      * rendering/RenderEmbeddedObject.cpp:
      (WebCore::RenderEmbeddedObject::isReplacementObscured):
      
      Update the unavailable plugin indicator test to also ensure that plugins are
      correctly known to be obscured when contained within and clipped by an <iframe>.
      
      * plugins/unavailable-plugin-indicator-obscurity-expected.txt:
      * plugins/unavailable-plugin-indicator-obscurity.html:
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@154412 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      2d405bad
    • akling@apple.com's avatar
      <https://webkit.org/b/120132> Frame::navigationScheduler() should return a reference. · 9ce995f2
      akling@apple.com authored
      Reviewed by Anders Carlzon.
      
      Frame::m_navigationScheduler is an inline member, not a pointer.
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@154409 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      9ce995f2
    • timothy_horton@apple.com's avatar
      REGRESSION(r154399): broke Mac ML debug WK1 tests > 50 crashes (Requested by thorton on #webkit). · eefba76d
      timothy_horton@apple.com authored
      https://bugs.webkit.org/show_bug.cgi?id=120129
      
      Rolling out http://trac.webkit.org/changeset/154399.
      
      * rendering/RenderBlock.cpp:
      * rendering/RenderBlock.h:
      * rendering/RenderBlockLineLayout.cpp:
      (WebCore::RenderBlock::LineBreaker::skipLeadingWhitespace):
      * rendering/RenderBox.h:
      
      * fast/block/margin-collapse/self-collapsing-block-with-float-descendant-expected.html: Removed.
      * fast/block/margin-collapse/self-collapsing-block-with-float-descendant.html: Removed.
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@154404 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      eefba76d
    • akling@apple.com's avatar
      <https://webkit.org/b/120118> Frame::animation() should return a reference. · 7c2be783
      akling@apple.com authored
      Reviewed by Anders Carlsson.
      
      Frame::m_animationController is never null.
      Also changed RenderObject::animation() to return a reference since it's just a wrapper
      around RenderObject::frame()->animation() with no null checking of frame().
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@154401 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      7c2be783