1. 22 Jun, 2012 1 commit
  2. 12 Jun, 2012 1 commit
    • kinuko@chromium.org's avatar
      Refactor InputType::receiveDroppedFiles to take DragData · c9b46971
      kinuko@chromium.org authored
      https://bugs.webkit.org/show_bug.cgi?id=88860
      
      Reviewed by Kent Tamura.
      
      So that we can centralize the file paths related code into FileInputType
      and makes it easier to extract more data from DragData for
      <input type=file> (like bug 88293 for directory drag-and-drop).
      
      No new tests as this has no behavioral changes.
      
      * html/FileInputType.cpp:
      (WebCore::FileInputType::receiveDroppedFiles):
      * html/FileInputType.h:
      * html/HTMLInputElement.cpp:
      (WebCore::HTMLInputElement::receiveDroppedFiles):
      * html/HTMLInputElement.h:
      * html/InputType.cpp:
      (WebCore::InputType::receiveDroppedFiles):
      * html/InputType.h:
      * page/DragController.cpp:
      (WebCore::DragController::concludeEditDrag):
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@120081 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      c9b46971
  3. 20 May, 2012 1 commit
    • shinyak@chromium.org's avatar
      [Refactoring] Node::shadowHost() and Node::setShadowHost() can be moved to ShadowRoot. · 22a3c20d
      shinyak@chromium.org authored
      https://bugs.webkit.org/show_bug.cgi?id=86585
      
      Reviewed by Hajime Morita.
      
      Since Node::shadowHost() and Node::setShadowHost() are valid only if Node is ShadowRoot,
      they should be moved to ShadowRoot.
      
      However, Node::setParent cannot be called from ShadowRoot, we add Node::setParentOrHostNode
      to call it as Node::parentOrHostNode() calls Node::parent(). Node::setParent() is now private.
      We also add SVGElementInstance::setParentOrHostNode() to share ContainerNodeAlgorithm.
      
      No new tests, no change in behavior.
      
      * dom/Attr.cpp:
      (WebCore::Attr::createTextChild):
      * dom/ContainerNode.cpp:
      (WebCore::ContainerNode::insertBeforeCommon):
      (WebCore::ContainerNode::removeBetween):
      (WebCore::ContainerNode::removeChildren):
      * dom/ContainerNodeAlgorithms.h:
      (WebCore::appendChildToContainer):
      (WebCore::Private::addChildNodesToDeletionQueue):
      * dom/ElementShadow.cpp:
      (WebCore::validateShadowRoot):
      (WebCore::ElementShadow::addShadowRoot):
      (WebCore::ElementShadow::removeAllShadowRoots):
      * dom/EventDispatcher.cpp:
      (WebCore::eventTargetRespectingSVGTargetRules):
      (WebCore::EventDispatcher::ensureEventAncestors):
      (WebCore::EventDispatcher::determineDispatchBehavior):
      * dom/EventDispatcher.h:
      (WebCore):
      (EventDispatcher):
      * dom/Node.cpp:
      (WebCore::Node::parentOrHostElement):
      * dom/Node.h:
      (Node):
      (WebCore::Node::setParentOrHostNode):
      (WebCore):
      * dom/NodeRenderingContext.cpp:
      (WebCore::NodeRenderingContext::NodeRenderingContext):
      * dom/ShadowRoot.h:
      (WebCore::ShadowRoot::host):
      (WebCore):
      (WebCore::ShadowRoot::setHost):
      * dom/TreeScope.cpp:
      (WebCore::TreeScope::focusedNode):
      * html/shadow/ContentSelectorQuery.cpp:
      (WebCore::ContentSelectorQuery::matches):
      * page/DragController.cpp:
      (WebCore::asFileInput):
      * page/EventHandler.cpp:
      (WebCore::EventHandler::handleMousePressEvent):
      (WebCore::instanceAssociatedWithShadowTreeElement):
      (WebCore::EventHandler::dispatchMouseEvent):
      * page/FocusController.cpp:
      (WebCore::FocusScope::owner):
      * rendering/RenderBlock.cpp:
      (WebCore::RenderBlock::hasLineIfEmpty):
      * svg/SVGElementInstance.h:
      (WebCore::SVGElementInstance::setParentOrHostNode):
      (SVGElementInstance):
      * svg/SVGStyledElement.cpp:
      (WebCore::SVGStyledElement::title):
      * svg/SVGTRefElement.cpp:
      (WebCore::SVGShadowText::willRecalcTextStyle):
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@117723 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      22a3c20d
  4. 16 May, 2012 1 commit
    • commit-queue@webkit.org's avatar
      [chromium] No modifier flags (shift/ctrl/alt) in drag&drop events on chromium linux · 621df958
      commit-queue@webkit.org authored
      https://bugs.webkit.org/show_bug.cgi?id=86236
      
      Patch by Varun Jain <varunjain@google.com> on 2012-05-16
      Reviewed by Tony Chang.
      
      .:
      
      * ManualTests/chromium/modifiers-during-drag-and-drop.html: Added.
      
      Source/WebCore:
      
      ManualTests: ManualTests/chromium/modifiers-during-drag-and-drop.html
      
      * page/DragController.cpp:
      (WebCore::createMouseEvent):
      * platform/DragData.cpp:
      (WebCore):
      (WebCore::DragData::modifierKeyState):
      * platform/DragData.h:
      (DragData):
      * platform/chromium/ChromiumDataObject.cpp:
      (WebCore::ChromiumDataObject::ChromiumDataObject):
      * platform/chromium/ChromiumDataObject.h:
      (WebCore::ChromiumDataObject::modifierKeyState):
      (WebCore::ChromiumDataObject::setModifierKeyState):
      (ChromiumDataObject):
      * platform/chromium/DragDataChromium.cpp:
      (WebCore::DragData::modifierKeyState):
      (WebCore):
      
      Source/WebKit/chromium:
      
      * public/WebView.h:
      (WebView):
      * src/WebViewImpl.cpp:
      (WebKit::webInputEventKeyStateToPlatformEventKeyState):
      (WebKit):
      (WebKit::WebViewImpl::dragTargetDragEnter):
      (WebKit::WebViewImpl::dragTargetDragOver):
      (WebKit::WebViewImpl::dragTargetDrop):
      (WebKit::WebViewImpl::dragTargetDragEnterOrOver):
      * src/WebViewImpl.h:
      (WebViewImpl):
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@117327 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      621df958
  5. 18 Apr, 2012 1 commit
  6. 12 Apr, 2012 1 commit
    • jchaffraix@webkit.org's avatar
      Reduce the use of RenderLayer outside of the rendering code · 9dbf6d18
      jchaffraix@webkit.org authored
      https://bugs.webkit.org/show_bug.cgi?id=83728
      
      Reviewed by Simon Fraser.
      
      Source/WebCore:
      
      Test: fast/layers/scrollByLines-overflow-no-layer.html
      
      This is mostly a layering violation change. This changes reduces the number of
      RenderLayer use outside rendering/ by a third but there are still numerous uses.
      
      While auditing the different uses of RenderLayer, I found a potential crasher
      and fixed it which is why we have a test case.
      
      * accessibility/AccessibilityRenderObject.cpp:
      (WebCore::AccessibilityRenderObject::visiblePositionForPoint):
      * dom/Document.cpp:
      (WebCore::Document::nodesFromRect):
      (WebCore::Document::handleZeroPadding):
      (WebCore::nodeFromPoint):
      (WebCore::Document::prepareMouseEvent):
      * editing/FrameSelection.cpp:
      (WebCore::FrameSelection::contains):
      * page/DragController.cpp:
      (WebCore::elementUnderMouse):
      * page/EventHandler.cpp:
      (WebCore::EventHandler::handleMouseDraggedEvent):
      (WebCore::EventHandler::eventMayStartDrag):
      (WebCore::EventHandler::updateSelectionForMouseDrag):
      (WebCore::EventHandler::hitTestResultAtPoint):
      (WebCore::EventHandler::handleWheelEvent):
      (WebCore::EventHandler::hoverTimerFired):
      (WebCore::EventHandler::handleDrag):
      Updated these call sites to use RenderView::hitTest.
      
      * css/CSSComputedStyleDeclaration.cpp:
      (WebCore::CSSComputedStyleDeclaration::getPropertyCSSValue):
      * page/FrameView.cpp:
      (WebCore::FrameView::contentsInCompositedLayer):
      (WebCore::FrameView::scrollContentsFastPath):
      Updated these call sites to use RenderObject::isComposited().
      
      * dom/Element.cpp:
      (WebCore::Element::scrollByUnits):
      Call directly RenderBox::scroll instead of calling the layer.
      This actually fixes a crasher that slipped through the cracks.
      
      * editing/visible_units.cpp:
      * html/shadow/TextControlInnerElements.cpp:
      * page/ContextMenuController.cpp:
      * page/FocusController.cpp:
      * page/Frame.cpp:
      * page/GestureTapHighlighter.cpp:
      * page/PrintContext.cpp:
      * plugins/mac/PluginViewMac.mm:
      Removed unneeded #include.
      
      * plugins/gtk/PluginViewGtk.cpp:
      * plugins/qt/PluginViewQt.cpp:
      Replaced RenderLayer.h #include with RenderObject.h as
      we use RenderObject::absoluteToLocal.
      
      * rendering/RenderObject.cpp:
      (WebCore::RenderObject::isComposited):
      * rendering/RenderObject.h:
      * rendering/RenderView.cpp:
      (WebCore::RenderView::hitTest):
      * rendering/RenderView.h:
      Added 2 new functions that pipe through the RenderLayer.
      
      LayoutTests:
      
      The test checks that calling scrollByUnit without a RenderLayer doesn't crash.
      
      * fast/layers/scrollByLines-overflow-no-layer.html: Added.
      * fast/layers/scrollByLines-overflow-no-layer-expected.txt: Added.
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@113990 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      9dbf6d18
  7. 06 Apr, 2012 1 commit
  8. 03 Apr, 2012 2 commits
  9. 02 Apr, 2012 1 commit
  10. 19 Mar, 2012 1 commit
    • enrica@apple.com's avatar
      WebKit2: create sandbox extensions for files that are dropped in an input control. · 4fbcba29
      enrica@apple.com authored
      https://bugs.webkit.org/show_bug.cgi?id=81153
      <rdar://problem/11031207>
      
      Reviewed by Alexey Proskuryakov.
      
      Source/WebCore: 
      
      Now the pasteboard access is performed only in the UI process, it is
      necessary to create sandbox extensions for each file that is dropped into
      an input type=file element. The extensions are created at the time the files
      are dropped and consumed immediately.
      
      * page/DragActions.h: Added new drag action to be used by the WebDragClient.
      * page/DragController.cpp:
      (WebCore::DragController::concludeEditDrag): Added call to the drag client with the new action.
      
      Source/WebKit/mac: 
      
      * WebCoreSupport/WebDragClient.mm:
      (WebDragClient::willPerformDragDestinationAction): Avoid calling the delegate with the new drag action.
      We want to avoid any unwanted side effects for the WebKit clients.
      
      Source/WebKit2: 
      
      Now the pasteboard access is performed only in the UI process, it is
      necessary to create sandbox extensions for each file that is dropped into
      an input type=file element. The extensions are created at the time the files
      are dropped and consumed immediately.
              
      * Platform/CoreIPC/HandleMessage.h:
      (CoreIPC::callMemberFunction): Added template that takes 8 arguments.
      * Shared/SandboxExtension.h:
      (HandleArray): Added new class to handle an array of sandbox extension handles.
      (WebKit::SandboxExtension::HandleArray::HandleArray):
      (WebKit::SandboxExtension::HandleArray::~HandleArray):
      (WebKit::SandboxExtension::HandleArray::resize):
      (WebKit::SandboxExtension::HandleArray::operator[]):
      (WebKit::SandboxExtension::HandleArray::size):
      (WebKit::SandboxExtension::HandleArray::encode):
      (WebKit::SandboxExtension::HandleArray::decode):
      * Shared/mac/SandboxExtensionMac.mm: Added new class implementation.
      (WebKit::SandboxExtension::HandleArray::HandleArray):
      (WebKit::SandboxExtension::HandleArray::~HandleArray):
      (WebKit::SandboxExtension::HandleArray::resize):
      (WebKit::SandboxExtension::HandleArray::operator[]):
      (WebKit::SandboxExtension::HandleArray::size):
      (WebKit::SandboxExtension::HandleArray::encode):
      (WebKit::SandboxExtension::HandleArray::decode):
      * UIProcess/API/mac/WKView.mm:
      (createSandboxExtensionsForFileUpload):
      (-[WKView performDragOperation:]): Added logic to create the sandbox extensions for each
      file/directory being dropped.
      * UIProcess/WebPageProxy.cpp:
      (WebKit::WebPageProxy::dragEntered):
      (WebKit::WebPageProxy::dragUpdated):
      (WebKit::WebPageProxy::dragExited):
      (WebKit::WebPageProxy::performDrag):
      (WebKit::WebPageProxy::performDragControllerAction): Added the handle array parameter.
      * UIProcess/WebPageProxy.h:
      * UIProcess/qt/QtWebPageEventHandler.cpp:
      (QtWebPageEventHandler::handleDropEvent):
      * UIProcess/API/gtk/WebKitWebViewBase.cpp:
      * UIProcess/win/WebView.cpp:
      (WebKit::WebView::Drop):
      * WebProcess/WebCoreSupport/WebDragClient.cpp:
      (WebKit::WebDragClient::willPerformDragDestinationAction): Added handling of the new DragActionUpload.
      * WebProcess/WebCoreSupport/WebPlatformStrategies.cpp:
      (WebKit::WebPlatformStrategies::getPathnamesForType): Implemented using message to the UI process.
      * WebProcess/WebPage/WebPage.cpp:
      (WebKit::WebPage::performDragControllerAction):
      (WebKit::WebPage::performUploadDragDestinationAction): Added method that consumes the received extensions.
      * WebProcess/WebPage/WebPage.h:
      * WebProcess/WebPage/WebPage.messages.in:
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@111276 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      4fbcba29
  11. 08 Mar, 2012 1 commit
    • aestes@apple.com's avatar
      REGRESSION (r105396): Dragging an iWork document into icloud.com opens it in... · 68e71f32
      aestes@apple.com authored
      REGRESSION (r105396): Dragging an iWork document into icloud.com opens it in the Mac app instead of uploading it to icloud.com
      https://bugs.webkit.org/show_bug.cgi?id=79443
      
      Reviewed by Ryosuke Niwa.
      
      Source/WebCore:
      
      icloud.com registers a drop event handler that sets display:none on the
      file input element receiving the drop. After dispatching the drop event,
      DragController hit tests the position under the mouse to see if it is a
      file input element in need of receiving files. Since the file input
      element has lost its renderer, it cannot be found by hit testing, so
      the dropped file is never attached to the file input element, no change
      event fires, and no upload commences. We want these things to happen
      even if the element is no longer visible.
      
      Since we already keep track of the file input element under the mouse
      via m_fileInputElementUnderMouse, this additional hit test is
      unnecessary. Use m_fileInputElementUnderMouse in concludeEditDrag()
      when dropping files.
      
      Test: fast/events/file-input-hidden-in-ondrop.html
      
      * page/DragController.cpp:
      (WebCore::DragController::concludeEditDrag): Use
      m_fileInputElementUnderMouse instead of the element returned by hit
      testing. Assert that m_fileInputElementUnderMouse equals the hit tested
      element unless m_fileInputElementUnderMouse doesn't have a renderer.
      
      LayoutTests:
      
      * fast/events/file-input-hidden-in-ondrop-expected.txt: Added.
      * fast/events/file-input-hidden-in-ondrop.html: Added.
      * platform/wk2/Skipped: WebKitTestRunner doesn't support
      EventSender.beginDragWithFiles().
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@110243 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      68e71f32
  12. 22 Feb, 2012 1 commit
    • rniwa@webkit.org's avatar
      Remove the remaining uses of CSSStyleDeclaration in Editor · 9a9656e8
      rniwa@webkit.org authored
      https://bugs.webkit.org/show_bug.cgi?id=78939
      
      Reviewed by Enrica Casucci.
      
      Source/WebCore:
      
      Changed the argument types of shouldApplyStyle, applyParagraphStyle, applyStyleToSelection,
      applyParagraphStyleToSelection, and computeAndSetTypingStyle in Editor from CSSStyleDeclaration
      to StylePropertySet.
      
      * WebCore.exp.in:
      * WebCore.xcodeproj/project.pbxproj:
      * editing/Editor.cpp:
      (WebCore::Editor::applyStyle):
      (WebCore::Editor::shouldApplyStyle):
      (WebCore::Editor::applyParagraphStyle):
      (WebCore::Editor::applyStyleToSelection):
      (WebCore::Editor::applyParagraphStyleToSelection):
      (WebCore::Editor::setBaseWritingDirection):
      (WebCore::Editor::computeAndSetTypingStyle):
      * editing/Editor.h:
      (WebCore):
      (Editor):
      * editing/EditorCommand.cpp:
      (WebCore::applyCommandToFrame):
      (WebCore::executeApplyParagraphStyle):
      (WebCore::executeMakeTextWritingDirectionLeftToRight):
      (WebCore::executeMakeTextWritingDirectionNatural):
      (WebCore::executeMakeTextWritingDirectionRightToLeft):
      * loader/EmptyClients.h:
      (WebCore::EmptyEditorClient::shouldApplyStyle):
      * page/DragController.cpp:
      (WebCore::DragController::concludeEditDrag):
      * page/EditorClient.h:
      (WebCore):
      (EditorClient):
      
      Source/WebKit/blackberry:
      
      * WebCoreSupport/EditorClientBlackBerry.cpp:
      (WebCore::EditorClientBlackBerry::shouldApplyStyle):
      * WebCoreSupport/EditorClientBlackBerry.h:
      (EditorClientBlackBerry):
      
      Source/WebKit/chromium:
      
      * src/EditorClientImpl.cpp:
      (WebKit::EditorClientImpl::shouldApplyStyle):
      * src/EditorClientImpl.h:
      (EditorClientImpl):
      
      Source/WebKit/efl:
      
      * WebCoreSupport/EditorClientEfl.cpp:
      (WebCore::EditorClientEfl::shouldApplyStyle):
      * WebCoreSupport/EditorClientEfl.h:
      (EditorClientEfl):
      
      Source/WebKit/gtk:
      
      * WebCoreSupport/EditorClientGtk.cpp:
      (WebKit::EditorClient::shouldApplyStyle):
      * WebCoreSupport/EditorClientGtk.h:
      (EditorClient):
      
      Source/WebKit/mac:
      
      * WebCoreSupport/WebEditorClient.h:
      (WebEditorClient):
      * WebCoreSupport/WebEditorClient.mm:
      (WebEditorClient::shouldApplyStyle):
      * WebView/WebFrame.mm:
      (-[WebFrame _setTypingStyle:withUndoAction:]):
      * WebView/WebHTMLView.mm:
      (-[WebHTMLView _applyStyleToSelection:withUndoAction:]):
      (-[WebHTMLView _changeCSSColorUsingSelector:inRange:]):
      * WebView/WebView.mm:
      (-[WebView applyStyle:]):
      
      Source/WebKit/qt:
      
      * WebCoreSupport/EditorClientQt.cpp:
      (WebCore::EditorClientQt::shouldApplyStyle):
      * WebCoreSupport/EditorClientQt.h:
      (EditorClientQt):
      
      Source/WebKit/win:
      
      * WebCoreSupport/WebEditorClient.cpp:
      (WebEditorClient::shouldApplyStyle):
      * WebCoreSupport/WebEditorClient.h:
      (WebEditorClient):
      
      Source/WebKit/wince:
      
      * WebCoreSupport/EditorClientWinCE.cpp:
      (WebKit::EditorClientWinCE::shouldApplyStyle):
      
      Source/WebKit/wx:
      
      * WebKitSupport/EditorClientWx.cpp:
      (WebCore::EditorClientWx::shouldApplyStyle):
      * WebKitSupport/EditorClientWx.h:
      (EditorClientWx):
      
      Source/WebKit2:
      
      * WebProcess/WebCoreSupport/WebEditorClient.cpp:
      (WebKit::WebEditorClient::shouldApplyStyle):
      * WebProcess/WebCoreSupport/WebEditorClient.h:
      (WebEditorClient):
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@108462 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      9a9656e8
  13. 03 Feb, 2012 2 commits
    • antti@apple.com's avatar
      Rename CSSMutableStyleDeclaration.h/.cpp to StylePropertySet.h/.cpp · f660180b
      antti@apple.com authored
      https://bugs.webkit.org/show_bug.cgi?id=77779
      
      Reviewed by Darin Adler.
      
      Source/WebCore: 
      
      Match the new class name.
      
      * CMakeLists.txt:
      * GNUmakefile.list.am:
      * Target.pri:
      * WebCore.gypi:
      * WebCore.vcproj/WebCore.vcproj:
      * WebCore.xcodeproj/project.pbxproj:
      * bindings/js/JSCSSStyleDeclarationCustom.cpp:
      * bindings/js/JSDOMBinding.h:
      * bindings/scripts/CodeGeneratorJS.pm:
      (NativeToJSValue):
      * bindings/scripts/CodeGeneratorObjC.pm:
      (AddIncludesForType):
      * css/CSSAllInOne.cpp:
      * css/CSSComputedStyleDeclaration.cpp:
      * css/CSSFontFaceRule.cpp:
      * css/CSSFontFaceRule.h:
      * css/CSSFontSelector.cpp:
      * css/CSSMutableStyleDeclaration.cpp: Removed.
      * css/CSSMutableStyleDeclaration.h: Removed.
      * css/CSSPageRule.cpp:
      * css/CSSParser.cpp:
      * css/CSSStyleRule.cpp:
      * css/CSSStyleRule.h:
      * css/StylePropertySet.cpp: Copied from Source/WebCore/css/CSSMutableStyleDeclaration.cpp.
      * css/StylePropertySet.h: Copied from Source/WebCore/css/CSSMutableStyleDeclaration.h.
      * css/WebKitCSSKeyframeRule.cpp:
      * css/WebKitCSSKeyframeRule.h:
      * css/WebKitCSSKeyframesRule.cpp:
      * css/WebKitCSSMatrix.cpp:
      * dom/CSSMappedAttributeDeclaration.h:
      * dom/ElementAttributeData.h:
      * dom/StyledElement.cpp:
      * dom/StyledElement.h:
      * editing/ApplyStyleCommand.cpp:
      * editing/DeleteButtonController.cpp:
      * editing/EditingStyle.cpp:
      * editing/Editor.cpp:
      * editing/EditorCommand.cpp:
      * editing/RemoveCSSPropertyCommand.cpp:
      * editing/ReplaceSelectionCommand.cpp:
      * editing/markup.cpp:
      * html/canvas/CanvasRenderingContext2D.cpp:
      * html/shadow/MeterShadowElement.cpp:
      * inspector/InspectorCSSAgent.cpp:
      * inspector/InspectorDOMAgent.cpp:
      * page/DragController.cpp:
      * page/Frame.cpp:
      * rendering/RenderLayer.cpp:
      * rendering/RenderTreeAsText.cpp:
      * svg/SVGFontFaceElement.h:
      (WebCore):
      
      Source/WebKit/mac: 
      
      * WebView/WebHTMLView.mm:
      
      Source/WebKit/qt: 
      
      * Api/qwebelement.cpp:
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@106695 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      f660180b
    • antti@apple.com's avatar
      https://bugs.webkit.org/show_bug.cgi?id=77740 · e89e04dc
      antti@apple.com authored
      Split CSSMutableStyleDeclaration into separate internal and CSSOM types 
      
      Reviewed by Andreas Kling and Darin Adler.
      
      Source/WebCore: 
      
      Split the CSSMutableStyleDeclaration into an internal type (StylePropertySet) and a CSSOM implementation type (PropertySetCSSStyleDeclaration).
              
      To keep things somewhat manageable, this patch does NOT
      
      - rename or add any files (so files names won't match types)
      - rename fields, methods or variables to match new type names (like CSSStyleRule::declaration() -> CSSStyleRule::propertySet())
      - try to realize any memory or performance gains (StylePropertySet loses the vptr but gains PropertySetCSSStyleDeclaration*)
      
      * WebCore.exp.in:
      * css/CSSComputedStyleDeclaration.cpp:
      (WebCore::CSSComputedStyleDeclaration::copy):
      (WebCore::CSSComputedStyleDeclaration::makeMutable):
      (WebCore::CSSComputedStyleDeclaration::copyPropertiesInSet):
      * css/CSSComputedStyleDeclaration.h:
      (WebCore):
      (CSSComputedStyleDeclaration):
      * css/CSSFontFaceRule.h:
      (WebCore::CSSFontFaceRule::style):
      (WebCore::CSSFontFaceRule::declaration):
      (WebCore::CSSFontFaceRule::setDeclaration):
      (CSSFontFaceRule):
      * css/CSSFontSelector.cpp:
      (WebCore::CSSFontSelector::addFontFaceRule):
      * css/CSSMutableStyleDeclaration.cpp:
      (PropertySetCSSStyleDeclaration):
      (WebCore::PropertySetCSSStyleDeclaration::create):
      (WebCore::PropertySetCSSStyleDeclaration::PropertySetCSSStyleDeclaration):
      (WebCore):
      (WebCore::StylePropertySet::StylePropertySet):
      (WebCore::StylePropertySet::~StylePropertySet):
      (WebCore::StylePropertySet::deref):
      (WebCore::StylePropertySet::contextStyleSheet):
      (WebCore::StylePropertySet::copyPropertiesFrom):
      (WebCore::StylePropertySet::getPropertyValue):
      (WebCore::StylePropertySet::borderSpacingValue):
      (WebCore::StylePropertySet::appendFontLonghandValueIfExplicit):
      (WebCore::StylePropertySet::fontValue):
      (WebCore::StylePropertySet::get4Values):
      (WebCore::StylePropertySet::getLayeredShorthandValue):
      (WebCore::StylePropertySet::getShorthandValue):
      (WebCore::StylePropertySet::getCommonValue):
      (WebCore::StylePropertySet::getPropertyCSSValue):
      (WebCore::StylePropertySet::removeShorthandProperty):
      (WebCore::StylePropertySet::removeProperty):
      (WebCore::StylePropertySet::setNeedsStyleRecalc):
      (WebCore::StylePropertySet::propertyIsImportant):
      (WebCore::StylePropertySet::getPropertyShorthand):
      (WebCore::StylePropertySet::isPropertyImplicit):
      (WebCore::StylePropertySet::setProperty):
      (WebCore::StylePropertySet::parseDeclaration):
      (WebCore::StylePropertySet::addParsedProperties):
      (WebCore::StylePropertySet::addParsedProperty):
      (WebCore::StylePropertySet::asText):
      (WebCore::StylePropertySet::merge):
      (WebCore::StylePropertySet::addSubresourceStyleURLs):
      (WebCore::StylePropertySet::copyBlockProperties):
      (WebCore::StylePropertySet::removeBlockProperties):
      (WebCore::StylePropertySet::removePropertiesInSet):
      (WebCore::StylePropertySet::findPropertyWithId):
      (WebCore::StylePropertySet::propertyMatches):
      (WebCore::StylePropertySet::removeEquivalentProperties):
      (WebCore::StylePropertySet::copy):
      (WebCore::StylePropertySet::copyPropertiesInSet):
      (WebCore::StylePropertySet::ensureCSSStyleDeclaration):
      (WebCore::PropertySetCSSStyleDeclaration::length):
      (WebCore::PropertySetCSSStyleDeclaration::item):
      (WebCore::PropertySetCSSStyleDeclaration::parentRule):
      (WebCore::PropertySetCSSStyleDeclaration::cssText):
      (WebCore::PropertySetCSSStyleDeclaration::setCssText):
      (WebCore::PropertySetCSSStyleDeclaration::getPropertyCSSValue):
      (WebCore::PropertySetCSSStyleDeclaration::getPropertyValue):
      (WebCore::PropertySetCSSStyleDeclaration::getPropertyPriority):
      (WebCore::PropertySetCSSStyleDeclaration::getPropertyShorthand):
      (WebCore::PropertySetCSSStyleDeclaration::isPropertyImplicit):
      (WebCore::PropertySetCSSStyleDeclaration::setProperty):
      (WebCore::PropertySetCSSStyleDeclaration::removeProperty):
      (WebCore::PropertySetCSSStyleDeclaration::getPropertyCSSValueInternal):
      (WebCore::PropertySetCSSStyleDeclaration::getPropertyValueInternal):
      (WebCore::PropertySetCSSStyleDeclaration::setPropertyInternal):
      (WebCore::PropertySetCSSStyleDeclaration::parentStyleSheet):
      (WebCore::PropertySetCSSStyleDeclaration::copy):
      (WebCore::PropertySetCSSStyleDeclaration::makeMutable):
      (WebCore::PropertySetCSSStyleDeclaration::cssPropertyMatches):
      * css/CSSMutableStyleDeclaration.h:
      (WebCore):
      (StylePropertySet):
      (WebCore::StylePropertySet::create):
      (WebCore::StylePropertySet::createInline):
      * css/CSSPageRule.h:
      (WebCore):
      * css/CSSParser.cpp:
      (WebCore::parseColorValue):
      (WebCore::parseSimpleLengthValue):
      (WebCore::CSSParser::parseValue):
      (WebCore::CSSParser::parseDeclaration):
      (WebCore::CSSParser::createStyleRule):
      (WebCore::CSSParser::createFontFaceRule):
      (WebCore::CSSParser::createPageRule):
      (WebCore::CSSParser::createKeyframeRule):
      * css/CSSParser.h:
      (WebCore):
      (CSSParser):
      * css/CSSStyleDeclaration.h:
      (WebCore):
      (CSSStyleDeclaration):
      * css/CSSStyleRule.h:
      (WebCore::CSSStyleRule::style):
      (WebCore::CSSStyleRule::setDeclaration):
      (WebCore::CSSStyleRule::declaration):
      (CSSStyleRule):
      * css/CSSStyleSelector.cpp:
      (WebCore::leftToRightDeclaration):
      (WebCore::rightToLeftDeclaration):
      (WebCore::CSSStyleSelector::addMatchedDeclaration):
      (WebCore::CSSStyleSelector::collectMatchingRulesForList):
      (WebCore::CSSStyleSelector::matchAllRules):
      (WebCore::CSSStyleSelector::styleForKeyframe):
      (WebCore::isInsideRegionRule):
      (WebCore::CSSStyleSelector::applyDeclaration):
      (WebCore::CSSStyleSelector::applyDeclarations):
      (WebCore::CSSStyleSelector::matchPageRulesForList):
      * css/CSSStyleSelector.h:
      (CSSStyleSelector):
      (MatchedStyleDeclaration):
      * css/WebKitCSSKeyframeRule.cpp:
      (WebCore::WebKitCSSKeyframeRule::setDeclaration):
      * css/WebKitCSSKeyframeRule.h:
      (WebCore::WebKitCSSKeyframeRule::style):
      (WebCore::WebKitCSSKeyframeRule::declaration):
      (WebKitCSSKeyframeRule):
      * css/WebKitCSSMatrix.cpp:
      (WebCore::WebKitCSSMatrix::setMatrixValue):
      * dom/Attr.h:
      (WebCore::Attr::style):
      * dom/Attribute.h:
      (WebCore::Attribute::decl):
      * dom/CSSMappedAttributeDeclaration.h:
      (WebCore::CSSMappedAttributeDeclaration::declaration):
      (WebCore::CSSMappedAttributeDeclaration::CSSMappedAttributeDeclaration):
      (CSSMappedAttributeDeclaration):
      * dom/Document.cpp:
      (WebCore::Document::createCSSStyleDeclaration):
      * dom/ElementAttributeData.h:
      (ElementAttributeData):
      * dom/NamedNodeMap.cpp:
      (WebCore::NamedNodeMap::ensureInlineStyleDecl):
      * dom/NamedNodeMap.h:
      (WebCore::NamedNodeMap::inlineStyleDecl):
      (NamedNodeMap):
      * dom/StyledElement.cpp:
      (WebCore::StyledElement::updateStyleAttribute):
      (WebCore::StyledElement::copyNonAttributeProperties):
      (WebCore::StyledElement::addSubresourceAttributeURLs):
      * dom/StyledElement.h:
      (WebCore::StyledElement::additionalAttributeStyle):
      (WebCore::StyledElement::inlineStyleDecl):
      (WebCore::StyledElement::ensureInlineStyleDecl):
      * editing/ApplyStyleCommand.cpp:
      (WebCore::ApplyStyleCommand::applyRelativeFontStyleChange):
      (WebCore::ApplyStyleCommand::removeEmbeddingUpToEnclosingBlock):
      (WebCore::ApplyStyleCommand::applyInlineStyleToNodeRange):
      (WebCore::ApplyStyleCommand::removeCSSStyle):
      (WebCore::ApplyStyleCommand::addBlockStyle):
      (WebCore::ApplyStyleCommand::addInlineStyleIfNeeded):
      * editing/DeleteButtonController.cpp:
      (WebCore::DeleteButtonController::createDeletionUI):
      * editing/EditingStyle.cpp:
      (WebCore::copyEditingProperties):
      (WebCore::editingStyleFromComputedStyle):
      (WebCore):
      (WebCore::HTMLElementEquivalent::propertyExistsInStyle):
      (HTMLElementEquivalent):
      (WebCore::HTMLElementEquivalent::valueIsPresentInStyle):
      (HTMLTextDecorationEquivalent):
      (WebCore::HTMLTextDecorationEquivalent::propertyExistsInStyle):
      (WebCore::HTMLTextDecorationEquivalent::valueIsPresentInStyle):
      (HTMLAttributeEquivalent):
      (WebCore::HTMLAttributeEquivalent::valueIsPresentInStyle):
      (WebCore::HTMLAttributeEquivalent::attributeValueAsCSSValue):
      (WebCore::EditingStyle::EditingStyle):
      (WebCore::getRGBAFontColor):
      (WebCore::EditingStyle::setProperty):
      (WebCore::EditingStyle::setStyle):
      (WebCore::EditingStyle::overrideWithStyle):
      (WebCore::EditingStyle::extractAndRemoveTextDirection):
      (WebCore::EditingStyle::removeStyleAddedByNode):
      (WebCore::EditingStyle::removeStyleConflictingWithStyleOfNode):
      (WebCore::EditingStyle::triStateOfStyle):
      (WebCore::EditingStyle::conflictsWithInlineStyleOfElement):
      (WebCore::EditingStyle::elementIsStyledSpanOrHTMLEquivalent):
      (WebCore::elementMatchesAndPropertyIsNotInInlineStyleDecl):
      (WebCore::EditingStyle::mergeStyle):
      (WebCore::styleFromMatchedRulesForElement):
      (WebCore::EditingStyle::mergeStyleFromRules):
      (WebCore::EditingStyle::mergeStyleFromRulesForSerialization):
      (WebCore::removePropertiesInStyle):
      (WebCore::EditingStyle::removeStyleFromRulesAndContext):
      (WebCore::EditingStyle::removePropertiesInElementDefaultStyle):
      (WebCore::EditingStyle::forceInline):
      (WebCore::reconcileTextDecorationProperties):
      (WebCore::StyleChange::StyleChange):
      (WebCore::setTextDecorationProperty):
      (WebCore::StyleChange::extractTextStyles):
      (WebCore::diffTextDecorations):
      (WebCore::fontWeightIsBold):
      (WebCore::getTextAlignment):
      (WebCore::getPropertiesNotIn):
      (WebCore::getIdentifierValue):
      (WebCore::isTransparentColorValue):
      (WebCore::hasTransparentBackgroundColor):
      * editing/EditingStyle.h:
      (WebCore):
      (WebCore::EditingStyle::create):
      (EditingStyle):
      (WebCore::EditingStyle::style):
      (StyleChange):
      * editing/Editor.cpp:
      (WebCore::Editor::setBaseWritingDirection):
      (WebCore::Editor::applyEditingStyleToElement):
      * editing/EditorCommand.cpp:
      (WebCore::applyCommandToFrame):
      (WebCore::executeApplyStyle):
      (WebCore::executeToggleStyleInList):
      (WebCore::executeApplyParagraphStyle):
      (WebCore::executeMakeTextWritingDirectionLeftToRight):
      (WebCore::executeMakeTextWritingDirectionNatural):
      (WebCore::executeMakeTextWritingDirectionRightToLeft):
      * editing/FrameSelection.cpp:
      (WebCore::FrameSelection::copyTypingStyle):
      * editing/FrameSelection.h:
      (WebCore):
      * editing/RemoveCSSPropertyCommand.cpp:
      (WebCore::RemoveCSSPropertyCommand::doApply):
      (WebCore::RemoveCSSPropertyCommand::doUnapply):
      * editing/ReplaceSelectionCommand.cpp:
      (WebCore::ReplaceSelectionCommand::removeRedundantStylesAndKeepStyleSpanInline):
      * editing/ReplaceSelectionCommand.h:
      (WebCore):
      * editing/markup.cpp:
      (WebCore):
      (StyledMarkupAccumulator):
      (WebCore::StyledMarkupAccumulator::wrapWithStyleNode):
      (WebCore::StyledMarkupAccumulator::appendStyleNodeOpenTag):
      (WebCore::propertyMissingOrEqualToNone):
      * html/HTMLTableCellElement.cpp:
      (WebCore::HTMLTableCellElement::additionalAttributeStyle):
      * html/HTMLTableCellElement.h:
      (HTMLTableCellElement):
      * html/HTMLTableColElement.cpp:
      (WebCore::HTMLTableColElement::additionalAttributeStyle):
      * html/HTMLTableColElement.h:
      (HTMLTableColElement):
      * html/HTMLTableElement.cpp:
      (WebCore::leakBorderStyle):
      (WebCore::HTMLTableElement::additionalAttributeStyle):
      (WebCore::HTMLTableElement::createSharedCellStyle):
      (WebCore::HTMLTableElement::additionalCellStyle):
      (WebCore::leakGroupBorderStyle):
      (WebCore::HTMLTableElement::additionalGroupStyle):
      * html/HTMLTableElement.h:
      (HTMLTableElement):
      * html/HTMLTableSectionElement.cpp:
      (WebCore::HTMLTableSectionElement::additionalAttributeStyle):
      * html/HTMLTableSectionElement.h:
      (HTMLTableSectionElement):
      * html/ValidationMessage.cpp:
      (WebCore::adjustBubblePosition):
      * html/canvas/CanvasRenderingContext2D.cpp:
      (WebCore::CanvasRenderingContext2D::setFont):
      * html/shadow/MediaControlElements.cpp:
      (WebCore::MediaControlPanelElement::setPosition):
      (WebCore::MediaControlPanelElement::resetPosition):
      (WebCore::MediaControlPanelElement::makeOpaque):
      (WebCore::MediaControlPanelElement::makeTransparent):
      * html/shadow/SliderThumbElement.cpp:
      (WebCore::TrackLimiterElement::create):
      * inspector/InspectorCSSAgent.cpp:
      (WebCore::InspectorCSSAgent::buildArrayForAttributeStyles):
      * inspector/InspectorStyleSheet.cpp:
      (WebCore::InspectorStyle::setPropertyText):
      (WebCore::InspectorStyleSheetForInlineStyle::getStyleAttributeRanges):
      * page/DragController.cpp:
      (WebCore::DragController::concludeEditDrag):
      * page/PageSerializer.cpp:
      (WebCore::PageSerializer::retrieveResourcesForCSSDeclaration):
      * page/PageSerializer.h:
      (WebCore):
      (PageSerializer):
      * rendering/RenderLayer.cpp:
      (WebCore::RenderLayer::resize):
      * rendering/RenderTreeAsText.cpp:
      (WebCore::isEmptyOrUnstyledAppleStyleSpan):
      * svg/SVGFontFaceElement.cpp:
      (WebCore::SVGFontFaceElement::SVGFontFaceElement):
      
      Source/WebKit/mac: 
      
      * WebView/WebFrame.mm:
      (-[WebFrame _typingStyle]):
      
      Source/WebKit/qt: 
      
      * Api/qwebelement.cpp:
      (QWebElement::styleProperty):
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@106681 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      e89e04dc
  14. 01 Feb, 2012 1 commit
    • hayato@chromium.org's avatar
      Change class hierarycy so that ShadowRoot can inherit DocumentFragment. · 81596e47
      hayato@chromium.org authored
      https://bugs.webkit.org/show_bug.cgi?id=76693
      
      Reviewed by Darin Adler.
      
      Make ShadowRoot inherit DocumentFragment so that it matches the class hierarchy of IDL in the spec.
      TreeScope becomes a separated class, which is now inherited by Document and ShadowRoot using multiple-inheritance.
      This patch is pre-requirement for coming IDL change.
      
      No tests. No change in behavior.
      
      * dom/Document.cpp:
      (WebCore::Document::Document):
      (WebCore::Document::~Document):
      (WebCore::Document::buildAccessKeyMap):
      (WebCore::Document::childrenChanged):
      (WebCore::Document::attach):
      (WebCore::Document::detach):
      * dom/Document.h:
      (Document):
      * dom/DocumentFragment.cpp:
      (WebCore::DocumentFragment::DocumentFragment):
      * dom/DocumentFragment.h:
      (DocumentFragment):
      * dom/DocumentOrderedMap.cpp:
      (WebCore::DocumentOrderedMap::get):
      * dom/ShadowRoot.cpp:
      (WebCore::ShadowRoot::ShadowRoot):
      (WebCore::ShadowRoot::~ShadowRoot):
      (WebCore::ShadowRoot::attach):
      * dom/ShadowRoot.h:
      * dom/TreeScope.cpp:
      (WebCore::TreeScope::TreeScope):
      (WebCore::TreeScope::~TreeScope):
      (WebCore::TreeScope::setParentTreeScope):
      (WebCore::TreeScope::getImageMap):
      (WebCore::TreeScope::findAnchor):
      * dom/TreeScope.h:
      (WebCore):
      (WebCore::TreeScope::rootNode):
      (TreeScope):
      * dom/TreeScopeAdopter.cpp:
      (WebCore::TreeScopeAdopter::moveTreeToNewScope):
      * page/DragController.cpp:
      (WebCore::asFileInput):
      * page/FocusController.cpp:
      (WebCore::ownerOfTreeScope):
      (WebCore::FocusController::nextFocusableNode):
      (WebCore::FocusController::previousFocusableNode):
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@106530 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      81596e47
  15. 30 Jan, 2012 2 commits
    • commit-queue@webkit.org's avatar
      single-file input elements should refuse multi-file drags · 76c0798e
      commit-queue@webkit.org authored
      https://bugs.webkit.org/show_bug.cgi?id=25913
      
      Patch by Rakesh KN <rakesh.kn@motorola.com> on 2012-01-30
      Reviewed by Eric Seidel.
      
      Refuse the multiple file drags onto a single file input element.
      
      Source/WebCore:
      
      No new tests: Covered by existing tests, updated the expected results.
      
      * page/DragController.cpp:
      (WebCore::DragController::tryDocumentDrag):
      Setting the dragSession.numberOfItemsToBeAccepted to 0 so that drag operation is none if the
      file input element under mouse is single input type and number of files dragged onto that
      input element are more than 1.
      
      LayoutTests:
      
      * editing/pasteboard/file-input-files-access-expected.txt:
      Expected result changed.
      * editing/pasteboard/script-tests/file-input-files-access.js:
      (runTest):
      Removed the 'FIXME' debug and comment as it is not valid after this change.
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@106301 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      76c0798e
    • antti@apple.com's avatar
      Reduce non-CSSOM API of CSSStyleDeclaration · f9ae0524
      antti@apple.com authored
      https://bugs.webkit.org/show_bug.cgi?id=77299
      
      Reviewed by Andreas Kling.
      
      ../WebCore: 
      
      CSSStyleDeclaration should expose the CSSOM API only. Subclasses should expose the internal API only. 
      This will move us closer to being able to split the CSSOM API from the internal implementation.
              
      - Make CSSStyleDeclaration CSSOM functions virtual, internal functions non-virtual.
      - Move implementations to subclasses (CSSComputedStyleDeclaration, CSSMutableStyleDeclaration).
      - Make CSSOM functions in the subclasses private (making it harder to invoke them internally).
      - Switch a bunch of places to use internal API instead of CSSOM.
      
      * bindings/v8/custom/V8CSSStyleDeclarationCustom.cpp:
      (WebCore::V8CSSStyleDeclaration::namedPropertyGetter):
      (WebCore::V8CSSStyleDeclaration::namedPropertySetter):
              
          Switch to *Internal versions of the CSSOM functions.
              
      * css/CSSComputedStyleDeclaration.cpp:
      (WebCore):
      (WebCore::CSSComputedStyleDeclaration::length):
      (WebCore::CSSComputedStyleDeclaration::cssPropertyMatches):
      (WebCore::CSSComputedStyleDeclaration::copyPropertiesInSet):
              
          Move copyPropertiesInSet to subclasses, devirtualize.
                  
      (WebCore::CSSComputedStyleDeclaration::getPropertyCSSValue):
      (WebCore::CSSComputedStyleDeclaration::getPropertyValue):
      (WebCore::CSSComputedStyleDeclaration::getPropertyPriority):
      (WebCore::CSSComputedStyleDeclaration::getPropertyShorthand):
      (WebCore::CSSComputedStyleDeclaration::isPropertyImplicit):
      (WebCore::CSSComputedStyleDeclaration::setProperty):
      (WebCore::CSSComputedStyleDeclaration::removeProperty):
      * css/CSSComputedStyleDeclaration.h:
      (CSSComputedStyleDeclaration):
      * css/CSSFontFaceRule.cpp:
      (WebCore::CSSFontFaceRule::cssText):
      * css/CSSMutableStyleDeclaration.cpp:
      (WebCore::CSSMutableStyleDeclaration::length):
      (WebCore::CSSMutableStyleDeclaration::asText):
      (WebCore::CSSMutableStyleDeclaration::cssText):
      (WebCore):
      (WebCore::CSSMutableStyleDeclaration::getPropertyCSSValue):
      (WebCore::CSSMutableStyleDeclaration::getPropertyValue):
      (WebCore::CSSMutableStyleDeclaration::getPropertyPriority):
      (WebCore::CSSMutableStyleDeclaration::getPropertyShorthand):
      (WebCore::CSSMutableStyleDeclaration::isPropertyImplicit):
      (WebCore::CSSMutableStyleDeclaration::setProperty):
      (WebCore::CSSMutableStyleDeclaration::removeProperty):
      (WebCore::CSSMutableStyleDeclaration::copyPropertiesInSet):
              
          Move copyPropertiesInSet to subclasses, devirtualize.
              
      (WebCore::CSSMutableStyleDeclaration::cssPropertyMatches):
      (WebCore::CSSMutableStyleDeclaration::removeEquivalentProperties):
              
          Move diff() to CSSMutableStyleDeclaration, rename to removeEquivalentProperties, switch to mutate
          this object instead of the argument object.
          
      * css/CSSMutableStyleDeclaration.h:
      (CSSMutableStyleDeclaration):
      (WebCore::CSSMutableStyleDeclaration::propertyCount):
      (WebCore::CSSMutableStyleDeclaration::isEmpty):
      (WebCore::CSSMutableStyleDeclaration::propertyAt):
              
          Expose properties and property count internally (iterator should be removed in favor of these).
              
      * css/CSSStyleDeclaration.cpp:
      (WebCore):
      * css/CSSStyleDeclaration.h:
      (CSSStyleDeclaration):
      (WebCore::CSSStyleDeclaration::getPropertyCSSValueInternal):
      (WebCore::CSSStyleDeclaration::getPropertyValueInternal):
      (WebCore::CSSStyleDeclaration::setPropertyInternal):
              
          Add *Internal versions of some CSSOM APIs to support some editing and bindings uses.
          These take propertyIDs instead of strings names.
      
      * css/CSSStyleRule.cpp:
      (WebCore::CSSStyleRule::cssText):
      * css/CSSStyleSelector.cpp:
      (WebCore::leftToRightDeclaration):
      (WebCore::rightToLeftDeclaration):
      (WebCore::CSSStyleSelector::collectMatchingRulesForList):
      (WebCore::CSSStyleSelector::matchPageRulesForList):
      * css/WebKitCSSKeyframeRule.cpp:
      (WebCore::WebKitCSSKeyframeRule::cssText):
      * dom/StyledElement.cpp:
      (WebCore::StyledElement::updateStyleAttribute):
      * editing/ApplyStyleCommand.cpp:
      (WebCore::ApplyStyleCommand::applyRelativeFontStyleChange):
      (WebCore::ApplyStyleCommand::removeEmbeddingUpToEnclosingBlock):
      (WebCore::ApplyStyleCommand::applyInlineStyleToNodeRange):
      (WebCore::ApplyStyleCommand::applyInlineStyleToPushDown):
      (WebCore::ApplyStyleCommand::addBlockStyle):
      (WebCore::ApplyStyleCommand::addInlineStyleIfNeeded):
      * editing/EditingStyle.cpp:
      ():
      (WebCore::copyEditingProperties):
      (WebCore):
      (WebCore::propertyCSSValue):
      (WebCore::getRGBAFontColor):
      (WebCore::EditingStyle::overrideWithStyle):
      (WebCore::EditingStyle::removeStyleAddedByNode):
      (WebCore::EditingStyle::removeStyleConflictingWithStyleOfNode):
      (WebCore::EditingStyle::triStateOfStyle):
      (WebCore::EditingStyle::styleIsPresentInComputedStyleOfNode):
      (WebCore::EditingStyle::prepareToApplyAt):
      (WebCore::removePropertiesInStyle):
      (WebCore::EditingStyle::removeStyleFromRulesAndContext):
      (WebCore::EditingStyle::removePropertiesInElementDefaultStyle):
      (WebCore::StyleChange::StyleChange):
      (WebCore::fontWeightIsBold):
      (WebCore::getPropertiesNotIn):
      (WebCore::getIdentifierValue):
      (WebCore::hasTransparentBackgroundColor):
      * editing/EditingStyle.h:
              
          Adapt to changes.
          
      (WebCore):
      * editing/ReplaceSelectionCommand.cpp:
      (WebCore::ReplaceSelectionCommand::removeRedundantStylesAndKeepStyleSpanInline):
      (WebCore::handleStyleSpansBeforeInsertion):
      (WebCore::ReplaceSelectionCommand::handleStyleSpans):
      * editing/mac/EditorMac.mm:
      (WebCore::styleForSelectionStart):
      * editing/markup.cpp:
      (WebCore::StyledMarkupAccumulator::appendStyleNodeOpenTag):
      (WebCore::StyledMarkupAccumulator::appendElement):
      * html/ImageDocument.cpp:
      (WebCore::ImageDocument::resizeImageToFit):
      (WebCore::ImageDocument::restoreImageSize):
      (WebCore::ImageDocument::windowSizeChanged):
      * html/canvas/CanvasRenderingContext2D.cpp:
      (WebCore::CanvasRenderingContext2D::setFont):
      * html/canvas/CanvasStyle.cpp:
      (WebCore::currentColor):
      * inspector/InspectorStyleSheet.cpp:
      (WebCore::InspectorStyleSheet::revalidateStyle):
      * page/PageSerializer.cpp:
      (WebCore::PageSerializer::retrieveResourcesForCSSDeclaration):
      * rendering/RenderTreeAsText.cpp:
      (WebCore::isEmptyOrUnstyledAppleStyleSpan):
      * svg/SVGStyledElement.cpp:
      (WebCore::SVGStyledElement::getPresentationAttribute):
      
      ../WebKit/qt: 
      
      * Api/qwebelement.cpp:
      (QWebElement::styleProperty):
      (QWebElement::setStyleProperty):
      * WebCoreSupport/DumpRenderTreeSupportQt.cpp:
      (DumpRenderTreeSupportQt::computedStyleIncludingVisitedInfo):
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@106247 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      f9ae0524
  16. 24 Jan, 2012 1 commit
    • antti@apple.com's avatar
      Reduce internal use of CSSStyleDeclaration base class · 041461b1
      antti@apple.com authored
      https://bugs.webkit.org/show_bug.cgi?id=76904
      
      Reviewed by Andreas Kling.
      
      Internally WebCore should use the more specific CSSMutableStyleDeclaration and CSSComputedStyleDeclaration types.
      The CSSStyleDeclaration base should be used in the DOM API functions only. This will make it easier to separate 
      internal style sheet implementation from the DOM in the future.
              
      - Switch CSSStyleDeclaration -> CSSMutableStyleDeclaration where feasible
      - Use StyledElement::ensureInlineStyleDecl() instead of Element::style() (which is a DOM API function)
      - Remove Attribute::style() which looks like a DOM API function but is not exposed.
      
      * css/CSSMutableStyleDeclaration.h:
      (WebCore::CSSMutableStyleDeclaration::getPropertyCSSValue):
      * dom/Attr.h:
      (WebCore::Attr::style):
      * dom/Attribute.h:
      * editing/EditingStyle.cpp:
      (WebCore::HTMLElementEquivalent::propertyExistsInStyle):
      (WebCore::HTMLElementEquivalent::valueIsPresentInStyle):
      (WebCore::HTMLTextDecorationEquivalent::propertyExistsInStyle):
      (WebCore::HTMLTextDecorationEquivalent::valueIsPresentInStyle):
      (WebCore::HTMLAttributeEquivalent::valueIsPresentInStyle):
      * editing/Editor.cpp:
      (WebCore::Editor::applyEditingStyleToElement):
      * editing/markup.cpp:
      (WebCore::StyledMarkupAccumulator::wrapWithStyleNode):
      (WebCore::StyledMarkupAccumulator::appendStyleNodeOpenTag):
      (WebCore::propertyMissingOrEqualToNone):
      * inspector/InspectorCSSAgent.cpp:
      (WebCore::InspectorCSSAgent::buildArrayForAttributeStyles):
      * page/DragController.cpp:
      (WebCore::DragController::concludeEditDrag):
      * page/PageSerializer.cpp:
      (WebCore::PageSerializer::serializeFrame):
      (WebCore::PageSerializer::retrieveResourcesForCSSDeclaration):
      * page/PageSerializer.h:
      * rendering/RenderLayer.cpp:
      (WebCore::RenderLayer::resize):
      * svg/SVGStyledElement.cpp:
      (WebCore::SVGStyledElement::getPresentationAttribute):
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@105739 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      041461b1
  17. 19 Jan, 2012 1 commit
    • rniwa@webkit.org's avatar
      drop event isn't fired for contentEditable in edit drag · fc342a06
      rniwa@webkit.org authored
      https://bugs.webkit.org/show_bug.cgi?id=57185
      
      Reviewed by Adam Barth.
      
      Source/WebCore: 
      
      Dispatch drop and dragend events after edit drag per HTML5 spec:
      http://www.whatwg.org/specs/web-apps/current-work/multipage/dnd.html#drag-and-drop-processing-model
      
      There are two major differences between the spec and WebKit's new behavior:
      
      While the spec says we have to insert the dragged contents immediately after dispatching drop event
      and delete the source in the default event handler of dragend event, doing so in WebKit is extremely
      difficult because of the way we manage the selection. Instead, we continue to delete the source
      and insert the dragged contents immediately after the drop event; this behavior matches that of Firefox 9.
      
      When the dragged contents and the destination of the move is in the same text node, ReplaceSelectionCommand
      may end up replacing it with a new text node. But this removal causes a problem when EventHandler uses
      the node to dispatch dragend event because the node is "orphaned" from its parent at that point. To mitigate
      this issue, we update the dragState's m_dragSrc when the node is orphaned by the edit drag. While this behavior
      may differ from the spec and other browsers, not delivering dragend to the editing host seems strictly worse than
      dispatching it at the slightly wrong target.
      
      Tests: fast/events/moving-text-should-fire-drop-and-dragend-events-2.html
             fast/events/moving-text-should-fire-drop-and-dragend-events.html
      
      * page/DragController.cpp:
      (WebCore::DragController::performDrag): Dispatch drop event even when m_isHandlingDrag is true as long
      as DragDestinationActionDHTML is an acceptable action.
      (WebCore::DragController::concludeEditDrag): Call updateDragStateAfterEditDragIfNeeded after inserting
      the dragged contents. This is necessary when ReplaceSelectionCommand or MoveSelectionCommand modifies
      the source node while inserting the dragged contents.
      * page/EventHandler.cpp:
      (WebCore::EventHandler::performDragAndDrop): Clear the drag state only if drop event's default action
      was prevented so that we dispatch dragevent event later.
      (WebCore::EventHandler::updateDragStateAfterEditDragIfNeeded): Update dragState's m_dragSrc when the node
      is orphaned. See above for the rationale.
      * page/EventHandler.h:
      
      LayoutTests: 
      
      Added tests ensure moving text in contenteditable regions fire dragstart, drop, and dragend events.
      
      * fast/events/moving-text-should-fire-drop-and-dragend-events-2-expected.txt: Added.
      * fast/events/moving-text-should-fire-drop-and-dragend-events-2.html: Added.
      * fast/events/moving-text-should-fire-drop-and-dragend-events-expected.txt: Added.
      * fast/events/moving-text-should-fire-drop-and-dragend-events.html: Added.
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@105396 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      fc342a06
  18. 10 Jan, 2012 1 commit
    • commit-queue@webkit.org's avatar
      Add NULL checks to setting access obtained on frame and document. · b96552ac
      commit-queue@webkit.org authored
      https://bugs.webkit.org/show_bug.cgi?id=72002
      
      Patch by Grzegorz Czajkowski <g.czajkowski@samsung.com> on 2012-01-10
      Reviewed by Andreas Kling.
      
      Adds NULL checks to setting object where it's required.
      Generally WebCore checks NULL which may be returned from setting object obtained
      on frame or document but in some cases these are skipped. These checks are not
      needed to setting's access on page object.
      
      * html/HTMLCanvasElement.cpp:
      (WebCore::HTMLCanvasElement::shouldAccelerate):
      * loader/DocumentLoader.cpp:
      (WebCore::DocumentLoader::scheduleArchiveLoad):
      * loader/SubframeLoader.cpp:
      (WebCore::SubframeLoader::requestPlugin):
      * loader/appcache/ApplicationCacheGroup.cpp:
      (WebCore::ApplicationCacheGroup::selectCache):
      (WebCore::ApplicationCacheGroup::selectCacheWithoutManifestURL):
      * page/DragController.cpp:
      (WebCore::DragController::draggableNode):
      * page/EventHandler.cpp:
      (WebCore::EventHandler::handleMouseReleaseEvent):
      * page/FocusController.cpp:
      (WebCore::FocusController::advanceFocusInDocumentOrder):
      * rendering/RenderFrameSet.cpp:
      (WebCore::RenderFrameSet::flattenFrameSet):
      * rendering/RenderIFrame.cpp:
      (WebCore::RenderIFrame::flattenFrame):
      * rendering/RenderLayerCompositor.cpp:
      (WebCore::RenderLayerCompositor::updateBacking):
      * rendering/RenderText.cpp:
      (WebCore::SecureTextTimer::restartWithNewText):
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@104552 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      b96552ac
  19. 20 Dec, 2011 1 commit
    • commit-queue@webkit.org's avatar
      Change adoptPtr(new ...) to ...::create in Page.cpp · 5b13798b
      commit-queue@webkit.org authored
      https://bugs.webkit.org/show_bug.cgi?id=74457
      
      Patch by Greg Billock <gbillock@google.com> on 2011-12-20
      Reviewed by Darin Adler.
      
      * dom/DeviceMotionController.cpp:
      (WebCore::DeviceMotionController::create):
      * dom/DeviceMotionController.h:
      * dom/DeviceOrientationController.cpp:
      (WebCore::DeviceOrientationController::create):
      * dom/DeviceOrientationController.h:
      * editing/FrameSelection.cpp:
      (WebCore::DragCaretController::create):
      * editing/FrameSelection.h:
      * history/BackForwardController.cpp:
      (WebCore::BackForwardController::create):
      * history/BackForwardController.h:
      * inspector/InspectorController.cpp:
      (WebCore::InspectorController::create):
      * inspector/InspectorController.h:
      * loader/ProgressTracker.cpp:
      (WebCore::ProgressTracker::create):
      * loader/ProgressTracker.h:
      * notifications/NotificationController.cpp:
      (WebCore::NotificationController::create):
      * notifications/NotificationController.h:
      * page/Chrome.cpp:
      (WebCore::Chrome::create):
      * page/Chrome.h:
      * page/ContextMenuController.cpp:
      (WebCore::ContextMenuController::create):
      * page/ContextMenuController.h:
      * page/DragController.cpp:
      (WebCore::DragController::create):
      * page/DragController.h:
      * page/FocusController.cpp:
      (WebCore::FocusController::create):
      * page/FocusController.h:
      * page/GeolocationController.cpp:
      (WebCore::GeolocationController::create):
      * page/GeolocationController.h:
      * page/Page.cpp:
      (WebCore::Page::Page):
      (WebCore::Page::initGroup):
      (WebCore::Page::speechInput):
      * page/PageGroup.cpp:
      (WebCore::PageGroup::create):
      * page/PageGroup.h:
      * page/Settings.cpp:
      (WebCore::Settings::create):
      * page/Settings.h:
      * page/SpeechInput.cpp:
      (WebCore::SpeechInput::create):
      * page/SpeechInput.h:
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@103365 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      5b13798b
  20. 19 Dec, 2011 1 commit
    • weinig@apple.com's avatar
      More PlatformEvent cleanup · 526a338d
      weinig@apple.com authored
      https://bugs.webkit.org/show_bug.cgi?id=74831
      
      Reviewed by Dan Bernstein.
      
      ../WebCore: 
      
      * platform/PlatformMouseEvent.h:
      (WebCore::PlatformMouseEvent::position):
      Rename pos -> position(). Remove x() and y() accessors.
      
      (WebCore::PlatformMouseEvent::globalPosition):
      Added. Replaces globalX() and globalY() accessors.
      
      (WebCore::PlatformMouseEvent::movementDelta):
      Added. Replaces movementX() and movementY() accessors.
      
      * platform/PlatformWheelEvent.h:
      (WebCore::PlatformWheelEvent::position):
      Renamed pos -> position().
      
      (WebCore::PlatformWheelEvent::globalPosition):
      Renamed globalPos -> globalPosition().
      
      * dom/MouseEvent.cpp:
      (WebCore::MouseEvent::create):
      * dom/WheelEvent.cpp:
      (WebCore::WheelEventDispatchMediator::WheelEventDispatchMediator):
      * page/DragController.cpp:
      (WebCore::DragController::startDrag):
      * page/EventHandler.cpp:
      (WebCore::EventHandler::handleMousePressEventSingleClick):
      (WebCore::EventHandler::handleMousePressEvent):
      (WebCore::EventHandler::eventMayStartDrag):
      (WebCore::EventHandler::handleMouseReleaseEvent):
      (WebCore::EventHandler::selectCursor):
      (WebCore::EventHandler::handleMouseDoubleClickEvent):
      (WebCore::EventHandler::handleMouseMoveEvent):
      (WebCore::EventHandler::dispatchDragEvent):
      (WebCore::EventHandler::prepareMouseEvent):
      (WebCore::EventHandler::dispatchMouseEvent):
      (WebCore::EventHandler::handleWheelEvent):
      (WebCore::EventHandler::sendContextMenuEvent):
      (WebCore::EventHandler::handleDrag):
      (WebCore::EventHandler::handleTouchEvent):
      * page/chromium/EventHandlerChromium.cpp:
      (WebCore::EventHandler::passMousePressEventToSubframe):
      * platform/Scrollbar.cpp:
      (WebCore::Scrollbar::mouseMoved):
      (WebCore::Scrollbar::mouseDown):
      * platform/ScrollbarThemeComposite.cpp:
      (WebCore::ScrollbarThemeComposite::hitTest):
      * platform/chromium/PopupContainer.cpp:
      (WebCore::constructRelativeMouseEvent):
      (WebCore::constructRelativeWheelEvent):
      * platform/chromium/PopupListBox.cpp:
      (WebCore::PopupListBox::handleMouseDownEvent):
      (WebCore::PopupListBox::handleMouseMoveEvent):
      (WebCore::PopupListBox::handleMouseReleaseEvent):
      (WebCore::PopupListBox::handleWheelEvent):
      * platform/chromium/ScrollbarThemeChromiumWin.cpp:
      (WebCore::ScrollbarThemeChromiumWin::shouldSnapBackToDragOrigin):
      * platform/qt/ScrollbarQt.cpp:
      (WebCore::Scrollbar::contextMenu):
      * platform/qt/ScrollbarThemeQt.cpp:
      (WebCore::ScrollbarThemeQt::hitTest):
      * platform/win/ScrollbarThemeWin.cpp:
      (WebCore::ScrollbarThemeWin::shouldSnapBackToDragOrigin):
      * rendering/RenderLayer.cpp:
      (WebCore::RenderLayer::resize):
      Update to use new names, access style.
      
      ../WebKit/chromium: 
      
      * src/WebViewImpl.cpp:
      (WebKit::WebViewImpl::mouseContextMenu):
      Update to use new names, access style.
      
      ../WebKit/gtk: 
      
      * webkit/webkitwebview.cpp:
      (webkit_web_view_forward_context_menu_event):
      (webkit_web_view_get_hit_test_result):
      Update to use new names, access style.
      
      ../WebKit/qt: 
      
      * Api/qwebpage.cpp:
      (QWebPage::swallowContextMenuEvent):
      Update to use new names, access style.
      
      ../WebKit/win: 
      
      * WebView.cpp:
      (WebView::handleMouseEvent):
      Update to use new names, access style.
      
      ../WebKit/wince: 
      
      * WebView.cpp:
      (WebView::handleMouseEvent):
      Update to use new names, access style.
      
      ../WebKit2: 
      
      * WebProcess/WebPage/WebPage.cpp:
      (WebKit::handleContextMenuEvent):
      Update to use new names, access style.
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@103297 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      526a338d
  21. 16 Dec, 2011 1 commit
    • weinig@apple.com's avatar
      Give PlatformEvents a base class · 4824ed55
      weinig@apple.com authored
      https://bugs.webkit.org/show_bug.cgi?id=74685
      
      Reviewed by Anders Carlsson.
      
      Add a base class for PlatformMouseEvent, PlatformKeyboardEvent, PlatformWheelEvent
      and PlatformGestureEvent and move Type enumeration and modifiers down to it.
      
      ../WebCore: 
      
      * CMakeLists.txt:
      * GNUmakefile.list.am:
      * Target.pri:
      * WebCore.exp.in:
      * WebCore.gypi:
      * WebCore.vcproj/WebCore.vcproj:
      * WebCore.xcodeproj/project.pbxproj:
      Add new files.
      
      * platform/PlatformEvent.cpp: Added.
      * platform/PlatformEvent.h: Added.
      (WebCore::PlatformEvent::type):
      (WebCore::PlatformEvent::shiftKey):
      (WebCore::PlatformEvent::ctrlKey):
      (WebCore::PlatformEvent::altKey):
      (WebCore::PlatformEvent::metaKey):
      (WebCore::PlatformEvent::modifiers):
      (WebCore::PlatformEvent::PlatformEvent):
      Add new class.
      
      * accessibility/mac/WebAccessibilityObjectWrapper.mm:
      (-[WebAccessibilityObjectWrapper accessibilityShowContextMenu]):
      * dom/KeyboardEvent.cpp:
      (WebCore::eventTypeForKeyboardEventType):
      * dom/MouseEvent.cpp:
      (WebCore::MouseEvent::create):
      * page/DragController.cpp:
      (WebCore::createMouseEvent):
      * page/EventHandler.cpp:
      (WebCore::EventHandler::handleGestureEvent):
      (WebCore::EventHandler::sendContextMenuEventForKey):
      (WebCore::EventHandler::fakeMouseMoveEventTimerFired):
      (WebCore::EventHandler::handleAccessKey):
      (WebCore::EventHandler::keyEvent):
      (WebCore::EventHandler::handleDrag):
      * page/blackberry/EventHandlerBlackBerry.cpp:
      (WebCore::EventHandler::accessKeyModifiers):
      * page/chromium/EventHandlerChromium.cpp:
      (WebCore::EventHandler::accessKeyModifiers):
      * page/efl/EventHandlerEfl.cpp:
      (WebCore::EventHandler::accessKeyModifiers):
      * page/gtk/EventHandlerGtk.cpp:
      (WebCore::EventHandler::accessKeyModifiers):
      * page/mac/EventHandlerMac.mm:
      (WebCore::EventHandler::accessKeyModifiers):
      * page/qt/EventHandlerQt.cpp:
      (WebCore::EventHandler::accessKeyModifiers):
      * page/win/EventHandlerWin.cpp:
      (WebCore::EventHandler::accessKeyModifiers):
      * page/wx/EventHandlerWx.cpp:
      (WebCore::EventHandler::accessKeyModifiers):
      * platform/PlatformGestureEvent.h:
      (WebCore::PlatformGestureEvent::PlatformGestureEvent):
      * platform/PlatformKeyboardEvent.h:
      (WebCore::PlatformKeyboardEvent::PlatformKeyboardEvent):
      (WebCore::PlatformKeyboardEvent::isKeypad):
      * platform/PlatformMouseEvent.h:
      (WebCore::PlatformMouseEvent::PlatformMouseEvent):
      (WebCore::PlatformMouseEvent::button):
      * platform/PlatformWheelEvent.h:
      (WebCore::PlatformWheelEvent::PlatformWheelEvent):
      * platform/ScrollAnimatorNone.cpp:
      (WebCore::ScrollAnimatorNone::zoom):
      (WebCore::ScrollAnimatorNone::handleGestureEvent):
      * platform/blackberry/PlatformKeyboardEventBlackBerry.cpp:
      (WebCore::toWebCorePlatformKeyboardEventType):
      (WebCore::PlatformKeyboardEvent::PlatformKeyboardEvent):
      (WebCore::PlatformKeyboardEvent::disambiguateKeyDownEvent):
      * platform/chromium/GestureRecognizerChromium.cpp:
      (WebCore::GestureRecognizerChromium::appendTapDownGestureEvent):
      (WebCore::GestureRecognizerChromium::appendClickGestureEvent):
      (WebCore::GestureRecognizerChromium::appendDoubleClickGestureEvent):
      (WebCore::GestureRecognizerChromium::appendScrollGestureBegin):
      (WebCore::GestureRecognizerChromium::appendScrollGestureEnd):
      (WebCore::GestureRecognizerChromium::appendScrollGestureUpdate):
      * platform/chromium/PlatformKeyboardEventChromium.cpp:
      (WebCore::PlatformKeyboardEvent::disambiguateKeyDownEvent):
      * platform/chromium/PopupContainer.cpp:
      (WebCore::PopupContainer::handleGestureEvent):
      * platform/chromium/PopupListBox.cpp:
      (WebCore::isCharacterTypeEvent):
      (WebCore::PopupListBox::handleKeyEvent):
      * platform/chromium/ScrollAnimatorChromiumMac.mm:
      (WebCore::ScrollAnimatorChromiumMac::handleGestureEvent):
      * platform/efl/PlatformKeyboardEventEfl.cpp:
      (WebCore::PlatformKeyboardEvent::PlatformKeyboardEvent):
      (WebCore::PlatformKeyboardEvent::disambiguateKeyDownEvent):
      * platform/efl/PlatformMouseEventEfl.cpp:
      (WebCore::PlatformMouseEvent::PlatformMouseEvent):
      * platform/efl/PlatformWheelEventEfl.cpp:
      (WebCore::PlatformWheelEvent::PlatformWheelEvent):
      * platform/gtk/PlatformKeyboardEventGtk.cpp:
      (WebCore::PlatformKeyboardEvent::PlatformKeyboardEvent):
      (WebCore::PlatformKeyboardEvent::disambiguateKeyDownEvent):
      * platform/gtk/PlatformMouseEventGtk.cpp:
      (WebCore::PlatformMouseEvent::PlatformMouseEvent):
      * platform/gtk/PlatformWheelEventGtk.cpp:
      (WebCore::PlatformWheelEvent::PlatformWheelEvent):
      * platform/ios/KeyEventIOS.mm:
      (WebCore::PlatformKeyboardEvent::PlatformKeyboardEvent):
      (WebCore::PlatformKeyboardEvent::disambiguateKeyDownEvent):
      * platform/mac/KeyEventMac.mm:
      (WebCore::PlatformKeyboardEvent::PlatformKeyboardEvent):
      * platform/mac/PlatformMouseEventMac.mm:
      (WebCore::mouseEventForNSEvent):
      (WebCore::PlatformMouseEvent::PlatformMouseEvent):
      * platform/mac/ScrollAnimatorMac.mm:
      (WebCore::ScrollAnimatorMac::handleGestureEvent):
      * platform/mac/WheelEventMac.mm:
      (WebCore::PlatformWheelEvent::PlatformWheelEvent):
      * platform/qt/PlatformKeyboardEventQt.cpp:
      (WebCore::PlatformKeyboardEvent::PlatformKeyboardEvent):
      (WebCore::PlatformKeyboardEvent::disambiguateKeyDownEvent):
      * platform/qt/PlatformMouseEventQt.cpp:
      (WebCore::mouseEventTypeAndMouseButtonFromQEvent):
      (WebCore::PlatformMouseEvent::PlatformMouseEvent):
      * platform/qt/WheelEventQt.cpp:
      (WebCore::PlatformWheelEvent::PlatformWheelEvent):
      * platform/win/KeyEventWin.cpp:
      (WebCore::isKeypadEvent):
      (WebCore::PlatformKeyboardEvent::PlatformKeyboardEvent):
      * platform/win/PlatformMouseEventWin.cpp:
      (WebCore::messageToEventType):
      (WebCore::PlatformMouseEvent::PlatformMouseEvent):
      * platform/win/WheelEventWin.cpp:
      (WebCore::PlatformWheelEvent::PlatformWheelEvent):
      * platform/wx/KeyboardEventWx.cpp:
      (WebCore::PlatformKeyboardEvent::PlatformKeyboardEvent):
      (WebCore::PlatformKeyboardEvent::disambiguateKeyDownEvent):
      * platform/wx/MouseEventWx.cpp:
      (WebCore::typeFromMouseEvent):
      (WebCore::PlatformMouseEvent::PlatformMouseEvent):
      * platform/wx/MouseWheelEventWx.cpp:
      (WebCore::PlatformWheelEvent::PlatformWheelEvent):
      * plugins/mac/PluginViewMac.mm:
      (WebCore::PluginView::handleKeyboardEvent):
      * testing/Internals.cpp:
      (WebCore::Internals::setZoomAnimatorTransform):
      Switch to using new names/class modifier as necessary.
      
      ../WebKit/chromium: 
      
      * src/EditorClientImpl.cpp:
      (WebKit::EditorClientImpl::interpretKeyEvent):
      (WebKit::EditorClientImpl::handleEditingKeyboardEvent):
      * src/WebAccessibilityObject.cpp:
      (WebKit::WebAccessibilityObject::keyboardShortcut):
      * src/WebInputEventConversion.cpp:
      (WebKit::PlatformMouseEventBuilder::PlatformMouseEventBuilder):
      (WebKit::PlatformWheelEventBuilder::PlatformWheelEventBuilder):
      (WebKit::PlatformGestureEventBuilder::PlatformGestureEventBuilder):
      (WebKit::toPlatformKeyboardEventType):
      * src/WebViewImpl.cpp:
      (WebKit::WebViewImpl::dragSourceEndedAt):
      * tests/InnerGestureRecognizerTest.cpp:
      (SimulateAndTestFirstClick):
      (TEST_F):
      * tests/KeyboardTest.cpp:
      (WebKit::KeyboardTest::interpretKeyEvent):
      (WebKit::KeyboardTest::interpretOSModifierKeyPress):
      (WebKit::KeyboardTest::interpretCtrlKeyPress):
      (WebKit::KeyboardTest::interpretTab):
      (WebKit::KeyboardTest::interpretNewLine):
      (WebKit::TEST_F):
      * tests/PopupMenuTest.cpp:
      (WebKit::SelectPopupMenuTest::simulateLeftMouseDownEvent):
      (WebKit::SelectPopupMenuTest::simulateLeftMouseUpEvent):
      (WebKit::TEST_F):
      
      ../WebKit/efl: 
      
      * WebCoreSupport/EditorClientEfl.cpp:
      (WebCore::EditorClientEfl::handleEditingKeyboardEvent):
      
      ../WebKit/gtk: 
      
      * WebCoreSupport/EditorClientGtk.cpp:
      (WebKit::EditorClient::handleKeyboardEvent):
      * webkit/webkitwebview.cpp:
      (webkit_web_view_popup_menu_handler):
      
      ../WebKit/mac: 
      
      * WebView/WebFrame.mm:
      (-[WebFrame _dragSourceEndedAt:operation:]):
      * WebView/WebHTMLView.mm:
      (currentKeyboardEvent):
      (-[WebHTMLView _interpretKeyEvent:savingCommands:]):
      * WebView/WebPDFView.mm:
      (-[WebPDFView PDFViewWillClickOnLink:withURL:]):
      
      ../WebKit/qt: 
      
      * WebCoreSupport/DragClientQt.cpp:
      (WebCore::DragClientQt::startDrag):
      * WebCoreSupport/EditorClientQt.cpp:
      (WebCore::EditorClientQt::handleKeyboardEvent):
      
      ../WebKit/win: 
      
      * AccessibleBase.cpp:
      (AccessibleBase::get_accKeyboardShortcut):
      * WebDropSource.cpp:
      (generateMouseEvent):
      * WebView.cpp:
      (WebView::keyUp):
      (WebView::handleEditingKeyboardEvent):
      (WebView::keyDown):
      (WebView::keyPress):
      
      ../WebKit/wince: 
      
      * WebCoreSupport/EditorClientWinCE.cpp:
      (WebKit::EditorClientWinCE::handleEditingKeyboardEvent):
      * WebView.cpp:
      (WebView::handleKeyDown):
      (WebView::handleKeyPress):
      (WebView::handleKeyUp):
      
      ../WebKit/wx: 
      
      * WebKitSupport/EditorClientWx.cpp:
      (WebCore::EditorClientWx::handleEditingKeyboardEvent):
      (WebCore::EditorClientWx::interpretKeyEvent):
      
      ../WebKit2: 
      
      * Shared/WebEventConversion.cpp:
      (WebKit::WebKit2PlatformMouseEvent::WebKit2PlatformMouseEvent):
      (WebKit::WebKit2PlatformWheelEvent::WebKit2PlatformWheelEvent):
      (WebKit::WebKit2PlatformKeyboardEvent::WebKit2PlatformKeyboardEvent):
      (WebKit::WebKit2PlatformGestureEvent::WebKit2PlatformGestureEvent):
      * WebKit2.xcodeproj/project.pbxproj:
      * WebProcess/WebCoreSupport/gtk/WebEditorClientGtk.cpp:
      (WebKit::WebEditorClient::handleKeyboardEvent):
      * WebProcess/WebPage/WebPage.cpp:
      (WebKit::handleMouseEvent):
      (WebKit::WebPage::setInitialFocus):
      (WebKit::WebPage::handleEditingKeyboardEvent):
      (WebKit::WebPage::dragEnded):
      * WebProcess/WebPage/mac/WebPageMac.mm:
      (WebKit::WebPage::executeKeypressCommandsInternal):
      (WebKit::WebPage::handleEditingKeyboardEvent):
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@103112 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      4824ed55
  22. 07 Dec, 2011 1 commit
    • ap@apple.com's avatar
      Handling of !important in inline style sets is broken · 19dcf6c3
      ap@apple.com authored
              https://bugs.webkit.org/show_bug.cgi?id=73941
      
              Reviewed by Dave Hyatt.
      
              This behavior was introduced in bug 8223 to match IE and Firefox. But it doesn't appear that we're matching
              any browser today, and CSSOM spec agrees with them.
      
              * WebCore.exp.in: Don't export CSSStyleDeclaration::setProperty(), no one is using it.
      
              * bindings/js/JSCSSStyleDeclarationCustom.cpp: (WebCore::JSCSSStyleDeclaration::putDelegate): Use regular
              setProperty(), not the incorrect version that's being removed. Properties set via IDL attributes are never
              important.
      
              * bindings/v8/custom/V8CSSStyleDeclarationCustom.cpp: (WebCore::V8CSSStyleDeclaration::namedPropertySetter):
              Made the same fix for v8. Why did v8 bindings authors copy/paste the code?!
      
              * css/CSSStyleDeclaration.cpp:
              * css/CSSStyleDeclaration.h:
              Removed a version of setProperty() that attempted to parse the value and extract !important from it.
      
              * html/ImageDocument.cpp:
              (WebCore::ImageDocument::resizeImageToFit):
              (WebCore::ImageDocument::restoreImageSize):
              (WebCore::ImageDocument::windowSizeChanged):
              * page/DragController.cpp:
              (WebCore::DragController::concludeEditDrag):
              We never needed to use this version of setProperty() here, it was just unnecessarily slower.
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@102262 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      19dcf6c3
  23. 29 Nov, 2011 1 commit
  24. 09 Nov, 2011 1 commit
  25. 08 Nov, 2011 1 commit
    • zimmermann@webkit.org's avatar
      2011-11-08 Nikolas Zimmermann <nzimmermann@rim.com> · 89d03f85
      zimmermann@webkit.org authored
              Switch SVGImage cache to store ImageBuffers instead of whole SVGImages, including a DOM/Render tree
              https://bugs.webkit.org/show_bug.cgi?id=71368
      
              Reviewed by Antti Koivisto.
      
              Add some layout tests covering repainting of embedded SVG documents triggered by SMIL animations.
      
              * platform/chromium/test_expectations.txt: Fix test expectations, as described in bug 71226.
              * platform/mac/svg/as-image/animated-svg-as-image-no-fixed-intrinsic-size-expected.png: Added.
              * platform/mac/svg/as-image/animated-svg-as-image-no-fixed-intrinsic-size-expected.txt: Added.
              * platform/mac/svg/as-image/animated-svg-as-image-same-image-expected.png: Added.
              * platform/mac/svg/as-image/animated-svg-as-image-same-image-expected.txt: Added.
              * svg/as-image/animated-svg-as-image-no-fixed-intrinsic-size.html: Added.
              * svg/as-image/animated-svg-as-image-same-image.html: Added.
              * svg/as-image/resources/animated-rect-same-image.svg: Copied from LayoutTests/svg/as-image/resources/animated-rect-fixed-size.svg.
              * svg/zoom/page/zoom-coords-viewattr-01-b.svg: Add comment, why scrollbars shouldn't appear anymore here.
      
      2011-11-08  Nikolas Zimmermann  <nzimmermann@rim.com>
      
              Switch SVGImage cache to store ImageBuffers instead of whole SVGImages, including a DOM/Render tree
              https://bugs.webkit.org/show_bug.cgi?id=71368
      
              Reviewed by Antti Koivisto.
      
              Fix regressions/races introduced by r98852. SVGImage repainting didn't work under certain circumstances.
              The problem was hard to reproduce on Mac ports, but easily visible on Chromium, when opening two files
              that shared the same animated SVG image. The problem of sharing a single ImageObserver across multiple
              instances of the same SVGImage, leads to nasty problems, that are timing dependant. changedInRect() calls
              that should only by received in one document, are received in the other as well, due the shared nature
              of CachedImage. To avoid these problems alltogether, a new approach is needed, that was initially suggested
              by Antti.
      
              Avoid creating multiple SVGImages and caching them for different sizes/zoom levels. Introduce SVGImageCache
              which holds rendered versions of the SVGImage at certain sizes/zoom levels. It holds (ImageBuffer, Image) pairs
              for each renderer, associated with a size and zoom level.
      
              This is a major change to the cache as introduced some weeks ago. Instead of holding multiple SVGImages, each containing
              a whole DOM/render tree, we now create bitmap images rendered at the requested sizes/zoom levels and cache them.
      
              Revert ImageBySizeCache changes that were needed to make it usable wih SVGImage. Its now used only in CSSImageGeneratorValue and
              thus the extra information that CSSImageGeneratorValue doesn't need can be removed again (desired/actual size differentations, and the zoom level).
      
              Tests: svg/as-image/animated-svg-as-image-no-fixed-intrinsic-size.html
                     svg/as-image/animated-svg-as-image-same-image.html
      
              * CMakeLists.txt: Add svg/graphics/SVGImageCache.* to build.
              * GNUmakefile.list.am: Ditto.
              * Target.pri: Ditto.
              * WebCore.gypi: Ditto.
              * WebCore.vcproj/WebCore.vcproj: Ditto.
              * WebCore.vcproj/copyForwardingHeaders.cmd: Copy headers from svg/graphics, as SVGImageCache is needed by CachedImage in SVG enabled builds.
              * WebCore.xcodeproj/project.pbxproj: Add svg/graphics/SVGImageCache.* to build.
              * css/CSSImageGeneratorValue.cpp: Remove zoom parameter from addClient/getImage, no need to pass 1 default values anymore.
              (WebCore::CSSImageGeneratorValue::addClient):
              (WebCore::CSSImageGeneratorValue::getImage):
              * loader/cache/CachedImage.cpp: Stop using ImageBySizeCache, and switch to the new SVGImageCache.
              (WebCore::CachedImage::removeClientForRenderer):
              (WebCore::CachedImage::lookupOrCreateImageForRenderer):
              (WebCore::CachedImage::setContainerSizeForRenderer):
              (WebCore::CachedImage::imageSizeForRenderer):
              (WebCore::CachedImage::clear):
              (WebCore::CachedImage::createImage):
              (WebCore::CachedImage::destroyDecodedData):
              (WebCore::CachedImage::decodedSizeChanged):
              (WebCore::CachedImage::didDraw):
              (WebCore::CachedImage::shouldPauseAnimation):
              (WebCore::CachedImage::animationAdvanced):
              (WebCore::CachedImage::changedInRect):
              * loader/cache/CachedImage.h:
              * page/DragController.cpp: Stop using imageForRenderer(), as it may return cached BitmapImages, that don't carry a filename extension anymore, which is required here.
              (WebCore::getImage):
              * rendering/ImageBySizeCache.cpp: Revert changes to ImageBySizeCache, which were needed to make it usable for SVGImages. CSSImageGenerator doesn't need it.
              (WebCore::ImageBySizeCache::addClient):
              (WebCore::ImageBySizeCache::removeClient):
              (WebCore::ImageBySizeCache::getImage):
              * rendering/ImageBySizeCache.h: Ditto.
              (WebCore::SizeAndCount::SizeAndCount):
              * rendering/RenderImage.cpp: Stop using imageForRenderer(), use cachedImage()->image(), which is guaranteed to be a SVGImage for svg images, and not a cached bitmap copy.
              (WebCore::RenderImage::embeddedContentBox):
              * rendering/RenderReplaced.cpp: Simplify logic to figure out the intrinsic size - the special logic for the old SVGImage cache can go away now.
              (WebCore::RenderReplaced::computeIntrinsicLogicalWidth):
              (WebCore::RenderReplaced::computeIntrinsicLogicalHeight):
              * rendering/style/StyleCachedImage.cpp: Call removeClientForRenderer(), which takes care of clearing SVGImageCache entries as well.
              (WebCore::StyleCachedImage::removeClient): This change is needed, as we don't want to make removeClient() virtual in CachedResource.
              * rendering/svg/RenderSVGRoot.cpp: Rename isEmbeddedThroughImageElement to isEmbeddedThroughSVGImage, as this is what it actually checks.
              (WebCore::RenderSVGRoot::isEmbeddedThroughSVGImage):
              * rendering/svg/RenderSVGRoot.h:
              * svg/SVGSVGElement.cpp: Fix bug that's visible now with the SVGImageCache, which was already there before, but hard to trigger.
              (WebCore::SVGSVGElement::currentViewBoxRect): The viewBox depends on who's asking for it: the host document or the embedded document? Take that into account.
              * svg/SVGSVGElement.h:
              * svg/graphics/SVGImage.cpp: Cleanup some code. Add new logic that draws a SVGImage into an ImageBuffer at a desired size & zoom.
              (WebCore::SVGImage::setContainerSize):
              (WebCore::SVGImage::size):
              (WebCore::SVGImage::drawSVGToImageBuffer):
              * svg/graphics/SVGImage.h:
              * svg/graphics/SVGImageCache.cpp: Added. SVGImageCache caches Image/ImageBuffer pairs for each _renderer_ and size/zoom level. The ImageBySizeCache only cared about size.
              (WebCore::SVGImageCache::SVGImageCache):
              (WebCore::SVGImageCache::~SVGImageCache):
              (WebCore::SVGImageCache::removeRendererFromCache):
              (WebCore::SVGImageCache::setRequestedSizeAndZoom):
              (WebCore::SVGImageCache::getRequestedSizeAndZoom):
              (WebCore::SVGImageCache::imageContentChanged):
              (WebCore::SVGImageCache::redrawTimerFired):
              (WebCore::SVGImageCache::lookupOrCreateBitmapImageForRenderer):
              * svg/graphics/SVGImageCache.h: Added.
              (WebCore::SVGImageCache::create):
              (WebCore::SVGImageCache::CachedSizeAndZoom::CachedSizeAndZoom):
              (WebCore::SVGImageCache::CachedImageData::CachedImageData):
      
      2011-11-08  Nikolas Zimmermann  <nzimmermann@rim.com>
      
              Switch SVGImage cache to store ImageBuffers instead of whole SVGImages, including a DOM/Render tree
              https://bugs.webkit.org/show_bug.cgi?id=71368
      
              Reviewed by Antti Koivisto.
      
              * CMakeLists.txt: Add svg/graphics include, for SVGImageCache.h.
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@99539 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      89d03f85
  26. 05 Nov, 2011 1 commit
    • jonlee@apple.com's avatar
      Dragging a file onto <input type="file"> should give distinct visual feedback · f9479f53
      jonlee@apple.com authored
      https://bugs.webkit.org/show_bug.cgi?id=13897
      <rdar://problem/5232483>
      
      Reviewed by Dan Bernstein.
      
      When hovering over a file input element, we set the button's state to active
      to differentiate dragging one file over the input element (which populates that
      element) versus over the document (which would load the file into the view).
      
      * html/HTMLInputElement.cpp:
      (WebCore::HTMLInputElement::HTMLInputElement):
      (WebCore::HTMLInputElement::canReceiveDroppedFiles):
      (WebCore::HTMLInputElement::setCanReceiveDroppedFiles): If set, the element
      is updated, which sets the active state on the button control.
      * html/HTMLInputElement.h: Add a boolean member representing whether the file
      input can receive dropped files.
      * page/DragController.cpp:
      (WebCore::DragController::DragController): Update/set the file input that
      can receive dropped files.
      (WebCore::DragController::dragExited):
      (WebCore::DragController::tryDocumentDrag):
      (WebCore::DragController::concludeEditDrag):
      * page/DragController.h:
      * rendering/RenderFileUploadControl.cpp:
      (WebCore::RenderFileUploadControl::updateFromElement): Sets the button active
      state if the input can receive dropped files.
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@99369 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      f9479f53
  27. 02 Nov, 2011 2 commits
    • jonlee@apple.com's avatar
      Expand DragController to provide more information about the dragging session · d18aac0a
      jonlee@apple.com authored
      https://bugs.webkit.org/show_bug.cgi?id=71324
      <rdar://problem/10379175>
      
      Reviewed by Darin Adler.
      
      Source/WebCore:
      
      * WebCore.xcodeproj/project.pbxproj:
      * page/DragController.cpp:
      (WebCore::DragController::dragEntered):
      (WebCore::DragController::dragUpdated):
      (WebCore::DragController::dragEnteredOrUpdated):
      (WebCore::DragController::tryDocumentDrag): In addition to determining the
      drag operation, DragSession is updated with data regarding whether the mouse
      is over a file input, and the number of items that would be accepted based on
      the mouse's location.
      * page/DragController.h:
      * page/DragSession.h: Added.
      (WebCore::DragSession::DragSession): Keep track of current operation, whether
      the mouse is over a file input element, and how many files would be accepted if
      dropped.
      * platform/DragData.h: Added numberOfFiles()
      * platform/chromium/DragDataChromium.cpp:
      (WebCore::DragData::numberOfFiles):
      * platform/efl/DragDataEfl.cpp:
      (WebCore::DragData::numberOfFiles):
      * platform/gtk/DragDataGtk.cpp:
      (WebCore::DragData::numberOfFiles):
      * platform/mac/DragDataMac.mm:
      (WebCore::DragData::numberOfFiles):
      * platform/qt/DragDataQt.cpp:
      (WebCore::DragData::numberOfFiles):
      * platform/win/DragDataWin.cpp:
      (WebCore::DragData::numberOfFiles):
      * platform/wince/DragDataWinCE.cpp:
      (WebCore::DragData::numberOfFiles):
      * platform/wx/DragDataWx.cpp:
      (WebCore::DragData::numberOfFiles):
      
      Source/WebKit/chromium:
      
      * src/WebViewImpl.cpp:
      (WebKit::WebViewImpl::dragTargetDragEnterOrOver): The drag operation is contained
      within the new DragSession struct. Minor refactor.
      
      Source/WebKit/gtk:
      
      * webkit/webkitwebview.cpp:
      (webkit_web_view_drag_motion): Minor refactoring.
      (webkit_web_view_drag_data_received): Minor refactoring.
      
      Source/WebKit/mac:
      
      * WebView/WebView.mm:
      (-[WebView draggingEntered:]): DragOperation is now inside the DragSession struct.
      (-[WebView draggingUpdated:]):
      
      Source/WebKit/qt:
      
      * Api/qwebpage.cpp:
      (QWebPagePrivate::dragEnterEvent): Minor refactoring because operation is stored in
      new DragSession struct.
      (QWebPagePrivate::dragMoveEvent): Ditto.
      
      Source/WebKit/win:
      
      * WebView.cpp:
      (WebView::DragEnter): Minor refactoring because operation is stored in
      new DragSession struct.
      (WebView::DragOver): Ditto.
      
      Source/WebKit2:
      
      We now pass the DragSession struct from the Web to the UI process, instead of the
      DragOperation enum.
      
      * Scripts/webkit2/messages.py:
      * Shared/WebCoreArgumentCoders.cpp:
      (CoreIPC::::encode):
      (CoreIPC::::decode):
      * Shared/WebCoreArgumentCoders.h:
      * UIProcess/API/mac/WKView.mm:
      (-[WKView draggingUpdated:]):
      * UIProcess/WebPageProxy.cpp:
      (WebKit::WebPageProxy::WebPageProxy): We now cache the last known DragSession state
      (WebKit::WebPageProxy::didPerformDragControllerAction):
      * UIProcess/WebPageProxy.h:
      (WebKit::WebPageProxy::dragSession):
      (WebKit::WebPageProxy::resetDragOperation):
      * UIProcess/WebPageProxy.messages.in:
      * UIProcess/win/WebView.cpp:
      (WebKit::WebView::keyStateToDragOperation):
      (WebKit::WebView::DragEnter):
      (WebKit::WebView::DragOver):
      * WebProcess/WebPage/WebPage.cpp:
      (WebKit::WebPage::performDragControllerAction):
      
      LayoutTests:
      
      * editing/pasteboard/script-tests/file-input-files-access.js:
      (runTest): Change the expected behavior of the test-- dragging a file over a disabled
      control should not load that file. Instead, the file should be ignored, and the page
      remains as is.
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@99108 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      d18aac0a
    • commit-queue@webkit.org's avatar
      Assert in MoveSelectionCommand::doApply · 5d5f9dc4
      commit-queue@webkit.org authored
      https://bugs.webkit.org/show_bug.cgi?id=70277
      
      Patch by Devdatta Deshpande <pwjd73@motorola.com> on 2011-11-02
      Reviewed by Ryosuke Niwa.
      
      Source/WebCore:
      
      A MoveSelectionCommand should be fired only if the selection type is
      RangeSelection, since nothing is selected in other cases.
      
      Test: fast/events/drag-link.html
      
      * page/DragController.cpp:
      (WebCore::DragController::dragIsMove):
      
      LayoutTests:
      
      Test to drag-drop anchor element on an already focused editable div
      element.
      
      * fast/events/drag-link-expected.txt: Added.
      * fast/events/drag-link.html: Added.
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@99085 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      5d5f9dc4
  28. 01 Nov, 2011 1 commit
    • eae@chromium.org's avatar
      Use IntPoint for screen coordinates in MouseEvent · fc240a22
      eae@chromium.org authored
      https://bugs.webkit.org/show_bug.cgi?id=71327
      
      Reviewed by Darin Adler.
      
      Change mouse events to use int/IntPoint for screen/window coordinates and
      LayoutUnit/LayoutPoint for coordinates adjusted for zooming.
      
      No new tests.
      
      * dom/MouseRelatedEvent.cpp:
      (WebCore::MouseRelatedEvent::MouseRelatedEvent):
      (WebCore::MouseRelatedEvent::computeRelativePosition):
      * dom/MouseRelatedEvent.h:
      (WebCore::MouseRelatedEvent::screenLocation):
      Revert screenLocation and windowLocation back to int.
      
      * page/DragController.cpp:
      (WebCore::elementUnderMouse):
      Change elementUnderMouse to use a LayoutPoint for hit testing.
      
      * page/EventHandler.cpp:
      (WebCore::EventHandler::clear):
      (WebCore::EventHandler::currentMousePosition):
      (WebCore::documentPointForWindowPoint):
      (WebCore::EventHandler::fakeMouseMoveEventTimerFired):
      * page/EventHandler.h:
      Revert m_currentMousePosition to IntPoint as it represents a
      screen coordinate.
      
      * platform/PlatformMouseEvent.h:
      (WebCore::PlatformMouseEvent::PlatformMouseEvent):
      (WebCore::PlatformMouseEvent::pos):
      (WebCore::PlatformMouseEvent::x):
      (WebCore::PlatformMouseEvent::y):
      (WebCore::PlatformMouseEvent::globalX):
      (WebCore::PlatformMouseEvent::globalY):
      * platform/mac/PlatformMouseEventMac.mm:
      (WebCore::globalPoint):
      (WebCore::pointForEvent):
      (WebCore::globalPointForEvent):
      Revert PlatformMouseEvent to int/IntPoint as it represents a screen
      coordinate.
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@99014 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      fc240a22
  29. 19 Oct, 2011 1 commit
    • dcheng@chromium.org's avatar
      Don't always select images during an image drag. · 87e62f7f
      dcheng@chromium.org authored
      https://bugs.webkit.org/show_bug.cgi?id=62998
      
      Reviewed by Tony Chang.
      
      Source/WebCore:
      
      Only select an image being dragged if it is contenteditable.
      
      Test: fast/events/drag-selects-image.html
      
      * dom/Node.cpp:
      (WebCore::Node::isContentRichlyEditable):
      * dom/Node.h:
      * page/DragController.cpp:
      (WebCore::prepareClipboardForImageDrag):
      
      LayoutTests:
      
      * fast/events/drag-selects-image-expected.txt: Added.
      * fast/events/drag-selects-image.html: Added.
      * platform/chromium-win/editing/pasteboard/drag-image-to-contenteditable-in-iframe-expected.txt:
      * platform/chromium-win/editing/selection/drag-to-contenteditable-iframe-expected.txt:
      * platform/chromium/test_expectations.txt:
      * platform/mac/editing/pasteboard/drag-image-to-contenteditable-in-iframe-expected.txt:
      * platform/mac/editing/selection/drag-to-contenteditable-iframe-expected.txt:
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@97878 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      87e62f7f
  30. 14 Oct, 2011 1 commit
    • zimmermann@webkit.org's avatar
      2011-10-13 Nikolas Zimmermann <nzimmermann@rim.com> · 8cf217f7
      zimmermann@webkit.org authored
              Prepare SVGImage intrinsic size negotiation: Introduce an IntSize <-> SVGImage cache in CachedImage
              https://bugs.webkit.org/show_bug.cgi?id=69416
      
              Reviewed by Antti Koivisto.
      
              Refactor ImageBySizeCache out of CSSImageGeneratorValue as CachedImage wants to use the same type of cache for its purposes.
              When introducing the SVGImage intrinsic size negotiation the container size of an SVGImage is dependant on the place where
              it gets embedded (eg width/height attributes of host documents <img> force a certain size).
      
              Currently CachedImage only contains a single RefPtr<Image>, which it constructs out of the decoded data.
              Multiple RenderObjects share the same CachedImages, when embedding eg. a SVG document in a <html:img> or using it in a background-image for a <div>.
              Consider the case where two RenderObjects use the same CachedImage, each with a different container size (200x100 vs 100x200) and the embedded
              document contains a viewBox and some arbitary preserveAspectRatio settings. To honour these we have to relayout the document with the desired
              size (percentual unit resolving etc, all depend on the RenderSVGRoots size).
      
              With the current design this is hard to realize, w/o requring to relayout the embedded document for each embedder that uses an SVGImage.
              This patch introduces a cache right within CachedImage, which manages a map of images to certain sizes, by utilizing the new ImageBySizeCache.
      
              CachedImage::imageForRenderer() takes a RenderObject* parameter, which it uses to look up the last set image container size for a renderer.
              Using that size it queries the cache whether it already has an SVGImage for that size, if not it gets created, by creating a whole
              new instance of SVGImage, filling it with the already decoded data, and passing on a fixed image container size, which overrides the
              size that RenderSVGRoot reports, when computeReplacedLogicalWidth/Height is called and thus laying out the document at the desired size.
              This image is then put in the cache for further reusability.
      
              Likewise CachedImage::setContainerSizeForRenderer() now takes a RenderObject* parameter and stores that in the cache with an associated container size.
              It requires to touch several files which use CachedImage throughout WebCore/WebKit/WebKit2.
      
              The actual cache is not yet turned on yet, so this is not a functional change so far, as it needs some other changes to SVGImage,
              which will come with the master patch in bug 47156.
      
              No new tests yet, as the new cache isn't turned on yet.
      
              * CMakeLists.txt: Add rendering/ImageBySizeCache.* to build.
              * GNUmakefile.list.am: Ditto.
              * WebCore.gypi: Ditto.
              * WebCore.pro: Ditto.
              * WebCore.vcproj/WebCore.vcproj: Ditto.
              * WebCore.xcodeproj/project.pbxproj: Ditto.
              * accessibility/AccessibilityRenderObject.cpp:
              (WebCore::AccessibilityRenderObject::accessibilityIsIgnored): Use new CachedImage::imageSizeForRenderer(RenderObject*) method.
              * bindings/objc/DOM.mm: Ditto (for CachedImage::image()).
              (-[DOMElement image]):
              (-[DOMElement _imageTIFFRepresentation]):
              * bridge/qt/qt_pixmapruntime.cpp:
              (JSC::Bindings::QtPixmapInstance::variantFromObject): Ditto (for CachedImage::image()).
              * css/CSSCanvasValue.cpp: s/m_clients/clients()/, which now live in the ImageBySizeCache instead of CSSImageGeneratorValue.
              (WebCore::CSSCanvasValue::canvasChanged):
              (WebCore::CSSCanvasValue::canvasResized):
              (WebCore::CSSCanvasValue::image):
              * css/CSSGradientValue.cpp: Ditto.
              (WebCore::CSSGradientValue::image):
              * css/CSSImageGeneratorValue.cpp: Move the sizes/clients/images cache into a new ImageBySizeCache class, to make it usable for CachedImage as well.
              (WebCore::CSSImageGeneratorValue::addClient): Adapt to move.
              (WebCore::CSSImageGeneratorValue::removeClient): Ditto.
              (WebCore::CSSImageGeneratorValue::getImage): Ditto.
              (WebCore::CSSImageGeneratorValue::putImage): Ditto.
              * css/CSSImageGeneratorValue.h:
              (WebCore::CSSImageGeneratorValue::clients): Forwarded to the ImageBySizeCache.
              * editing/DeleteButtonController.cpp: 
              (WebCore::isDeletableElement): CachedImage::canRender() now takes a RenderObject* parameter.
              * html/HTMLImageElement.cpp:
              (WebCore::HTMLImageElement::width): Use new CachedImage::imageSizeForRenderer(RenderObject*) method.
              (WebCore::HTMLImageElement::height): Ditto.
              (WebCore::HTMLImageElement::naturalWidth): Ditto.
              (WebCore::HTMLImageElement::naturalHeight): Ditto.
              * html/ImageDocument.cpp:
              (WebCore::ImageDocumentParser::finish): Ditto.
              (WebCore::ImageDocument::scale): Ditto.
              (WebCore::ImageDocument::resizeImageToFit): Ditto.
              (WebCore::ImageDocument::imageUpdated): Ditto.
              (WebCore::ImageDocument::restoreImageSize): Ditto.
              (WebCore::ImageDocument::imageFitsInWindow): Ditto.
              * html/canvas/CanvasRenderingContext.cpp:
              (WebCore::CanvasRenderingContext::wouldTaintOrigin): Use new CachedImage::imageForRenderer(RenderObject*) method.
              * html/canvas/CanvasRenderingContext2D.cpp:
              (WebCore::isOriginClean): Ditto.
              (WebCore::size): Ditto (for CachedImage::imageSizeForRenderer()).
              (WebCore::CanvasRenderingContext2D::drawImage): Ditto.
              (WebCore::CanvasRenderingContext2D::createPattern): Ditto.
              * html/canvas/WebGLRenderingContext.cpp:
              (WebCore::WebGLRenderingContext::texImage2D): Ditto.
              (WebCore::WebGLRenderingContext::texSubImage2D): Ditto.
              * loader/cache/CachedImage.cpp: Add currently _disabled_ cache for SVGImages. The intrinsic size negotiation will need to use multiple SVGImages
              for each requested size (equal to the size of the embedding place for the image) - make it possible to cache these SVGImages, and maintain a cache
              for them. The hash code is a 1:1 refactoring from the already present code in CSSImageGeneratorValue, now named 'ImageBySizeCache'.
              (WebCore::CachedImage::lookupImageForSize): Looks up an Image from the cache for a given IntSize. Currently turned off.
              (WebCore::CachedImage::lookupImageForRenderer): Looks up an Image from the cache for a given renderer. Currently turned off.
              (WebCore::CachedImage::lookupOrCreateImageForRenderer): Looks up an Image from the cache or creates a new SVGImage for a given size and caches it, if possible. Currently turned off.
              All following changes share this: Don't operate on m_image directly, instead always look up one from the cache for a given size or renderer - if that's not present fallback to m_image.
              When an SVGImage is first created by CachedImage::createImage() and stored in m_image, the cache remains empty.
      
              If eg. <img width="30" height="70" src="foo.svg"> is used which implies a container size of 30x70 a new SVGImage is created with the additional information of a 30x70 container size
              which is immediately passed to the SVGImage after its creation. This SVGImage is put in the ImageBySizeCache associated with a container size of 30x70.
              We now have two SVGImage objects present, one living in CachedImage::m_image, created by createImage() during data decoding, and one living in the ImageBySizeCache
              created by lookupOrCreateImageForRenderer() associated with the 30x70 container. The first SVGImage::size() will return a value as defined in the referenced foo.svg,
              whereas the SVGImage::size() call of the new SVGImage living in the cache reports 30x70 and renders according to that.
      
              Whenever any method of CachedImage is called with a RenderObject* or IntSize, we can't just operate on m_image anymore but instead have to lookup the right
              images for a certain renderer/size from the cache and operate on these. When calling eg. CachedImage::image() with a null renderer, m_image is returned.
              When passing with a valid renderer only cache lookups are done if the m_image is actually a SVGImage, otherwhise lookupImageForSize/Renderer will just return the m_image.
              There is no logical change induced for non-SVGImage derived images.
      
              CachedImage::image() of course needs a RenderObject* parameter now, to identify which of the images from the cache to use, if the underlying image is a SVGImage.
              Luckily these information are already present in StyleCachedImage/StyleImage & friends and only need to be added for some additional methods.
              (WebCore::CachedImage::image): FIXME
              (WebCore::CachedImage::imageForRenderer): Call lookupOrCreateImageForRenderer() instead of returning m_image, if it's not null. Its a no-op for non SVGImage derived objects.
              (WebCore::CachedImage::setContainerSizeForRenderer): For non-SVGImages, just pass on the size to the m_image. For SVGImages, associate the passed in renderer with the IntSize in the cache.
                                                                   This does NOT create the SVGImage yet, this is delayed until imageForRenderer() is called for a given renderer that wants this size.
              (WebCore::CachedImage::imageSize): Don't operate on m_image, ask lookupImageForRenderer() with the incoming renderer.
              (WebCore::CachedImage::imageRect): Ditto.
              (WebCore::CachedImage::clear): Force clearing the m_svgImageCache.
              (WebCore::CachedImage::data): Call m_image->size() instead of imageSize(), to avoid having to pass a null renderer to imageSize() as here no renderer is available yet.
              (WebCore::CachedImage::destroyDecodedData): Don't destroy decoded data for SVG images, as m_data needs to be accessable at any time to construct a cloned SVGImage.
                                                          In future we don't need this anymore if we make sure multiple SVGImages share the same trees, but that's for a follow-up patch.
              (WebCore::CachedImage::decodedSizeChanged): Don't operate on m_image, ask lookupImageForRenderer() with the incoming renderer.
              (WebCore::CachedImage::didDraw): Ditto.
              (WebCore::CachedImage::shouldPauseAnimation): Ditto.
              (WebCore::CachedImage::animationAdvanced): Ditto.
              (WebCore::CachedImage::changedInRect): Ditto. (eg. when leaving out this change animated SVG images wouldn't update anymore, as the animation didn't happen on m_image!)
              * loader/cache/CachedImage.h: imageForRenderer/canRender/setContainerSizeForRenderer/imageSizeForRenderer now all take a RenderObject* parameter to identifiy the current user of the image.
              (WebCore::CachedImage::canRender): Pass on the incoming renderer to imageSizeForRenderer().
              * page/DragController.cpp:
              (WebCore::getImage): Use new CachedImage::imageForRenderer(RenderObject*) method.
              * page/EventHandler.cpp:
              (WebCore::EventHandler::selectCursor): Ditto.
              * page/PageSerializer.cpp:
              (WebCore::PageSerializer::serializeFrame): Ditto.
              (WebCore::PageSerializer::addImageToResources): Ditto.
              (WebCore::PageSerializer::retrieveResourcesForCSSDeclaration): Ditto.
              * page/PageSerializer.h:
              * platform/chromium/ClipboardChromium.cpp:
              (WebCore::writeImageToDataObject): Ditto.
              * platform/chromium/PasteboardChromium.cpp:
              (WebCore::Pasteboard::writeImage): Ditto.
              * platform/graphics/Image.h:
              (WebCore::Image::isSVGImage): Add boolean helper to identify SVGImages, just like isBitmapImage().
              * platform/gtk/ClipboardGtk.cpp:
              (WebCore::ClipboardGtk::declareAndWriteDragImage): Use new CachedImage::imageForRenderer(RenderObject*) method.
              * platform/gtk/PasteboardGtk.cpp:
              (WebCore::Pasteboard::writeImage): Ditto.
              * platform/mac/HTMLConverter.mm:
              (fileWrapperForElement): Ditto.
              * platform/mac/PasteboardMac.mm:
              (WebCore::Pasteboard::writeImage): Ditto.
              * platform/qt/ClipboardQt.cpp:
              (WebCore::ClipboardQt::declareAndWriteDragImage): Ditto.
              * platform/qt/PasteboardQt.cpp:
              (WebCore::Pasteboard::writeImage): Ditto.
              * platform/win/ClipboardWin.cpp:
              (WebCore::writeImageToDataObject): Ditto.
              * platform/win/PasteboardWin.cpp:
              (WebCore::Pasteboard::writeImage): Ditto.
              * platform/wince/PasteboardWinCE.cpp:
              (WebCore::Pasteboard::writeImage): Ditto.
              * rendering/HitTestResult.cpp:
              (WebCore::HitTestResult::image): Ditto.
              * rendering/ImageBySizeCache.cpp: Copied from WebCore/css/CSSImageGeneratorValue.cpp, to preserve history for the original cache code.
              (WebCore::ImageBySizeCache::ImageBySizeCache): Straight copy from CSSImageGeneratorValue, renamed to ImageBySizeCache, removing all but the cache relevant code.
              (WebCore::ImageBySizeCache::addClient): Ditto.
              (WebCore::ImageBySizeCache::removeClient): Ditto.
              (WebCore::ImageBySizeCache::getImage): Ditto.
              (WebCore::ImageBySizeCache::putImage): Ditto.
              (WebCore::ImageBySizeCache::clear): New function, that clears the cache, introduced for the needs of CachedImage.
              (WebCore::ImageBySizeCache::imageForSize): New function to query an Image* for a given IntSize, introduced for the needs of CachedImage.
              (WebCore::ImageBySizeCache::sizeForClient): New function to query an IntSize for a given renderer.
              * rendering/ImageBySizeCache.h: Copied from WebCore/css/CSSImageGeneratorValue.h.
              (WebCore::ImageBySizeCache::clients):
              * rendering/InlineFlowBox.cpp:
              (WebCore::InlineFlowBox::paintFillLayer): CachedImage::canRender() now takes a RenderObject* parameter.
              (WebCore::InlineFlowBox::paintBoxDecorations): Ditto.
              (WebCore::InlineFlowBox::paintMask): Ditto.
              * rendering/RenderBox.cpp:
              (WebCore::RenderBox::paintMaskImages): Ditto.
              (WebCore::RenderBox::repaintLayerRectsForImage): Ditto.
              * rendering/RenderBoxModelObject.cpp:
              (WebCore::RenderBoxModelObject::paintFillLayerExtended): Ditto.
              (WebCore::RenderBoxModelObject::calculateFillTileSize): Ditto (for CachedImage::setContainerSizeForRenderer()).
              (WebCore::RenderBoxModelObject::paintNinePieceImage): Ditto.
              * rendering/RenderImage.cpp:
              (WebCore::RenderImage::imageSizeForError): Use new CachedImage::imageForRenderer(RenderObject*) method.
              (WebCore::RenderImage::setImageSizeForAltText): Ditto.
              (WebCore::RenderImage::computeReplacedLogicalWidth): FIXME
              * rendering/RenderImageResource.cpp:
              (WebCore::RenderImageResource::setContainerSizeForRenderer): Pass on m_renderer to CachedImage::setContainerSizeForRenderer().
              * rendering/RenderImageResource.h: Remove constness from setContainerSizeForRenderer.
              (WebCore::RenderImageResource::image): Pass on m_renderer to CachedImage::image().
              (WebCore::RenderImageResource::imageSize): Pass on m_renderer to CachedImage::imageSizeForRenderer().
              * rendering/RenderImageResourceStyleImage.h:
              (WebCore::RenderImageResourceStyleImage::setContainerSizeForRenderer): Remove constness, pass on m_renderer to StyleImage::setContainerSizeForRenderer().
              * rendering/RenderLayerBacking.cpp:
              (WebCore::RenderLayerBacking::isDirectlyCompositedImage): Use new CachedImage::imageForRenderer(RenderObject*) method.
              (WebCore::RenderLayerBacking::updateImageContents): Ditto.
              * rendering/RenderListMarker.cpp:
              (WebCore::RenderListMarker::computePreferredLogicalWidths): CachedImage::setContainerSizeForRenderer() now takes a RenderObject* parameter.
              * rendering/RenderObject.cpp:
              (WebCore::mustRepaintFillLayers): CachedImage::canRender() now takes a RenderObject* parameter.
              (WebCore::RenderObject::borderImageIsLoadedAndCanBeRendered): Ditto.
              * rendering/style/StyleCachedImage.cpp:
              (WebCore::StyleCachedImage::canRender): Pass on incoming renderer to CachedImage::canRender().
              (WebCore::StyleCachedImage::imageSize): Pass on incoming renderer to CachedImage::imageSizeForRenderer().
              (WebCore::StyleCachedImage::setContainerSizeForRenderer): Pass on incoming renderer to CachedImage::setContainerSizeForRenderer().
              (WebCore::StyleCachedImage::addClient): Remove unneeded return statment in void method.
              (WebCore::StyleCachedImage::removeClient): Ditto.
              (WebCore::StyleCachedImage::image): Pass on incoming renderer to CachedImage::image().
              * rendering/style/StyleCachedImage.h: Add RenderObject* parameter to canRender()/setContainerSizeForRenderer(). image() already has one, that was unused so far.
              * rendering/style/StyleGeneratedImage.cpp: Inlined setContainerSizeForRenderer.
              * rendering/style/StyleGeneratedImage.h: 
              (WebCore::StyleGeneratedImage::setContainerSizeForRenderer): Add RenderObject* parameter.
              * rendering/style/StyleImage.h:
              (WebCore::StyleImage::canRender): Ditto.
              * rendering/style/StylePendingImage.h:
              (WebCore::StylePendingImage::setContainerSizeForRenderer): Ditto.
              * svg/SVGFEImageElement.cpp:
              (WebCore::SVGFEImageElement::build): Use new CachedImage::imageForRenderer(RenderObject*) method.
              * svg/graphics/SVGImage.cpp: Cleanup file, the include hack seems not needed anymore.
              (WebCore::SVGImage::setContainerSize): s/LayoutSize/IntSize/ to match the code in platform/.
              * svg/graphics/SVGImage.h: Ditto.
              (WebCore::SVGImage::isSVGImage): Return true.
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@97448 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      8cf217f7
  31. 30 Aug, 2011 2 commits
    • rniwa@webkit.org's avatar
      Unreviewed, rolling out r94142, r94144, r94145, and r94148. · fa92d361
      rniwa@webkit.org authored
      http://trac.webkit.org/changeset/94142
      http://trac.webkit.org/changeset/94144
      http://trac.webkit.org/changeset/94145
      http://trac.webkit.org/changeset/94148
      https://bugs.webkit.org/show_bug.cgi?id=67262
      
      Broke isindex element (Requested by rniwa on #webkit).
      
      Patch by Sheriff Bot <webkit.review.bot@gmail.com> on 2011-08-30
      
      Source/WebCore: 
      
      * WebCore.order:
      * accessibility/AXObjectCache.cpp:
      (WebCore::AXObjectCache::textMarkerDataForVisiblePosition):
      * accessibility/AccessibilityRenderObject.cpp:
      (WebCore::AccessibilityRenderObject::isPasswordField):
      (WebCore::AccessibilityRenderObject::isIndeterminate):
      (WebCore::AccessibilityRenderObject::isNativeCheckboxOrRadio):
      (WebCore::AccessibilityRenderObject::isChecked):
      * css/CSSStyleSelector.cpp:
      (WebCore::CSSStyleSelector::canShareStyleWithControl):
      (WebCore::CSSStyleSelector::adjustRenderStyle):
      (WebCore::CSSStyleSelector::SelectorChecker::checkOneSelector):
      (WebCore::CSSStyleSelector::applyProperty):
      * dom/CheckedRadioButtons.cpp:
      (WebCore::CheckedRadioButtons::addButton):
      (WebCore::CheckedRadioButtons::removeButton):
      * dom/Node.cpp:
      (WebCore::Node::toInputElement):
      * dom/Node.h:
      * editing/FrameSelection.cpp:
      (WebCore::FrameSelection::isInPasswordField):
      * html/HTMLInputElement.h:
      (WebCore::HTMLInputElement::toInputElement):
      * html/shadow/SliderThumbElement.cpp:
      (WebCore::sliderThumbElementOf):
      (WebCore::RenderSliderThumb::layout):
      (WebCore::RenderSliderContainer::layout):
      (WebCore::SliderThumbElement::hostInput):
      (WebCore::trackLimiterElementOf):
      * html/shadow/TextControlInnerElements.cpp:
      (WebCore::SearchFieldResultsButtonElement::shadowPseudoId):
      (WebCore::SearchFieldResultsButtonElement::defaultEventHandler):
      (WebCore::SearchFieldCancelButtonElement::defaultEventHandler):
      (WebCore::SpinButtonElement::defaultEventHandler):
      (WebCore::SpinButtonElement::repeatingTimerFired):
      (WebCore::InputFieldSpeechButtonElement::defaultEventHandler):
      (WebCore::InputFieldSpeechButtonElement::setRecognitionResult):
      * page/DragController.cpp:
      (WebCore::asFileInput):
      * platform/efl/RenderThemeEfl.cpp:
      (WebCore::RenderThemeEfl::paintThemePart):
      * rendering/RenderTextControlSingleLine.cpp:
      (WebCore::RenderTextControlSingleLine::RenderTextControlSingleLine):
      (WebCore::RenderTextControlSingleLine::inputElement):
      * rendering/RenderTheme.cpp:
      (WebCore::RenderTheme::isChecked):
      (WebCore::RenderTheme::isIndeterminate):
      
      Source/WebKit/chromium: 
      
      * src/EditorClientImpl.cpp:
      (WebKit::EditorClientImpl::textFieldDidEndEditing):
      (WebKit::EditorClientImpl::doTextFieldCommandFromEvent):
      * src/WebInputElement.cpp:
      (WebKit::toWebInputElement):
      * src/WebPasswordFormUtils.cpp:
      (WebKit::findPasswordFormFields):
      
      Source/WebKit/gtk: 
      
      * WebCoreSupport/DumpRenderTreeSupportGtk.cpp:
      (DumpRenderTreeSupportGtk::setAutofilled):
      (DumpRenderTreeSupportGtk::setValueForUser):
      
      Source/WebKit/qt: 
      
      * WebCoreSupport/DumpRenderTreeSupportQt.cpp:
      (DumpRenderTreeSupportQt::setAutofilled):
      (DumpRenderTreeSupportQt::setValueForUser):
      (DumpRenderTreeSupportQt::elementDoesAutoCompleteForElementWithId):
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@94149 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      fa92d361
    • rniwa@webkit.org's avatar
      Get rid of toInputElement() · 7a7015f1
      rniwa@webkit.org authored
      https://bugs.webkit.org/show_bug.cgi?id=67175
      
      Reviewed by Darin Adler.
      
      Source/WebCore: 
      
      Got rid of Node::toInputElement and HTMLInputElement::toInputElement and replaced them by
      a global toHTMLInputElement.
      
      * WebCore.order:
      * accessibility/AXObjectCache.cpp:
      (WebCore::AXObjectCache::textMarkerDataForVisiblePosition):
      * accessibility/AccessibilityRenderObject.cpp:
      (WebCore::AccessibilityRenderObject::isPasswordField):
      (WebCore::AccessibilityRenderObject::isIndeterminate):
      (WebCore::AccessibilityRenderObject::isNativeCheckboxOrRadio):
      (WebCore::AccessibilityRenderObject::isChecked):
      * css/CSSStyleSelector.cpp:
      (WebCore::CSSStyleSelector::canShareStyleWithControl):
      (WebCore::CSSStyleSelector::adjustRenderStyle):
      (WebCore::CSSStyleSelector::SelectorChecker::checkOneSelector):
      (WebCore::CSSStyleSelector::applyProperty):
      * dom/CheckedRadioButtons.cpp:
      (WebCore::CheckedRadioButtons::addButton):
      (WebCore::CheckedRadioButtons::removeButton):
      * dom/Node.cpp:
      * dom/Node.h:
      * editing/FrameSelection.cpp:
      (WebCore::FrameSelection::isInPasswordField):
      * html/HTMLInputElement.h:
      (WebCore::toHTMLInputElement):
      * html/shadow/SliderThumbElement.cpp:
      (WebCore::sliderThumbElementOf):
      (WebCore::RenderSliderThumb::layout):
      (WebCore::RenderSliderContainer::layout):
      (WebCore::SliderThumbElement::hostInput):
      (WebCore::trackLimiterElementOf):
      * html/shadow/TextControlInnerElements.cpp:
      (WebCore::SearchFieldResultsButtonElement::shadowPseudoId):
      (WebCore::SearchFieldResultsButtonElement::defaultEventHandler):
      (WebCore::SearchFieldCancelButtonElement::defaultEventHandler):
      (WebCore::SpinButtonElement::defaultEventHandler):
      (WebCore::SpinButtonElement::repeatingTimerFired):
      (WebCore::InputFieldSpeechButtonElement::defaultEventHandler):
      (WebCore::InputFieldSpeechButtonElement::setRecognitionResult):
      * page/DragController.cpp:
      (WebCore::asFileInput):
      * platform/efl/RenderThemeEfl.cpp:
      (WebCore::RenderThemeEfl::paintThemePart):
      * rendering/RenderTextControlSingleLine.cpp:
      (WebCore::RenderTextControlSingleLine::RenderTextControlSingleLine):
      (WebCore::RenderTextControlSingleLine::inputElement):
      * rendering/RenderTheme.cpp:
      (WebCore::RenderTheme::isChecked):
      (WebCore::RenderTheme::isIndeterminate):
      
      Source/WebKit/chromium: 
      
      * src/WebInputElement.cpp:
      (WebKit::toWebInputElement):
      
      Source/WebKit/qt: 
      
      * WebCoreSupport/DumpRenderTreeSupportQt.cpp:
      (DumpRenderTreeSupportQt::setAutofilled):
      (DumpRenderTreeSupportQt::setValueForUser):
      (DumpRenderTreeSupportQt::elementDoesAutoCompleteForElementWithId):
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@94142 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      7a7015f1
  32. 18 Jul, 2011 1 commit
  33. 30 Jun, 2011 1 commit
    • rniwa@webkit.org's avatar
      2011-06-30 Ryosuke Niwa <rniwa@webkit.org> · 4f6c51fe
      rniwa@webkit.org authored
              Reviewed by Kent Tamura.
      
              Replace isNodeInTextFormControl(Node*) by enclosingTextFormControl(const Position&)
              https://bugs.webkit.org/show_bug.cgi?id=63672
      
              Replaced isNodeInTextFormControl(Node*) by enclosingTextFormControl(const Position&).
              Also added a safe toTextFormControl to HTMLFormControlElement.h.
      
              * editing/DeleteSelectionCommand.cpp:
              (WebCore::DeleteSelectionCommand::doApply): Calls enclosingTextFormControl instead of manually
              checking the tag name of shadowAncestorNode.
              * editing/Editor.cpp:
              (WebCore::Editor::selectionForCommand): Rewritten using enclosingTextFormControl and toTextFormControl.
              (WebCore::Editor::cut): Calls enclosingTextFormControl instead of isNodeInTextFormControl.
              (WebCore::Editor::copy): Ditto.
              (WebCore::Editor::setBaseWritingDirection): Calls toTextFormControl instead of manually checking tag name.
              * editing/FrameSelection.cpp:
              (WebCore::FrameSelection::isInPasswordField): Calls enclosingTextFormControl.
              * editing/ReplaceSelectionCommand.cpp:
              (WebCore::ReplaceSelectionCommand::doApply): Ditto.
              * editing/htmlediting.cpp:
              (WebCore::enclosingTextFormControl): Added.
              * editing/htmlediting.h:
              * html/HTMLFormControlElement.h:
              (WebCore::toTextFormControl): Added.
              * page/DragController.cpp:
              (WebCore::DragController::startDrag): Calls enclosingTextFormControl instead of isNodeInTextFormControl.
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@90098 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      4f6c51fe
  34. 23 Jun, 2011 1 commit
    • dglazkov@chromium.org's avatar
      2011-06-22 Dimitri Glazkov <dglazkov@chromium.org> · c9c5964a
      dglazkov@chromium.org authored
              Reviewed by Kent Tamura.
      
              Move file-choosing and icon-loading management to FileInputType
              https://bugs.webkit.org/show_bug.cgi?id=62069
      
              1) Moved the duties of FileChooserClient and FileIconLoaderClient from
              RenderFileUploadControl to FileInputType, along with all of the
              supporting functions.
      
              2) Moved Icon ownership to FileInputType and exposed accessor on
              HTMInputElement to allow RenderFileUploadControl to query current icon.
      
              As a result, RenderFileUploadControl is now completely stateless, which is
              neat and clean.
      
              Refactoring, covered by existing tests.
      
              * html/FileInputType.cpp:
              (WebCore::FileInputType::handleDOMActivateEvent): Moved logic here from RenderFileUploadControl.
              (WebCore::FileInputType::requestIcon): Ditto.
              (WebCore::FileInputType::filesChosen): Ditto.
              (WebCore::FileInputType::receiveDropForDirectoryUpload): Ditto.
              (WebCore::FileInputType::updateRendering): Ditto.
              (WebCore::FileInputType::chrome): Ditto.
              (WebCore::FileInputType::receiveDroppedFiles): Ditto.
              (WebCore::FileInputType::icon): Added.
              * html/FileInputType.h:
              * html/HTMLInputElement.cpp:
              (WebCore::HTMLInputElement::setValueFromRenderer): Updated comment.
              (WebCore::HTMLInputElement::receiveDroppedFiles): Added to replace setFileListFromRenderer.
              (WebCore::HTMLInputElement::icon): Added.
              * html/HTMLInputElement.h:
              * html/InputType.cpp:
              (WebCore::InputType::receiveDroppedFiles): Added.
              (WebCore::InputType::icon): Added.
              * html/InputType.h:
              * page/DragController.cpp:
              (WebCore::DragController::concludeEditDrag): Changed to use HTMLInputElement. Ahh, nice and clean!
              * rendering/RenderFileUploadControl.cpp:
              (WebCore::RenderFileUploadControl::RenderFileUploadControl): Removed code that is no longer necessary.
              (WebCore::RenderFileUploadControl::updateFromElement): Ditto.
              (WebCore::RenderFileUploadControl::maxFilenameWidth): Changed to use HTMLInputElement icon accessor.
              (WebCore::RenderFileUploadControl::paintObject): Ditto.
              * rendering/RenderFileUploadControl.h:
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@89535 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      c9c5964a
  35. 09 Jun, 2011 1 commit
    • dglazkov@chromium.org's avatar
      2011-06-09 Dimitri Glazkov <dglazkov@chromium.org> · 8e55b4db
      dglazkov@chromium.org authored
              Reviewed by Kent Tamura.
      
              Fold isShadowBoundary into isShadowRoot.
              https://bugs.webkit.org/show_bug.cgi?id=62317
      
              Since there are no longer cases where Node::isShadowBoundary() != Node::isShadowRoot, we can remove this function.
      
              In one case where isShadowBoundary was also tested to find ShadowContentElemnt, added a new isContentElement function.
      
              Refactoring, covered by existing tests.
      
              * css/CSSStyleSelector.cpp:
              (WebCore::isAtShadowBoundary): Changed to use isShadowRoot.
              * dom/Element.cpp:
              (WebCore::Element::isSpellCheckingEnabled): Ditto.
              * dom/Node.cpp:
              (WebCore::Node::nonBoundaryShadowTreeRootNode): Ditto.
              (WebCore::Node::nonShadowBoundaryParentNode): Ditto.
              * dom/Node.h:
              (WebCore::Node::isContentElement): Added.
              * dom/NodeRenderingContext.cpp:
              (WebCore::NodeRenderingContext::NodeRenderingContext): Changed to use isShadowRoot.
              * dom/Position.cpp:
              (WebCore::Position::Position): Ditto.
              * dom/ShadowContentElement.h:
              (WebCore::ShadowContentElement::isContentElement): Added.
              * dom/ShadowRoot.cpp:
              (WebCore::ShadowRoot::hasContentElement): Changed to use isContentElement.
              * editing/CompositeEditCommand.cpp:
              (WebCore::CompositeEditCommand::insertNodeAfter): Changed to use isShadowRoot.
              * editing/htmlediting.cpp:
              (WebCore::visiblePositionBeforeNode): Ditto.
              (WebCore::visiblePositionAfterNode): Ditto.
              * page/DragController.cpp:
              (WebCore::asFileInput): Ditto.
              * rendering/RenderTreeAsText.cpp:
              (WebCore::nodePosition): Ditto.
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@88476 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      8e55b4db