parser/html/nsHtml5UTF16Buffer.cpp

changeset 0
6474c204b198
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/parser/html/nsHtml5UTF16Buffer.cpp	Wed Dec 31 06:09:35 2014 +0100
     1.3 @@ -0,0 +1,113 @@
     1.4 +/*
     1.5 + * Copyright (c) 2008-2010 Mozilla Foundation
     1.6 + *
     1.7 + * Permission is hereby granted, free of charge, to any person obtaining a 
     1.8 + * copy of this software and associated documentation files (the "Software"), 
     1.9 + * to deal in the Software without restriction, including without limitation 
    1.10 + * the rights to use, copy, modify, merge, publish, distribute, sublicense, 
    1.11 + * and/or sell copies of the Software, and to permit persons to whom the 
    1.12 + * Software is furnished to do so, subject to the following conditions:
    1.13 + *
    1.14 + * The above copyright notice and this permission notice shall be included in 
    1.15 + * all copies or substantial portions of the Software.
    1.16 + *
    1.17 + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 
    1.18 + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 
    1.19 + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL 
    1.20 + * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 
    1.21 + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING 
    1.22 + * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER 
    1.23 + * DEALINGS IN THE SOFTWARE.
    1.24 + */
    1.25 +
    1.26 +/*
    1.27 + * THIS IS A GENERATED FILE. PLEASE DO NOT EDIT.
    1.28 + * Please edit UTF16Buffer.java instead and regenerate.
    1.29 + */
    1.30 +
    1.31 +#define nsHtml5UTF16Buffer_cpp__
    1.32 +
    1.33 +#include "nsIAtom.h"
    1.34 +#include "nsHtml5AtomTable.h"
    1.35 +#include "nsString.h"
    1.36 +#include "nsNameSpaceManager.h"
    1.37 +#include "nsIContent.h"
    1.38 +#include "nsTraceRefcnt.h"
    1.39 +#include "jArray.h"
    1.40 +#include "nsHtml5ArrayCopy.h"
    1.41 +#include "nsAHtml5TreeBuilderState.h"
    1.42 +#include "nsHtml5Atoms.h"
    1.43 +#include "nsHtml5ByteReadable.h"
    1.44 +#include "nsIUnicodeDecoder.h"
    1.45 +#include "nsHtml5Macros.h"
    1.46 +#include "nsIContentHandle.h"
    1.47 +
    1.48 +#include "nsHtml5Tokenizer.h"
    1.49 +#include "nsHtml5TreeBuilder.h"
    1.50 +#include "nsHtml5MetaScanner.h"
    1.51 +#include "nsHtml5AttributeName.h"
    1.52 +#include "nsHtml5ElementName.h"
    1.53 +#include "nsHtml5HtmlAttributes.h"
    1.54 +#include "nsHtml5StackNode.h"
    1.55 +#include "nsHtml5StateSnapshot.h"
    1.56 +#include "nsHtml5Portability.h"
    1.57 +
    1.58 +#include "nsHtml5UTF16Buffer.h"
    1.59 +
    1.60 +int32_t 
    1.61 +nsHtml5UTF16Buffer::getStart()
    1.62 +{
    1.63 +  return start;
    1.64 +}
    1.65 +
    1.66 +void 
    1.67 +nsHtml5UTF16Buffer::setStart(int32_t start)
    1.68 +{
    1.69 +  this->start = start;
    1.70 +}
    1.71 +
    1.72 +char16_t* 
    1.73 +nsHtml5UTF16Buffer::getBuffer()
    1.74 +{
    1.75 +  return buffer;
    1.76 +}
    1.77 +
    1.78 +int32_t 
    1.79 +nsHtml5UTF16Buffer::getEnd()
    1.80 +{
    1.81 +  return end;
    1.82 +}
    1.83 +
    1.84 +bool 
    1.85 +nsHtml5UTF16Buffer::hasMore()
    1.86 +{
    1.87 +  return start < end;
    1.88 +}
    1.89 +
    1.90 +void 
    1.91 +nsHtml5UTF16Buffer::adjust(bool lastWasCR)
    1.92 +{
    1.93 +  if (lastWasCR && buffer[start] == '\n') {
    1.94 +    start++;
    1.95 +  }
    1.96 +}
    1.97 +
    1.98 +void 
    1.99 +nsHtml5UTF16Buffer::setEnd(int32_t end)
   1.100 +{
   1.101 +  this->end = end;
   1.102 +}
   1.103 +
   1.104 +void
   1.105 +nsHtml5UTF16Buffer::initializeStatics()
   1.106 +{
   1.107 +}
   1.108 +
   1.109 +void
   1.110 +nsHtml5UTF16Buffer::releaseStatics()
   1.111 +{
   1.112 +}
   1.113 +
   1.114 +
   1.115 +#include "nsHtml5UTF16BufferCppSupplement.h"
   1.116 +

mercurial