WebCore:
authorkocienda <kocienda@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 30 Oct 2003 23:13:10 +0000 (23:13 +0000)
committerkocienda <kocienda@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 30 Oct 2003 23:13:10 +0000 (23:13 +0000)
commit87c083ced6206a532b406cc4df8a8a5f38746469
tree02e7436d0fb3ac687d9dbd7cceb4c8aa781c2b44
parentc5b481d3096c27517a38d27120733d7086e82393
WebCore:

        Reviewed by Hyatt

Support for tabbing to links.

Fixes these bugs

<rdar://problem/3468395>: fix full keyboard access loop for buttons
<rdar://problem/3468397>: paint aqua focus rings around text links
<rdar://problem/3468406>: focused links do not activate by hitting
   return key
<rdar://problem/3468410>: paintTextOutline in RenderText objects
   should be done at a higher level
<rdar://problem/3468424>: improve function to determine if a node is
   tab selectable
<rdar://problem/3468427>: add bridge function to access active
   document view for a node
<rdar://problem/3468429>: links do not scroll into view when focusing
<rdar://problem/3468435>: when tabbing out of a frame, last focused
   node is not cleared if it is a text link
<rdar://problem/3468436>: focus on text link does not clear when
   clicking mouse in document body
<rdar://problem/3468440>: add setRect convenience to QRect
<rdar://problem/3468444>: elements paint their outlines even if they
   are not visible
<rdar://problem/3468448>: setting focus on a node sets focus on all
   its siblings
<rdar://problem/3468456>: cannot tab to form image input elements
<rdar://problem/3468461>: tab focus can seem to disappear from view on
   pages with dhtml menus
<rdar://problem/3469021>: webcore bridge nextKeyView always starts
from the beginning of the document

        * WebCore-combined.exp: Export WebCoreGraphicsBridge class
        * WebCore.exp: Ditto
        * WebCore.pbproj/project.pbxproj: Add WebCoreGraphicsBridge class
        * khtml/css/cssparser.cpp:
        (CSSParser::parseValue): border style check now take apple aqua
style into account
        * khtml/css/cssvalues.in: Add -apple-aqua border value
        * khtml/css/html4.css: Change focus, a:link:active, and a:visited:active
to use new -apple-aqua focus rings.
        * khtml/html/html_formimpl.cpp:
        (HTMLGenericFormElementImpl::isSelectable): Improve function so
that invisible elements are no longer considered selectable
        * khtml/html/html_inlineimpl.cpp:
        (HTMLAnchorElementImpl::isSelectable): Ditto.
        (HTMLAnchorElementImpl::defaultEventHandler): Make return key
activate links as well as Enter.
        * khtml/html/html_inlineimpl.h: Move isSelectable function into
implementation file.
        * khtml/rendering/render_block.cpp:
        (khtml::RenderBlock::paintObject): Do not paint outlines if
content is invisible.
        * khtml/rendering/render_flow.cpp:
        (RenderFlow::getAbsoluteRepaintRect): Improve function to correctly
calculate repaint rects including outlines.
        * khtml/rendering/render_image.cpp:
        (RenderImage::paintObject): Do not paint outlines if
        content is invisible.
        * khtml/rendering/render_inline.cpp:
        (RenderInline::paintObject): Ditto.
        (RenderInline::addFocusRingRects): New function to gather up rects
to use for painting outlines.
        (RenderInline::paintOutline): Added code to paint aqua focus rings.
        * khtml/rendering/render_inline.h:
        * khtml/rendering/render_object.cpp:
        (RenderObject::drawBorder): Add case for apple aqua border style.
        (RenderObject::addFocusRingRects): New function to gather up rects
        to use for painting outlines.
        (RenderObject::paintOutline): Added code to paint aqua focus rings.
        (RenderObject::getAbsoluteRepaintRectWithOutline): Helper function
to calculate rectangle to use for repainting when an object has an
outline.
        * khtml/rendering/render_object.h: Add addFocusRingRects declaration.
        * khtml/rendering/render_style.h: Add APPLEAQUA to border enum
        * khtml/rendering/render_text.cpp:
        (RenderText::paintObject): Removed code to draw outlines.
        * khtml/rendering/render_text.h: Ditto.
        * khtml/xml/dom_elementimpl.cpp: Removed redundant isSelectable check.
        * khtml/xml/dom_elementimpl.h: Ditto.
        * khtml/xml/dom_nodeimpl.cpp:
        (NodeImpl::isSelectable): Added.
        (NodeBaseImpl::setFocus): Do not set focus on siblings.
        * khtml/xml/dom_nodeimpl.h: Moved implementation to .cpp file.
        * kwq/KWQButton.mm:
        (-[KWQButton nextKeyView]): Send a blur before going to next
key view. This prevents focus from being lost altogether.
        (-[KWQButton previousKeyView]): Ditto.
        * kwq/KWQKHTMLPart.h: Added documentViewForNode function.
        * kwq/KWQKHTMLPart.mm:
        (KWQKHTMLPart::nextKeyViewInFrame): Add check for other focusables,
like text links.
        (KWQKHTMLPart::nextKeyViewInFrameHierarchy): Remove focus when leaving
a view.
        (KWQKHTMLPart::documentViewForNode): Added.
        (KWQKHTMLPart::khtmlMousePressEvent): Remove focus when you click in
a non-focusable area, like the document body.
        * kwq/KWQPainter.h: Added declarations.
        * kwq/KWQPainter.mm:
        (QPainterPrivate::QPainterPrivate): Modified constructor for new fields.
        (QPainter::initFocusRing): Added.
        (QPainter::addFocusRingRect): Added.
        (QPainter::drawFocusRing): Added.
        (QPainter::clearFocusRing): Added.
        * kwq/KWQRect.h:
        (QRect::setRect): Added.
        * kwq/WebCoreBridge.h:
        * kwq/WebCoreBridge.mm:
        (-[WebCoreBridge nextKeyView]): Start from the currently-focused node,
if there is one, not unconditionally from the start of the document.
        (-[WebCoreBridge previousKeyView]): Ditto
        * kwq/WebCoreGraphicsBridge.h: Added.
        * kwq/WebCoreGraphicsBridge.m: Added.
        (+[WebCoreGraphicsBridge sharedBridge]): Added.
        (-[WebCoreGraphicsBridge init]): Added.
        (-[WebCoreGraphicsBridge setFocusRingStyle:radius:color:]): Added.

WebKit:

        Reviewed by Hyatt

        * WebCoreSupport.subproj/WebBridge.m:
        (-[WebBridge documentView]): Added.
        * WebCoreSupport.subproj/WebGraphicsBridge.h: Added.
        * WebCoreSupport.subproj/WebGraphicsBridge.m: Added.
        (+[WebGraphicsBridge createSharedBridge]): Added.
        (-[WebGraphicsBridge setFocusRingStyle:radius:color:]): Added.
        * WebKit.pbproj/project.pbxproj:
        * WebView.subproj/WebFrameView.m: Create a WebGraphicsBridge
when creating a WebFrameView.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@5327 268f45cc-cd09-0410-ab3c-d52691b4dbfc
42 files changed:
WebCore/ChangeLog-2005-08-23
WebCore/WebCore-combined.exp
WebCore/WebCore.exp
WebCore/WebCore.pbproj/project.pbxproj
WebCore/khtml/css/cssparser.cpp
WebCore/khtml/css/cssvalues.c
WebCore/khtml/css/cssvalues.h
WebCore/khtml/css/cssvalues.in
WebCore/khtml/css/html4.css
WebCore/khtml/html/html_formimpl.cpp
WebCore/khtml/html/html_inlineimpl.cpp
WebCore/khtml/html/html_inlineimpl.h
WebCore/khtml/rendering/render_block.cpp
WebCore/khtml/rendering/render_flow.cpp
WebCore/khtml/rendering/render_image.cpp
WebCore/khtml/rendering/render_inline.cpp
WebCore/khtml/rendering/render_inline.h
WebCore/khtml/rendering/render_object.cpp
WebCore/khtml/rendering/render_object.h
WebCore/khtml/rendering/render_style.h
WebCore/khtml/rendering/render_text.cpp
WebCore/khtml/rendering/render_text.h
WebCore/khtml/xml/dom_elementimpl.cpp
WebCore/khtml/xml/dom_elementimpl.h
WebCore/khtml/xml/dom_nodeimpl.cpp
WebCore/khtml/xml/dom_nodeimpl.h
WebCore/kwq/KWQButton.mm
WebCore/kwq/KWQKHTMLPart.h
WebCore/kwq/KWQKHTMLPart.mm
WebCore/kwq/KWQPainter.h
WebCore/kwq/KWQPainter.mm
WebCore/kwq/KWQRect.h
WebCore/kwq/WebCoreBridge.h
WebCore/kwq/WebCoreBridge.mm
WebCore/kwq/WebCoreGraphicsBridge.h [new file with mode: 0644]
WebCore/kwq/WebCoreGraphicsBridge.m [new file with mode: 0644]
WebKit/ChangeLog
WebKit/WebCoreSupport.subproj/WebBridge.m
WebKit/WebCoreSupport.subproj/WebGraphicsBridge.h [new file with mode: 0644]
WebKit/WebCoreSupport.subproj/WebGraphicsBridge.m [new file with mode: 0644]
WebKit/WebKit.pbproj/project.pbxproj
WebKit/WebView.subproj/WebFrameView.m