khtml

khtml Namespace Reference

Namespaces

 SelectorQuery
 

Classes

class  Cache
 
class  CachedCSSStyleSheet
 
class  CachedFont
 
class  CachedImage
 
class  CachedObject
 
class  CachedObjectClient
 
class  CachedScript
 
class  CachedSound
 
class  CSSStyleSelector
 
class  DocLoader
 
class  DynamicDomRestyler
 
class  IDString
 
class  KHTMLParser
 
class  KHTMLPartAccessor
 
class  Loader
 
class  MediaQueryEvaluator
 
class  RenderContainer
 
class  RenderFlow
 
class  RenderObject
 
class  Request
 
class  StyleSelector
 
class  TableSectionIterator
 
class  Token
 

Typedefs

typedef DOM::DocumentImpl Document
 
typedef QList< QByteArrayencodingList
 
typedef unsigned short ExceptionCode
 
typedef DOM::HTMLElementImpl HTMLElement
 
typedef void(* PathApplierFunction) (void *info, const PathElement *)
 
typedef DOM::DOMString String
 

Enumerations

enum  AttributeDependencyType { PersonalDependency = 0, AncestorDependency = 1, PredecessorDependency = 2, LastAttributeDependency }
 
enum  CanvasMode { CanvasViewPort, CanvasPage, CanvasDocument }
 
enum  CaseNormalizeMode { IDS_CaseSensitive, IDS_NormalizeUpper, IDS_NormalizeLower }
 
enum  CompositeOperator {
  CompositeClear, CompositeCopy, CompositeSourceOver, CompositeSourceIn,
  CompositeSourceOut, CompositeSourceAtop, CompositeDestinationOver, CompositeDestinationIn,
  CompositeDestinationOut, CompositeDestinationAtop, CompositeXOR, CompositePlusDarker,
  CompositeHighlight, CompositePlusLighter
}
 
enum  ContentType {
  CONTENT_NONE = 0, CONTENT_NORMAL, CONTENT_OBJECT, CONTENT_TEXT,
  CONTENT_COUNTER, CONTENT_QUOTE
}
 
enum  DoctypeState {
  DoctypeBegin, DoctypeBeforeName, DoctypeName, DoctypeAfterName,
  DoctypeBeforePublicID, DoctypePublicID, DoctypeAfterPublicID, DoctypeBeforeSystemID,
  DoctypeSystemID, DoctypeAfterSystemID, DoctypeInternalSubset, DoctypeAfterInternalSubset,
  DoctypeBogus
}
 
enum  EAlignmentBaseline {
  AB_AUTO, AB_BASELINE, AB_BEFORE_EDGE, AB_TEXT_BEFORE_EDGE,
  AB_MIDDLE, AB_CENTRAL, AB_AFTER_EDGE, AB_TEXT_AFTER_EDGE,
  AB_IDEOGRAPHIC, AB_ALPHABETIC, AB_HANGING, AB_MATHEMATICAL
}
 
enum  EBackgroundAttachment { BGASCROLL, BGAFIXED, BGALOCAL }
 
enum  EBackgroundBox { BGBORDER, BGPADDING, BGCONTENT }
 
enum  EBackgroundRepeat { REPEAT, REPEAT_X, REPEAT_Y, NO_REPEAT }
 
enum  EBackgroundSizeType { BGSLENGTH, BGSCONTAIN, BGSCOVER }
 
enum  EBaselineShift { BS_BASELINE, BS_SUB, BS_SUPER, BS_LENGTH }
 
enum  EBorderPrecedence {
  BOFF, BTABLE, BCOLGROUP, BCOL,
  BROWGROUP, BROW, BCELL
}
 
enum  EBorderStyle {
  BNATIVE, BNONE, BHIDDEN, INSET,
  GROOVE, RIDGE, OUTSET, DOTTED,
  DASHED, SOLID, DOUBLE
}
 
enum  EBoxSizing { BORDER_BOX, CONTENT_BOX }
 
enum  ECaptionSide { CAPTOP, CAPBOTTOM, CAPLEFT, CAPRIGHT }
 
enum  EClear { CNONE = 0, CLEFT = 1, CRIGHT = 2, CBOTH = 3 }
 
enum  EColorInterpolation { CI_AUTO, CI_SRGB, CI_LINEARRGB }
 
enum  EColorRendering { CR_AUTO, CR_OPTIMIZESPEED, CR_OPTIMIZEQUALITY }
 
enum  ECursor {
  CURSOR_AUTO, CURSOR_DEFAULT, CURSOR_CONTEXT_MENU, CURSOR_HELP,
  CURSOR_POINTER, CURSOR_PROGRESS, CURSOR_WAIT, CURSOR_CELL,
  CURSOR_CROSS, CURSOR_TEXT, CURSOR_VERTICAL_TEXT, CURSOR_ALIAS,
  CURSOR_COPY, CURSOR_MOVE, CURSOR_NO_DROP, CURSOR_NOT_ALLOWED,
  CURSOR_E_RESIZE, CURSOR_N_RESIZE, CURSOR_NE_RESIZE, CURSOR_NW_RESIZE,
  CURSOR_S_RESIZE, CURSOR_SE_RESIZE, CURSOR_SW_RESIZE, CURSOR_W_RESIZE,
  CURSOR_EW_RESIZE, CURSOR_NS_RESIZE, CURSOR_NESW_RESIZE, CURSOR_NWSE_RESIZE,
  CURSOR_COL_RESIZE, CURSOR_ROW_RESIZE, CURSOR_ALL_SCROLL, CURSOR_NONE
}
 
enum  EDirection { LTR, RTL }
 
enum  EDisplay {
  INLINE, BLOCK, LIST_ITEM, RUN_IN,
  COMPACT, INLINE_BLOCK, TABLE, INLINE_TABLE,
  TABLE_ROW_GROUP, TABLE_HEADER_GROUP, TABLE_FOOTER_GROUP, TABLE_ROW,
  TABLE_COLUMN_GROUP, TABLE_COLUMN, TABLE_CELL, TABLE_CAPTION,
  NONE
}
 
enum  EDominantBaseline {
  DB_AUTO, DB_USE_SCRIPT, DB_NO_CHANGE, DB_RESET_SIZE,
  DB_IDEOGRAPHIC, DB_ALPHABETIC, DB_HANGING, DB_MATHEMATICAL,
  DB_CENTRAL, DB_MIDDLE, DB_TEXT_AFTER_EDGE, DB_TEXT_BEFORE_EDGE
}
 
enum  EEmptyCell { SHOW, HIDE }
 
enum  EFloat {
  FNONE = 0, FLEFT = 0x01, FRIGHT = 0x02, FLEFT_ALIGN = 0x05,
  FRIGHT_ALIGN = 0x06
}
 
enum  EGlyphOrientation {
  GO_0DEG, GO_90DEG, GO_180DEG, GO_270DEG,
  GO_AUTO
}
 
enum  EImageRendering { IR_AUTO, IR_OPTIMIZESPEED, IR_OPTIMIZEQUALITY }
 
enum  EListStylePosition { OUTSIDE, INSIDE }
 
enum  EListStyleType {
  LDISC, LCIRCLE, LSQUARE, LBOX,
  LDIAMOND, LDECIMAL, DECIMAL_LEADING_ZERO, ARABIC_INDIC,
  LAO, PERSIAN, URDU, THAI,
  TIBETAN, LOWER_ROMAN, UPPER_ROMAN, HEBREW,
  ARMENIAN, GEORGIAN, CJK_IDEOGRAPHIC, JAPANESE_FORMAL,
  JAPANESE_INFORMAL, SIMP_CHINESE_FORMAL, SIMP_CHINESE_INFORMAL, TRAD_CHINESE_FORMAL,
  TRAD_CHINESE_INFORMAL, LOWER_GREEK, UPPER_GREEK, LOWER_ALPHA,
  LOWER_LATIN, UPPER_ALPHA, UPPER_LATIN, HIRAGANA,
  KATAKANA, HIRAGANA_IROHA, KATAKANA_IROHA, LNONE
}
 
enum  EMarqueeBehavior {
  MNONE, MSCROLL, MSLIDE, MALTERNATE,
  MUNFURL
}
 
enum  EMarqueeDirection {
  MAUTO = 0, MLEFT = 1, MRIGHT = -1, MUP = 2,
  MDOWN = -2, MFORWARD = 3, MBACKWARD = -3
}
 
enum  EOverflow {
  OVISIBLE, OHIDDEN, OSCROLL, OAUTO,
  OMARQUEE
}
 
enum  EPageBreak {
  PBAUTO, PBALWAYS, PBAVOID, PBLEFT,
  PBRIGHT
}
 
enum  EPointerEvents {
  PE_NONE, PE_STROKE, PE_FILL, PE_PAINTED,
  PE_VISIBLE, PE_VISIBLE_STROKE, PE_VISIBLE_FILL, PE_VISIBLE_PAINTED,
  PE_ALL
}
 
enum  EPosition { PSTATIC, PRELATIVE, PABSOLUTE, PFIXED }
 
enum  EQuoteContent {
  NO_QUOTE = 0, OPEN_QUOTE, CLOSE_QUOTE, NO_OPEN_QUOTE,
  NO_CLOSE_QUOTE
}
 
enum  EShapeRendering { SR_AUTO, SR_OPTIMIZESPEED, SR_CRISPEDGES, SR_GEOMETRICPRECISION }
 
enum  ETableLayout { TAUTO, TFIXED }
 
enum  ETextAlign {
  TAAUTO, LEFT, RIGHT, CENTER,
  JUSTIFY, KHTML_LEFT, KHTML_RIGHT, KHTML_CENTER
}
 
enum  ETextAnchor { TA_START, TA_MIDDLE, TA_END }
 
enum  ETextDecoration {
  TDNONE = 0x0, UNDERLINE = 0x1, OVERLINE = 0x2, LINE_THROUGH = 0x4,
  BLINK = 0x8
}
 
enum  ETextRendering { TR_AUTO, TR_OPTIMIZESPEED, TR_OPTIMIZELEGIBILITY, TR_GEOMETRICPRECISION }
 
enum  ETextTransform { CAPITALIZE, UPPERCASE, LOWERCASE, TTNONE }
 
enum  EUnicodeBidi { UBNormal, Embed, Override }
 
enum  EUserInput { UI_ENABLED, UI_DISABLED, UI_NONE }
 
enum  EVerticalAlign {
  BASELINE, MIDDLE, SUB, SUPER,
  TEXT_TOP, TEXT_BOTTOM, TOP, BOTTOM,
  BASELINE_MIDDLE, LENGTH
}
 
enum  EVisibility { VISIBLE, HIDDEN, COLLAPSE }
 
enum  EWhiteSpace {
  NORMAL, PRE, NOWRAP, PRE_WRAP,
  PRE_LINE, KHTML_NOWRAP
}
 
enum  EWordWrap { WWNORMAL = 0, WWBREAKWORD = 0x01 }
 
enum  EWritingMode {
  WM_LRTB, WM_LR, WM_RLTB, WM_RL,
  WM_TBRL, WM_TB
}
 
enum  FindSelectionResult {
  SelectionPointBefore, SelectionPointAfter, SelectionPointInside, SelectionPointBeforeInLine,
  SelectionPointAfterInLine
}
 
enum  HAlign {
  HDefault, Left, HCenter, Right,
  HNone = 0
}
 
enum  HeightType { Height, MinHeight, MaxHeight }
 
enum  HorizontalAlignment { AlignLeft, AlignRight, AlignHCenter }
 
enum  LengthType {
  Auto = 0, Relative, Percent, Fixed,
  Static
}
 
enum  LineCap { ButtCap, RoundCap, SquareCap }
 
enum  LineJoin { MiterJoin, RoundJoin, BevelJoin }
 
enum  ObjectAdvanceState { LeftObject = 0x01, AdvancedToSibling = 0x02, EnteredObject = 0x04 }
 
enum  ObjectTraversalState { OutsideDescending, InsideDescending, InsideAscending, OutsideAscending }
 
enum  PathElementType {
  PathElementMoveToPoint, PathElementAddLineToPoint, PathElementAddQuadCurveToPoint, PathElementAddCurveToPoint,
  PathElementCloseSubpath
}
 
enum  PseudoState { PseudoUnknown, PseudoNone, PseudoLink, PseudoVisited }
 
enum  Source {
  Default = 0, User = 1, NonCSSHint = 2, Author = 3,
  Inline = 4, AuthorImportant = 5, InlineImportant = 6, UserImportant = 7
}
 
enum  StructuralDependencyType {
  StructuralDependency = 0, BackwardsStructuralDependency = 1, HoverDependency = 2, ActiveDependency = 3,
  OtherStateDependency = 4, LastStructuralDependency
}
 
enum  VAlign {
  VNone = 0, Bottom, VCenter, Top,
  Baseline
}
 
enum  VerticalPositionHint { PositionTop = -0x4000, PositionBottom = 0x4000, PositionUndefined = 0x3fff }
 
enum  WidthType { Width, MinWidth, MaxWidth }
 
enum  WindRule { RULE_NONZERO = 0, RULE_EVENODD = 1 }
 

Functions

static void addMidpoint (const BidiIterator &midpoint)
 
static void addRun (BidiRun *bidiRun)
 
static RenderObjectadvanceObject (RenderObject *r, ObjectTraversalState &trav, bool toBegin, RenderObject *base, int &state)
 
static RenderObjectadvanceSuitableObject (RenderObject *r, ObjectTraversalState &trav, bool toBegin, RenderObject *base, int &state)
 
static int angleToGlyphOrientation (float angle)
 
static void appendRun (BidiState &bidi)
 
static void appendRunsForObject (int start, int end, RenderObject *obj, BidiState &bidi)
 
void applyRule (DOM::CSSProperty *prop)
 
static void applyStyleChangeOnTheNode (ElementImpl *element, CSSStyleDeclarationImpl *style)
 
void * ArenaAllocate (ArenaPool *pool, unsigned int nb)
 
void ArenaFinish ()
 
void ArenaRelease (ArenaPool *pool, char *mark)
 
static RenderObjectBidinext (RenderObject *par, RenderObject *current, BidiState *bidi=nullptr, bool skipInlines=true, bool *endOfInline=nullptr)
 
static bool break_bsearch (const ushort *arr, const unsigned int count, const ushort val)
 
static void bubbleSort (CSSOrderedProperty **b, CSSOrderedProperty **e)
 
int CeilingLog2 (unsigned int i)
 
static bool checkIfNewStylingNeeded (ElementImpl *element, CSSStyleDeclarationImpl *style)
 
static void checkMidpoints (BidiIterator &lBreak)
 
static PseudoState checkPseudoState (const CSSStyleSelector::Encodedurl &encodedurl, DOM::ElementImpl *e)
 
static void chopMidpointsAt (RenderObject *obj, uint pos)
 
static void cleanpath (QString &path)
 
void cleanup_thaibreaks ()
 
static void closeAndDrawWord (QPainter *p, Qt::LayoutDirection d, int &x, int y, const short widths[], const QChar *str, int pos, int &wordStart, int wordEnd)
 
static int closeWordAndGetWidth (const QFontMetrics &fm, const QChar *str, int pos, int wordStart, int wordEnd)
 
QColor colorForCSSValue (int css_value)
 
static EColorInterpolation colorInterpolationForValue (DOM::CSSPrimitiveValueImpl *primitiveValue)
 
static RenderObjectcommonAncestorTableSectionOrCell (RenderObject *r1, RenderObject *r2)
 
DOM::DOMString compositeOperatorName (CompositeOperator op)
 
static RenderTableCell * containingTableCell (RenderObject *r)
 
static bool containsEditableChildElement (KHTMLPart *part, RenderBlock *cb, RenderTable *&table, bool fromEnd, RenderObject *start)
 
static bool containsEditableElement (KHTMLPart *part, RenderBlock *cb, RenderTable *&table, bool fromEnd=false)
 
static Length convertToLength (CSSPrimitiveValueImpl *primitiveValue, RenderStyle *style, RenderStyle *rootStyle, int logicalDpiY, bool *ok=nullptr)
 
static void deleteBidiRuns (RenderArena *arena)
 
static ElementImpl * determineBaseElement (NodeImpl *caretNode)
 
static void drawDirectedText (QPainter *p, Qt::LayoutDirection d, int x, int y, const QString &str)
 
static void embed (QChar::Direction d, BidiState &bidi)
 
static void ensureLeafNode (NodeImpl *&node, NodeImpl *base)
 
static bool equal (DOMStringImpl *string, const QChar *characters, unsigned length)
 
static CaretBoxLine * findCaretBoxLine (DOM::NodeImpl *node, long offset, CaretBoxLineDeleter *cblDeleter, RenderObject *base, long &r_ofs, CaretBoxIterator &caretBoxIt)
 
static RenderTable * findFirstDescendantTable (RenderObject *leaf, RenderBlock *block)
 
static RenderTableCell * findNearestTableCell (KHTMLPart *part, int x, TableRowIterator &it, bool fromEnd)
 
static RenderTableCell * findNearestTableCellInRow (KHTMLPart *part, int x, RenderTableSection::RowStruct *row, bool fromEnd)
 
static RenderObjectfindRenderer (NodeImpl *&node, long offset, RenderObject *base, long &r_ofs, bool &outside, bool &outsideEnd)
 
static int findRowInSection (RenderTableSection *section, RenderTableCell *cell, RenderTableSection::RowStruct *&row, RenderTableCell *&directCell)
 
static RenderTable * findTableUpTo (RenderObject *r, RenderFlow *cb)
 
void findWordBoundary (QChar *chars, int len, int position, int *start, int *end)
 
void FinishArenaPool (ArenaPool *pool)
 
static RenderObjectfirst (RenderObject *par, BidiState *bidi, bool skipInlines=true)
 
static void FreeArenaList (ArenaPool *pool, Arena *head, bool reallyFree)
 
void FreeArenaPool (ArenaPool *pool)
 
static QRegExp fromAdBlockWildcard (const QString &wcStr)
 
static int getBorderPaddingMargin (RenderObject *child, bool endOfInline)
 
static int getBorderPaddingMargin (RenderObject *child, bool endOfInline)
 
static int getBPMWidth (int childValue, Length cssUnit)
 
static int getBPMWidth (int childValue, Length cssUnit)
 
static void getInlineRun (RenderObject *start, RenderObject *stop, RenderObject *&inlineRunStart, RenderObject *&inlineRunEnd)
 
static bool hasNextListItem (NodeImpl *node)
 
static bool hasPreviousListItem (NodeImpl *node)
 
bool hasSufficientContrast (const QColor &c1, const QColor &c2)
 
static QDebugind (const QDebug &dbgIn, int ind)
 
static QColor inheritedBorderColor (RenderStyle *parentStyle, const QColor &value)
 
void InitArenaPool (ArenaPool *pool, const char *, unsigned int, unsigned int align)
 
bool isAcceptableCSSMimetype (const DOM::DOMString &mimetype)
 
static bool isAnonymousWhitespace (RenderObject *o)
 
static bool isBlockLevelStyle (const CSSStyleDeclarationImpl *style)
 
bool isBlockRenderReplaced (RenderObject *r)
 
bool isBreakable (const QChar *str, const int pos, int len)
 
bool isBreakableThai (const QChar *string, const int pos, const int len)
 
static bool isCaretBoxEmpty (CaretBox *box)
 
static bool isDefaultPortForProtocol (unsigned short port, const QString &proto)
 
static bool isDescendant (RenderObject *r, RenderObject *cb)
 
static bool isFirstLetterPunct (const QChar *c)
 
static bool isIndicatedFlow (RenderObject *r)
 
static bool isIndicatedInlineBox (InlineBox *box)
 
bool isListStyleCounted (EListStyleType type)
 
static bool isNBSP (const QChar &c)
 
static bool isOpenForMoreTypingCommand (const EditCommandImpl *command)
 
static bool isUnsuitable (RenderObject *r, ObjectTraversalState trav)
 
static bool isWS (const QChar &c)
 
static bool isWS (const DOMString &text)
 
static bool isWS (const Position &pos)
 
static Position leadingWhitespacePosition (const Position &pos)
 
DOM::DOMString lineCapName (LineCap cap)
 
DOM::DOMString lineJoinName (LineJoin join)
 
void mapDOMPosToRenderPos (NodeImpl *node, long offset, RenderObject *&r, long &r_ofs, bool &outside, bool &outsideEnd)
 
void mapRenderPosToDOMPos (RenderObject *r, long r_ofs, bool outside, bool outsideEnd, NodeImpl *&node, long &offset)
 
static void mapRenderPosToTraversalState (bool outside, bool atEnd, bool toBegin, ObjectTraversalState &trav)
 
static void mapTraversalStateToRenderPos (ObjectTraversalState trav, bool toBegin, bool &outside, bool &atEnd)
 
static bool matchNth (int count, const QString &nth)
 
static void moveIteratorByPage (LinearDocument &ld, ErgonomicEditableLineIterator &it, int mindist, bool next)
 
static void moveItToNextWord (EditableCharacterIterator &it)
 
static void moveItToPrevWord (EditableCharacterIterator &it)
 
static CaretBox * nearestCaretBox (LineIterator &it, CaretViewContext *cv, int &x, int &absx, int &absy)
 
static int nextFontSize (const QVector< int > &a, int v, bool smaller)
 
static NodeImpl * nextLeafNode (NodeImpl *r, NodeImpl *baseElem)
 
static int nextSeed (int curSize)
 
static DOMStringnonBreakingSpaceString ()
 
bool operator!= (const RenderPosition &a, const RenderPosition &b)
 
bool operator!= (const AtomicString &a, const AtomicString &b)
 
bool operator!= (const BidiIterator &it1, const BidiIterator &it2)
 
bool operator!= (const BidiStatus &status1, const BidiStatus &status2)
 
template<class T >
bool operator!= (const DocPtr< T > &a, const DocPtr< T > &b)
 
template<class T >
bool operator!= (const DocPtr< T > &a, const T *b)
 
template<class T >
bool operator!= (const T *a, const DocPtr< T > &b)
 
QDebug operator<< (QDebug stream, const RenderPosition &renderPosition)
 
bool operator== (const AtomicString &a, const char *b)
 
bool operator== (const RenderPosition &a, const RenderPosition &b)
 
bool operator== (const AtomicString &a, const AtomicString &b)
 
bool operator== (const char *a, const AtomicString &b)
 
bool operator== (const BidiContext &c1, const BidiContext &c2)
 
bool operator== (const BidiIterator &it1, const BidiIterator &it2)
 
template<class T >
bool operator== (const DocPtr< T > &a, const DocPtr< T > &b)
 
template<class T >
bool operator== (const DocPtr< T > &a, const T *b)
 
bool operator== (const BidiStatus &status1, const BidiStatus &status2)
 
template<class T >
bool operator== (const T *a, const DocPtr< T > &b)
 
bool parseCompositeOperator (const DOM::DOMString &s, CompositeOperator &op)
 
bool parseLineCap (const DOM::DOMString &s, LineCap &cap)
 
bool parseLineJoin (const DOM::DOMString &s, LineJoin &join)
 
DOM::DOMString parseURL (const DOM::DOMString &url)
 
static void pathLengthApplierFunction (void *info, const PathElement *element)
 
static void precomputeAttributeDependenciesAux (DOM::DocumentImpl *doc, DOM::CSSSelector *sel, bool isAncestor, bool isSubject)
 
static unsigned int qHash (const IDTableBase::MappingKey &key)
 
static uint qHash (const CachedFontFamilyKey &key)
 
QRgb qRgbaFromHsla (double h, double s, double l, double a)
 
static RenderObjectrenderObjectAbove (RenderObject *obj, ObjectTraversalState &trav, RenderObject *base)
 
static RenderObjectrenderObjectBelow (RenderObject *obj, ObjectTraversalState &trav, RenderObject *base)
 
static bool requiresLineBox (BidiIterator &it)
 
QColor retrieveBackgroundColor (const RenderObject *obj)
 
static void reverseRuns (int start, int end)
 
static float roundToNearestGlyphOrientationAngle (float angle)
 
InlineFlowBox * seekBaseFlowBox (InlineBox *b, RenderObject *base=0)
 
String serializeTimeOffset (float time)
 
void setPrintPainter (QPainter *printer)
 
static void setStaticPosition (RenderBlock *p, RenderObject *o, bool *needToSetStaticX=nullptr, bool *needToSetStaticY=nullptr)
 
static bool shouldDeleteUpstreamPosition (const Position &pos)
 
static bool shouldPruneNode (NodeImpl *node)
 
DOM::DOMString stringForListStyleType (khtml::EListStyleType type)
 
static void stripTrailingSpace (bool preserveWS, int &inlineMax, int &inlineMin, RenderObject *trailingSpaceChild)
 
static DOMStringstyleSpanClassString ()
 
static bool textNodesAreJoinable (TextImpl *text1, TextImpl *text2)
 
static SVGColorImpl * toColor (CSSValueImpl *val)
 
static SVGPaintImpl * toPaint (CSSValueImpl *val)
 
static Position trailingWhitespacePosition (const Position &pos)
 
static RenderObjecttraverseRenderObjects (RenderObject *obj, ObjectTraversalState &trav, bool toBegin, RenderObject *base, int &state)
 

Variables

bool allowWidgetPaintEvents = false
 
static Arena * arena_freelist = nullptr
 
static bool betweenMidpoints
 
static ThaiCache * cache = nullptr
 
const AtomicString commentAtom
 
static const char *const compositeOperatorNames []
 
const float cssPixelsPerInch = 96.0f
 
static QChar::Direction dir = QChar::DirON
 
static const ushort dontbreakafter []
 
static const ushort dontbreakbefore []
 
const AtomicString emptyAtom
 
static bool emptyRun = true
 
static QHash< CachedFontFamilyKey, CachedFontFamily * > * fontCache
 
static int freelist_count = 0
 
static bool inBidiRunDetach
 
const QRgb invertedColor = 0x00000002
 
static bool isLineEmpty = true
 
const AtomicString nullAtom
 
const int numCompositeOperatorNames = sizeof(compositeOperatorNames) / sizeof(compositeOperatorNames[0])
 
static int numSpaces
 
const int PERCENT_SCALE_FACTOR = 128
 
static bool previousLineBrokeAtBR = false
 
static const int primes_t []
 
QPainterprintpainter
 
static PseudoState pseudoState
 
static int sBidiRunCount
 
static bool sBuildingCompactRuns
 
static int sCompactBidiRunCount
 
static BidiRun * sCompactFirstBidiRun
 
static BidiRun * sCompactLastBidiRun
 
static uint sCurrMidpoint
 
static BidiRun * sFirstBidiRun
 
static BidiRun * sLastBidiRun
 
static QVector< BidiIterator > * smidpoints
 
static uint sNumMidpoints
 
const AtomicString starAtom
 
static HashSet< DOMStringImpl * > * stringTable
 
const AtomicString textAtom
 
const QRgb transparentColor = 0x00000000
 
const int UNDEFINED = -1
 

Detailed Description

This file is part of the HTML rendering engine for KDE.

This file is part of the html renderer for KDE.

Copyright (C) 2004-2005 Allan Sandfeld Jensen ([email protected][email protected]arew[email protected]olf.c[email protected]om)

      (C) Hebrew algorithm by [email protected]
                          and [email protected]

This library is free software; you can redistribute it and/or modify it under the terms of the GNU Library General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.

This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public License for more details.

You should have received a copy of the GNU Library General Public License along with this library; see the file COPYING.LIB. If not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.

Copyright (C) 1999-2003 Lars Knoll (knoll[email protected]@kde[email protected].org) (C) 1999 Antti Koivisto (koivi[email protected][email protected][email protected]kde.o[email protected]rg) (C) 2000 Dirk Mueller (muell[email protected][email protected][email protected]de.or[email protected]g)

This library is free software; you can redistribute it and/or modify it under the terms of the GNU Library General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.

This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public License for more details.

You should have received a copy of the GNU Library General Public License along with this library; see the file COPYING.LIB. If not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.

Enumeration Type Documentation

Flags representing the type of advance that has been made.

Parameters
LeftObjecta render object was left and an ascent to its parent has taken place
AdvancedToSiblingan actual advance to a sibling has taken place
EnteredObjecta render object was entered by descending into it from its parent object.

Definition at line 35 of file khtml_caret.cpp.

All possible states that may occur during render object traversal.

Parameters
OutsideDescendingoutside of the current object, ready to descend into children
InsideDescendinginside the current object, descending into children
InsideAscendinginside the current object, ascending to parents
OutsideAscendingoutsie the current object, ascending to parents

Definition at line 47 of file khtml_caret.cpp.

Function Documentation

static RenderObject* khtml::advanceObject ( RenderObject r,
ObjectTraversalState trav,
bool  toBegin,
RenderObject base,
int &  state 
)
static

Advances to the next render object, taking into account the current traversal state.

Parameters
rrender object
travobject traversal state
toBegintrue, advance towards beginning, false, advance toward end
basebase render object which this method must not advance beyond (0 means document)
stateobject advance state (enum ObjectAdvanceState) (unchanged on LeafsOnly)
Returns
a pointer to the render object which we advanced to, or 0 if the last possible object has been reached.

Definition at line 191 of file khtml_caret.cpp.

static RenderObject* khtml::advanceSuitableObject ( RenderObject r,
ObjectTraversalState trav,
bool  toBegin,
RenderObject base,
int &  state 
)
inlinestatic

Advances to the next render object, taking into account the current traversal state, but skipping render objects which are not suitable for having placed the caret into them.

Parameters
rrender object
travobject traversal state (unchanged on LeafsOnly)
toBegintrue, advance towards beginning, false, advance toward end
basebase render object which this method must not advance beyond (0 means document)
stateobject advance state (enum ObjectAdvanceState) (unchanged on LeafsOnly)
Returns
a pointer to the advanced render object or 0 if the last possible object has been reached.

Definition at line 335 of file khtml_caret.cpp.

static void khtml::closeAndDrawWord ( QPainter p,
Qt::LayoutDirection  d,
int &  x,
int  y,
const short  widths[],
const QChar str,
int  pos,
int &  wordStart,
int  wordEnd 
)
inlinestatic

closes the current word and draws it

Parameters
ppainter
dtext direction
xcurrent x position, will be inc-/decremented correctly according to text direction
ybaseline of text
widthslist of widths; width of word is expected at position wordStart
strstring
poszero-indexed position within str upon which all other indices are based
wordStartrelative index pointing to the position where the word started, will be set to wordEnd after function
wordEndrelative index pointing one position after the word ended

Definition at line 111 of file font.cpp.

static int khtml::closeWordAndGetWidth ( const QFontMetrics fm,
const QChar str,
int  pos,
int  wordStart,
int  wordEnd 
)
inlinestatic

closes the current word and returns its width in pixels

Parameters
fmmetrics of font to be used
strstring
poszero-indexed position within str upon which all other indices are based
wordStartrelative index pointing to the position where the word started
wordEndrelative index pointing one position after the word ended
Returns
the width in pixels. May be 0 if wordStart and wordEnd were equal.

Definition at line 62 of file font.cpp.

static RenderObject* khtml::commonAncestorTableSectionOrCell ( RenderObject r1,
RenderObject r2 
)
static

returns the nearest common ancestor of two objects that is a table cell, a table section, or 0 if not inside a common table.

If r1 and r2 belong to the same table, but different sections, r1's section is returned.

Definition at line 2401 of file khtml_caret.cpp.

static RenderTableCell* khtml::containingTableCell ( RenderObject r)
inlinestatic

looks for the table cell the given object r is contained within.

Returns
the table cell or 0 if not contained in any table.

Definition at line 2508 of file khtml_caret.cpp.

static bool khtml::containsEditableChildElement ( KHTMLPart part,
RenderBlock *  cb,
RenderTable *&  table,
bool  fromEnd,
RenderObject start 
)
static

checks whether the given block contains at least one editable child element, beginning with but excluding start.

Warning: This function has linear complexity, and therefore is expensive. Use it sparingly, and cache the result.

Parameters
partpart
cbblock to be searched
tablereturns the nested table if there is one directly before/after the start object.
fromEndbegin search from end (default: begin from beginning)
startobject after which to begin search.

Definition at line 1295 of file khtml_caret.cpp.

static bool khtml::containsEditableElement ( KHTMLPart part,
RenderBlock *  cb,
RenderTable *&  table,
bool  fromEnd = false 
)
static

checks whether the given block contains at least one editable element.

Warning: This function has linear complexity, and therefore is expensive. Use it sparingly, and cache the result.

Parameters
partpart
cbblock to be searched
tablereturns the nested table if there is one directly at the beginning or at the end.
fromEndbegin search from end (default: begin from beginning)

Definition at line 1233 of file khtml_caret.cpp.

static ElementImpl* khtml::determineBaseElement ( NodeImpl *  caretNode)
static

returns a suitable base element

Parameters
caretNodecurrent node containing caret.

Definition at line 699 of file khtml_caret.cpp.

static void khtml::ensureLeafNode ( NodeImpl *&  node,
NodeImpl *  base 
)
inlinestatic

Make sure the given node is a leaf node.

Definition at line 592 of file khtml_caret.cpp.

static CaretBoxLine* khtml::findCaretBoxLine ( DOM::NodeImpl *  node,
long  offset,
CaretBoxLineDeleter *  cblDeleter,
RenderObject base,
long &  r_ofs,
CaretBoxIterator &  caretBoxIt 
)
static

determines the caret line box that contains the given position.

If the node does not map to a render object, the function will snap to the next suitable render object following it.

Parameters
nodenode to begin with
offsetzero-based offset within node.
cblDeleterdeleter for caret box lines
basebase render object which the caret must not be placed beyond.
r_ofsadjusted offset within render object
caretBoxItreturns an iterator to the caret box that contains the given position.
Returns
the determined caret box lineor 0 if either the node is 0 or there is no inline flow box containing this node. The containing block will still be set. If it is 0 too, node was invalid.

Definition at line 1058 of file khtml_caret.cpp.

static RenderTable* khtml::findFirstDescendantTable ( RenderObject leaf,
RenderBlock *  block 
)
inlinestatic

finds the table that is the first direct or indirect descendant of block.

Parameters
leafobject to begin search from.
blockobject to search to, or 0 to search up to top.
Returns
the table or 0 if there were none.

Definition at line 2493 of file khtml_caret.cpp.

static RenderTableCell* khtml::findNearestTableCell ( KHTMLPart part,
int  x,
TableRowIterator &  it,
bool  fromEnd 
)
inlinestatic

finds the cell corresponding to absolute x-coordinate x in the given table.

If there is no direct cell, or the cell is not accessible, the function will return the nearest suitable cell.

Parameters
partpart containing the document
xabsolute x-coordinate
ittable row iterator, will be adapted accordingly as more rows are investigated.
fromEndtrue to begin search from end and work towards the beginning
Returns
the cell, or 0 if no editable cell was found.

Definition at line 2289 of file khtml_caret.cpp.

static RenderTableCell * khtml::findNearestTableCellInRow ( KHTMLPart part,
int  x,
RenderTableSection::RowStruct *  row,
bool  fromEnd 
)
static

finds the nearest editable cell around the given absolute x-coordinate

It will dive into nested tables as necessary to provide seamless navigation.

If the cell at x is not editable, its left neighbor is tried, then its right neighbor, then the left neighbor's left neighbor etc. If no editable cell can be found, 0 is returned.

Parameters
partkhtml part
xabsolute x-coordinate
rowtable row to be searched
fromEndtrue, begin from end (applies only to nested tables)
Returns
the found cell or 0 if no editable cell was found

Definition at line 2323 of file khtml_caret.cpp.

static RenderObject* khtml::findRenderer ( NodeImpl *&  node,
long  offset,
RenderObject base,
long &  r_ofs,
bool &  outside,
bool &  outsideEnd 
)
static

Finds the next node that has a renderer.

Note that if the initial node has a renderer, this will be returned, regardless of the caret advance policy. Otherwise, for the next nodes, only leaf nodes are considered.

Parameters
nodenode to start with, will be updated accordingly
offsetoffset of caret within node
basebase render object which this method must not advance beyond (0 means document)
r_ofsreturn the caret offset within the returned renderer
outsidereturns whether offset is to be interpreted to the outside (true) or the inside (false) of the render object.
outsideEndreturns whether the end of the outside position is meant
Returns
renderer or 0 if no following node has a renderer.

Definition at line 651 of file khtml_caret.cpp.

static int khtml::findRowInSection ( RenderTableSection *  section,
RenderTableCell *  cell,
RenderTableSection::RowStruct *&  row,
RenderTableCell *&  directCell 
)
static

Finds the row that contains the given cell, directly, or indirectly.

Parameters
sectionsection to be searched
celltable cell
rowreturns the row
directCellreturns the direct cell that contains cell
Returns
the index of the row.

Definition at line 2455 of file khtml_caret.cpp.

static RenderTable* khtml::findTableUpTo ( RenderObject r,
RenderFlow cb 
)
inlinestatic

finds the innermost table object r is contained within, but no farther than cb.

Parameters
rleaf element to begin with
cbbottom element where to stop search at least.
Returns
the table object or 0 if none found.

Definition at line 1205 of file khtml_caret.cpp.

bool khtml::hasSufficientContrast ( const QColor c1,
const QColor c2 
)

checks whether the given colors have enough contrast

Returns
true if contrast is ok.

Definition at line 267 of file helper.cpp.

bool khtml::isBlockRenderReplaced ( RenderObject r)
inline

determines whether the given element is a block level replaced element.

Definition at line 1037 of file khtml_caret.cpp.

static bool khtml::isCaretBoxEmpty ( CaretBox *  box)
inlinestatic

returns true when the given caret box is empty, i.

e. should not take place in caret movement.

Definition at line 1939 of file khtml_caret.cpp.

static bool khtml::isDescendant ( RenderObject r,
RenderObject cb 
)
inlinestatic

checks whether r is a descendant of cb, or r == cb

Definition at line 1215 of file khtml_caret.cpp.

static bool khtml::isIndicatedFlow ( RenderObject r)
inlinestatic

Checks whether the given render object matches the IndicatedFlows policy.

Parameters
rrender object to test
Returns
true on match

Definition at line 166 of file khtml_caret.cpp.

static bool khtml::isIndicatedInlineBox ( InlineBox *  box)
inlinestatic

Checks whether the given inline box matches the IndicatedFlows policy.

Parameters
boxinline box to test
Returns
true on match

Definition at line 146 of file khtml_caret.cpp.

static bool khtml::isUnsuitable ( RenderObject r,
ObjectTraversalState  trav 
)
inlinestatic

Check whether the current render object is unsuitable in caret mode handling.

Some render objects cannot be handled correctly in caret mode. These objects are therefore considered to be unsuitable. The null object is suitable, as it denotes reaching the end.

Parameters
rcurrent render object
travcurrent traversal state

Definition at line 311 of file khtml_caret.cpp.

void khtml::mapDOMPosToRenderPos ( NodeImpl *  node,
long  offset,
RenderObject *&  r,
long &  r_ofs,
bool &  outside,
bool &  outsideEnd 
)

Maps a DOM Range position to the corresponding caret position.

The offset boundary is not checked for validity.

Parameters
nodeDOM node
offsetzero-based offset within node
rreturns render object (may be 0 if DOM node has no render object)
r_ofsreturns the appropriate offset for the found render object r
outsidereturns true when offset is applied to the outside of r, or false for the inside.
outsideEndreturn true when the caret position is at the outside end.

Definition at line 467 of file khtml_caret.cpp.

void khtml::mapRenderPosToDOMPos ( RenderObject r,
long  r_ofs,
bool  outside,
bool  outsideEnd,
NodeImpl *&  node,
long &  offset 
)

Maps a caret position to the corresponding DOM Range position.

Parameters
rrender object
r_ofsoffset within render object
outsidetrue when offset is interpreted to be on the outside of r, or false if on the inside.
outsideEndtrue when the caret position is at the outside end.
nodereturns DOM node
offsetreturns zero-based offset within node

Definition at line 542 of file khtml_caret.cpp.

static void khtml::mapRenderPosToTraversalState ( bool  outside,
bool  atEnd,
bool  toBegin,
ObjectTraversalState trav 
)
inlinestatic

Converts a caret position to its respective object traversal state.

Parameters
outsidewhether the caret is outside the object
atEndwhether the caret position is at the end
toBegintrue when advancing towards the beginning
travreturns the corresponding traversal state

Definition at line 605 of file khtml_caret.cpp.

static void khtml::mapTraversalStateToRenderPos ( ObjectTraversalState  trav,
bool  toBegin,
bool &  outside,
bool &  atEnd 
)
inlinestatic

Converts a traversal state to its respective caret position.

Parameters
travobject traversal state
toBegintrue when advancing towards the beginning
outsidewhether the caret is outside the object
atEndwhether the caret position is at the end

Definition at line 624 of file khtml_caret.cpp.

static void khtml::moveIteratorByPage ( LinearDocument &  ld,
ErgonomicEditableLineIterator &  it,
int  mindist,
bool  next 
)
static

moves the iterator by one page.

Parameters
ldlinear document
itline iterator, will be updated accordingly
mindistminimum distance in pixel the iterator should be moved (if possible)
nexttrue, move downward, false move upward

Definition at line 2870 of file khtml_caret.cpp.

static void khtml::moveItToNextWord ( EditableCharacterIterator &  it)
static

moves the given iterator to the beginning of the next word.

If the end is reached, the iterator will be positioned there.

Parameters
itcharacter iterator to be moved

Definition at line 2787 of file khtml_caret.cpp.

static void khtml::moveItToPrevWord ( EditableCharacterIterator &  it)
static

moves the given iterator to the beginning of the previous word.

If the beginning is reached, the iterator will be positioned there.

Parameters
itcharacter iterator to be moved

Definition at line 2824 of file khtml_caret.cpp.

static CaretBox* khtml::nearestCaretBox ( LineIterator &  it,
CaretViewContext *  cv,
int &  x,
int &  absx,
int &  absy 
)
static

seeks the caret box which contains or is the nearest to x

Parameters
itline iterator pointing to line to be searched
cvcaret view context
xreturns the cv->origX approximation, relatively positioned to the containing block.
absxreturns absolute x-coordinate of containing block
absyreturns absolute y-coordinate of containing block
Returns
the most suitable caret box

Definition at line 2718 of file khtml_caret.cpp.

static NodeImpl* khtml::nextLeafNode ( NodeImpl *  r,
NodeImpl *  baseElem 
)
static

Returns the next leaf node.

Using this function delivers leaf nodes as if the whole DOM tree were a linear chain of its leaf nodes.

Parameters
rdom node
baseElembase element not to search beyond
Returns
next leaf node or 0 if there are no more.

Definition at line 357 of file khtml_caret.cpp.

static RenderObject* khtml::renderObjectAbove ( RenderObject obj,
ObjectTraversalState trav,
RenderObject base 
)
inlinestatic

Like RenderObject::objectAbove, but confined to stay within base.

Parameters
objrender object to begin with
travobject traversal state, will be reset within this function
basebase render object (0: no base)

Definition at line 127 of file khtml_caret.cpp.

static RenderObject* khtml::renderObjectBelow ( RenderObject obj,
ObjectTraversalState trav,
RenderObject base 
)
inlinestatic

Like RenderObject::objectBelow, but confined to stay within base.

Parameters
objrender object to begin with
travobject traversal state, will be reset within this function
basebase render object (0: no base)

Definition at line 107 of file khtml_caret.cpp.

QColor khtml::retrieveBackgroundColor ( const RenderObject obj)

finds out the background color of an element

Parameters
objrender object
Returns
the background color. It is guaranteed that a valid color is returned.

Definition at line 248 of file helper.cpp.

InlineFlowBox* khtml::seekBaseFlowBox ( InlineBox *  b,
RenderObject base = 0 
)
inline

seeks the root line box that is the parent of the given inline box.

Parameters
bgiven inline box
basebase render object which not to step over. If base's inline flow box is hit before the root line box, the flow box is returned instead.
Returns
the root line box or the base flow box.

Definition at line 1025 of file khtml_caret.cpp.

static RenderObject* khtml::traverseRenderObjects ( RenderObject obj,
ObjectTraversalState trav,
bool  toBegin,
RenderObject base,
int &  state 
)
static

Traverses the render object tree in a fine granularity.

Parameters
objrender object
travobject traversal state
toBegintraverse towards beginning
basebase render object which this method must not advance beyond (0 means document)
stateobject advance state (enum ObjectAdvanceState)
Returns
the render object according to the state. May be the same as obj

Definition at line 60 of file khtml_caret.cpp.

Variable Documentation

bool khtml::allowWidgetPaintEvents = false

This file is part of the HTML widget for KDE.

Copyright (C) 1999-2003 Lars Knoll (knoll[email protected]@kde[email protected].org) (C) 2000-2003 Dirk Mueller (muell[email protected][email protected][email protected]de.or[email protected]g) (C) 2003 Apple Computer, Inc. (C) 2004-2006 Germain Garand (germa[email protected][email protected][email protected]books[email protected]fran[email protected]ce.or[email protected]g)

This library is free software; you can redistribute it and/or modify it under the terms of the GNU Library General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.

This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public License for more details.

You should have received a copy of the GNU Library General Public License along with this library; see the file COPYING.LIB. If not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.

Definition at line 63 of file render_replaced.cpp.

const char* const khtml::compositeOperatorNames[]
static
Initial value:
= {
"clear",
"copy",
"source-over",
"source-in",
"source-out",
"source-atop",
"destination-over",
"destination-in",
"destination-out",
"destination-atop",
"xor",
"darker",
"highlight",
"lighter"
}

Definition at line 34 of file GraphicsTypes.cpp.

const ushort khtml::dontbreakafter[]
static
Initial value:
= {
0x3012,
0xFF03,
0xFF04,
0xFF20,
0xFFE1,
0xFFE5
}

Definition at line 214 of file break_lines.cpp.

const int khtml::primes_t[]
static
Initial value:
= {
31, 61, 107, 233, 353, 541,
821, 1237, 1861, 2797, 4201, 6311,
9467, 14207, 21313, 31973, 47963, 0
}

Definition at line 31 of file seed.h.

This file is part of the KDE documentation.
Documentation copyright © 1996-2020 The KDE developers.
Generated on Fri Aug 7 2020 22:44:25 by doxygen 1.8.11 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.