Changeset 207194 in webkit


Ignore:
Timestamp:
Oct 12, 2016 1:40:43 AM (7 years ago)
Author:
matthew_hanson@apple.com
Message:

Merge r203383. rdar://problem/28216264

Location:
branches/safari-602-branch
Files:
4 added
5 edited

Legend:

Unmodified
Added
Removed
  • branches/safari-602-branch/LayoutTests/ChangeLog

    r206728 r207194  
     12016-10-11  Matthew Hanson  <matthew_hanson@apple.com>
     2
     3        Merge r203383. rdar://problem/28216264
     4
     5    2016-07-18  Brent Fulgham  <bfulgham@apple.com>
     6
     7            Don't associate form-associated elements with forms in other trees.
     8            https://bugs.webkit.org/show_bug.cgi?id=119451
     9            <rdar://problem/27382946>
     10
     11            Change is based on the Blink change (patch by <adamk@chromium.org>):
     12            <https://chromium.googlesource.com/chromium/blink/+/0b33128be67e7845d495d5219614c02ccfe7a414>
     13
     14            Reviewed by Chris Dumez.
     15
     16            * fast/forms/image-disconnected-during-parse-expected.txt: Added.
     17            * fast/forms/image-disconnected-during-parse.html: Added.
     18            * fast/forms/input-disconnected-during-parse-expected.txt: Added.
     19            * fast/forms/input-disconnected-during-parse.html: Added.
     20
    1212016-10-02  Babak Shafiei  <bshafiei@apple.com>
    222
  • branches/safari-602-branch/Source/WebCore/ChangeLog

    r206728 r207194  
     12016-10-11  Matthew Hanson  <matthew_hanson@apple.com>
     2
     3        Merge r203383. rdar://problem/28216264
     4
     5    2016-07-18  Brent Fulgham  <bfulgham@apple.com>
     6
     7            Don't associate form-associated elements with forms in other trees.
     8            https://bugs.webkit.org/show_bug.cgi?id=119451
     9            <rdar://problem/27382946>
     10
     11            Change is based on the Blink change (patch by <adamk@chromium.org>):
     12            <https://chromium.googlesource.com/chromium/blink/+/0b33128be67e7845d495d5219614c02ccfe7a414>
     13
     14            Reviewed by Chris Dumez.
     15
     16            Prevent elements from being associated with forms that are not part of the same home subtree.
     17            This brings us in line with the WhatWG HTML specification as of September, 2013.
     18
     19            Tests: fast/forms/image-disconnected-during-parse.html
     20                   fast/forms/input-disconnected-during-parse.html
     21
     22            * dom/Element.h:
     23            (WebCore::Node::rootElement): Added.
     24            * html/FormAssociatedElement.cpp:
     25            (WebCore::FormAssociatedElement::insertedInto): If the element is associated with a form that
     26            is not part of the same tree, remove the association.
     27            * html/HTMLImageElement.cpp:
     28            (WebCore::HTMLImageElement::insertedInto): Ditto.
     29
    1302016-10-02  Babak Shafiei  <bshafiei@apple.com>
    231
  • branches/safari-602-branch/Source/WebCore/dom/Element.h

    r203337 r207194  
    44 *           (C) 2001 Peter Kelly (pmk@post.com)
    55 *           (C) 2001 Dirk Mueller (mueller@kde.org)
    6  * Copyright (C) 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2013, 2014, 2016 Apple Inc. All rights reserved.
     6 * Copyright (C) 2003-2016 Apple Inc. All rights reserved.
    77 *
    88 * This library is free software; you can redistribute it and/or
     
    148148    Element* bindingsOffsetParent();
    149149
     150    const Element* rootElement() const;
     151
    150152    Element* offsetParent();
    151153    double clientLeft();
     
    664666}
    665667
     668inline const Element* Element::rootElement() const
     669{
     670    if (inDocument())
     671        return document().documentElement();
     672
     673    const Element* highest = this;
     674    while (highest->parentElement())
     675        highest = highest->parentElement();
     676    return highest;
     677}
     678
    666679inline bool Element::hasAttributeWithoutSynchronization(const QualifiedName& name) const
    667680{
  • branches/safari-602-branch/Source/WebCore/html/FormAssociatedElement.cpp

    r203337 r207194  
    33 *           (C) 1999 Antti Koivisto (koivisto@kde.org)
    44 *           (C) 2001 Dirk Mueller (mueller@kde.org)
    5  * Copyright (C) 2004, 2005, 2006, 2007 Apple Inc. All rights reserved.
     5 * Copyright (C) 2004-2016 Apple Inc. All rights reserved.
    66 *           (C) 2006 Alexey Proskuryakov (ap@nypop.com)
    77 *
     
    7575        m_formSetByParser = nullptr;
    7676    }
     77
     78    if (m_form && element.rootElement() != m_form->rootElement())
     79        setForm(nullptr);
    7780
    7881    if (!insertionPoint.inDocument())
  • branches/safari-602-branch/Source/WebCore/html/HTMLImageElement.cpp

    r203337 r207194  
    3939#include "MediaList.h"
    4040#include "MediaQueryEvaluator.h"
     41#include "NodeTraversal.h"
    4142#include "Page.h"
    4243#include "RenderImage.h"
     
    308309    }
    309310
     311    if (m_form && rootElement() != m_form->rootElement()) {
     312        m_form->removeImgElement(this);
     313        m_form = nullptr;
     314    }
     315
    310316    if (!m_form) {
    311317        m_form = HTMLFormElement::findClosestFormAncestor(*this);
Note: See TracChangeset for help on using the changeset viewer.