• Skip to content
  • Skip to link menu
  • KDE API Reference
  • kdelibs-4.14.20 API Reference
  • KDE Home
  • Contact Us
 

KHTML

Namespaces | Classes | Typedefs | Enumerations | Functions | Variables
khtml Namespace Reference

Namespaces

 XPath
 

Classes

class  AppendNodeCommandImpl
 
class  ApplyStyleCommandImpl
 
class  CaretBox
 
class  CaretBoxIterator
 
class  CaretBoxLine
 
struct  CaretViewContext
 
class  ChildFrame
 
class  CompositeEditCommandImpl
 
class  DeleteCollapsibleWhitespaceCommandImpl
 
class  DeleteSelectionCommandImpl
 
class  DeleteTextCommandImpl
 
class  DrawContentsEvent
 
class  EditableCaretBoxIterator
 
class  EditableCharacterIterator
 
class  EditableLineIterator
 
class  EditCommandImpl
 
struct  EditorContext
 
class  ErgonomicEditableLineIterator
 
class  FilterSet
 
class  guess_arc
 
class  guess_dfa
 
class  IndentOutdentCommandImpl
 
class  InputNewlineCommandImpl
 
class  InputTextCommandImpl
 
class  InsertListCommandImpl
 
class  InsertNodeBeforeCommandImpl
 
class  InsertTextCommandImpl
 
class  JapaneseCode
 
class  JoinTextNodesCommandImpl
 
class  KHTMLWidget
 
class  LinearDocument
 
class  LineIterator
 
class  MassDeleter
 
class  MouseDoubleClickEvent
 
class  MouseEvent
 
class  MouseMoveEvent
 
class  MousePressEvent
 
class  MouseReleaseEvent
 
class  MoveSelectionCommandImpl
 
class  Path
 
struct  PathElement
 
class  RemoveCSSPropertyCommandImpl
 
class  RemoveNodeAndPruneCommandImpl
 
class  RemoveNodeAttributeCommandImpl
 
class  RemoveNodeCommandImpl
 
class  RemoveNodePreservingChildrenCommandImpl
 
class  ReplaceSelectionCommandImpl
 
class  SetNodeAttributeCommandImpl
 
class  SharedCommandImpl
 
class  SplitTextNodeCommandImpl
 
class  StringsMatcher
 
class  TableRowIterator
 
class  TypingCommandImpl
 

Typedefs

typedef MassDeleter< CaretBox > CaretBoxDeleter
 
typedef MassDeleter< CaretBoxLine > CaretBoxLineDeleter
 
typedef unsigned short ExceptionCode
 
typedef void(* PathApplierFunction) (void *info, const PathElement *)
 

Enumerations

enum  CaretAdvancePolicy { LeafsOnly, IndicatedFlows, VisibleFlows }
 
enum  CompositeOperator {
  CompositeClear, CompositeCopy, CompositeSourceOver, CompositeSourceIn,
  CompositeSourceOut, CompositeSourceAtop, CompositeDestinationOver, CompositeDestinationIn,
  CompositeDestinationOut, CompositeDestinationAtop, CompositeXOR, CompositePlusDarker,
  CompositeHighlight, CompositePlusLighter
}
 
enum  HorizontalAlignment { AlignLeft, AlignRight, AlignHCenter }
 
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  WindRule { RULE_NONZERO = 0, RULE_EVENODD = 1 }
 

Functions

static RenderObject * advanceObject (RenderObject *r, ObjectTraversalState &trav, bool toBegin, RenderObject *base, int &state)
 
static RenderObject * advanceSuitableObject (RenderObject *r, ObjectTraversalState &trav, bool toBegin, RenderObject *base, int &state)
 
void applyRule (DOM::CSSProperty *prop)
 
static void applyStyleChangeOnTheNode (ElementImpl *element, CSSStyleDeclarationImpl *style)
 
static bool checkIfNewStylingNeeded (ElementImpl *element, CSSStyleDeclarationImpl *style)
 
static RenderObject * commonAncestorTableSectionOrCell (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 ElementImpl * determineBaseElement (NodeImpl *caretNode)
 
static void ensureLeafNode (NodeImpl *&node, NodeImpl *base)
 
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 RenderObject * findRenderer (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)
 
static QRegExp fromAdBlockWildcard (const QString &wcStr)
 
static bool hasNextListItem (NodeImpl *node)
 
static bool hasPreviousListItem (NodeImpl *node)
 
static QDebug & ind (const QDebug &dbgIn, int ind)
 
static bool isBlockLevelStyle (const CSSStyleDeclarationImpl *style)
 
bool isBlockRenderReplaced (RenderObject *r)
 
static bool isCaretBoxEmpty (CaretBox *box)
 
static bool isDescendant (RenderObject *r, RenderObject *cb)
 
static bool isIndicatedFlow (RenderObject *r)
 
static bool isIndicatedInlineBox (InlineBox *box)
 
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 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 NodeImpl * nextLeafNode (NodeImpl *r, NodeImpl *baseElem)
 
static DOMString & nonBreakingSpaceString ()
 
bool parseCompositeOperator (const DOM::DOMString &s, CompositeOperator &op)
 
bool parseLineCap (const DOM::DOMString &s, LineCap &cap)
 
bool parseLineJoin (const DOM::DOMString &s, LineJoin &join)
 
static void pathLengthApplierFunction (void *info, const PathElement *element)
 
static RenderObject * renderObjectAbove (RenderObject *obj, ObjectTraversalState &trav, RenderObject *base)
 
static RenderObject * renderObjectBelow (RenderObject *obj, ObjectTraversalState &trav, RenderObject *base)
 
InlineFlowBox * seekBaseFlowBox (InlineBox *b, RenderObject *base=0)
 
static bool shouldDeleteUpstreamPosition (const Position &pos)
 
static bool shouldPruneNode (NodeImpl *node)
 
static DOMString & styleSpanClassString ()
 
static bool textNodesAreJoinable (TextImpl *text1, TextImpl *text2)
 
static Position trailingWhitespacePosition (const Position &pos)
 
static RenderObject * traverseRenderObjects (RenderObject *obj, ObjectTraversalState &trav, bool toBegin, RenderObject *base, int &state)
 

Variables

static const char *const compositeOperatorNames []
 
const int numCompositeOperatorNames = sizeof(compositeOperatorNames) / sizeof(compositeOperatorNames[0])
 

Typedef Documentation

typedef MassDeleter<CaretBox> khtml::CaretBoxDeleter

Definition at line 213 of file khtml_caret_p.h.

typedef MassDeleter<CaretBoxLine> khtml::CaretBoxLineDeleter

Definition at line 475 of file khtml_caret_p.h.

typedef unsigned short khtml::ExceptionCode

Definition at line 37 of file ExceptionCode.h.

typedef void(* khtml::PathApplierFunction) (void *info, const PathElement *)

Definition at line 66 of file Path.h.

Enumeration Type Documentation

enum khtml::CaretAdvancePolicy

caret advance policy.

Used to determine which elements are taken into account when the caret is advanced. Later policies pose refinements of all former policies.

Parameters
LeafsOnlyadvance from leave render object to leaf render object (It will allow outside flow positions if a flow wouldn't be reachable otherwise).
IndicatedFlowsplace caret also at the beginning/end of flows that have at least one visible border at any side. (It will allow not indicated flow positions if a flow wouldn't be reachable otherwise).
VisibleFlowsplace caret also at the beginning/end of any flow that has a renderer.
Enumerator
LeafsOnly 
IndicatedFlows 
VisibleFlows 

Definition at line 53 of file khtml_caret_p.h.

enum khtml::CompositeOperator
Enumerator
CompositeClear 
CompositeCopy 
CompositeSourceOver 
CompositeSourceIn 
CompositeSourceOut 
CompositeSourceAtop 
CompositeDestinationOver 
CompositeDestinationIn 
CompositeDestinationOut 
CompositeDestinationAtop 
CompositeXOR 
CompositePlusDarker 
CompositeHighlight 
CompositePlusLighter 

Definition at line 39 of file GraphicsTypes.h.

enum khtml::HorizontalAlignment
Enumerator
AlignLeft 
AlignRight 
AlignHCenter 

Definition at line 60 of file GraphicsTypes.h.

enum khtml::LineCap
Enumerator
ButtCap 
RoundCap 
SquareCap 

Definition at line 56 of file GraphicsTypes.h.

enum khtml::LineJoin
Enumerator
MiterJoin 
RoundJoin 
BevelJoin 

Definition at line 58 of file GraphicsTypes.h.

enum khtml::ObjectAdvanceState

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.
Enumerator
LeftObject 
AdvancedToSibling 
EnteredObject 

Definition at line 35 of file khtml_caret.cpp.

enum khtml::ObjectTraversalState

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
Enumerator
OutsideDescending 
InsideDescending 
InsideAscending 
OutsideAscending 

Definition at line 47 of file khtml_caret.cpp.

enum khtml::PathElementType
Enumerator
PathElementMoveToPoint 
PathElementAddLineToPoint 
PathElementAddQuadCurveToPoint 
PathElementAddCurveToPoint 
PathElementCloseSubpath 

Definition at line 53 of file Path.h.

enum khtml::WindRule
Enumerator
RULE_NONZERO 
RULE_EVENODD 

Definition at line 48 of file Path.h.

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 187 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 305 of file khtml_caret.cpp.

void khtml::applyRule ( DOM::CSSProperty *  prop)
static void khtml::applyStyleChangeOnTheNode ( ElementImpl *  element,
CSSStyleDeclarationImpl *  style 
)
static

Definition at line 609 of file htmlediting_impl.cpp.

static bool khtml::checkIfNewStylingNeeded ( ElementImpl *  element,
CSSStyleDeclarationImpl *  style 
)
static

Definition at line 865 of file htmlediting_impl.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 2160 of file khtml_caret.cpp.

DOMString khtml::compositeOperatorName ( CompositeOperator  op)

Definition at line 62 of file GraphicsTypes.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 2256 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 1187 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 1130 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 622 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 530 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 964 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 2243 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 2070 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 2098 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 584 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 2209 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 1106 of file khtml_caret.cpp.

static QRegExp khtml::fromAdBlockWildcard ( const QString &  wcStr)
static

Definition at line 39 of file khtml_filter.cpp.

static bool khtml::hasNextListItem ( NodeImpl *  node)
static

Definition at line 2911 of file htmlediting_impl.cpp.

static bool khtml::hasPreviousListItem ( NodeImpl *  node)
static

Definition at line 2901 of file htmlediting_impl.cpp.

static QDebug& khtml::ind ( const QDebug &  dbgIn,
int  ind 
)
static

Definition at line 60 of file khtml_childframe.cpp.

static bool khtml::isBlockLevelStyle ( const CSSStyleDeclarationImpl *  style)
static

Definition at line 579 of file htmlediting_impl.cpp.

bool khtml::isBlockRenderReplaced ( RenderObject *  r)
inline

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

Definition at line 943 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 1759 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 1114 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 162 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 144 of file khtml_caret.cpp.

static bool khtml::isNBSP ( const QChar &  c)
inlinestatic

Definition at line 86 of file htmlediting_impl.cpp.

static bool khtml::isOpenForMoreTypingCommand ( const EditCommandImpl *  command)
static

Definition at line 2673 of file htmlediting_impl.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 283 of file khtml_caret.cpp.

static bool khtml::isWS ( const QChar &  c)
inlinestatic

Definition at line 91 of file htmlediting_impl.cpp.

static bool khtml::isWS ( const DOMString &  text)
inlinestatic

Definition at line 96 of file htmlediting_impl.cpp.

static bool khtml::isWS ( const Position &  pos)
inlinestatic

Definition at line 104 of file htmlediting_impl.cpp.

static Position khtml::leadingWhitespacePosition ( const Position &  pos)
static

Definition at line 153 of file htmlediting_impl.cpp.

DOMString khtml::lineCapName ( LineCap  cap)

Definition at line 86 of file GraphicsTypes.cpp.

DOMString khtml::lineJoinName ( LineJoin  join)

Definition at line 111 of file GraphicsTypes.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 411 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 483 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 541 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 557 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 2591 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 2512 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 2547 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 2447 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 327 of file khtml_caret.cpp.

static DOMString& khtml::nonBreakingSpaceString ( )
static

Definition at line 200 of file htmlediting_impl.cpp.

bool khtml::parseCompositeOperator ( const DOM::DOMString &  s,
CompositeOperator &  op 
)

Definition at line 52 of file GraphicsTypes.cpp.

bool khtml::parseLineCap ( const DOM::DOMString &  s,
LineCap &  cap 
)

Definition at line 69 of file GraphicsTypes.cpp.

bool khtml::parseLineJoin ( const DOM::DOMString &  s,
LineJoin &  join 
)

Definition at line 94 of file GraphicsTypes.cpp.

static void khtml::pathLengthApplierFunction ( void *  info,
const PathElement *  element 
)
static

Definition at line 46 of file Path.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 125 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 105 of file khtml_caret.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 931 of file khtml_caret.cpp.

static bool khtml::shouldDeleteUpstreamPosition ( const Position &  pos)
static

Definition at line 1013 of file htmlediting_impl.cpp.

static bool khtml::shouldPruneNode ( NodeImpl *  node)
static

Definition at line 116 of file htmlediting_impl.cpp.

static DOMString& khtml::styleSpanClassString ( )
static

Definition at line 206 of file htmlediting_impl.cpp.

static bool khtml::textNodesAreJoinable ( TextImpl *  text1,
TextImpl *  text2 
)
static

Definition at line 192 of file htmlediting_impl.cpp.

static Position khtml::trailingWhitespacePosition ( const Position &  pos)
static

Definition at line 168 of file htmlediting_impl.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

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 int khtml::numCompositeOperatorNames = sizeof(compositeOperatorNames) / sizeof(compositeOperatorNames[0])

Definition at line 50 of file GraphicsTypes.cpp.

This file is part of the KDE documentation.
Documentation copyright © 1996-2016 The KDE developers.
Generated on Wed May 11 2016 02:39:26 by doxygen 1.8.10 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.

KHTML

Skip menu "KHTML"
  • Main Page
  • Namespace List
  • Namespace Members
  • Alphabetical List
  • Class List
  • Class Hierarchy
  • Class Members
  • File List
  • File Members
  • Related Pages

kdelibs-4.14.20 API Reference

Skip menu "kdelibs-4.14.20 API Reference"
  • DNSSD
  • Interfaces
  •   KHexEdit
  •   KMediaPlayer
  •   KSpeech
  •   KTextEditor
  • kconf_update
  • KDE3Support
  •   KUnitTest
  • KDECore
  • KDED
  • KDEsu
  • KDEUI
  • KDEWebKit
  • KDocTools
  • KFile
  • KHTML
  • KImgIO
  • KInit
  • kio
  • KIOSlave
  • KJS
  •   KJS-API
  •   WTF
  • kjsembed
  • KNewStuff
  • KParts
  • KPty
  • Kross
  • KUnitConversion
  • KUtils
  • Nepomuk
  • Plasma
  • Solid
  • Sonnet
  • ThreadWeaver
Report problems with this website to our bug tracking system.
Contact the specific authors with questions and comments about the page contents.

KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal