| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org) | 2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org) |
| 3 * (C) 1999 Antti Koivisto (koivisto@kde.org) | 3 * (C) 1999 Antti Koivisto (koivisto@kde.org) |
| 4 * (C) 2001 Peter Kelly (pmk@post.com) | 4 * (C) 2001 Peter Kelly (pmk@post.com) |
| 5 * (C) 2001 Dirk Mueller (mueller@kde.org) | 5 * (C) 2001 Dirk Mueller (mueller@kde.org) |
| 6 * (C) 2007 David Smith (catfish.man@gmail.com) | 6 * (C) 2007 David Smith (catfish.man@gmail.com) |
| 7 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2012, 2013 Apple Inc.
All rights reserved. | 7 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2012, 2013 Apple Inc.
All rights reserved. |
| 8 * (C) 2007 Eric Seidel (eric@webkit.org) | 8 * (C) 2007 Eric Seidel (eric@webkit.org) |
| 9 * | 9 * |
| 10 * This library is free software; you can redistribute it and/or | 10 * This library is free software; you can redistribute it and/or |
| (...skipping 2373 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2384 { | 2384 { |
| 2385 if (!elementData()) | 2385 if (!elementData()) |
| 2386 return false; | 2386 return false; |
| 2387 QualifiedName qName(nullAtom, localName, namespaceURI); | 2387 QualifiedName qName(nullAtom, localName, namespaceURI); |
| 2388 synchronizeAttribute(qName); | 2388 synchronizeAttribute(qName); |
| 2389 return elementData()->attributes().find(qName); | 2389 return elementData()->attributes().find(qName); |
| 2390 } | 2390 } |
| 2391 | 2391 |
| 2392 void Element::focus(const FocusParams& params) | 2392 void Element::focus(const FocusParams& params) |
| 2393 { | 2393 { |
| 2394 fprintf(stderr, "Element::focus\n"); |
| 2394 if (!isConnected()) | 2395 if (!isConnected()) |
| 2395 return; | 2396 return; |
| 2396 | 2397 |
| 2397 if (document().focusedElement() == this) | 2398 if (document().focusedElement() == this) |
| 2398 return; | 2399 return; |
| 2399 | 2400 |
| 2400 if (!document().isActive()) | 2401 if (!document().isActive()) |
| 2401 return; | 2402 return; |
| 2402 | 2403 |
| 2403 document().updateStyleAndLayoutIgnorePendingStylesheetsForNode(this); | 2404 document().updateStyleAndLayoutIgnorePendingStylesheetsForNode(this); |
| (...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2447 // and we don't want to change the focus to a new Element. | 2448 // and we don't want to change the focus to a new Element. |
| 2448 frame->selection().setSelection(newSelection, FrameSelection::CloseTypi
ng | FrameSelection::ClearTypingStyle | FrameSelection::DoNotSetFocus); | 2449 frame->selection().setSelection(newSelection, FrameSelection::CloseTypi
ng | FrameSelection::ClearTypingStyle | FrameSelection::DoNotSetFocus); |
| 2449 frame->selection().revealSelection(); | 2450 frame->selection().revealSelection(); |
| 2450 } else if (layoutObject() && !layoutObject()->isLayoutPart()) { | 2451 } else if (layoutObject() && !layoutObject()->isLayoutPart()) { |
| 2451 layoutObject()->scrollRectToVisible(boundingBox()); | 2452 layoutObject()->scrollRectToVisible(boundingBox()); |
| 2452 } | 2453 } |
| 2453 } | 2454 } |
| 2454 | 2455 |
| 2455 void Element::blur() | 2456 void Element::blur() |
| 2456 { | 2457 { |
| 2458 fprintf(stderr, "Element::blur\n"); |
| 2457 cancelFocusAppearanceUpdate(); | 2459 cancelFocusAppearanceUpdate(); |
| 2458 if (adjustedFocusedElementInTreeScope() == this) { | 2460 if (adjustedFocusedElementInTreeScope() == this) { |
| 2459 Document& doc = document(); | 2461 Document& doc = document(); |
| 2460 if (doc.page()) | 2462 if (doc.page()) |
| 2461 doc.page()->focusController().setFocusedElement(0, doc.frame()); | 2463 doc.page()->focusController().setFocusedElement(0, doc.frame()); |
| 2462 else | 2464 else |
| 2463 doc.clearFocusedElement(); | 2465 doc.clearFocusedElement(); |
| 2464 } | 2466 } |
| 2465 } | 2467 } |
| 2466 | 2468 |
| (...skipping 1302 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3769 | 3771 |
| 3770 DEFINE_TRACE_WRAPPERS(Element) | 3772 DEFINE_TRACE_WRAPPERS(Element) |
| 3771 { | 3773 { |
| 3772 if (hasRareData()) { | 3774 if (hasRareData()) { |
| 3773 visitor->traceWrappers(elementRareData()); | 3775 visitor->traceWrappers(elementRareData()); |
| 3774 } | 3776 } |
| 3775 ContainerNode::traceWrappers(visitor); | 3777 ContainerNode::traceWrappers(visitor); |
| 3776 } | 3778 } |
| 3777 | 3779 |
| 3778 } // namespace blink | 3780 } // namespace blink |
| OLD | NEW |