Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(5)

Side by Side Diff: third_party/WebKit/Source/core/dom/Document.cpp

Issue 1754543002: hello Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « third_party/WebKit/Source/core/core.gypi ('k') | third_party/WebKit/Source/core/dom/Touch.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org) 2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org)
3 * (C) 1999 Antti Koivisto (koivisto@kde.org) 3 * (C) 1999 Antti Koivisto (koivisto@kde.org)
4 * (C) 2001 Dirk Mueller (mueller@kde.org) 4 * (C) 2001 Dirk Mueller (mueller@kde.org)
5 * (C) 2006 Alexey Proskuryakov (ap@webkit.org) 5 * (C) 2006 Alexey Proskuryakov (ap@webkit.org)
6 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2011, 2012 Apple Inc. All r ights reserved. 6 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2011, 2012 Apple Inc. All r ights reserved.
7 * Copyright (C) 2008, 2009 Torch Mobile Inc. All rights reserved. (http://www.t orchmobile.com/) 7 * Copyright (C) 2008, 2009 Torch Mobile Inc. All rights reserved. (http://www.t orchmobile.com/)
8 * Copyright (C) 2008, 2009, 2011, 2012 Google Inc. All rights reserved. 8 * Copyright (C) 2008, 2009, 2011, 2012 Google Inc. All rights reserved.
9 * Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies) 9 * Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies)
10 * Copyright (C) Research In Motion Limited 2010-2011. All rights reserved. 10 * Copyright (C) Research In Motion Limited 2010-2011. All rights reserved.
(...skipping 3198 matching lines...) Expand 10 before | Expand all | Expand 10 after
3209 // See also the similar code in EventHandler::hitTestResultAtPoint. 3209 // See also the similar code in EventHandler::hitTestResultAtPoint.
3210 if (!layoutView() || !view() || !view()->didFirstLayout()) 3210 if (!layoutView() || !view() || !view()->didFirstLayout())
3211 return MouseEventWithHitTestResults(event, HitTestResult(request, Layout Point())); 3211 return MouseEventWithHitTestResults(event, HitTestResult(request, Layout Point()));
3212 3212
3213 HitTestResult result(request, documentPoint); 3213 HitTestResult result(request, documentPoint);
3214 layoutView()->hitTest(result); 3214 layoutView()->hitTest(result);
3215 3215
3216 if (!request.readOnly()) 3216 if (!request.readOnly())
3217 updateHoverActiveState(request, result.innerElement()); 3217 updateHoverActiveState(request, result.innerElement());
3218 3218
3219 if (isHTMLCanvasElement(result.innerNode())) {
3220 std::pair<Element*, String> regionInfo = toHTMLCanvasElement(result.inne rNode())->getControlAndIdIfHitRegionExists(result.pointInInnerNodeFrame());
3221 if (regionInfo.first)
3222 result.setInnerNode(regionInfo.first);
3223 const_cast<PlatformMouseEvent&>(event).setRegion(regionInfo.second);
3224 }
3225
3219 return MouseEventWithHitTestResults(event, result); 3226 return MouseEventWithHitTestResults(event, result);
3220 } 3227 }
3221 3228
3222 // DOM Section 1.1.1 3229 // DOM Section 1.1.1
3223 bool Document::childTypeAllowed(NodeType type) const 3230 bool Document::childTypeAllowed(NodeType type) const
3224 { 3231 {
3225 switch (type) { 3232 switch (type) {
3226 case ATTRIBUTE_NODE: 3233 case ATTRIBUTE_NODE:
3227 case CDATA_SECTION_NODE: 3234 case CDATA_SECTION_NODE:
3228 case DOCUMENT_FRAGMENT_NODE: 3235 case DOCUMENT_FRAGMENT_NODE:
(...skipping 2199 matching lines...) Expand 10 before | Expand all | Expand 10 after
5428 if (!std::isfinite(rotationAngle)) 5435 if (!std::isfinite(rotationAngle))
5429 rotationAngle = 0; 5436 rotationAngle = 0;
5430 if (!std::isfinite(force)) 5437 if (!std::isfinite(force))
5431 force = 0; 5438 force = 0;
5432 5439
5433 // FIXME: It's not clear from the documentation at 5440 // FIXME: It's not clear from the documentation at
5434 // http://developer.apple.com/library/safari/#documentation/UserExperience/R eference/DocumentAdditionsReference/DocumentAdditions/DocumentAdditions.html 5441 // http://developer.apple.com/library/safari/#documentation/UserExperience/R eference/DocumentAdditionsReference/DocumentAdditions/DocumentAdditions.html
5435 // when this method should throw and nor is it by inspection of iOS behavior . It would be nice to verify any cases where it throws under iOS 5442 // when this method should throw and nor is it by inspection of iOS behavior . It would be nice to verify any cases where it throws under iOS
5436 // and implement them here. See https://bugs.webkit.org/show_bug.cgi?id=4781 9 5443 // and implement them here. See https://bugs.webkit.org/show_bug.cgi?id=4781 9
5437 LocalFrame* frame = window && window->isLocalDOMWindow() ? toLocalDOMWindow( window)->frame() : this->frame(); 5444 LocalFrame* frame = window && window->isLocalDOMWindow() ? toLocalDOMWindow( window)->frame() : this->frame();
5438 return Touch::create(frame, target, identifier, FloatPoint(screenX, screenY) , FloatPoint(pageX, pageY), FloatSize(radiusX, radiusY), rotationAngle, force); 5445 return Touch::create(frame, target, identifier, FloatPoint(screenX, screenY) , FloatPoint(pageX, pageY), FloatSize(radiusX, radiusY), rotationAngle, force, S tring());
5439 } 5446 }
5440 5447
5441 PassRefPtrWillBeRawPtr<TouchList> Document::createTouchList(WillBeHeapVector<Ref PtrWillBeMember<Touch>>& touches) const 5448 PassRefPtrWillBeRawPtr<TouchList> Document::createTouchList(WillBeHeapVector<Ref PtrWillBeMember<Touch>>& touches) const
5442 { 5449 {
5443 return TouchList::adopt(touches); 5450 return TouchList::adopt(touches);
5444 } 5451 }
5445 5452
5446 DocumentLoader* Document::loader() const 5453 DocumentLoader* Document::loader() const
5447 { 5454 {
5448 if (!m_frame) 5455 if (!m_frame)
(...skipping 546 matching lines...) Expand 10 before | Expand all | Expand 10 after
5995 #ifndef NDEBUG 6002 #ifndef NDEBUG
5996 using namespace blink; 6003 using namespace blink;
5997 void showLiveDocumentInstances() 6004 void showLiveDocumentInstances()
5998 { 6005 {
5999 Document::WeakDocumentSet& set = Document::liveDocumentSet(); 6006 Document::WeakDocumentSet& set = Document::liveDocumentSet();
6000 fprintf(stderr, "There are %u documents currently alive:\n", set.size()); 6007 fprintf(stderr, "There are %u documents currently alive:\n", set.size());
6001 for (Document* document : set) 6008 for (Document* document : set)
6002 fprintf(stderr, "- Document %p URL: %s\n", document, document->url().get String().utf8().data()); 6009 fprintf(stderr, "- Document %p URL: %s\n", document, document->url().get String().utf8().data());
6003 } 6010 }
6004 #endif 6011 #endif
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/core.gypi ('k') | third_party/WebKit/Source/core/dom/Touch.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698