Changeset 69994 in webkit


Ignore:
Timestamp:
Oct 18, 2010 2:42:37 PM (13 years ago)
Author:
rniwa@webkit.org
Message:

2010-10-18 Ryosuke Niwa <rniwa@webkit.org>

Reviewed by Adam Barth.

elementCannotHaveEndTag should be a member function of MarkupAccumulator
https://bugs.webkit.org/show_bug.cgi?id=47846

Moved elementCannotHaveEndTag into MarkupAccumulator.

No new tests are added since this is a cleanup.

  • editing/MarkupAccumulator.cpp: (WebCore::MarkupAccumulator::elementCannotHaveEndTag): Added.
  • editing/MarkupAccumulator.h: Added MarkupAccumulator::elementCannotHaveEndTag.
  • editing/markup.cpp: Removed elementCannotHaveEndTag.
  • editing/markup.h: Removed elementCannotHaveEndTag.
Location:
trunk/WebCore
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • trunk/WebCore/ChangeLog

    r69990 r69994  
     12010-10-18  Ryosuke Niwa  <rniwa@webkit.org>
     2
     3        Reviewed by Adam Barth.
     4
     5        elementCannotHaveEndTag should be a member function of MarkupAccumulator
     6        https://bugs.webkit.org/show_bug.cgi?id=47846
     7
     8        Moved elementCannotHaveEndTag into MarkupAccumulator.
     9
     10        No new tests are added since this is a cleanup.
     11
     12        * editing/MarkupAccumulator.cpp:
     13        (WebCore::MarkupAccumulator::elementCannotHaveEndTag): Added.
     14        * editing/MarkupAccumulator.h: Added MarkupAccumulator::elementCannotHaveEndTag.
     15        * editing/markup.cpp: Removed elementCannotHaveEndTag.
     16        * editing/markup.h: Removed elementCannotHaveEndTag.
     17
    1182010-10-18  Johnny Ding  <jnd@chromium.org>
    219
  • trunk/WebCore/editing/MarkupAccumulator.cpp

    r69909 r69994  
    440440}
    441441
     442bool MarkupAccumulator::elementCannotHaveEndTag(const Node* node)
     443{
     444    if (!node->isHTMLElement())
     445        return false;
     446   
     447    // FIXME: ieForbidsInsertHTML may not be the right function to call here
     448    // ieForbidsInsertHTML is used to disallow setting innerHTML/outerHTML
     449    // or createContextualFragment.  It does not necessarily align with
     450    // which elements should be serialized w/o end tags.
     451    return static_cast<const HTMLElement*>(node)->ieForbidsInsertHTML();
     452}
     453
    442454void MarkupAccumulator::appendEndMarkup(Vector<UChar>& result, const Node* node)
    443455{
  • trunk/WebCore/editing/MarkupAccumulator.h

    r69909 r69994  
    9797    void appendStartMarkup(Vector<UChar>& result, const Node*, Namespaces*);
    9898    bool shouldSelfClose(const Node*);
     99    bool elementCannotHaveEndTag(const Node* node);
    99100    void appendEndMarkup(Vector<UChar>& result, const Node*);
    100101
  • trunk/WebCore/editing/markup.cpp

    r69909 r69994  
    9494};
    9595
    96 bool elementCannotHaveEndTag(const Node* node)
    97 {
    98     if (!node->isHTMLElement())
    99         return false;
    100 
    101     // FIXME: ieForbidsInsertHTML may not be the right function to call here
    102     // ieForbidsInsertHTML is used to disallow setting innerHTML/outerHTML
    103     // or createContextualFragment.  It does not necessarily align with
    104     // which elements should be serialized w/o end tags.
    105     return static_cast<const HTMLElement*>(node)->ieForbidsInsertHTML();
    106 }
    107 
    10896static void completeURLs(Node* node, const String& baseURL)
    10997{
  • trunk/WebCore/editing/markup.h

    r69880 r69994  
    5757
    5858    String urlToMarkup(const KURL&, const String& title);
    59 
    60     // FIXME: Should this be better encapulated somewhere?
    61     bool elementCannotHaveEndTag(const Node*);
    6259}
    6360
Note: See TracChangeset for help on using the changeset viewer.