Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 /* | 1 /* |
| 2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org) | 2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org) |
| 3 * (C) 1999 Antti Koivisto (koivisto@kde.org) | 3 * (C) 1999 Antti Koivisto (koivisto@kde.org) |
| 4 * (C) 2001 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 162 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 173 #include "core/html/parser/HTMLDocumentParser.h" | 173 #include "core/html/parser/HTMLDocumentParser.h" |
| 174 #include "core/html/parser/HTMLParserIdioms.h" | 174 #include "core/html/parser/HTMLParserIdioms.h" |
| 175 #include "core/html/parser/NestingLevelIncrementer.h" | 175 #include "core/html/parser/NestingLevelIncrementer.h" |
| 176 #include "core/html/parser/TextResourceDecoder.h" | 176 #include "core/html/parser/TextResourceDecoder.h" |
| 177 #include "core/input/EventHandler.h" | 177 #include "core/input/EventHandler.h" |
| 178 #include "core/inspector/ConsoleMessage.h" | 178 #include "core/inspector/ConsoleMessage.h" |
| 179 #include "core/inspector/InspectorInstrumentation.h" | 179 #include "core/inspector/InspectorInstrumentation.h" |
| 180 #include "core/inspector/InspectorTraceEvents.h" | 180 #include "core/inspector/InspectorTraceEvents.h" |
| 181 #include "core/inspector/InstanceCounters.h" | 181 #include "core/inspector/InstanceCounters.h" |
| 182 #include "core/inspector/MainThreadDebugger.h" | 182 #include "core/inspector/MainThreadDebugger.h" |
| 183 #include "core/layout/HitTestCanvasResult.h" | |
| 183 #include "core/layout/HitTestResult.h" | 184 #include "core/layout/HitTestResult.h" |
| 184 #include "core/layout/LayoutPart.h" | 185 #include "core/layout/LayoutPart.h" |
| 185 #include "core/layout/LayoutView.h" | 186 #include "core/layout/LayoutView.h" |
| 186 #include "core/layout/TextAutosizer.h" | 187 #include "core/layout/TextAutosizer.h" |
| 187 #include "core/layout/api/LayoutViewItem.h" | 188 #include "core/layout/api/LayoutViewItem.h" |
| 188 #include "core/layout/compositing/PaintLayerCompositor.h" | 189 #include "core/layout/compositing/PaintLayerCompositor.h" |
| 189 #include "core/loader/CookieJar.h" | 190 #include "core/loader/CookieJar.h" |
| 190 #include "core/loader/DocumentLoader.h" | 191 #include "core/loader/DocumentLoader.h" |
| 191 #include "core/loader/FrameFetchContext.h" | 192 #include "core/loader/FrameFetchContext.h" |
| 192 #include "core/loader/FrameLoader.h" | 193 #include "core/loader/FrameLoader.h" |
| (...skipping 2976 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 3169 return MouseEventWithHitTestResults(event, HitTestResult(request, Layout Point())); | 3170 return MouseEventWithHitTestResults(event, HitTestResult(request, Layout Point())); |
| 3170 | 3171 |
| 3171 HitTestResult result(request, documentPoint); | 3172 HitTestResult result(request, documentPoint); |
| 3172 layoutViewItem().hitTest(result); | 3173 layoutViewItem().hitTest(result); |
| 3173 | 3174 |
| 3174 if (!request.readOnly()) | 3175 if (!request.readOnly()) |
| 3175 updateHoverActiveState(request, result.innerElement()); | 3176 updateHoverActiveState(request, result.innerElement()); |
| 3176 | 3177 |
| 3177 if (isHTMLCanvasElement(result.innerNode())) { | 3178 if (isHTMLCanvasElement(result.innerNode())) { |
| 3178 PlatformMouseEvent eventWithRegion = event; | 3179 PlatformMouseEvent eventWithRegion = event; |
| 3179 std::pair<Element*, String> regionInfo = toHTMLCanvasElement(result.inne rNode())->getControlAndIdIfHitRegionExists(result.pointInInnerNodeFrame()); | 3180 HitTestCanvasResult* hitTestCanvasResult = toHTMLCanvasElement(result.in nerNode())->getControlAndIdIfHitRegionExists(result.pointInInnerNodeFrame()); |
| 3180 if (regionInfo.first) | 3181 if (hitTestCanvasResult->getControl()) { |
| 3181 result.setInnerNode(regionInfo.first); | 3182 result.setInnerNode(hitTestCanvasResult->getControl()); |
| 3182 eventWithRegion.setRegion(regionInfo.second); | 3183 } |
| 3184 eventWithRegion.setRegion(hitTestCanvasResult->getId()); | |
| 3185 result.setHitCanvasRegion(hitTestCanvasResult); | |
|
zino
2016/08/19 18:00:07
Do we really need this? HitTestResult only has set
Hwanseung Lee
2016/08/20 06:03:54
Done.
| |
| 3183 return MouseEventWithHitTestResults(eventWithRegion, result); | 3186 return MouseEventWithHitTestResults(eventWithRegion, result); |
| 3184 } | 3187 } |
| 3185 | 3188 |
| 3186 return MouseEventWithHitTestResults(event, result); | 3189 return MouseEventWithHitTestResults(event, result); |
| 3187 } | 3190 } |
| 3188 | 3191 |
| 3189 // DOM Section 1.1.1 | 3192 // DOM Section 1.1.1 |
| 3190 bool Document::childTypeAllowed(NodeType type) const | 3193 bool Document::childTypeAllowed(NodeType type) const |
| 3191 { | 3194 { |
| 3192 switch (type) { | 3195 switch (type) { |
| (...skipping 2845 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 6038 } | 6041 } |
| 6039 | 6042 |
| 6040 void showLiveDocumentInstances() | 6043 void showLiveDocumentInstances() |
| 6041 { | 6044 { |
| 6042 WeakDocumentSet& set = liveDocumentSet(); | 6045 WeakDocumentSet& set = liveDocumentSet(); |
| 6043 fprintf(stderr, "There are %u documents currently alive:\n", set.size()); | 6046 fprintf(stderr, "There are %u documents currently alive:\n", set.size()); |
| 6044 for (Document* document : set) | 6047 for (Document* document : set) |
| 6045 fprintf(stderr, "- Document %p URL: %s\n", document, document->url().get String().utf8().data()); | 6048 fprintf(stderr, "- Document %p URL: %s\n", document, document->url().get String().utf8().data()); |
| 6046 } | 6049 } |
| 6047 #endif | 6050 #endif |
| OLD | NEW |