Summary: | Text copied with Select All pastes with a indent but shouldn't | ||||||
---|---|---|---|---|---|---|---|
Product: | WebKit | Reporter: | Justin Garcia <justin.garcia> | ||||
Component: | HTML Editing | Assignee: | Justin Garcia <justin.garcia> | ||||
Status: | RESOLVED FIXED | ||||||
Severity: | Normal | CC: | eric | ||||
Priority: | P2 | Keywords: | InRadar | ||||
Version: | 528+ (Nightly build) | ||||||
Hardware: | Mac | ||||||
OS: | OS X 10.5 | ||||||
Attachments: |
|
Description
Justin Garcia
2008-06-17 17:09:28 PDT
Created attachment 29641 [details]
patch
Comment on attachment 29641 [details] patch Ideally I'd also like to see a check if the destination already has the properties in question. For example, the same background color or same image. > + if (fullySelectedRootStyle->getPropertyCSSValue(CSSPropertyBackgroundImage) || > + fullySelectedRootStyle->getPropertyCSSValue(CSSPropertyBackgroundColor) || > + static_cast<Element*>(fullySelectedRoot)->hasAttribute(backgroundAttr)) I find this if statement really difficult to read. I would prefer that you put it in a separate function or format it differently. I don't understand why the cast to Element* here is safe. What guarantees that fullySelectedRoot is an Element, not another kind of Node? Given that we're mutating the DOM here, maybe fullySelectedRoot should be a RefPtr<Node>, not just a Node*. r=me > I don't understand why the cast to Element* here is safe. What guarantees that > fullySelectedRoot is an Element, not another kind of Node? Currently it must be the body element, but since that's non obvious maybe I'll add a check. > Given that we're mutating the DOM here, maybe fullySelectedRoot should be a > RefPtr<Node>, not just a Node*. Are we? Does attribute checking fire listeners that can modify the DOM, or? |