1. 18 Oct, 2003 1 commit
  2. 13 Oct, 2003 1 commit
  3. 09 Oct, 2003 4 commits
  4. 07 Oct, 2003 1 commit
  5. 05 Oct, 2003 3 commits
  6. 04 Oct, 2003 1 commit
  7. 03 Oct, 2003 1 commit
  8. 06 Sep, 2003 1 commit
  9. 03 Sep, 2003 1 commit
  10. 30 Aug, 2003 1 commit
  11. 29 Aug, 2003 2 commits
  12. 21 Aug, 2003 2 commits
    • Leo Savernik's avatar
      Caret Navigation · 984b2366
      Leo Savernik authored
      =============================
      
      Caret navigation is quite complete now in terms of what the user expects.
      A fat description of a fat patch.
      
      
      Overview
      -----------------------------
      
      The patch provides the following functionality:
      - Activating the caret/updating the caret on relayout
      - Keyboard Navigation. All common keys should work as expected, also in
      combination with shift to select text -- except Ctrl+Home! (See known bugs)
      - Placing the caret by mouse.
      
      There's still no means to activate caret mode by GUI, but I think I'll add an
      action soon so that independent people can test it.
      
      All caret related changes are encapsuled in
      #ifndef KHTML_NO_CARET
      #endif
      blocks. Defining this will simply not compile caret mode in (however, I
      haven't yet tested it).
      
      
      Detailed Changes
      -----------------------------
      
      A detailed explanation of the changes follows:
      In khtml_part:
      - new property editable. Toggles whole document editable (when it's
      implemented)
      - new property caretMode. Toggles caret mode.
      - new signal caretPositionChanged.
      - Matt Newell's optimization patch for node order determination
      - trivia: replaced replace(QRegExp, QString) by replace(QChar, QChar), fixed
      typos
      
      In khtmlview:
      - main part of caret navigation logic. See architecture.
      
      In testkhtml:
      - Added two buttons to toggle editable, caret Mode.
      
      In css/:
      - Added new property -konq-user-input: [ enable | disable | none ]
      
      In dom/dom_doc:
      - Added property designMode. Functionally equivalent to KHTMLPart::editable.
      
      In dom/dom_element:
      - Added property contentEditable. It's a shortcut for inquiring this element's
      -konq-user-input value
      
      In dom/dom_node:
      - getCursor is deprecated without replacement (If anybody needs this, please
      yell).
      
      In html/:
      - changed maximum length of attribute names from 14 to 20 (contenteditable is
      15, and it took me quite a long time to find out why khtml hadn't recognized
      it in the first place)
      
      In rendering/Makefile.am:
      - activated compilation of render_line.cpp
      
      In rendering/bidi:
      - merged the Inline*Box changes from Safari in the least intrusive way.
      
      In rendering/font:
      - added comments
      - added getters for letter spacing and word spacing
      
      In rendering/render_box:
      - updated position method
      - added caretPos method
      
      In rendering/render_br:
      - simplified caretPos implementation (will vanish in a later rev.)
      
      In rendering/render_flow:
      - ported over API for line traversal from Safari.
      - added special caretPos method.
      
      In rendering/render_image:
      - added caretPos method (will vanish in a later rev.)
      
      In rendering/render_line:
      - ported from Safari, made compilable.
      - added InlineBox::minOffset, InlineBox::maxOffset
      - const'ed methods that obviously should be const but weren't
      
      In rendering/render_object:
      - ported from Safari: createInlineBox, modified position
      - renamed cursorPos to caretPos, and extended parameters
      - new methods minOffset, maxOffset
      
      In rendering/render_style:
      - added inheritable property EUserInput, accessor RenderStyle::userInput
      
      In rendering/render_text:
      - derived TextSlave from InlineBox, and renamed it to InlineTextBox
      - made InlineTextBox::checkSelectionPoint correctly handle justified text
      - added InlineTextBox::offsetForPoint, finds approximate offset to given
      x-coordinate
      - added method InlineTextBox::width, which also treats justified text
      correctly.
      - renamed findTextSlave to findInlineTextBox and fixed it for rare cases when
      it would find the wrong text box.
      - renamed deleteTextSlaves to deleteTextBoxes
      
      In xml/:
      - implementations of the changes in dom/
      - NodeImpl: added prevLeafNode, nextLeafNode, minOffset, maxOffset
      
      
      API
      -----------------------------
      
      KHTMLPart::isCaretMode/setCaretMode
      	queries/sets caret mode
      KHTMLPart::isEditable/setEditable
      	queries/sets editability
      KHTMLPart::caretPositionChanged(DOM::Node, long offset) [signal]
      	emitted whenever caret position has been changed
      
      There's no method yet to place the caret, but one will be provided.
      
      
      Architecture
      -----------------------------
      
      For navigation purposes, the whole document is treated as a linear list of
      lines. Each line itself is composed of one to many inline boxes containing
      the actual characters/objects.
      
      As SGML-documents are represented by trees, the line representation is created
      ad hoc by the aid of several classes.
      
      LinearDocument:
      Represents the whole document as a linear list of lines. It has iterators to
      the first line, last line, beginning (before first line), and end (beyond
      last line) documents and tries to somewhat resemble STL semantics.
      
      LineIterator:
      Iterates through the lines of a LinearDocument object.
      
      EditableLineIterator:
      As not every line is necessarily editable, this iterator only delivers those
      lines which are deemed to be editable/navigable. Works otherwise just like
      LineIterator and is comparable to it.
      
      ErgonomicEditableLineIterator:
      Lines represent only one dimension. Tables bring a second dimension into play. This line iterator takes the two-dimensional nature of tables into account, and provides correct vertical navigation between table rows.
      
      InlineBoxIterator:
      Iterates through the inline boxes of a line.
      
      EditableInlineBoxIterator:
      Analogically to EditableLineIterator, this iterator only regards those boxes
      that are editable/navigable.
      
      EditableCharacterIterator:
      This iterator iterates through all leaf-node characters of the document,
      effectively treating it as a linear stream. Non-character elements are
      treated as whitespaces.
      
      Btw, these classes are *private*. And it will stay that way. I have yet to
      come up with a sensible persistent public API for customizing navigation, but
      that's far into the future.
      
      
      Known Bugs
      -----------------------------
      
      Though the suck factor of navigation has become very low, there are still the
      following known bugs (to the hundreds of not yet known):
      - caret placement by mouse doesn't work reliably.
      - movement through tables rows does not always work reliably.
      - movement through invisible elements is possible (that looks so stupid, you
      can't imagine)
      - when caret mode is initially activated, the caret does sometimes not move on
      the first keypress.
      - sometimes, the caret gets stuck, or iterates over the same set of elements again and again.
      - Ctrl+Home does not work because it is interpreted as an accelerator by konqueror. Countermeasures still pending.
      
      
      Fixed Bug
      -----------------------------
      
      In the course of implementation I had to fix some bugs which were tolerable
      for a read-only browser, but are inacceptable for caret navigation:
      
      #46224 and dupes (but not #50683, must be investigated separately): x-range
      mismatches with justified text
      
      svn path=/trunk/kdelibs/; revision=243937
      984b2366
    • Stephan Kulow's avatar
      let's make the way true and false is spelled in our API docu consistent · 72c6d11e
      Stephan Kulow authored
      with how it's spelled in the C++ docu :)
      
      svn path=/trunk/kdelibs/; revision=243864
      72c6d11e
  13. 20 Aug, 2003 2 commits
  14. 16 Aug, 2003 1 commit
  15. 15 Aug, 2003 2 commits
  16. 13 Aug, 2003 1 commit
  17. 30 Jun, 2003 1 commit
  18. 27 Jun, 2003 1 commit
  19. 24 Jun, 2003 1 commit
  20. 21 Jun, 2003 2 commits
  21. 30 May, 2003 1 commit
  22. 19 May, 2003 1 commit
  23. 17 May, 2003 1 commit
  24. 19 Apr, 2003 1 commit
  25. 04 Apr, 2003 2 commits
  26. 30 Mar, 2003 1 commit
  27. 08 Feb, 2003 1 commit
    • Peter Kelly's avatar
      Changed the way we are handling naming of elements & attributes wrt. · 9d0dd071
      Peter Kelly authored
      namespaces. According to the DOM spec, non-namespace aware methods
      like getAttribute() and getElementsByTagName() are only supposed to
      take into account the nodeName, and ignore namespaces altogeter. So
      for example you could have several elements with the same name & prefix
      but in different namespaces, and getElementsByTagName() should match
      all of them.
      
      Previously we were doing this by taking the namespace into account. Now
      namespace aware methods instead check namespaceURI/localName, and
      non-namespace aware methods only look at the id (== nodeName)
      
      Also merged the id -> name mapping for elements/attributes into the
      IdNameMapping class to reduce code duplication, plus some other misc
      namespace related fixes.
      
      See khtmltests/regression/tests/dom/namespaces.html for more details.
      
      svn path=/trunk/kdelibs/; revision=205568
      9d0dd071
  28. 04 Feb, 2003 1 commit
  29. 03 Feb, 2003 1 commit