[Webkit-unassigned] [Bug 27038] htmlediting.cpp needs more utility functions to fix the bug 26816
bugzilla-daemon at webkit.org
bugzilla-daemon at webkit.org
Tue Jul 7 13:59:17 PDT 2009
https://bugs.webkit.org/show_bug.cgi?id=27038
--- Comment #4 from Julie Parent <jparent at google.com> 2009-07-07 13:59:17 PDT ---
(From update of attachment 32391)
I'm not a real reviewer, but I saw a couple style violations. See below for
details. Also, I know it isn't the style of these files, but could you add
function level descriptions for the new functions you are adding? Particularly
for functions that are designed to be re-usable utilities, documentation will
really help others use them in the future, rather than rolling their own.
> +PassRefPtr<Range> createRange(PassRefPtr<Document> document, const VisiblePosition& start, const VisiblePosition& end, ExceptionCode& ec)
> +{
> + ec=0;
> + RefPtr<Range> selectedRange = Range::create(document);
> + selectedRange->setStart( start.deepEquivalent().containerNode(), start.deepEquivalent().computeOffsetInContainerNode(), ec);
Style, here and in a few other places in this file: Do not place spaces between
a function and its parentheses, or between a parenthesis and its content.
> +PassRefPtr<Range> exntendRangeToWrappingNodes(PassRefPtr<Range> rangeToExtend, PassRefPtr<Range> maximumRange, Node* rootNode)
Spelling: extend, not exntend
> +{
> + ASSERT(rangeToExtend);
> + ASSERT(maximumRange);
> +
> + ExceptionCode ec=0;
Style: Here, and in other places in this file. Do place spaces around binary
and ternary operators.
> Index: WebCore/editing/htmlediting.h
> ===================================================================
> --- WebCore/editing/htmlediting.h (revision 45564)
> +++ WebCore/editing/htmlediting.h (working copy)
> @@ -28,6 +28,7 @@
>
> #include <wtf/Forward.h>
> #include "HTMLNames.h"
> +#include "CompositeEditCommand.h"
>
> namespace WebCore {
>
> @@ -61,6 +62,7 @@ Position previousVisuallyDistinctCandida
> bool isEditablePosition(const Position&);
> bool isRichlyEditablePosition(const Position&);
> Element* editableRootForPosition(const Position&);
> + Element* unsplittableElementForPosition(const Position& p);
Style: spacing
--
Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
More information about the webkit-unassigned
mailing list