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

Unified Diff: third_party/WebKit/Source/core/events/PointerEventFactory.cpp

Issue 1968653005: Set width=height=1 of mouse like pointer events (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 7 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 side-by-side diff with in-line comments
Download patch
Index: third_party/WebKit/Source/core/events/PointerEventFactory.cpp
diff --git a/third_party/WebKit/Source/core/events/PointerEventFactory.cpp b/third_party/WebKit/Source/core/events/PointerEventFactory.cpp
index 0d88fc6d8148197b56ceeb685b710c4e2bfd354d..f507fea6a020c0a8eac185ebb430d0dad75b9fd4 100644
--- a/third_party/WebKit/Source/core/events/PointerEventFactory.cpp
+++ b/third_party/WebKit/Source/core/events/PointerEventFactory.cpp
@@ -37,11 +37,7 @@ const AtomicString& pointerEventNameForMouseEventName(
}
RETURN_CORRESPONDING_PE_NAME(down);
- RETURN_CORRESPONDING_PE_NAME(enter);
mustaq 2016/05/11 20:42:57 Let's leave them as is. There's no harm in keeping
Navid Zolghadr 2016/05/11 20:50:20 Sure. I will add a DCHECK separately in the create
Navid Zolghadr 2016/05/12 20:13:21 Done.
- RETURN_CORRESPONDING_PE_NAME(leave);
RETURN_CORRESPONDING_PE_NAME(move);
- RETURN_CORRESPONDING_PE_NAME(out);
- RETURN_CORRESPONDING_PE_NAME(over);
RETURN_CORRESPONDING_PE_NAME(up);
#undef RETURN_CORRESPONDING_PE_NAME
@@ -106,14 +102,17 @@ PointerEvent* PointerEventFactory::create(
if (pointerEventName == EventTypeNames::pointerdown
|| pointerEventName == EventTypeNames::pointerup) {
pointerEventInit.setButton(mouseEvent.button());
- } else {
- // TODO(crbug.com/587955): We are setting NoButton for transition
- // pointerevents should be resolved as part of this bug
+ } else { // Only when pointerEventName == EventTypeNames::pointermove
mustaq 2016/05/11 20:42:57 The comment is not 100% correct: we are actually h
Navid Zolghadr 2016/05/11 20:50:20 No. The boundary events use another create functio
mustaq 2016/05/12 14:03:09 The create() call in sendMouseAndPossiblyPointerNo
Navid Zolghadr 2016/05/12 14:36:43 I'm not quite sure about the source of confusion h
Navid Zolghadr 2016/05/12 20:13:21 Done.
pointerEventInit.setButton(NoButton);
}
pointerEventInit.setPressure(getPointerEventPressure(
mouseEvent.pointerProperties().force, pointerEventInit.buttons()));
+ // Set width/height to 1 because we don't get any information from lower
mustaq 2016/05/11 20:42:57 "...because it matches Edge (and supported by the
Navid Zolghadr 2016/05/11 20:50:20 Sure.
Navid Zolghadr 2016/05/12 20:13:21 Done.
+ // lever APIs.
+ pointerEventInit.setWidth(1);
+ pointerEventInit.setHeight(1);
+
UIEventWithKeyState::setFromPlatformModifiers(pointerEventInit, mouseEvent.getModifiers());
// Make sure chorded buttons fire pointermove instead of pointerup/down.

Powered by Google App Engine
This is Rietveld 408576698