WebKit-https.git
6 years ago[iOS WK2] Add extension read permission to network sandbox profile
joepeck@webkit.org [Fri, 1 Aug 2014 23:57:12 +0000 (23:57 +0000)]
[iOS WK2] Add extension read permission to network sandbox profile
<rdar://problem/17671574>

Reviewed by Alexey Proskuryakov and Oliver Hunt.

* Resources/SandboxProfiles/ios/com.apple.WebKit.Networking.sb:

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

6 years agoUnreviewed post-review test fixup
mmaxfield@apple.com [Fri, 1 Aug 2014 23:55:40 +0000 (23:55 +0000)]
Unreviewed post-review test fixup

* editing/pasteboard/img-srcset-copy-paste-canonicalization.html:

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

6 years agoClean up image subsampling code, make it less iOS-specific
simon.fraser@apple.com [Fri, 1 Aug 2014 23:22:44 +0000 (23:22 +0000)]
Clean up image subsampling code, make it less iOS-specific
https://bugs.webkit.org/show_bug.cgi?id=134916

Reviewed by Dean Jackson.

Compile the image subsampling code on both Mac and iOS, and make it more platform
neutral in general. Add a setting to allow it to be enabled on Mac for testing.

The most significant changes are in ImageSourceCG and BitmapImageCG. CG's ImageSource
is no longer stateful with respect to subsampling; its functions take a SubsamplingLevel
when appropriate. CG's BitmapImage now determines which level of subsampling to use
for a given frame, storing the subsampling level in the frame data. It can replace
an aggressively subsampled frame with a less subsampled frame if necessary.

To reduce the chances of subsampling affecting rendering, BitmapImage::size() now
always returns the non-subsampled size; subsampling is strictly internal to BitmapImage.
BitmapImage::draw() takes care of scaling the srcRect for subsampled images.

iOS had a code path that enabled caching of frame metadata in BitmapImage without
actually decoding the frame; make this cross-platform.

* WebCore.exp.in: Changed signature for GraphicsContext::drawNativeImage().
* WebCore.xcodeproj/project.pbxproj: Added ImageSource.cpp, which is not built
for Cocoa but useful for reference.
* loader/cache/CachedImage.cpp:
(WebCore::CachedImage::imageSizeForRenderer): Remove iOS-specific subsampling code.
(WebCore::CachedImage::createImage): Call setAllowSubsampling() on the image if we
can get to Settings (m_loader is null for image documents).
(WebCore::CachedImage::currentFrameKnownToBeOpaque): This forced decode always
caused creation of the non-subsampled image, so remove it. There's no reason to
eagerly decode the frame here.
* loader/cache/CachedImage.h: Fix comment.
* page/Settings.cpp: Add defaultImageSubsamplingEnabled, true for iOS and false for Mac.
* page/Settings.in: Added imageSubsamplingEnabled.
* platform/graphics/BitmapImage.cpp:
(WebCore::BitmapImage::BitmapImage): Init some more things. Default m_allowSubsampling to
true for iOS to catch images created in code paths where we can't get to Settings.
(WebCore::BitmapImage::haveFrameAtIndex): Handy helper.
(WebCore::BitmapImage::cacheFrame): Now takes the subsampling level and whether to cache
just metadata, or also the frame.
(WebCore::BitmapImage::didDecodeProperties): No need to store originalSize.
(WebCore::BitmapImage::updateSize): When we get the size for the first time, call
determineMinimumSubsamplingLevel() to choose a reasonable subsampling level which takes
platform-specific limits into account.
(WebCore::BitmapImage::dataChanged): Comment.
(WebCore::BitmapImage::ensureFrameIsCached): Take ImageFrameCaching into account.
(WebCore::BitmapImage::frameAtIndex): Choose a subsampling level given the scale,
then determine if we can use the currently cached frame, or whether we should resample.
(WebCore::BitmapImage::frameIsCompleteAtIndex): Caching m_isComplete is now done when caching
frame metadata.
(WebCore::BitmapImage::frameDurationAtIndex):
(WebCore::BitmapImage::frameHasAlphaAtIndex): The 'true' return is the safe return value.
(WebCore::BitmapImage::frameOrientationAtIndex): Caching m_orientation is now done when caching
frame metadata.
(WebCore::BitmapImage::cacheFrameInfo): Deleted.
(WebCore::BitmapImage::originalSize): Deleted.
(WebCore::BitmapImage::originalSizeRespectingOrientation): Deleted.
(WebCore::BitmapImage::currentFrameSize): Deleted.
(WebCore::BitmapImage::ensureFrameInfoIsCached): Deleted.
* platform/graphics/BitmapImage.h:
(WebCore::FrameData::FrameData):
* platform/graphics/GraphicsContext.h: No need to pass a scale param now.
* platform/graphics/ImageSource.cpp: Non-Cocoa changes.
(WebCore::ImageSource::subsamplingLevelForScale):
(WebCore::ImageSource::allowSubsamplingOfFrameAtIndex):
(WebCore::ImageSource::size):
(WebCore::ImageSource::frameSizeAtIndex):
(WebCore::ImageSource::createFrameAtIndex):
(WebCore::ImageSource::frameBytesAtIndex):
* platform/graphics/ImageSource.h: No longer stores subsampling state.
(WebCore::ImageSource::isSubsampled): Deleted.
* platform/graphics/cairo/BitmapImageCairo.cpp:
(WebCore::BitmapImage::determineMinimumSubsamplingLevel):
* platform/graphics/cg/BitmapImageCG.cpp:
(WebCore::FrameData::clear):
(WebCore::BitmapImage::BitmapImage): Init more members.
(WebCore::BitmapImage::determineMinimumSubsamplingLevel): Choose a minimum subsampling
level for the platform (subsample until the image area falls under a threshold).
(WebCore::BitmapImage::checkForSolidColor): Don't bother decoding frames if the image
is not 1x1. Also take care not to decode a non-subsampled image.
(WebCore::BitmapImage::draw): The actual bug fix is here; remove logic that
computed srcRectForCurrentFrame from m_size and m_originalSize; for some callers
srcRect was computed using the pre-subsampled size, and for others it was the subsampled size.
Instead, scale srcRect by mapping between the non-subsampled size, and the size of the CGImageRef
which is affected by subsampling.
(WebCore::BitmapImage::copyUnscaledFrameAtIndex):
* platform/graphics/cg/GraphicsContext3DCG.cpp:
(WebCore::GraphicsContext3D::ImageExtractor::extractImage): Remove #ifdeffed code.
(WebCore::GraphicsContext3D::paintToCanvas):
* platform/graphics/cg/GraphicsContextCG.cpp:
(WebCore::GraphicsContext::drawNativeImage): No more weird scaling!
* platform/graphics/cg/ImageBufferCG.cpp:
(WebCore::ImageBuffer::draw):
* platform/graphics/cg/ImageSourceCG.cpp:
(WebCore::ImageSource::ImageSource):
(WebCore::createImageSourceOptions): Helper that always returns a new CFDictionaryRef.
(WebCore::imageSourceOptions): If not subsampling, return the cached CFDictionaryRef, otherwise
make a new options dict and return it.
(WebCore::ImageSource::subsamplingLevelForScale): Helper that returns a subsampling level
between 0 and 3 given a scale.
(WebCore::ImageSource::isSizeAvailable): SkipMetadata is a default value for the param now.
(WebCore::ImageSource::allowSubsamplingOfFrameAtIndex): We turn off subsampling for progressive
JPEGs because of a bug, so need this to know if a frame should be subsampled.
(WebCore::ImageSource::frameSizeAtIndex): The looping to find a subsampling level is now in BitmapImageCG.
(WebCore::ImageSource::orientationAtIndex):
(WebCore::ImageSource::size): Always use a subsampling level of 0 for size().
(WebCore::ImageSource::getHotSpot):
(WebCore::ImageSource::repetitionCount):
(WebCore::ImageSource::createFrameAtIndex): The caller mapped a scale to a level.
(WebCore::ImageSource::frameDurationAtIndex):
(WebCore::ImageSource::frameBytesAtIndex):
(WebCore::ImageSource::imageSourceOptions): Deleted.
(WebCore::ImageSource::originalSize): Deleted.
* platform/graphics/mac/ImageMac.mm:
(WebCore::BitmapImage::invalidatePlatformData): 0 -> nullptr
* platform/graphics/wince/ImageWinCE.cpp:
(WebCore::BitmapImage::determineMinimumSubsamplingLevel):

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

6 years agoMany DOM objects have InterceptsGetOwnPropertySlotByIndexEvenWhenLengthIsNotZero...
akling@apple.com [Fri, 1 Aug 2014 23:20:45 +0000 (23:20 +0000)]
Many DOM objects have InterceptsGetOwnPropertySlotByIndexEvenWhenLengthIsNotZero for no reason.
<https://webkit.org/b/135519>

Don't set this structure flag unless the object actually has an override
for getOwnPropertySlotByIndex().

Reviewed by Geoffrey Garen.

* bindings/scripts/CodeGeneratorJS.pm:
(GenerateHeader):
* bindings/scripts/test/JS/JSTestActiveDOMObject.h:
* bindings/scripts/test/JS/JSTestException.h:
* bindings/scripts/test/JS/JSTestInterface.h:
* bindings/scripts/test/JS/JSTestObj.h:
* bindings/scripts/test/JS/JSTestTypedefs.h:

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

6 years agoSVG Font kerning can take an early out if the font has no kerning information
mmaxfield@apple.com [Fri, 1 Aug 2014 23:14:30 +0000 (23:14 +0000)]
SVG Font kerning can take an early out if the font has no kerning information
https://bugs.webkit.org/show_bug.cgi?id=135524

Reviewed by Dean Jackson.

Rather than calling SVGFontElement::horizontalKerningForPairOfStringsAndGlyphs() again
and again, skip the iteration entirely if every call would return 0.

No new tests because there is no behavior change.

* rendering/svg/SVGTextRunRenderingContext.cpp:
(WebCore::SVGTextRunRenderingContext::applySVGKerning):
* svg/SVGFontElement.h:

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

6 years agocommit-log-editor uses a non-standard message format when git index contains no Chang...
mitz@apple.com [Fri, 1 Aug 2014 23:10:50 +0000 (23:10 +0000)]
commit-log-editor uses a non-standard message format when git index contains no ChangeLog changes
https://bugs.webkit.org/show_bug.cgi?id=135527

Reviewed by Tim Horton.

* Scripts/commit-log-editor:
In the case of a git repository when there are no changed ChangeLog files, changed to pass
the --delimiters option to prepare-ChangeLog, then process each entry in the output using
commitMessageFromChangeLogEntry.
(commitMessageFromChangeLogEntry): Factored out from createCommitMessage.
(sortKey): Factored out from createCommitMessage.
(createCommitMessage): Changed to use new sortKey and commitMessageFromChangeLogEntry
subroutines.

* Scripts/prepare-ChangeLog:
(main): Parse new --delimiters option.
(generateNewChangeLogs): When --no-write and --delimiters are both specified, always print
the label before each change log entry, and a "~" delimiter on a new line after each entry.

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

6 years agoAdd some structure related assertions.
mark.lam@apple.com [Fri, 1 Aug 2014 22:49:51 +0000 (22:49 +0000)]
Add some structure related assertions.
<https://webkit.org/b/135523>

Reviewed by Geoffrey Garen.

Adding 2 assertions:
1. assert that we don't index pass the end of the StructureIDTable.
   This should never happen, but this assertion will help catch bugs
   where a bad structureID gets passed in.
2. assert that cells in MarkedBlock::callDestructor() that are not
   zapped should have a non-null StructureID.  This will help us catch
   bugs where the other cell header flag bits get set after the cell is
   zapped, thereby making the cell look like an unzapped cell but has a
   null structureID.

* heap/MarkedBlock.cpp:
(JSC::MarkedBlock::callDestructor):
* runtime/StructureIDTable.h:
(JSC::StructureIDTable::get):

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

6 years agoInspector highlights clipped at the bottom on the page in WK1 views with
bdakin@apple.com [Fri, 1 Aug 2014 22:47:57 +0000 (22:47 +0000)]
Inspector highlights clipped at the bottom on the page in WK1 views with
contentInsets
https://bugs.webkit.org/show_bug.cgi?id=135480
-and corresponding-
<rdar://problem/17850323>

Forgot to commit this one very critical part with
http://trac.webkit.org/changeset/171951

* platform/ScrollView.cpp:
(WebCore::ScrollView::unscaledVisibleContentSizeIncludingObscuredArea):

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

6 years agoInspector highlights clipped at the bottom on the page in WK1 views with
bdakin@apple.com [Fri, 1 Aug 2014 22:39:52 +0000 (22:39 +0000)]
Inspector highlights clipped at the bottom on the page in WK1 views with
contentInsets
https://bugs.webkit.org/show_bug.cgi?id=135480
-and corresponding-
<rdar://problem/17850323>

Reviewed by Simon Fraser.

unscaledTotalVisibleContentSize() was the main function on Mac that was expected
to return the rect representing ALL visible content, including content that might
be in an inset area and obscured by UI elements. This patch re-names that function
to unscaledVisibleContentSizeIncludingObscuredArea(), and that patch makes that
function return the right thing in the platformWidget() case.

Re-name.
* inspector/InspectorOverlay.cpp:
(WebCore::InspectorOverlay::update):

Return platformVisibleContentSizeIncludingObscuredArea() for the platformWidget()
case and re-name.
* platform/ScrollView.cpp:
(WebCore::ScrollView::unscaledVisibleContentSizeIncludingObscuredArea):

This was just wrong. It was returning the big rectangle instead of the small one
for platformWidget().
(WebCore::ScrollView::unscaledUnobscuredVisibleContentSize):

New platform functions.
(WebCore::ScrollView::platformVisibleContentRectIncludingObscuredArea):
(WebCore::ScrollView::platformVisibleContentSizeIncludingObscuredArea):
(WebCore::ScrollView::unscaledTotalVisibleContentSize): Deleted.
* platform/ScrollView.h:
* platform/ios/ScrollViewIOS.mm:
(WebCore::ScrollView::platformVisibleContentRectIncludingObscuredArea):
(WebCore::ScrollView::platformVisibleContentSizeIncludingObscuredArea):
* platform/mac/ScrollViewMac.mm:
(WebCore::ScrollView::platformVisibleContentRect):
(WebCore::ScrollView::platformVisibleContentSize):
(WebCore::ScrollView::platformVisibleContentRectIncludingObscuredArea):
(WebCore::ScrollView::platformVisibleContentSizeIncludingObscuredArea):

Re-name.
* rendering/RenderLayerCompositor.cpp:
(WebCore::RenderLayerCompositor::flushPendingLayerChanges):
(WebCore::RenderLayerCompositor::frameViewDidChangeSize):
(WebCore::RenderLayerCompositor::updateRootLayerPosition):
(WebCore::RenderLayerCompositor::ensureRootLayer):

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

6 years agoSVGGlyph wastes space due to padding
mmaxfield@apple.com [Fri, 1 Aug 2014 22:33:50 +0000 (22:33 +0000)]
SVGGlyph wastes space due to padding
https://bugs.webkit.org/show_bug.cgi?id=135520

Reviewed by Dean Jackson.

Rearrange members in SVGGlyph so there is no wasted padding space.

No new tests because there is no behavior change.

* platform/graphics/SVGGlyph.h:
(WebCore::SVGGlyph::SVGGlyph):

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

6 years agoURTBF after r171946 to fix non-Apple builds.
ossy@webkit.org [Fri, 1 Aug 2014 20:58:19 +0000 (20:58 +0000)]
URTBF after r171946 to fix non-Apple builds.

* bytecode/InlineCallFrameSet.cpp:

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

6 years agoREGRESSION (r171891): platform/mac/fast/scrolling/scroll-select-bottom-test.html
bdakin@apple.com [Fri, 1 Aug 2014 20:46:28 +0000 (20:46 +0000)]
REGRESSION (r171891): platform/mac/fast/scrolling/scroll-select-bottom-test.html
failing
https://bugs.webkit.org/show_bug.cgi?id=135485

Now that WK1 really tests contentInset, this test no longer works on platforms
that do not support the real contentInset
* platform/mac-wk1/TestExpectations:
* platform/mac/TestExpectations:

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

6 years ago[Feature Queries] Enable Feature Queries on EFL/GTK
betravis@adobe.com [Fri, 1 Aug 2014 20:43:56 +0000 (20:43 +0000)]
[Feature Queries] Enable Feature Queries on EFL/GTK
https://bugs.webkit.org/show_bug.cgi?id=134902

Reviewed by Benjamin Poulain.

.:
Enable CSS Feature Queries by default on the EFL and GTK
platforms.

* Source/cmake/OptionsEfl.cmake:
* Source/cmake/OptionsGTK.cmake:

Tools:
Turn the feature on by default for the build script.

* Scripts/webkitperl/FeatureList.pm:

LayoutTests:
Resume running the CSS Feature Query tests on the EFL and GTK platforms.

* platform/efl/TestExpectations:
* platform/gtk/TestExpectations:

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

6 years agoCodeBlock fails to visit the Executables of its InlineCallFrames
ggaren@apple.com [Fri, 1 Aug 2014 20:17:25 +0000 (20:17 +0000)]
CodeBlock fails to visit the Executables of its InlineCallFrames
https://bugs.webkit.org/show_bug.cgi?id=135471

Patch by Mark Hahnenberg <mhahnenberg@apple.com> on 2014-08-01
Reviewed by Geoffrey Garen.

CodeBlock needs to visit its InlineCallFrames' owner Executables. If it doesn't, they
can be prematurely collected and cause crashes.

* bytecode/CodeBlock.cpp:
(JSC::CodeBlock::stronglyVisitStrongReferences):
* bytecode/CodeOrigin.h:
(JSC::InlineCallFrame::visitAggregate):
* bytecode/InlineCallFrameSet.cpp:
(JSC::InlineCallFrameSet::visitAggregate):
* bytecode/InlineCallFrameSet.h:

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

6 years agoBuild fix for 32-bit after r171926.
timothy_horton@apple.com [Fri, 1 Aug 2014 20:01:15 +0000 (20:01 +0000)]
Build fix for 32-bit after r171926.

* MiniBrowser/mac/SettingsController.h:
* MiniBrowser/mac/SettingsController.m:

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

6 years ago[Media iOS] Ensure there is a nice default fallback for missing wireless target names
dino@apple.com [Fri, 1 Aug 2014 19:42:06 +0000 (19:42 +0000)]
[Media iOS] Ensure there is a nice default fallback for missing wireless target names
https://bugs.webkit.org/show_bug.cgi?id=135488
<rdar://problem/17879156>

Reviewed by Eric Carlson.

We occasionally run into cases where this.host.externalDeviceDisplayName
is empty or null, creating a pretty ugly/confusing string in the
wireless playback status screen.

If this happens, we should default to using "Apple TV".

* Modules/mediacontrols/mediaControlsiOS.js:
(ControllerIOS.prototype.updateWirelessPlaybackStatus): Check if the externalDeviceDisplayName
is empty or null, and fall back to "Apple TV" if so.

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

6 years agoVarious frameworks may want to use the container temp directory, so our current restr...
oliver@apple.com [Fri, 1 Aug 2014 19:19:22 +0000 (19:19 +0000)]
Various frameworks may want to use the container temp directory, so our current restrictions are too tight
https://bugs.webkit.org/show_bug.cgi?id=135518
<rdar://17869279>

Reviewed by Anders Carlsson.

We don't (and can't) have complete knowledge of what different frameworks
will want to use the container temporary directory for, and so our
current attempt to heavily restrict access is simply too tight.

This patch recognises this by simply giving read-write access to the
entire NSTemporary() directory (e.g. $container/tmp in the general case),
rather than the single sub directory we wishfully thought that we would
be able to get away with.

* Shared/WebProcessCreationParameters.cpp:
(WebKit::WebProcessCreationParameters::encode):
(WebKit::WebProcessCreationParameters::decode):
* Shared/WebProcessCreationParameters.h:
* UIProcess/WebContext.cpp:
(WebKit::WebContext::createNewWebProcess):
(WebKit::WebContext::mediaCacheDirectory): Deleted.
* UIProcess/WebContext.h:
* UIProcess/efl/WebContextEfl.cpp:
(WebKit::WebContext::containerTemporaryDirectory):
(WebKit::WebContext::platformMediaCacheDirectory): Deleted.
* UIProcess/gtk/WebContextGtk.cpp:
(WebKit::WebContext::containerTemporaryDirectory):
(WebKit::WebContext::platformMediaCacheDirectory): Deleted.
* UIProcess/mac/WebContextMac.mm:
(WebKit::WebContext::containerTemporaryDirectory):
(WebKit::WebContext::platformMediaCacheDirectory): Deleted.
* WebProcess/cocoa/WebProcessCocoa.mm:
(WebKit::WebProcess::platformInitializeWebProcess):

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

6 years agoProgress towards cmake on Windows.
achristensen@apple.com [Fri, 1 Aug 2014 19:19:14 +0000 (19:19 +0000)]
Progress towards cmake on Windows.
https://bugs.webkit.org/show_bug.cgi?id=135484

Reviewed by Martin Robinson.

.:
* CMakeLists.txt:
Added Mac to list of ports, even though it is not done yet.
Changed minimum bison version to version installed on Macs.
* Source/cmake/OptionsAppleWin.cmake:
Added some definitions.
* Source/cmake/OptionsEfl.cmake:
* Source/cmake/OptionsGTK.cmake:
Set WTF_LIBRARY_TYPE to STATIC to not change WTF linking on EFL or GTK ports.
* Source/cmake/OptionsMac.cmake: Added blank for now.
* Source/cmake/OptionsWinCairo.cmake:
* Source/cmake/OptionsWindows.cmake:
Added some definitions.
Removed /WX (warnings treated as error while compiling).
Copied warnings to ignore from WebKitLibraries/win/tools/vsprops/common.props.

Source/JavaScriptCore:
* CMakeLists.txt:
Generate code directly to inspector directory to avoid using the cp command
which is not available on Windows.
* PlatformWin.cmake: Added.

Source/WTF:
* wtf/CMakeLists.txt:
Added WTF_LIBRARY_TYPE because Windows needs WTF to be a shared library.

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

6 years agoURLs in srcset attributes are not made absolute upon copy and paste
mmaxfield@apple.com [Fri, 1 Aug 2014 19:08:59 +0000 (19:08 +0000)]
URLs in srcset attributes are not made absolute upon copy and paste
https://bugs.webkit.org/show_bug.cgi?id=135448

Reviewed by Ryosuke Niwa.

Source/WebCore:
When pasting, canonicalize URLs in srcset the same way we do with src.

Test: editing/pasteboard/img-srcset-copy-paste-canonicalization.html

* dom/Element.cpp:
(WebCore::Element::completeURLsInAttributeValue): Initial implemention, moved from markup.cpp.
* dom/Element.h:
(WebCore::Element::attributeContainsURL): New function for completeURLs to call.
(WebCore::Element::completeURLsInAttributeValue): Only called if attributeContainsURL returns
true. Default implementation simply calls isURLAttribute().
* editing/markup.cpp:
(WebCore::completeURLs): Call attributeContainsURL() and completeURLsInAttributeValue() to
complete the URL, so nodes can perform their own behavior.
* html/HTMLImageElement.cpp:
(WebCore::HTMLImageElement::attributeContainsURL): Return true for srcset.
(WebCore::HTMLImageElement::completeUrlAttributeValue): Use our existing srcset parser to
parse the srcset attribute, then use its output to canonicalize URLs, and build it back up
into a string.
* html/HTMLImageElement.h:
(WebCore::HTMLImageElement::attributeContainsURL):
(WebCore::HTMLImageElement::completeUrlAttributeValue):
* html/parser/HTMLSrcsetParser.cpp: Make parseImageCandidatesFromSrcsetAttribute() public
and change its signature to return its result.
(WebCore::parseImageCandidatesFromSrcsetAttribute):
* html/parser/HTMLSrcsetParser.h: Ditto.

LayoutTests:
Copy and paste a srcset image with relative URLs, and make sure that the
pasted srcset attribute doesn't match what it was before. I can't actually
dump the new srcset because it will include a full path of the file on the
user's system, and would therefore be machine-specific.

* editing/pasteboard/img-srcset-copy-paste-canonicalization-expected.txt:
* editing/pasteboard/img-srcset-copy-paste-canonicalization.html: Paste and check.
* editing/pasteboard/resources/img-srcset-copy-paste-canonicalization-iframe.html:
This has to be an iframe because we don't perform any url canonicalization if we
are copying and pasting from a document into itself.

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

6 years agoWeb Inspector: Timeline header height doesn't match style updates.
jonowells@apple.com [Fri, 1 Aug 2014 19:06:55 +0000 (19:06 +0000)]
Web Inspector: Timeline header height doesn't match style updates.
https://bugs.webkit.org/show_bug.cgi?id=135516

Reviewed by Timothy Hatcher.

Update the timeline header height to match the updates
to the navigation bars in other panels made in
https://bugs.webkit.org/show_bug.cgi?id=135445. Also
update the shadows on some of the search bars.

* UserInterface/Views/FilterBar.css:
(.filter-bar > input[type="search"]):
(body.mac-platform.legacy .filter-bar > input[type="search"]):
* UserInterface/Views/FindBanner.css:
(.find-banner > input[type="search"]):
(body.mac-platform.legacy .find-banner > input[type="search"]):
* UserInterface/Views/LogContentView.css:
(.search-bar.log-search-bar > input[type="search"]):
(body.mac-platform.legacy .search-bar.log-search-bar > input[type="search"]):
Remove inset shadows on search bars.

* UserInterface/Views/TimelineSidebarPanel.css:
(.sidebar > .panel.navigation.timeline > .status-bar):
(body.mac-platform.legacy .sidebar > .panel.navigation.timeline > .status-bar):
(.sidebar > .panel.navigation.timeline > .status-bar > .record-glyph):
(body.mac-platform.legacy .sidebar > .panel.navigation.timeline > .status-bar > .record-glyph):
(.sidebar > .panel.navigation.timeline > .status-bar > .record-status):
(body.mac-platform.legacy .sidebar > .panel.navigation.timeline > .status-bar > .record-status):
(.sidebar > .panel.navigation.timeline > .title-bar.timelines):
(body.mac-platform.legacy .sidebar > .panel.navigation.timeline > .title-bar.timelines):
(.sidebar > .panel.navigation.timeline > .title-bar.timeline-events):
(body.mac-platform.legacy .sidebar > .panel.navigation.timeline > .title-bar.timeline-events):
(.sidebar > .panel.navigation.timeline > .timelines-content):
(body.mac-platform.legacy .sidebar > .panel.navigation.timeline > .timelines-content):
(.sidebar > .panel.navigation.timeline > .empty-content-placeholder):
(body.mac-platform.legacy .sidebar > .panel.navigation.timeline > .empty-content-placeholder):
Update the height of the timeline status bar.

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

6 years agoRemove the JSC::OverridesVisitChildren flag.
akling@apple.com [Fri, 1 Aug 2014 18:57:39 +0000 (18:57 +0000)]
Remove the JSC::OverridesVisitChildren flag.
<https://webkit.org/b/135489>

Source/JavaScriptCore:
Except for 3 special classes, the visitChildren() call is always
dispatched through the method table (see SlotVisitor.cpp.)

The OverridesVisitChildren flag doesn't actually do anything.
It could be used to implement a non-virtual direct call to
JSCell::visitChildren, bypassing the method table for some objects,
but such a micro-optimization seems like a weak trade for all this
code complexity. Instead, just remove the flag.

This change frees up an inline flag bit in JSCell.

Reviewed by Geoffrey Garen.

* API/JSAPIWrapperObject.h:
* API/JSAPIWrapperObject.mm:
(JSC::JSAPIWrapperObject::visitChildren):
* API/JSCallbackObject.h:
(JSC::JSCallbackObject::visitChildren):
* bytecode/UnlinkedCodeBlock.cpp:
(JSC::UnlinkedFunctionExecutable::visitChildren):
(JSC::UnlinkedCodeBlock::visitChildren):
(JSC::UnlinkedProgramCodeBlock::visitChildren):
* bytecode/UnlinkedCodeBlock.h:
* debugger/DebuggerScope.cpp:
(JSC::DebuggerScope::visitChildren):
* debugger/DebuggerScope.h:
* jsc.cpp:
* runtime/Arguments.cpp:
(JSC::Arguments::visitChildren):
* runtime/Arguments.h:
* runtime/Executable.cpp:
(JSC::EvalExecutable::visitChildren):
(JSC::ProgramExecutable::visitChildren):
(JSC::FunctionExecutable::visitChildren):
* runtime/Executable.h:
* runtime/GetterSetter.cpp:
(JSC::GetterSetter::visitChildren):
* runtime/GetterSetter.h:
(JSC::GetterSetter::createStructure):
* runtime/JSAPIValueWrapper.h:
(JSC::JSAPIValueWrapper::createStructure):
* runtime/JSActivation.cpp:
(JSC::JSActivation::visitChildren):
* runtime/JSActivation.h:
* runtime/JSArrayIterator.cpp:
(JSC::JSArrayIterator::visitChildren):
* runtime/JSArrayIterator.h:
* runtime/JSBoundFunction.cpp:
(JSC::JSBoundFunction::visitChildren):
* runtime/JSBoundFunction.h:
* runtime/JSCellInlines.h:
(JSC::JSCell::setStructure):
* runtime/JSFunction.cpp:
(JSC::JSFunction::visitChildren):
* runtime/JSFunction.h:
* runtime/JSGlobalObject.cpp:
(JSC::JSGlobalObject::visitChildren):
* runtime/JSGlobalObject.h:
* runtime/JSMap.h:
* runtime/JSMapIterator.cpp:
(JSC::JSMapIterator::visitChildren):
* runtime/JSMapIterator.h:
* runtime/JSNameScope.cpp:
(JSC::JSNameScope::visitChildren):
* runtime/JSNameScope.h:
* runtime/JSPromise.cpp:
(JSC::JSPromise::visitChildren):
* runtime/JSPromise.h:
* runtime/JSPromiseDeferred.cpp:
(JSC::JSPromiseDeferred::visitChildren):
* runtime/JSPromiseDeferred.h:
* runtime/JSPromiseReaction.cpp:
(JSC::JSPromiseReaction::visitChildren):
* runtime/JSPromiseReaction.h:
* runtime/JSPropertyNameIterator.cpp:
(JSC::JSPropertyNameIterator::visitChildren):
* runtime/JSPropertyNameIterator.h:
* runtime/JSProxy.cpp:
(JSC::JSProxy::visitChildren):
* runtime/JSProxy.h:
* runtime/JSScope.cpp:
(JSC::JSScope::visitChildren):
* runtime/JSScope.h:
* runtime/JSSegmentedVariableObject.cpp:
(JSC::JSSegmentedVariableObject::visitChildren):
* runtime/JSSegmentedVariableObject.h:
* runtime/JSSet.h:
* runtime/JSSetIterator.cpp:
(JSC::JSSetIterator::visitChildren):
* runtime/JSSetIterator.h:
* runtime/JSSymbolTableObject.cpp:
(JSC::JSSymbolTableObject::visitChildren):
* runtime/JSSymbolTableObject.h:
* runtime/JSTypeInfo.h:
(JSC::TypeInfo::overridesVisitChildren): Deleted.
* runtime/JSWeakMap.h:
* runtime/JSWithScope.cpp:
(JSC::JSWithScope::visitChildren):
* runtime/JSWithScope.h:
* runtime/JSWrapperObject.cpp:
(JSC::JSWrapperObject::visitChildren):
* runtime/JSWrapperObject.h:
* runtime/MapData.h:
* runtime/NativeErrorConstructor.cpp:
(JSC::NativeErrorConstructor::visitChildren):
* runtime/NativeErrorConstructor.h:
* runtime/PropertyMapHashTable.h:
* runtime/PropertyTable.cpp:
(JSC::PropertyTable::visitChildren):
* runtime/RegExpConstructor.cpp:
(JSC::RegExpConstructor::visitChildren):
* runtime/RegExpConstructor.h:
* runtime/RegExpMatchesArray.cpp:
(JSC::RegExpMatchesArray::visitChildren):
* runtime/RegExpMatchesArray.h:
* runtime/RegExpObject.cpp:
(JSC::RegExpObject::visitChildren):
* runtime/RegExpObject.h:
* runtime/SparseArrayValueMap.h:
* runtime/Structure.cpp:
(JSC::Structure::Structure):
(JSC::Structure::visitChildren):
* runtime/StructureChain.cpp:
(JSC::StructureChain::visitChildren):
* runtime/StructureChain.h:
* runtime/StructureRareData.cpp:
(JSC::StructureRareData::visitChildren):
* runtime/StructureRareData.h:
* runtime/WeakMapData.h:

Source/WebCore:
Tweak the bindings code generator to stop spitting out the flag.

Reviewed by Geoffrey Garen.

* bindings/js/JSDOMBinding.h:
* bindings/js/JSDOMGlobalObject.cpp:
(WebCore::JSDOMGlobalObject::visitChildren):
* bindings/scripts/CodeGeneratorJS.pm:
(GenerateHeader):
(GenerateImplementation):

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

6 years ago[MSE][Mac] Volume is not remembered between items in a YouTube playlist
jer.noble@apple.com [Fri, 1 Aug 2014 18:53:38 +0000 (18:53 +0000)]
[MSE][Mac] Volume is not remembered between items in a YouTube playlist
https://bugs.webkit.org/show_bug.cgi?id=135479

Reviewed by Eric Carlson.

When an AVSampleBufferAudioRenderer is added to the player, set its -volume and -muted
properties with the current values from the HTMLMediaElement.

* platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaSourceAVFObjC.mm:
(WebCore::MediaPlayerPrivateMediaSourceAVFObjC::addAudioRenderer):

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

6 years agoConfusing build fix after r171926.
timothy_horton@apple.com [Fri, 1 Aug 2014 18:44:46 +0000 (18:44 +0000)]
Confusing build fix after r171926.

* MiniBrowser/mac/AppDelegate.h:
* MiniBrowser/mac/AppDelegate.m:
* MiniBrowser/mac/SettingsController.m:

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

6 years agoFix the iOS build after r171891
timothy_horton@apple.com [Fri, 1 Aug 2014 18:30:34 +0000 (18:30 +0000)]
Fix the iOS build after r171891

* platform/ios/ScrollViewIOS.mm:
(WebCore::ScrollView::platformTopContentInset):
(WebCore::ScrollView::platformSetTopContentInset):

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

6 years agoRemove EventNames.h include from header files
psolanki@apple.com [Fri, 1 Aug 2014 18:29:28 +0000 (18:29 +0000)]
Remove EventNames.h include from header files
https://bugs.webkit.org/show_bug.cgi?id=135486

Reviewed by Alexey Proskuryakov.

No new tests because no functional changes.

* Modules/airplay/WebKitPlaybackTargetAvailabilityEvent.h:
* Modules/gamepad/GamepadEvent.h:
* Modules/indexeddb/IDBRequest.h:
* Modules/indexeddb/IDBTransaction.h:
* Modules/mediastream/RTCStatsResponse.h:
* Modules/websockets/WebSocket.h:
* css/FontLoader.h:
* dom/SecurityPolicyViolationEvent.h:
* loader/appcache/DOMApplicationCache.h:
* workers/AbstractWorker.h:
* workers/Worker.h:
* workers/WorkerGlobalScope.h:
* xml/XMLHttpRequest.h:
* xml/XMLHttpRequestProgressEvent.h:

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

6 years ago<rdar://problem/17862013> REGRESSION (r169357): Disabling "allow plug-ins" doesn...
mitz@apple.com [Fri, 1 Aug 2014 18:22:38 +0000 (18:22 +0000)]
<rdar://problem/17862013> REGRESSION (r169357): Disabling "allow plug-ins" doesn't stick on quit/relaunch
https://bugs.webkit.org/show_bug.cgi?id=135511

Reviewed by Alexey Proskuryakov.

Since the values map in the preferences store doesn’t include values that are equal to the
defaults, we need to update it when a new default is registered.

* UIProcess/WebPreferences.cpp:
(WebKit::WebPreferences::createWithLegacyDefaults): Changed to use new member functions
for registering defaults.
(WebKit::WebPreferences::registerDefaultBoolValueForKey): Added. Sets an override default
in the store, and sets the user default, if there is one, on top of it.
(WebKit::WebPreferences::registerDefaultUInt32ValueForKey): Ditto.
* UIProcess/WebPreferences.h: Declared new member functions for getting the user default
value for a key.

* UIProcess/efl/WebPreferencesEfl.cpp:
(WebKit::WebPreferences::platformGetStringUserValueForKey): Added an implementation that
returns false, because the EFL port doesn’t support persistent user defaults.
(WebKit::WebPreferences::platformGetBoolUserValueForKey): Ditto.
(WebKit::WebPreferences::platformGetUInt32UserValueForKey): Ditto.
(WebKit::WebPreferences::platformGetDoubleUserValueForKey): Ditto.

* UIProcess/gtk/WebPreferencesGtk.cpp:
(WebKit::WebPreferences::platformGetStringUserValueForKey): Ditto for the GTK port.
(WebKit::WebPreferences::platformGetBoolUserValueForKey): Ditto.
(WebKit::WebPreferences::platformGetUInt32UserValueForKey): Ditto.
(WebKit::WebPreferences::platformGetDoubleUserValueForKey): Ditto.

* UIProcess/mac/WebPreferencesMac.mm:
(WebKit::WebPreferences::platformGetStringUserValueForKey): Added. Replaces
setStringValueIfInUserDefaults, on which it is based.
(WebKit::WebPreferences::platformGetBoolUserValueForKey): Similarly for booleans.
(WebKit::WebPreferences::platformGetUInt32UserValueForKey): Similarly for integers.
(WebKit::WebPreferences::platformGetDoubleUserValueForKey): Similarly for doubles.
(WebKit::WebPreferences::platformInitializeStore): Changed to use the above functions.

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

6 years agoMake it easer to add switches to MiniBrowser
timothy_horton@apple.com [Fri, 1 Aug 2014 18:21:11 +0000 (18:21 +0000)]
Make it easer to add switches to MiniBrowser
https://bugs.webkit.org/show_bug.cgi?id=135499

Reviewed by Simon Fraser.

Add a single class to manage a set of persistent, global settings for MiniBrowser.
Add a new menu that contains items to toggle the aforementioned settings (moving them out of the Debug menu).

* MiniBrowser/MiniBrowser.xcodeproj/project.pbxproj:
Add SettingsController.{m, h}.

* MiniBrowser/mac/AppDelegate.h:
Move _browserWindowControllers to the implementation.
Get rid of toggleUseWebKit2ByDefault, because SettingsController now takes care
of that; instead, we'll receive didChangeSettings.

* MiniBrowser/mac/AppDelegate.m:
Move the default URL, default URL preference key, and use-WebKit2-by-default
preference key into SettingsController.

(-[BrowserAppDelegate awakeFromNib]):
Add the dynamically-generated SettingsController menu just to the left of the Debug menu.

(-[BrowserAppDelegate newWindow:]):
Ask SettingsController if we should use WebKit2 by default, and what the initial URL to load is.

(-[BrowserAppDelegate applicationDidFinishLaunching:]):
SettingsController now takes care of reading the default URL preference.
WK1BrowserWindowController now takes care of enabling the developer extras, via WebPreferences.

(-[BrowserAppDelegate didChangeSettings]):
When settings change, update the key equivalents for the new-window menu items, as they
might have changed (as use-WebKit2-by-default is one of the settings).

Dispatch settings change notifications to all live BrowserControllers.

(-[BrowserAppDelegate _updateNewWindowKeyEquivalents]):
(-[BrowserAppDelegate toggleUseWebKit2ByDefault:]): Deleted.
(-[BrowserAppDelegate _useWebKit2ByDefault]): Deleted.
(-[BrowserAppDelegate validateMenuItem:]): Deleted.
All menu item validation for settings is moved into SettingsController.

* MiniBrowser/mac/BrowserWindowController.h:
Simplify the BrowserWindowController interface; "toggling" settings will happen inside SettingsController,
the BrowserWindowController subclasses will be able to a) know when any setting changes, b) query the current setting state.

* MiniBrowser/mac/MainMenu.xib:
Remove the settings menu items from the "Debug" menu.

* MiniBrowser/mac/SettingsController.h: Added.
* MiniBrowser/mac/SettingsController.m: Added.
(+[SettingsController shared]):
(-[SettingsController menu]):

(-[SettingsController _addItemWithTitle:action:indented:]):
(-[SettingsController _addHeaderWithTitle:]):
NSMenuItem-creating helpers.

(-[SettingsController _populateMenu]):
Build the menu. Ideally this and the validation step would eventually be made more dynamic.

(-[SettingsController validateMenuItem:]):
Validate menu items; since they can be used to toggle the default state of a setting,
we'll always return YES. However, we will use this opportunity to set the 'checked' state
of each item.

(-[SettingsController _toggleBooleanDefault:]):
Toggle the given boolean default, and notify BrowserAppDelegate that something changed.

(-[SettingsController toggleUseWebKit2ByDefault:]):
(-[SettingsController useWebKit2ByDefault]):
(-[SettingsController toggleUseTransparentWindows:]):
(-[SettingsController useTransparentWindows]):
(-[SettingsController toggleUsePaginatedMode:]):
(-[SettingsController usePaginatedMode]):
(-[SettingsController toggleUseUISideCompositing:]):
(-[SettingsController useUISideCompositing]):
(-[SettingsController toggleShowLayerBorders:]):
(-[SettingsController layerBordersVisible]):
(-[SettingsController toggleShowTiledScrollingIndicator:]):
(-[SettingsController tiledScrollingIndicatorVisible]):
(-[SettingsController toggleEnableSubPixelCSSOMMetrics:]):
(-[SettingsController subPixelCSSOMMetricsEnabled]):
(-[SettingsController defaultURL]):
Toggle or return the current state of each preference.

* MiniBrowser/mac/WK1BrowserWindowController.m:
(-[WK1BrowserWindowController awakeFromNib]):
(-[WK1BrowserWindowController validateMenuItem:]):
(-[WK1BrowserWindowController windowWillClose:]):
(-[WK1BrowserWindowController find:]):
(-[WK1BrowserWindowController dumpSourceToConsole:]):
(-[WK1BrowserWindowController didChangeSettings]):
(-[WK1BrowserWindowController webView:didReceiveTitle:forFrame:]):
(-[WK1BrowserWindowController isPaginated]): Deleted.
(-[WK1BrowserWindowController togglePaginationMode:]): Deleted.
(-[WK1BrowserWindowController toggleTransparentWindow:]): Deleted.
(-[WK1BrowserWindowController isSubpixelCSSOMElementMetricsEnabled]): Deleted.
(-[WK1BrowserWindowController toggleSubpixelCSSOMElementMetricsEnabled:]): Deleted.
(-[WK1BrowserWindowController layerBordersVisible]): Deleted.
(-[WK1BrowserWindowController toggleLayerBordersVisibility:]): Deleted.
* MiniBrowser/mac/WK2BrowserWindowController.m:
(-[WK2BrowserWindowController awakeFromNib]):
(-[WK2BrowserWindowController validateMenuItem:]):
(-[WK2BrowserWindowController forceRepaint:]):
(-[WK2BrowserWindowController windowWillClose:]):
(-[WK2BrowserWindowController didChangeSettings]):
(-[WK2BrowserWindowController isPaginated]): Deleted.
(-[WK2BrowserWindowController togglePaginationMode:]): Deleted.
(-[WK2BrowserWindowController toggleTransparentWindow:]): Deleted.
(-[WK2BrowserWindowController isUISideCompositingEnabled]): Deleted.
(-[WK2BrowserWindowController toggleUISideCompositing:]): Deleted.
(-[WK2BrowserWindowController layerBordersVisible]): Deleted.
(-[WK2BrowserWindowController toggleLayerBordersVisibility:]): Deleted.
(-[WK2BrowserWindowController tiledScrollingIndicatorVisible]): Deleted.
(-[WK2BrowserWindowController toggleTiledScrollingIndicatorVisibility:]): Deleted.

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

6 years agonullptr goodness in RenderLayer
simon.fraser@apple.com [Fri, 1 Aug 2014 18:20:04 +0000 (18:20 +0000)]
nullptr goodness in RenderLayer
https://bugs.webkit.org/show_bug.cgi?id=135512

Reviewed by Brent Fulgham.

Use nullptr in RenderLayer.

* rendering/RenderLayer.cpp:
(WebCore::RenderLayer::RenderLayer):
(WebCore::RenderLayer::updateDescendantDependentFlags):
(WebCore::accumulateOffsetTowardsAncestor):
(WebCore::RenderLayer::scrollRectToVisible):
(WebCore::RenderLayer::destroyScrollbar):
(WebCore::RenderLayer::paintLayerContents):
(WebCore::RenderLayer::hitTestFixedLayersInNamedFlows):
(WebCore::RenderLayer::hitTestLayer):
(WebCore::RenderLayer::hitTestList):
(WebCore::RenderLayer::calculateClipRects):

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

6 years agoMiniBrowser doesn't support data URLs
timothy_horton@apple.com [Fri, 1 Aug 2014 18:19:07 +0000 (18:19 +0000)]
MiniBrowser doesn't support data URLs
https://bugs.webkit.org/show_bug.cgi?id=135492

Reviewed by Simon Fraser.

* MiniBrowser/mac/BrowserWindowController.m:
(-[BrowserWindowController addProtocolIfNecessary:]):
Don't add http:// to data: URLs.

* MiniBrowser/mac/WK2BrowserWindowController.m:
(-[WK2BrowserWindowController fetch:]):
(-[WK2BrowserWindowController updateTextFieldFromURL:]):
Percent-escape the contents of the address field before trying to make a URL.
Percent-unescape the URL when displaying it in the address field.
This is not great, but trivial and good-enough-for-Minibrowser.

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

6 years agoBuild fix for iOS
timothy_horton@apple.com [Fri, 1 Aug 2014 18:16:19 +0000 (18:16 +0000)]
Build fix for iOS

* bindings/objc/DOM.mm:
(-[DOMRange renderedImageForcingBlackText:renderedImageForcingBlackText:]):
We use CGImageRef instead of NSImage here on iOS.

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

6 years ago[Mac] Fullscreen mode for some applications shows only a black screen.
bfulgham@apple.com [Fri, 1 Aug 2014 17:38:53 +0000 (17:38 +0000)]
[Mac] Fullscreen mode for some applications shows only a black screen.
https://bugs.webkit.org/show_bug.cgi?id=135493
<rdar://problem/17628212>

Reviewed by Jer Noble.

In some applications, the window hosting the WKView is an InProcess layer hosting mode.
The fullscreen window created by the WKFullScreenWindowController defaults to an
OutOfProcess mode.

When this kind of mismatch is encountered, the WK2 layer in the UI process is supposed
to send a message back to the WebProcess indicating that the layer hosting mode of the
containing window is different, so that the WebProcess can adjust its logic accordingly.
Unfortunately, the notification that this had happened was not getting sent to the
WebProcess due to an optimization in window state change logic (see Bug 135509 for
details).

The fix is to check layer hosting mode state when a WKView is added to a window, and
notify the WebProcess when it needs to change state to match.

* UIProcess/API/mac/WKView.mm:
(-[WKView viewDidMoveToWindow]): When moving to a new window, always call
'layerHostingModeDidChange' to pick up any changes in the layer hosting mode.

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

6 years agoASSERTION FAILED: listNode in WebCore::RenderListItem::updateListMarkerNumbers
commit-queue@webkit.org [Fri, 1 Aug 2014 16:15:26 +0000 (16:15 +0000)]
ASSERTION FAILED: listNode in WebCore::RenderListItem::updateListMarkerNumbers
https://bugs.webkit.org/show_bug.cgi?id=134970

Patch by Renato Nagy <nagy.renato@stud.u-szeged.hu> on 2014-08-01
Reviewed by Zalan Bujtas.

Removed an unnecessary assert, because the null return value of enclosingList() is
handled properly after this assert.

* rendering/RenderListItem.cpp:
(WebCore::RenderListItem::updateListMarkerNumbers):

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

6 years agoUnreviewed EFL gardening
m.pakula@samsung.com [Fri, 1 Aug 2014 13:42:26 +0000 (13:42 +0000)]
Unreviewed EFL gardening

Add test expectations for failing tests. Remove flaky test expectations that are
no longer correct.

* platform/efl/TestExpectations:
* platform/efl/fast/text/khmer-lao-font-expected.txt: Update expected result.
* svg/W3C-SVG-1.1/shapes-rect-02-t-expected.txt: Update after r171046.

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

6 years ago[CMake] GTK and EFL are using PROJECT_VERSION_PATCH to define the micro version
carlosgc@webkit.org [Fri, 1 Aug 2014 13:34:56 +0000 (13:34 +0000)]
[CMake] GTK and EFL are using PROJECT_VERSION_PATCH to define the micro version
https://bugs.webkit.org/show_bug.cgi?id=135501

Reviewed by Gyuyoung Kim.

Use PROJECT_VERSION_MICRO instead.

.:
* Source/cmake/OptionsEfl.cmake:
* Source/cmake/OptionsGTK.cmake:
* Source/cmake/WebKitHelpers.cmake:

Source/WebKit2:
* UIProcess/API/efl/EWebKit2.h.in:
* UIProcess/API/gtk/WebKitVersion.h.in:

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

6 years agoUnreviewed. Add missing sections to documentation.
carlosgc@webkit.org [Fri, 1 Aug 2014 10:48:30 +0000 (10:48 +0000)]
Unreviewed. Add missing sections to documentation.

* UIProcess/API/gtk/docs/webkit2gtk-docs.sgml: Add
WebKitUserContent and WebKitUserContentManager sections to the
documentation.

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

6 years agoUnreviewed EFL gardening
m.pakula@samsung.com [Fri, 1 Aug 2014 08:14:20 +0000 (08:14 +0000)]
Unreviewed EFL gardening

Update test expectations for crashing webgl tests.

* platform/efl/TestExpectations:

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

6 years agoReplace DEPRECATED_DEFINE_STATIC_LOCAL with NeverDestroyed<T> in NavigatorContentUtils
gyuyoung.kim@samsung.com [Fri, 1 Aug 2014 07:26:47 +0000 (07:26 +0000)]
Replace DEPRECATED_DEFINE_STATIC_LOCAL with NeverDestroyed<T> in NavigatorContentUtils
https://bugs.webkit.org/show_bug.cgi?id=135494

Reviewed by Andrei Bucur.

Use static NeverDestroyed<T> variables instead of the DEPRECATED_DEFINE_STATIC_LOCAL macro.

No new tests, no behavior changes.

* Modules/navigatorcontentutils/NavigatorContentUtils.cpp:
(WebCore::customHandlersStateString):
(WebCore::NavigatorContentUtils::isProtocolHandlerRegistered):

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

6 years ago[EFL] Unable to do make install since r171901
ryuan.choi@samsung.com [Fri, 1 Aug 2014 07:24:59 +0000 (07:24 +0000)]
[EFL] Unable to do make install since r171901
https://bugs.webkit.org/show_bug.cgi?id=135497

Reviewed by Gyuyoung Kim.

* PlatformEfl.cmake: Removed ewk_defins.h from the installation list.

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

6 years ago[EFL] Bump ewebkit version to 1.11
ryuan.choi@samsung.com [Fri, 1 Aug 2014 05:00:26 +0000 (05:00 +0000)]
[EFL] Bump ewebkit version to 1.11
https://bugs.webkit.org/show_bug.cgi?id=135487

Reviewed by Gyuyoung Kim.

* Source/cmake/OptionsEfl.cmake: Bump version numbers.

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

6 years agoWeb Inspector: "Stop Recording" button feels unresponsive, recording takes a long...
commit-queue@webkit.org [Fri, 1 Aug 2014 04:07:08 +0000 (04:07 +0000)]
Web Inspector: "Stop Recording" button feels unresponsive, recording takes a long time to stop
https://bugs.webkit.org/show_bug.cgi?id=135490

Patch by Joseph Pecoraro <pecoraro@apple.com> on 2014-07-31
Reviewed by Timothy Hatcher.

* UserInterface/Controllers/TimelineManager.js:
(WebInspector.TimelineManager.prototype.stopCapturing):
Immediately stop the recording without waiting for an event from the backend.
This makes the Web Inspector UI feel responsive to the user stopping the recording.
This also matches behavior before r171195.

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

6 years agoRemove shadowPseudoId() override from the shadow media controls
benjamin@webkit.org [Fri, 1 Aug 2014 03:42:47 +0000 (03:42 +0000)]
Remove shadowPseudoId() override from the shadow media controls
https://bugs.webkit.org/show_bug.cgi?id=135474

Patch by Benjamin Poulain <bpoulain@apple.com> on 2014-07-31
Reviewed by Eric Carlson.

Small cleanup.

* html/shadow/MediaControlElementTypes.h:
* html/shadow/MediaControlElements.cpp:
(WebCore::MediaControlPanelElement::MediaControlPanelElement):
(WebCore::MediaControlPanelEnclosureElement::MediaControlPanelEnclosureElement):
(WebCore::MediaControlOverlayEnclosureElement::MediaControlOverlayEnclosureElement):
(WebCore::MediaControlTimelineContainerElement::MediaControlTimelineContainerElement):
(WebCore::MediaControlVolumeSliderContainerElement::MediaControlVolumeSliderContainerElement):
(WebCore::MediaControlStatusDisplayElement::MediaControlStatusDisplayElement):
(WebCore::MediaControlPanelMuteButtonElement::MediaControlPanelMuteButtonElement):
(WebCore::MediaControlVolumeSliderMuteButtonElement::MediaControlVolumeSliderMuteButtonElement):
(WebCore::MediaControlPlayButtonElement::MediaControlPlayButtonElement):
(WebCore::MediaControlOverlayPlayButtonElement::MediaControlOverlayPlayButtonElement):
(WebCore::MediaControlSeekForwardButtonElement::MediaControlSeekForwardButtonElement):
(WebCore::MediaControlSeekBackButtonElement::MediaControlSeekBackButtonElement):
(WebCore::MediaControlRewindButtonElement::MediaControlRewindButtonElement):
(WebCore::MediaControlReturnToRealtimeButtonElement::MediaControlReturnToRealtimeButtonElement):
(WebCore::MediaControlToggleClosedCaptionsButtonElement::MediaControlToggleClosedCaptionsButtonElement):
(WebCore::MediaControlClosedCaptionsContainerElement::MediaControlClosedCaptionsContainerElement):
(WebCore::MediaControlClosedCaptionsTrackListElement::MediaControlClosedCaptionsTrackListElement):
(WebCore::MediaControlTimelineElement::MediaControlTimelineElement):
(WebCore::MediaControlPanelVolumeSliderElement::MediaControlPanelVolumeSliderElement):
(WebCore::MediaControlFullscreenVolumeSliderElement::MediaControlFullscreenVolumeSliderElement):
(WebCore::MediaControlFullscreenButtonElement::MediaControlFullscreenButtonElement):
(WebCore::MediaControlFullscreenVolumeMinButtonElement::MediaControlFullscreenVolumeMinButtonElement):
(WebCore::MediaControlFullscreenVolumeMaxButtonElement::MediaControlFullscreenVolumeMaxButtonElement):
(WebCore::MediaControlTimeRemainingDisplayElement::MediaControlTimeRemainingDisplayElement):
(WebCore::MediaControlCurrentTimeDisplayElement::MediaControlCurrentTimeDisplayElement):
(WebCore::MediaControlTextTrackContainerElement::MediaControlTextTrackContainerElement):
(WebCore::MediaControlPanelElement::shadowPseudoId): Deleted.
(WebCore::MediaControlPanelEnclosureElement::shadowPseudoId): Deleted.
(WebCore::MediaControlOverlayEnclosureElement::shadowPseudoId): Deleted.
(WebCore::MediaControlTimelineContainerElement::shadowPseudoId): Deleted.
(WebCore::MediaControlVolumeSliderContainerElement::shadowPseudoId): Deleted.
(WebCore::MediaControlStatusDisplayElement::shadowPseudoId): Deleted.
(WebCore::MediaControlPanelMuteButtonElement::shadowPseudoId): Deleted.
(WebCore::MediaControlVolumeSliderMuteButtonElement::shadowPseudoId): Deleted.
(WebCore::MediaControlPlayButtonElement::shadowPseudoId): Deleted.
(WebCore::MediaControlOverlayPlayButtonElement::shadowPseudoId): Deleted.
(WebCore::MediaControlSeekForwardButtonElement::shadowPseudoId): Deleted.
(WebCore::MediaControlSeekBackButtonElement::shadowPseudoId): Deleted.
(WebCore::MediaControlRewindButtonElement::shadowPseudoId): Deleted.
(WebCore::MediaControlReturnToRealtimeButtonElement::shadowPseudoId): Deleted.
(WebCore::MediaControlToggleClosedCaptionsButtonElement::shadowPseudoId): Deleted.
(WebCore::MediaControlClosedCaptionsContainerElement::shadowPseudoId): Deleted.
(WebCore::MediaControlClosedCaptionsTrackListElement::shadowPseudoId): Deleted.
(WebCore::MediaControlTimelineElement::shadowPseudoId): Deleted.
(WebCore::MediaControlPanelVolumeSliderElement::shadowPseudoId): Deleted.
(WebCore::MediaControlFullscreenVolumeSliderElement::shadowPseudoId): Deleted.
(WebCore::MediaControlFullscreenButtonElement::shadowPseudoId): Deleted.
(WebCore::MediaControlFullscreenVolumeMinButtonElement::shadowPseudoId): Deleted.
(WebCore::MediaControlFullscreenVolumeMaxButtonElement::shadowPseudoId): Deleted.
(WebCore::MediaControlTimeRemainingDisplayElement::shadowPseudoId): Deleted.
(WebCore::MediaControlCurrentTimeDisplayElement::shadowPseudoId): Deleted.
(WebCore::MediaControlTextTrackContainerElement::textTrackContainerElementShadowPseudoId): Deleted.
(WebCore::MediaControlTextTrackContainerElement::shadowPseudoId): Deleted.
* html/shadow/MediaControlElements.h:
* html/shadow/MediaControls.cpp:
(WebCore::MediaControls::MediaControls):
(WebCore::MediaControls::shadowPseudoId): Deleted.
* html/shadow/MediaControls.h:

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

6 years ago[EFL][WK2] MiniBrower comes to crash when combo box is pressed
ryuan.choi@samsung.com [Fri, 1 Aug 2014 02:20:48 +0000 (02:20 +0000)]
[EFL][WK2] MiniBrower comes to crash when combo box is pressed
https://bugs.webkit.org/show_bug.cgi?id=135378

Reviewed by Gyuyoung Kim.

Source/WebKit2:
Added doxygen comment of popup_menu_show/popup_menu_hide not to confuse the usage.

* UIProcess/API/efl/ewk_view.h:

Tools:
"clicked" signal of elm_menu is emitted after EwkView calls popup_menu_hide
and removes Ewk_Popup_Menu instance.

* MiniBrowser/efl/main.c:
(on_popup_menu_show):
(on_popup_menu_discarded): Deleted.

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

6 years agoBuild fix for platforms where we should have automaticallyAdjustsContentInsets but...
timothy_horton@apple.com [Fri, 1 Aug 2014 01:26:57 +0000 (01:26 +0000)]
Build fix for platforms where we should have automaticallyAdjustsContentInsets but it isn't public yet

* platform/mac/ScrollViewMac.mm:

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

6 years ago[EFL] Add support for building with Geoclue2.
clopez@igalia.com [Fri, 1 Aug 2014 01:26:16 +0000 (01:26 +0000)]
[EFL] Add support for building with Geoclue2.
https://bugs.webkit.org/show_bug.cgi?id=135455

Reviewed by Gyuyoung Kim.

.:
* Source/cmake/OptionsEfl.cmake: Add gio-unix if ENABLE_GEOLOCATION
is set.

Source/WebCore:
No new tests required, no new functionality.

* PlatformEfl.cmake: Generate derived sources for Geoclue2Interface
and include gio-unix path.

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

6 years ago[Win] Use RC_PROJECTBUILDVERSION as build portion of version
bfulgham@apple.com [Fri, 1 Aug 2014 01:15:56 +0000 (01:15 +0000)]
[Win] Use RC_PROJECTBUILDVERSION as build portion of version
https://bugs.webkit.org/show_bug.cgi?id=135478

Reviewed by David Kilzer.

Tools:
Add new test suite for the version-stamp program.

* Scripts/webkitperl/auto-version_unittest/versionStampTests.pl: Added.

WebKitLibraries:
* win/tools/scripts/version-stamp.pl: Check environment for
RC_PROJECTBUILDVERSION, and use it for the build portion of
the file version resource. Otherwise, use the __VERSION_BUILD__
value we calculated from the version string.

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

6 years agoReverted r171893, because it broke http/tests/appcache/different-https-origin-resourc...
mitz@apple.com [Fri, 1 Aug 2014 01:01:00 +0000 (01:01 +0000)]
Reverted r171893, because it broke http/tests/appcache/different-https-origin-resource-main.html,
which loads HTTPS content without calling the delegate.

Rubber-stamped by Alexey Proskuryakov.

* WebKitTestRunner/InjectedBundle/ios/InjectedBundleIOS.mm:
(WTR::InjectedBundle::platformInitialize):
* WebKitTestRunner/InjectedBundle/mac/InjectedBundleMac.mm:
(WTR::InjectedBundle::platformInitialize):

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

6 years ago[EFL] remove ewk_defines.h
ryuan.choi@samsung.com [Fri, 1 Aug 2014 00:53:02 +0000 (00:53 +0000)]
[EFL] remove ewk_defines.h
https://bugs.webkit.org/show_bug.cgi?id=135456

Reviewed by Gyuyoung Kim.

* UIProcess/API/efl/ewk_context_menu.h:
* UIProcess/API/efl/ewk_context_menu_item.h: Moved the declaration from ewk_defines.h
* UIProcess/API/efl/ewk_defines.h: Removed.

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

6 years agoUnreviewed typo correction (and build fix).
bfulgham@apple.com [Fri, 1 Aug 2014 00:50:35 +0000 (00:50 +0000)]
Unreviewed typo correction (and build fix).

* MiniBrowser/mac/WK2BrowserWindowController.m:
(-[WK2BrowserWindowController awakeFromNib]): Use correct
property name (_fullScreenIsEnabled -> _fullScreenEnabled)

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

6 years agoUnreviewed typo correction.
bfulgham@apple.com [Fri, 1 Aug 2014 00:39:47 +0000 (00:39 +0000)]
Unreviewed typo correction.
https://bugs.webkit.org/show_bug.cgi?id=135482

Rename '_fullScreenIsEnabled' -> '_fullScreenEnabled'

* UIProcess/API/Cocoa/WKPreferences.mm:
(-[WKPreferences _fullScreenEnabled]): Added
(-[WKPreferences _fullScreenIsEnabled]): Deleted.
* UIProcess/API/Cocoa/WKPreferencesPrivate.h:

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

6 years agoplatform/mac/fast/scrolling/scroll-select-bottom-test.html failing on Mavericks
bdakin@apple.com [Fri, 1 Aug 2014 00:26:53 +0000 (00:26 +0000)]
platform/mac/fast/scrolling/scroll-select-bottom-test.html failing on Mavericks
(after 171891?)
https://bugs.webkit.org/show_bug.cgi?id=135485

Skipping this test for now to allow some time to investigate the failure.

* platform/mac/TestExpectations:

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

6 years agoMiniBrowser Should Support Fullscreen Videos in WebKit2 Mode
bfulgham@apple.com [Fri, 1 Aug 2014 00:15:16 +0000 (00:15 +0000)]
MiniBrowser Should Support Fullscreen Videos in WebKit2 Mode
https://bugs.webkit.org/show_bug.cgi?id=135482

Reviewed by Simon Fraser.

Source/WebKit2:

Add accessors for the missing Fullscreen API so that MiniBrowser
can use them.

* UIProcess/API/Cocoa/WKPreferences.mm:
(-[WKPreferences _fullScreenIsEnabled]): Added.
(-[WKPreferences _setFullScreenEnabled:]): Added.
* UIProcess/API/Cocoa/WKPreferencesPrivate.h: Add accessor for
Fullscreen mode.

Tools:

* MiniBrowser/mac/WK2BrowserWindowController.m:
(-[WK2BrowserWindowController awakeFromNib]): Activate the Fullscreen
feature.

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

6 years agoSubpixel rendering: Region painting needs to take subpixel accumulation into account.
zalan@apple.com [Thu, 31 Jul 2014 23:55:31 +0000 (23:55 +0000)]
Subpixel rendering: Region painting needs to take subpixel accumulation into account.
https://bugs.webkit.org/show_bug.cgi?id=135469

Similar to non-region painting, when the context is translated, we need to propagate
the subpixel difference so that renderers get snapped to the same position as if they
were not part of a region.

Reviewed by Simon Fraser.

Covered by existing tests/not testable (webkit.org/b/135470)

* html/shadow/MediaControlElements.cpp:
(WebCore::MediaControlTextTrackContainerElement::createTextTrackRepresentationImage):
* page/FrameView.cpp:
(WebCore::FrameView::paintContents):
* rendering/RenderLayer.cpp:
(WebCore::RenderLayer::paint):
(WebCore::RenderLayer::calculateClipRects):
* rendering/RenderLayer.h:

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

6 years ago[iOS] Video in an <embed> has a bad aspect ratio when in fullscreen mode.
jer.noble@apple.com [Thu, 31 Jul 2014 23:52:19 +0000 (23:52 +0000)]
[iOS] Video in an <embed> has a bad aspect ratio when in fullscreen mode.
https://bugs.webkit.org/show_bug.cgi?id=135481

Reviewed by Simon Fraser.

Do not change the gravity of our AVPlayerLayer when in full screen mode; its gravity
is controlled by setVideoFullscreenGravity(), and should not be affected by style changes.

* platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
(WebCore::MediaPlayerPrivateAVFoundationObjC::updateVideoLayerGravity):

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

6 years agoWeb Inspector: Timeline recording is not working inspecting iOS 7 and earlier
commit-queue@webkit.org [Thu, 31 Jul 2014 23:17:15 +0000 (23:17 +0000)]
Web Inspector: Timeline recording is not working inspecting iOS 7 and earlier
https://bugs.webkit.org/show_bug.cgi?id=135466

Patch by Joseph Pecoraro <pecoraro@apple.com> on 2014-07-31
Reviewed by Timothy Hatcher.

Start / stop capturing for older backends that won't emit start / stop events.

* UserInterface/Protocol/InspectorBackend.js:
(InspectorBackend.Agent.prototype.hasEvent):
Provide a way to check if an event is supported.

* UserInterface/Controllers/TimelineManager.js:
(WebInspector.TimelineManager.prototype.startCapturing):
(WebInspector.TimelineManager.prototype.stopCapturing):
Fallback to starting and stopping capturing manually if the backend
does not provide the events.

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

6 years ago[Mac, iOS] Remove -setAllowsAnyHTTPSCertificate calls
ap@apple.com [Thu, 31 Jul 2014 22:56:30 +0000 (22:56 +0000)]
[Mac, iOS] Remove -setAllowsAnyHTTPSCertificate calls
https://bugs.webkit.org/show_bug.cgi?id=135472

Reviewed by Dan Bernstein.

We now handle server trust challenges, and don't need such hacks.

* WebKitTestRunner/InjectedBundle/ios/InjectedBundleIOS.mm:
(WTR::InjectedBundle::platformInitialize):
* WebKitTestRunner/InjectedBundle/mac/InjectedBundleMac.mm:
(WTR::InjectedBundle::platformInitialize):

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

6 years agoTest failure fix. I accidentally removed this file that is still used by another
bdakin@apple.com [Thu, 31 Jul 2014 22:45:00 +0000 (22:45 +0000)]
Test failure fix. I accidentally removed this file that is still used by another
test in the directory.

* platform/mac-wk2/tiled-drawing/resources/iframe-to-hit-test.html: Added.

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

6 years agoHit-testing broken in WebKit 1 views with AppKit's contentInsets
bdakin@apple.com [Thu, 31 Jul 2014 22:32:40 +0000 (22:32 +0000)]
Hit-testing broken in WebKit 1 views with AppKit's contentInsets
https://bugs.webkit.org/show_bug.cgi?id=135434
-and corresponding-
<rdar://problem/17850323>

Reviewed by Benjamin Poulain.

Source/WebCore:
AppKit's contentInsets are factored into scroll positions and mouse positions, but
in WebCore, we generally want all of those things to be factored out so that, for
example, the scroll position of a document pinned to the top is the same whether
or not there is a contentInset. So to fix hit-testing in WebKit 1 views with
contentInsets, this patch factors the inset out or into of all coordinate
conversion methods just like we do for the WebKit2 contentInset.

This patch also adds the ability to test WK1 platformContentInsets with
window.internals, and it re-names convertFromRenderer to
convertFromRendererToContainingView and also re-names convertToRenderer to
convertFromContainingViewToRenderer.

ScrollView::topContentInset() takes an optional parameter indicating whether the
caller wants the WebCore::Page contentInset or the platform content inset. It’s
necessary to distinguish between these cases because there is a lot of code that
only wants the WebCore::Page contentInset since that feature is actually
implemented in WebCore as opposed to being implemented at the platform level.
* WebCore.exp.in:
* page/FrameView.cpp:
(WebCore::FrameView::topContentInset):

For layout test purposes, set the platforTopContentInset here if there is a
platformWidget().
(WebCore::FrameView::topContentInsetDidChange):

Re-named functions, also all coordinate conversion functions call
topContentInset(ManualOrPlatformContentInset)
(WebCore::FrameView::convertFromContainingViewToRenderer):
(WebCore::FrameView::convertToContainingView):
(WebCore::FrameView::convertFromContainingView):
(WebCore::FrameView::convertFromRenderer): Deleted.
(WebCore::FrameView::convertToRenderer): Deleted.
* page/FrameView.h:
* page/Page.cpp:
(WebCore::Page::setTopContentInset):
* platform/ScrollView.cpp:
(WebCore::ScrollView::documentScrollOffsetRelativeToViewOrigin):
(WebCore::ScrollView::documentScrollPositionRelativeToViewOrigin):
(WebCore::ScrollView::contentsToRootView):
(WebCore::ScrollView::rootViewToTotalContents):
(WebCore::ScrollView::contentsToWindow):
(WebCore::ScrollView::platformTopContentInset):
(WebCore::ScrollView::platformSetTopContentInset):
* platform/ScrollView.h:
(WebCore::ScrollView::topContentInset):
* platform/ios/ScrollViewIOS.mm:
(WebCore::ScrollView::platformTopContentInset):
(WebCore::ScrollView::platformSetTopContentInset):

Implement new platform inset-related functions using AppKit's implementation.
* platform/mac/ScrollViewMac.mm:
(WebCore::ScrollView::platformTopContentInset):
(WebCore::ScrollView::platformSetTopContentInset):

When we set the scroll position for the documentView, we have to factor the inset
back into the WebCore scroll position.
(WebCore::ScrollView::platformSetScrollPosition):

Re-named functions.
* rendering/RenderLayer.cpp:
(WebCore::RenderLayer::convertFromScrollbarToContainingView):
(WebCore::RenderLayer::convertFromContainingViewToScrollbar):
* rendering/RenderListBox.cpp:
(WebCore::RenderListBox::convertFromScrollbarToContainingView):
(WebCore::RenderListBox::convertFromContainingViewToScrollbar):

Source/WebKit2:
Re-named functions.
* WebProcess/Plugins/PDF/PDFPlugin.mm:
(WebKit::PDFPlugin::convertFromScrollbarToContainingView):
(WebKit::PDFPlugin::convertFromContainingViewToScrollbar):

LayoutTests:
These hit-testing related contentInset tests will now work for mac on wk1 on
Yosemite and wk2.

* platform/mac-wk1/TestExpectations:
* platform/mac-wk2/tiled-drawing/content-inset-hit-testing-expected.txt: Removed.
* platform/mac-wk2/tiled-drawing/content-inset-hit-testing-in-frame-expected.txt: Removed.
* platform/mac-wk2/tiled-drawing/content-inset-hit-testing-in-frame.html: Removed.
* platform/mac-wk2/tiled-drawing/content-inset-hit-testing.html: Removed.
* platform/mac-wk2/tiled-drawing/resources/iframe-to-hit-test.html: Removed.
* platform/mac/fast/events/content-inset-hit-testing-expected.txt: Copied from platform/mac-wk2/tiled-drawing/content-inset-hit-testing-expected.txt.
* platform/mac/fast/events/content-inset-hit-testing-in-frame-expected.txt: Copied from platform/mac-wk2/tiled-drawing/content-inset-hit-testing-in-frame-expected.txt.
* platform/mac/fast/events/content-inset-hit-testing-in-frame.html: Copied from platform/mac-wk2/tiled-drawing/content-inset-hit-testing-in-frame.html.
* platform/mac/fast/events/content-inset-hit-testing.html: Copied from platform/mac-wk2/tiled-drawing/content-inset-hit-testing.html.
* platform/mac/fast/events/resources: Added.
* platform/mac/fast/events/resources/iframe-to-hit-test.html: Copied from platform/mac-wk2/tiled-drawing/resources/iframe-to-hit-test.html.

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

6 years agoDefault buttons do not pulse in OS X 10.10
dino@apple.com [Thu, 31 Jul 2014 22:07:46 +0000 (22:07 +0000)]
Default buttons do not pulse in OS X 10.10
https://bugs.webkit.org/show_bug.cgi?id=135447
<rdar://problem/17875896>

Reviewed by Dan Bernstein.

OS X Yosemite does not have the animated pulsing default
buttons seen in previous releases. We don't need to have
a timer in RenderButton constantly triggering repaints.

* platform/mac/ThemeMac.mm:
(WebCore::paintButton): No need to advance the animation.
* rendering/RenderButton.cpp:
(WebCore::RenderButton::styleDidChange): Ask the theme if it
should advance the animation.
* rendering/RenderTheme.h:
(WebCore::RenderTheme::defaultButtonHasAnimation): Virtual function
indicating if the button needs to repaint.
* rendering/RenderThemeMac.h:
* rendering/RenderThemeMac.mm:
(WebCore::RenderThemeMac::defaultButtonHasAnimation): Provide platform
specific result on Yosemite and above.

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

6 years agoDOM::renderedImageForcingBlackText returns an image with the wrong logical size on...
timothy_horton@apple.com [Thu, 31 Jul 2014 22:06:10 +0000 (22:06 +0000)]
DOM::renderedImageForcingBlackText returns an image with the wrong logical size on 2x displays
https://bugs.webkit.org/show_bug.cgi?id=135442
<rdar://problem/17614632>

Reviewed by Simon Fraser.

* bindings/objc/DOM.mm:
(-[DOMRange renderedImageForcingBlackText:renderedImageForcingBlackText:]):
Scale the NSImage size by the device scale factor,
similar to what we did for drag images in r167403.
Ideally this scaling would happen in the code that
generates the images, but this is a much larger change
with much more regression potential.

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

6 years agoJSCell::classInfo() belongs in JSCellInlines.h.
mark.lam@apple.com [Thu, 31 Jul 2014 21:56:38 +0000 (21:56 +0000)]
JSCell::classInfo() belongs in JSCellInlines.h.
<https://webkit.org/b/135475>

Reviewed by Mark Hahnenberg.

* runtime/JSCellInlines.h:
(JSC::JSCell::classInfo):
* runtime/JSDestructibleObject.h:
(JSC::JSCell::classInfo): Deleted.

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

6 years agoVarious SSO services need the networking process to be able to spoof its bundle id
oliver@apple.com [Thu, 31 Jul 2014 21:48:33 +0000 (21:48 +0000)]
Various SSO services need the networking process to be able to spoof its bundle id
https://bugs.webkit.org/show_bug.cgi?id=135468
<rdar://problem/17864139>

Reviewed by Alexey Proskuryakov.

Just add the entitlement required to allow the sandbox to let this happen.

* Configurations/Network-iOS.entitlements:

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

6 years ago[CSS Font Loading] Rename document.fontloader to document.fonts
betravis@adobe.com [Thu, 31 Jul 2014 21:38:27 +0000 (21:38 +0000)]
[CSS Font Loading] Rename document.fontloader to document.fonts
https://bugs.webkit.org/show_bug.cgi?id=135393

Reviewed by Bem Jones-Bey.

Source/WebCore:
The most recent version of the specification has renamed
document.fontloader to document.fonts. This change updates the
names in WebCore and LayoutTests.

Fixed up existing tests under LayoutTests/fast/css/fontloader-*
and LayoutTests/http/webfont/fontloader-*

* css/CSSFontFace.cpp:
(WebCore::CSSFontFace::notifyFontLoader):
(WebCore::CSSFontFace::notifyLoadingDone):
* dom/Document.cpp:
(WebCore::Document::fonts):
(WebCore::Document::fontloader): Deleted.
* dom/Document.h:
* dom/Document.idl:
* page/FrameView.cpp:
(WebCore::FrameView::performPostLayoutTasks):

LayoutTests:
Update tests to use the new document.fonts name.

* fast/css/fontloader-download-error.html:
* fast/css/fontloader-events.html:
* fast/css/fontloader-loadingdone.html:
* fast/css/fontloader-multiple-faces-download-error-expected.txt:
* fast/css/fontloader-multiple-faces-download-error.html:
* fast/css/fontloader-multiple-faces-expected.txt:
* fast/css/fontloader-multiple-faces.html:
* fast/css/fontloader-multiple-families-expected.txt:
* fast/css/fontloader-multiple-families.html:
* http/tests/webfont/fontloader-loading-attribute-expected.txt:
* http/tests/webfont/fontloader-loading-attribute.html:

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

6 years agoWeb Inspector: Sync button look and feel with Xcode updates.
jonowells@apple.com [Thu, 31 Jul 2014 21:00:45 +0000 (21:00 +0000)]
Web Inspector: Sync button look and feel with Xcode updates.
https://bugs.webkit.org/show_bug.cgi?id=135445

Reviewed by Timothy Hatcher.

Update styles to match recent changes to Xcode text-only
buttons, the navigation bar, and search fields. Include
older style rules for older Mac platforms.

* UserInterface/Views/ButtonNavigationItem.css:
(.navigation-bar .item.button.text-only):
(body.mac-platform.legacy .navigation-bar .item.button.text-only):
* UserInterface/Views/CSSStyleDetailsSidebarPanel.css:
(.sidebar > .panel.details.css-style > .navigation-bar):
(.sidebar > .panel.details.css-style > .content):
(body.mac-platform.legacy .sidebar > .panel.details.css-style > .content):
* UserInterface/Views/DebuggerSidebarPanel.css:
(.sidebar > .panel.navigation.debugger > .content):
(body.mac-platform.legacy .sidebar > .panel.navigation.debugger > .content):
* UserInterface/Views/DividerNavigationItem.css:
(.navigation-bar .item.divider):
(body.mac-platform.legacy .navigation-bar .item.divider):
* UserInterface/Views/FilterBar.css:
(.filter-bar):
(body.mac-platform.legacy .filter-bar):
(.filter-bar > input[type="search"]):
(body.mac-platform.legacy .filter-bar > input[type="search"]):
* UserInterface/Views/LogContentView.css:
(.search-bar.log-search-bar > input[type="search"]):
(@media reader):
(.log-search-bar > input): Deleted.
* UserInterface/Views/Main.css:
(#split-content-browser > .navigation-bar):
(body.mac-platform.legacy #split-content-browser > .navigation-bar):
* UserInterface/Views/NavigationBar.css:
(.navigation-bar):
(body.mac-platform.legacy .navigation-bar):
(.navigation-bar .item):
(body.mac-platform.legacy .navigation-bar .item):
* UserInterface/Views/NavigationSidebarPanel.css:
(.sidebar > .panel.navigation > .content):
(body.mac-platform.legacy .sidebar > .panel.navigation > .content):
* UserInterface/Views/QuickConsole.css:
(.quick-console):
(body.mac-platform.legacy .quick-console):
* UserInterface/Views/RadioButtonNavigationItem.css:
(.navigation-bar .item.radio.button.text-only:hover):
(body.mac-platform.legacy .navigation-bar .item.radio.button.text-only:hover):
(.navigation-bar .item.radio.button.text-only.selected):
(body.mac-platform.legacy .navigation-bar .item.radio.button.text-only.selected):
(.navigation-bar .item.radio.button.text-only:active):
(.navigation-bar .item.radio.button.text-only.selected:active):
(body.mac-platform.legacy .navigation-bar .item.radio.button.text-only.selected:active):
* UserInterface/Views/ResourceSidebarPanel.css:
(.sidebar > .panel.navigation.resource > .empty-content-placeholder):
(body.mac-platform.legacy .sidebar > .panel.navigation.resource > .empty-content-placeholder):
(.sidebar > .panel.navigation.resource > .search-bar):
(body.mac-platform.legacy .sidebar > .panel.navigation.resource > .search-bar):
(.sidebar > .panel.navigation.resource > .search-bar > input[type="search"]):
(body.mac-platform.legacy .sidebar > .panel.navigation.resource > .search-bar > input[type="search"]):
* UserInterface/Views/ScopeBar.css:
(.scope-bar > li):
(body.mac-platform.legacy .scope-bar > li):
(.scope-bar > li:hover):
(body.mac-platform.legacy .scope-bar > li:hover):
(.scope-bar > li.selected):
(.scope-bar > li:active):
(body.mac-platform.legacy .scope-bar > li:active):
(.scope-bar > li.selected:active):
(body.mac-platform.legacy .scope-bar > li.selected:active):
* UserInterface/Views/SearchBar.css:
(.search-bar > input[type="search"]):
(body.mac-platform.legacy .search-bar > input[type="search"]):
Update styles and apply older styles to legacy Mac platforms.

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

6 years agoREGRESSION: Search highlight is broken in RTL multicolumn content
abucur@adobe.com [Thu, 31 Jul 2014 19:50:45 +0000 (19:50 +0000)]
REGRESSION: Search highlight is broken in RTL multicolumn content
https://bugs.webkit.org/show_bug.cgi?id=135452

Reviewed by Simon Fraser.

Source/WebCore:
The offsets for elements inside RTL multi-column elements are incorrectly computed because
the columns don't calculate their left position according to the writing direction.

The patch extracts the column position computation in two helper functions (for top and left)
so they can be used when needed in different parts of the code. In our case, the |columnLogicalLeft|
function should be used inside |columnTranslationForOffset|.

Test: fast/multicol/content-bounding-box-rtl.html

* rendering/RenderMultiColumnSet.cpp:
(WebCore::RenderMultiColumnSet::columnLogicalLeft): Return the logical left of a column relative to the set.
(WebCore::RenderMultiColumnSet::columnLogicalTop): Return the logical top of a column relative to the set.
(WebCore::RenderMultiColumnSet::columnRectAt): Split the code between columnLogicalLeft and columnLogicalTop.
(WebCore::RenderMultiColumnSet::collectLayerFragments): Make code clearer by adding a new line.
(WebCore::RenderMultiColumnSet::columnTranslationForOffset): Use columnLogicalLeft instead of duplicating logic.
* rendering/RenderMultiColumnSet.h:

LayoutTests:
A test that verifies the bounding boxes for content inside a RTL multi-column element are correctly computed:
- for static elements
- for relative positioned elements
- for absolutely positioned elements

* fast/multicol/content-bounding-box-rtl-expected.txt: Added.
* fast/multicol/content-bounding-box-rtl.html: Added.

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

6 years agoWeb Inspector: MessageDispatcher should not synchronously dispatch all backend messages
burg@cs.washington.edu [Thu, 31 Jul 2014 19:47:40 +0000 (19:47 +0000)]
Web Inspector: MessageDispatcher should not synchronously dispatch all backend messages
https://bugs.webkit.org/show_bug.cgi?id=135427

Reviewed by Timothy Hatcher.

The frontend dispatches all queued messages from the backend synchronously, even if there are
hundreds of messages, or even if some of the messages take a long time (>10ms) to process.

This patch adds a time limit to the frontend's message dispatcher. If the time limit is exceeded
when processing the message queue, unhandled messages remain in the queue and the dispatcher goes
to sleep until the next run loop (obtained by a new setTimeout).

This has the effect of removing stutters when the message queue has hundreds of small messages.
The outliers are still the same since some single messages can take over 200ms to be handled.

This patch also improves performance logging in InspectorBackend so that it is easier to see
message handling times and their distribution among run loop turns.

* UserInterface/Protocol/InspectorBackend.js:
(InspectorBackendClass): Add a new diagnostic flag that warns about slow message handling.
(InspectorBackendClass.prototype._dispatchCallback.get if): Improve logging.
(InspectorBackendClass.prototype._dispatchCallback): Improve logging.
(InspectorBackendClass.prototype._dispatchEvent): Improve logging.
* UserInterface/Protocol/MessageDispatcher.js:
(WebInspector.dispatchNextQueuedMessageFromBackend): Keep track of a time limit for message
dispatching, and set a new timeout if we exceed the time limit.

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

6 years agomedia/track/add-and-remove-track.html and media/media-fragments/TC0001.html are flaky
ap@apple.com [Thu, 31 Jul 2014 19:21:28 +0000 (19:21 +0000)]
media/track/add-and-remove-track.html and media/media-fragments/TC0001.html are flaky
on Mac WK2 EWS, asserting under TestRunner::removeAllWebNotificationPermissions
https://bugs.webkit.org/show_bug.cgi?id=135418

Reviewed by Anders Carlsson.

This was only happening in shared web process mode, because WKBundlePostMessage
has different behavior then. When there is no process, the message is dropped on
the floor in multiple process mode, but it's stored to be delivered after launch
in shared process mode.

So, calling resetStateToConsistentValues() resulted in storing a Reset bundle message
that was delivered immediately after launch, when there was nothing to reset.

We don't actually need to reset anything at this point, as the previous call has
already reset everything UI process side, and web process is brand new. All we need
is to reattach the page to a process, as invoke() expects one to exist.

* WebKitTestRunner/TestController.cpp: (WTR::TestController::reattachPageToWebProcess):
* WebKitTestRunner/TestController.h:
* WebKitTestRunner/TestInvocation.cpp: (WTR::TestInvocation::invoke):

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

6 years agoEliminate "FractionConversion" from CSSPrimitiveValue::convertToLength
mhodovan.u-szeged@partner.samsung.com [Thu, 31 Jul 2014 18:20:51 +0000 (18:20 +0000)]
Eliminate "FractionConversion" from CSSPrimitiveValue::convertToLength
https://bugs.webkit.org/show_bug.cgi?id=135377

Reviewed by Darin Adler.

The FractionConversion argument in CSSPrimitiveValue::convertToLength
doesn't seem to actually have a purpose. It is for converting numbers
into Length(x * 100, Percent), but this case shouldn't be reachable.
The original patch introducing it doesn't shed any light either:
[https://bugs.webkit.org/show_bug.cgi?id=74913

This patch removes the now unused FractionConversion argument. Note
that we can probably also merge the two Fixed conversions, as the
two only differ in clamping large numbers (probably unintended).

No new tests.

* css/CSSCalculationValue.cpp:
(WebCore::determineCategory):
* css/CSSParser.cpp:
(WebCore::parseTransformTranslateArguments):
(WebCore::parseTranslateTransformValue):
(WebCore::parseTransformArguments): Deleted.
* css/CSSPrimitiveValueMappings.h:
(WebCore::CSSPrimitiveValue::convertToLength):
* css/DeprecatedStyleBuilder.cpp:
(WebCore::ApplyPropertyClip::convertToLength):
* css/StyleResolver.cpp:
(WebCore::StyleResolver::convertToIntLength):
(WebCore::StyleResolver::convertToFloatLength):
* css/TransformFunctions.cpp:
(WebCore::convertToFloatLength):

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

6 years ago[Win] Fix build failure when using 5-tuple build versions.
bfulgham@apple.com [Thu, 31 Jul 2014 18:00:41 +0000 (18:00 +0000)]
[Win] Fix build failure when using 5-tuple build versions.
https://bugs.webkit.org/show_bug.cgi?id=135464
<rdar://problem/17872507>

Reviewed by David Kilzer.

* win/tools/scripts/version-stamp.pl: Modify the environment for
the VersionStamper sub-process to work around bug in that tool.

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

6 years agoWeb Inspector: Right edge of Timeline Record button does not work
commit-queue@webkit.org [Thu, 31 Jul 2014 17:42:59 +0000 (17:42 +0000)]
Web Inspector: Right edge of Timeline Record button does not work
https://bugs.webkit.org/show_bug.cgi?id=135444

Patch by Joseph Pecoraro <pecoraro@apple.com> on 2014-07-31
Reviewed by Timothy Hatcher.

When hovering the record button we would show the status text, however
because the left edge of the status text box would overlap the right
edge of the record button causing completely unexpected behavior.

Position the status text correctly so that it never overlaps the record
button. 5px to match the left margin of the record button, and another
2px for some padding between the button and text.

* UserInterface/Views/TimelineSidebarPanel.css:
(.sidebar > .panel.navigation.timeline > .status-bar > .record-status):

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

6 years agoFix uninitialized scalar variable
commit-queue@webkit.org [Thu, 31 Jul 2014 17:40:49 +0000 (17:40 +0000)]
Fix uninitialized scalar variable
https://bugs.webkit.org/show_bug.cgi?id=135461

Patch by Przemyslaw Kuczynski <p.kuczynski@samsung.com> on 2014-07-31
Reviewed by Alexey Proskuryakov.

If fopen fails, returned ApplicationMemoryStats structure will be uninitialized

* Shared/linux/WebMemorySamplerLinux.cpp:
(WebKit::sampleMemoryAllocatedForApplication): Initialized applicationStats.

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

6 years agoBuild warning in webkit/Source/JavaScriptCore/llint/LLIntSlowPaths.cpp
commit-queue@webkit.org [Thu, 31 Jul 2014 17:37:40 +0000 (17:37 +0000)]
Build warning in webkit/Source/JavaScriptCore/llint/LLIntSlowPaths.cpp
https://bugs.webkit.org/show_bug.cgi?id=135414

Patch by Tanay C <tanay.c@samsung.com> on 2014-07-31
Reviewed by Csaba Osztrogonác.

* llint/LLIntSlowPaths.cpp:
(JSC::LLInt::putToScopeCommon):removed unused parameter from function definition

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

6 years agoWeb Inspector: console.profile missing profile information
commit-queue@webkit.org [Thu, 31 Jul 2014 17:34:48 +0000 (17:34 +0000)]
Web Inspector: console.profile missing profile information
https://bugs.webkit.org/show_bug.cgi?id=135432

Patch by Joseph Pecoraro <pecoraro@apple.com> on 2014-07-31
Reviewed by Timothy Hatcher.

Source/WebCore:
By switching console.profile to start/stop the timeline we would
not have a chance to recompile JS functions with profiling information.
This used to work because whenever the inspector was open we would
have profiling information enabled. Go back to that behavior.

* inspector/InspectorController.cpp:
(WebCore::InspectorController::profilerEnabled):
Instead of checking if the timeline agent has started, check if the
timeline agent has been created. Going back to the normal behavior
of always having profiling information when the inspector is open.

* inspector/InspectorTimelineAgent.h:
* inspector/InspectorTimelineAgent.cpp:
(WebCore::InspectorTimelineAgent::didCreateFrontendAndBackend):
Recompile initializing the timeline agent to include profiling information.

(WebCore::InspectorTimelineAgent::willDestroyFrontendAndBackend):
Recompile destrying the timeline agent, only if needed.

(WebCore::InspectorTimelineAgent::willCallFunction):
(WebCore::InspectorTimelineAgent::didCallFunction):
(WebCore::InspectorTimelineAgent::willEvaluateScript):
(WebCore::InspectorTimelineAgent::didEvaluateScript):
Using a boolean to track nested calls would not give expected
behavior when un-nesting. Switch to a counter to ensure that
as we start profiling in the outermost level we then stop
profiling at that same level and not inside an inner nesting.

Source/WebInspectorUI:
* UserInterface/Models/ScriptTimelineRecord.js:
Delete the payload information as soon as it has been processed.
It is no longer needed anymore and can be garbage collected.

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

6 years ago[CSS Font Loading] Test expectations should show success
betravis@adobe.com [Thu, 31 Jul 2014 17:24:38 +0000 (17:24 +0000)]
[CSS Font Loading] Test expectations should show success
https://bugs.webkit.org/show_bug.cgi?id=135420

Reviewed by Bem Jones-Bey.

Modify the expected files to represent success, and skip
the tests until the feature is enabled.

* TestExpectations: Skip the tests.
* fast/css/fontloader-download-error-expected.txt:
* fast/css/fontloader-events-expected.txt:
* fast/css/fontloader-loadingdone-expected.txt:
* fast/css/fontloader-multiple-faces-download-error-expected.txt:
* fast/css/fontloader-multiple-faces-expected.txt:
* fast/css/fontloader-multiple-families-expected.txt:
* http/tests/webfont/fontloader-loading-attribute-expected.txt:

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

6 years agoRefactor EventHandler to call ScrollAnimator::handleWheelEvent for overflow scrolling
commit-queue@webkit.org [Thu, 31 Jul 2014 17:16:08 +0000 (17:16 +0000)]
Refactor EventHandler to call ScrollAnimator::handleWheelEvent for overflow scrolling
https://bugs.webkit.org/show_bug.cgi?id=135195

Patch by Wenson Hsieh <wenson_hsieh@apple.com> on 2014-07-31
Reviewed by Beth Dakin.

ScrollableArea::handleWheelEvent is not currently being used to handle wheel events for overflow scrolling; it instead directly invokes ScrollableArea::scroll.
In order to expose wheel phases on Mac, the PlatformWheelEvent itself should propagate down to ScrollableArea, not just the scroll granularity, direction and
multiplier required by ScrollableArea::scroll. With this patch, PlatformWheelEvent will be "shipped" along with the WheelEvent.

No new tests, since behavior should not have changed.

* page/EventHandler.cpp:
(WebCore::didScrollInScrollableAreaForSingleAxis): Calls ScrollableArea::scroll directly using WheelEvent's data. Used to handle programmatic WheelEvents, e.g. from JavaScript.
(WebCore::handleWheelEventInAppropriateEnclosingBoxForSingleAxis): Finds the correct ScrollableArea and attempts to scroll it using the information contained in the WheelEvent via ScrollableArea::handleWheelEvent
(WebCore::EventHandler::defaultWheelEventHandler): Updated to use handleWheelEventInAppropriateEnclosingBoxForSingleAxis instead of scrollNode.
(WebCore::scrollNode): Deleted.
* rendering/RenderListBox.h: Made RenderListBox::scroll public so it can be invoked from EventHandler::handleWheelEventInAppropriateEnclosingBoxForSingleAxis.
* rendering/RenderNamedFlowThread.cpp: Refactored to let EventHandler update nextScrollBlock in the case of isRenderNamedFlowThread().
(WebCore::RenderNamedFlowThread::fragmentFromRenderBoxAsRenderBlock):
* rendering/RenderNamedFlowThread.h:

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

6 years agoClean up the WebKit build from unused parameter warning in Webkit2/WebProcess module
commit-queue@webkit.org [Thu, 31 Jul 2014 17:15:10 +0000 (17:15 +0000)]
Clean up the WebKit build from unused parameter warning in Webkit2/WebProcess module
https://bugs.webkit.org/show_bug.cgi?id=135413

Patch by Rohit Kumar <kumar.rohit@samsung.com> on 2014-07-31
Reviewed by Darin Adler.

* WebProcess/OriginData/WebOriginDataManager.cpp:
(WebKit::WebOriginDataManager::getOrigins):
(WebKit::WebOriginDataManager::deleteEntriesForOrigin):
(WebKit::WebOriginDataManager::deleteEntriesModifiedBetweenDates):
(WebKit::WebOriginDataManager::deleteAllEntries):

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

6 years agoAX: iOS: Crash accessing m_page in WKAccessibilityPageObject
cfleizach@apple.com [Thu, 31 Jul 2014 17:11:30 +0000 (17:11 +0000)]
AX: iOS: Crash accessing m_page in WKAccessibilityPageObject
https://bugs.webkit.org/show_bug.cgi?id=134617

Reviewed by Darin Adler.

Provide a way to detach a WK2 WebPage object so that it can uninitialize other pointers, like the accessibility object.

* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::~WebPage):
* WebProcess/WebPage/WebPage.h:
* WebProcess/WebPage/efl/WebPageEfl.cpp:
(WebKit::WebPage::platformDetach):
* WebProcess/WebPage/gtk/WebPageGtk.cpp:
(WebKit::WebPage::platformDetach):
* WebProcess/WebPage/ios/WebPageIOS.mm:
(WebKit::WebPage::platformDetach):
* WebProcess/WebPage/mac/WebPageMac.mm:
(WebKit::WebPage::platformDetach):

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

6 years ago[WK2] Regression tests can't load HTTPS pages with NetworkProcess due to self-signed...
mitz@apple.com [Thu, 31 Jul 2014 16:45:19 +0000 (16:45 +0000)]
[WK2] Regression tests can't load HTTPS pages with NetworkProcess due to self-signed certificate
https://bugs.webkit.org/show_bug.cgi?id=115282

Reviewed by Sam Weinig.

Tools:
* WebKitTestRunner/TestController.cpp:
(WTR::TestController::canAuthenticateAgainstProtectionSpaceInFrame): Return true for any
local host server trust protection space.
(WTR::TestController::didReceiveAuthenticationChallengeInFrame): Respond with a non-empty
credential to server trust challenges.

LayoutTests:
* platform/mac-wk2/TestExpectations: Removed the exceptions listed under this bug.

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

6 years agoSource/WebCore: WebCore part of: Server trust authentication challenges aren’t sent...
mitz@apple.com [Thu, 31 Jul 2014 16:43:06 +0000 (16:43 +0000)]
Source/WebCore: WebCore part of: Server trust authentication challenges aren’t sent to the navigation delegate
https://bugs.webkit.org/show_bug.cgi?id=135327

Reviewed by Alexey Proskuryakov.

* platform/network/cf/ResourceHandleCFNet.cpp:
(WebCore::ResourceHandle::receivedCredential): Don’t try to change the persistence of
credentials used for server trust, because the platform doesn’t support persistence values
other than Session for server trust.
* platform/network/mac/ResourceHandleMac.mm:
(WebCore::ResourceHandle::receivedCredential): Ditto.

Source/WebKit2: WebKit part of: Server trust authentication challenges aren’t sent to the navigation delegate
https://bugs.webkit.org/show_bug.cgi?id=135327

Reviewed by Alexey Proskuryakov.

* UIProcess/Cocoa/NavigationState.mm:
(WebKit::NavigationState::LoaderClient::canAuthenticateAgainstProtectionSpaceInFrame):
Return true for server trust protection spaces if the delegate implements
-webView:didReceiveAuthenticationChallenge:completionHandler:.
(WebKit::NavigationState::LoaderClient::didReceiveAuthenticationChallengeInFrame): Removed
an assertion that is no longer true due to the above.

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

6 years agoTried to fix building with the OS X 10.9 SDK while targeting OS X 10.8.
mitz@apple.com [Thu, 31 Jul 2014 16:41:40 +0000 (16:41 +0000)]
Tried to fix building with the OS X 10.9 SDK while targeting OS X 10.8.

* platform/network/cocoa/CredentialCocoa.mm:
(WebCore::toCredentialPersistence):

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

6 years ago[webkitpy] Make diff_text generate correct diff if there is no newline at the end...
commit-queue@webkit.org [Thu, 31 Jul 2014 16:24:02 +0000 (16:24 +0000)]
[webkitpy] Make diff_text generate correct diff if there is no newline at the end of file
https://bugs.webkit.org/show_bug.cgi?id=135381

Patch by Tibor Meszaros <tmeszaros.u-szeged@partner.samsung.com> on 2014-07-31
Reviewed by Csaba Osztrogonác.

* Scripts/webkitpy/port/base.py:
(Port.diff_text):
* Scripts/webkitpy/port/base_unittest.py:
(PortTest.test_diff_text):

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

6 years agoReverted r171854, because it broke building with the OS X 10.8 SDK.
mitz@apple.com [Thu, 31 Jul 2014 16:16:14 +0000 (16:16 +0000)]
Reverted r171854, because it broke building with the OS X 10.8 SDK.

* platform/network/cocoa/CredentialCocoa.mm:
(WebCore::toCredentialPersistence):

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

6 years agoTried to fix building with the OS X 10.9 SDK while targeting OS X 10.8.
mitz@apple.com [Thu, 31 Jul 2014 16:07:14 +0000 (16:07 +0000)]
Tried to fix building with the OS X 10.9 SDK while targeting OS X 10.8.

* platform/network/cocoa/CredentialCocoa.mm:
(WebCore::toCredentialPersistence):

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

6 years agoUnreviewed EFL gardening
m.pakula@samsung.com [Thu, 31 Jul 2014 15:58:06 +0000 (15:58 +0000)]
Unreviewed EFL gardening

Update test expectations for crashing tests.

* platform/efl/TestExpectations:

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

6 years agoNewFunctionExpression and NewFunctionNoCheck should setHaveStructures(true)
fpizlo@apple.com [Thu, 31 Jul 2014 15:21:42 +0000 (15:21 +0000)]
NewFunctionExpression and NewFunctionNoCheck should setHaveStructures(true)
https://bugs.webkit.org/show_bug.cgi?id=135430

Reviewed by Mark Hahnenberg.

We already handled this correctly after the ftlopt merge, but it's useful to have the test.

* tests/stress/new-function-expression-has-structures.js: Added.
(foo.f):
(foo.f.prototype.f):
(foo):

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

6 years agoREGRESSION(??): [iOS] Disabling MediaPlaybackRequiresUserGesture does not remove...
jer.noble@apple.com [Thu, 31 Jul 2014 15:08:29 +0000 (15:08 +0000)]
REGRESSION(??): [iOS] Disabling MediaPlaybackRequiresUserGesture does not remove user gesture requirement for entering full screen.
https://bugs.webkit.org/show_bug.cgi?id=135443

Reviewed by Dean Jackson.

Allow full screen mode to be entered without a user gesture if the gesture requirement for media playback
has been unset.

* html/HTMLMediaElement.cpp:
(WebCore::HTMLMediaElement::HTMLMediaElement):

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

6 years agoUnreviewed. Update OptionsGTK.cmake and NEWS for 2.5.1 release.
carlosgc@webkit.org [Thu, 31 Jul 2014 14:05:05 +0000 (14:05 +0000)]
Unreviewed. Update OptionsGTK.cmake and NEWS for 2.5.1 release.

.:
* Source/cmake/OptionsGTK.cmake: Bump version numbers.

Source/WebKit2:
* gtk/NEWS: Add release notes for 2.5.1.

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

6 years ago2014-07-31 Andrei Bucur <abucur@adobe.com>
abucur@adobe.com [Thu, 31 Jul 2014 13:43:52 +0000 (13:43 +0000)]
2014-07-31  Andrei Bucur  <abucur@adobe.com>

[CSS Multicolumn] Clear the lines when switching to multi-column layout
https://bugs.webkit.org/show_bug.cgi?id=135127

Reviewed by Alexandru Chiculita.

Source/WebCore:

When switching an element to multi-column layout it becomes a container of block
children. When this happens the existing line boxes must be deleted in addition
to clearing the hasInlineChildren flag.

Tests: fast/multicol/inline-container-to-multicol.html
       fast/multicol/inline-container-to-multicol-float.html
       fast/multicol/inline-container-to-multicol-positioned.html

* rendering/RenderBlockFlow.cpp:
(WebCore::RenderBlockFlow::createMultiColumnFlowThread):

LayoutTests:

Tests that verifies lines are correctly cleared when an element is switched to
multi-column layout.

* fast/multicol/inline-container-to-multicol-expected.txt: Added.
* fast/multicol/inline-container-to-multicol.html: Added.
* fast/multicol/inline-container-to-multicol-float-expected.txt: Added.
* fast/multicol/inline-container-to-multicol-float.html: Added.
* fast/multicol/inline-container-to-multicol-positioned-expected.txt: Added.
* fast/multicol/inline-container-to-multicol-positioned.html: Added.

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

6 years agoUnreviewed. Fix GTK+ make distcheck.
carlosgc@webkit.org [Thu, 31 Jul 2014 13:18:24 +0000 (13:18 +0000)]
Unreviewed. Fix GTK+ make distcheck.

Source/WebKit2:
* Shared/InteractionInformationAtPosition.h: Only include
WebCore/SelectionRect.h for IOS.

Tools:
* gtk/make-dist.py:
(ensure_version_if_possible): Use 4.0 instead of 3.0 as binary
version to find the pkg-config file.
* gtk/manifest.txt: Add missing resource to the tarball.

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

6 years ago[GTK] make distcheck is building from sources dir instead of dist dir
carlosgc@webkit.org [Thu, 31 Jul 2014 12:27:14 +0000 (12:27 +0000)]
[GTK] make distcheck is building from sources dir instead of dist dir
https://bugs.webkit.org/show_bug.cgi?id=135457

Reviewed by Philippe Normand.

* gtk/make-dist.py:
(Distcheck.configure): Use dist_dir as source dir.
(Distcheck.check): Pass dist_dir to configure().

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

6 years ago[GTK] Bump binary version for 2.6
carlosgc@webkit.org [Thu, 31 Jul 2014 09:16:57 +0000 (09:16 +0000)]
[GTK] Bump binary version for 2.6
https://bugs.webkit.org/show_bug.cgi?id=133724

Reviewed by Philippe Normand.

.:
* Source/cmake/OptionsGTK.cmake: Bump binary version to 4.0 and
update library version numbers.

Source/WebKit2:
* PlatformGTK.cmake: Fix JavaScriptCore dependency on
instrospection commands and make them depend on GTK+-3.0.

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

6 years ago[GTK] Do not include files that are not in git in the tarball
carlosgc@webkit.org [Thu, 31 Jul 2014 08:41:33 +0000 (08:41 +0000)]
[GTK] Do not include files that are not in git in the tarball
https://bugs.webkit.org/show_bug.cgi?id=134804

Reviewed by Philippe Normand.

Skip all files in the source tree that are not under version control
except for files added from the build dir like the documentation.

* gtk/make-dist.py:
(Directory.__init__): Initialize the list of files under control version.
(Directory.list_cms_files): Helper function to list all files
under the control version for the current source root.
(Directory.should_skip_file): Return True for files that are not
under control version only when the source root is also under
control version.
(Directory.get_files): Filter the files also using should_skip_file().

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

6 years agoSpeculative Windows build fixery, part II.
akling@apple.com [Thu, 31 Jul 2014 07:36:44 +0000 (07:36 +0000)]
Speculative Windows build fixery, part II.

This seems to indicate that adding the globalObjectTable to the exports file
was the wrong idea:

1>WebKit.exp : error LNK2001: unresolved external symbol "struct JSC::HashTable const JSC::globalObjectTable" (?globalObjectTable@JSC@@3UHashTable@1@B)

* WebKit.vcxproj/WebKitExportGenerator/WebKitExports.def.in:

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

6 years agoSpeculative Windows build fix.
akling@apple.com [Thu, 31 Jul 2014 06:51:47 +0000 (06:51 +0000)]
Speculative Windows build fix.

Try to dllimport the dllexported global object HashTable.

* jsc.cpp:
* testRegExp.cpp:

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

6 years agoPropertyName's internal string is always atomic.
akling@apple.com [Thu, 31 Jul 2014 05:38:30 +0000 (05:38 +0000)]
PropertyName's internal string is always atomic.
<https://webkit.org/b/135451>

Source/JavaScriptCore:
Now that we've merged the JSC::Identifier and WTF::AtomicString tables,
we know that any string that's an Identifier is guaranteed to be atomic.

A PropertyName can be either an Identifier or a PrivateName, and the
private names are also guaranteed to be atomic internally.

Make PropertyName vend AtomicStringImpl* instead of StringImpl*.

Reviewed by Benjamin Poulain.

* runtime/PropertyName.h:
(JSC::PropertyName::PropertyName):
(JSC::PropertyName::uid):
(JSC::PropertyName::publicName):

Source/WebCore:
Use PropertyName::publicName() directly instead of taking the slow route
through AtomicString::findStringWithHash().

These strings are always atomic, and findStringWithHash() would trudge
through a full hash lookup just to discover that indeed, they are!

Reviewed by Benjamin Poulain.

* bindings/js/JSDOMBinding.cpp:
(WebCore::findAtomicString): Deleted.
* bindings/js/JSDOMBinding.h:
* bindings/js/JSDOMWindowCustom.cpp:
(WebCore::namedItemGetter):
(WebCore::JSDOMWindow::getOwnPropertySlot):
(WebCore::JSDOMWindow::getOwnPropertySlotByIndex):
* bindings/js/JSHTMLDocumentCustom.cpp:
(WebCore::JSHTMLDocument::canGetItemsForName):
(WebCore::JSHTMLDocument::nameGetter):

Source/WTF:
Remove AtomicString::findStringWithHash() since nobody uses it anymore.

Reviewed by Benjamin Poulain.

* wtf/text/AtomicString.cpp:
(WTF::findString): Deleted.
(WTF::AtomicString::findStringWithHash): Deleted.
* wtf/text/AtomicString.h:

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

6 years agoAdd a layout test for Geolocation's request queueing for hidden pages
benjamin@webkit.org [Thu, 31 Jul 2014 03:19:12 +0000 (03:19 +0000)]
Add a layout test for Geolocation's request queueing for hidden pages
https://bugs.webkit.org/show_bug.cgi?id=135402

Patch by Benjamin Poulain <bpoulain@apple.com> on 2014-07-30
Reviewed by Zalan Bujtas.

Sam added the queueing feature in r171188. This patch adds a layout test
for the simplest case.

* fast/dom/Geolocation/requestQueuingForHiddenPage-expected.txt: Added.
* fast/dom/Geolocation/requestQueuingForHiddenPage.html: Added.

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

6 years agoElementRuleCollector: group the shadow tree code
benjamin@webkit.org [Thu, 31 Jul 2014 03:18:40 +0000 (03:18 +0000)]
ElementRuleCollector: group the shadow tree code
https://bugs.webkit.org/show_bug.cgi?id=135410

Reviewed by Andreas Kling.

* css/ElementRuleCollector.cpp:
(WebCore::ElementRuleCollector::collectMatchingRules):
Little cleanup: group the shadow tree rule collection in the same block.

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

6 years agoCleanup DetailsMarkerControl
benjamin@webkit.org [Thu, 31 Jul 2014 03:17:39 +0000 (03:17 +0000)]
Cleanup DetailsMarkerControl
https://bugs.webkit.org/show_bug.cgi?id=135429

Reviewed by Andreas Kling.

Remove the override of shadowPseudoId(). This is a simple type of shadowId,
it should use the generic pseudo() path.

Move DetailsMarkerControl::create() out-of-line. One could justify inlining the constructor,
inlining the ::create() function has little value.

* html/shadow/DetailsMarkerControl.cpp:
(WebCore::DetailsMarkerControl::create):
(WebCore::DetailsMarkerControl::DetailsMarkerControl):
(WebCore::DetailsMarkerControl::rendererIsNeeded):
(WebCore::DetailsMarkerControl::shadowPseudoId): Deleted.
(WebCore::DetailsMarkerControl::summaryElement): Deleted.
* html/shadow/DetailsMarkerControl.h:
(WebCore::DetailsMarkerControl::create): Deleted.

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

6 years agoRemove UploadButtonElement::shadowPseudoId()
benjamin@webkit.org [Thu, 31 Jul 2014 03:16:52 +0000 (03:16 +0000)]
Remove UploadButtonElement::shadowPseudoId()
https://bugs.webkit.org/show_bug.cgi?id=135435

Patch by Benjamin Poulain <bpoulain@apple.com> on 2014-07-30
Reviewed by Andreas Kling.

Use the generic pseudo() path instead of a custom shadowPseudoId().

* html/FileInputType.cpp:
(WebCore::UploadButtonElement::create):
(WebCore::UploadButtonElement::createForMultiple):
(WebCore::UploadButtonElement::UploadButtonElement):
Set the type in the common constructor instead of the call sites.
(WebCore::UploadButtonElement::shadowPseudoId): Deleted.
* html/FileInputType.h:

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

6 years agoRemove SpinButtonElement::shadowPseudoId
benjamin@webkit.org [Thu, 31 Jul 2014 03:16:05 +0000 (03:16 +0000)]
Remove SpinButtonElement::shadowPseudoId
https://bugs.webkit.org/show_bug.cgi?id=135436

Patch by Benjamin Poulain <bpoulain@apple.com> on 2014-07-30
Reviewed by Andreas Kling.

Use the generic pseudo.

* html/shadow/SpinButtonElement.cpp:
(WebCore::SpinButtonElement::SpinButtonElement):
(WebCore::SpinButtonElement::shadowPseudoId): Deleted.
* html/shadow/SpinButtonElement.h:

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

6 years agoClean up YouTubeEmbedShadowElement
benjamin@webkit.org [Thu, 31 Jul 2014 03:15:10 +0000 (03:15 +0000)]
Clean up YouTubeEmbedShadowElement
https://bugs.webkit.org/show_bug.cgi?id=135437

Patch by Benjamin Poulain <bpoulain@apple.com> on 2014-07-30
Reviewed by Andreas Kling.

* html/shadow/YouTubeEmbedShadowElement.cpp:
(WebCore::YouTubeEmbedShadowElement::YouTubeEmbedShadowElement):
(WebCore::YouTubeEmbedShadowElement::pluginElement): Deleted.
This is unused in WebCore.

(WebCore::YouTubeEmbedShadowElement::shadowPseudoId): Deleted.
Use the generic pseudo path instead of a custom shadowPseudoId.
* html/shadow/YouTubeEmbedShadowElement.h:

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