Bug 28151 - KURL hasFragmentIdentifier()/removeFragmentIdentifier() should be cleaned up and made a little smarter
Summary: KURL hasFragmentIdentifier()/removeFragmentIdentifier() should be cleaned up ...
Status: NEW
Alias: None
Product: WebKit
Classification: Unclassified
Component: Page Loading (show other bugs)
Version: 528+ (Nightly build)
Hardware: All All
: P3 Normal
Assignee: Nobody
URL:
Keywords:
Depends on:
Blocks: 37641
  Show dependency treegraph
 
Reported: 2009-08-10 09:41 PDT by Brady Eidson
Modified: 2010-04-15 00:44 PDT (History)
3 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Brady Eidson 2009-08-10 09:41:14 PDT
KURL hasFragmentIdentifier()/removeFragmentIdentifier() should be cleaned up and made a little smarter.

There's a handful of callsites that always say:
if (someURL.hasFragmentIdentifier())
    someURL.removeFragmentIdentifier();

Which is kind of silly and might be cleaner as one line of code...
...except that removeFragmentIdentifier() always allocs a new string and reparses it, when it should really do its own "if I don't have a fragment ID, don't do anything" check.