Closed
Bug 1070851
Opened 10 years ago
Closed 10 years ago
[Touch Caret] Make touch caret respect argument 'withCaret' of snapshotWindow()
Categories
(Core :: Layout, defect)
Tracking
()
RESOLVED
FIXED
mozilla35
People
(Reporter: TYLin, Assigned: TYLin)
References
Details
Attachments
(1 file, 1 obsolete file)
4.78 KB,
patch
|
TYLin
:
review+
|
Details | Diff | Splinter Review |
When calling snapshotWindow(win, withCaret) [1] in javascript, we can pass 'false' in the 2nd argument to avoid snapshot caret. However, touch caret will always be captured in the snapshot. It will be better to make touch caret respect this argument as caret did. [1] http://hg.mozilla.org/mozilla-central/file/5bd6e09f074e/testing/mochitest/tests/SimpleTest/WindowSnapshot.js#l11
Assignee | ||
Comment 1•10 years ago
|
||
Hi Robert, It seems that nsCaret avoid adding itself in the snapshot by early return in [1]. But touch caret is an anonymous frame under canvas frame. Any similar trick we could do to avoid displaying touch caret? Would you please give me some hints? Thanks. [1] http://hg.mozilla.org/mozilla-central/file/5bd6e09f074e/layout/base/nsDisplayList.cpp#l957
Flags: needinfo?(roc)
Assignee | ||
Updated•10 years ago
|
Blocks: CopyPasteLegacy
Comment 2•10 years ago
|
||
You can probably just exclude the kid frame(s) for the touch caret for that case, something like this: if (aBuilder->mBuildCaret || kid->GetContent() != mTouchCaretElement) { BuildDisplayListForChild(...); } here: http://mxr.mozilla.org/mozilla-central/source/layout/generic/nsCanvasFrame.cpp#418
Assignee | ||
Updated•10 years ago
|
Assignee: nobody → tlin
Assignee | ||
Comment 3•10 years ago
|
||
Mats, thank you for providing the solution!
Status: NEW → ASSIGNED
Flags: needinfo?(roc)
Assignee | ||
Comment 4•10 years ago
|
||
Avoid capture touch caret when the argument 'withCaret' is false in snapshotWindow().
Attachment #8493613 -
Flags: review?(roc)
Assignee | ||
Comment 5•10 years ago
|
||
With the following CSS, I still got blue glow shown when focusing the input on B2G desktop and emulator. That's why the try failed. input, textarea, div { background: none; outline: none; } Try result: https://tbpl.mozilla.org/?tree=Try&rev=a6763c38622a
Comment 6•10 years ago
|
||
Does adding -moz-appearance:none; to the above style rule help?
Attachment #8493613 -
Flags: review?(roc) → review+
Assignee | ||
Comment 7•10 years ago
|
||
Adding "-moz-appearance:none;" does not make any difference. I'll add "border: none;" to the style rule. Try result: https://tbpl.mozilla.org/?tree=Try&rev=7ee274c48684
Attachment #8493613 -
Attachment is obsolete: true
Attachment #8494366 -
Flags: review+
Assignee | ||
Updated•10 years ago
|
Keywords: checkin-needed
Comment 8•10 years ago
|
||
https://hg.mozilla.org/integration/mozilla-inbound/rev/f2441dd1b0a9
Flags: in-testsuite+
Keywords: checkin-needed
Comment 9•10 years ago
|
||
https://hg.mozilla.org/mozilla-central/rev/f2441dd1b0a9
Status: ASSIGNED → RESOLVED
Closed: 10 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla35
You need to log in
before you can comment on or make changes to this bug.
Description
•