DOM4 remove method
https://bugs.webkit.org/show_bug.cgi?id=73885

Reviewed by Ojan Vafai.

This adds the DOM 4 remove method.

http://dvcs.w3.org/hg/domcore/raw-file/tip/Overview.html#dom-childnode-remove

The remove method removes the node from its parent if it has a parent.

Source/WebCore:

Tests: fast/dom/Comment/remove.html
       fast/dom/DocumentType/remove.html
       fast/dom/Element/remove.html
       fast/dom/Text/remove.html

* dom/CharacterData.idl:
* dom/DocumentType.idl:
* dom/Element.idl:
* dom/Node.cpp:
(WebCore::Node::remove): The spec says to do nothing if the node has no parent.
* html/parser/HTMLTreeBuilder.cpp:
(WebCore::HTMLTreeBuilder::processStartTagForInBody): Cleanup.
* html/track/TextTrackCue.cpp:
(WebCore::TextTrackCue::removeDisplayTree): No need to check parenNode twice.

LayoutTests:

* fast/dom/Comment/remove-expected.txt: Added.
* fast/dom/Comment/remove.html: Added.
* fast/dom/DocumentType/remove-expected.txt: Added.
* fast/dom/DocumentType/remove.html: Added.
* fast/dom/Element/remove-expected.txt: Added.
* fast/dom/Element/remove.html: Added.
* fast/dom/Text/remove-expected.txt: Added.
* fast/dom/Text/remove.html: Added.


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@129400 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Unreviewed, rolling out r129388.
http://trac.webkit.org/changeset/129388
https://bugs.webkit.org/show_bug.cgi?id=97477

Caused an assertion in a WebKit2 unit test (Requested by
abarth on #webkit).

Patch by Sheriff Bot <webkit.review.bot@gmail.com> on 2012-09-24

.:

* Source/autotools/symbols.filter:

Source/WebCore:

* WebCore.exp.in:
* loader/FrameLoader.cpp:
(WebCore::FrameLoader::didBeginDocument):
* loader/SubresourceLoader.cpp:
(WebCore::SubresourceLoader::willSendRequest):
* loader/cache/CachedImage.cpp:
* loader/cache/CachedImage.h:
(WebCore::CachedImage::stillNeedsLoad):
(CachedImage):
* loader/cache/CachedResource.cpp:
(WebCore::CachedResource::didAddClient):
* loader/cache/CachedResource.h:
(WebCore):
* loader/cache/CachedResourceLoader.cpp:
(WebCore::CachedResourceLoader::CachedResourceLoader):
(WebCore::CachedResourceLoader::requestImage):
(WebCore::CachedResourceLoader::canRequest):
(WebCore::CachedResourceLoader::requestResource):
(WebCore::CachedResourceLoader::revalidateResource):
(WebCore::CachedResourceLoader::loadResource):
(WebCore::CachedResourceLoader::determineRevalidationPolicy):
(WebCore::CachedResourceLoader::setAutoLoadImages):
* loader/cache/CachedResourceLoader.h:
(CachedResourceLoader):
* page/Settings.cpp:
(WebCore::setLoadsImagesAutomaticallyInAllFrames):
(WebCore::Settings::Settings):
(WebCore::Settings::setLoadsImagesAutomatically):
(WebCore::Settings::loadsImagesAutomaticallyTimerFired):
(WebCore::Settings::setImagesEnabled):
* page/Settings.h:
(Settings):
* testing/InternalSettings.cpp:
(WebCore::InternalSettings::Backup::Backup):
(WebCore::InternalSettings::Backup::restoreTo):
* testing/InternalSettings.h:
(Backup):
(InternalSettings):
* testing/InternalSettings.idl:

Source/WebKit2:

* win/WebKit2.def:

LayoutTests:

* fast/loader/display-image-unset-allows-cached-image-load-expected.txt: Removed.
* fast/loader/display-image-unset-allows-cached-image-load.html: Removed.
* fast/loader/display-image-unset-can-block-image-and-can-reload-in-place-expected.txt: Removed.
* fast/loader/display-image-unset-can-block-image-and-can-reload-in-place.html: Removed.
* fast/loader/images-enabled-unset-can-block-image-and-can-reload-in-place-expected.txt: Removed.
* fast/loader/images-enabled-unset-can-block-image-and-can-reload-in-place.html: Removed.
* fast/loader/resources/image1.html: Removed.
* fast/loader/resources/image2.html: Removed.
* platform/chromium/permissionclient/image-permissions-expected.txt:
* platform/chromium/permissionclient/image-permissions.html:
* platform/chromium/permissionclient/resources/image.html:
* platform/wk2/Skipped:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@129402 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[BlackBerry] Reverting implementation for 407 error pages
https://bugs.webkit.org/show_bug.cgi?id=97455

Patch by Otto Derek Cheung <otcheung@rim.com> on 2012-09-24
Reviewed by Rob Buis.

Revert "[BlackBerry] Show custom error page when 407 is received"
This reverts commit e6d14529428fe47916fcb997528095b8acad2f2b.

* platform/network/blackberry/NetworkJob.cpp:
(WebCore::NetworkJob::handleNotifyStatusReceived):
(WebCore::NetworkJob::notifyAuthReceived):
(WebCore::NetworkJob::sendRequestWithCredentials):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@129404 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Unreviewed. accessibility/svg-bounds.html crashes on Windows due to use of AX role which hasn't been properly implemented on Windows.

* platform/win/Skipped:


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@129405 268f45cc-cd09-0410-ab3c-d52691b4dbfc
suspend/resumeWidgetHierarchyUpdates should be a RAII object
https://bugs.webkit.org/show_bug.cgi?id=96706

Reviewed by Simon Fraser.

Source/WebCore: 

Replaced suspendWidgetHierarchyUpdates and resumeWidgetHierarchyUpdates by WidgetHierarchyUpdatesSuspensionScope.

* WebCore.exp.in: Export new symbols.
* dom/ContainerNode.cpp:
(WebCore::ContainerNode::removeChild):
(WebCore::ContainerNode::removeChildren):
* dom/Document.cpp:
(WebCore::Document::recalcStyle):
* dom/Element.cpp:
(WebCore::Element::attach):
(WebCore::Element::detach):
* page/mac/EventHandlerMac.mm:
(WebCore::EventHandler::passMouseDownEventToWidget):
* rendering/RenderWidget.cpp:
(WebCore):
(WebCore::WidgetHierarchyUpdatesSuspensionScope::widgetNewParentMap):
(WebCore::WidgetHierarchyUpdatesSuspensionScope::moveWidgets):
(WebCore::moveWidgetToParentSoon):
* rendering/RenderWidget.h:
(WidgetHierarchyUpdatesSuspensionScope):
(WebCore::WidgetHierarchyUpdatesSuspensionScope::WidgetHierarchyUpdatesSuspensionScope):
(WebCore::WidgetHierarchyUpdatesSuspensionScope::~WidgetHierarchyUpdatesSuspensionScope):
(WebCore::WidgetHierarchyUpdatesSuspensionScope::isSuspended):
(WebCore::WidgetHierarchyUpdatesSuspensionScope::scheduleWidgetToMove):
(WebCore):
(RenderWidget):

Source/WebKit/mac: 

* WebView/WebHTMLView.mm:
(-[WebHTMLView _invalidateGStatesForTree]):


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@129406 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Unreviewed, rolling out r129343.
http://trac.webkit.org/changeset/129343
https://bugs.webkit.org/show_bug.cgi?id=97479

It broke the build (Requested by Ossy_NIGHT on #webkit).

Patch by Sheriff Bot <webkit.review.bot@gmail.com> on 2012-09-24

.:

* Source/api.pri:

Tools:

* qmake/mkspecs/features/default_pre.prf:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@129407 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Remove unbaked support for :scope pseudo-class.
https://bugs.webkit.org/show_bug.cgi?id=97467

Reviewed by Antti Koivisto.

It turns out, the Selectors 4 require ":scope" to match contextual reference element set, which would be the root node in querySelector:
http://dev.w3.org/csswg/selectors4/#the-scope-pseudo

Right now, we simply make ":scope" equivalent to ":root", which is not correct. Let's remove the partial implementation until we have
time/energy to fully implement it.

Source/WebCore:

No new tests, removing half-baked feature.

* css/CSSSelector.cpp:
(WebCore::CSSSelector::pseudoId): Removed all mentions of PseudoScope
(WebCore::nameToPseudoTypeMap): Ditto.
(WebCore::CSSSelector::extractPseudoType): Ditto.
* css/CSSSelector.h: Ditto.
* css/SelectorChecker.cpp:
(WebCore::SelectorChecker::checkOneSelector): Ditto.

LayoutTests:

* fast/css/style-scoped/scope-pseudo-expected.txt: Removed.
* fast/css/style-scoped/scope-pseudo.html: Removed.


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@129408 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Replace RenderMeter::updateLogicalHeight to RenderMeter::computeLogicalHeight
https://bugs.webkit.org/show_bug.cgi?id=97475

Reviewed by Ojan Vafai.

Using RenderMeter::computeLogicalHeight is part of bug 96804.
Also fix some code to be vertical writing mode aware. This doesn't actually cause
a behavioral difference because we use percentage heights/widths which don't depend on
updateLogicalWidth or computeLogicalHeight.  You can still see bugs if you try to set
the min-width on a <meter> node in a vertical writing mode.

No new tests, no behavioral changes.

* rendering/RenderMeter.cpp:
(WebCore::RenderMeter::updateLogicalWidth): Make vertical writing mode aware.
(WebCore::RenderMeter::computeLogicalHeight): Switch from updateLogicalHeight and make vertical writing mode aware.
* rendering/RenderMeter.h:
(RenderMeter):


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@129409 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Rebaseline for r129389
https://bugs.webkit.org/show_bug.cgi?id=97473

Unreviewed.

Patch by Alec Flett <alecflett@chromium.org> on 2012-09-24

* platform/chromium-mac-snowleopard/fast/text/emphasis-expected.png:
* platform/chromium-mac-snowleopard/fast/writing-mode/text-orientation-basic-expected.png:
* platform/chromium-mac-snowleopard/fast/writing-mode/text-orientation-basic-expected.txt:
* platform/chromium-mac/fast/text/emphasis-expected.png:
* platform/chromium-mac/fast/writing-mode/text-orientation-basic-expected.png:
* platform/chromium-mac/fast/writing-mode/text-orientation-basic-expected.txt:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@129410 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[CSS Exclusions] ExclusionShape API should use logical coordinates for input/output
https://bugs.webkit.org/show_bug.cgi?id=96156

Patch by Hans Muller <hmuller@adobe.com> on 2012-09-24
Reviewed by Dirk Schulze.

Source/WebCore:

Correct how ExclusionShapes deal with logical coordinates and enable
shape-inside exclusion layout for vertical writing-modes.

BasicShape's are defined in physical cooordinates, incoming line and box
dimensions are logical coordinates, and the ExclusionShape internals assume
that lines are aligned with the Y axis. The createExclusionShape() method
is responsible for converting the BasicShape to the internal coordinate
system when the writing-mode is vertical. Similarly, the getInclude,ExcludedIntervals()
methods are responsible for converting their logical line parameters to Y
values in the internal coordinate system. The min,maxYForLogicalLine()
methods do the conversion, based on the WritingMode the ExclusionShape
was created with. The getInclude,ExcludedIntervals() methods return the
logical left and right edges of line segments. No transformation is needed for this.

The ExclusionShape's internal coordinate system is essentially the
"logical" one, except that top/bottom always map to Y, no matter what
the writing-mode is.  This is just to simplify writing geometrical shape
algorithms, notably the complex ones for polygons. The bug report includes a
pair of diagrams that clarify how internal coordinates are related to logical
and physical coordinates.

Test: fast/exclusions/shape-inside/shape-inside-vertical-text.html

* rendering/ExclusionRectangle.cpp:
(WebCore::ExclusionRectangle::getExcludedIntervals): rename more accurately reflects return value
(WebCore::ExclusionRectangle::getIncludedIntervals): rename for consistency with "excluded" version
* rendering/ExclusionRectangle.h:
* rendering/ExclusionShape.cpp:
(WebCore):
(WebCore::ExclusionShape::createExclusionShape):
* rendering/ExclusionShape.h:
(LineSegment):
(WebCore::LineSegment::LineSegment): relocated from WrapShapeInfo.h
(WebCore):
(ExclusionShape):
(WebCore::ExclusionShape::minYForLogicalLine):
(WebCore::ExclusionShape::maxYForLogicalLine):
(WebCore::ExclusionShape::internalToLogicalBoundingBox):
* rendering/WrapShapeInfo.cpp:
(WebCore::WrapShapeInfo::isWrapShapeInfoEnabledForRenderBlock):
(WebCore::WrapShapeInfo::computeShapeSize): pass writingMode to createExclusionShape()
(WebCore::WrapShapeInfo::computeSegmentsForLine): removed short-circuit for vertical writing-modes
* rendering/WrapShapeInfo.h:
(WebCore):

LayoutTests:

Verify that shape-inside respects the writing-mode, notably the vertical writing-modes.

* fast/exclusions/shape-inside/shape-inside-vertical-text-expected.html: Added.
* fast/exclusions/shape-inside/shape-inside-vertical-text.html: Added.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@129411 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Integrate most of GoogleURL in WTFURL
https://bugs.webkit.org/show_bug.cgi?id=97405

Reviewed by Adam Barth.

Source/WebCore: 

Loosen KURLWTFURL to be able to run most tests in Debug.

* platform/KURLWTFURL.cpp:
(WebCore::KURL::KURL):
(WebCore::KURL::hasPort):
(WebCore::KURL::user):
(WebCore::KURL::pass):
(WebCore::KURL::hasPath):
(WebCore::KURL::path):
(WebCore::KURL::query):
(WebCore::KURL::fragmentIdentifier):
(WebCore::KURL::fileSystemPath):

Source/WTF: 

This patch brings almost all of the implementatation of Google-URL in WTFURL
with only minor changes.

The changes from the original code are mostly:
-Code cleaning.
-Replace url_parse::Parsed by URLSegments.
-Replace url_parse::Component by URLComponent
-More code cleaning.
-Adopt URLBuffer and RawURLBuffer instead of the CanonOutputT and RawCanonOutputT.
-Use URLCharacterTypes instead of the litany of characters functions.
-Some more code cleaning.
-Fix the style to match WebKit as much as possible.
-Rename the files to match WebKit style.

* WTF.xcodeproj/project.pbxproj:
* wtf/url/api/ParsedURL.cpp:
(WTF::ParsedURL::ParsedURL):
(WTF::ParsedURL::segment):
* wtf/url/api/ParsedURL.h:
(WTF::ParsedURL::isValid):
* wtf/url/src/RawURLBuffer.h:
* wtf/url/src/URLCanon.h: Added.
(URLCanonicalizer):
(CharsetConverter):
(WTF::URLCanonicalizer::CharsetConverter::CharsetConverter):
(WTF::URLCanonicalizer::CharsetConverter::~CharsetConverter):
(CanonHostInfo):
(WTF::URLCanonicalizer::CanonHostInfo::CanonHostInfo):
(WTF::URLCanonicalizer::CanonHostInfo::IsIPAddress):
(WTF::URLCanonicalizer::CanonHostInfo::AddressLength):
(URLComponentSource):
(WTF::URLCanonicalizer::URLComponentSource::URLComponentSource):
(Replacements):
(WTF::URLCanonicalizer::Replacements::Replacements):
(WTF::URLCanonicalizer::Replacements::SetScheme):
(WTF::URLCanonicalizer::Replacements::IsSchemeOverridden):
(WTF::URLCanonicalizer::Replacements::SetUsername):
(WTF::URLCanonicalizer::Replacements::ClearUsername):
(WTF::URLCanonicalizer::Replacements::IsUsernameOverridden):
(WTF::URLCanonicalizer::Replacements::SetPassword):
(WTF::URLCanonicalizer::Replacements::ClearPassword):
(WTF::URLCanonicalizer::Replacements::IsPasswordOverridden):
(WTF::URLCanonicalizer::Replacements::SetHost):
(WTF::URLCanonicalizer::Replacements::ClearHost):
(WTF::URLCanonicalizer::Replacements::IsHostOverridden):
(WTF::URLCanonicalizer::Replacements::SetPort):
(WTF::URLCanonicalizer::Replacements::ClearPort):
(WTF::URLCanonicalizer::Replacements::IsPortOverridden):
(WTF::URLCanonicalizer::Replacements::SetPath):
(WTF::URLCanonicalizer::Replacements::ClearPath):
(WTF::URLCanonicalizer::Replacements::IsPathOverridden):
(WTF::URLCanonicalizer::Replacements::SetQuery):
(WTF::URLCanonicalizer::Replacements::ClearQuery):
(WTF::URLCanonicalizer::Replacements::IsQueryOverridden):
(WTF::URLCanonicalizer::Replacements::SetRef):
(WTF::URLCanonicalizer::Replacements::ClearRef):
(WTF::URLCanonicalizer::Replacements::IsRefOverridden):
(WTF::URLCanonicalizer::Replacements::sources):
(WTF::URLCanonicalizer::Replacements::components):
(WTF::URLCanonicalizer::Replacements::Placeholder):
* wtf/url/src/URLCanonEtc.cpp: Added.
(WTF::URLCanonicalizer::removeURLWhitespace):
(URLCanonicalizer):
(WTF::URLCanonicalizer::canonicalSchemeChar):
(WTF::URLCanonicalizer::CanonicalizeScheme):
(WTF::URLCanonicalizer::CanonicalizeUserInfo):
(WTF::URLCanonicalizer::CanonicalizePort):
(WTF::URLCanonicalizer::CanonicalizeRef):
* wtf/url/src/URLCanonFilesystemurl.cpp: Added.
(WTF::URLCanonicalizer::CanonicalizeFileSystemURL):
(URLCanonicalizer):
(WTF::URLCanonicalizer::ReplaceFileSystemURL):
* wtf/url/src/URLCanonFileurl.cpp: Added.
(WTF::URLCanonicalizer::CanonicalizeFileURL):
(URLCanonicalizer):
(WTF::URLCanonicalizer::FileCanonicalizePath):
(WTF::URLCanonicalizer::ReplaceFileURL):
* wtf/url/src/URLCanonHost.cpp: Added.
(WTF::URLCanonicalizer::CanonicalizeHost):
(URLCanonicalizer):
(WTF::URLCanonicalizer::CanonicalizeHostVerbose):
* wtf/url/src/URLCanonICU.cpp: Added.
(WTF::URLCanonicalizer::IDNToASCII):
(URLCanonicalizer):
(WTF::URLCanonicalizer::readUTFChar):
* wtf/url/src/URLCanonIP.cpp: Added.
(WTF::URLCanonicalizer::CanonicalizeIPAddress):
(URLCanonicalizer):
* wtf/url/src/URLCanonInternal.cpp: Added.
(URLCanonicalizer):
(WTF::URLCanonicalizer::AppendInvalidNarrowString):
(WTF::URLCanonicalizer::ConvertUTF16ToUTF8):
(WTF::URLCanonicalizer::ConvertUTF8ToUTF16):
(WTF::URLCanonicalizer::SetupOverrideComponents):
(WTF::URLCanonicalizer::SetupUTF16OverrideComponents):
(WTF::URLCanonicalizer::_itoa_s):
(WTF::URLCanonicalizer::_itow_s):
* wtf/url/src/URLCanonInternal.h: Added.
(URLCanonicalizer):
(WTF::URLCanonicalizer::hexCharToValue):
(WTF::URLCanonicalizer::isDot):
(WTF::URLCanonicalizer::appendURLEscapedCharacter):
(WTF::URLCanonicalizer::doAppendUTF8):
(WTF::URLCanonicalizer::AppendCharToOutput):
(WTF::URLCanonicalizer::AppendUTF8Value):
(WTF::URLCanonicalizer::AppendUTF8EscapedValue):
(WTF::URLCanonicalizer::AppendUTF16Value):
(WTF::URLCanonicalizer::AppendUTF8EscapedChar):
(WTF::URLCanonicalizer::Is8BitChar):
(WTF::URLCanonicalizer::DecodeEscaped):
(WTF::URLCanonicalizer::_itoa_s):
(WTF::URLCanonicalizer::_itow_s):
(WTF::URLCanonicalizer::_strtoui64):
* wtf/url/src/URLCanonMailto.cpp: Added.
(WTF::URLCanonicalizer::CanonicalizeMailtoURL):
(URLCanonicalizer):
(WTF::URLCanonicalizer::ReplaceMailtoURL):
* wtf/url/src/URLCanonPath.cpp: Added.
(WTF::URLCanonicalizer::CanonicalizePath):
(URLCanonicalizer):
(WTF::URLCanonicalizer::CanonicalizePartialPath):
* wtf/url/src/URLCanonPathurl.cpp: Added.
(WTF::URLCanonicalizer::canonicalizePathURL):
(URLCanonicalizer):
(WTF::URLCanonicalizer::ReplacePathURL):
* wtf/url/src/URLCanonQuery.cpp: Added.
(WTF::URLCanonicalizer::CanonicalizeQuery):
(URLCanonicalizer):
(WTF::URLCanonicalizer::ConvertUTF16ToQueryEncoding):
* wtf/url/src/URLCanonRelative.cpp: Added.
(WTF::URLCanonicalizer::isRelativeURL):
(URLCanonicalizer):
(WTF::URLCanonicalizer::resolveRelativeURL):
* wtf/url/src/URLCanonStdURL.cpp: Added.
(WTF::URLCanonicalizer::DefaultPortForScheme):
(URLCanonicalizer):
(WTF::URLCanonicalizer::CanonicalizeStandardURL):
(WTF::URLCanonicalizer::ReplaceStandardURL):
* wtf/url/src/URLCharacterTypes.cpp:
* wtf/url/src/URLCharacterTypes.h:
(WTF::URLCharacterTypes::isComponentChar):
(WTF::URLCharacterTypes::isHexChar):
(WTF::URLCharacterTypes::isIPv4Char):
(WTF::URLCharacterTypes::isQueryChar):
(WTF::URLCharacterTypes::isCharacterOfType):
(URLCharacterTypes):
* wtf/url/src/URLEscape.cpp: Removed.
* wtf/url/src/URLFile.h: Added.
(URLParser):
(WTF::URLParser::isWindowsDriveSeparator):
(WTF::URLParser::isWindowsDriveLetter):
(WTF::URLParser::findNextSlash):
(WTF::URLParser::doesBeginWindowsDriveSpec):
(WTF::URLParser::doesBeginUNCPath):
* wtf/url/src/URLParse.cpp: Added.
(WTF::URLParser::ExtractScheme):
(URLParser):
(WTF::URLParser::IsAuthorityTerminator):
(WTF::URLParser::ExtractFileName):
(WTF::URLParser::ExtractQueryKeyValue):
(WTF::URLParser::ParseAuthority):
(WTF::URLParser::ParsePort):
(WTF::URLParser::ParseStandardURL):
(WTF::URLParser::ParsePathURL):
(WTF::URLParser::ParseFileSystemURL):
(WTF::URLParser::ParseMailtoURL):
(WTF::URLParser::parsePathInternal):
(WTF::URLParser::ParseAfterScheme):
* wtf/url/src/URLParse.h: Added.
(URLParser):
* wtf/url/src/URLParseFile.cpp: Added.
(WTF):
(WTF::URLParser::ParseFileURL):
(URLParser):
* wtf/url/src/URLParseInternal.h: Added.
(URLParser):
(WTF::URLParser::isURLSlash):
(WTF::URLParser::shouldTrimFromURL):
(WTF::URLParser::trimURL):
(WTF::URLParser::countConsecutiveSlashes):
* wtf/url/src/URLParser.h: Removed.
* wtf/url/src/URLQueryCanonicalizer.h: Removed.
* wtf/url/src/URLSegments.cpp:
* wtf/url/src/URLSegments.h:
(WTF::URLSegments::URLSegments):
(URLSegments):
(WTF::URLSegments::operator=):
(WTF::URLSegments::innerURLSegments):
(WTF::URLSegments::setInnerURLSegments):
(WTF::URLSegments::clearInnerURLSegments):
* wtf/url/src/URLUtil.cpp: Added.
(URLUtilities):
(WTF::URLUtilities::IsStandard):
(WTF::URLUtilities::FindAndCompareScheme):
(WTF::URLUtilities::Canonicalize):
(WTF::URLUtilities::resolveRelative):
(WTF::URLUtilities::ReplaceComponents):
(WTF::URLUtilities::LowerCaseEqualsASCII):
(WTF::URLUtilities::DecodeURLEscapeSequences):
(WTF::URLUtilities::EncodeURIComponent):
(WTF::URLUtilities::CompareSchemeComponent):
* wtf/url/src/URLUtil.h: Added.
(URLUtilities):
* wtf/url/src/URLUtilInternal.h: Renamed from Source/WTF/wtf/url/src/URLEscape.h.
(URLUtilities):


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@129412 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Add support for query encoding to WTFURL
https://bugs.webkit.org/show_bug.cgi?id=97422

Reviewed by Adam Barth.

Source/WebCore: 

Add the Charset conversion on WebCore side.

* platform/KURLWTFURL.cpp:
(WebCore::KURL::KURL):
(CharsetConverter):
(WebCore::CharsetConverter::CharsetConverter):
* platform/mac/KURLMac.mm:
(WebCore::KURL::KURL):

Source/WTF: 

Expose character conversion through the new abstract class URLQueryCharsetConverter.
URLQueryCharsetConverter is implemented by WebCore to expose the TextEncoding classes.

Unfortunatelly that forces us to bring over URLBuffer in the public API. We may be able
to mitigate that later when moving WTFURL to more templates.

The change fixes 2 of the URL layout tests.

* WTF.xcodeproj/project.pbxproj:
* wtf/url/api/ParsedURL.cpp:
(WTF::ParsedURL::ParsedURL):
* wtf/url/api/ParsedURL.h:
(ParsedURL):
ParsedURL was using the same constructor for ParsedURLString, and URL without a base.
That was a mistake on my part, I did not intend that, fixed it now :)

* wtf/url/api/URLBuffer.h: Renamed from Source/WTF/wtf/url/src/URLBuffer.h.
(URLBuffer):
(WTF::URLBuffer::URLBuffer):
(WTF::URLBuffer::~URLBuffer):
(WTF::URLBuffer::at):
(WTF::URLBuffer::set):
(WTF::URLBuffer::capacity):
(WTF::URLBuffer::length):
(WTF::URLBuffer::data):
(WTF::URLBuffer::setLength):
(WTF::URLBuffer::append):
(WTF::URLBuffer::grow):
* wtf/url/api/URLQueryCharsetConverter.h: Added.
(URLQueryCharsetConverter):
(WTF::URLQueryCharsetConverter::URLQueryCharsetConverter):
(WTF::URLQueryCharsetConverter::~URLQueryCharsetConverter):
* wtf/url/src/URLCanon.h:
(URLCanonicalizer):
* wtf/url/src/URLCanonFilesystemurl.cpp:
(WTF::URLCanonicalizer::canonicalizeFileSystemURL):
(WTF::URLCanonicalizer::ReplaceFileSystemURL):
* wtf/url/src/URLCanonFileurl.cpp:
(WTF::URLCanonicalizer::CanonicalizeFileURL):
(WTF::URLCanonicalizer::ReplaceFileURL):
* wtf/url/src/URLCanonInternal.h:
(URLCanonicalizer):
* wtf/url/src/URLCanonQuery.cpp:
(WTF::URLCanonicalizer::CanonicalizeQuery):
(WTF::URLCanonicalizer::ConvertUTF16ToQueryEncoding):
* wtf/url/src/URLCanonRelative.cpp:
(WTF::URLCanonicalizer::resolveRelativeURL):
* wtf/url/src/URLCanonStdURL.cpp:
(WTF::URLCanonicalizer::CanonicalizeStandardURL):
(WTF::URLCanonicalizer::ReplaceStandardURL):
* wtf/url/src/URLUtil.cpp:
(URLUtilities):
(WTF::URLUtilities::canonicalize):
(WTF::URLUtilities::resolveRelative):
(WTF::URLUtilities::ReplaceComponents):
* wtf/url/src/URLUtil.h:
(URLUtilities):


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@129413 268f45cc-cd09-0410-ab3c-d52691b4dbfc
flex-grow should be 1 when omitted from flex shorthand
https://bugs.webkit.org/show_bug.cgi?id=97480

Reviewed by Ojan Vafai.

Source/WebCore:

We were using 0, based on an outdated version of the spec.

Tests: css3/flexbox/flex-property-parsing.html
       css3/flexbox/flex-algorithm.html: New test case.

* css/CSSParser.cpp:
(WebCore::CSSParser::parseFlex):

LayoutTests:

Update tests due to default CSS value changes.

* css3/flexbox/flex-algorithm-expected.txt:
* css3/flexbox/flex-algorithm.html: Add test case using -webkit-flex: auto.
* css3/flexbox/flex-property-parsing-expected.txt:
* css3/flexbox/flex-property-parsing.html:


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@129414 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Narrow Chromium TestExpectations for some hidpi failures to be Linux-only.
crbug.com/150682

Unreviewed, expectations change.

Also remove a no-longer-failing Mac expectation for
compositing/overflow/overflow-scaled-descendant-overlapping.html

* platform/chromium/TestExpectations:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@129417 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[REGRESSION] Layout Test webaudio/biquad-getFrequencyResponse.html is failing
https://bugs.webkit.org/show_bug.cgi?id=97439

Reviewed by Kenneth Russell.

Fixes uninitialized member variable.

This should fix flaky failing test: webaudio/biquad-getFrequencyResponse.html

* Modules/webaudio/BiquadProcessor.cpp:
(WebCore::BiquadProcessor::BiquadProcessor):


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@129418 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[BlackBerry] Reverting implementation for 407 error pages
https://bugs.webkit.org/show_bug.cgi?id=97455

Patch by Otto Derek Cheung <otcheung@rim.com> on 2012-09-24
Reviewed by Rob Buis.

Source/WebCore:

Revert "[BlackBerry] Reverting implementation for 407 error pages"
This reverts commit fda0a1b6ac40c06c03bb6293b4a7d7353c3ca238.

This revert also reverts commit 0cffe01961fb80204138505bcec29a83818efb73
due to dependency issues.

* PlatformBlackBerry.cmake:
* platform/blackberry/AuthenticationChallengeManager.cpp: Removed.
* platform/blackberry/AuthenticationChallengeManager.h:
* platform/blackberry/PageClientBlackBerry.h:
* platform/graphics/blackberry/MediaPlayerPrivateBlackBerry.cpp:
(WebCore::MediaPlayerPrivate::MediaPlayerPrivate):
(WebCore::MediaPlayerPrivate::~MediaPlayerPrivate):
(WebCore::MediaPlayerPrivate::onAuthenticationNeeded):
(WebCore::MediaPlayerPrivate::notifyChallengeResult):
* platform/graphics/blackberry/MediaPlayerPrivateBlackBerry.h:
(MediaPlayerPrivate):
* platform/network/blackberry/NetworkJob.cpp:
(WebCore::NetworkJob::NetworkJob):
(WebCore::NetworkJob::handleNotifyStatusReceived):
(WebCore::NetworkJob::notifyAuthReceived):
(WebCore::NetworkJob::handleNotifyClose):
(WebCore::NetworkJob::sendRequestWithCredentials):
(WebCore::NetworkJob::notifyChallengeResult):
* platform/network/blackberry/NetworkJob.h:
(NetworkJob):

Source/WebKit/blackberry:

Revert "[BlackBerry] Really fix bug 95488 that user can get the
authentication challenge dialog while the other tab has focus."
https://bugs.webkit.org/show_bug.cgi?id=97348

This reverts commit 0cffe01961fb80204138505bcec29a83818efb73.

* Api/BlackBerryGlobal.cpp:
(BlackBerry::WebKit::globalInitialize):
* Api/WebPage.cpp:
(BlackBerry::WebKit::WebPagePrivate::WebPagePrivate):
(BlackBerry::WebKit::WebPagePrivate::~WebPagePrivate):
(BlackBerry::WebKit::WebPagePrivate::authenticationChallenge):
(BlackBerry::WebKit::WebPage::setVisible):
* Api/WebPage_p.h:
(WebPagePrivate):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@129419 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Unreviewed. http/tests/security/sandboxed-iframe-form-top.html fails on Windows.
https://bugs.webkit.org/show_bug.cgi?id=97485

This test actually "passes" but is producing wrong output in whichever test proceeds it, thus causing that test to fail.

* platform/win/Skipped:


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@129421 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Split stylesheet related code out from Document 
https://bugs.webkit.org/show_bug.cgi?id=97353

Reviewed by Andreas Kling.

Document is big and unwieldy. The code related to tracking active stylesheets can be factored out.
        
The patch moves stylesheet upkeep, collection and invalidation code from Document to a separate
DocumentStyleSheetCollection class. There are no functional changes.
        
The usesLinkRules stylesheet feature bit and the related code is removed as no one was using it.

* WebCore.xcodeproj/project.pbxproj:
* css/SelectorChecker.cpp:
(WebCore::SelectorChecker::checkOneSelector):
* css/StyleResolver.cpp:
(WebCore::StyleResolver::StyleResolver):
(WebCore::StyleResolver::Features::Features):
(WebCore::StyleResolver::Features::add):
(WebCore::StyleResolver::Features::clear):
(WebCore::StyleResolver::collectMatchingRulesForList):
* css/StyleResolver.h:
(WebCore::StyleResolver::usesBeforeAfterRules):
(Features):
* dom/Document.cpp:
(WebCore::Document::Document):
(WebCore::Document::~Document):
(WebCore::Document::setCompatibilityMode):
(WebCore::Document::recalcStyle):
(WebCore):
(WebCore::Document::createStyleResolver):
(WebCore::Document::seamlessParentUpdatedStylesheets):
(WebCore::Document::didRemoveAllPendingStylesheet):
(WebCore::Document::processHttpEquiv):
(WebCore::Document::styleSheets):
(WebCore::Document::preferredStylesheetSet):
(WebCore::Document::selectedStylesheetSet):
(WebCore::Document::setSelectedStylesheetSet):
(WebCore::Document::styleResolverChanged):
(WebCore::Document::reportMemoryUsage):
(WebCore::Document::haveStylesheetsLoaded):
* dom/Document.h:
(WebCore):
(Document):
(WebCore::Document::styleSheetCollection):
(WebCore::Document::hasNodesWithPlaceholderStyle):
(WebCore::Document::setNeedsNotifyRemoveAllPendingStylesheet):
(WebCore::Document::inStyleRecalc):
* dom/DocumentStyleSheetCollection.cpp: Added.
(WebCore):
(WebCore::DocumentStyleSheetCollection::DocumentStyleSheetCollection):
(WebCore::DocumentStyleSheetCollection::~DocumentStyleSheetCollection):
(WebCore::DocumentStyleSheetCollection::pageUserSheet):
(WebCore::DocumentStyleSheetCollection::clearPageUserSheet):
(WebCore::DocumentStyleSheetCollection::updatePageUserSheet):
(WebCore::DocumentStyleSheetCollection::pageGroupUserSheets):
(WebCore::DocumentStyleSheetCollection::clearPageGroupUserSheets):
(WebCore::DocumentStyleSheetCollection::updatePageGroupUserSheets):
(WebCore::DocumentStyleSheetCollection::addUserSheet):
(WebCore::DocumentStyleSheetCollection::removePendingSheet):
(WebCore::DocumentStyleSheetCollection::addStyleSheetCandidateNode):
(WebCore::DocumentStyleSheetCollection::removeStyleSheetCandidateNode):
(WebCore::DocumentStyleSheetCollection::collectActiveStyleSheets):
(WebCore::DocumentStyleSheetCollection::testAddedStyleSheetRequiresStyleRecalc):
(WebCore::DocumentStyleSheetCollection::analyzeStyleSheetChange):
(WebCore::styleSheetsUseRemUnits):
(WebCore::DocumentStyleSheetCollection::updateActiveStyleSheets):
(WebCore::DocumentStyleSheetCollection::combineCSSFeatureFlags):
(WebCore::DocumentStyleSheetCollection::resetCSSFeatureFlags):
(WebCore::DocumentStyleSheetCollection::reportMemoryUsage):
* dom/DocumentStyleSheetCollection.h: Added.
(WebCore):
(DocumentStyleSheetCollection):
(WebCore::DocumentStyleSheetCollection::authorStyleSheets):
(WebCore::DocumentStyleSheetCollection::documentUserSheets):
(WebCore::DocumentStyleSheetCollection::needsUpdateActiveStylesheetsOnStyleRecalc):
(WebCore::DocumentStyleSheetCollection::preferredStylesheetSetName):
(WebCore::DocumentStyleSheetCollection::selectedStylesheetSetName):
(WebCore::DocumentStyleSheetCollection::setPreferredStylesheetSetName):
(WebCore::DocumentStyleSheetCollection::setSelectedStylesheetSetName):
(WebCore::DocumentStyleSheetCollection::addPendingSheet):
(WebCore::DocumentStyleSheetCollection::hasPendingSheets):
(WebCore::DocumentStyleSheetCollection::usesSiblingRules):
(WebCore::DocumentStyleSheetCollection::setUsesSiblingRulesOverride):
(WebCore::DocumentStyleSheetCollection::usesFirstLineRules):
(WebCore::DocumentStyleSheetCollection::usesFirstLetterRules):
(WebCore::DocumentStyleSheetCollection::setUsesFirstLetterRules):
(WebCore::DocumentStyleSheetCollection::usesBeforeAfterRules):
(WebCore::DocumentStyleSheetCollection::setUsesBeforeAfterRulesOverride):
(WebCore::DocumentStyleSheetCollection::usesRemUnits):
(WebCore::DocumentStyleSheetCollection::setUsesRemUnit):
* dom/Element.cpp:
(WebCore::Element::recalcStyle):
* dom/ProcessingInstruction.cpp:
(WebCore::ProcessingInstruction::~ProcessingInstruction):
(WebCore::ProcessingInstruction::checkStyleSheet):
(WebCore::ProcessingInstruction::sheetLoaded):
(WebCore::ProcessingInstruction::insertedInto):
(WebCore::ProcessingInstruction::removedFrom):
* dom/StyleElement.cpp:
(WebCore::StyleElement::insertedIntoDocument):
(WebCore::StyleElement::removedFromDocument):
(WebCore::StyleElement::clearDocumentData):
(WebCore::StyleElement::createSheet):
(WebCore::StyleElement::sheetLoaded):
(WebCore::StyleElement::startLoadingDynamicSheet):
* html/HTMLLinkElement.cpp:
(WebCore::HTMLLinkElement::~HTMLLinkElement):
(WebCore::HTMLLinkElement::insertedInto):
(WebCore::HTMLLinkElement::removedFrom):
(WebCore::HTMLLinkElement::addPendingSheet):
(WebCore::HTMLLinkElement::removePendingSheet):
* html/HTMLQuoteElement.cpp:
(WebCore::HTMLQuoteElement::insertedInto):
* html/HTMLViewSourceDocument.cpp:
(WebCore::HTMLViewSourceDocument::HTMLViewSourceDocument):
* mathml/MathMLMathElement.cpp:
(WebCore::MathMLMathElement::insertedInto):
* page/Page.cpp:
(WebCore::Page::userStyleSheetLocationChanged):
* page/PageGroup.cpp:
(WebCore::PageGroup::resetUserStyleCacheInAllFrames):
* rendering/RenderBR.cpp:
(WebCore::RenderBR::lineHeight):
* rendering/RenderBlock.cpp:
(WebCore::RenderBlock::styleDidChange):
(WebCore::RenderBlock::splitBlocks):
(WebCore::RenderBlock::addChildIgnoringAnonymousColumnBlocks):
(WebCore::RenderBlock::lineHeight):
(WebCore::RenderBlock::updateFirstLetter):
* rendering/RenderInline.cpp:
(WebCore::RenderInline::styleDidChange):
(WebCore::RenderInline::updateAlwaysCreateLineBoxes):
(WebCore::RenderInline::addChildIgnoringContinuation):
(WebCore::RenderInline::splitInlines):
(WebCore::RenderInline::lineHeight):
* rendering/RenderObject.cpp:
(WebCore::RenderObject::uncachedFirstLineStyle):
(WebCore::RenderObject::firstLineStyleSlowCase):
* rendering/RenderObject.h:
(WebCore::RenderObject::firstLineStyle):
* rendering/RenderObjectChildList.cpp:
(WebCore::RenderObjectChildList::updateBeforeAfterContent):
* rendering/RenderTableRow.cpp:
(WebCore::RenderTableRow::updateBeforeAndAfterContent):
* rendering/RootInlineBox.cpp:
(WebCore::RootInlineBox::verticalPositionForBox):



git-svn-id: http://svn.webkit.org/repository/webkit/trunk@129423 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[V8] ArrayBuffer code should not pass a negative length to SetIndexedPropertiesToExternalArrayData()
https://bugs.webkit.org/show_bug.cgi?id=96703

Reviewed by Adam Barth.

Check length arguments that may be passed to SetIndexedPropertiesToExternalArrayData.

No tests because it is not guaranteed that buffers this large can actually be allocated.

* bindings/v8/custom/V8ArrayBufferViewCustom.h:
(WebCore::wrapArrayBufferView):
(WebCore::constructWebGLArrayWithArrayBufferArgument):
(WebCore::constructWebGLArray):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@129424 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Unreviewed. Mark http/tests/security/inactive-document-with-empty-security-origin.html while Geoff Garen
investigates in https://bugs.webkit.org/show_bug.cgi?id=95530 in order to get the bots green.

* platform/win/Skipped:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@129425 268f45cc-cd09-0410-ab3c-d52691b4dbfc