gecko-dev/layout/base
Ting-Yu Lin 73b1eb5bc6 Bug 1550869 - Stop undraggable images from being selected by a single-clicking. r=emilio
This is a rework for the issue in bug 1516963.

The condition `aFrame->IsFrameOfType(nsIFrame::eReplaced)` was added to
avoid breaking
editor/libeditor/tests/test_abs_positioner_positioning_elements.html
because it contains blockified (position:absolute) images in
contenteditable, and we don't want these images to use frame edge. But
for non-editable undraggable images, which have display:inline, we want
them to use frame edge to avoid being selected by a single-clicking.
Note that non-editable draggable images use a different code patch to
handle their operations.

I think it easier to understand by checking the frame types directly. As
for images, we want non-editable images to use frame edge, but not those
editable ones because editor has its own logic to handle all the
dragging operations, etc. Using frame edge for editable images makes
them undraggable, and fails
test_abs_positioner_positioning_elements.html.

Add more tests for empty inline-grid, inline-flex, inline-table, video,
to ensure the behavior is not changed. We don't want them to be selected
by a single-clicking, either.

Note I only test video's selection is collapsed when single-clicking
because I failed to turn off picture-in-picture on <video> in
test_reftests_with_caret.html.

Differential Revision: https://phabricator.services.mozilla.com/D34909

--HG--
extra : moz-landing-system : lando
2019-06-18 05:30:35 +00:00
..
crashtests Bug 1524411 - Null-check kid in nsLayoutUtils::GetFirstLinePosition(). r=dholbert 2019-06-13 04:20:55 +00:00
doc
gtest Bug 1550422 - P23. Remove now unused gfxPrefs. r=jrmuizel 2019-05-26 14:31:53 +00:00
tests Bug 1550869 - Stop undraggable images from being selected by a single-clicking. r=emilio 2019-06-18 05:30:35 +00:00
AccessibleCaret.cpp Bug 1544343 - part 3: Make layout use mozilla::PresShell instead of nsIPresShell as far as possible r=emilio 2019-04-16 07:25:10 +00:00
AccessibleCaret.h Bug 1544343 - part 3: Make layout use mozilla::PresShell instead of nsIPresShell as far as possible r=emilio 2019-04-16 07:25:10 +00:00
AccessibleCaretEventHub.cpp Bug 1550422 - P23. Remove now unused gfxPrefs. r=jrmuizel 2019-05-26 14:31:53 +00:00
AccessibleCaretEventHub.h Bug 1544343 - part 3: Make layout use mozilla::PresShell instead of nsIPresShell as far as possible r=emilio 2019-04-16 07:25:10 +00:00
AccessibleCaretLogger.h Bug 1521000 - Part 2: Adjust our clang-format rules to include spaces after the hash for nested preprocessor directives r=sylvestre 2019-01-18 10:16:18 +01:00
AccessibleCaretManager.cpp Backed out 2 changesets (bug 1553772) for Geckoview failures in org.mozilla.geckoview.test.SelectionActionDelegateTest.collapseToStart[#designmode] 2019-05-23 18:30:54 +03:00
AccessibleCaretManager.h Bug 1543315 - part 15: Mark PresShell::ScrollFrameRectIntoView() as MOZ_CAN_RUN_SCRIPT r=smaug 2019-05-06 13:57:46 +00:00
ArenaObjectID.h
AutoProfilerStyleMarker.h Bug 1500692 - Centralize profiling category definition and add infrastructure for subcategories. r=njn 2019-02-16 17:37:43 +00:00
CaretAssociationHint.h
FrameProperties.h
GeckoMVMContext.cpp Bug 1535945 - Don't skip invalidating frames when creating displayports for async scrollable ancestors. r=tnikkel 2019-05-01 04:23:07 +00:00
GeckoMVMContext.h Bug 1528052 - Suppress resize events until the initial paint has finished on mobile. r=botond 2019-04-23 04:14:55 +00:00
GeometryUtils.cpp Bug 1540015 - part 3: Rename Document::GetShell() to Document::GetPresShell() and make it return PresShell* rather than nsIPresShell* r=smaug,emilio 2019-03-29 15:12:47 +00:00
GeometryUtils.h
LayoutConstants.h Bug 1549267 Part 2 - Improve comments in LayoutConstants.h. r=mats 2019-06-06 00:04:19 +00:00
LayoutLogging.cpp
LayoutLogging.h Bug 1521000 - Part 2: Adjust our clang-format rules to include spaces after the hash for nested preprocessor directives r=sylvestre 2019-01-18 10:16:18 +01:00
MobileViewportManager.cpp Bug 1555511 Part 2: Remove a float division in MVM::ScaleZoomWithDisplayWidth. r=botond 2019-06-04 22:25:06 +00:00
MobileViewportManager.h Bug 1544343 - part 3: Make layout use mozilla::PresShell instead of nsIPresShell as far as possible r=emilio 2019-04-16 07:25:10 +00:00
moz.build Bug 253889 - part 4: Finally, get rid of nsIPresShell r=emilio 2019-05-01 02:28:59 +00:00
MVMContext.h Bug 1528052 - Suppress resize events until the initial paint has finished on mobile. r=botond 2019-04-23 04:14:55 +00:00
nsAutoLayoutPhase.cpp
nsAutoLayoutPhase.h Bug 1521000 - Part 2: Adjust our clang-format rules to include spaces after the hash for nested preprocessor directives r=sylvestre 2019-01-18 10:16:18 +01:00
nsBidi.cpp
nsBidi.h
nsBidiPresUtils.cpp Bug 1524431 Part 2 - Check IsBidiSplittable() before processing the ancestor frames. r=jfkthame 2019-06-11 19:27:57 +00:00
nsBidiPresUtils.h Bug 1554461 - Use an array to store nsContinuationStates when the number of them is low. r=jfkthame 2019-05-31 11:42:42 +00:00
nsCaret.cpp Bug 1547536 - Make PresShell QI-able for aware of do_QueryReferent() r=smaug 2019-04-30 00:56:14 +00:00
nsCaret.h Bug 1544343 - part 3: Make layout use mozilla::PresShell instead of nsIPresShell as far as possible r=emilio 2019-04-16 07:25:10 +00:00
nsChangeHint.h Bug 1533963 - Use a single RestyleHint representation. r=heycam 2019-03-14 11:47:50 +00:00
nsCompatibility.h
nsCounterManager.cpp Bug 1552719 - Make nsBulletFrame::Ordinal() O(1) again. r=mats 2019-05-21 17:30:42 +00:00
nsCounterManager.h Bug 1552719 - Make nsBulletFrame::Ordinal() O(1) again. r=mats 2019-05-21 17:30:42 +00:00
nsCSSColorUtils.cpp Bug 1547143 - Format the tree: Be prescriptive with the pointer style (left) r=Ehsan 2019-05-01 08:47:10 +00:00
nsCSSColorUtils.h Bug 1547143 - Format the tree: Be prescriptive with the pointer style (left) r=Ehsan 2019-05-01 08:47:10 +00:00
nsCSSFrameConstructor.cpp Bug 1558352 - Ensure canvas anonymous content is always created before constructing the document element frame's children. r=TYLin 2019-06-12 10:09:28 +00:00
nsCSSFrameConstructor.h Bug 1558352 - Ensure canvas anonymous content is always created before constructing the document element frame's children. r=TYLin 2019-06-12 10:09:28 +00:00
nsDocumentViewer.cpp Merge mozilla-inbound to mozilla-central. a=merge 2019-06-12 15:05:58 +03:00
nsFrameManager.cpp Bug 1544343 - part 3: Make layout use mozilla::PresShell instead of nsIPresShell as far as possible r=emilio 2019-04-16 07:25:10 +00:00
nsFrameManager.h Bug 1544343 - part 1: Make nsFrameManager, nsCSSFrameConstructor and nsFrameConstructorState use mozilla::PresShell directly rather than via nsIPresShell r=emilio 2019-04-16 07:24:29 +00:00
nsFrameTraversal.cpp
nsFrameTraversal.h Bug 1547143 - Format the tree: Be prescriptive with the pointer style (left) r=Ehsan 2019-05-01 08:47:10 +00:00
nsGenConList.cpp Bug 1552719 - Make nsGenConList::NodeAfter handle correctly nested pseudo-elements. r=mats 2019-05-21 17:29:26 +00:00
nsGenConList.h Bug 1552719 - Make nsBulletFrame::Ordinal() O(1) again. r=mats 2019-05-21 17:30:42 +00:00
nsIDocumentViewerPrint.h Bug 1544215 - Make nsIContentVewer::GetPresShell() return mozilla::PresShell instead of nsIPresShell r=bzbarsky 2019-04-16 02:47:26 +00:00
nsIFrameTraversal.h
nsILayoutDebugger.h Bug 1519636 - Reformat recent changes to the Google coding style r=Ehsan 2019-03-31 15:12:55 +00:00
nsILayoutHistoryState.idl Bug 1551652. Stop using [array] in nsILayoutHistoryState. r=heycam 2019-05-16 00:36:41 +00:00
nsIPercentBSizeObserver.h
nsIPreloadedStyleSheet.idl
nsIReflowCallback.h Bug 253889 - part 2: Move all methods and public structs of nsIPresShell into mozilla::PresShell r=emilio 2019-05-01 02:27:53 +00:00
nsIStyleSheetService.idl
nsLayoutDebugger.cpp Bug 1550554 - Use OwnedSlice for will-change. r=heycam 2019-05-16 23:23:28 +00:00
nsLayoutHistoryState.cpp Bug 1551652. Stop using [array] in nsILayoutHistoryState. r=heycam 2019-05-16 00:36:41 +00:00
nsLayoutUtils.cpp Bug 1553254 - Part 2: Add some first performance probes to our codebase for some basic, easy to measure things. r=brennie 2019-05-28 20:58:06 +02:00
nsLayoutUtils.h Bug 1490404 - Part 1: Be more consistent with display list and display list builder pointers and references r=mattwoodrow 2019-06-06 17:54:13 +00:00
nsPresArena.cpp Bug 1487216 - Measure memory usage of RDL. r=mattwoodrow,miko 2019-06-09 22:58:24 +00:00
nsPresArena.h Bug 1487216 - Measure memory usage of RDL. r=mattwoodrow,miko 2019-06-09 22:58:24 +00:00
nsPresArenaObjectList.h Bug 1525371 - Remove ArenaRefPtr. r=jwatt 2019-02-07 11:15:39 +01:00
nsPresContext.cpp Bug 1488953 - Use a script runner for scrollport events. r=mats 2019-06-13 02:30:25 +00:00
nsPresContext.h Bug 1488953 - Use a script runner for scrollport events. r=mats 2019-06-13 02:30:25 +00:00
nsPresContextInlines.h Bug 1535788 - Make the Document own the StyleSet. r=heycam 2019-04-03 07:02:00 +00:00
nsQuoteList.cpp Bug 1519636 - Reformat recent changes to the Google coding style r=Ehsan 2019-05-25 17:46:15 +00:00
nsQuoteList.h
nsRefreshDriver.cpp Bug 1529345 - Part 2: Add Gecko infrastructure for receiving notifications about debugger-related events. r=jimb,smaug 2019-06-17 04:36:29 +00:00
nsRefreshDriver.h Bug 1544343 - part 3: Make layout use mozilla::PresShell instead of nsIPresShell as far as possible r=emilio 2019-04-16 07:25:10 +00:00
nsStyleChangeList.cpp
nsStyleChangeList.h
nsStyleSheetService.cpp Bug 1547621 - Move all inline methods of nsIPresShell into mozilla::PresShell r=smaug 2019-04-30 01:52:53 +00:00
nsStyleSheetService.h Bug 1544343 - part 3: Make layout use mozilla::PresShell instead of nsIPresShell as far as possible r=emilio 2019-04-16 07:25:10 +00:00
OverflowChangedTracker.h Bug 1544995 - Always update overflow areas up to the preserve-3d root. r=dbaron 2019-05-19 22:39:58 +00:00
PositionedEventTargeting.cpp Bug 1259660 - Cleaned up WidgetMouseEventBase by renaming WidgetMouseEventBase::inputSource to WidgetMouseEventBase::mInputSource r=masayuki 2019-04-21 18:19:43 +00:00
PositionedEventTargeting.h
PresShell.cpp Bug 1553254 - Part 2: Add some first performance probes to our codebase for some basic, easy to measure things. r=brennie 2019-05-28 20:58:06 +02:00
PresShell.h Bug 1490404 - Part 1: Be more consistent with display list and display list builder pointers and references r=mattwoodrow 2019-06-06 17:54:13 +00:00
PresShellForwards.h Bug 253889 - part 4: Finally, get rid of nsIPresShell r=emilio 2019-05-01 02:28:59 +00:00
PresShellInlines.h Bug 1547621 - Move all inline methods of nsIPresShell into mozilla::PresShell r=smaug 2019-04-30 01:52:53 +00:00
PresState.ipdlh Bug 1498812 - Part 11: Use Visual Viewport for storing scroll position in the PresState. r=botond,tnikkel 2019-01-11 19:50:24 +00:00
RestyleManager.cpp Bug 1505489 - Invalidate the style of the element when the part attribute changes. r=heycam 2019-06-11 17:42:00 +00:00
RestyleManager.h Bug 1540015 - part 2: Make nsPresContext.h stop including nsIPresShel.h and nsIPresShellInlines.h r=smaug 2019-03-29 15:11:22 +00:00
ScrollStyles.cpp Bug 1546219 - Rename mScrollSnapType{X,Y} to mScrollSnapStrictness{X,Y}. r=botond 2019-05-22 17:43:34 +00:00
ScrollStyles.h Bug 1546219 - Rename mScrollSnapType{X,Y} to mScrollSnapStrictness{X,Y}. r=botond 2019-05-22 17:43:34 +00:00
ScrollTypes.h Bug 1546697 - Use a consistent style for enum classes in layout. r=dholbert 2019-04-25 23:03:04 +00:00
ShapeUtils.cpp Bug 1548691 - Use the owned slice type for basic shape polygon coordinates. r=TYLin,heycam 2019-05-09 11:24:57 +00:00
ShapeUtils.h Bug 1548691 - Use the owned slice type for basic shape polygon coordinates. r=TYLin,heycam 2019-05-09 11:24:57 +00:00
StackArena.cpp
StackArena.h
StaticPresData.cpp Bug 1537594 - Make the fixed generic family a parse-time alias to monospace. r=jfkthame 2019-04-01 21:48:08 +00:00
StaticPresData.h Bug 1537594 - Make the fixed generic family a parse-time alias to monospace. r=jfkthame 2019-04-01 21:48:08 +00:00
TouchManager.cpp Bug 1543439 - Part 2: Move is-user-interaction checks out of PresShell::EventHandler::PrepareToDispatchEvent; r=masayuki 2019-05-27 10:14:06 +00:00
TouchManager.h Bug 1543439 - Part 2: Move is-user-interaction checks out of PresShell::EventHandler::PrepareToDispatchEvent; r=masayuki 2019-05-27 10:14:06 +00:00
Units.h Bug 253889 - part 2: Move all methods and public structs of nsIPresShell into mozilla::PresShell r=emilio 2019-05-01 02:27:53 +00:00
UnitTransforms.h Bug 1530661 - Make APZ report the per LayersId layer-to-screen transform matrices to the chrome process. r=kats 2019-03-09 20:33:17 +00:00
WordMovementType.h
ZoomConstraintsClient.cpp Bug 1550422 - P15. Move Skip and Once gfxPrefs to StaticPrefs. r=jrmuizel 2019-05-26 14:30:14 +00:00
ZoomConstraintsClient.h Bug 1544343 - part 3: Make layout use mozilla::PresShell instead of nsIPresShell as far as possible r=emilio 2019-04-16 07:25:10 +00:00