diff options
author | wolfbeast <mcwerewolf@wolfbeast.com> | 2019-03-06 12:30:20 +0100 |
---|---|---|
committer | wolfbeast <mcwerewolf@wolfbeast.com> | 2019-03-06 12:30:20 +0100 |
commit | e25ad543952b5afc13181aaebef9c5951fc27be0 (patch) | |
tree | 456a1359b3e5f810319edd423dd5cc5a1e22ada5 /dom/html | |
parent | 74533a843277c3687c749989ed1522354d1054d2 (diff) | |
parent | 5dba1ebe8498286762873fff0016f35f3e14d2d5 (diff) | |
download | UXP-e25ad543952b5afc13181aaebef9c5951fc27be0.tar UXP-e25ad543952b5afc13181aaebef9c5951fc27be0.tar.gz UXP-e25ad543952b5afc13181aaebef9c5951fc27be0.tar.lz UXP-e25ad543952b5afc13181aaebef9c5951fc27be0.tar.xz UXP-e25ad543952b5afc13181aaebef9c5951fc27be0.zip |
Merge branch 'master' into Basilisk-releasev2019.03.08
Diffstat (limited to 'dom/html')
-rw-r--r-- | dom/html/HTMLCanvasElement.cpp | 2 | ||||
-rw-r--r-- | dom/html/HTMLCanvasElement.h | 4 | ||||
-rw-r--r-- | dom/html/nsTextEditorState.cpp | 6 |
3 files changed, 8 insertions, 4 deletions
diff --git a/dom/html/HTMLCanvasElement.cpp b/dom/html/HTMLCanvasElement.cpp index 527135a80..a01795d9e 100644 --- a/dom/html/HTMLCanvasElement.cpp +++ b/dom/html/HTMLCanvasElement.cpp @@ -1000,7 +1000,7 @@ HTMLCanvasElement::GetSize() } bool -HTMLCanvasElement::IsWriteOnly() +HTMLCanvasElement::IsWriteOnly() const { return mWriteOnly; } diff --git a/dom/html/HTMLCanvasElement.h b/dom/html/HTMLCanvasElement.h index 746fab198..e77db6ff1 100644 --- a/dom/html/HTMLCanvasElement.h +++ b/dom/html/HTMLCanvasElement.h @@ -224,9 +224,9 @@ public: nsIntSize GetSize(); /** - * Determine whether the canvas is write-only. + * Determine whether the canvas is write-only (tainted). */ - bool IsWriteOnly(); + bool IsWriteOnly() const; /** * Force the canvas to be write-only. diff --git a/dom/html/nsTextEditorState.cpp b/dom/html/nsTextEditorState.cpp index 0b4cb1920..25be6016c 100644 --- a/dom/html/nsTextEditorState.cpp +++ b/dom/html/nsTextEditorState.cpp @@ -2255,7 +2255,11 @@ nsTextEditorState::UpdatePlaceholderText(bool aNotify) nsCOMPtr<nsIContent> content = do_QueryInterface(mTextCtrlElement); content->GetAttr(kNameSpaceID_None, nsGkAtoms::placeholder, placeholderValue); - nsContentUtils::RemoveNewlines(placeholderValue); + if (mTextCtrlElement->IsTextArea()) { // <textarea>s preserve newlines... + nsContentUtils::PlatformToDOMLineBreaks(placeholderValue); + } else { // ...<input>s don't + nsContentUtils::RemoveNewlines(placeholderValue); + } NS_ASSERTION(mPlaceholderDiv->GetFirstChild(), "placeholder div has no child"); mPlaceholderDiv->GetFirstChild()->SetText(placeholderValue, aNotify); } |