- 02 Oct, 2009 1 commit
-
-
hyatt@apple.com authored
Add support for blacklist patterns to user stylesheets and scripts in addition to whitelist patterns. Reviewed by Adam Roben. WebCore: * WebCore.base.exp: * dom/Document.cpp: (WebCore::Document::pageGroupUserSheets): * page/Frame.cpp: (WebCore::Frame::injectUserScriptsForWorld): * page/PageGroup.cpp: (WebCore::PageGroup::addUserScript): (WebCore::PageGroup::addUserStyleSheet): (WebCore::PageGroup::removeUserContentWithURLForWorld): (WebCore::PageGroup::removeUserContentForWorld): * page/PageGroup.h: * page/UserContentURLPattern.cpp: (WebCore::UserContentURLPattern::matchesPatterns): * page/UserContentURLPattern.h: * page/UserScript.h: (WebCore::UserScript::UserScript): (WebCore::UserScript::whitelist): (WebCore::UserScript::blacklist): * page/UserStyleSheet.h: (WebCore::UserStyleSheet::UserStyleSheet): (WebCore::UserStyleSheet::whitelist): (WebCore::UserStyleSheet::blacklist): WebKit/mac: * WebView/WebView.mm: (toStringVector): (+[WebView _addUserScriptToGroup:source:url:worldID:whitelist:blacklist:injectionTime:]): (+[WebView _addUserStyleSheetToGroup:source:url:worldID:whitelist:blacklist:]): * WebView/WebViewPrivate.h: WebKit/win: * Interfaces/IWebViewPrivate.idl: * WebView.cpp: (toStringVector): (WebView::addUserScriptToGroup): (WebView::addUserStyleSheetToGroup): * WebView.h: git-svn-id: http://svn.webkit.org/repository/webkit/trunk@49033 268f45cc-cd09-0410-ab3c-d52691b4dbfc
-
- 01 Oct, 2009 1 commit
-
-
abarth@webkit.org authored
Reviewed by Darin Adler. Remove FrameLoader::schedule* APIs https://bugs.webkit.org/show_bug.cgi?id=29950 Change clients of FrameLoader::schedule* to call redirectScheduler directly. No behavior change. * bindings/js/JSDOMWindowCustom.cpp: (WebCore::JSDOMWindow::setLocation): (WebCore::createWindow): (WebCore::JSDOMWindow::open): * bindings/js/JSDocumentCustom.cpp: (WebCore::JSDocument::setLocation): * bindings/js/JSLocationCustom.cpp: (WebCore::navigateIfAllowed): (WebCore::JSLocation::reload): * bindings/v8/V8Utilities.cpp: (WebCore::navigateIfAllowed): * bindings/v8/custom/V8DOMWindowCustom.cpp: (WebCore::createWindow): (WebCore::CALLBACK_FUNC_DECL): * bindings/v8/custom/V8LocationCustom.cpp: (WebCore::CALLBACK_FUNC_DECL): * dom/Document.cpp: (WebCore::Document::implicitClose): (WebCore::Document::processHttpEquiv): * html/HTMLTokenizer.cpp: (WebCore::HTMLTokenizer::write): * loader/FrameLoader.cpp: (WebCore::FrameLoader::requestFrame): (WebCore::FrameLoader::submitForm): (WebCore::FrameLoader::receivedFirstData): * loader/FrameLoader.h: * loader/appcache/ApplicationCacheGroup.cpp: (WebCore::ApplicationCacheGroup::selectCache): * page/History.cpp: (WebCore::History::back): (WebCore::History::forward): (WebCore::History::go): git-svn-id: http://svn.webkit.org/repository/webkit/trunk@48994 268f45cc-cd09-0410-ab3c-d52691b4dbfc
-
- 29 Sep, 2009 1 commit
-
-
hyatt@apple.com authored
Add support for whitelist patterns to control conditional injection of user scripts and user stylesheets. Reviewed by Jon Honeycutt. No new tests. Not testable until WebKit portion is added in followup patch. * GNUmakefile.am: * WebCore.gypi: * WebCore.pro: * WebCore.vcproj/WebCore.vcproj: * WebCore.xcodeproj/project.pbxproj: * dom/Document.cpp: (WebCore::Document::pageGroupUserSheets): * page/Frame.cpp: (WebCore::Frame::injectUserScriptsForWorld): * page/UserContentURLPattern.cpp: Added. (WebCore::UserContentURLPattern::matchesPatterns): (WebCore::UserContentURLPattern::parse): (WebCore::UserContentURLPattern::matches): (WebCore::UserContentURLPattern::matchesHost): (WebCore::MatchTester::MatchTester): (WebCore::MatchTester::testStringFinished): (WebCore::MatchTester::patternStringFinished): (WebCore::MatchTester::eatWildcard): (WebCore::MatchTester::eatSameChars): (WebCore::MatchTester::test): (WebCore::UserContentURLPattern::matchesPath): * page/UserContentURLPattern.h: Added. (WebCore::UserContentURLPattern::UserContentURLPattern): (WebCore::UserContentURLPattern::scheme): (WebCore::UserContentURLPattern::host): (WebCore::UserContentURLPattern::path): (WebCore::UserContentURLPattern::matchSubdomains): git-svn-id: http://svn.webkit.org/repository/webkit/trunk@48912 268f45cc-cd09-0410-ab3c-d52691b4dbfc
-
- 28 Sep, 2009 1 commit
-
-
hausmann@webkit.org authored
https://bugs.webkit.org/show_bug.cgi?id=28303 Patch by Jakub Wieczorek <faw217@gmail.com> on 2009-09-28 Reviewed by Simon Hausmann. JavaScriptCore: * wtf/Platform.h: Add a WTF_USE_QXMLQUERY #define. WebCore: * GNUmakefile.am: * WebCore.gypi: * WebCore.pro: * WebCore.vcproj/WebCore.vcproj: * WebCoreSources.bkl: * dom/Document.cpp: (WebCore::Document::Document): (WebCore::Document::~Document): (WebCore::Document::setTransformSource): * dom/Document.h: (WebCore::Document::transformSource): * dom/TransformSource.h: Added. (WebCore::TransformSource::platformSource): * dom/TransformSourceLibxslt.cpp: Added. (WebCore::TransformSource::TransformSource): Wraps a libxml2 document. (WebCore::TransformSource::~TransformSource): * dom/TransformSourceQt.cpp: Added. (WebCore::TransformSource::TransformSource): Wraps a plain string. (WebCore::TransformSource::~TransformSource): * dom/XMLTokenizerLibxml2.cpp: (WebCore::XMLTokenizer::doEnd): * dom/XMLTokenizerQt.cpp: (WebCore::XMLTokenizer::doEnd): (WebCore::XMLTokenizer::parseProcessingInstruction): * xml/XSLStyleSheet.h: (WebCore::XSLStyleSheet::sheetString): * xml/XSLStyleSheetLibxslt.cpp: (WebCore::XSLStyleSheet::document): * xml/XSLStyleSheetQt.cpp: Added. * xml/XSLTProcessor.h: * xml/XSLTProcessorLibxslt.cpp: (WebCore::xmlDocPtrFromNode): * xml/XSLTProcessorQt.cpp: Added. (WebCore::XSLTMessageHandler::XSLTMessageHandler): A subclass of QAbstractMessageHandler. (WebCore::XSLTMessageHandler::handleMessage): Forwards all processor messages to the Console. (WebCore::XSLTProcessor::transformToString): Uses QXmlQuery. git-svn-id: http://svn.webkit.org/repository/webkit/trunk@48826 268f45cc-cd09-0410-ab3c-d52691b4dbfc
-
- 25 Sep, 2009 2 commits
-
-
hyatt@apple.com authored
Make @import work in user stylesheets. The first bug was that the URL wasn't being set on the user sheets themselves, so relative @import URLs couldn't resolve properly. The second bug was that the loads would be denied. This is fixed by using the requestUserCSSStyleSheet method instead of the normal request method. In order to know when to do this, CSSStyleSheets now have a propagated boolean, m_isUserStyleSheet, that lets them know if they are user stylesheets or not. Reviewed by Anders Carlsson. * css/CSSImportRule.cpp: (WebCore::CSSImportRule::insertedIntoParent): * css/CSSStyleSheet.cpp: (WebCore::CSSStyleSheet::CSSStyleSheet): * css/CSSStyleSheet.h: (WebCore::CSSStyleSheet::setIsUserStyleSheet): (WebCore::CSSStyleSheet::isUserStyleSheet): * dom/Document.cpp: (WebCore::Document::pageUserSheet): (WebCore::Document::pageGroupUserSheets): git-svn-id: http://svn.webkit.org/repository/webkit/trunk@48773 268f45cc-cd09-0410-ab3c-d52691b4dbfc
-
eric@webkit.org authored
Reviewed by Darin Adler. https://bugs.webkit.org/show_bug.cgi?id=14566 Add test "invalid-domain-change-throws-exception.html" to ensure a SECURITY_ERR exception is raised if an attempt is made to change document.domain to an invalid value. In the existing test case "basic-textareas.html", fix the faulty behavior of setting document.domain to invalid value, and replace the data URL to a file URL that points to "basic-textareas-standards.html" in order to make "basic-textareas.html" runnable in a browser. * fast/forms/basic-textareas.html: * fast/forms/resources/basic-textareas-standards.html: Added. * fast/js/invalid-domain-change-throws-exception-expected.txt: Added. * fast/js/invalid-domain-change-throws-exception.html: Added. * fast/js/resources/invalid-domain-change-throws-exception.js: Added. 2009-09-25 Yuan Song <song.yuan@ericsson.com> Reviewed by Darin Adler. https://bugs.webkit.org/show_bug.cgi?id=14566 Raise SECURITY_ERR exception if an attempt is made to change document.domain to an invalid value. Test: fast/js/invalid-domain-change-throws-exception.html * dom/Document.cpp: (WebCore::Document::setDomain): * dom/Document.h: * dom/Document.idl: git-svn-id: http://svn.webkit.org/repository/webkit/trunk@48761 268f45cc-cd09-0410-ab3c-d52691b4dbfc
-
- 23 Sep, 2009 2 commits
-
-
ggaren@apple.com authored
store a vector with inline capacity in a hash table. Patch by Geoffrey Garen <ggaren@apple.com> on 2009-09-23 Reviewed by Sam Weinig. * wtf/Vector.h: (WTF::swap): (WTF::VectorBuffer::swap): WebCore: Bring a little sanity to this crazy EventTarget world of ours https://bugs.webkit.org/show_bug.cgi?id=29701 Patch by Geoffrey Garen <ggaren@apple.com> on 2009-09-23 Reviewed by Sam Weinig. Lots of EventTarget refactoring to achieve a single shared implementation that fixes some of the performance and correctness bugs of the many individual implementations, and makes reasoning about EventTargets and EventListeners much easier. The basic design is this: - EventTarget manages a set of EventListeners. - onXXX EventListener attributes forward to standard EventTarget APIs. - Since the onXXX code is repetitive, it is usually done with macros of the form DEFINE_ATTRIBUTE_EVENT_LISTENER(attributeName). - EventTarget provides a shared implementation of dispatchEvent, which subclasses with special event dispatch rules, like Node, override. - To support Node, which lazily instantiates its EventTarget data, EventTarget has no data members, and instead makes a virtual call to get its data from wherever its subclass chose to store it. Code that used to call dispatchEvent, passing an ExceptionCode paratmeter, even though no exception could be thrown, has been changed not to do so, to improve clarity and performance. Code that used to call a special dispatchXXXEvent function, which just turned around and called dispatchEvent, has been changed to call dispatchEvent, to improve clarity and performance. * WebCore.base.exp: * WebCore.xcodeproj/project.pbxproj: Another day in the life of a WebKit engineer. * bindings/js/JSDOMBinding.cpp: (WebCore::isObservableThroughDOM): Updated for Node API change. Added "is not in the document but is firing event listeners" as a condition that makes a Node observable in the DOM, so that event listeners firing on removed nodes are not destroyed midstream. (This was a long-standing bug that was somewhat hidden by the old implementation's habit of copying the RegisteredEventListener vector before firing events, which would keep almost all the relevant objects from being destroyed.) * bindings/js/JSEventListener.cpp: (WebCore::JSEventListener::handleEvent): Removed the isWindowEvent flag because it was one of the most elaborately planned no-ops in the history of software crime, and one of the reasons clients thought they needed more than one dispatchEvent function even though they didn't. * bindings/js/JSEventListener.h: * bindings/js/JSDOMWindowCustom.cpp: (WebCore::JSDOMWindow::markChildren): (WebCore::JSMessagePort::markChildren): * bindings/js/JSNodeCustom.cpp: (WebCore::JSNode::markChildren): * bindings/js/JSAbstractWorkerCustom.cpp: * bindings/js/JSDOMApplicationCacheCustom.cpp: * bindings/js/JSDedicatedWorkerContextCustom.cpp: * bindings/js/JSEventSourceCustom.cpp: * bindings/js/JSMessagePortCustom.cpp: * bindings/js/JSSharedWorkerContextCustom.cpp: Removed. * bindings/js/JSWebSocketCustom.cpp: * bindings/js/JSWorkerContextCustom.cpp: (WebCore::JSWorkerContext::markChildren): * bindings/js/JSWorkerCustom.cpp: * bindings/js/JSXMLHttpRequestCustom.cpp: (WebCore::JSXMLHttpRequest::markChildren): * bindings/js/JSXMLHttpRequestUploadCustom.cpp: (WebCore::JSXMLHttpRequestUpload::markChildren): EventListener marking is now autogenerated. Classes that still have custom mark functions for other reasons now call a shared EventTarget API to mark their EventListeners. * bindings/objc/ObjCEventListener.h: * bindings/objc/ObjCEventListener.mm: (WebCore::ObjCEventListener::handleEvent): Bye bye isWindowEvent. * bindings/scripts/CodeGeneratorJS.pm: Autogeneration support for marking and invalidating event listeners. * dom/CharacterData.cpp: (WebCore::CharacterData::dispatchModifiedEvent): * dom/ContainerNode.cpp: (WebCore::ContainerNode::insertBefore): (WebCore::ContainerNode::replaceChild): (WebCore::willRemoveChild): (WebCore::ContainerNode::appendChild): (WebCore::dispatchChildInsertionEvents): (WebCore::dispatchChildRemovalEvents): * dom/Document.cpp: (WebCore::Document::removeAllEventListeners): (WebCore::Document::implicitClose): (WebCore::Document::setFocusedNode): (WebCore::Document::dispatchWindowEvent): (WebCore::Document::dispatchWindowLoadEvent): (WebCore::Document::finishedParsing): * dom/Document.h: Use dispatchEvent directly. * dom/Element.h: Moved a few event listener attributes down from Node, since they don't apply to all Nodes, only Elements. * dom/EventListener.h: Removed isWindowEvent parameter. * dom/EventNames.h: Added the "display" event name, so it works correctly with attribute macros, and for performance. * dom/EventTarget.cpp: (WebCore::forbidEventDispatch): (WebCore::allowEventDispatch): (WebCore::eventDispatchForbidden): Made this code (embarrasingly) thread safe, since it's now called on multiple threads. (Currently, we only forbid event dispatch on the main thread. If we ever want to forbid event dispatch on secondary threads, we can improve it then.) (WebCore::EventTarget::addEventListener): (WebCore::EventTarget::removeEventListener): (WebCore::EventTarget::setAttributeEventListener): (WebCore::EventTarget::getAttributeEventListener): (WebCore::EventTarget::clearAttributeEventListener): (WebCore::EventTarget::dispatchEvent): (WebCore::EventTarget::fireEventListeners): (WebCore::EventTarget::getEventListeners): (WebCore::EventTarget::removeAllEventListeners): * dom/EventTarget.h: (WebCore::FiringEventEndIterator::FiringEventEndIterator): (WebCore::EventTarget::ref): (WebCore::EventTarget::deref): (WebCore::EventTarget::markEventListeners): (WebCore::EventTarget::invalidateEventListeners): (WebCore::EventTarget::isFiringEventListeners): (WebCore::EventTarget::hasEventListeners): The ONE TRUE IMPLEMENTATION of EventTarget APIs, crafted from an amalgam of all the different versions we used to have. The most significant change here is that we no longer make a copy of an EventListener vector before firing the events in the vector -- instead, we use a reference to the original vector, along with a notification mechanism for the unlikely case when an EventListener is removed from the vector. This substantially reduces malloc, copying, and refcount overhead, and complexity. * dom/InputElement.cpp: (WebCore::InputElement::setValueFromRenderer): * dom/MessageEvent.h: (WebCore::MessageEvent::create): Use dispatchEvent directly. * dom/MessagePort.cpp: (WebCore::MessagePort::dispatchMessages): (WebCore::MessagePort::eventTargetData): (WebCore::MessagePort::ensureEventTargetData): * dom/MessagePort.h: (WebCore::MessagePort::setOnmessage): (WebCore::MessagePort::onmessage): * dom/MessagePort.idl: Removed custom EventTarget implementation. * dom/MutationEvent.h: (WebCore::MutationEvent::create): Added some default values so callers can construct MutationEvents more easily, without calling a custom dispatch function. * dom/Node.cpp: (WebCore::Node::addEventListener): (WebCore::Node::removeEventListener): (WebCore::Node::eventTargetData): (WebCore::Node::ensureEventTargetData): (WebCore::Node::handleLocalEvents): (WebCore::Node::dispatchEvent): (WebCore::Node::dispatchGenericEvent): (WebCore::Node::dispatchSubtreeModifiedEvent): (WebCore::Node::dispatchUIEvent): (WebCore::Node::dispatchKeyEvent): (WebCore::Node::dispatchMouseEvent): (WebCore::Node::dispatchWheelEvent): (WebCore::Node::dispatchFocusEvent): (WebCore::Node::dispatchBlurEvent): * dom/Node.h: (WebCore::Node::preDispatchEventHandler): (WebCore::Node::postDispatchEventHandler): * dom/Node.idl: * dom/NodeRareData.h: (WebCore::NodeRareData::eventTargetData): (WebCore::NodeRareData::ensureEventTargetData): Use the shared EventTarget interface, and call dispatchEvent directly instead of custom dispatchXXXEvent functions that just forwarded to dispatchEvent. * dom/RegisteredEventListener.cpp: * dom/RegisteredEventListener.h: (WebCore::RegisteredEventListener::RegisteredEventListener): (WebCore::operator==): This is just a simple struct now, since we no longer do a complicated copy / refCount / isRemoved dance just to honor the rule that an EventListener can be removed during event dispatch. * history/CachedFrame.cpp: (WebCore::CachedFrameBase::restore): Removed another custom dispatchEvent. * html/HTMLBodyElement.cpp: * html/HTMLBodyElement.h: Use the shared EventTarget API. * html/HTMLFormControlElement.cpp: (WebCore::HTMLFormControlElement::dispatchFormControlChangeEvent): (WebCore::HTMLFormControlElement::checkValidity): * html/HTMLFormElement.cpp: (WebCore::HTMLFormElement::handleLocalEvents): (WebCore::HTMLFormElement::prepareSubmit): (WebCore::HTMLFormElement::reset): * html/HTMLFormElement.h: Use the standard dispatchEvent API. * html/HTMLFrameSetElement.cpp: * html/HTMLFrameSetElement.h: Use the shared EventTarget API. * html/HTMLImageLoader.cpp: (WebCore::HTMLImageLoader::dispatchLoadEvent): * html/HTMLInputElement.cpp: (WebCore::HTMLInputElement::onSearch): * html/HTMLMediaElement.cpp: (WebCore::HTMLMediaElement::loadInternal): * html/HTMLScriptElement.cpp: (WebCore::HTMLScriptElement::dispatchLoadEvent): (WebCore::HTMLScriptElement::dispatchErrorEvent): * html/HTMLSourceElement.cpp: (WebCore::HTMLSourceElement::errorEventTimerFired): * html/HTMLTokenizer.cpp: (WebCore::HTMLTokenizer::notifyFinished): Use the standard dispatchEvent API. * inspector/InspectorDOMAgent.cpp: (WebCore::InspectorDOMAgent::handleEvent): * inspector/InspectorDOMAgent.h: * inspector/InspectorDOMStorageResource.cpp: (WebCore::InspectorDOMStorageResource::handleEvent): * inspector/InspectorDOMStorageResource.h: * loader/FrameLoader.cpp: (WebCore::FrameLoader::stopLoading): (WebCore::FrameLoader::canCachePageContainingThisFrame): (WebCore::FrameLoader::logCanCacheFrameDecision): (WebCore::HashChangeEventTask::performTask): (WebCore::FrameLoader::pageHidden): No more isWindowEvent. * loader/ImageDocument.cpp: (WebCore::ImageEventListener::handleEvent): * loader/appcache/ApplicationCacheGroup.cpp: (WebCore::CallCacheListenerTask::performTask): * loader/appcache/ApplicationCacheHost.cpp: (WebCore::ApplicationCacheHost::notifyDOMApplicationCache): * loader/appcache/ApplicationCacheHost.h: * loader/appcache/DOMApplicationCache.cpp: (WebCore::DOMApplicationCache::eventTargetData): (WebCore::DOMApplicationCache::ensureEventTargetData): * loader/appcache/DOMApplicationCache.h: * loader/appcache/DOMApplicationCache.idl: Switched to the standard EventTarget API. As a part of this, I switched this class from using a custom internal event name enumeration to using the standard EventNames. * notifications/Notification.cpp: (WebCore::Notification::eventTargetData): (WebCore::Notification::ensureEventTargetData): * notifications/Notification.h: (WebCore::Notification::scriptExecutionContext): * notifications/Notification.idl: Switched to the standard EventTarget API. * page/DOMWindow.cpp: (WebCore::PostMessageTimer::event): (WebCore::windowsWithUnloadEventListeners): (WebCore::windowsWithBeforeUnloadEventListeners): (WebCore::allowsBeforeUnloadListeners): (WebCore::DOMWindow::dispatchAllPendingBeforeUnloadEvents): (WebCore::DOMWindow::pendingUnloadEventListeners): (WebCore::DOMWindow::dispatchAllPendingUnloadEvents): Changed the "pending" unload / beforeunload listener tracker just to track which windows had such listeners, instead of actually keeping a copy of the listeners. Now, this code can use the standard EventTarget API. (WebCore::DOMWindow::~DOMWindow): (WebCore::DOMWindow::postMessageTimerFired): (WebCore::DOMWindow::addEventListener): (WebCore::DOMWindow::removeEventListener): (WebCore::DOMWindow::dispatchLoadEvent): (WebCore::DOMWindow::dispatchEvent): (WebCore::DOMWindow::removeAllEventListeners): (WebCore::DOMWindow::captureEvents): (WebCore::DOMWindow::releaseEvents): (WebCore::DOMWindow::eventTargetData): (WebCore::DOMWindow::ensureEventTargetData): * page/DOMWindow.h: * page/DOMWindow.idl: Use the standard EventTarget APIs. * page/EventHandler.cpp: (WebCore::EventHandler::canMouseDownStartSelect): (WebCore::EventHandler::canMouseDragExtendSelect): (WebCore::EventHandler::sendResizeEvent): (WebCore::EventHandler::sendScrollEvent): Use dispatchEvent directly. * page/EventSource.cpp: (WebCore::EventSource::endRequest): (WebCore::EventSource::didReceiveResponse): (WebCore::EventSource::parseEventStreamLine): (WebCore::EventSource::stop): (WebCore::EventSource::createMessageEvent): (WebCore::EventSource::eventTargetData): (WebCore::EventSource::ensureEventTargetData): * page/EventSource.h: * page/EventSource.idl: Use the standard EventTarget APIs. * page/FocusController.cpp: (WebCore::dispatchEventsOnWindowAndFocusedNode): (WebCore::FocusController::setFocusedFrame): * page/Frame.cpp: (WebCore::Frame::shouldClose): * page/Frame.h: * page/Page.cpp: (WebCore::networkStateChanged): * page/animation/AnimationController.cpp: (WebCore::AnimationControllerPrivate::updateStyleIfNeededDispatcherFired): * rendering/RenderListBox.cpp: (WebCore::RenderListBox::valueChanged): * rendering/RenderTextControl.cpp: (WebCore::RenderTextControl::selectionChanged): * rendering/RenderTextControlMultiLine.cpp: (WebCore::RenderTextControlMultiLine::subtreeHasChanged): Use dispatchEvent. * svg/SVGElement.cpp: (WebCore::hasLoadListener): Rewritten for new EventTarget API. * svg/SVGElementInstance.cpp: (WebCore::dummyEventTargetData): (WebCore::SVGElementInstance::addEventListener): (WebCore::SVGElementInstance::removeEventListener): (WebCore::SVGElementInstance::removeAllEventListeners): (WebCore::SVGElementInstance::dispatchEvent): (WebCore::SVGElementInstance::eventTargetData): (WebCore::SVGElementInstance::ensureEventTargetData): Use the EventTarget API. * svg/SVGElementInstance.h: * svg/SVGImageLoader.cpp: (WebCore::SVGImageLoader::dispatchLoadEvent): * svg/SVGScriptElement.cpp: (WebCore::SVGScriptElement::dispatchErrorEvent): Use dispatchEvent directly. * svg/SVGUseElement.cpp: (WebCore::SVGUseElement::transferEventListenersToShadowTree): Updated for new EventTarget API. * svg/animation/SVGSMILElement.cpp: (WebCore::ConditionEventListener::handleEvent): No more isWindowEvent. * websockets/WebSocket.cpp: (WebCore::ProcessWebSocketEventTask::create): (WebCore::ProcessWebSocketEventTask::performTask): (WebCore::ProcessWebSocketEventTask::ProcessWebSocketEventTask): (WebCore::WebSocket::didConnect): (WebCore::WebSocket::didReceiveMessage): (WebCore::WebSocket::didClose): (WebCore::WebSocket::eventTargetData): (WebCore::WebSocket::ensureEventTargetData): * websockets/WebSocket.h: * websockets/WebSocket.idl: * workers/AbstractWorker.cpp: (WebCore::AbstractWorker::eventTargetData): (WebCore::AbstractWorker::ensureEventTargetData): * workers/AbstractWorker.h: * workers/AbstractWorker.idl: * workers/DedicatedWorkerContext.cpp: * workers/DedicatedWorkerContext.h: * workers/DedicatedWorkerContext.idl: * workers/DefaultSharedWorkerRepository.cpp: (WebCore::SharedWorkerConnectTask::performTask): (WebCore::SharedWorkerScriptLoader::load): (WebCore::SharedWorkerScriptLoader::notifyFinished): * workers/SharedWorker.idl: * workers/SharedWorkerContext.cpp: (WebCore::createConnectEvent): * workers/SharedWorkerContext.h: * workers/SharedWorkerContext.idl: * workers/Worker.cpp: (WebCore::Worker::notifyFinished): * workers/Worker.h: * workers/Worker.idl: * workers/WorkerContext.cpp: (WebCore::WorkerContext::eventTargetData): (WebCore::WorkerContext::ensureEventTargetData): * workers/WorkerContext.h: * workers/WorkerContext.idl: * workers/WorkerMessagingProxy.cpp: (WebCore::MessageWorkerContextTask::performTask): (WebCore::MessageWorkerTask::performTask): (WebCore::WorkerExceptionTask::performTask): * xml/XMLHttpRequest.cpp: (WebCore::XMLHttpRequest::callReadyStateChangeListener): (WebCore::XMLHttpRequest::createRequest): (WebCore::XMLHttpRequest::abort): (WebCore::XMLHttpRequest::networkError): (WebCore::XMLHttpRequest::abortError): (WebCore::XMLHttpRequest::didSendData): (WebCore::XMLHttpRequest::didReceiveData): (WebCore::XMLHttpRequest::eventTargetData): (WebCore::XMLHttpRequest::ensureEventTargetData): * xml/XMLHttpRequest.h: * xml/XMLHttpRequest.idl: * xml/XMLHttpRequestProgressEvent.h: (WebCore::XMLHttpRequestProgressEvent::create): * xml/XMLHttpRequestUpload.cpp: (WebCore::XMLHttpRequestUpload::eventTargetData): (WebCore::XMLHttpRequestUpload::ensureEventTargetData): * xml/XMLHttpRequestUpload.h: * xml/XMLHttpRequestUpload.idl: Use new EventTarget API. WebKit/mac: Updated for a WebCore rename. Patch by Geoffrey Garen <ggaren@apple.com> on 2009-09-23 Reviewed by Sam Weinig. * WebView/WebFrame.mm: (-[WebFrame _cacheabilityDictionary]): LayoutTests: Layout tests for event target sanitization. Patch by Geoffrey Garen <ggaren@apple.com> on 2009-09-23 Reviewed by Sam Weinig. New tests for event dispatch: * fast/events/event-attributes-after-exception-expected.txt: Added. * fast/events/event-attributes-after-exception.html: Added. * fast/events/event-fire-order-expected.txt: Added. * fast/events/event-fire-order.html: Added. * fast/events/event-fired-after-removal-expected.txt: Added. * fast/events/event-fired-after-removal.html: Added. Fixed these tests: * fast/xmlhttprequest/xmlhttprequest-get-expected.txt: eventPhase should be AT_TARGET (2) when firing an event on an XHR, not INVALID (0). * http/tests/xmlhttprequest/infoOnProgressEvent-expected.txt: ditto * http/tests/xmlhttprequest/event-target-expected.txt: * http/tests/xmlhttprequest/event-target.html: Removing an event listener during event dispatch should prevent it from firing. (This test was backwards.) * svg/custom/loadevents-capturing.svg: Enhanced this test to tell you why it fails when it fails. Changed it to register runTest() (now named reportResults()) using addEventListener() instead of the 'onload' attribute. The test relies on reportResults() running after handler(), so it needs to register reportResults() after handler(). git-svn-id: http://svn.webkit.org/repository/webkit/trunk@48701 268f45cc-cd09-0410-ab3c-d52691b4dbfc
-
darin@apple.com authored
https://bugs.webkit.org/show_bug.cgi?id=29686 rdar://problem/6984996 Patch by Darin Adler <darin@apple.com> on 2009-09-23 Reviewed by Sam Weinig. When loading is deferred, we need to defer timer-based loads too, not just networking-driven loads. Otherwise we can get syncronouse navigation while running a script, which leads to crashes and other badness. This patch includes a manual test; an automated test may be possible some time in the future. * dom/Document.cpp: (WebCore::Document::processHttpEquiv): Use scheduleLocationChange instead of scheduleHTTPRedirection to implement the navigation needed for x-frame-options. * loader/FrameLoader.cpp: (WebCore::FrameLoader::FrameLoader): Updated for data members with new names and new data members. (WebCore::FrameLoader::setDefersLoading): When turning deferral off, call startRedirectionTimer and startCheckCompleteTimer, since either of them might have been fired and ignored while defersLoading was true. (WebCore::FrameLoader::clear): Updated for replacement of the m_checkCompletedTimer and m_checkLoadCompleteTimer timers. (WebCore::FrameLoader::allAncestorsAreComplete): Added. (WebCore::FrameLoader::checkCompleted): Added code to set m_shouldCallCheckCompleted to false. Changed code that calls startRedirectionTimer to call it unconditionally, since that function now knows when to do work and doesn't expect callers to handle that any more. (WebCore::FrameLoader::checkTimerFired): Added. Replaces the old timer fired callbacks. Calls checkCompleted and checkLoadComplete as appropriate, but not when defersLoading is true. (WebCore::FrameLoader::startCheckCompleteTimer): Added. Replaces the two different calls to start timers before. Only starts the timers if they are needed. (WebCore::FrameLoader::scheduleCheckCompleted): Changed to call startCheckCompleteTimer after setting boolean. (WebCore::FrameLoader::scheduleCheckLoadComplete): Ditto. (WebCore::FrameLoader::scheduleHistoryNavigation): Removed canGoBackOrForward check. The logic works more naturally when we don't do anything until the timer fires. (WebCore::FrameLoader::redirectionTimerFired): Do nothing if defersLoading is true. Also moved canGoBackOrForward check here. (WebCore::FrameLoader::scheduleRedirection): Changed code that calls startRedirectionTimer to do so unconditionally. That function now handles the rules about when to start the timer rather than expecting the caller to do so. (WebCore::FrameLoader::startRedirectionTimer): Added code to handle the case where there is no redirection scheduled, where the timer is already active, or where this is a classic redirection and there is an ancestor that has not yet completed loading. (WebCore::FrameLoader::completed): Call startRedirectionTimer here directly instead of calling a cover named parentCompleted. Hooray! One less function in the giant FrameLoader class! (WebCore::FrameLoader::checkLoadComplete): Added code to set m_shouldCallCheckLoadComplete to false. * loader/FrameLoader.h: Replaced the two functions checkCompletedTimerFired and checkLoadCompleteTimerFired with one function, checkTimerFired. Removed the parentCompleted function. Added the startCheckCompleteTimer and allAncestorsAreComplete functions. Replaced the m_checkCompletedTimer and m_checkLoadCompleteTimer data members with m_checkTimer, m_shouldCallCheckCompleted, and m_shouldCallCheckLoadComplete. * manual-tests/go-back-after-alert.html: Added. * manual-tests/resources/alert-and-go-back.html: Added. git-svn-id: http://svn.webkit.org/repository/webkit/trunk@48687 268f45cc-cd09-0410-ab3c-d52691b4dbfc
-
- 19 Sep, 2009 1 commit
-
-
eric@webkit.org authored
Reviewed by Maciej Stachowiak. Basic tests for msub, msup, and mtable/mtr/mtd * mathml: Added. * mathml/presentation: Added. * mathml/presentation/sub.xhtml: Added. * mathml/presentation/sup.xhtml: Added. * mathml/presentation/tables.xhtml: Added. * platform/mac/mathml: Added. * platform/mac/mathml/presentation: Added. * platform/mac/mathml/presentation/sub-expected.txt: Added. * platform/mac/mathml/presentation/sup-expected.txt: Added. * platform/mac/mathml/presentation/tables-expected.txt: Added. 2009-09-19 Alex Milowski <alex@milowski.com> Reviewed by Maciej Stachowiak. Adds CSS styling and basic DOM element support for MathML * DerivedSources.make: Added user stylesheet and tag factory generation * WebCore.xcodeproj/project.pbxproj: Added new DOM element code * css/CSSParser.cpp: (WebCore::CSSParser::parseAttr): Added check for document since stylesheet can be added before there is a document * css/CSSStyleSelector.cpp: (WebCore::CSSStyleSelector::styleForElement): Added check to add MathML user agent stylesheet * css/mathml.css: Added. MathML user agent stylesheet * dom/Document.cpp: (WebCore::Document::createElement): Added support for creation of MathML DOM objects * dom/Node.h: (WebCore::Node::isMathMLElement): Added check method for whether the node is a MathML node * mathml: Added. * mathml/MathMLElement.cpp: Added. (WebCore::MathMLElement::MathMLElement): (WebCore::MathMLElement::create): (WebCore::MathMLElement::createRenderer): * mathml/MathMLElement.h: Added. (WebCore::MathMLElement::isMathMLElement): MathML DOM base class * mathml/MathMLInlineContainerElement.cpp: Added. (WebCore::MathMLInlineContainerElement::MathMLInlineContainerElement): (WebCore::MathMLInlineContainerElement::create): (WebCore::MathMLInlineContainerElement::createRenderer): * mathml/MathMLInlineContainerElement.h: Added. Base class for non-text containers * mathml/MathMLMathElement.cpp: Added. (WebCore::MathMLMathElement::MathMLMathElement): (WebCore::MathMLMathElement::create): * mathml/MathMLMathElement.h: Added. Root Math element * mathml/mathtags.in: Added. Element list mappings * page/Frame.cpp: (WebCore::Frame::Frame): git-svn-id: http://svn.webkit.org/repository/webkit/trunk@48559 268f45cc-cd09-0410-ab3c-d52691b4dbfc
-
- 16 Sep, 2009 1 commit
-
-
bolsinga@apple.com authored
https://bugs.webkit.org/show_bug.cgi?id=29260 Reviewed by David Kilzer. JavaScriptCore: * wtf/Platform.h: WebCore: No new tests. (No change in default behavior.) * DerivedSources.make: Use new WebCore.Inspector.exp file if ENABLE_DRAG_SUPPORT. * WebCore.base.exp: Move Inspector only exports to WebCore.Inspector.exp. * WebCore.xcodeproj/project.pbxproj: Add WebCore.Inspector.exp. * bindings/js/JSDOMWindowBase.cpp: Use ENABLE(INSPECTOR) where applicable. (WebCore::JSDOMWindowBase::supportsProfiling): * bindings/js/JSInspectedObjectWrapper.cpp: Wrap entire file in ENABLE(INSPECTOR). * bindings/js/JSInspectorBackendCustom.cpp: Ditto. * bindings/js/JSInspectorCallbackWrapper.cpp: Ditto. * bindings/js/ScriptObject.cpp: Use ENABLE(INSPECTOR) where applicable. * bindings/js/ScriptObject.h: Ditto. * bindings/js/ScriptObjectQuarantine.cpp: Wrap entire file in ENABLE(INSPECTOR). * dom/Document.cpp: Use ENABLE(INSPECTOR) where applicable. (WebCore::Document::recalcStyle): (WebCore::Document::addMessage): (WebCore::Document::resourceRetrievedByXMLHttpRequest): (WebCore::Document::scriptImported): * dom/Document.h: Ditto. * dom/Node.cpp: Ditto. (WebCore::Node::dispatchGenericEvent): * dom/ScriptExecutionContext.h: Ditto. (WebCore::): * html/HTMLDocument.cpp: Ditto. (WebCore::HTMLDocument::createTokenizer): * html/HTMLTokenizer.cpp: Ditto. (WebCore::HTMLTokenizer::write): * inspector/ConsoleMessage.cpp: Ditto. (WebCore::ConsoleMessage::ConsoleMessage): (WebCore::ConsoleMessage::isEqual): * inspector/ConsoleMessage.h: Ditto. * inspector/DOMDispatchTimelineItem.cpp: Wrap entire file in ENABLE(INSPECTOR). * inspector/InspectorBackend.cpp: Ditto. * inspector/InspectorController.cpp: Ditto. * inspector/InspectorDOMAgent.cpp: Ditto. * inspector/InspectorDOMStorageResource.cpp: Ditto. * inspector/InspectorDatabaseResource.cpp: Ditto. * inspector/InspectorFrontend.cpp: Ditto. * inspector/InspectorResource.cpp: Ditto. * inspector/InspectorTimelineAgent.cpp: Ditto. * inspector/TimelineItem.cpp: Ditto. * loader/FrameLoader.cpp: Use ENABLE(INSPECTOR) where applicable. (WebCore::FrameLoader::detachFromParent): (WebCore::FrameLoader::continueLoadAfterNavigationPolicy): (WebCore::FrameLoader::loadedResourceFromMemoryCache): (WebCore::FrameLoader::dispatchWindowObjectAvailable): (WebCore::FrameLoader::dispatchDidCommitLoad): (WebCore::FrameLoader::dispatchAssignIdentifierToInitialRequest): (WebCore::FrameLoader::dispatchWillSendRequest): (WebCore::FrameLoader::dispatchDidReceiveResponse): (WebCore::FrameLoader::dispatchDidReceiveContentLength): (WebCore::FrameLoader::dispatchDidFinishLoading): * page/Chrome.cpp: Ditto. (WebCore::Chrome::mouseDidMoveOverElement): * page/Console.cpp: Ditto. (WebCore::Console::addMessage): (WebCore::Console::count): (WebCore::Console::profile): (WebCore::Console::profileEnd): (WebCore::Console::time): (WebCore::Console::timeEnd): (WebCore::Console::group): (WebCore::Console::groupEnd): * page/ContextMenuController.cpp: Ditto. (WebCore::ContextMenuController::handleContextMenuEvent): (WebCore::ContextMenuController::contextMenuItemSelected): * page/DOMWindow.cpp: Ditto. (WebCore::DOMWindow::sessionStorage): (WebCore::DOMWindow::localStorage): * page/EventHandler.cpp: Ditto. (WebCore::EventHandler::handleMousePressEvent): * page/FrameView.cpp: Ditto. (WebCore::FrameView::layout): (WebCore::FrameView::paintContents): * page/FrameView.h: Ditto. * page/Page.cpp: Ditto. (WebCore::Page::Page): (WebCore::Page::~Page): * page/Page.h: Ditto. * platform/ContextMenu.cpp: Ditto. (WebCore::ContextMenu::checkOrEnableIfNeeded): * platform/ContextMenuItem.h: Ditto. (WebCore::): * storage/Database.cpp: Ditto. (WebCore::Database::openDatabase): * workers/WorkerContext.cpp: Ditto. (WebCore::WorkerContext::importScripts): * xml/XMLHttpRequest.cpp: Ditto. (WebCore::XMLHttpRequest::didFinishLoading): git-svn-id: http://svn.webkit.org/repository/webkit/trunk@48430 268f45cc-cd09-0410-ab3c-d52691b4dbfc
-
- 15 Sep, 2009 2 commits
-
-
ggaren@apple.com authored
it was vestigial. The reference cycle it tried to solve was solved another way in https://bugs.webkit.org/show_bug.cgi?id=21260. Patch by Geoffrey Garen <ggaren@apple.com> on 2009-09-15 Reviewed by Sam Weinig. * dom/Document.cpp: (WebCore::Document::removeAllEventListeners): * dom/Document.h: * dom/Node.cpp: (WebCore::Node::~Node): (WebCore::Node::insertedIntoDocument): (WebCore::Node::removedFromDocument): (WebCore::Node::willMoveToNewOwnerDocument): (WebCore::Node::didMoveToNewOwnerDocument): (WebCore::Node::addEventListener): (WebCore::Node::removeEventListener): (WebCore::Node::clearAttributeEventListener): git-svn-id: http://svn.webkit.org/repository/webkit/trunk@48406 268f45cc-cd09-0410-ab3c-d52691b4dbfc
-
mrowe@apple.com authored
WebCore: Document.elementFromPoint() and Document.caretRangeFromPoint() erroneously returning null at points visible only after scrolling. https://bugs.webkit.org/show_bug.cgi?id=29245 Patch by Andrew Richards <randrew@gmail.com> on 2009-09-14 Reviewed by Sam Weinig. Use visibleContentRect() instead of boundsRect() when checking hit point bounds on viewport. * dom/Document.cpp: (WebCore::Document::elementFromPoint): (WebCore::Document::caretRangeFromPoint): LayoutTests: Document.elementFromPoint() and Document.caretRangeFromPoint() returning null at points visible only after scrolling. https://bugs.webkit.org/show_bug.cgi?id=29245 Patch by Andrew Richards <randrew@gmail.com> on 2009-09-14 Reviewed by Sam Weinig. Extend tests to include hits in areas that are not in the initial containing block of the page. * fast/dom/Document/CaretRangeFromPoint/hittest-relative-to-viewport-expected.txt: * fast/dom/Document/CaretRangeFromPoint/hittest-relative-to-viewport.html: * fast/dom/elementFromPoint-relative-to-viewport-expected.txt: * fast/dom/elementFromPoint-relative-to-viewport.html: git-svn-id: http://svn.webkit.org/repository/webkit/trunk@48398 268f45cc-cd09-0410-ab3c-d52691b4dbfc
-
- 12 Sep, 2009 2 commits
-
-
https://bugs.webkit.org/show_bug.cgi?id=29219weinig@apple.com authored
Document.elementFromPoint() should take page scroll into consideration Reviewed by Anders Carlsson. Test: fast/dom/elementFromPoint-relative-to-viewport.html * dom/Document.cpp: (WebCore::Document::elementFromPoint): (WebCore::Document::caretRangeFromPoint): LayoutTests: Test for https://bugs.webkit.org/show_bug.cgi?id=29219 Document.elementFromPoint() should take page scroll into consideration Reviewed by Anders Carlsson. * fast/dom/elementFromPoint-relative-to-viewport-expected.txt: Added. * fast/dom/elementFromPoint-relative-to-viewport.html: Added. * fast/events/offsetX-offsetY.html: Change to use clientX/Y instead of pageX/Y. * fast/forms/slider-transformed.html: Ditto. * fast/forms/slider-zoomed.html: Ditto. git-svn-id: http://svn.webkit.org/repository/webkit/trunk@48334 268f45cc-cd09-0410-ab3c-d52691b4dbfc
-
https://bugs.webkit.org/show_bug.cgi?id=29217weinig@apple.com authored
Document.caretRangeFromPoint should take the scroll offset into account before hit testing Reviewed by Maciej Stachowiak. In accordance with the CSSOM View Module spec, Document.caretRangeFromPoint should interpret the point passed to it as relative to the viewport, not the document. Test: fast/dom/Document/CaretRangeFromPoint/hittest-relative-to-viewport.html * dom/Document.cpp: (WebCore::Document::caretRangeFromPoint): LayoutTests: Test for https://bugs.webkit.org/show_bug.cgi?id=29217 Document.caretRangeFromPoint should take the scroll offset into account before hit testing Reviewed by Maciej Stachowiak. * fast/dom/Document/CaretRangeFromPoint/hittest-relative-to-viewport-expected.txt: Added. * fast/dom/Document/CaretRangeFromPoint/hittest-relative-to-viewport.html: Added. git-svn-id: http://svn.webkit.org/repository/webkit/trunk@48333 268f45cc-cd09-0410-ab3c-d52691b4dbfc
-
- 10 Sep, 2009 1 commit
-
-
cfleizach@apple.com authored
https://bugs.webkit.org/show_bug.cgi?id=28963 Reviewed by Darin Adler. Moves AX notifications over to an ENUM type instead of using the actual string values that are used on OS X. * accessibility/AXObjectCache.cpp: (WebCore::AXObjectCache::postNotification): (WebCore::AXObjectCache::selectedChildrenChanged): * accessibility/AXObjectCache.h: (WebCore::AXObjectCache::): * accessibility/AccessibilityRenderObject.cpp: (WebCore::AccessibilityRenderObject::handleActiveDescendantChanged): * accessibility/chromium/AXObjectCacheChromium.cpp: (WebCore::AXObjectCache::postPlatformNotification): * accessibility/gtk/AXObjectCacheAtk.cpp: (WebCore::AXObjectCache::postPlatformNotification): * accessibility/mac/AXObjectCacheMac.mm: (WebCore::AXObjectCache::postPlatformNotification): * accessibility/win/AXObjectCacheWin.cpp: (WebCore::AXObjectCache::postPlatformNotification): * dom/Document.cpp: (WebCore::Document::implicitClose): * dom/Element.cpp: (WebCore::Element::updateAfterAttributeChanged): * editing/Editor.cpp: (WebCore::Editor::respondToChangedContents): * editing/mac/SelectionControllerMac.mm: (WebCore::SelectionController::notifyAccessibilityForSelectionChange): * html/HTMLInputElement.cpp: (WebCore::HTMLInputElement::setChecked): * page/FrameView.cpp: (WebCore::FrameView::layout): * rendering/RenderTextControl.cpp: (WebCore::RenderTextControl::setInnerTextValue): git-svn-id: http://svn.webkit.org/repository/webkit/trunk@48244 268f45cc-cd09-0410-ab3c-d52691b4dbfc
-
- 09 Sep, 2009 1 commit
-
-
https://bugs.webkit.org/show_bug.cgi?id=29102hyatt@apple.com authored
WebCore: https://bugs.webkit.org/show_bug.cgi?id=29102, add support for user stylesheet injection. This is similar to user script injection but allows for user stylesheets to be added. The stylesheets are applied immediately to all Frames in the PageGroup. Reviewed by Adam Roben. Added userscripts/simple-stylesheet.html test case. * WebCore.base.exp: * WebCore.gypi: * WebCore.vcproj/WebCore.vcproj: * WebCore.xcodeproj/project.pbxproj: * css/CSSStyleSelector.cpp: (WebCore::CSSStyleSelector::CSSStyleSelector): * css/CSSStyleSelector.h: * dom/Document.cpp: (WebCore::Document::Document): (WebCore::Document::attach): (WebCore::Document::pageGroupUserSheets): (WebCore::Document::clearPageGroupUserSheets): (WebCore::Document::recalcStyleSelector): * dom/Document.h: * loader/PlaceholderDocument.cpp: (WebCore::PlaceholderDocument::attach): * page/PageGroup.cpp: (WebCore::PageGroup::addUserStyleSheet): (WebCore::PageGroup::removeUserContentForWorld): (WebCore::PageGroup::removeAllUserContent): * page/PageGroup.h: (WebCore::PageGroup::userStyleSheets): * page/UserStyleSheet.h: Added. (WebCore::UserStyleSheet::UserStyleSheet): (WebCore::UserStyleSheet::source): (WebCore::UserStyleSheet::url): (WebCore::UserStyleSheet::patterns): (WebCore::UserStyleSheet::worldID): * page/UserStyleSheetTypes.h: Added. WebKit/mac: https://bugs.webkit.org/show_bug.cgi?id=29102, add support for user stylesheet injection. This is similar to user script injection but allows for user stylesheets to be added. The stylesheets are applied immediately to all Frames in the PageGroup. Reviewed by Adam Roben. Added userscripts/simple-stylesheet.html test case. * WebView/WebView.mm: (+[WebView _addUserStyleSheetToGroup:source:url:worldID:patterns:]): * WebView/WebViewPrivate.h: LayoutTests: https://bugs.webkit.org/show_bug.cgi?id=29102, add support for user stylesheet injection. This is similar to user script injection but allows for user stylesheets to be added. The stylesheets are applied immediately to all Frames in the PageGroup. Reviewed by Adam Roben. Added userscripts/simple-stylesheet.html test case. * platform/mac/userscripts/simple-stylesheet-expected.checksum: Added. * platform/mac/userscripts/simple-stylesheet-expected.png: Added. * platform/mac/userscripts/simple-stylesheet-expected.txt: Added. * userscripts/simple-stylesheet.html: Added. git-svn-id: http://svn.webkit.org/repository/webkit/trunk@48222 268f45cc-cd09-0410-ab3c-d52691b4dbfc
-
- 08 Sep, 2009 3 commits
-
-
https://bugs.webkit.org/show_bug.cgi?id=27046weinig@apple.com authored
Implement CSSOM DocumentView.caretRangeFromPoint Reviewed by Timothy Hatcher. Tests: fast/dom/Document/CaretRangeFromPoint/basic.html fast/dom/Document/CaretRangeFromPoint/replace-element.html * dom/Document.cpp: (WebCore::Document::caretRangeFromPoint): * dom/Document.h: * dom/Document.idl: LayoutTests: Test for https://bugs.webkit.org/show_bug.cgi?id=27046 Implement CSSOM DocumentView.caretRangeFromPoint Reviewed by Timothy Hatcher. * fast/dom/Document/CaretRangeFromPoint: Added. * fast/dom/Document/CaretRangeFromPoint/basic-expected.txt: Added. * fast/dom/Document/CaretRangeFromPoint/basic.html: Added. * fast/dom/Document/CaretRangeFromPoint/replace-element-expected.txt: Added. * fast/dom/Document/CaretRangeFromPoint/replace-element.html: Added. * fast/dom/Window/window-properties-expected.txt: git-svn-id: http://svn.webkit.org/repository/webkit/trunk@48188 268f45cc-cd09-0410-ab3c-d52691b4dbfc
-
https://bugs.webkit.org/show_bug.cgi?id=28987hyatt@apple.com authored
https://bugs.webkit.org/show_bug.cgi?id=28987, make the Document cache the page's user stylesheet in parsed form. Allows the sheet to survive across destruction/re-creation of the CSSStyleSelector. Reviewed by Eric Seidel. * css/CSSStyleSelector.cpp: (WebCore::CSSStyleSelector::CSSStyleSelector): * css/CSSStyleSelector.h: * dom/Document.cpp: (WebCore::Document::attach): (WebCore::Document::pageUserSheet): (WebCore::Document::clearPageUserSheet): (WebCore::Document::recalcStyleSelector): * dom/Document.h: * loader/PlaceholderDocument.cpp: (WebCore::PlaceholderDocument::attach): * page/Page.cpp: (WebCore::Page::userStyleSheetLocationChanged): * page/Settings.cpp: (WebCore::Settings::setUserStyleSheetLocation): git-svn-id: http://svn.webkit.org/repository/webkit/trunk@48181 268f45cc-cd09-0410-ab3c-d52691b4dbfc
-
eric@webkit.org authored
Reviewed by Eric Seidel. WebInspector: Adds a timeline agent to InspectorController that collects high-level timing data about event dispatch, layout, painting and HTML parsing and makes it available to Inspector. https://bugs.webkit.org/show_bug.cgi?id=25503 * WebCore.gypi: * WebCore.xcodeproj/project.pbxproj: * dom/Document.cpp: (WebCore::Document::recalcStyle): * dom/Document.h: (WebCore::Document::inspectorTimelineAgent): * dom/Node.cpp: (WebCore::Node::dispatchGenericEvent): * html/HTMLTokenizer.cpp: (WebCore::HTMLTokenizer::write): * inspector/DOMDispatchTimelineItem.cpp: Added. (WebCore::DOMDispatchTimelineItem::DOMDispatchTimelineItem): (WebCore::DOMDispatchTimelineItem::convertToScriptObject): * inspector/DOMDispatchTimelineItem.h: Added. (WebCore::DOMDispatchTimelineItem::~DOMDispatchTimelineItem): * inspector/InspectorBackend.cpp: (WebCore::InspectorBackend::enableTimeline): (WebCore::InspectorBackend::disableTimeline): (WebCore::InspectorBackend::timelineEnabled): * inspector/InspectorBackend.h: * inspector/InspectorBackend.idl: * inspector/InspectorController.cpp: (WebCore::InspectorController::setFrontendProxyObject): (WebCore::InspectorController::close): (WebCore::InspectorController::resetScriptObjects): (WebCore::InspectorController::enableTimeline): (WebCore::InspectorController::disableTimeline): (WebCore::InspectorController::timelineEnabled): * inspector/InspectorController.h: (WebCore::InspectorController::timelineAgent): * inspector/InspectorFrontend.cpp: (WebCore::InspectorFrontend::timelineWasEnabled): (WebCore::InspectorFrontend::timelineWasDisabled): (WebCore::InspectorFrontend::addItemToTimeline): * inspector/InspectorFrontend.h: * inspector/InspectorTimelineAgent.cpp: Added. (WebCore::InspectorTimelineAgent::InspectorTimelineAgent): (WebCore::InspectorTimelineAgent::~InspectorTimelineAgent): (WebCore::InspectorTimelineAgent::willDispatchDOMEvent): (WebCore::InspectorTimelineAgent::didDispatchDOMEvent): (WebCore::InspectorTimelineAgent::willLayout): (WebCore::InspectorTimelineAgent::didLayout): (WebCore::InspectorTimelineAgent::willRecalculateStyle): (WebCore::InspectorTimelineAgent::didRecalculateStyle): (WebCore::InspectorTimelineAgent::willPaint): (WebCore::InspectorTimelineAgent::didPaint): (WebCore::InspectorTimelineAgent::willWriteHTML): (WebCore::InspectorTimelineAgent::didWriteHTML): (WebCore::InspectorTimelineAgent::reset): (WebCore::InspectorTimelineAgent::didCompleteCurrentRecord): (WebCore::InspectorTimelineAgent::currentTimeInMilliseconds): (WebCore::InspectorTimelineAgent::sessionTimeInMilliseconds): * inspector/InspectorTimelineAgent.h: Added. * inspector/TimelineItem.cpp: Added. (WebCore::TimelineItem::TimelineItem): (WebCore::TimelineItem::addToTimeline): (WebCore::TimelineItem::convertToScriptObject): (WebCore::TimelineItem::convertChildrenToScriptArray): (WebCore::TimelineItem::addChildItem): * inspector/TimelineItem.h: Added. (WebCore::): (WebCore::TimelineItem::~TimelineItem): (WebCore::TimelineItem::previous): (WebCore::TimelineItem::releasePrevious): (WebCore::TimelineItem::setEndTime): (WebCore::TimelineItem::type): * inspector/front-end/TimelineAgent.js: Added. (WebInspector.TimelineAgent): (WebInspector.addItemToTimeline): (WebInspector.timelineWasEnabled): (WebInspector.timelineWasDisabled): * inspector/front-end/inspector.html: * page/FrameView.cpp: (WebCore::FrameView::layout): (WebCore::FrameView::paintContents): * page/FrameView.h: (WebCore::FrameView::inspectorTimelineAgent): * page/Page.cpp: (WebCore::Page::inspectorTimelineAgent): * page/Page.h: git-svn-id: http://svn.webkit.org/repository/webkit/trunk@48167 268f45cc-cd09-0410-ab3c-d52691b4dbfc
-
- 04 Sep, 2009 2 commits
-
-
https://bugs.webkit.org/show_bug.cgi?id=28984hyatt@apple.com authored
Make sure the other code path (now used by everybody) can handle data URLs. Reviewed by Adam Roben. As per the post on webkit-dev, the ability to work remotely isn't working properly anyway (it doesn't hold up the pending sheet count, so you'd just FOUC on every Web page), and it's extremely unlikely that anybody is relying on this support. Tor Arne agreed it was ok to disable (he enabled it on the Qt side), and only Mac/Qt were using this code. * WebCore.pro: * WebCore.xcodeproj/project.pbxproj: * dom/Document.cpp: (WebCore::Document::userStyleSheet): * dom/Document.h: * loader/FrameLoader.cpp: (WebCore::FrameLoader::begin): * loader/UserStyleSheetLoader.cpp: Removed. * loader/UserStyleSheetLoader.h: Removed. * page/Frame.cpp: (WebCore::Frame::reapplyStyles): * page/Frame.h: * page/Page.cpp: (WebCore::Page::userStyleSheetLocationChanged): (WebCore::Page::userStyleSheet): * page/mac/FrameMac.mm: * page/qt/FrameQt.cpp: git-svn-id: http://svn.webkit.org/repository/webkit/trunk@48075 268f45cc-cd09-0410-ab3c-d52691b4dbfc
-
hyatt@apple.com authored
Reviewed by Anders Carlsson. * dom/Document.cpp: * dom/Document.h: git-svn-id: http://svn.webkit.org/repository/webkit/trunk@48071 268f45cc-cd09-0410-ab3c-d52691b4dbfc
-
- 01 Sep, 2009 1 commit
-
-
jhoneycutt@apple.com authored
Reviewed by Sam Weinig. * accessibility/AXObjectCache.cpp: (WebCore::AXObjectCache::AXObjectCache): * accessibility/AXObjectCache.h: Remove the Document argument to the AXObjectCache constructor and the m_document member variable, and replace the no-parameter handleFocusedUIElementChanged() with the two-parameter GTK function. (WebCore::AXObjectCache::handleFocusedUIElementChanged): * accessibility/chromium/AXObjectCacheChromium.cpp: (WebCore::AXObjectCache::handleFocusedUIElementChanged): * accessibility/gtk/AXObjectCacheAtk.cpp: (WebCore::AXObjectCache::handleFocusedUIElementChanged): * accessibility/gtk/AccessibilityObjectWrapperAtk.cpp: (fallbackObject): Don't pass a null Document when constructing the AXObjectCache. * accessibility/mac/AXObjectCacheMac.mm: (WebCore::AXObjectCache::handleFocusedUIElementChanged): * accessibility/win/AXObjectCacheWin.cpp: (WebCore::AXObjectCache::handleFocusedUIElementChanged): Get the document from the RenderObject; m_document was removed. * dom/Document.cpp: (WebCore::Document::axObjectCache): Don't pass the Document when constructing the AXObjectCache. (WebCore::Document::setFocusedNode): Pass the old and new focused RenderObjects when calling handleFocusedUIElementChanged(). git-svn-id: http://svn.webkit.org/repository/webkit/trunk@47946 268f45cc-cd09-0410-ab3c-d52691b4dbfc
-
- 31 Aug, 2009 1 commit
-
-
ap@apple.com authored
https://bugs.webkit.org/show_bug.cgi?id=28852 Rename KURL single argument constructor to avoid confusion * platform/KURL.h: The constructor that used to be single argument should now be invoked as KURL(ParsedURLString, myString). git-svn-id: http://svn.webkit.org/repository/webkit/trunk@47907 268f45cc-cd09-0410-ab3c-d52691b4dbfc
-
- 27 Aug, 2009 1 commit
-
-
ap@apple.com authored
https://bugs.webkit.org/show_bug.cgi?id=28758 <rdar://problem/6440869> Implement pageshow and pagehide events for b/f cache (28758) Tests: fast/events/pageshow-pagehide-on-back-cached.html fast/events/pageshow-pagehide-on-back-uncached.html fast/events/pageshow-pagehide.html * loader/FrameLoader.cpp: (WebCore::FrameLoader::stopLoading): Dispatch pagehide event (this function is called both when a document goes away, and when it goes to b/f cache). * page/DOMWindow.cpp: (WebCore::DOMWindow::dispatchAllPendingUnloadEvents): Dispatch pagehide right before unload. (WebCore::DOMWindow::dispatchPageTransitionEvent): Do what it takes to add a new event handler that can be installed on Window object. (WebCore::DOMWindow::onpagehide): Ditto. (WebCore::DOMWindow::setOnpagehide): Ditto. (WebCore::DOMWindow::onpageshow): Ditto. (WebCore::DOMWindow::setOnpageshow): Ditto. * history/CachedFrame.cpp: (WebCore::CachedFrame::restore): Dispatch pageshow for a page that isn't being restored from cache. * dom/PageTransitionEvent.cpp: Added. (WebCore::PageTransitionEvent::PageTransitionEvent): (WebCore::PageTransitionEvent::~PageTransitionEvent): (WebCore::PageTransitionEvent::initPageTransitionEvent): * dom/PageTransitionEvent.h: Added. (WebCore::PageTransitionEvent::create): (WebCore::PageTransitionEvent::isPageTransitionEvent): (WebCore::PageTransitionEvent::persisted): * dom/PageTransitionEvent.idl: Added. Add event class implementation. * html/HTMLBodyElement.cpp: (WebCore::HTMLBodyElement::parseMappedAttribute): Support inline listener definition (note that adding listeners to document.body programmatically is not supported, matching Firefox). * dom/Document.cpp: (WebCore::Document::implicitClose): Dispatch pageshow event right before load event. (WebCore::Document::dispatchPageTransitionEvent): Do what it takes to add a new event for Docuemnt. (WebCore::Document::createEvent): Ditto. * dom/Document.h: Added dispatchPageTransitionEvent. * DerivedSources.make: * GNUmakefile.am: * WebCore.gypi: * WebCore.pro: * WebCore.vcproj/WebCore.vcproj: * WebCore.xcodeproj/project.pbxproj: * WebCoreSources.bkl: * bindings/js/JSEventCustom.cpp: (WebCore::toJS): * dom/Event.cpp: (WebCore::Event::isPageTransitionEvent): * dom/Event.h: * dom/EventNames.h: * html/HTMLAttributeNames.in: * page/DOMWindow.h: * page/DOMWindow.idl: Do what it takes to add a new event type. git-svn-id: http://svn.webkit.org/repository/webkit/trunk@47824 268f45cc-cd09-0410-ab3c-d52691b4dbfc
-
- 25 Aug, 2009 1 commit
-
-
cmarrin@apple.com authored
https://bugs.webkit.org/show_bug.cgi?id=28018 This also hooks up CanvasRenderingContext as the common base class for CanvasRenderingContext2D and CanvasRenderingContext3D. And it adds a bit of logic throughout to support the new CanvasRenderingContext3D object. But nothing is hooked up yet. git-svn-id: http://svn.webkit.org/repository/webkit/trunk@47752 268f45cc-cd09-0410-ab3c-d52691b4dbfc
-
- 24 Aug, 2009 1 commit
-
-
krit@webkit.org authored
Reviewed by Mark Rowe. Code clean-up and build fix for filters enabled builds. Moved SVGNames.h into #if ENABLE(SVG) for Document.cpp and added SVGNames.h to the other files. They are needed there after r47688. * dom/Document.cpp: * svg/SVGComponentTransferFunctionElement.h: * svg/SVGFELightElement.h: * svg/SVGFEMergeNodeElement.h: * svg/SVGFilterPrimitiveStandardAttributes.h: git-svn-id: http://svn.webkit.org/repository/webkit/trunk@47698 268f45cc-cd09-0410-ab3c-d52691b4dbfc
-
- 23 Aug, 2009 2 commits
-
-
kov@webkit.org authored
2009-08-23 Gustavo Noronha Silva <gns@gnome.org> Unreviewed, build fix for make distcheck on GTK+. * GNUmakefile.am: Added files needed for the build. * bindings/js/JSDOMWindowCustom.cpp: Protect SharedWorker include with #if clause. * bindings/js/JSEventTarget.cpp: Dito. * dom/Document.cpp: Dito. * loader/FrameLoader.cpp: Dito. JavaScriptCore: 2009-08-23 Gustavo Noronha Silva <gns@gnome.org> Unreviewed build fix for make distcheck. * GNUmakefile.am: Added files required for the build. git-svn-id: http://svn.webkit.org/repository/webkit/trunk@47697 268f45cc-cd09-0410-ab3c-d52691b4dbfc
-
darin@apple.com authored
Patch by Darin Adler <darin@apple.com> on 2009-08-22 Reviewed by Oliver Hunt. Next step: Element, HTMLElement, HTMLAnchorElement, HTMLAppletElement, HTMLAreaElement, HTMLEmbedElement, HTMLFrameElement, HTMLIFrameElement, HTMLObjectElement, HTMLPlugInElement, HTMLPlugInImageElement. * DerivedSources.make: Fix error seen every time we build by escaping the $ in the build rule, since you have to use $$ for that in make. * WebCore.base.exp: Updated. * bindings/objc/DOM.mm: Added now-needed include of SVGNames.h. * dom/Document.cpp: Added now-needed include of SVGNames.h. (WebCore::Document::createElement): Use create instead of new. * dom/Element.cpp: (WebCore::Element::Element): Added ConstructionType argument so the caller can determine whether this starts with a reference count of either 0 or 1. Later we will remove this again once they are all 1. (WebCore::Element::create): Added. * dom/Element.h: Added create and made constructor protected. * dom/StyledElement.cpp: (WebCore::StyledElement::StyledElement): Added ConstructionType argument. * dom/StyledElement.h: Made many functions protected or private, including the constructor. * dom/make_names.pl: Use create to create the base elements HTMLElement, SVGElement, and WMLElement. * editing/CreateLinkCommand.cpp: (WebCore::CreateLinkCommand::doApply): Use create instead of new. * editing/UnlinkCommand.cpp: (WebCore::UnlinkCommand::doApply): Ditto. * html/HTMLAnchorElement.cpp: (WebCore::HTMLAnchorElement::create): Added. * html/HTMLAnchorElement.h: Made constructor protected and added create. Also made m_rootEditableElementForSelectionOnMouseDown a RefPtr. * html/HTMLAppletElement.cpp: (WebCore::HTMLAppletElement::create): Added. * html/HTMLAppletElement.h: Made constructor private and added create. * html/HTMLAreaElement.cpp: (WebCore::HTMLAreaElement::create): Added. * html/HTMLAreaElement.h: Made constructor private and added create. * html/HTMLElement.cpp: (WebCore::HTMLElement::create): Added. * html/HTMLElement.h: Made constructor protected and added create. Made other functions protected and private. Also added inline definition of constructor. * html/HTMLEmbedElement.cpp: (WebCore::HTMLEmbedElement::create): Added. * html/HTMLEmbedElement.h: Made constructor private and added create. Made other functions private. * html/HTMLFrameElement.cpp: (WebCore::HTMLFrameElement::create): Added. (WebCore::HTMLFrameElement::parseMappedAttribute): * html/HTMLFrameElement.h: Made constructor private and added create. Made other functions private. * html/HTMLFrameElementBase.h: Made functions protected and private. * html/HTMLFrameOwnerElement.cpp: (WebCore::HTMLFrameOwnerElement::HTMLFrameOwnerElement): Pass CreateElement so reference count starts at 1. * html/HTMLFrameOwnerElement.h: Made functions protected and private. * html/HTMLIFrameElement.cpp: (WebCore::HTMLIFrameElement::create): Added. * html/HTMLIFrameElement.h: Made constructor private and added create. Made other functions private. * html/HTMLObjectElement.cpp: (WebCore::HTMLObjectElement::create): Added. (WebCore::HTMLObjectElement::containsJavaApplet): Changed while loop into a for loop and tweaked formatting. * html/HTMLObjectElement.h: Made constructor private and added create. Made other functions private. * html/HTMLPlugInElement.h: Made constructor protected. Made other functions protected and private. * html/HTMLPlugInImageElement.h: Made constructor and another function protected. * html/HTMLTagNames.in: Removed createWithNew from all classes that now have create functions. Moved conditional noscript to a separate paragraph. * html/HTMLViewSourceDocument.cpp: (WebCore::HTMLViewSourceDocument::addSpanWithClassName): Use create. (WebCore::HTMLViewSourceDocument::addLink): Ditto. * page/DragController.cpp: (WebCore::documentFragmentFromDragData): Ditto. * svg/SVGElement.cpp: (WebCore::SVGElement::SVGElement): Pass CreateElementZeroRefCount so reference count still starts at 0. Will change this class later. (WebCore::SVGElement::create): Added. * svg/SVGElement.h: Added create, made constructor protected, and made other functions protected and private. Removed unneeded SVGNames.h include. * svg/SVGExternalResourcesRequired.h: Added now-needed SVGNames.h include. * svg/SVGStopElement.h: Added now-needed SVGNames.h include. Made functions private. * wml/WMLElement.cpp: (WebCore::WMLElement::WMLElement): Pass CreateElementZeroRefCount so reference count still starts at 0. Will change this class later. (WebCore::WMLElement::create): Added. * wml/WMLElement.h: Added create and made constructor protected. * wml/WMLTagNames.in: Removed createWithNew from WMLElement. git-svn-id: http://svn.webkit.org/repository/webkit/trunk@47688 268f45cc-cd09-0410-ab3c-d52691b4dbfc
-
- 18 Aug, 2009 1 commit
-
-
darin@apple.com authored
https://bugs.webkit.org/show_bug.cgi?id=28068 Patch by Darin Adler <darin@apple.com> on 2009-08-18 Reviewed by Sam Weinig. Some related clean-up and preparation steps so the subsequent patches will be as small as possible. * WebCore.base.exp: Sorted this file. * accessibility/AccessibilityRenderObject.cpp: (WebCore::AccessibilityRenderObject::accessibilityDescription): Use nameAttr instead of the name function. * bindings/js/JSHTMLFrameElementCustom.cpp: (WebCore::JSHTMLFrameElement::setSrc): Use srcAttr instead of the src function. * bindings/js/JSHTMLIFrameElementCustom.cpp: (WebCore::JSHTMLIFrameElement::setSrc): Use srcAttr instead of the src function. * bindings/objc/DOM.mm: Sorted includes. * dom/Document.cpp: Ditto. * dom/StyledElement.cpp: Made invalidateStyleAttribute inline. * dom/StyledElement.h: Ditto. * dom/make_names.pl: Changed default of createWithNew to 0. Eventually all elements will be created with create instead of new. * html/HTMLTagNames.in: * svg/svgtags.in: * wml/WMLTagNames.in: Added createWithNew for every tag. We'll remove it as we convert element classes to use create. * html/HTMLAppletElement.h: Removed unneeded forward declarations. * html/HTMLFrameElement.h: Ditto. * html/HTMLEmbedElement.cpp: Removed many attribute get and set functions. * html/HTMLEmbedElement.h: Ditto. * html/HTMLIFrameElement.cpp: Ditto. * html/HTMLIFrameElement.h: Ditto. * html/HTMLObjectElement.cpp: Ditto. * html/HTMLObjectElement.h: Ditto. * html/HTMLPlugInElement.cpp: Ditto. * html/HTMLPlugInElement.h: Ditto. * html/HTMLFrameElementBase.cpp: Removed many attribute get and set functions. (WebCore::HTMLFrameElementBase::location): Changed to use srcAttr instead of src. * html/HTMLFrameElementBase.h: Removed many attribute get and set functions. * loader/MediaDocument.cpp: (WebCore::MediaDocument::replaceMediaElementTimerFired): Use srcAttr and typeAttr instead of setSrc and setType. * loader/PluginDocument.cpp: (WebCore::PluginTokenizer::createDocumentStructure): Ditto. * rendering/RenderPartObject.cpp: (WebCore::RenderPartObject::updateWidget): Use nameAttr instead of name -- this avoids an extra AtomicString round trip and a little ref count churn too. git-svn-id: http://svn.webkit.org/repository/webkit/trunk@47469 268f45cc-cd09-0410-ab3c-d52691b4dbfc
-
- 17 Aug, 2009 1 commit
-
-
darin@apple.com authored
(WebCore::Document::setFocusedNode): Removed unneeded calls to RefPtr::get. Reviewed by Sam Weinig. git-svn-id: http://svn.webkit.org/repository/webkit/trunk@47365 268f45cc-cd09-0410-ab3c-d52691b4dbfc
-
- 15 Aug, 2009 2 commits
-
-
darin@apple.com authored
https://bugs.webkit.org/show_bug.cgi?id=28068 Patch by Darin Adler <darin@apple.com> on 2009-08-14 Reviewed by Sam Weinig. First half, everything except for element classes. * GNUmakefile.am: Removed DocPtr.h. * WebCore.gypi: Ditto. * WebCore.vcproj/WebCore.vcproj: Ditto. * WebCore.xcodeproj/project.pbxproj: Ditto. * dom/Attr.cpp: (WebCore::Attr::Attr): Added a call to createTextChild here so callers don't have to call it explicitly. (WebCore::Attr::create): Added. (WebCore::Attr::setValue): Changed to take AtomicString. (WebCore::Attr::cloneNode): Use create. * dom/Attr.h: Added a create function. Made the constructor private, and a lot of other functions private as well. * dom/Attribute.cpp: (WebCore::Attribute::createAttrIfNeeded): Use Attr::create. * dom/CDATASection.cpp: (WebCore::CDATASection::create): Added. (WebCore::CDATASection::cloneNode): Use create. (WebCore::CDATASection::virtualCreate): Ditto. * dom/CDATASection.h: Added a create function. Made everything private. Removed unneeded destructor declaration. * dom/CharacterData.cpp: (WebCore::CharacterData::CharacterData): Replaced the multiple constructors with a single one that takes ConstructionType. * dom/CharacterData.h: Made more functions be protected and private. Made m_data be private. * dom/Comment.cpp: (WebCore::Comment::Comment): Got rid of an extra constructor. (WebCore::Comment::create): Added. (WebCore::Comment::cloneNode): Call create. * dom/Comment.h: Added a create function. Made everything private. * dom/ContainerNode.cpp: (WebCore::dispatchChildInsertionEvents): Use RefPtr instead of DocPtr. (WebCore::dispatchChildRemovalEvents): Ditto. * dom/ContainerNode.h: Made the constructor protected and passed ConstructionType instead of an isElement boolean. * dom/DocPtr.h: Removed. * dom/Document.cpp: (WebCore::Document::Document): Simplified the code that sets m_document since it's no longer a smart pointer. (WebCore::Document::removedLastRef): Use explicit calls to selfOnlyRef and selfOnlyDeref instead of a DocPtr in here. (WebCore::Document::~Document): Simplified the code that sets m_document since it's no longer a smart pointer. (WebCore::Document::createDocumentFragment): Call create. (WebCore::Document::createTextNode): Ditto. (WebCore::Document::createComment): Ditto. (WebCore::Document::createCDATASection): Ditto. (WebCore::Document::createProcessingInstruction): Ditto. (WebCore::Document::createEntityReference): Ditto. (WebCore::Document::createEditingTextNode): Ditto. (WebCore::Document::importNode): Call Attr::create. (WebCore::Document::createAttributeNS): Ditto. * dom/Document.h: Call adoptRef. Made a lot of functions private and protected and sorted them so public functions come first. * dom/DocumentFragment.cpp: (WebCore::DocumentFragment::create): Added. (WebCore::DocumentFragment::cloneNode): Call create. * dom/DocumentFragment.h: Added create. * dom/DocumentType.cpp: (WebCore::DocumentType::DocumentType): Pass type to Node constructor. (WebCore::DocumentType::cloneNode): Use create. * dom/DocumentType.h: (WebCore::DocumentType::create): Call adoptRef. * dom/EditingText.cpp: (WebCore::EditingText::create): Added. * dom/EditingText.h: Added a create function. Made everything private. * dom/Element.cpp: (WebCore::Element::Element): Pass CreateElementZeroRefCount to preserve the zero reference count behavior for classes derived from Element. * dom/EntityReference.cpp: (WebCore::EntityReference::create): Added. (WebCore::EntityReference::cloneNode): Call create. * dom/EntityReference.h: Added create. Made everything private. * dom/Node.cpp: (WebCore::Node::initialRefCount): Added. Inline helper function for the constructor. (WebCore::Node::isContainer): Ditto. (WebCore::Node::isElement): Ditto. (WebCore::Node::isText): Ditto. (WebCore::Node::Node): Changed to take a construction type argument. Since m_document is now a normal pointer, added a call to selfOnlyRef. (WebCore::Node::~Node): Ditto, but selfOnlyDeref. (WebCore::Node::setDocument): Added selfOnlyRef/Deref calls. (WebCore::Node::appendTextContent): Use the data function instead of calling nodeValue functions, which do the same thing in a roundabout way. * dom/Node.h: Made the constructor protected and replaced the multiple arguments iwth a single ConstructionType argument. Sorted the public things first. * dom/Notation.h: Made most things private. * dom/Notation.cpp: Removed extra constructor. * dom/ProcessingInstruction.cpp: (WebCore::ProcessingInstruction::create): Added. (WebCore::ProcessingInstruction::cloneNode): Call create. * dom/ProcessingInstruction.h: Added create function. Made many other members private. * dom/Range.cpp: (WebCore::Range::processContents): Use DocumentFragment::create. * dom/Text.cpp: (WebCore::Text::Text): Updated for base class change. (WebCore::Text::create): Added. (WebCore::Text::splitText): Changed to not require access to m_data. (WebCore::Text::cloneNode): Call create. (WebCore::Text::createRenderer): Call dataImpl. (WebCore::Text::attach): Call data. (WebCore::Text::recalcStyle): Call dataImpl. (WebCore::Text::virtualCreate): Call create. (WebCore::Text::createWithLengthLimit): Call create. (WebCore::Text::formatForDebugger): Call data. * dom/Text.h: Added a create function. Made many other members private. Renamed createNew to virtualCreate. * dom/XMLTokenizer.cpp: (WebCore::XMLTokenizer::enterText): Call Text::create. * dom/XMLTokenizerLibxml2.cpp: (WebCore::XMLTokenizer::cdataBlock): Call CDATASection::create. (WebCore::XMLTokenizer::comment): Call Comment::create. * editing/CompositeEditCommand.cpp: (WebCore::CompositeEditCommand::deleteInsignificantText): Call data instead of string. * editing/CreateLinkCommand.cpp: (WebCore::CreateLinkCommand::doApply): Call Text::create. * editing/EditorCommand.cpp: (WebCore::executeInsertNode): Call DocumentFragment::create. * editing/SplitTextNodeCommand.cpp: (WebCore::SplitTextNodeCommand::doApply): Call Text::create. * editing/markup.cpp: (WebCore::appendStartMarkup): Call data instead of nodeValue. * html/HTMLDocument.h: (WebCore::HTMLDocument::create): Call adoptRef. * html/HTMLElement.cpp: (WebCore::HTMLElement::createContextualFragment): Call DocumentFragment::create. (WebCore::replaceChildrenWithFragment): Call data instead of string. (WebCore::replaceChildrenWithText): Call Text::create. (WebCore::HTMLElement::setInnerText): Call DocumentFragment::create and Text::create. (WebCore::HTMLElement::setOuterText): Call Text::create. * html/HTMLKeygenElement.cpp: (WebCore::HTMLKeygenElement::HTMLKeygenElement): Call Text::create. * html/HTMLOptionElement.cpp: (WebCore::HTMLOptionElement::setText): Call Text::create. * html/HTMLParser.cpp: (WebCore::HTMLParser::textCreateErrorCheck): Call Text::create. (WebCore::HTMLParser::commentCreateErrorCheck): Call Comment::create. (WebCore::HTMLParser::handleIsindex): Call Text::create. * html/HTMLViewSourceDocument.cpp: (WebCore::HTMLViewSourceDocument::addText): Call Text::create. * html/HTMLViewSourceDocument.h: (WebCore::HTMLViewSourceDocument::create): Call adoptRef. * loader/FTPDirectoryDocument.cpp: (WebCore::FTPDirectoryTokenizer::appendEntry): Call Text::create. (WebCore::FTPDirectoryTokenizer::createTDForFilename): Call Text::create. * loader/FTPDirectoryDocument.h: (WebCore::FTPDirectoryDocument::create): Call adoptRef. * loader/ImageDocument.h: (WebCore::ImageDocument::create): Ditto. * loader/MediaDocument.h: (WebCore::MediaDocument::create): Ditto. * loader/PlaceholderDocument.h: (WebCore::PlaceholderDocument::create): Ditto. * loader/PluginDocument.h: (WebCore::PluginDocument::create): Ditto. * loader/TextDocument.h: (WebCore::TextDocument::create): Ditto. * loader/loader.cpp: (WebCore::Loader::Host::didFinishLoading): Use RefPtr instead of DocPtr. (WebCore::Loader::Host::didFail): Ditto. * platform/TreeShared.h: (WebCore::TreeShared::TreeShared): Added an initialRefCount argument, defaulting to 1. Node still sometimes initializes it to 0 instead for now. * rendering/RenderText.cpp: (WebCore::RenderText::originalText): Use dataImpl instead of string. * rendering/RenderTextFragment.cpp: (WebCore::RenderTextFragment::originalText): Use dataImpl instead of string. (WebCore::RenderTextFragment::previousCharacter): Ditto. * svg/SVGDocument.h: (WebCore::SVGDocument::create): Use adoptRef. * svg/SVGElementInstance.cpp: (WebCore::SVGElementInstance::SVGElementInstance): Updated to take a PassRefPtr. * svg/SVGElementInstance.h: Made everything private. * wml/WMLDocument.h: (WebCore::WMLDocument::create): Called adoptRef. * xml/XPathNamespace.cpp: (WebCore::XPathNamespace::XPathNamespace): Take AtomicString arguments. * xml/XPathNamespace.h: Made everything private. * xml/XSLTProcessor.cpp: (WebCore::createFragmentFromSource): Use DocumentFragment::create and Text::create. git-svn-id: http://svn.webkit.org/repository/webkit/trunk@47313 268f45cc-cd09-0410-ab3c-d52691b4dbfc
-
jhoneycutt@apple.com authored
2009-08-13 Jon Honeycutt <jhoneycutt@apple.com> Part of <rdar://problem/6218721> No MSAA focus events fired for Webkit nightly (20866) https://bugs.webkit.org/show_bug.cgi?id=20866 Reviewed by Oliver Hunt. * accessibility/AXObjectCache.cpp: (WebCore::AXObjectCache::AXObjectCache): Changed to take a pointer to its owner document. This is used by AXObjectCache::handleFocusedUIElementChanged(). (WebCore::AXObjectCache::focusedUIElementForPage): Code moved from AccessibilityRenderObject::focusedUIElement(). Modified to be a static function and to take a pointer to a Page. (WebCore::AXObjectCache::platformGenerateAXID): Moved the code to generate the next AXID from getAXID() to here. Added a #if to make this non-WIN only, because Windows has its own implementation. (WebCore::AXObjectCache::getAXID): Ensure that we generate a positive AXID, ranging from 1 to LONG_MAX. * accessibility/AXObjectCache.h: Add a declaration for Document and Page. Removed the declaration of AccessibilityObject, because we include the header. Reordered the declaration of Node alphabetically. Moved the typedef for AXID to AccessibilityObject. Removed some trailing whitespace. Added a member variable to hold a pointer to the owner Document. (WebCore::AXObjectCache::AXObjectCache): Changed to take a pointer to its owner Document. (WebCore::AXObjectCache::focusedUIElementForPage): Added; code moved from AccessiblityRenderObject::focusedUIElement(). Returns the focused element with respect to accessibility. (WebCore::AXObjectCache::platformGenerateAXID): Declare a function to generate an AXID. (WebCore::AXObjectCache::objectFromAXID): Return the AccessibilityObject with the given AXID. * accessibility/AccessibilityObject.h: Moved the typedef for AXID from AXObjectCache to here. Made the m_id member use the typedef. (WebCore::AccessibilityObject::axObjectID): Changed the return type to use the typedef. (WebCore::AccessibilityObject::setAXObjectID): Changed the argument type to use the typedef. * accessibility/AccessibilityRenderObject.cpp: Removed some unneeded #includes. (WebCore::AccessibilityRenderObject::focusedUIElement): Moved the code to AXObjectCache::focusedUIElementForPage(), which we now call. * accessibility/win/AXObjectCacheWin.cpp: (WebCore::AXObjectCache::platformGenerateAXID): Ensure that we generate an AXID that is in the range 1 to LONG_MAX. (WebCore::AXObjectCache::handleFocusedUIElementChanged): If the Document has no Page, return. If the Page has not focused element (respecting accessibility), return. Assert that the accessibility of the focused element is not ignored, and that the object's AXID will be negative and fit into a LONG when negated. Broadcast a focus event for the object. * dom/Document.cpp: (WebCore::Document::axObjectCache): Pass this when creating the AXObjectCache. (WebCore::Document::setFocusedNode): Call AXObjectCache::handleFocusedUIElementChanged() on Windows. WebKit/win: 2009-08-13 Jon Honeycutt <jhoneycutt@apple.com> Part of <rdar://problem/6218721> No MSAA focus events fired for Webkit nightly (20866) https://bugs.webkit.org/show_bug.cgi?id=20866 Reviewed by Oliver Hunt. * AccessibleBase.cpp: (AccessibleBase::getAccessibilityObjectForChild): If the child ID is negative, negate it and treat it as an AXID. git-svn-id: http://svn.webkit.org/repository/webkit/trunk@47311 268f45cc-cd09-0410-ab3c-d52691b4dbfc
-
- 11 Aug, 2009 1 commit
-
-
atwilson@chromium.org authored
https://bugs.webkit.org/show_bug.cgi?id=28170 Reviewed by David Levin. Prevents Documents from being suspended/placed in the page cache if they are associated with shared workers. Added vector cache instead of nested hash tables for SharedWorker repository. Added SharedWorkerRepository::documentDetached API. * dom/Document.cpp: (WebCore::Document::detach): Notifies SharedWorkerRepository when the document is closing. * loader/FrameLoader.cpp: Updated FrameLoader to not cache the Document if it is associated with a SharedWorker (since we can't suspend workers yet, we need to shut them down). (WebCore::FrameLoader::canCachePageContainingThisFrame): (WebCore::FrameLoader::logCanCacheFrameDecision): * workers/DefaultSharedWorkerRepository.cpp: (WebCore::SharedWorkerProxy::create): (WebCore::SharedWorkerProxy::isClosing): Renamed from closing(). (WebCore::SharedWorkerProxy::matches): Added manual equality function to replace old hash lookup. (WebCore::SharedWorkerProxy::isDocumentInWorkerDocuments): Checks to see if a document is in the worker's list of documents. Used to determine if page is suspendable. (WebCore::SharedWorkerProxy::SharedWorkerProxy): (WebCore::SharedWorkerProxy::addToWorkerDocuments): Added tracking of the worker's list of documents for lifecycle purposes. (WebCore::SharedWorkerProxy::documentDetached): Shuts down the proxy when the last associated document is detached. (WebCore::SharedWorkerProxy::close): Marks the proxy as closed so it is no longer shared with new instances. (WebCore::SharedWorkerProxy::workerContextDestroyed): Removes the proxy from the repository/frees the proxy when the associated SharedWorkerContext is destroyed. (WebCore::DefaultSharedWorkerRepository::workerScriptLoaded): closing()->isClosing() (WebCore::SharedWorkerRepository::documentDetached): (WebCore::SharedWorkerRepository::hasSharedWorkers): Used by FrameLoader to determine if a page has shared workers and so cannot be suspended/cached. (WebCore::DefaultSharedWorkerRepository::hasSharedWorkers): (WebCore::DefaultSharedWorkerRepository::removeProxy): Invoked by workerContextDestroyed() to remove a SharedWorkerProxy from the repository. (WebCore::DefaultSharedWorkerRepository::documentDetached): (WebCore::DefaultSharedWorkerRepository::connectToWorker): (WebCore::DefaultSharedWorkerRepository::getProxy): * workers/DefaultSharedWorkerRepository.h: * workers/SharedWorkerRepository.h: LayoutTests: SharedWorkers do not exit when the last parent document exits. https://bugs.webkit.org/show_bug.cgi?id=28170 Reviewed by David Levin. Added more tests to check that previous incarnations of the SharedWorker "name" are shut down. * fast/workers/shared-worker-replace-global-constructor.html-disabled: Fixed incorrect path to common script. * fast/workers/shared-worker-shared-expected.txt: * fast/workers/shared-worker-shared.html-disabled: Added more tests for sharing, including initial test to make sure previous incarnations of shared worker were closed. * fast/workers/worker-replace-global-constructor.html: Removed extraneous closing HTML tag. git-svn-id: http://svn.webkit.org/repository/webkit/trunk@47078 268f45cc-cd09-0410-ab3c-d52691b4dbfc
-
- 30 Jul, 2009 1 commit
-
-
darin@apple.com authored
Reviewed by David Levin. Use checked casts for render tree https://bugs.webkit.org/show_bug.cgi?id=23522 Next step: Add new toRenderWidget cast and use it everywhere. Use checked casts in all the places that were using static_cast but there is a checked cast available. * accessibility/AccessibilityRenderObject.cpp: (WebCore::AccessibilityRenderObject::stringValue): (WebCore::AccessibilityRenderObject::widget): (WebCore::AccessibilityRenderObject::widgetForAttachmentView): (WebCore::AccessibilityRenderObject::visiblePositionForPoint): * accessibility/gtk/AccessibilityObjectWrapperAtk.cpp: (getPangoLayoutForAtk): * dom/Document.cpp: (WebCore::widgetForNode): (WebCore::Document::setFocusedNode): * html/HTMLEmbedElement.cpp: (WebCore::findWidgetRenderer): * html/HTMLMediaElement.cpp: (WebCore::HTMLMediaElement::defaultEventHandler): * html/HTMLObjectElement.cpp: (WebCore::HTMLObjectElement::renderWidgetForJSBindings): * html/HTMLPlugInElement.cpp: (WebCore::HTMLPlugInElement::defaultEventHandler): * loader/FrameLoader.cpp: (WebCore::FrameLoader::loadSubframe): * loader/PluginDocument.cpp: (WebCore::PluginTokenizer::writeRawData): * page/EventHandler.cpp: (WebCore::EventHandler::hitTestResultAtPoint): (WebCore::subframeForTargetNode): (WebCore::EventHandler::handleWheelEvent): * page/Frame.cpp: (WebCore::isFrameElement): * page/PrintContext.cpp: (WebCore::PrintContext::computePageRects): * page/android/EventHandlerAndroid.cpp: (WebCore::EventHandler::passWidgetMouseDownEventToWidget): * page/chromium/EventHandlerChromium.cpp: (WebCore::EventHandler::passWidgetMouseDownEventToWidget): * page/chromium/FrameChromium.cpp: (WebCore::computePageRectsForFrame): * page/gtk/EventHandlerGtk.cpp: (WebCore::EventHandler::passWidgetMouseDownEventToWidget): * page/haiku/EventHandlerHaiku.cpp: (WebCore::EventHandler::passWidgetMouseDownEventToWidget): * page/mac/EventHandlerMac.mm: (WebCore::EventHandler::passWidgetMouseDownEventToWidget): (WebCore::EventHandler::passSubframeEventToSubframe): * page/win/FrameWin.cpp: (WebCore::computePageRectsForFrame): * page/wx/EventHandlerWx.cpp: (WebCore::EventHandler::passWidgetMouseDownEventToWidget): * platform/chromium/ClipboardChromium.cpp: (WebCore::getCachedImage): * platform/chromium/PasteboardChromium.cpp: (WebCore::Pasteboard::writeImage): * platform/gtk/PasteboardGtk.cpp: (WebCore::Pasteboard::writeImage): * platform/mac/PasteboardMac.mm: (WebCore::Pasteboard::writeImage): * platform/qt/ClipboardQt.cpp: (WebCore::getCachedImage): * platform/qt/PasteboardQt.cpp: (WebCore::Pasteboard::writeImage): * platform/win/ClipboardWin.cpp: (WebCore::getCachedImage): * platform/win/PasteboardWin.cpp: (WebCore::Pasteboard::writeImage): * rendering/InlineBox.h: (WebCore::InlineBox::boxModelObject): * rendering/RenderInline.cpp: (WebCore::RenderInline::splitInlines): (WebCore::RenderInline::addChildToContinuation): * rendering/RenderLayerBacking.cpp: (WebCore::RenderLayerBacking::updateImageContents): * rendering/TextControlInnerElements.cpp: (WebCore::RenderTextControlInnerBlock::positionForPoint): Use checked cast instead of static_cast. * rendering/RenderWidget.h: Added toRenderWidget. git-svn-id: http://svn.webkit.org/repository/webkit/trunk@46592 268f45cc-cd09-0410-ab3c-d52691b4dbfc
-
- 27 Jul, 2009 2 commits
-
-
ojan@chromium.org authored
Reviewed by Darin Adler. https://bugs.webkit.org/show_bug.cgi?id=27474 Tests crashes when calling select, setSelectionRange or setting selectionStart/selectionEnd on a textarea/input immediately after setting display:none. * fast/dom/text-control-crash-on-select-expected.txt: Added. * fast/dom/text-control-crash-on-select.html: Added. 2009-07-27 Ojan Vafai <ojan@chromium.org> Reviewed by Darin Adler. https://bugs.webkit.org/show_bug.cgi?id=27474 Fixes crashes due to renderer getting destroyed in updateLayout. We need to call updateLayout before we call into the renderer. Removed the updateLayout call from RenderTextControl and moved it into the calling sites. Also changes updateLayout to updateLayoutIgnorePendingStylesheets so this works with pending stylesheets. Unfortunately, this seems to be untestable. Loading an external stylesheet and then having an inline script hit this code did not result in an pending stylesheets. The are other cases of this bug in the rendering code. I'll file a followup bug to audit the calls to updateLayout. Test: fast/dom/text-control-crash-on-select.html * dom/Document.h: (WebCore::Document::inStyleRecalc): Added so the ASSERTs in updateFocusAppearance and setSelectionRange could deal with cases of reentrancy into updateLayout calls. This happens in a couple layout tests. * dom/InputElement.cpp: (WebCore::InputElement::updateSelectionRange): * html/HTMLInputElement.cpp: (WebCore::isTextFieldWithRendererAfterUpdateLayout): (WebCore::HTMLInputElement::setSelectionStart): (WebCore::HTMLInputElement::setSelectionEnd): (WebCore::HTMLInputElement::select): * html/HTMLTextAreaElement.cpp: (WebCore::rendererAfterUpdateLayout): (WebCore::HTMLTextAreaElement::setSelectionStart): (WebCore::HTMLTextAreaElement::setSelectionEnd): (WebCore::HTMLTextAreaElement::select): (WebCore::HTMLTextAreaElement::setSelectionRange): (WebCore::HTMLTextAreaElement::updateFocusAppearance): * rendering/RenderTextControl.cpp: (WebCore::RenderTextControl::setSelectionRange): git-svn-id: http://svn.webkit.org/repository/webkit/trunk@46437 268f45cc-cd09-0410-ab3c-d52691b4dbfc
-
zimmermann@webkit.org authored
https://bugs.webkit.org/show_bug.cgi?id=27707 Redesign WML history/loading handling. See ChangeLog for details. git-svn-id: http://svn.webkit.org/repository/webkit/trunk@46418 268f45cc-cd09-0410-ab3c-d52691b4dbfc
-
- 23 Jul, 2009 1 commit
-
-
cfleizach@apple.com authored
https://bugs.webkit.org/show_bug.cgi?id=27633 git-svn-id: http://svn.webkit.org/repository/webkit/trunk@46301 268f45cc-cd09-0410-ab3c-d52691b4dbfc
-
- 15 Jul, 2009 1 commit
-
-
hyatt@apple.com authored
2009-07-14 David Hyatt <hyatt@apple.com> Reviewed by Simon Fraser. https://bugs.webkit.org/show_bug.cgi?id=27283 Implement the new 'rem' unit from CSS3. Added some rem-* tests in fast/css. * css/CSSGrammar.y: * css/CSSParser.cpp: (WebCore::CSSParser::validUnit): (WebCore::unitFromString): (WebCore::CSSParser::parseValue): (WebCore::CSSParser::lex): * css/CSSParserValues.cpp: (WebCore::CSSParserValue::createCSSValue): * css/CSSPrimitiveValue.cpp: (WebCore::CSSPrimitiveValue::computeLengthInt): (WebCore::CSSPrimitiveValue::computeLengthIntForLength): (WebCore::CSSPrimitiveValue::computeLengthShort): (WebCore::CSSPrimitiveValue::computeLengthFloat): (WebCore::CSSPrimitiveValue::computeLengthDouble): (WebCore::CSSPrimitiveValue::cssText): (WebCore::CSSPrimitiveValue::parserValue): * css/CSSPrimitiveValue.h: (WebCore::CSSPrimitiveValue::): (WebCore::CSSPrimitiveValue::isUnitTypeLength): * css/CSSStyleSelector.cpp: (WebCore::CSSStyleSelector::initForStyleResolve): (WebCore::convertToLength): (WebCore::CSSStyleSelector::applyProperty): (WebCore::CSSStyleSelector::mapFillSize): (WebCore::CSSStyleSelector::mapFillXPosition): (WebCore::CSSStyleSelector::mapFillYPosition): (WebCore::CSSStyleSelector::createTransformOperations): * css/CSSStyleSelector.h: * css/MediaQueryEvaluator.cpp: (WebCore::device_heightMediaFeatureEval): (WebCore::device_widthMediaFeatureEval): (WebCore::heightMediaFeatureEval): (WebCore::widthMediaFeatureEval): * css/WebKitCSSMatrix.cpp: (WebCore::WebKitCSSMatrix::setMatrixValue): * css/tokenizer.flex: * dom/Document.cpp: (WebCore::Document::Document): * dom/Document.h: (WebCore::Document::usesRemUnits): (WebCore::Document::setUsesRemUnits): * dom/Element.cpp: (WebCore::Element::recalcStyle): * rendering/SVGRenderTreeAsText.cpp: (WebCore::writeStyle): * rendering/style/SVGRenderStyle.cpp: (WebCore::SVGRenderStyle::cssPrimitiveToLength): * svg/graphics/SVGPaintServer.cpp: (WebCore::applyStrokeStyleToContext): (WebCore::dashArrayFromRenderingStyle): * svg/graphics/SVGPaintServer.h: LayoutTests: 2009-07-14 David Hyatt <hyatt@apple.com> Reviewed by Simon Fraser. Add layout tests for the new CSS3 'rem' unit type. * fast/css/rem-dynamic-scaling.html: Added. * fast/css/rem-units-on-root.html: Added. * fast/css/remove-shorthand-expected.checksum: Added. * fast/css/remove-shorthand-expected.png: Added. * platform/mac/fast/css/rem-dynamic-scaling-expected.checksum: Added. * platform/mac/fast/css/rem-dynamic-scaling-expected.png: Added. * platform/mac/fast/css/rem-dynamic-scaling-expected.txt: Added. * platform/mac/fast/css/rem-units-on-root-expected.checksum: Added. * platform/mac/fast/css/rem-units-on-root-expected.png: Added. * platform/mac/fast/css/rem-units-on-root-expected.txt: Added. git-svn-id: http://svn.webkit.org/repository/webkit/trunk@45919 268f45cc-cd09-0410-ab3c-d52691b4dbfc
-
- 12 Jul, 2009 1 commit
-
-
bfulgham@webkit.org authored
2009-07-12 Keishi Hattori <casey.hattori@gmail.com> Reviewed by Timothy Hatcher. Refactor ConsoleMessage to add MessageType attribute. https://bugs.webkit.org/show_bug.cgi?id=20625 * bindings/js/JSCustomXPathNSResolver.cpp: (WebCore::JSCustomXPathNSResolver::lookupNamespaceURI): * bindings/js/JSDOMWindowBase.cpp: (WebCore::JSDOMWindowBase::printErrorMessage): * dom/Document.cpp: (WebCore::Document::reportException): (WebCore::Document::addMessage): * dom/Document.h: * dom/ScriptExecutionContext.h: * html/HTMLParser.cpp: (WebCore::HTMLParser::reportErrorToConsole): * inspector/ConsoleMessage.cpp: (WebCore::ConsoleMessage::ConsoleMessage): (WebCore::ConsoleMessage::addToConsole): (WebCore::ConsoleMessage::isEqual): * inspector/ConsoleMessage.h: * inspector/InspectorController.cpp: (WebCore::InspectorController::addMessageToConsole): (WebCore::InspectorController::startGroup): (WebCore::InspectorController::endGroup): (WebCore::InspectorController::addProfileFinishedMessageToConsole): (WebCore::InspectorController::addStartProfilingMessageToConsole): (WebCore::InspectorController::count): * inspector/InspectorController.h: * inspector/front-end/Console.js: (WebInspector.Console.prototype.addMessage): (WebInspector.ConsoleMessage): Added type property. (WebInspector.ConsoleMessage.prototype.toMessageElement): (WebInspector.ConsoleMessage.prototype.toString): (WebInspector.ConsoleMessage.prototype.isEqual): (WebInspector.ConsoleCommandResult): (WebInspector.ConsoleGroup.prototype.addMessage): (WebInspector.ConsoleGroup.prototype._titleClicked): * inspector/front-end/Resource.js: (WebInspector.Resource.prototype._addTip): (WebInspector.Resource.prototype._checkWarning): * inspector/front-end/inspector.css: Changed ".console-group-title-level" to ".console-group-title" * inspector/front-end/inspector.js: (WebInspector.addMessageToConsole): * loader/DocLoader.cpp: (WebCore::DocLoader::printAccessDeniedMessage): * loader/EmptyClients.h: (WebCore::EmptyChromeClient::addMessageToConsole): * loader/FrameLoader.cpp: (WebCore::FrameLoader::reportLocalLoadFailed): (WebCore::FrameLoader::shouldAllowNavigation): * page/ChromeClient.h: * page/Console.cpp: (WebCore::printMessageSourceAndLevelPrefix): (WebCore::Console::addMessage): (WebCore::Console::error): (WebCore::Console::log): (WebCore::Console::dir): (WebCore::Console::trace): (WebCore::Console::assertCondition): (WebCore::Console::timeEnd): (WebCore::Console::warn): * page/Console.h: Added MessageType enum. (WebCore::): * page/DOMWindow.cpp: (WebCore::DOMWindow::postMessageTimerFired): * page/XSSAuditor.cpp: (WebCore::XSSAuditor::canEvaluate): (WebCore::XSSAuditor::canLoadExternalScriptFromSrc): (WebCore::XSSAuditor::canLoadObject): * svg/SVGDocumentExtensions.cpp: (WebCore::SVGDocumentExtensions::reportWarning): (WebCore::SVGDocumentExtensions::reportError): * wml/WMLErrorHandling.cpp: (WebCore::reportWMLError): * workers/GenericWorkerTask.h: Added GenericWorkerTask8 for the extra argument. (WebCore::GenericWorkerTask8::create): (WebCore::GenericWorkerTask8::GenericWorkerTask8): (WebCore::GenericWorkerTask8::performTask): (WebCore::createCallbackTask): * workers/WorkerContext.cpp: (WebCore::WorkerContext::addMessage): (WebCore::WorkerContext::importScripts): * workers/WorkerContext.h: * workers/WorkerMessagingProxy.cpp: (WebCore::postConsoleMessageTask): (WebCore::WorkerMessagingProxy::postConsoleMessageToWorkerObject): * workers/WorkerMessagingProxy.h: * workers/WorkerObjectProxy.h: * xml/XMLHttpRequest.cpp: (WebCore::reportUnsafeUsage): (WebCore::XMLHttpRequest::didFinishLoading): * xml/XSLTProcessor.cpp: (WebCore::XSLTProcessor::parseErrorFunc): WebKit/mac: 2009-07-12 Keishi Hattori <casey.hattori@gmail.com> Reviewed by Timothy Hatcher. Refactor ConsoleMessage to add MessageType attribute. https://bugs.webkit.org/show_bug.cgi?id=20625 * WebCoreSupport/WebChromeClient.h: * WebCoreSupport/WebChromeClient.mm: (WebChromeClient::addMessageToConsole): git-svn-id: http://svn.webkit.org/repository/webkit/trunk@45786 268f45cc-cd09-0410-ab3c-d52691b4dbfc
-
- 10 Jul, 2009 1 commit
-
-
ddkilzer@apple.com authored
Reviewed by David Kilzer. WebKit needs a style linting tool https://bugs.webkit.org/show_bug.cgi?id=25884 Fix bunch of style issues by autofix of cpplint. This patch is created to demonstrate the autofix of cpplint.py. No new testcases because it's a style fix * css/CSSParser.cpp: (WebCore::CSSParser::parseMediaQuery): (WebCore::CSSParser::validUnit): (WebCore::CSSParser::parseValue): (WebCore::skipCommaInDashboardRegion): (WebCore::CSSParser::parseDashboardRegions): (WebCore::ShadowParseContext::commitValue): (WebCore::ShadowParseContext::commitLength): (WebCore::ShadowParseContext::commitColor): (WebCore::BorderImageParseContext::commitNumber): (WebCore::BorderImageParseContext::commitWidth): (WebCore::BorderImageParseContext::commitRule): (WebCore::BorderImageParseContext::commitBorderImage): (WebCore::CSSParser::lex): (WebCore::CSSParser::text): * css/CSSStyleSelector.cpp: (WebCore::CSSStyleSelector::applyProperty): * css/MediaList.cpp: (WebCore::MediaList::deleteMedium): * css/MediaQuery.h: * css/MediaQueryEvaluator.cpp: (WebCore::parseAspectRatio): * css/MediaQueryEvaluator.h: * css/MediaQueryExp.h: (WebCore::MediaQueryExp::operator==): * css/WebKitCSSMatrix.h: * dom/Comment.h: * dom/Document.cpp: (WebCore::Document::setFocusedNode): * dom/Document.h: (WebCore::Document::setHasDashboardRegions): * dom/DocumentFragment.cpp: (WebCore::DocumentFragment::nodeName): * dom/DocumentFragment.h: * dom/DynamicNodeList.h: * dom/EditingText.h: * dom/Element.cpp: (WebCore::Element::dispatchAttrAdditionEvent): * dom/NamedAttrMap.cpp: (WebCore::NamedNodeMap::item): * dom/Node.cpp: (WebCore::Node::nodeValue): (WebCore::Node::nodeIndex): * dom/NodeRareData.h: (WebCore::NodeListsNodeData::create): * dom/Notation.h: * dom/ProcessingInstruction.h: * dom/Range.cpp: (WebCore::Range::processContents): * dom/StyledElement.cpp: (WebCore::toHex): * dom/XMLTokenizerLibxml2.cpp: (WebCore::PendingCallbacks::PendingStartElementNSCallback::~PendingStartElementNSCallback): (WebCore::PendingCallbacks::PendingStartElementNSCallback::call): (WebCore::PendingCallbacks::): (WebCore::OffsetBuffer::readOutBytes): (WebCore::handleElementNamespaces): (WebCore::handleElementAttributes): (WebCore::attributesStartElementNsHandler): * dom/XMLTokenizerQt.cpp: (WebCore::attributesStartElementNsHandler): (WebCore::XMLTokenizer::parseStartElement): * editing/ApplyStyleCommand.cpp: (WebCore::ApplyStyleCommand::applyInlineStyle): * editing/DeleteSelectionCommand.cpp: (WebCore::DeleteSelectionCommand::removeNode): * editing/Editor.cpp: (WebCore::Editor::pasteAsPlainText): * editing/SelectionController.cpp: (WebCore::SelectionController::directionOfEnclosingBlock): * editing/SmartReplaceICU.cpp: (WebCore::addAllCodePoints): * history/HistoryItem.cpp: (WebCore::HistoryItem::icon): (WebCore::HistoryItem::adoptVisitCounts): * html/CanvasStyle.cpp: (WebCore::CanvasStyle::applyFillColor): * html/HTMLAnchorElement.cpp: (WebCore::HTMLAnchorElement::setActive): (WebCore::HTMLAnchorElement::isLiveLink): * html/HTMLAppletElement.h: * html/HTMLAudioElement.h: * html/HTMLBRElement.h: * html/HTMLBaseElement.h: * html/HTMLBaseFontElement.h: * html/HTMLDListElement.h: * html/HTMLDirectoryElement.h: * html/HTMLFieldSetElement.cpp: (WebCore::HTMLFieldSetElement::HTMLFieldSetElement): * html/HTMLFormElement.cpp: (WebCore::HTMLFormElement::reset): * html/HTMLHRElement.cpp: (WebCore::HTMLHRElement::parseMappedAttribute): * html/HTMLHeadElement.h: * html/HTMLHtmlElement.h: * html/HTMLImageElement.h: (WebCore::HTMLImageElement::setLoadManually): * html/HTMLInputElement.cpp: (WebCore::HTMLInputElement::selection): * html/HTMLIsIndexElement.h: * html/HTMLMarqueeElement.cpp: * html/HTMLMediaElement.h: (WebCore::HTMLMediaElement::): * html/HTMLMenuElement.h: * html/HTMLMetaElement.h: * html/HTMLModElement.h: * html/HTMLOListElement.h: * html/HTMLOptionElement.cpp: (WebCore::HTMLOptionElement::childrenChanged): * html/HTMLParamElement.h: * html/HTMLQuoteElement.h: * html/HTMLStyleElement.h: * html/HTMLTableCaptionElement.h: * html/HTMLTableCellElement.h: * html/HTMLTableColElement.h: * html/HTMLTableSectionElement.cpp: (WebCore::HTMLTableSectionElement::deleteRow): * html/HTMLTitleElement.h: * html/HTMLTokenizer.cpp: (WebCore::HTMLTokenizer::parseNonHTMLText): (WebCore::HTMLTokenizer::parseEntity): (WebCore::HTMLTokenizer::parseTag): (WebCore::HTMLTokenizer::write): * html/HTMLUListElement.h: * html/HTMLVideoElement.h: * html/TimeRanges.h: (WebCore::TimeRanges::Range::Range): * inspector/InspectorController.cpp: (WebCore::InspectorController::enableResourceTracking): (WebCore::InspectorController::disableResourceTracking): * inspector/InspectorFrontend.cpp: (WebCore::InspectorFrontend::newInspectorJSONObject): * page/Console.cpp: (WebCore::Console::addMessage): * page/EventHandler.cpp: (WebCore::EventHandler::handleMousePressEvent): (WebCore::EventHandler::selectCursor): (WebCore::EventHandler::defaultKeyboardEventHandler): * page/Frame.cpp: (WebCore::Frame::jsDefaultStatusBarText): * page/android/DragControllerAndroid.cpp: (WebCore::DragController::dragOperation): * page/android/EventHandlerAndroid.cpp: (WebCore::EventHandler::tabsToAllControls): (WebCore::EventHandler::eventActivatedView): * page/animation/AnimationController.cpp: (WebCore::AnimationControllerPrivate::updateStyleIfNeededDispatcherFired): * page/gtk/DragControllerGtk.cpp: (WebCore::DragController::dragOperation): * page/qt/DragControllerQt.cpp: * page/win/DragControllerWin.cpp: (WebCore::DragController::isCopyKeyDown): * page/win/FrameWin.h: * rendering/RenderSlider.cpp: (WebCore::RenderSlider::mouseEventOffsetToThumb): * rendering/style/RenderStyle.h: (WebCore::InheritedFlags::setVerticalAlignLength): (WebCore::InheritedFlags::setUnicodeBidi): (WebCore::InheritedFlags::setCursor): * rendering/style/RenderStyleConstants.h: (WebCore::): * rendering/style/SVGRenderStyleDefs.h: * rendering/style/StyleInheritedData.h: (WebCore::StyleInheritedData::operator!=): * storage/DatabaseTask.h: * svg/GradientAttributes.h: * svg/LinearGradientAttributes.h: * svg/PatternAttributes.h: * svg/RadialGradientAttributes.h: * svg/SVGAnimatedPathData.h: * svg/SVGAnimatedPoints.h: * svg/SVGAnimationElement.h: * svg/SVGClipPathElement.h: * svg/SVGElementInstance.h: * svg/SVGFEBlendElement.cpp: (WebCore::SVGFEBlendElement::build): * svg/SVGFEBlendElement.h: * svg/SVGFEColorMatrixElement.cpp: (WebCore::SVGFEColorMatrixElement::build): * svg/SVGFEComponentTransferElement.cpp: (WebCore::SVGFEComponentTransferElement::build): * svg/SVGFECompositeElement.cpp: (WebCore::SVGFECompositeElement::build): * svg/SVGFEDiffuseLightingElement.cpp: (WebCore::SVGFEDiffuseLightingElement::build): * svg/SVGFEDisplacementMapElement.cpp: (WebCore::SVGFEDisplacementMapElement::build): * svg/SVGFEDistantLightElement.h: * svg/SVGFEFloodElement.cpp: (WebCore::SVGFEFloodElement::build): * svg/SVGFEFloodElement.h: * svg/SVGFEFuncAElement.h: * svg/SVGFEFuncBElement.h: * svg/SVGFEFuncGElement.h: * svg/SVGFEFuncRElement.h: * svg/SVGFEGaussianBlurElement.cpp: (WebCore::SVGFEGaussianBlurElement::build): * svg/SVGFEImageElement.cpp: (WebCore::SVGFEImageElement::build): * svg/SVGFEMergeElement.cpp: (WebCore::SVGFEMergeElement::build): * svg/SVGFEOffsetElement.cpp: (WebCore::SVGFEOffsetElement::build): * svg/SVGFEPointLightElement.h: * svg/SVGFESpecularLightingElement.cpp: (WebCore::SVGFESpecularLightingElement::build): * svg/SVGFESpotLightElement.h: * svg/SVGFETileElement.cpp: (WebCore::SVGFETileElement::build): * svg/SVGLineElement.cpp: (WebCore::SVGLineElement::parseMappedAttribute): * svg/SVGList.h: * svg/SVGListTraits.h: (WebCore::): * svg/SVGMPathElement.h: * svg/SVGMetadataElement.h: * svg/SVGParserUtilities.cpp: (WebCore::SVGPathParser::parseSVG): (WebCore::SVGPathParser::calculateArc): * svg/SVGPathElement.h: * svg/SVGPathSegClosePath.h: * svg/SVGSVGElement.h: * svg/SVGSetElement.h: * svg/SVGSwitchElement.h: * svg/SVGTextPathElement.cpp: (WebCore::SVGTextPathElement::parseMappedAttribute): * svg/SVGTextPathElement.h: * svg/SVGTitleElement.h: * svg/SVGTransformable.cpp: (WebCore::): * svg/SVGViewSpec.cpp: (WebCore::): * svg/animation/SMILTime.cpp: (WebCore::operator+): (WebCore::operator-): (WebCore::operator*): * svg/animation/SVGSMILElement.h: * svg/graphics/SVGResource.cpp: (WebCore::clientMap): * wml/WMLPostfieldElement.cpp: (WebCore::WMLPostfieldElement::value): * wml/WMLSetvarElement.cpp: (WebCore::WMLSetvarElement::value): * workers/WorkerRunLoop.cpp: * xml/XMLHttpRequest.cpp: (WebCore::XMLHttpRequest::dropProtection): * xml/XPathPath.h: git-svn-id: http://svn.webkit.org/repository/webkit/trunk@45747 268f45cc-cd09-0410-ab3c-d52691b4dbfc
-