Bug 1803355: Basic implementation of Custom Highlight API. r=edgar,emilio
Added WebIDL interfaces as per spec, added some necessary changes to support maplike and setlike structures to be accessed from C++. Added `::highlight(foo)` pseudo element to CSS engine. Implemented Highlight as new kind of `Selection` using `HighlightType::eHighlight`. This implies Selections being added/removed during runtime (one `Selection` object per highlight identifier), therefore a dynamic container for highlight `Selection` objects was added to `nsFrameSelection`. Also, the painting code queries the highlight style for highlight Selections. Implementation is currently hidden behind a pref `dom.customHighlightAPI.enabled`. Differential Revision: https://phabricator.services.mozilla.com/D164203
This commit is contained in:
@@ -696,7 +696,10 @@ nsresult nsDocumentViewer::InitPresentationStuff(bool aDoInitialReflow) {
|
||||
NS_ASSERTION(!mPresShell, "Someone should have destroyed the presshell!");
|
||||
|
||||
// Now make the shell for the document
|
||||
mPresShell = mDocument->CreatePresShell(mPresContext, mViewManager);
|
||||
nsCOMPtr<Document> doc = mDocument;
|
||||
RefPtr<nsPresContext> presContext = mPresContext;
|
||||
RefPtr<nsViewManager> viewManager = mViewManager;
|
||||
mPresShell = doc->CreatePresShell(presContext, viewManager);
|
||||
if (!mPresShell) {
|
||||
return NS_ERROR_FAILURE;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user