ChangeLog-2011-06-04 [plain text]
2011-06-04 Darin Adler <darin@apple.com>
Reviewed by Anders Carlsson.
[Mac WebKit2] REGRESSION (r86692): Synchronous XMLHttpRequest hangs in credential shim (affects Netgear ReadyNAS admin page)
https://bugs.webkit.org/show_bug.cgi?id=62094
rdar://problem/9539204
* WebCore.exp.in: Export ResourceHandle::synchronousLoadRunLoopMode.
* platform/network/ResourceHandle.h: Add synchronousLoadRunLoopMode.
* platform/network/cf/ResourceHandleCFNet.cpp:
(WebCore::ResourceHandle::synchronousLoadRunLoopMode): Added.
(WebCore::ResourceHandle::loadResourceSynchronously): Call synchronousLoadRunLoopMode.
* platform/network/mac/ResourceHandleMac.mm:
(WebCore::ResourceHandle::synchronousLoadRunLoopMode): Added.
(WebCore::ResourceHandle::loadResourceSynchronously): Call synchronousLoadRunLoopMode.
2011-06-04 Eric Seidel <eric@webkit.org>
Reviewed by Adam Barth.
Add InlineWalker class to hold state for repeated calls to bidiNext
https://bugs.webkit.org/show_bug.cgi?id=60724
This is one more little step towards removing (naked) bidiNext usage.
More refactoring is required before all callers of bidiNext can move
onto using an InlineWalker instead of bidiNext directly.
No change in behavior, thus no tests.
* rendering/InlineIterator.h:
(WebCore::InlineWalker::InlineWalker):
(WebCore::InlineWalker::root):
(WebCore::InlineWalker::current):
(WebCore::InlineWalker::atEndOfInline):
(WebCore::InlineWalker::atEnd):
(WebCore::InlineWalker::advance):
* rendering/RenderBlock.cpp:
(WebCore::RenderBlock::simplifiedNormalFlowLayout):
* rendering/RenderBlockLineLayout.cpp:
(WebCore::RenderBlock::layoutInlineChildren):
2011-06-04 Sam Weinig <sam@webkit.org>
Reviewed by Anders Carlsson.
WebKit2 needs to know when a scroll is happening due to the ScrollAnimator
https://bugs.webkit.org/show_bug.cgi?id=62093
Add additional ChromeClient functions to indicate the beginning and end of
the various ScrollAnimator animations. Change existing notification that a
rubber-band has completed for the main frame to be triggered for all frames.
* page/ChromeClient.h:
(WebCore::ChromeClient::didStartRubberBandForFrame):
(WebCore::ChromeClient::didCompleteRubberBandForFrame):
(WebCore::ChromeClient::didStartAnimatedScroll):
(WebCore::ChromeClient::didCompleteAnimatedScroll):
* page/FrameView.cpp:
(WebCore::FrameView::didStartRubberBand):
(WebCore::FrameView::didCompleteRubberBand):
(WebCore::FrameView::didStartAnimatedScroll):
(WebCore::FrameView::didCompleteAnimatedScroll):
* page/FrameView.h:
* platform/ScrollableArea.h:
(WebCore::ScrollableArea::didStartRubberBand):
(WebCore::ScrollableArea::didStartAnimatedScroll):
(WebCore::ScrollableArea::didCompleteAnimatedScroll):
* platform/mac/ScrollAnimatorMac.h:
* platform/mac/ScrollAnimatorMac.mm:
(-[ScrollAnimationHelperDelegate _immediateScrollToPoint:]):
(WebCore::ScrollAnimatorMac::scroll):
(WebCore::ScrollAnimatorMac::immediateScrollToPointForScrollAnimation):
(WebCore::ScrollAnimatorMac::snapRubberBandTimerFired):
2011-06-04 Martin Robinson <mrobinson@igalia.com>
Touch a file to try to fix the GTK+ build on the 32-bit bot.
* testing/Internals.idl: Touch this IDL file in an effort to fix the build.
2011-06-04 Martin Robinson <mrobinson@igalia.com>
Fix the GTK+ build.
* bindings/gobject/GNUmakefile.am: Make the GObject build less noisy.
2011-06-03 Dimitri Glazkov <dglazkov@chromium.org>
Reviewed by Darin Adler.
Convert file <input> to use the new shadow DOM model
https://bugs.webkit.org/show_bug.cgi?id=59005
Refactoring, covered by existing tests.
* css/CSSSelector.cpp:
(WebCore::CSSSelector::pseudoId): Removed FILE_UPLOAD_BUTTON pseudoId and all references to it.
(WebCore::nameToPseudoTypeMap): Ditto.
(WebCore::CSSSelector::extractPseudoType): Ditto.
* css/CSSSelector.h: Ditto.
* css/html.css:
(input[type="button"], input[type="submit"], input[type="reset"]): Moved -webkit-file-upload-button to its own rule.
(input[type="file"]::-webkit-file-upload-button): Added and moved all previously hard-coded properties there.
* html/FileInputType.cpp:
(WebCore::UploadButtonElement::create): Added.
(WebCore::UploadButtonElement::UploadButtonElement): Added.
(WebCore::UploadButtonElement::shadowPseudoId): Added.
(WebCore::FileInputType::createShadowSubtree): Added.
* html/FileInputType.h: Added createShadowSubtree decl.
* page/DragController.cpp:
(WebCore::asFileInput): Changed the logic to use new shadow DOM.
* rendering/RenderFileUploadControl.cpp: Removed UploadButton class.
(WebCore::RenderFileUploadControl::~RenderFileUploadControl): Removed initializer for m_button.
(WebCore::RenderFileUploadControl::updateFromElement): Removed attachment logic that's no longer necessary.
(WebCore::nodeWidth): Added a helper.
(WebCore::RenderFileUploadControl::maxFilenameWidth): Changed to use uploadButton and nodeWidth.
(WebCore::RenderFileUploadControl::paintObject): Ditto.
(WebCore::RenderFileUploadControl::uploadButton): Added a helper to retrieve the button.
(WebCore::RenderFileUploadControl::buttonValue): Changed to use uploadButton.
* rendering/RenderFileUploadControl.h: Changed decls.
* rendering/style/RenderStyleConstants.h: Removed FILE_UPLOAD_BUTTON decls.
2011-06-04 Alexey Proskuryakov <ap@apple.com>
Reviewed by Darin Adler.
Input value sanitization for text fields is incorrect
https://bugs.webkit.org/show_bug.cgi?id=62061
<rdar://problem/9553273>
Newline characters should be removed according to HTML5, not replaced with spaces.
This also matches Safari 5 behavior.
* html/TextFieldInputType.cpp:
(WebCore::isASCIILineBreak): A functor for removeCharacters().
(WebCore::limitLength): Do one thing at once.
(WebCore::TextFieldInputType::sanitizeValue): Sanitization removes newlines.
(WebCore::TextFieldInputType::handleBeforeTextInsertedEvent): Moved (somewhat surprising)
code that replaces newlines with spaces here.
2011-06-04 Jeffrey Pfau <jpfau@apple.com>
Reviewed by Beth Dakin.
Crash in WebCore::RenderMathMLSubSup::baselinePosition()
https://bugs.webkit.org/show_bug.cgi?id=57897
Simple patch adding NULL checks in each function.
Test: mathml/msubsup-remove-children.xhtml
* rendering/mathml/RenderMathMLSubSup.cpp:
(WebCore::RenderMathMLSubSup::stretchToHeight):
(WebCore::RenderMathMLSubSup::baselinePosition):
2011-06-04 Nico Weber <thakis@chromium.org>
Reviewed by James Robinson.
Give IDBBackingStore::Transaction a virtual destructor
https://bugs.webkit.org/show_bug.cgi?id=62063
IDBLevelDBBackingStore::createTransaction() hands out a
PassRefPtr<IDBBackingStore::Transaction>, which means the missing
virtual destructor is a real bug.
* storage/IDBBackingStore.h:
(WebCore::IDBBackingStore::Transaction::~Transaction):
2011-06-04 Emil A Eklund <eae@chromium.org>
Reviewed by Eric Seidel.
Convert RenderBox::overflowClipRect to IntPoint
https://bugs.webkit.org/show_bug.cgi?id=62032
Covered by existing tests.
* editing/Editor.cpp:
(WebCore::Editor::insideVisibleArea):
* platform/graphics/IntRect.h:
(WebCore::IntRect::contract):
* rendering/RenderBlock.cpp:
(WebCore::RenderBlock::nodeAtPoint):
* rendering/RenderBox.cpp:
(WebCore::RenderBox::pushContentsClip):
(WebCore::RenderBox::overflowClipRect):
* rendering/RenderBox.h:
* rendering/RenderBoxModelObject.cpp:
(WebCore::RenderBoxModelObject::paintFillLayerExtended):
* rendering/RenderLayer.cpp:
(WebCore::RenderLayer::calculateClipRects):
(WebCore::RenderLayer::calculateRects):
(WebCore::RenderLayer::repaintBlockSelectionGaps):
* rendering/RenderLayerBacking.cpp:
(WebCore::clipBox):
* rendering/RenderTable.cpp:
(WebCore::RenderTable::overflowClipRect):
(WebCore::RenderTable::nodeAtPoint):
* rendering/RenderTable.h:
* rendering/RenderTableSection.cpp:
(WebCore::RenderTableSection::nodeAtPoint):
* rendering/svg/RenderSVGRoot.cpp:
(WebCore::RenderSVGRoot::paint):
2011-06-04 Adam Barth <abarth@webkit.org>
Reviewed by Eric Seidel.
V8Proxy::disconnectFrame doesn't do anything
https://bugs.webkit.org/show_bug.cgi?id=62051
Dead code should die.
* bindings/v8/ScriptController.cpp:
(WebCore::ScriptController::~ScriptController):
* bindings/v8/V8Proxy.cpp:
* bindings/v8/V8Proxy.h:
2011-06-04 Nico Weber <thakis@chromium.org>
Reviewed by James Robinson.
Make the destructors of DataTransferItem and DataTransferItems virtual
https://bugs.webkit.org/show_bug.cgi?id=62052
Clang has grown a new warning that warns on |delete ptr| if ptr's
class is non-final, has virtual methods, but no virtual destructor.
This warning finds real bugs, so we want to keep it enabled. However,
it also warns about DataTransferItem[s]. Since these are subclassed,
they can't be made final, so make their destructors virtual. (Maybe
clang's warning even points out an actual bug here.)
* dom/DataTransferItem.h:
(WebCore::DataTransferItem::~DataTransferItem):
* dom/DataTransferItems.h:
(WebCore::DataTransferItems::~DataTransferItems):
2011-06-04 Nico Weber <thakis@chromium.org>
Reviewed by James Robinson.
[chromium] Make LayerPainterChromium destructor virtual
https://bugs.webkit.org/show_bug.cgi?id=62056
LayerTextureUpdaterCanvas has an OwnPtr<LayerPainterChromium>, which
means that without this patch, the destructor of classes implementing
LayerPainterChromium wasn't called correctly in that case.
* platform/graphics/chromium/LayerPainterChromium.h:
(WebCore::LayerPainterChromium::~LayerPainterChromium):
2011-06-04 Emil A Eklund <eae@chromium.org>
Reviewed by Andreas Kling.
Fix IntRect::expand(const IntSize& size)
https://bugs.webkit.org/show_bug.cgi?id=62042
No new tests.
* platform/graphics/IntRect.h:
(WebCore::IntRect::expand):
Fix IntRect::expand to expand the size rather than move the location.
Currently unused.
2011-06-03 Alexey Proskuryakov <ap@apple.com>
Reviewed by Darin Adler.
ResourceHandleMac should always respond to an authentication challenge
https://bugs.webkit.org/show_bug.cgi?id=61667
I don't know if this can actually happen in practice, so no new tests.
* platform/network/mac/ResourceHandleMac.mm:
(-[WebCoreResourceHandleAsDelegate connection:didReceiveAuthenticationChallenge:]):
Cancel authentication challenge if we don't have a client. We must always respond to the
challenge to release the connection, and there is nothing else to do in this state anyway.
2011-06-03 Dan Bernstein <mitz@apple.com>
Try to fix the Apple LLVM Compiler build after r88087.
* rendering/RenderTableCell.cpp:
(WebCore::RenderTableCell::paintMask):
* rendering/RenderTableCell.h:
2011-06-03 Chris Rogers <crogers@google.com>
Unreviewed build fix.
Fix clang build - take 2
https://bugs.webkit.org/show_bug.cgi?id=62081
* webaudio/AudioParamTimeline.cpp:
(WebCore::AudioParamTimeline::valuesForTimeRangeImpl):
2011-06-03 Chris Rogers <crogers@google.com>
Unreviewed clang build fix.
Fix clang build
https://bugs.webkit.org/show_bug.cgi?id=62080
* webaudio/AudioParamTimeline.cpp:
(WebCore::AudioParamTimeline::valuesForTimeRangeImpl):
2011-06-03 Levi Weintraub <leviw@chromium.org>
Reviewed by Eric Seidel.
Switch paintMask and paintObject to use IntPoint
https://bugs.webkit.org/show_bug.cgi?id=62077
Switching paintMask and paintObject to use IntPoint for their paint offset instead of
a pair of ints. paintObject is still on tx/ty, but paintMask was converted to IntSize
passed by value -- bringing it in-line with the agreed-upon convention of a const IntPoint&.
No new tests since this is simple refactoring.
* rendering/RenderBlock.cpp:
(WebCore::RenderBlock::paint):
(WebCore::RenderBlock::paintObject):
* rendering/RenderBlock.h:
* rendering/RenderBox.cpp:
(WebCore::RenderBox::paintMask):
(WebCore::RenderBox::pushContentsClip):
(WebCore::RenderBox::popContentsClip):
* rendering/RenderBox.h:
(WebCore::RenderBox::paintObject):
* rendering/RenderFieldset.cpp:
(WebCore::RenderFieldset::paintMask):
* rendering/RenderFieldset.h:
* rendering/RenderFileUploadControl.cpp:
(WebCore::RenderFileUploadControl::paintObject):
* rendering/RenderFileUploadControl.h:
* rendering/RenderListBox.cpp:
(WebCore::RenderListBox::paintObject):
* rendering/RenderListBox.h:
* rendering/RenderReplaced.cpp:
(WebCore::RenderReplaced::paint):
* rendering/RenderReplica.cpp:
(WebCore::RenderReplica::paint):
* rendering/RenderTable.cpp:
(WebCore::RenderTable::paint):
(WebCore::RenderTable::paintObject):
(WebCore::RenderTable::paintMask):
* rendering/RenderTable.h:
* rendering/RenderTableSection.cpp:
(WebCore::RenderTableSection::paint):
(WebCore::RenderTableSection::paintObject):
* rendering/RenderTableSection.h:
* rendering/RenderTextControl.cpp:
(WebCore::RenderTextControl::paintPlaceholder):
(WebCore::RenderTextControl::paintObject):
* rendering/RenderTextControl.h:
* rendering/RenderView.cpp:
(WebCore::RenderView::paint):
* rendering/RenderWidget.cpp:
(WebCore::RenderWidget::paint):
2011-06-03 Cary Clark <caryclark@google.com>
Reviewed by Eric Seidel.
Support FontCustomPlatformData on Skia-Mac-Chrome variant
https://bugs.webkit.org/show_bug.cgi?id=62040
Canvas text is only recognized by Skia if it is registered
by creating a new SkTypeface. Skia uses CGFont to measure
and render the glyphs, then takes care of managing the glyph
cache.
Skia on Mac Chrome is not yet enabled, so this change
does not affect existing code, and requires no new tests.
* platform/graphics/mac/FontCustomPlatformData.cpp:
(WebCore::RemoteFontStream::RemoteFontStream):
(WebCore::RemoteFontStream::~RemoteFontStream):
(WebCore::RemoteFontStream::rewind):
(WebCore::RemoteFontStream::read):
Turn the buffer into a stream. This is identical to
the implementation in skia/FontCustomPlatformData.cpp.
While that file could be modified instead of this one,
it was simpler to add SkTypeface streaming to this instead
of adding all CGFont support to the skia platform file.
(WebCore::FontCustomPlatformData::~FontCustomPlatformData):
Release the SkTypeface reference.
(WebCore::createFontCustomPlatformData):
Associate the buffer stream with a SkTypeface so Skia
can find the custom font data.
* platform/graphics/mac/FontCustomPlatformData.h:
(WebCore::FontCustomPlatformData::FontCustomPlatformData):
Add a slot to hold the SkTypeface.
2011-06-03 Steve Falkenburg <sfalken@apple.com>
Reviewed by Brian Weinstein.
HistoryItem children persist across page loads
https://bugs.webkit.org/show_bug.cgi?id=62071
<rdar://problem/9552129>
Not testable since there's no way to check for the presence/absence
of children for a HistoryItem.
* history/HistoryItem.cpp:
(WebCore::HistoryItem::reset): Call clearChildren when we're reusing a HistoryItem.
2011-06-03 Chris Rogers <crogers@google.com>
Reviewed by Kenneth Russell.
Allow existing AudioParams to use scheduled parameter changes
https://bugs.webkit.org/show_bug.cgi?id=62046
No new tests since audio API is not yet implemented.
* platform/audio/AudioBus.cpp:
(WebCore::AudioBus::processWithGainFrom):
(WebCore::AudioBus::copyWithSampleAccurateGainValuesFrom):
* platform/audio/AudioBus.h:
* webaudio/AudioBufferSourceNode.cpp:
(WebCore::AudioBufferSourceNode::AudioBufferSourceNode):
* webaudio/AudioGainNode.cpp:
(WebCore::AudioGainNode::AudioGainNode):
(WebCore::AudioGainNode::process):
* webaudio/AudioGainNode.h:
* webaudio/HighPass2FilterNode.cpp:
(WebCore::HighPass2FilterNode::HighPass2FilterNode):
* webaudio/LowPass2FilterNode.cpp:
(WebCore::LowPass2FilterNode::LowPass2FilterNode):
2011-06-03 Chris Rogers <crogers@google.com>
Reviewed by Kenneth Russell.
Biquad filter coefficient naming is incorrect
https://bugs.webkit.org/show_bug.cgi?id=62053
No new tests since audio API is not yet implemented.
* platform/audio/Biquad.cpp:
(WebCore::Biquad::Biquad):
(WebCore::Biquad::process):
(WebCore::Biquad::processFast):
(WebCore::Biquad::setLowpassParams):
(WebCore::Biquad::setHighpassParams):
(WebCore::Biquad::setLowShelfParams):
(WebCore::Biquad::setZeroPolePairs):
* platform/audio/Biquad.h:
2011-06-03 Adam Barth <abarth@webkit.org>
Reviewed by Eric Seidel.
DOMWindow::setLocation doesn't understand that DOMWindow can be inactive
https://bugs.webkit.org/show_bug.cgi?id=62057
This code gets confused when dealing with inactive DOMWindows. We
should just block inactive DOMWindows because there's no compatibility
reason to support them in this code path.
Test: http/tests/security/xss-DENIED-contentWindow-eval.html
* page/DOMWindow.cpp:
(WebCore::DOMWindow::isInsecureScriptAccess):
2011-05-31 Martin Robinson <mrobinson@igalia.com>
Reviewed by Ryosuke Niwa.
[GTK] Support smart replace for the pasteboard
https://bugs.webkit.org/show_bug.cgi?id=61734
Add smart replace support to WebCore and add hooks for it in WebKit
via DumpRenderTreeSupportGtk. When a platform supports smart replace,
WebCore will remove extra spaces that appear when pasting text. Eventually
WebKitGTK+ may want to expose this in the public API.
* platform/gtk/PasteboardGtk.cpp:
(WebCore::Pasteboard::writeSelection): Now pass whether or not to use smart replace
when calling writeSelection.
(WebCore::Pasteboard::canSmartReplace): Added an implementation that checks the clipboard
for whether or not it supports smart paste.
* platform/gtk/PasteboardHelper.cpp:
(WebCore::initGdkAtoms): Added initialization for smart replace atom.
(WebCore::PasteboardHelper::fillSelectionData): Added no-op handler for smart replace atom.
(WebCore::PasteboardHelper::targetListForDataObject): Properly handle new smart replace parameter.
(WebCore::PasteboardHelper::writeClipboardContents): Properly handle new smart replace parameter.
(WebCore::PasteboardHelper::clipboardContentSupportsSmartReplace): Added helper for Pasteboard.
* platform/gtk/PasteboardHelper.h: Add new method definition.
2011-06-03 Levi Weintraub <leviw@chromium.org>
Reviewed by Eric Seidel.
Switch paintCell to use IntPoint
https://bugs.webkit.org/show_bug.cgi?id=62033
Switching paintCell to take an IntPoint representing the paint offset
instead of a pair of ints.
No new tests since this is simple refactoring.
* rendering/RenderTableSection.cpp:
(WebCore::RenderTableSection::paintCell):
(WebCore::RenderTableSection::paintObject):
* rendering/RenderTableSection.h:
2011-06-03 Martin Robinson <mrobinson@igalia.com>
Reviewed by Dimitri Glazkov.
Teach Gtk build about window.internals
https://bugs.webkit.org/show_bug.cgi?id=61071
* GNUmakefile.am: Add new internals directories to the VPATH
(for idl processing) and the include list.
2011-06-03 Levi Weintraub <leviw@chromium.org>
Reviewed by Eric Seidel.
Switch paintBackgroundsBehindCell to use IntPoint
https://bugs.webkit.org/show_bug.cgi?id=62031
Switching paintBackgroundsBehindCell to take an IntPoint representing
the paint offset instead of a pair of ints.
No new tests as this is simple refactoring.
* rendering/RenderTableCell.cpp:
(WebCore::RenderTableCell::paintBackgroundsBehindCell):
(WebCore::RenderTableCell::paintBoxDecorations):
* rendering/RenderTableCell.h:
* rendering/RenderTableRow.cpp:
(WebCore::RenderTableRow::paint):
* rendering/RenderTableSection.cpp:
(WebCore::RenderTableSection::paintCell):
2011-06-03 Levi Weintraub <leviw@chromium.org>
Reviewed by Eric Seidel.
Switch paintCaret and paintDragCaret to use IntPoint
https://bugs.webkit.org/show_bug.cgi?id=62037
Switching paintCaret and paintDragCaret to use an IntPoint representing
the paint offset instead of a pair of ints.
No new tests since this is simple refactoring.
* editing/FrameSelection.cpp:
(WebCore::FrameSelection::paintCaret):
(WebCore::CaretBase::paintCaret):
(WebCore::DragCaretController::paintDragCaret):
* editing/FrameSelection.h:
* rendering/RenderBlock.cpp:
(WebCore::RenderBlock::paintCaret):
(WebCore::RenderBlock::paintObject):
(WebCore::RenderBlock::positionForPoint):
(WebCore::RenderBlock::offsetForContents):
* rendering/RenderBlock.h:
2011-06-03 Levi Weintraub <leviw@chromium.org>
Reviewed by Eric Seidel.
Switch paintItemForeground and paintItemForeground to use IntPoint
https://bugs.webkit.org/show_bug.cgi?id=62035
Switching paintItemFore/Background to use IntPoint instead of a pair of ints.
No new tests since this is simple refactoring.
* rendering/RenderListBox.cpp:
(WebCore::RenderListBox::paintObject):
(WebCore::RenderListBox::paintItemForeground):
(WebCore::RenderListBox::paintItemBackground):
* rendering/RenderListBox.h:
2011-06-03 Alexis Menard <alexis.menard@openbossa.org>
Reviewed by Andreas Kling.
To support building namespaced Qt, we require that forward-declarations
of Qt classes be wrapped in QT_BEGIN_NAMESPACE and QT_END_NAMESPACE.
* platform/network/qt/QtMIMETypeSniffer.h:
2011-06-03 Rob Buis <rbuis@rim.com>
Reviewed by Nikolas Zimmermann.
Cleanup member variable usage in svg/animation classes
https://bugs.webkit.org/show_bug.cgi?id=62029
Cleanup member variables.
* svg/animation/SMILTimeContainer.cpp:
(WebCore::SMILTimeContainer::SMILTimeContainer):
(WebCore::SMILTimeContainer::sampleAnimationAtTime):
(WebCore::SMILTimeContainer::updateAnimations):
* svg/animation/SMILTimeContainer.h:
* svg/animation/SVGSMILElement.cpp:
(WebCore::SVGSMILElement::SVGSMILElement):
* svg/animation/SVGSMILElement.h:
2011-06-03 Chris Rogers <crogers@google.com>
Reviewed by Kenneth Russell.
Add AudioParam parameter scheduling implementation
https://bugs.webkit.org/show_bug.cgi?id=61830
No new tests since audio API is not yet implemented.
* WebCore.gypi:
* WebCore.xcodeproj/project.pbxproj:
* webaudio/AudioParam.cpp:
(WebCore::AudioParam::value):
(WebCore::AudioParam::smoothedValue):
(WebCore::AudioParam::smooth):
(WebCore::AudioParam::calculateSampleAccurateValues):
* webaudio/AudioParam.h:
(WebCore::AudioParam::setContext):
(WebCore::AudioParam::context):
(WebCore::AudioParam::setValueAtTime):
(WebCore::AudioParam::linearRampToValueAtTime):
(WebCore::AudioParam::exponentialRampToValueAtTime):
(WebCore::AudioParam::setTargetValueAtTime):
(WebCore::AudioParam::setValueCurveAtTime):
(WebCore::AudioParam::cancelScheduledValues):
(WebCore::AudioParam::hasTimelineValues):
* webaudio/AudioParam.idl:
* webaudio/AudioParamTimeline.cpp: Added.
(WebCore::AudioParamTimeline::setValueAtTime):
(WebCore::AudioParamTimeline::linearRampToValueAtTime):
(WebCore::AudioParamTimeline::exponentialRampToValueAtTime):
(WebCore::AudioParamTimeline::setTargetValueAtTime):
(WebCore::AudioParamTimeline::setValueCurveAtTime):
(WebCore::isValidNumber):
(WebCore::AudioParamTimeline::insertEvent):
(WebCore::AudioParamTimeline::cancelScheduledValues):
(WebCore::AudioParamTimeline::valueForContextTime):
(WebCore::AudioParamTimeline::valuesForTimeRange):
(WebCore::timeToSampleFrame):
(WebCore::AudioParamTimeline::valuesForTimeRangeImpl):
* webaudio/AudioParamTimeline.h: Added.
(WebCore::AudioParamTimeline::AudioParamTimeline):
(WebCore::AudioParamTimeline::hasValues):
(WebCore::AudioParamTimeline::ParamEvent::ParamEvent):
(WebCore::AudioParamTimeline::ParamEvent::type):
(WebCore::AudioParamTimeline::ParamEvent::value):
(WebCore::AudioParamTimeline::ParamEvent::time):
(WebCore::AudioParamTimeline::ParamEvent::timeConstant):
(WebCore::AudioParamTimeline::ParamEvent::duration):
(WebCore::AudioParamTimeline::ParamEvent::curve):
2011-06-01 Jer Noble <jer.noble@apple.com>
Reviewed by Simon Fraser.
Flash of broken page when exiting full screen at jerryseinfeld.com
https://bugs.webkit.org/show_bug.cgi?id=61897
<rdar://problem/9522985>
Test: fullscreen/full-screen-placeholder.html
Entering full-screen mode is causing the page layout to change because the full-screen
element is taken out of the normal flow. To counteract this effect, insert a placeholder
block as a parent of the full-screen renderer with the same size and style as the full-screen
element pre-full-screen.
Only create a placeholder for block-level elements; the technique required for inline elements
would be vastly more complicated.
* dom/Document.cpp:
(WebCore::Document::webkitWillEnterFullScreenForElement): Create a placeholder
based on the size and style of the full-screen element.
(WebCore::Document::setFullScreenRenderer): Persist the placeholder size and
style across new renderers.
* rendering/RenderFullScreen.cpp:
(RenderFullScreen::RenderFullScreen): Added ivar.
(RenderFullScreen::destroy): Make sure to safely destroy our placeholder.
(RenderFullScreen::createPlaceholder): Added.
* rendering/RenderFullScreen.h:
(WebCore::RenderFullScreen::placeholder): Ivar accessor.
2011-06-03 Levi Weintraub <leviw@chromium.org>
Reviewed by Eric Seidel.
Switch paintBoxDecorations to IntPoint
https://bugs.webkit.org/show_bug.cgi?id=61968
Switching paintBoxDecorations to take an IntPoint representing
the paint offset instead of a pair of ints. Also cleaning up
some duplicated code in InlineFlowBox related to constraining
the paint rect to the linetop and linebottom.
No new tests since this is just refactoring.
* rendering/InlineFlowBox.cpp:
(WebCore::InlineFlowBox::paint):
(WebCore::InlineFlowBox::constrainToLineTopAndBottomIfNeeded): Added
to remove duplicate code in paintBoxDecorations and paintMask.
(WebCore::InlineFlowBox::paintBoxDecorations):
(WebCore::InlineFlowBox::paintMask):
* rendering/InlineFlowBox.h:
* rendering/RenderBlock.cpp:
(WebCore::RenderBlock::paintObject):
* rendering/RenderBox.cpp:
(WebCore::RenderBox::paintBoxDecorations):
* rendering/RenderBox.h:
* rendering/RenderFieldset.cpp:
(WebCore::RenderFieldset::paintBoxDecorations):
* rendering/RenderFieldset.h:
* rendering/RenderReplaced.cpp:
(WebCore::RenderReplaced::paint):
* rendering/RenderTable.cpp:
(WebCore::RenderTable::paintObject):
(WebCore::RenderTable::paintBoxDecorations):
* rendering/RenderTable.h:
* rendering/RenderTableCell.cpp:
(WebCore::RenderTableCell::paintBoxDecorations):
* rendering/RenderTableCell.h:
* rendering/RenderView.cpp:
(WebCore::RenderView::paintBoxDecorations):
* rendering/RenderView.h:
* rendering/RenderWidget.cpp:
(WebCore::RenderWidget::paint):
* rendering/svg/RenderSVGRoot.cpp:
(WebCore::RenderSVGRoot::paint):
2011-06-03 Doreen Jiang <doreen.jiang@nokia.com>
Reviewed by Benjamin Poulain.
[Qt]The minimum size of the select menu list is incorrect for qtwebkit
https://bugs.webkit.org/show_bug.cgi?id=56752
The minimum width of the select-box is calculated to be as small as possible
instead of hardcoded value (width of 7 characters) in minimumMenuListSize() function
This will avoid overapping the select lists in popular websites.
Test: fast/forms/selectlist-minsize.html
* platform/qt/RenderThemeQt.cpp:
(WebCore::RenderThemeQt::minimumMenuListSize):
2011-06-02 Dimitri Glazkov <dglazkov@chromium.org>
Reviewed by Darin Adler.
Prevent event dispatch for events with related target when host is the target.
https://bugs.webkit.org/show_bug.cgi?id=61979
Turns out, even if we trim the ancestor chain to 0, the event is still dispatched during AT_TARGET.
So might as well be explicit about what we are trying to do and add a flag to prevent dispatch in these cases.
* dom/EventDispatcher.cpp:
(WebCore::EventDispatcher::adjustToShadowBoundaries): Added preventing dispatch when the ancestor chain is trimmed to nothing.
(WebCore::EventDispatcher::EventDispatcher): Added initializer.
(WebCore::EventDispatcher::dispatchEvent): Added a check to prevent dispatch.
* dom/EventDispatcher.h: Added a def.
2011-06-03 Dan Bernstein <mitz@apple.com>
Mac build fix.
* WebCore.xcodeproj/project.pbxproj:
2011-06-03 Naoki Takano <takano.naoki@gmail.com>
Reviewed by Eric Seidel.
[Chromium] Call setToolTipText() in WebPopupMenuImpl mouse move handler to show tool tip in select popup window.
https://bugs.webkit.org/show_bug.cgi?id=61260
http://code.google.com/p/chromium/issues/detail?id=12721
Manual test: select-popup-tooltip-test.html
* manual-tests/select-popup-tooltip-test.html: Added.
* platform/chromium/PopupMenuChromium.cpp:
(WebCore::PopupContainer::getSelectedItemToolTip): Get selected item tooltip string according to hovering mouse position.
* platform/chromium/PopupMenuChromium.h: Add getSelectedItemToolTip() declaration.
2011-06-03 Rob Buis <rbuis@rim.com>
Reviewed by Nikolas Zimmermann.
Creating <animateMotion> elements via javascript do not execute
https://bugs.webkit.org/show_bug.cgi?id=34301
Enable constructors for SVGMPathElement and SVGAnimateMotionElement.
* DerivedSources.cpp:
* DerivedSources.make:
* GNUmakefile.list.am:
* WebCore.gypi:
* WebCore.vcproj/WebCore.vcproj:
* WebCore.xcodeproj/project.pbxproj:
* page/DOMWindow.idl:
2011-06-03 Hans Wennborg <hans@chromium.org>
Reviewed by Steve Block.
IndexedDB: Clean-up use of INT64_MAX in LevelDB back-end
https://bugs.webkit.org/show_bug.cgi?id=62009
This constant should only be needed inside IDBLevelDBCoding.cpp.
No new functionality, no new tests.
* storage/IDBLevelDBBackingStore.cpp:
(WebCore::getNewDatabaseId):
(WebCore::IDBLevelDBBackingStore::getObjectStores):
(WebCore::getNewObjectStoreId):
(WebCore::IDBLevelDBBackingStore::deleteObjectStore):
(WebCore::getNewIndexId):
* storage/IDBLevelDBCoding.cpp:
(WebCore::IDBLevelDBCoding::DatabaseFreeListKey::encodeMaxKey):
(WebCore::IDBLevelDBCoding::ObjectStoreMetaDataKey::encodeMaxKey):
(WebCore::IDBLevelDBCoding::IndexMetaDataKey::encodeMaxKey):
(WebCore::IDBLevelDBCoding::ObjectStoreFreeListKey::encodeMaxKey):
(WebCore::IDBLevelDBCoding::IndexFreeListKey::encodeMaxKey):
* storage/IDBLevelDBCoding.h:
2011-06-03 Siddharth Mathur <siddharth.mathur@nokia.com>
Reviewed by Benjamin Poulain.
[Qt] Build flag for experimental ICU library support
https://bugs.webkit.org/show_bug.cgi?id=60786
Adds a build-time flag (CONFIG+=use_system_icu) that enables experimental
ICU powered Unicode support.
No new tests as no new features added.
* WebCore.pri: Removed text_breaking_with_icu CONFIG flag.
* WebCore.pro: Added TextCodecICU.cpp and qt/TextBreakIteratorInternalICUQt.cpp.
* editing/qt/SmartReplaceQt.cpp:
* features.pri: Support for use_system_icu CONFIG flag.
* platform/text/TextCodecICU.cpp: Guard with USE(ICU_UNICODE).
* platform/text/qt/TextBreakIteratorInternalICUQt.cpp: Added.
(WebCore::Q_GLOBAL_STATIC_WITH_INITIALIZER):
(WebCore::currentSearchLocaleID):
(WebCore::currentTextBreakLocaleID):
* platform/text/qt/TextBreakIteratorQt.cpp: Moved out currentTextBreakLocaleID().
(WebCore::isTextBreak):
* platform/text/qt/TextCodecQt.cpp: Guard with USE(QT4_UNICODE).
(WebCore::TextCodecQt::registerEncodingNames):
(WebCore::TextCodecQt::registerCodecs):
2011-06-03 Yael Aharon <yael.aharon@nokia.com>
Reviewed by Kenneth Rohde Christiansen.
Frame flattening is broken with nested frames
https://bugs.webkit.org/show_bug.cgi?id=61491
Do not flatten offscreen iframes during frame flattening, as flattening might make them visible.
Test: fast/frames/flattening/iframe-flattening-out-of-view.html
fast/frames/flattening/iframe-flattening-out-of-view-and-scroll.html
fast/frames/flattening/iframe-flattening-out-of-view-scroll-and-relayout.html
* rendering/RenderIFrame.cpp:
(WebCore::RenderIFrame::flattenFrame):
2011-06-03 Nikolas Zimmermann <nzimmermann@rim.com>
Reviewed by Andreas Kling.
Incorrect embedded document replaced size calculation for box-sizing: border-box
https://bugs.webkit.org/show_bug.cgi?id=62007
When using <object style="box-sizing: border-box" data="foo.svg"/> to embed foo.svg
which has an intrinsic width/height, the embedded document intrinsic size is incorrect.
RenderPart::computeEmbeddedDocumentReplacedWidth/Height has to ask the content renderer for the replaced width/height not ourselves.
Tests: svg/as-image/img-preserveAspectRatio-support-2.html
svg/as-object/object-box-sizing-no-width-height.html
* rendering/RenderPart.cpp:
(WebCore::RenderPart::computeEmbeddedDocumentReplacedWidth):
(WebCore::RenderPart::computeEmbeddedDocumentReplacedHeight):
2011-06-03 Sheriff Bot <webkit.review.bot@gmail.com>
Unreviewed, rolling out r88004.
http://trac.webkit.org/changeset/88004
https://bugs.webkit.org/show_bug.cgi?id=62008
This patch broke 4 tests in the GTK bots (Requested by
msanchez on #webkit).
* accessibility/gtk/AXObjectCacheAtk.cpp:
(WebCore::AXObjectCache::handleScrolledToAnchor):
2011-06-03 Nikolas Zimmermann <nzimmermann@rim.com>
Reviewed by Andreas Kling.
Zooming <object style="width/height: auto" data="foo.svg"/> doesn't work as expected
https://bugs.webkit.org/show_bug.cgi?id=62005
Zooming an object with auto size, that references a svg with fixed size was broken. The svg size stayed the same.
Get rid of the dependency between RenderSVGRoot and SVGSVGElement::currentScale(), always ask for the effective
zoom in the RenderStyle instead of asking SVGSVGElement.
The SVGSVGElement::currentScale()/setCurrentScale() methods are now only used when called from the bindings (eg. JS).
They only take effect on the outermost <svg> element in standalone documents, otherwhise they are no-ops.
Test: svg/zoom/page/zoom-svg-through-object-with-auto-size.html
* rendering/svg/RenderSVGRoot.cpp:
(WebCore::RenderSVGRoot::computeIntrinsicWidth):
(WebCore::RenderSVGRoot::computeIntrinsicHeight):
(WebCore::RenderSVGRoot::localToBorderBoxTransform):
* svg/SVGSVGElement.cpp:
(WebCore::SVGSVGElement::SVGSVGElement):
(WebCore::SVGSVGElement::currentScale):
(WebCore::SVGSVGElement::setCurrentScale):
* svg/SVGSVGElement.h:
2011-06-03 Mario Sanchez Prada <msanchez@igalia.com>
Reviewed by Martin Robinson.
Focus and caret position should be updated when same-page links are followed
https://bugs.webkit.org/show_bug.cgi?id=59737
Update the caret position to the anchor's position after scrolling.
This behavior is specific to the Gtk port and requested because of
accessibility needs, that's why it's implemented in AXObjectCache.
Test: platform/gtk/accessibility/caret-browsing-anchor-followed.html
* accessibility/gtk/AXObjectCacheAtk.cpp:
(WebCore::AXObjectCache::handleScrolledToAnchor): Make sure the
caret is updated to be in the anchor's position after scrolling.
2011-06-03 Dominic Cooney <dominicc@chromium.org>
Reviewed by Kent Tamura.
Cloned keygen shadows should have -webkit-keygen-select pseudoclass.
https://bugs.webkit.org/show_bug.cgi?id=61984
When cloneNode's tag name-based cloning algorithm clones the
KeygenSelectElements of a keygen shadow as select elements. These
lack the -webkit-keygen-select pseudoclass.
Test: fast/html/clone-keygen.html
* html/HTMLKeygenElement.cpp:
(WebCore::KeygenSelectElement::cloneElementWithoutAttributesAndChildren): Create a KeygenSelectElement when being cloned.
2011-06-02 MORITA Hajime <morrita@google.com>
Unreviewed ChangeLog fix.
2011-06-03 Peter Varga <pvarga@webkit.org>
Rubber-stamped by Csaba Osztrogonác.
[Qt][V8] Buildfix after r87988.
No new tests needed.
* bindings/v8/ScheduledAction.cpp: Add missing guards.
(WebCore::ScheduledAction::execute):
* bindings/v8/V8EventListener.cpp: Ditto.
(WebCore::V8EventListener::callListenerFunction):
2011-06-03 Dominic Cooney <dominicc@chromium.org>
Reviewed by Kent Tamura.
Cloned range input sliders should be SliderThumbElements, not divs.
https://bugs.webkit.org/show_bug.cgi?id=61982
Test: fast/html/clone-range.html
* html/shadow/SliderThumbElement.h:
(WebCore::SliderThumbElement::cloneElementWithoutAttributesAndChildren): Create a SliderThumbElement when being cloned.
2011-06-02 Yury Semikhatsky <yurys@chromium.org>
Reviewed by Pavel Feldman.
Web Inspector: add an option for automatically attaching to new workers
https://bugs.webkit.org/show_bug.cgi?id=61930
Worker list is extended with a checkbox that makes inspector attach to each
new worker. Whenever a new worker context starts a new inspector window will
be opened for it.
Also worker agent and worker list will be updated when worker context is terminated.
* inspector/Inspector.json:
* inspector/InspectorController.cpp:
(WebCore::InspectorController::InspectorController):
* inspector/InspectorInstrumentation.cpp:
(WebCore::InspectorInstrumentation::workerContextTerminatedImpl):
* inspector/InspectorInstrumentation.h:
(WebCore::InspectorInstrumentation::workerContextTerminated):
* inspector/InspectorWorkerAgent.cpp:
(WebCore::InspectorWorkerAgent::WorkerFrontendChannel::~WorkerFrontendChannel):
(WebCore::InspectorWorkerAgent::create):
(WebCore::InspectorWorkerAgent::InspectorWorkerAgent):
(WebCore::InspectorWorkerAgent::clearFrontend):
(WebCore::InspectorWorkerAgent::setAutoconnectToWorkers):
(WebCore::InspectorWorkerAgent::didStartWorkerContext):
(WebCore::InspectorWorkerAgent::workerContextTerminated):
* inspector/InspectorWorkerAgent.h:
* inspector/front-end/WorkerManager.js:
(WebInspector.WorkerManager.prototype._workerCreated):
(WebInspector.WorkerManager.prototype._workerTerminated):
(WebInspector.WorkerManager.prototype.openWorkerInspector):
(WebInspector.WorkerManager.prototype._openInspectorWindow):
(WebInspector.WorkerManager.prototype.reset):
(WebInspector.WorkerMessageForwarder.prototype.workerCreated):
(WebInspector.WorkerMessageForwarder.prototype.workerTerminated):
* inspector/front-end/WorkersSidebarPane.js:
(WebInspector.WorkerListSidebarPane):
(WebInspector.WorkerListSidebarPane.prototype._workerAdded):
(WebInspector.WorkerListSidebarPane.prototype._workerRemoved):
(WebInspector.WorkerListSidebarPane.prototype._workersCleared):
(WebInspector.WorkerListSidebarPane.prototype._addWorker):
(WebInspector.WorkerListSidebarPane.prototype._workerItemClicked):
(WebInspector.WorkerListSidebarPane.prototype._autoattachToWorkersClicked):
* inspector/front-end/inspector.js:
(WebInspector.reset):
2011-06-02 Hayato Ito <hayato@chromium.org>
Reviewed by Ryosuke Niwa.
Show a shadow root node itself in Node::traverseNextNodeAcrossFrame.
https://bugs.webkit.org/show_bug.cgi?id=61992
It's better to show a shadow root node itself for debugging.
Skipping it didn't add any values.
No new tests since the function is only available in debug builds.
* dom/Node.cpp:
(WebCore::traverseNextNodeAcrossFrame):
2011-06-02 James Robinson <jamesr@chromium.org>
Unreviewed, rolling out r87901.
http://trac.webkit.org/changeset/87901
https://bugs.webkit.org/show_bug.cgi?id=61894
Might be responsible for performance regression on Chromium page cyclers, reverting to see...
* loader/DocumentLoader.h:
(WebCore::DocumentLoader::didTellClientAboutLoad):
(WebCore::DocumentLoader::haveToldClientAboutLoad):
* loader/FrameLoader.cpp:
(WebCore::FrameLoader::loadedResourceFromMemoryCache):
* loader/ResourceLoadNotifier.cpp:
(WebCore::ResourceLoadNotifier::dispatchWillSendRequest):
2011-06-02 Levi Weintraub <leviw@chromium.org>
Reviewed by Eric Seidel.
Switch paintReplaced to use IntPoint
https://bugs.webkit.org/show_bug.cgi?id=61891
Switching paintReplaced to use IntPoint to represent the paint offset instead
of a pair of ints.
Also renaming the IntPoint flavor of IntRect::move to moveBy to clear up the
fact that the IntPoint is added as an offset as opposed to being relocated
to that point.
No tests because this is just a refactoring.
* page/FrameView.cpp:
(WebCore::FrameView::invalidateScrollbarRect):
(WebCore::FrameView::convertFromRenderer):
(WebCore::FrameView::convertToRenderer):
* platform/ScrollView.cpp:
(WebCore::ScrollView::wheelEvent):
* platform/ScrollbarThemeComposite.cpp:
(WebCore::ScrollbarThemeComposite::invalidatePart):
* platform/graphics/gpu/Texture.cpp
(WebCore::Texture::updateSubRect)
* platform/graphics/IntRect.h:
(WebCore::IntRect::moveBy):
* platform/mac/WidgetMac.mm:
(WebCore::Widget::paint):
* rendering/InlineFlowBox.cpp:
(WebCore::InlineFlowBox::paint):
* rendering/RenderBlock.cpp:
(WebCore::RenderBlock::logicalRectToPhysicalRect):
(WebCore::RenderBlock::selectionGaps):
* rendering/RenderBox.cpp:
(WebCore::RenderBox::offsetFromContainer):
(WebCore::RenderBox::computeRectForRepaint):
(WebCore::RenderBox::localCaretRect):
* rendering/RenderDetailsMarker.cpp:
(WebCore::RenderDetailsMarker::paint):
* rendering/RenderEmbeddedObject.cpp:
(WebCore::RenderEmbeddedObject::paintReplaced):
* rendering/RenderEmbeddedObject.h:
* rendering/RenderHTMLCanvas.cpp:
(WebCore::RenderHTMLCanvas::paintReplaced):
* rendering/RenderHTMLCanvas.h:
* rendering/RenderImage.cpp:
(WebCore::RenderImage::paintReplaced):
* rendering/RenderImage.h:
* rendering/RenderInline.cpp:
(WebCore::RenderInline::culledInlineVisualOverflowBoundingBox):
* rendering/RenderLayer.cpp:
(WebCore::expandClipRectForDescendantsAndReflection):
(WebCore::RenderLayer::paintScrollCorner):
(WebCore::RenderLayer::paintResizer):
(WebCore::RenderLayer::paintChildLayerIntoColumns):
(WebCore::RenderLayer::hitTestChildLayerColumns):
(WebCore::RenderLayer::boundingBox):
(WebCore::RenderLayer::setBackingNeedsRepaintInRect):
* rendering/RenderLayerBacking.cpp:
(WebCore::RenderLayerBacking::updateGraphicsLayerGeometry):
(WebCore::paintScrollbar):
(WebCore::RenderLayerBacking::paintContents):
* rendering/RenderLayerCompositor.cpp:
(WebCore::RenderLayerCompositor::calculateCompositedBounds):
(WebCore::RenderLayerCompositor::layerWillBeRemoved):
(WebCore::paintScrollbar):
(WebCore::RenderLayerCompositor::paintContents):
* rendering/RenderListBox.cpp:
(WebCore::RenderListBox::controlClipRect):
* rendering/RenderListItem.cpp:
(WebCore::RenderListItem::positionListMarker):
* rendering/RenderListMarker.cpp:
(WebCore::RenderListMarker::paint):
* rendering/RenderReplaced.cpp:
(WebCore::RenderReplaced::paint):
* rendering/RenderReplaced.h:
(WebCore::RenderReplaced::paintReplaced):
* rendering/RenderTableCell.cpp:
(WebCore::RenderTableCell::computeRectForRepaint):
* rendering/RenderTextControlSingleLine.cpp:
(WebCore::RenderTextControlSingleLine::controlClipRect):
* rendering/RenderVideo.cpp:
(WebCore::RenderVideo::paintReplaced):
* rendering/RenderVideo.h:
* rendering/RenderView.cpp:
(WebCore::RenderView::repaintViewRectangle):
2011-06-02 James Robinson <jamesr@chromium.org>
Reviewed by Dimitri Glazkov.
[chromium][V8] Add trace events for timer fires and event listener dispatches
https://bugs.webkit.org/show_bug.cgi?id=61977
Adds TRACE_EVENT macro around timer and event listener dispatches. When tracing (a chromium feature) is
enabled, this allows correlating these events with painting, compositing, and everything else in chromium that
is traced. When tracing is disabled, this macro does nothing useful. Trace points are very cheap when tracing
is disabled so this should have no performance impact for non-developers.
* bindings/v8/ScheduledAction.cpp:
(WebCore::ScheduledAction::execute):
* bindings/v8/V8EventListener.cpp:
(WebCore::V8EventListener::callListenerFunction):
2011-06-02 John Bates <jbates@google.com>
Reviewed by James Robinson.
DrawingBufferChromium cleanup:
- Correct FIXME comment about synchronization.
- Remove unnecessary DrawingBufferInternal indirection struct
and its unused offscreenColorTexture member.
https://bugs.webkit.org/show_bug.cgi?id=61953
* platform/graphics/chromium/DrawingBufferChromium.cpp:
(WebCore::DrawingBuffer::DrawingBuffer):
(WebCore::DrawingBuffer::~DrawingBuffer):
(WebCore::DrawingBuffer::publishToPlatformLayer):
(WebCore::DrawingBuffer::didReset):
(WebCore::DrawingBuffer::platformLayer):
* platform/graphics/gpu/DrawingBuffer.h:
2011-06-02 Andrey Kosyakov <caseq@chromium.org>
Reviewed by Pavel Feldman.
Web Inspector: ResourceCookiesView.resize() is missing
https://bugs.webkit.org/show_bug.cgi?id=61868
* inspector/front-end/ResourceCookiesView.js:
(WebInspector.ResourceCookiesView.prototype.resize):
2011-06-02 Kent Tamura <tkent@chromium.org>
Reviewed by Dimitri Glazkov.
REGRESSION(r87014): Cloned text <input> doesn't work well.
https://bugs.webkit.org/show_bug.cgi?id=61909
The default implementation of Element::cloneNode() creates a clone
node by Document::createElement(). So, if a customized class is used for
shadow nodes, cloneNode() doesn't create a node of the correct class.
Such custom classes need to override Element::
cloneElementWithoutAttributesAndChildren().
TextFieldInputType and SearchInputType had references to shadow nodes
initialized in createShadowSubtree(). However createShadowSubtree() is
not called if the host node is cloned. The accessors for shadow nodes
should search a shadow tree.
Test: fast/forms/textfield-clone.html
* html/SearchInputType.cpp:
Remove data members for shadow nodes, and the accessors search the
shadow tree for the requested node by TreeScope::getElementById().
(WebCore::SearchInputType::SearchInputType):
(WebCore::innerBlockId):
(WebCore::resultButtonId):
(WebCore::cancelButtonId):
(WebCore::SearchInputType::createShadowSubtree):
(WebCore::SearchInputType::innerBlockElement):
(WebCore::SearchInputType::resultsButtonElement):
(WebCore::SearchInputType::cancelButtonElement):
* html/SearchInputType.h:
* html/TextFieldInputType.cpp: ditto.
(WebCore::TextFieldInputType::TextFieldInputType):
(WebCore::TextFieldInputType::innerTextId):
(WebCore::spinButtonId):
(WebCore::TextFieldInputType::speechButtonId):
(WebCore::TextFieldInputType::appendChildAndSetId):
(WebCore::TextFieldInputType::createShadowSubtree):
(WebCore::TextFieldInputType::getShadowElementById):
(WebCore::TextFieldInputType::innerTextElement):
(WebCore::TextFieldInputType::innerSpinButtonElement):
(WebCore::TextFieldInputType::speechButtonElement):
* html/TextFieldInputType.h:
* html/shadow/TextControlInnerElements.cpp:
Overrides cloneElementWithoutAttributesAndChildren() in order that cloneNode()
produces an instance of the correct class.
(WebCore::TextControlInnerElement::cloneElementWithoutAttributesAndChildren):
(WebCore::TextControlInnerTextElement::cloneElementWithoutAttributesAndChildren):
(WebCore::SearchFieldResultsButtonElement::cloneElementWithoutAttributesAndChildren):
(WebCore::SearchFieldCancelButtonElement::cloneElementWithoutAttributesAndChildren):
(WebCore::SpinButtonElement::cloneElementWithoutAttributesAndChildren):
(WebCore::InputFieldSpeechButtonElement::cloneElementWithoutAttributesAndChildren):
* html/shadow/TextControlInnerElements.h:
2011-05-28 Martin Robinson <mrobinson@igalia.com>
Reviewed by Gustavo Noronha Silva.
[GTK] Remove PasteboardHelperGtk
https://bugs.webkit.org/show_bug.cgi?id=61690
Remove the virtual methods from PasteboardHelper, so that PasteboardHelperGtk
can be removed. Since the GtkClipboard IDs are verified to be the same between
WebKit and WebCore we no longer need to communicate from WebCore to WebKit to
get them.
No new tests. This is just a code refactor.
* platform/Pasteboard.h: Remove GTK+ specific methods. They are no longer needed.
* platform/gtk/ClipboardGtk.cpp: Remove the m_helper member and access the
PasteboardHelper singleton directly.
* platform/gtk/ClipboardGtk.h: Ditto.
* platform/gtk/PasteboardGtk.cpp: Ditto.
* platform/gtk/PasteboardHelper.cpp:
(WebCore::removeMarkupPrefix): Remove an extra line.
(WebCore::PasteboardHelper::defaultPasteboardHelper): Added this static getter
for the singleton.
(WebCore::PasteboardHelper::PasteboardHelper): Moved the contents of initTargetList here.
(WebCore::PasteboardHelper::getCurrentClipboard): Instead of talking with WebKit to determine
whether or not to use the primary selection clipboard, just use our new member.
(WebCore::PasteboardHelper::fillSelectionData): Use our local enum to get the ID.
(WebCore::PasteboardHelper::targetListForDataObject): Ditto.
(WebCore::PasteboardHelper::dropAtomsForContext): Ditto.
(WebCore::getClipboardContentsCallback): Ditto.
* platform/gtk/PasteboardHelper.h: PasteboardHelper now keeps track of whether or
not to use the primary selection clipboard internally.
(WebCore::PasteboardHelper::setUsePrimarySelectionClipboard): Added.
(WebCore::PasteboardHelper::usePrimarySelectionClipboard): Added.
2011-06-02 Levi Weintraub <leviw@chromium.org>
Reviewed by Eric Seidel.
Teach InlineBox about FloatPoint
https://bugs.webkit.org/show_bug.cgi?id=44412
Original patch by Eric Seidel. Updated by me.
This is another step towards more point/size
usage throughout the rendering tree.
Added left(), right(), top(), and bottom() methods
to InlineBox. Removed m_x, and m_y and replaced them
with a single m_topLeft member.
No new tests since this is just a refactoring.
* rendering/EllipsisBox.cpp:
(WebCore::EllipsisBox::paint):
(WebCore::EllipsisBox::selectionRect):
(WebCore::EllipsisBox::paintSelection):
(WebCore::EllipsisBox::nodeAtPoint):
* rendering/EllipsisBox.h:
(WebCore::EllipsisBox::EllipsisBox):
* rendering/InlineBox.cpp:
(WebCore::InlineBox::adjustPosition):
(WebCore::InlineBox::canAccommodateEllipsis):
* rendering/InlineBox.h:
(WebCore::InlineBox::InlineBox):
(WebCore::InlineBox::setX):
(WebCore::InlineBox::x):
(WebCore::InlineBox::left):
(WebCore::InlineBox::setY):
(WebCore::InlineBox::y):
(WebCore::InlineBox::top):
(WebCore::InlineBox::topLeft):
(WebCore::InlineBox::right):
(WebCore::InlineBox::bottom):
(WebCore::InlineBox::logicalLeft):
(WebCore::InlineBox::setLogicalLeft):
(WebCore::InlineBox::logicalTop):
(WebCore::InlineBox::setLogicalTop):
(WebCore::InlineBox::logicalFrameRect):
* rendering/InlineFlowBox.h:
(WebCore::InlineFlowBox::frameRectIncludingLineHeight):
* rendering/InlineTextBox.cpp:
(WebCore::InlineTextBox::placeEllipsisBox):
(WebCore::InlineTextBox::paintTextMatchMarker):
(WebCore::InlineTextBox::computeRectForReplacementMarker):
* rendering/RenderText.cpp:
(WebCore::RenderText::firstRunX):
(WebCore::RenderText::firstRunY):
* rendering/RenderTreeAsText.cpp:
(WebCore::writeTextRun):
* rendering/RootInlineBox.cpp:
(WebCore::RootInlineBox::placeEllipsis):
* rendering/svg/RenderSVGText.cpp:
(WebCore::RenderSVGText::positionForPoint):
* rendering/svg/SVGInlineTextBox.h:
(WebCore::SVGInlineTextBox::selectionTop):
* rendering/svg/SVGRootInlineBox.cpp:
(WebCore::SVGRootInlineBox::closestLeafChildForPosition):
2011-06-02 Jian Li <jianli@chromium.org>
Reviewed by David Levin.
Update the behavior of multiple reads for FileReader
https://bugs.webkit.org/show_bug.cgi?id=61793
Changed to throw an OperationNotAllowedException with the NOT_ALLOWED_ERR
status code on any of the read methods that occur when readyState = LOADING.
Otherwise, calling any of the read methods should work.
Test: fast/files/read-file-async.html
* CodeGenerators.pri:
* DerivedSources.cpp:
* DerivedSources.make:
* GNUmakefile.list.am:
* WebCore.gypi:
* WebCore.pro:
* WebCore.vcproj/WebCore.vcproj:
* WebCore.xcodeproj/project.pbxproj:
* bindings/js/JSDOMBinding.cpp:
(WebCore::setDOMException):
* bindings/v8/V8Proxy.cpp:
(WebCore::V8Proxy::setDOMException):
* dom/ExceptionCode.cpp:
(WebCore::getExceptionCodeDescription):
* dom/ExceptionCode.h:
* fileapi/FileReader.cpp:
(WebCore::FileReader::FileReader):
(WebCore::FileReader::hasPendingActivity):
(WebCore::FileReader::readAsArrayBuffer):
(WebCore::FileReader::readAsBinaryString):
(WebCore::FileReader::readAsText):
(WebCore::FileReader::readAsDataURL):
(WebCore::FileReader::readInternal):
(WebCore::FileReader::abort):
(WebCore::FileReader::doAbort):
(WebCore::FileReader::terminate):
(WebCore::FileReader::start):
(WebCore::FileReader::didStartLoading):
(WebCore::FileReader::didFinishLoading):
(WebCore::FileReader::didFail):
* fileapi/FileReader.h:
(WebCore::FileReader::readyState):
* fileapi/FileReader.idl:
* fileapi/OperationNotAllowedException.h: Added.
(WebCore::OperationNotAllowedException::create):
(WebCore::OperationNotAllowedException::OperationNotAllowedException):
* fileapi/OperationNotAllowedException.idl: Added.
2011-06-02 Adrienne Walker <enne@google.com>
Reviewed by James Robinson.
[chromium] Compositor HUD should respect mapTexSubImage2D returning NULL
https://bugs.webkit.org/show_bug.cgi?id=61954
* platform/graphics/chromium/cc/CCHeadsUpDisplay.cpp:
(WebCore::CCHeadsUpDisplay::draw):
2011-06-02 Brady Eidson <beidson@apple.com>
Reviewed by Oliver Hunt.
<rdar://problem/9539920> and https://bugs.webkit.org/show_bug.cgi?id=61950
Repro crash loading certain webarchives after r87566.
Test: webarchive/loading/javascript-url-iframe-crash.html
* bindings/ScriptControllerBase.cpp:
(WebCore::ScriptController::executeIfJavaScriptURL): DocumentWriter::replaceDocument can
cause the DocumentLoader to be destroyed, so protect it with a Ref here.
2011-06-02 Jay Civelli <jcivelli@chromium.org>
Reviewed by Adam Barth.
Adding MHTML generation support to MHTMLArchive.
https://bugs.webkit.org/show_bug.cgi?id=7169
* loader/archive/mhtml/MHTMLArchive.cpp:
(WebCore::generateRandomBoundary):
(WebCore::replaceNonPrintableCharacters):
(WebCore::MHTMLArchive::generateMHTMLData):
* loader/archive/mhtml/MHTMLArchive.h:
* page/PageSerializer.cpp:
(WebCore::PageSerializer::serializeFrame):
(WebCore::PageSerializer::serializeCSSStyleSheet):
* platform/SharedBuffer.cpp:
(WebCore::SharedBuffer::append):
* platform/SharedBuffer.h:
2011-06-02 Simon Fraser <simon.fraser@apple.com>
Reviewed by Andreas Kling.
Share Path code that uses beziers to construct a rounded rect
https://bugs.webkit.org/show_bug.cgi?id=61960
Have two methods in Path that construct beziers for rounded
rects to share the same code.
Make gCircleControlPoint a little more precise, and add
a comment describing its derivation.
Make use of FloatRect::maxX() and maxY().
* platform/graphics/Path.cpp:
(WebCore::Path::addRoundedRect):
(WebCore::Path::addBeziersForRoundedRect):
* platform/graphics/Path.h:
2011-06-02 Ryosuke Niwa <rniwa@webkit.org>
Reviewed by Enrica Casucci.
ApplyStyleCommand shouldn't call collapseTextDecorationProperties
https://bugs.webkit.org/show_bug.cgi?id=61887
Removed the call to collapseTextDecorationProperties in ApplyStyleCommand::applyInlineStyle.
No new tests because this is a code refactoring.
* editing/ApplyStyleCommand.cpp:
(WebCore::ApplyStyleCommand::applyInlineStyle): No loner calls collapseTextDecorationProperties.
(WebCore::ApplyStyleCommand::pushDownInlineStyleAroundNode): Updated comment.
* editing/EditingStyle.cpp:
(WebCore::HTMLElementEquivalent::propertyExistsInStyle): Added to check both text-decoration
and -webkit-text-decorations-in-effect.
(WebCore::HTMLTextDecorationEquivalent::HTMLTextDecorationEquivalent): Added a comment.
(WebCore::HTMLTextDecorationEquivalent::propertyExistsInStyle): Checks both text-decoration
and -webkit-text-decorations-in-effect.
(WebCore::HTMLTextDecorationEquivalent::valueIsPresentInStyle): Checks if a text decoration
is present in -webkit-text-decorations-in-effect or text-decoration preferring the former.
(WebCore::EditingStyle::conflictsWithInlineStyleOfElement): Merged loops for when conflictingProperties
is false and true. Added a support for -webkit-text-decorations-in-effect.
2011-06-02 Ryosuke Niwa <rniwa@webkit.org>
Reviewed by Eric Seidel.
Make more functions static local in EventHandlers.cpp
https://bugs.webkit.org/show_bug.cgi?id=58503
Removed canHandleDragAndDropForTarget and made focusDirectionForKey local to EventHandler.cpp.
* page/EventHandler.cpp:
(WebCore::targetIsFrame): Extracted from canHandleDragAndDropForTarget.
(WebCore::EventHandler::updateDragAndDrop): Calls contentFrameForTarget instead of canHandleDragAndDropForTarget.
(WebCore::EventHandler::cancelDragAndDrop): Ditto.
(WebCore::EventHandler::performDragAndDrop): Ditto.
(WebCore::focusDirectionForKey): No longer a member function of EventHandler class.
(WebCore::handleKeyboardSelectionMovement): No longer a member function of EventHandler class; also calls
focusDirectionForKey instead of manually comparing.
* page/EventHandler.h:
2011-06-02 Alok Priyadarshi <alokp@chromium.org>
Reviewed by James Robinson.
[chromium] Things jump around when selecting anything on the page
https://bugs.webkit.org/show_bug.cgi?id=61639
WebCore::LayerTextureUpdaterSkPicture::updateTextureRect was not updating a tile sub-region properly.
It did not consider dest-rect when selecting the clip and translation required to draw the content-rect into dest-rect.
Also removed clearing of framebuffer because it used to clear the whole tile not just dest-rect.
An appropriate viewport could be set to just clear the dest-rect, but it was debug only code and I did not want to mess
with the viewport set by skia.
No new tests. This case should be covered by most of the layout tests (pixel) targeting selection or hovering when chromium is run in compositing mode.
Here is a non-exhaustive list of existing tests covering this case.
Test: editing/selection/14971.html (existing)
editing/selection/3690703-2.html (existing)
editing/selection/4402375.html (existing)
editing/selection/4818145.html (existing)
* platform/graphics/chromium/LayerTextureUpdaterCanvas.cpp:
(WebCore::LayerTextureUpdaterSkPicture::updateTextureRect):
(WebCore::LayerTextureUpdaterSkPicture::createFrameBuffer):
* platform/graphics/chromium/LayerTextureUpdaterCanvas.h:
2011-06-02 Dimitri Glazkov <dglazkov@chromium.org>
Reviewed by Darin Adler.
Add build logistics and plumbing for window.internals object.
https://bugs.webkit.org/show_bug.cgi?id=60313
Test: fast/harness/internals-object.html
* Configurations/WebCoreTestSupport.xcconfig: Added.
* DerivedSources.make: Added support for generating from Internals.idl.
* WebCore.gyp/WebCore.gyp: Added new webcore_test_support library.
* WebCore.gypi: Ditto.
* WebCore.xcodeproj/project.pbxproj: Added WebCoreTestSupport library.
* testing/Internals.cpp: Added.
* testing/Internals.h: Added.
* testing/Internals.idl: Added.
* testing/js/WebCoreTestSupport.cpp: Added.
* testing/js/WebCoreTestSupport.h: Added.
* testing/v8/WebCoreTestSupport.cpp: Added.
* testing/v8/WebCoreTestSupport.h: Added.
2011-06-01 Adrienne Walker <enne@google.com>
Reviewed by Eric Seidel.
[chromium] LayerChromium should use a RefPtr for replica layer
https://bugs.webkit.org/show_bug.cgi?id=61898
Having this member variable be a raw pointer is brittle and assumes
that the GraphicsLayer tree keeps this in sync. There aren't any
known bugs caused by this, but it seems like good sense to do this.
* platform/graphics/chromium/LayerChromium.h:
(WebCore::LayerChromium::replicaLayer):
2011-06-02 Ryosuke Niwa <rniwa@webkit.org>
Reviewed by Eric Seidel.
REGRESSION: inline style is lost when deleting line break between paragraphs with same style
https://bugs.webkit.org/show_bug.cgi?id=61899
The bug was caused by ReplaceSelectionCommand::doApply's calling handleStyleSpansBeforeInsertion
before insertionPos is adjusted by positionAvoidingPrecedingNodes and positionOutsideTabSpan.
Fixed the bug by calling handleStyleSpansBeforeInsertion after the calls to these two functions.
Test: editing/deleting/delete-line-break-between-paragraphs-with-same-style.html
* editing/ReplaceSelectionCommand.cpp:
(WebCore::ReplaceSelectionCommand::doApply):
2011-06-01 Ryosuke Niwa <rniwa@webkit.org>
Reviewed by Simon Fraser.
REGRESSION: Text selection broken for text with line-height applied
https://bugs.webkit.org/show_bug.cgi?id=54929
The bug was caused by RenderText::positionForPoint's not considering the case where a point is
above selectionTop and below lineTop of the first root inline box. Fixed the bug by considering
any point between selectionTop and lineTop to be inside a root inline box. This condition is
consistent with the condition we use to determine the bottom of a line.
Test: editing/selection/hit-test-on-text-with-line-height.html
* rendering/RenderBlock.cpp:
(WebCore::RenderBlock::positionForPointWithInlineChildren): Fixed a condition to determine whether
or not a point is above the first root line box. We need to check both selectionTop and logicalTop
for the same reason explained above.
* rendering/RenderText.cpp:
(WebCore::RenderText::positionForPoint): See above.
2011-06-02 Andreas Kling <kling@webkit.org>
Reviewed by James Robinson.
Canvas/V8: Fix setting strokeStyle or fillStyle to a CSS system color.
https://bugs.webkit.org/show_bug.cgi?id=61944
Call setFillColor/setStrokeColor (instead of setFillStyle/setStrokeStyle)
for string styles. This ensures that system color resolution is performed,
and matches what the JSC bindings do.
Test: canvas/philip/tests/2d.fillStyle.parse.system.html
* bindings/v8/custom/V8CanvasRenderingContext2DCustom.cpp:
(WebCore::toCanvasStyle):
(WebCore::V8CanvasRenderingContext2D::strokeStyleAccessorSetter):
(WebCore::V8CanvasRenderingContext2D::fillStyleAccessorSetter):
2011-06-02 Sheriff Bot <webkit.review.bot@gmail.com>
Unreviewed, rolling out r87920.
http://trac.webkit.org/changeset/87920
https://bugs.webkit.org/show_bug.cgi?id=61943
This patch does not build in Win Builder (dbg)(shared)
downstream (Requested by abarth|gardener on #webkit).
* platform/chromium/PopupMenuChromium.cpp:
(WebCore::PopupContainer::showPopup):
(WebCore::PopupListBox::handleMouseReleaseEvent):
(WebCore::PopupListBox::acceptIndex):
2011-06-02 Dimitri Glazkov <dglazkov@chromium.org>
Unreviewed, rolling out r87926.
http://trac.webkit.org/changeset/87926
https://bugs.webkit.org/show_bug.cgi?id=60313
Fails to find WebCoreTestSupport.dylib on bots.
* Configurations/WebCore.xcconfig:
* Configurations/WebCoreTestSupport.xcconfig: Removed.
* DerivedSources.make:
* WebCore.exp.in:
* WebCore.gyp/WebCore.gyp:
* WebCore.gypi:
* WebCore.xcodeproj/project.pbxproj:
* bindings/js/JSDOMWrapper.cpp:
(WebCore::JSDOMWrapper::~JSDOMWrapper):
* bindings/js/JSDOMWrapper.h:
* testing/Internals.cpp: Removed.
* testing/Internals.h: Removed.
* testing/Internals.idl: Removed.
* testing/js/WebCoreTestSupport.cpp: Removed.
* testing/js/WebCoreTestSupport.h: Removed.
* testing/v8/WebCoreTestSupport.cpp: Removed.
* testing/v8/WebCoreTestSupport.h: Removed.
2011-06-02 Carlos Garcia Campos <cgarcia@igalia.com>
Reviewed by Martin Robinson.
[GTK] Implement popup menus in Webkit2
https://bugs.webkit.org/show_bug.cgi?id=61854
Move common code into a new class to be used by both WebKit1 and
WebKit2.
* GNUmakefile.list.am: Add new files to compilation.
* platform/gtk/GtkPopupMenu.cpp: Copied from Source/WebCore/platform/gtk/PopupMenuGtk.cpp.
(WebCore::GtkPopupMenu::GtkPopupMenu):
(WebCore::GtkPopupMenu::~GtkPopupMenu):
(WebCore::GtkPopupMenu::clear): Remove all menu items.
(WebCore::GtkPopupMenu::appendSeparator): Add a new separator
item to the menu.
(WebCore::GtkPopupMenu::appendItem): Add a new item to the menu for
the given action.
(WebCore::GtkPopupMenu::popUp): Show the menu.
(WebCore::GtkPopupMenu::popDown): Hide the menu.
(WebCore::GtkPopupMenu::menuRemoveItem):
(WebCore::GtkPopupMenu::menuPositionFunction):
(WebCore::GtkPopupMenu::resetTypeAheadFindState):
(WebCore::GtkPopupMenu::typeAheadFind):
(WebCore::GtkPopupMenu::selectItemCallback):
(WebCore::GtkPopupMenu::keyPressEventCallback):
* platform/gtk/GtkPopupMenu.h: Copied from Source/WebCore/platform/gtk/PopupMenuGtk.h.
(WebCore::GtkPopupMenu::create):
(WebCore::GtkPopupMenu::platformMenu):
* platform/gtk/PopupMenuGtk.cpp:
(WebCore::PopupMenuGtk::PopupMenuGtk):
(WebCore::PopupMenuGtk::~PopupMenuGtk):
(WebCore::PopupMenuGtk::show): Use GtkPopupMenu.
(WebCore::PopupMenuGtk::hide): Ditto.
(WebCore::PopupMenuGtk::menuItemActivated):
(WebCore::PopupMenuGtk::menuUnmapped):
* platform/gtk/PopupMenuGtk.h:
2011-05-21 Dimitri Glazkov <dglazkov@chromium.org>
Reviewed by Darin Adler.
Add build logistics and plumbing for window.internals object.
https://bugs.webkit.org/show_bug.cgi?id=60313
Test: fast/harness/internals-object.html
* Configurations/WebCoreTestSupport.xcconfig: Added.
* DerivedSources.make: Added support for generating from Internals.idl.
* WebCore.gyp/WebCore.gyp: Added new webcore_test_support library.
* WebCore.gypi: Ditto.
* WebCore.xcodeproj/project.pbxproj: Added WebCoreTestSupport library.
* testing/Internals.cpp: Added.
* testing/Internals.h: Added.
* testing/Internals.idl: Added.
* testing/js/WebCoreTestSupport.cpp: Added.
* testing/js/WebCoreTestSupport.h: Added.
* testing/v8/WebCoreTestSupport.cpp: Added.
* testing/v8/WebCoreTestSupport.h: Added.
2011-06-02 Naoki Takano <takano.naoki@gmail.com>
Reviewed by Dimitri Glazkov.
[Chromium] Click event is not fired for a menulist <select>
https://bugs.webkit.org/show_bug.cgi?id=60563
Tests: SelectItemEventFire, SelectItemKeyEvent, SelectItemRemoveSelectOnChange and SelectItemRemoveSelectOnChange in webkit_unit_tests.
* platform/chromium/PopupMenuChromium.cpp:
(WebCore::PopupContainer::showPopup): Set m_focusedNode from m_frameView.
(WebCore::PopupListBox::handleMouseReleaseEvent): Call dispatchMouseEvent to forward the event only if select popup.
(WebCore::PopupListBox::acceptIndex): Change to return accepted or not.
2011-06-02 Dimitri Glazkov <dglazkov@chromium.org>
Reviewed by Darin Adler.
Stop event propagation for cases where relatedTarget is both ancestor of the target and at shadow boundary.
https://bugs.webkit.org/show_bug.cgi?id=61892
In the cases where the relatedTarget of an event is an ancestor of the target, and the relatedTarget is
a shadow host, we should not allow events to escape out of the hosted shadow DOM subtree.
* dom/EventDispatcher.cpp:
(WebCore::EventDispatcher::adjustToShadowBoundaries): Added a check that is valid for both new and old shadow DOM.
2011-06-02 Hans Wennborg <hans@chromium.org>
Reviewed by Tony Gentilcore.
Fix LevelDBTransaction::clearTree()
https://bugs.webkit.org/show_bug.cgi?id=61917
This was broken in the code I copied it from; we can't delete and walk
the tree at the same time.
No new functionality, no new tests.
* platform/leveldb/LevelDBTransaction.cpp:
(WebCore::LevelDBTransaction::clearTree):
2011-06-02 Andreas Kling <kling@webkit.org>
Rubber-stamped by Simon Hausmann.
Remove Qt's precompiled header hack as it was broken, and was not even
used unless building WebKit inside a Qt tree.
* WebCore.pri:
2011-06-02 James Robinson <jamesr@chromium.org>
Reviewed by Brady Eidson.
DocumentLoader keeps a reference to all URL strings ever loaded leading to lots of memory waste
https://bugs.webkit.org/show_bug.cgi?id=61894
DocumentLoader::m_resourcesClientKnowsAbout is a set of all the URLs that have passed through
FrameLoader::dispatchWillSendRequest() and is used by FrameLoader::loadedResourceFromMemoryCached to decide
whether to inform the FrameLoader's m_client about this load. Unfortunately, this set holds a reference to the
URL string for every resource loaded, so on pages that use data URLs to "load" large amounts of data this leaks
lots of memory.
This set only has an effect on the Mac port, as the only two ports that implement
FrameLoaderClient::dispatchDidLoadResourceFromMemoryCache() are Chromium and Mac and the Chromium implementation
can correctly handle receiving multiple callbacks. This patch limits the set to only PLATFORM(MAC) so other
ports do not have to pay this memory cost. It's possible that a better fix exists specifically for the Mac port
implementation, but that would have to determined by someone who works on that port specifically.
* loader/DocumentLoader.h:
(WebCore::DocumentLoader::didTellClientAboutLoad):
(WebCore::DocumentLoader::haveToldClientAboutLoad):
2011-06-02 Aparna Nandyal <aparna.nand@wipro.com>
Reviewed by Andreas Kling.
[Qt] Multiple drop events when doing DnD of images.
https://bugs.webkit.org/show_bug.cgi?id=61504
Duplicate entries of the url were getting added into drag data
which is removed. The duplicate entries were causing the same image
url to be copied twice. The code changes now match other webkit ports.
* platform/qt/ClipboardQt.cpp:
(WebCore::ClipboardQt::declareAndWriteDragImage):
2011-06-02 Naiem Shaik <naiem.shaik@gmail.com>
Reviewed by Kent Tamura.
Fixing invalid value being returned for default checkbox and radio state
https://bugs.webkit.org/show_bug.cgi?id=61674
As per http://www.w3.org/TR/html5/number-state.html#checkbox-state and
http://www.w3.org/TR/html5/number-state.html#radio-button-state:
The value IDL attribute is in mode default/on:
If the element has a value attribute, it must return that attribute's
value; otherwise, it must return the string "on".
Currently default value is empty string;Default value of Radio button
and checkbox should be "on".Changed fallbackValue function to return the same
This works as per spec in IE9,Firefox and Opera
Tests: fast/forms/checkbox-default-value.html
fast/forms/radio-default-value.html
* html/BaseCheckableInputType.cpp:
(WebCore::BaseCheckableInputType::fallbackValue):
2011-06-02 Kent Tamura <tkent@chromium.org>
[Chromium/Mac] Fix a wrong merge for r87881
https://bugs.webkit.org/show_bug.cgi?id=61845
* platform/chromium/ThemeChromiumMac.mm:
(WebCore::paintStepper):
2011-06-02 Ian Henderson <ianh@apple.com>
Reviewed by Simon Fraser.
[CG] GraphicsContext::fillRoundedRect() ignores the gradient fill the CGContextFillEllipseInRect() code path
https://bugs.webkit.org/show_bug.cgi?id=61882
If we have a gradient or pattern fill set, take the slow path, which
handles these cases properly.
No new tests, since we never try to fill a rounded rect with a
gradient or pattern.
* platform/graphics/cg/GraphicsContextCG.cpp:
(WebCore::GraphicsContext::fillRoundedRect):
2011-06-02 MORITA Hajime <morrita@google.com>
Reviewed by Kent Tamura.
[Refactoring] Node::nextRenderer() and previousRenderer() should be part of NodeRenderingContext
https://bugs.webkit.org/show_bug.cgi?id=61912
Inlined Node::nextRenderer() and previousRenderer() into NodeRenderingContext and
removed original definitions.
No test, no behavioral change.
* dom/Node.cpp:
* dom/Node.h:
* dom/NodeRenderingContext.cpp:
(WebCore::NodeRenderingContext::nextRenderer):
(WebCore::NodeRenderingContext::previousRenderer):
2011-06-02 Piroska András <Piroska.Andras@stud.u-szeged.hu>
Rubber-stamped by Gabor Loki.
Trivial buildfix for the ParallelJobs part of FEConvolveMatrix.
* platform/graphics/filters/FEConvolveMatrix.cpp:
(WebCore::FEConvolveMatrix::apply): Rename variable i to job
2011-06-02 Yuta Kitamura <yutak@chromium.org>
Reviewed by Kent Tamura.
WebSocket: Call WebSocketChannel::fail() when WebSocketHandshake has failed
https://bugs.webkit.org/show_bug.cgi?id=61841
There is no change in behavior except that capitalization of a few error messages
has been changed. No new tests are added.
* websockets/WebSocketChannel.cpp:
(WebCore::WebSocketChannel::processBuffer):
Pass m_handshake.failureReason() to fail() if the handshake has failed.
* websockets/WebSocketHandshake.cpp:
Replace occurrences of m_handle->addMessage() with assignments to m_failureReason.
Change capitalization of a few messages so that all messages start with a capital letter.
(WebCore::WebSocketHandshake::readServerHandshake):
(WebCore::WebSocketHandshake::failureReason):
(WebCore::WebSocketHandshake::readStatusLine):
(WebCore::WebSocketHandshake::readHTTPHeaders):
(WebCore::WebSocketHandshake::checkResponseHeaders):
* websockets/WebSocketHandshake.h:
Add failureReason(), which returns a string that describes why WebSocket handshake
has failed.
2011-06-01 Dan Bernstein <mitz@apple.com>
Reviewed by Anders Carlsson.
Incorrect UA style when printing a simple document
https://bugs.webkit.org/show_bug.cgi?id=61900
This is not testable in run-webkit-tests because unless the test is the first to run in an instance
of DumpRenderTree, it is not guaranteed that the full default style sheet has not been initialized.
* css/CSSStyleSelector.cpp:
(WebCore::loadFullDefaultStyle): Replace the simple default print style, which is now equal to the
simple default style, with a new RuleSet before adding the style rules from the full default sheet.
(WebCore::loadSimpleDefaultStyle): Set defaultPrintStyle to point to the default style. They are
equal in the simple case.
2011-06-01 Kent Tamura <tkent@chromium.org>
Reviewed by Dimitri Glazkov.
Remove outer-spin-button
https://bugs.webkit.org/show_bug.cgi?id=61845
Remove outer-spin-button, and render steppers as inner-spin-button.
Outer-spin-button have never worked well with padding and border of
<input>, and the layout code is very tricky and very hard to maintain it.
* css/CSSPrimitiveValueMappings.h:
(WebCore::CSSPrimitiveValue::CSSPrimitiveValue):
* css/CSSValueKeywords.in:
* css/html.css:
* html/HTMLInputElement.cpp:
(WebCore::HTMLInputElement::innerSpinButtonElement):
* html/HTMLInputElement.h:
* html/InputType.h:
* html/TextFieldInputType.cpp:
(WebCore::TextFieldInputType::TextFieldInputType):
(WebCore::TextFieldInputType::createShadowSubtree):
(WebCore::TextFieldInputType::destroyShadowSubtree):
* html/TextFieldInputType.h:
* html/shadow/TextControlInnerElements.cpp:
(WebCore::SpinButtonElement::SpinButtonElement):
(WebCore::SpinButtonElement::create):
(WebCore::SpinButtonElement::shadowPseudoId):
* html/shadow/TextControlInnerElements.h:
* platform/ThemeTypes.h:
* platform/chromium/ThemeChromiumMac.mm:
(WebCore::paintStepper):
Center the stepper drawing area because the specified area can be
larger than the NSStepper sizes.
(WebCore::ThemeChromiumMac::controlSize):
(WebCore::ThemeChromiumMac::minimumControlSize):
(WebCore::ThemeChromiumMac::inflateControlPaintRect):
(WebCore::ThemeChromiumMac::paint):
* platform/mac/ThemeMac.mm:
(WebCore::paintStepper):
Center the stepper drawing area because the specified area can be
larger than the NSStepper sizes.
(WebCore::ThemeMac::controlSize):
(WebCore::ThemeMac::minimumControlSize):
(WebCore::ThemeMac::inflateControlPaintRect):
(WebCore::ThemeMac::paint):
* rendering/RenderBox.cpp:
(WebCore::RenderBox::paintBoxDecorations):
* rendering/RenderBox.h:
* rendering/RenderTextControlSingleLine.cpp:
(WebCore::RenderTextControlSingleLine::layout):
(WebCore::RenderTextControlSingleLine::nodeAtPoint):
(WebCore::RenderTextControlSingleLine::textBlockWidth):
* rendering/RenderTextControlSingleLine.h:
* rendering/RenderTheme.cpp:
(WebCore::RenderTheme::adjustStyle):
(WebCore::RenderTheme::paint):
(WebCore::RenderTheme::adjustInnerSpinButtonStyle):
* rendering/RenderTheme.h:
* rendering/RenderThemeMac.mm:
(WebCore::RenderThemeMac::adjustRepaintRect):
2011-06-01 Emil A Eklund <eae@chromium.org>
Reviewed by Eric Seidel.
Switch RenderLayer::convertToLayerCoords to use IntPoint
https://bugs.webkit.org/show_bug.cgi?id=61818
Covered by existing tests.
* platform/graphics/FloatPoint.h:
(WebCore::flooredIntSize):
* rendering/RenderLayer.cpp:
(WebCore::RenderLayer::updateLayerPositions):
(WebCore::expandClipRectForDescendantsAndReflection):
(WebCore::transparencyClipBox):
(WebCore::RenderLayer::convertToLayerCoords):
(WebCore::RenderLayer::paintLayer):
(WebCore::RenderLayer::paintChildLayerIntoColumns):
(WebCore::RenderLayer::createLocalTransformState):
(WebCore::RenderLayer::hitTestChildLayerColumns):
(WebCore::RenderLayer::calculateClipRects):
(WebCore::RenderLayer::calculateRects):
(WebCore::RenderLayer::boundingBox):
(WebCore::RenderLayer::setBackingNeedsRepaintInRect):
* rendering/RenderLayer.h:
* rendering/RenderLayerBacking.cpp:
(WebCore::RenderLayerBacking::updateCompositedBounds):
(WebCore::RenderLayerBacking::updateGraphicsLayerGeometry):
* rendering/RenderLayerCompositor.cpp:
(WebCore::RenderLayerCompositor::calculateCompositedBounds):
(WebCore::RenderLayerCompositor::layerWillBeRemoved):
(WebCore::RenderLayerCompositor::recursiveRepaintLayerRect):
2011-06-01 Roland Steiner <rolandsteiner@chromium.org>
Reviewed by Kent Tamura.
Remove superfluous renderer() test
https://bugs.webkit.org/show_bug.cgi?id=61907
No new tests. (trivial)
* dom/Document.cpp:
(WebCore::Document::recalcStyle):
2011-06-01 Levi Weintraub <leviw@chromium.org>
Reviewed by Hajime Morita.
Add IntPoint + IntPoint operator
https://bugs.webkit.org/show_bug.cgi?id=61876
Adding an operator+ convenience method to IntPoint that sums two points
and returns the result as an IntPoint. Changing doImageDrag to use it
as a proof of concept.
No new tests since there is no change in behavior.
* page/DragController.cpp:
(WebCore::DragController::doImageDrag):
* platform/graphics/IntPoint.h:
(WebCore::operator+):
2011-06-01 Jaehun Lim <ljaehun.lim@samsung.com>
Reviewed by Eric Seidel.
[EFL] Add adjustMenuListButtonStyle and paintMenuListButton functions
https://bugs.webkit.org/show_bug.cgi?id=61836
Add functions for rendering drop-down list when style attributes are applied.
* platform/efl/RenderThemeEfl.cpp:
(WebCore::RenderThemeEfl::adjustMenuListButtonStyle):
(WebCore::RenderThemeEfl::paintMenuListButton):
* platform/efl/RenderThemeEfl.h:
2011-06-01 Yuta Kitamura <yutak@chromium.org>
Reviewed by Kent Tamura.
WebSocket: WebSocketChannel::fail() should close the connection immediately
https://bugs.webkit.org/show_bug.cgi?id=61851
The effect of this change is almost unobservable. The difference between m_handle->close() and
m_handle->disconnect() is that the former does not close the connection if the handle has
unsent data while the latter immediately closes the connection regardless of unsent data.
Usually a socket stream handle does not have unsent data, and even if it has any, it is hard
for user scripts to observe the difference between close() and disconnect() (it should take some time
for onclose() to be called if there are any unsent data, but there ought to be no other difference
in user scripts' perspective).
No new tests are added, because writing a test for this issue is not feasible due to the above reason.
* websockets/WebSocketChannel.cpp:
(WebCore::WebSocketChannel::fail): Use m_handle->disconnect() instead of m_handle->close().
2011-06-01 Abhishek Arya <inferno@chromium.org>
Unreviewed.
Coding style nit. Move ec=0 initialization, change
recommended by Alexey in bug.
https://bugs.webkit.org/show_bug.cgi?id=60831
* dom/Document.cpp:
(WebCore::Document::setBody):
2011-06-01 Hayato Ito <hayato@chromium.org>
Reviewed by Kent Tamura.
Move {Next,Previous}FocusableNode functions from Document to FocusController.
https://bugs.webkit.org/show_bug.cgi?id=61839
There are some member functions in Document which use 'this'
pointer, but we should use TreeScope instead of Document in some
places to handle focus issues nicely. We have to move these
functions out of Document class so that we can give the TreeScope
as a parameter.
No new tests since no functionality was changed.
* dom/Document.cpp:
* dom/Document.h:
* page/FocusController.cpp:
(WebCore::FocusController::deepFocusableNode):
(WebCore::FocusController::advanceFocusInDocumentOrder):
(WebCore::nextNodeWithExactTabIndex):
(WebCore::previousNodeWithExactTabIndex):
(WebCore::nextNodeWithGreaterTabIndex):
(WebCore::previousNodeWithLowerTabIndex):
(WebCore::FocusController::nextFocusableNode):
(WebCore::FocusController::previousFocusableNode):
* page/FocusController.h:
2011-06-01 Adrienne Walker <enne@google.com>
Reviewed by James Robinson.
[chromium] Fix syncing of removed mask and replica layers
https://bugs.webkit.org/show_bug.cgi?id=61895
* platform/graphics/chromium/TreeSynchronizer.cpp:
(WebCore::TreeSynchronizer::synchronizeTreeRecursive):
2011-06-01 Julien Chaffraix <jchaffraix@codeaurora.org>
Reviewed by Simon Fraser.
CSSStyleSheet#insertRule doesn't work well with imported stylesheets
https://bugs.webkit.org/show_bug.cgi?id=56981
Test: fast/css/import-and-insert-rule-no-update.html
The bug arises from the fact that <link> element did not know about a programmatically
loading sheet (using insertRule and @import) and would thus never call removePendingSheet.
This is needed to make sure our style selector contains an up-to-date list of stylesheets.
The gist of the patch adds a way for style sheet owner element to know if we are
programmatically loading a style sheet. This is needed as <link> keeps the information
about that last loaded stylesheet.
* css/CSSImportRule.cpp:
(WebCore::CSSImportRule::insertedIntoParent): Call startLoadingDynamicSheet
on our parent style sheet instead of directly adding a pending style sheet.
* css/CSSStyleSheet.cpp:
(WebCore::CSSStyleSheet::startLoadingDynamicSheet): Call startLoadingDynamicSheet
on our owner element if we have one.
* css/CSSStyleSheet.h:
* dom/Node.h:
(WebCore::Node::startLoadingDynamicSheet): Added common implementation of
startLoadingDynamicSheet, which should never be called.
* dom/StyleElement.cpp:
(WebCore::StyleElement::startLoadingDynamicSheet):
* dom/StyleElement.h:
Common implementation of startLoadingDynamicSheet for style elements.
* html/HTMLLinkElement.cpp:
(WebCore::HTMLLinkElement::startLoadingDynamicSheet):
* html/HTMLLinkElement.h:
Use the HTMLLinkElement plumbing to make sure we call addRemovePendingSheet.
* html/HTMLStyleElement.h:
(WebCore::HTMLStyleElement::startLoadingDynamicSheet):
* svg/SVGStyleElement.h:
(WebCore::SVGStyleElement::startLoadingDynamicSheet):
Forward the call to StyleElement.
2011-06-01 Levi Weintraub <leviw@chromium.org>
Reviewed by Eric Seidel.
Switch paintCustomHighlight to use IntPoint
https://bugs.webkit.org/show_bug.cgi?id=61562
Switching paintCustomHighlight to use an IntPoint for
its paint offset instead of a pair of ints.
No new tests since this is refactoring.
* rendering/InlineTextBox.cpp:
(WebCore::InlineTextBox::paint):
(WebCore::InlineTextBox::paintCustomHighlight):
* rendering/InlineTextBox.h:
* rendering/RenderBox.cpp:
(WebCore::RenderBox::paintCustomHighlight):
* rendering/RenderBox.h:
* rendering/RenderImage.cpp:
(WebCore::RenderImage::paintReplaced):
* rendering/RenderListMarker.cpp:
(WebCore::RenderListMarker::paint):
* rendering/RenderWidget.cpp:
(WebCore::RenderWidget::paint):
* rendering/RootInlineBox.cpp:
(WebCore::RootInlineBox::paintCustomHighlight):
(WebCore::RootInlineBox::paint):
* rendering/RootInlineBox.h:
2011-06-01 Emil A Eklund <eae@chromium.org>
Reviewed by Eric Seidel.
Switch MouseRelatedEvent to use IntPoint
https://bugs.webkit.org/show_bug.cgi?id=61574
Covered by existing tests.
* dom/MouseEvent.cpp:
(WebCore::MouseEvent::MouseEvent):
(WebCore::MouseEvent::initMouseEvent):
(WebCore::SimulatedMouseEvent::SimulatedMouseEvent):
* dom/MouseRelatedEvent.cpp:
(WebCore::MouseRelatedEvent::MouseRelatedEvent):
(WebCore::contentsScrollOffset):
(WebCore::MouseRelatedEvent::initCoordinates):
(WebCore::MouseRelatedEvent::computeRelativePosition):
(WebCore::MouseRelatedEvent::layerX):
(WebCore::MouseRelatedEvent::layerY):
(WebCore::MouseRelatedEvent::offsetX):
(WebCore::MouseRelatedEvent::offsetY):
(WebCore::MouseRelatedEvent::pageX):
(WebCore::MouseRelatedEvent::pageY):
(WebCore::MouseRelatedEvent::pageLocation):
(WebCore::MouseRelatedEvent::x):
(WebCore::MouseRelatedEvent::y):
* dom/MouseRelatedEvent.h:
(WebCore::MouseRelatedEvent::screenX):
(WebCore::MouseRelatedEvent::screenY):
(WebCore::MouseRelatedEvent::screenLocation):
(WebCore::MouseRelatedEvent::clientX):
(WebCore::MouseRelatedEvent::clientY):
(WebCore::MouseRelatedEvent::clientLocation):
(WebCore::MouseRelatedEvent::absoluteLocation):
* dom/TouchEvent.cpp:
(WebCore::TouchEvent::TouchEvent):
(WebCore::TouchEvent::initTouchEvent):
* dom/WheelEvent.cpp:
(WebCore::WheelEvent::WheelEvent):
(WebCore::WheelEvent::initWheelEvent):
(WebCore::WheelEventDispatchMediator::WheelEventDispatchMediator):
* dom/WheelEvent.h:
(WebCore::WheelEvent::create):
(WebCore::WheelEvent::wheelDelta):
(WebCore::WheelEvent::wheelDeltaX):
(WebCore::WheelEvent::wheelDeltaY):
(WebCore::WheelEvent::rawDeltaX):
(WebCore::WheelEvent::rawDeltaY):
(WebCore::WheelEvent::isHorizontal):
* platform/graphics/IntPoint.h:
(WebCore::IntPoint::scale):
2011-06-01 Levi Weintraub <leviw@chromium.org>
Reviewed by Eric Seidel.
Switch paintOverflowControls to use IntPoint
https://bugs.webkit.org/show_bug.cgi?id=61884
Switching paintOverflowControls to use an IntPoint instead of a pair of ints.
No new tests since this is simple refactoring.
* rendering/RenderBlock.cpp:
(WebCore::RenderBlock::paint):
* rendering/RenderLayer.cpp:
(WebCore::RenderLayer::paintOverflowControls):
(WebCore::RenderLayer::paintLayer):
* rendering/RenderLayer.h:
* rendering/RenderLayerBacking.cpp:
(WebCore::RenderLayerBacking::paintIntoLayer):
2011-06-01 Abhishek Arya <inferno@chromium.org>
Reviewed by Alexey Proskuryakov.
Fix setting of document.body
https://bugs.webkit.org/show_bug.cgi?id=60831
1. Only allowing setting to an element if it has a body tag.
2. If element is from another document, import it.
Test: fast/dom/document-set-body.html
* dom/Document.cpp:
(WebCore::Document::setBody):
2011-06-01 Chris Fleizach <cfleizach@apple.com>
Reviewed by Darin Adler.
Safari always crashes on http://bbc.co.uk when VoiceOver enabled
https://bugs.webkit.org/show_bug.cgi?id=61886
This crash can happen on webpages that remove an element from the DOM when the element receives focus.
When AppKit goes to post a notification to inform VoiceOver the focus has changed, it asks for the AXFocusedUIElement.
However by posting that notification, a render tree update is performed. This causes the element to disappear, but
AppKit still has a handle to it and continues to try to reference it. When the autorelease pool pops, the reference goes bad.
To fix, the root element, the AccessibilityScrollView, needs to implement updateBackingStore(), otherwise this method
will not be called in time.
No test could be created because to cause it depends on an internal AppKit mechanism
that is only triggered remotely through the accessibility runtime.
* accessibility/AccessibilityObject.cpp:
(WebCore::AccessibilityObject::updateBackingStore):
* accessibility/AccessibilityObject.h:
* accessibility/AccessibilityRenderObject.cpp:
* accessibility/AccessibilityRenderObject.h:
2011-06-01 David Carson <dacarson@apple.com>
Reviewed by Antti Koivisto.
https://bugs.webkit.org/show_bug.cgi?id=61831
If width and height of an iframe is fixed and should not be visible, then
it shouldn't be flattened.
Test: fast/frames/flattening/iframe-flattening-fixed-width-and-height-zero-size.html
* rendering/RenderIFrame.cpp:
(WebCore::RenderIFrame::flattenFrame): add a check for a zero width or height
2011-06-01 Daniel Cheng <dcheng@chromium.org>
Reviewed by Tony Chang.
[chromium] Use correct file name for dragging out images.
https://bugs.webkit.org/show_bug.cgi?id=24887
We try to guess an appropriate filename when dragging out images. In order, we try to use:
- The filename suggested in the HTTP header.
- The last path component of the source URL.
- The alt text.
This matches the behavior of the other WebKit ports.
Test: fast/events/drag-image-filename.html
* platform/chromium/ClipboardChromium.cpp:
(WebCore::writeImageToDataObject):
* platform/chromium/ClipboardChromiumMac.cpp:
(WebCore::isInvalidFileCharacter):
(WebCore::ClipboardChromium::validateFileName):
2011-06-01 Levi Weintraub <leviw@chromium.org>
Reviewed by Eric Seidel.
Text is scaled in a stair-step pattern
https://bugs.webkit.org/show_bug.cgi?id=60317
Stop scaling the specified font to the actual on-screen value when font-rendering:
geometricPrecision is specified, but instead scale the graphics context. This allows
us to scale text up and down smoothly.
Test: svg/text/scaling-font-with-geometric-precision.html
* rendering/svg/RenderSVGInlineText.cpp:
(WebCore::RenderSVGInlineText::computeNewScaledFontForStyle):
2011-06-01 Levi Weintraub <leviw@chromium.org>
Reviewed by Eric Seidel.
Switch paintResizer to use IntPoint
https://bugs.webkit.org/show_bug.cgi?id=61883
Switch paintResizer to take an IntPoint instead of a pair of ints.
No new tests as this is simple refactoring.
* rendering/RenderLayer.cpp:
(WebCore::RenderLayer::paintOverflowControls):
(WebCore::RenderLayer::paintResizer):
* rendering/RenderLayer.h:
* rendering/RenderLayerBacking.cpp:
(WebCore::RenderLayerBacking::paintContents):
2011-06-01 Jer Noble <jer.noble@apple.com>
Reviewed by Darin Adler.
Page layout messed up after exiting full screen at Apple trailers page
https://bugs.webkit.org/show_bug.cgi?id=61755
<rdar://problem/9525277>
Test: fullscreen/full-screen-zIndex-after.html
Fix the incomplete implementation of r87660. Make parameters to
setContainsFullScreenElementRecursively() in webkitWillExitFullScreenForElement() match those
in webkitWillEnterFullScreenForElement(), so the ancestors' flags do not become
inconsistent..
* dom/Document.cpp:
(WebCore::Document::webkitWillExitFullScreenForElement):
2011-06-01 Levi Weintraub <leviw@chromium.org>
Reviewed by Eric Seidel.
Switch paintScrollCorner to use IntPoint
https://bugs.webkit.org/show_bug.cgi?id=61874
Changing paintScrollCorner to take an IntPoint representing the paint
offset instead of a pair of ints.
No new tests as this is simple refactoring.
* rendering/RenderLayer.cpp:
(WebCore::RenderLayer::paintOverflowControls):
(WebCore::RenderLayer::paintScrollCorner):
* rendering/RenderLayer.h:
* rendering/RenderLayerBacking.cpp:
(WebCore::RenderLayerBacking::paintContents):
2011-06-01 Kenneth Russell <kbr@google.com>
Reviewed by Nate Chapin.
[V8] Optimize fetches of indexed properties in custom bindings
https://bugs.webkit.org/show_bug.cgi?id=61821
Avoid allocating garbage in affected custom bindings. This speeds
up one test case by at least a factor of two. No new tests;
covered by existing layout tests (typed array and otherwise).
* bindings/v8/custom/V8ArrayBufferViewCustom.h:
(WebCore::constructWebGLArray):
(WebCore::setWebGLArrayHelper):
* bindings/v8/custom/V8InspectorFrontendHostCustom.cpp:
(WebCore::V8InspectorFrontendHost::showContextMenuCallback):
* bindings/v8/custom/V8MessagePortCustom.cpp:
(WebCore::getMessagePortArray):
* bindings/v8/custom/V8WebGLRenderingContextCustom.cpp:
(WebCore::jsArrayToFloatArray):
(WebCore::jsArrayToIntArray):
2011-06-01 Andras Becsi <abecsi@webkit.org>
Reviewed by Csaba Osztrogonác.
[Qt] Fix the Phonon build when logging is disabled
https://bugs.webkit.org/show_bug.cgi?id=61869
No new tests needed.
* platform/graphics/qt/MediaPlayerPrivatePhonon.cpp: Add missing guards.
(WebCore::MediaPlayerPrivatePhonon::networkState):
(WebCore::MediaPlayerPrivatePhonon::readyState):
(WebCore::MediaPlayerPrivatePhonon::updateStates):
(WebCore::MediaPlayerPrivatePhonon::stateChanged):
2011-06-01 Abhishek Arya <inferno@chromium.org>
Reviewed by Antti Koivisto.
Do not use the pushed style selector if it is not equal to the
parent document's style selector. It usually means that it is
in a bad state, e.g. already cleared.
https://bugs.webkit.org/show_bug.cgi?id=61737
* dom/Element.cpp:
(WebCore::StyleSelectorParentPusher::~StyleSelectorParentPusher):
2011-06-01 Levi Weintraub <leviw@chromium.org>
Reviewed by Eric Seidel.
Switch RenderLineBoxList intersection functions to use IntPoint
https://bugs.webkit.org/show_bug.cgi?id=61794
Switching rangeIntersectsRect, anyLineIntersectsRect, and lineIntersectsDirtyRect
to take IntPoint instead of a tx/ty to represent the offset to be applied match
the rect and lines' coordinates.
No new tests since this is merely refactoring.
* rendering/RenderLineBoxList.cpp:
(WebCore::RenderLineBoxList::rangeIntersectsRect):
(WebCore::RenderLineBoxList::anyLineIntersectsRect):
(WebCore::RenderLineBoxList::lineIntersectsDirtyRect):
(WebCore::RenderLineBoxList::paint):
(WebCore::RenderLineBoxList::hitTest):
* rendering/RenderLineBoxList.h:
2011-05-19 Adrienne Walker <enne@google.com>
Reviewed by James Robinson.
[chromium] Don't split long, narrow layers into multiple tiles.
https://bugs.webkit.org/show_bug.cgi?id=60821
This changes the heuristic for when we tile layers to be less bad
about wasting texture space. Long, narrow layers that are tiled with
a large tile size waste texture space. Now layers are only tiled if
they are above 512px in one dimension and extend into a second tile in
the other. If they are not tiled, their layer texture will exactly
fit their layer bounds. In particular, this will help scrollbars.
* platform/graphics/chromium/ContentLayerChromium.cpp:
(WebCore::ContentLayerChromium::updateLayerSize):
* platform/graphics/chromium/LayerRendererChromium.h:
(WebCore::LayerRendererChromium::maxTextureSize):
2011-06-01 Cary Clark <caryclark@google.com>
Reviewed by Eric Seidel.
Ready Chromium port for Skia on Mac
https://bugs.webkit.org/show_bug.cgi?id=61800
Skia on Mac is not enabled. The executing
code is unchanged, so there are no new tests.
* platform/chromium/DragImageRef.h:
Use Skia for DragImageRef instead of CG.
* platform/chromium/ScrollbarThemeChromiumMac.mm:
(WebCore::ScrollbarThemeChromiumMac::paint):
Get the total matrix from Skia for the scrollbar.
Convert the SkCanvas into a CGContext to draw.
* platform/chromium/ThemeChromiumMac.mm:
(WebCore::paintStepper):
Ditto.
2011-06-01 Yury Semikhatsky <yurys@chromium.org>
Reviewed by Pavel Feldman.
Web Inspector: allow opening inspector for existing workers
https://bugs.webkit.org/show_bug.cgi?id=61853
Added sidebar pane with a list of all workers. Each worker has a check box
that allows opening inspector for the worker.
* inspector/Inspector.json:
* inspector/InspectorInstrumentation.cpp:
(WebCore::InspectorInstrumentation::didStartWorkerContextImpl):
* inspector/InspectorInstrumentation.h:
(WebCore::InspectorInstrumentation::didStartWorkerContext):
* inspector/InspectorWorkerAgent.cpp:
(WebCore::InspectorWorkerAgent::WorkerFrontendChannel::WorkerFrontendChannel):
(WebCore::InspectorWorkerAgent::WorkerFrontendChannel::~WorkerFrontendChannel):
(WebCore::InspectorWorkerAgent::WorkerFrontendChannel::connectToWorkerContext):
(WebCore::InspectorWorkerAgent::WorkerFrontendChannel::disconnectFromWorkerContext):
(WebCore::InspectorWorkerAgent::clearFrontend):
(WebCore::InspectorWorkerAgent::connectToWorker):
(WebCore::InspectorWorkerAgent::disconnectFromWorker):
(WebCore::InspectorWorkerAgent::didStartWorkerContext):
* inspector/InspectorWorkerAgent.h:
* inspector/front-end/ScriptsPanel.js:
(WebInspector.ScriptsPanel):
* inspector/front-end/Settings.js:
* inspector/front-end/WorkerManager.js:
(WebInspector.WorkerManager):
(WebInspector.WorkerManager.prototype._workerCreated):
(WebInspector.WorkerManager.prototype._sendMessageToWorkerInspector):
(WebInspector.WorkerManager.prototype.openWorkerInspector):
(WebInspector.WorkerManager.prototype.closeWorkerInspector):
(WebInspector.WorkerManager.prototype._workerInspectorClosing):
(WebInspector.WorkerMessageForwarder):
(WebInspector.WorkerMessageForwarder.prototype.workerCreated):
(WebInspector.WorkerMessageForwarder.prototype.dispatchMessageFromWorker):
* inspector/front-end/WorkersSidebarPane.js:
(WebInspector.WorkersSidebarPane):
(WebInspector.WorkersSidebarPane.prototype.addWorker):
(WebInspector.WorkerListSidebarPane):
(WebInspector.WorkerListSidebarPane.prototype._workerAdded):
(WebInspector.WorkerListSidebarPane.prototype._workerRemoved):
(WebInspector.WorkerListSidebarPane.prototype._workerInspectorClosed):
(WebInspector.WorkerListSidebarPane.prototype._addWorker):
(WebInspector.WorkerListSidebarPane.prototype._createCheckbox):
(WebInspector.WorkerListSidebarPane.prototype._workerItemClicked):
* workers/Worker.cpp:
(WebCore::Worker::notifyFinished):
2011-06-01 Shishir Agrawal <shishir@chromium.org>
Reviewed by Tony Gentilcore.
Renaming the Page Visibility attributes as per the modified spec draft.
https://bugs.webkit.org/show_bug.cgi?id=61825
Spec draft:
http://dvcs.w3.org/hg/webperf/raw-file/tip/specs/PageVisibility/Overview.html
- Event needs to be webkitVisibilityChange from webkitVisibilityStateChange
- The attribute webkitIsVisible needs to change to webkitHidden
* dom/Document.cpp:
(WebCore::Document::webkitHidden):
(WebCore::Document::dispatchVisibilityStateChangeEvent):
* dom/Document.h:
* dom/Document.idl:
* dom/EventNames.h:
2011-06-01 Nikolas Zimmermann <nzimmermann@rim.com>
Reviewed by Rob Buis.
Remove duplicated code in various computeReplacedLogical*() functions
https://bugs.webkit.org/show_bug.cgi?id=61860
Centralize this calculation in RenderBox::computeReplacedLogicalWidthRespectingMinMaxWidth:
int minLogicalWidth = computeReplacedLogicalWidthUsing(style()->logicalMinWidth());
int maxLogicalWidth = !includeMaxWidth || style()->logicalMaxWidth().isUndefined() ? logicalWidth : computeReplacedLogicalWidthUsing(style()->logicalMaxWidth());
return max(minLogicalWidth, min(logicalWidth, maxLogicalWidth));
Centralize this calculation in RenderBox::computeReplacedLogicalHeightRespectingMinMaxHeight:
int minLogicalHeight = computeReplacedLogicalHeightUsing(style()->logicalMinHeight());
int maxLogicalHeight = style()->logicalMaxHeight().isUndefined() ? logicalHeight : computeReplacedLogicalHeightUsing(style()->logicalMaxHeight());
return max(minLogicalHeight, min(logicalHeight, maxLogicalHeight));
Use the new helper methods where possible, deduplicating lots of code.
* rendering/RenderBox.cpp:
(WebCore::RenderBox::computeReplacedLogicalWidth):
(WebCore::RenderBox::computeReplacedLogicalWidthRespectingMinMaxWidth):
(WebCore::RenderBox::computeReplacedLogicalHeight):
(WebCore::RenderBox::computeReplacedLogicalHeightRespectingMinMaxHeight):
* rendering/RenderBox.h:
* rendering/RenderImage.cpp:
(WebCore::RenderImage::computeReplacedLogicalWidth):
(WebCore::RenderImage::computeReplacedLogicalHeight):
* rendering/RenderPart.cpp:
(WebCore::RenderPart::computeEmbeddedDocumentReplacedWidth):
(WebCore::RenderPart::computeEmbeddedDocumentReplacedHeight):
(WebCore::RenderPart::computeReplacedLogicalWidth):
(WebCore::RenderPart::computeReplacedLogicalHeight):
* rendering/RenderPart.h:
* rendering/RenderReplaced.cpp:
(WebCore::RenderReplaced::computeReplacedLogicalWidth):
(WebCore::RenderReplaced::computeReplacedLogicalHeight):
* rendering/svg/RenderSVGRoot.cpp:
(WebCore::RenderSVGRoot::computeReplacedLogicalWidth):
(WebCore::RenderSVGRoot::computeReplacedLogicalHeight):
2011-06-01 Sheriff Bot <webkit.review.bot@gmail.com>
Unreviewed, rolling out r87788.
http://trac.webkit.org/changeset/87788
https://bugs.webkit.org/show_bug.cgi?id=61856
breaks windows chromium canary (Requested by jknotten on
#webkit).
* loader/archive/mhtml/MHTMLArchive.cpp:
* loader/archive/mhtml/MHTMLArchive.h:
* page/PageSerializer.cpp:
(WebCore::PageSerializer::serializeFrame):
(WebCore::PageSerializer::serializeCSSStyleSheet):
* platform/SharedBuffer.cpp:
* platform/SharedBuffer.h:
2011-06-01 Joseph Pecoraro <joepeck@webkit.org>
Reviewed by Pavel Feldman.
Web Inspector: [JSC] JSLock ASSERTs Seen Under eventListenerHandlerBody
https://bugs.webkit.org/show_bug.cgi?id=61835
Add a JSLock call before possible allocations in jsFunction and toString.
* bindings/js/ScriptEventListener.cpp:
(WebCore::eventListenerHandlerBody):
2011-06-01 Jay Civelli <jcivelli@chromium.org>
Reviewed by Adam Barth.
Adding MHTML generation support to MHTMLArchive.
https://bugs.webkit.org/show_bug.cgi?id=7169
* loader/archive/mhtml/MHTMLArchive.cpp:
(WebCore::generateRandomBoundary):
(WebCore::replaceNonPrintableCharacters):
(WebCore::MHTMLArchive::generateMHTMLData):
* loader/archive/mhtml/MHTMLArchive.h:
* page/PageSerializer.cpp:
(WebCore::PageSerializer::serializeFrame):
(WebCore::PageSerializer::serializeCSSStyleSheet):
* platform/SharedBuffer.cpp:
(WebCore::SharedBuffer::append):
* platform/SharedBuffer.h:
2011-06-01 Dimitri Glazkov <dglazkov@chromium.org>
Reviewed by Kent Tamura.
Remove ShadowElement and compact remaining used bits into RenderFileUploadControl.
https://bugs.webkit.org/show_bug.cgi?id=61816
This is a near-mechanical move-and-rename of ShadowElement, which is now only
used by input[type=file]. Next step -- switch it over to new shadow DOM.
Refactoring, no change in behavior.
* CMakeLists.txt: Removed ShadowElement.cpp and ShadowElement.h.
* GNUmakefile.list.am: Ditto.
* WebCore.gypi: Ditto.
* WebCore.pro: Ditto.
* WebCore/WebCore.vcproj/WebCore.vcproj: Ditto.
* WebCore.xcodeproj/project.pbxproj: Ditto.
* WebCore/rendering/RenderingAllInOne.cpp: Ditto.
* rendering/RenderFileUploadControl.cpp:
(WebCore::UploadButton::create): Moved from ShadowElement, renamed as UploadButton.
(WebCore::UploadButton::detach): Ditto.
(WebCore::UploadButton::UploadButton): Ditto.
(WebCore::RenderFileUploadControl::updateFromElement): Changed to use UploadButton.
* rendering/RenderMeter.cpp: Removed ShadowElement.h include, which is no longer used.
* rendering/RenderProgress.cpp: Ditto.
* rendering/ShadowElement.cpp: Removed.
* rendering/ShadowElement.h: Removed.
2011-06-01 Nikolas Zimmermann <nzimmermann@rim.com>
Reviewed by Rob Buis.
SVG fails all 3 of Hixie's CSS intrinsic sizing tests
https://bugs.webkit.org/show_bug.cgi?id=15473
Hixies CSS intrinsic sizing tests cover percentage sizes specified on the target SVG document as width/height attributes
and using width: auto / height: auto on the <object> that hosts the SVG document. Take percentage sizes of the outermost
SVGs width/height attributes into account when determining the intrinsic size of the <object>.
Added several other testcases demonstrating several scenarios. All tests work exactly the same in WebKit and Firefox now.
The *on-target-svg-absolute.xhtml tests look equal to WebKit/FF but Opera fails them, likely a relict of the different
interpretation of the intrinsic size of a SVG document in SVG Tiny 1.2.
Tests: svg/custom/object-sizing-height-50p-on-target-svg-absolute.xhtml
svg/custom/object-sizing-height-50p-on-target-svg.xhtml
svg/custom/object-sizing-width-50p-height-50p-on-target-svg-absolute.xhtml
svg/custom/object-sizing-width-50p-height-50p-on-target-svg.xhtml
svg/custom/object-sizing-width-50p-height-75p-on-target-svg-absolute.xhtml
svg/custom/object-sizing-width-50p-height-75p-on-target-svg.xhtml
svg/custom/object-sizing-width-50p-on-target-svg-absolute.xhtml
svg/custom/object-sizing-width-50p-on-target-svg.xhtml
svg/custom/object-sizing-width-75p-height-50p-on-target-svg-absolute.xhtml
svg/custom/object-sizing-width-75p-height-50p-on-target-svg.xhtml
svg/hixie/intrinsic/001.html
svg/hixie/intrinsic/002.html
svg/hixie/intrinsic/003.html
* rendering/RenderPart.cpp:
(WebCore::RenderPart::computeReplacedLogicalWidth):
(WebCore::RenderPart::computeReplacedLogicalHeight):
* rendering/svg/RenderSVGRoot.cpp:
(WebCore::RenderSVGRoot::computeIntrinsicRatio):
* rendering/svg/RenderSVGRoot.h:
2011-05-31 Tonis Tiigi <tonistiigi@gmail.com>
Reviewed by Pavel Feldman.
Web Inspector: Timeline panel improvements for managing current selection
https://bugs.webkit.org/show_bug.cgi?id=61468
Enables X-axis dragging of the selected area.
Double click zoom-out.
Fixes slightly wrong selection area position.
* inspector/front-end/TimelineOverviewPane.js:
(WebInspector.TimelineOverviewPane):
(WebInspector.TimelineOverviewPane.prototype._dragWindow):
(WebInspector.TimelineOverviewPane.prototype._endWindowSelectorDragging):
(WebInspector.TimelineOverviewPane.prototype._resizeWindowRight):
(WebInspector.TimelineOverviewPane.prototype._resizeWindowMaximum):
(WebInspector.TimelineOverviewPane.prototype.scrollWindow):
(WebInspector.TimelineOverviewPane.prototype._createTimelineCategoryStatusBarCheckbox):
* inspector/front-end/TimelinePanel.js:
(WebInspector.TimelinePanel):
2011-05-31 Keishi Hattori <keishi@webkit.org>
Reviewed by Kent Tamura.
Fix to enable page scroll of select element
https://bugs.webkit.org/show_bug.cgi?id=53628
Manual test: select-page-scroll.html
* manual-tests/select-page-scroll.html: Added.
* rendering/RenderListBox.cpp:
(WebCore::RenderListBox::computeLogicalHeight): Fix min to max.
2011-05-31 Yong Li <yoli@rim.com>
Reviewed by Eric Seidel.
https://bugs.webkit.org/show_bug.cgi?id=54807
We have been assuming plain bitfields (like "int a : 31") are always signed integers.
However some compilers can treat them as unsigned. For example, RVCT 4.0 states plain
bitfields (declared without either signed or unsigned qualifiers) are treats as unsigned.
http://infocenter.arm.com/help/index.jsp?topic=/com.arm.doc.dui0348c/Babjddhe.html
Although we can use "--signed-bitfields" flag to make RVCT 4.0 behave as most other compilers,
always using "signed"/"unsigned" qualifier to declare integral type bitfields is still a good
rule we should have in order to make our code independent from compilers and compiler flags.
No new test added because this change is not known to fix any issue.
* css/CSSPrimitiveValue.h:
* css/CSSProperty.h:
* rendering/InlineBox.h:
* rendering/RenderBlock.h:
2011-05-31 Hironori Bono <hbono@chromium.org>
Reviewed by Eric Seidel.
Send an input event when we change the text direction.
https://bugs.webkit.org/show_bug.cgi?id=50952
Both Safari and Chrome call Editor::setBaseWritingDirection() to change
the text direction of an editable element with their UIs. This change
calls dispatchInputEvent() to send an input event when the function
actually changes the "dir" attribute so we can send an input event as
written in the HTML5 spec.
Test: fast/html/set-text-direction.html
* editing/Editor.cpp:
(WebCore::Editor::setBaseWritingDirection):
2011-05-31 Jer Noble <jer.noble@apple.com>
Reviewed by Darin Adler.
Flash of black at the end of full screen transition at apple.com product videos
https://bugs.webkit.org/show_bug.cgi?id=61756
Added two new entries to the WebCore exports list.
* WebCore.exp.in:
2011-05-31 Rafael Brandao <rafael.lobo@openbossa.org>
Reviewed by Andreas Kling.
[Qt] tst_QWebFrame::render() failing
https://bugs.webkit.org/show_bug.cgi?id=60893
Due a problem on QPicture (http://bugreports.qt.nokia.com/browse/QTBUG-19496),
this test was calculating the final geometry incorrectly. As the order between
a translate and a draw operation could be relevant for it, but not for the
final rendered result, they were changed on ScrollbarThemeQt::paint.
* platform/qt/ScrollbarThemeQt.cpp:
(WebCore::ScrollbarThemeQt::paint):
2011-05-27 Adrienne Walker <enne@google.com>
Reviewed by James Robinson.
[chromium] Fix crash from empty reflections with masks
https://bugs.webkit.org/show_bug.cgi?id=61654
Change the iteration for updateCompositorResources to match that being
done in the paint and draw steps. This mismatch of iteration style
was causing layers with replica masks to correctly get skipped while
painting but not get skipped during texture upload.
Test: compositing/reflections/empty-reflection-with-mask.html
* platform/graphics/chromium/LayerRendererChromium.cpp:
(WebCore::LayerRendererChromium::updateLayers):
(WebCore::LayerRendererChromium::updateCompositorResources):
* platform/graphics/chromium/LayerRendererChromium.h:
2011-05-31 B.J. Wever <skylined@chromium.org>
Reviewed by Adam Barth.
requestFileSystem and resolveLocalFileSystemURI are not checking if
errorCallback is NULL before scheduling a callback on error.
https://bugs.webkit.org/show_bug.cgi?id=49539
Test: fast/filesystem/filesystem-no-callback-null-ptr-crash.html
* fileapi/DOMFileSystem.cpp:
(WebCore::DOMFileSystem::scheduleCallback): Only call callback if
one is supplied.
2011-05-31 Brady Eidson <beidson@apple.com>
Reviewed by Darin Adler.
Another swipe at resolving <rdar://problem/9125145> and https://bugs.webkit.org/show_bug.cgi?id=61494
Re-land http://trac.webkit.org/changeset/87566 with invalid ASSERTs removed.
No new tests. No change in behavior.
Instead of storing the DocumentLoader at construction and never changing it,
always calculate it based on the FrameLoader's current DocumentLoader:
* dom/Document.cpp:
(WebCore::Document::Document):
(WebCore::Document::suggestedMIMEType):
(WebCore::Document::lastModified):
(WebCore::Document::initSecurityContext):
(WebCore::Document::updateURLForPushOrReplaceState):
(WebCore::Document::loader):
* dom/Document.h:
Null-check or ASSERT that the DocumentLoader exists (or both) depending on the scenario:
* bindings/ScriptControllerBase.cpp:
(WebCore::ScriptController::executeIfJavaScriptURL):
* html/MediaDocument.cpp:
(WebCore::MediaDocument::replaceMediaElementTimerFired):
* html/PluginDocument.cpp:
(WebCore::PluginDocumentParser::createDocumentStructure):
* platform/mac/HTMLConverter.mm:
(fileWrapperForElement):
* WebCore.exp.in:
2011-05-31 Levi Weintraub <leviw@chromium.org>
Reviewed by Simon Fraser.
Change InlineBox::paint and its overloaded variants to use IntPoint
https://bugs.webkit.org/show_bug.cgi?id=61804
Changing InlineBox::paint, its 7 overloaded variants, and RootInlineBox::paintEllipsisBox
to use IntPoint for their paint offset instead of a pair of ints.
No new tests since this is just a refactoring.
* rendering/EllipsisBox.cpp:
(WebCore::EllipsisBox::paint):
* rendering/EllipsisBox.h:
* rendering/InlineBox.cpp:
(WebCore::InlineBox::paint):
* rendering/InlineBox.h:
* rendering/InlineFlowBox.cpp:
(WebCore::InlineFlowBox::paint):
* rendering/InlineFlowBox.h:
* rendering/InlineTextBox.cpp:
(WebCore::InlineTextBox::paint):
* rendering/InlineTextBox.h:
* rendering/RenderBlock.cpp:
(WebCore::RenderBlock::paintEllipsisBoxes):
* rendering/RenderBoxModelObject.cpp:
(WebCore::RenderBoxModelObject::paintFillLayerExtended):
* rendering/RenderLineBoxList.cpp:
(WebCore::RenderLineBoxList::paint):
* rendering/RootInlineBox.cpp:
(WebCore::RootInlineBox::paintEllipsisBox):
(WebCore::RootInlineBox::paint):
* rendering/RootInlineBox.h:
* rendering/svg/SVGInlineFlowBox.cpp:
(WebCore::SVGInlineFlowBox::paint):
* rendering/svg/SVGInlineFlowBox.h:
* rendering/svg/SVGInlineTextBox.cpp:
(WebCore::SVGInlineTextBox::paint):
* rendering/svg/SVGInlineTextBox.h:
* rendering/svg/SVGRootInlineBox.cpp:
(WebCore::SVGRootInlineBox::paint):
* rendering/svg/SVGRootInlineBox.h:
2011-05-31 James Robinson <jamesr@chromium.org>
Reviewed by Kenneth Russell.
[chromium] Clear out LayerChromium's m_ccLayerImpl ptr on CCLayerImpl destruction
https://bugs.webkit.org/show_bug.cgi?id=61593
Whenever a CCLayerImpl is being destroyed, clear out its owner's m_ccLayerImpl pointer.
This is extremely defensive and not strictly necessary, but not harmful either.
* platform/graphics/chromium/LayerChromium.h:
* platform/graphics/chromium/cc/CCLayerImpl.cpp:
(WebCore::CCLayerImpl::~CCLayerImpl):
2011-05-31 Stephen White <senorblanco@chromium.org>
Unreviewed; build fix.
Silence some warnings on the Safari/Mac release build.
* platform/graphics/gpu/TilingData.h:
(WebCore::TilingData::assertTile):
2011-05-31 Justin Novosad <junov@chromium.org>
Reviewed by Stephen White.
[Chromium] Build fails when ACCELERATED_2D_CANVAS is disabled
https://bugs.webkit.org/show_bug.cgi?id=61790
Changing the build guards in these two files that are required
by the accelerated compositing feature.
* platform/graphics/gpu/LoopBlinnMathUtils.cpp:
* platform/graphics/gpu/TilingData.cpp:
2011-05-31 Justin Novosad <junov@chromium.org>
Reviewed by Stephen White.
[Chromium] Build fails when ACCELERATED_2D_CANVAS is disabled
https://bugs.webkit.org/show_bug.cgi?id=61790
Changing the build guards in these two files that are required
by the accelerated compositing feature.
* platform/graphics/gpu/LoopBlinnMathUtils.cpp:
* platform/graphics/gpu/TilingData.cpp:
2011-05-31 Rob Buis <rbuis@rim.com>
Reviewed by Dirk Schulze.
https://bugs.webkit.org/show_bug.cgi?id=34301
Creating <animateMotion> elements via javascript do not execute
https://bugs.webkit.org/show_bug.cgi?id=17043
SVG missing some .idl files
Add missing idl files.
Test: svg/animations/animate-mpath-insert.html
* CMakeLists.txt:
* CodeGenerators.pri:
* WebCore.gypi:
* WebCore.xcodeproj/project.pbxproj:
* svg/SVGAnimateMotionElement.idl: Added.
* svg/SVGMPathElement.idl: Added.
2011-05-31 Robin Dunn <robin@alldunn.com>
Reviewed by Kevin Ollivier.
[wx] Implement printing support for wxWidgets 2.9.x and above.
https://bugs.webkit.org/show_bug.cgi?id=61796
* platform/graphics/GraphicsContext.h:
* platform/graphics/wx/FontWx.cpp:
(WebCore::Font::drawGlyphs):
* platform/graphics/wx/GraphicsContextWx.cpp:
(WebCore::GraphicsContextPlatformPrivate::GraphicsContextPlatformPrivate):
(WebCore::GraphicsContext::drawRect):
(WebCore::GraphicsContext::drawLine):
(WebCore::GraphicsContext::drawEllipse):
(WebCore::GraphicsContext::strokeArc):
(WebCore::GraphicsContext::drawConvexPolygon):
(WebCore::GraphicsContext::fillRect):
(WebCore::GraphicsContext::drawLineForText):
(WebCore::GraphicsContext::scale):
(WebCore::GraphicsContext::currentScale):
* platform/wx/wxcode/win/non-kerned-drawing.cpp:
(WebCore::drawTextWithSpacing):
2011-05-31 Joseph Pecoraro <joepeck@webkit.org>
Reviewed by Pavel Feldman.
Web Inspector: Missing InspectorFrontendHost.saveSessionSetting function
https://bugs.webkit.org/show_bug.cgi?id=61751
Add missing stub function causing an error on load.
* inspector/front-end/InspectorFrontendHostStub.js:
(.WebInspector.InspectorFrontendHostStub.prototype.saveSessionSetting):
2011-05-31 Abhishek Arya <inferno@chromium.org>
Reviewed by Dimitri Glazkov.
Improve hasMediaControls logic to check that node has
media controls. This can be false when cloning nodes.
https://bugs.webkit.org/show_bug.cgi?id=61765
Test: media/media-controls-clone-crash.html
* dom/Node.h:
(WebCore::Node::isMediaControls):
* html/HTMLMediaElement.cpp:
(WebCore::HTMLMediaElement::mediaControls):
(WebCore::HTMLMediaElement::hasMediaControls):
* html/shadow/MediaControls.h:
(WebCore::MediaControls::isMediaControls):
(WebCore::toMediaControls):
2011-05-31 Xan Lopez <xlopez@igalia.com>
Reviewed by Martin Robinson.
[GTK] Provide custom DOM bindings methods to check if input/textareas have been edited
https://bugs.webkit.org/show_bug.cgi?id=61791
* bindings/gobject/GNUmakefile.am: add new files.
* bindings/gobject/WebKitDOMCustom.cpp: Added.
(webkit_dom_html_text_area_element_is_edited):
(webkit_dom_html_input_element_is_edited):
* bindings/gobject/WebKitDOMCustom.h: Added.
2011-05-31 Noam Rosenthal <noam.rosenthal@nokia.com>
Unreviewed build fix for Symbian.
Opt-out Symbian for TextureMapper.
No new tests: build fix.
* WebCore.pri:
2011-05-31 Levi Weintraub <leviw@chromium.org>
Reviewed by Eric Seidel.
Switch paintFocusRing to IntPoint
https://bugs.webkit.org/show_bug.cgi?id=61580
Switching paintFocusRing to take an IntPoint representing the paint offset
instead of a pair of ints.
No new tests as this is just refactoring.
* rendering/RenderInline.cpp:
(WebCore::RenderInline::paintOutline):
* rendering/RenderObject.cpp:
(WebCore::RenderObject::paintFocusRing):
(WebCore::RenderObject::paintOutline):
* rendering/RenderObject.h:
2011-05-31 Abhishek Arya <inferno@chromium.org>
Reviewed by Dimitri Glazkov.
Convert raw ptr to RefPtr for documentElement.
https://bugs.webkit.org/show_bug.cgi?id=61688
Test: fast/dom/xml-parser-error-message-crash.svg
* dom/XMLDocumentParser.cpp:
(WebCore::XMLDocumentParser::insertErrorMessageBlock):
2011-05-31 Andreas Kling <kling@webkit.org>
Reviewed by Antti Koivisto.
Canvas/JSC: Auto-generate overloads for setShadow()
https://bugs.webkit.org/show_bug.cgi?id=61786
Move CanvasRenderingContext2D.setShadow() to auto-generated JSC bindings.
There is a subtle difference to the previous behavior: invalid numbers of
arguments now raise TypeError instead of SyntaxError. This is in accordance
with Web IDL, and matches the existing V8 bindings.
Test: fast/canvas/canvas-overloads-setShadow.html
* bindings/js/JSCanvasRenderingContext2DCustom.cpp:
* html/canvas/CanvasRenderingContext2D.idl:
2011-05-31 Andreas Kling <kling@webkit.org>
Reviewed by Antti Koivisto.
Canvas/JSC: Auto-generate overloads for drawImageFromRect()
https://bugs.webkit.org/show_bug.cgi?id=61709
Move CanvasRenderingContext2D.drawImageFromRect() to auto-generated JSC bindings.
Make it [RequiresAllArguments=Raise] to match the old behavior.
Side effect: calling drawImageFromRect() with zero arguments will now raise
SyntaxError instead of TypeError.
Test: fast/canvas/canvas-overloads-drawImageFromRect.html
* bindings/js/JSCanvasRenderingContext2DCustom.cpp:
* html/canvas/CanvasRenderingContext2D.h:
* html/canvas/CanvasRenderingContext2D.idl:
2011-05-31 Andreas Kling <kling@webkit.org>
Reviewed by Antti Koivisto.
Canvas/JSC: Auto-generate overloads for drawImage()
https://bugs.webkit.org/show_bug.cgi?id=61703
Move CanvasRenderingContext2D.drawImage() to auto-generated JSC bindings.
There is a subtle difference to the previous behavior: invalid numbers of
arguments now raise TypeError instead of SyntaxError. This is in accordance
with Web IDL, and matches the existing V8 bindings.
Test: fast/canvas/canvas-overloads-drawImage.html
* bindings/js/JSCanvasRenderingContext2DCustom.cpp:
* html/canvas/CanvasRenderingContext2D.idl:
2011-05-31 Andreas Kling <kling@webkit.org>
Reviewed by Antti Koivisto.
Canvas/JSC: Auto-generate overloads for strokeRect()
https://bugs.webkit.org/show_bug.cgi?id=61641
Move CanvasRenderingContext2D.setStrokeColor() to auto-generated JSC bindings.
No behavioral change.
Test: fast/canvas/canvas-overloads-strokeRect.html
* bindings/js/JSCanvasRenderingContext2DCustom.cpp:
* html/canvas/CanvasRenderingContext2D.idl:
2011-05-31 Andreas Kling <kling@webkit.org>
Reviewed by Antti Koivisto.
Canvas/JSC: Auto-generate overloads for setFillColor()
https://bugs.webkit.org/show_bug.cgi?id=61635
Move CanvasRenderingContext2D.setStrokeColor() to auto-generated JSC bindings.
There is a subtle difference to the previous behavior: invalid numbers of
arguments now raise TypeError instead of SyntaxError. This is in accordance
with Web IDL, but doesn't matter much anyway since this method is WebKit-only.
Test: fast/canvas/canvas-overloads-setFillColor.html
* bindings/js/JSCanvasRenderingContext2DCustom.cpp:
* html/canvas/CanvasRenderingContext2D.idl:
2011-05-31 Andreas Kling <kling@webkit.org>
Reviewed by Antti Koivisto.
Canvas/JSC: Auto-generate overloads for setStrokeColor()
https://bugs.webkit.org/show_bug.cgi?id=61629
Move CanvasRenderingContext2D.setStrokeColor() to auto-generated JSC bindings.
There is a subtle difference to the previous behavior: invalid numbers of
arguments now raise TypeError instead of SyntaxError. This is in accordance
with Web IDL, but doesn't matter much anyway since this method is WebKit-only.
Test: fast/canvas/canvas-overloads-setStrokeColor.html
* bindings/js/JSCanvasRenderingContext2DCustom.cpp:
* html/canvas/CanvasRenderingContext2D.idl:
2011-05-31 Andreas Kling <kling@webkit.org>
Reviewed by Antti Koivisto.
Canvas/JSC: Auto-generate overloads for strokeText()
https://bugs.webkit.org/show_bug.cgi?id=61626
Move CanvasRenderingContext2D.strokeText() to auto-generated JSC bindings.
Make it [RequiresAllArguments=Raise] to match the old behavior.
This has the side-effect of aligning the behaviors of JSC and V8.
Test: fast/canvas/canvas-overloads-strokeText.html
* bindings/js/JSCanvasRenderingContext2DCustom.cpp:
* html/canvas/CanvasRenderingContext2D.idl:
2011-05-31 Andreas Kling <kling@webkit.org>
Reviewed by Antti Koivisto.
Canvas/JSC: Auto-generate overloads for fillText()
https://bugs.webkit.org/show_bug.cgi?id=61623
Move CanvasRenderingContext2D.fillText() to auto-generated JSC bindings.
Make it [RequiresAllArguments=Raise] to match the old behavior.
This has the side-effect of aligning the behaviors of JSC and V8.
Test: fast/canvas/canvas-overloads-fillText.html
* bindings/js/JSCanvasRenderingContext2DCustom.cpp:
* html/canvas/CanvasRenderingContext2D.idl:
2011-05-31 Yael Aharon <yael.aharon@nokia.com>
Reviewed by Kenneth Rohde Christiansen.
Frame flattening is broken with nested frames
https://bugs.webkit.org/show_bug.cgi?id=61491
After r77988, when frame flattening is enabled, performPostLayoutTasks() is called on a timer for iframes.
This causes layout of nested iframes to sometimes happen asynchronously, but WebCore expects layout to always finish synchronously.
Added a call to updateWidgetPosition() for cases that performPostLayoutTasks() is now happening asynchronously.
Test: fast/frames/flattening/iframe-flattening-nested.html
* page/FrameView.cpp:
(WebCore::FrameView::layout):
2011-05-31 Tommy Widenflycht <tommyw@google.com>
Reviewed by Tony Gentilcore.
Fix getUserMedia callback bindings for JSC.
https://bugs.webkit.org/show_bug.cgi?id=60174
This patch initializes the exception code variable to 0.
Test: fast/dom/MediaStream/argument-types.html
* bindings/js/JSNavigatorCustom.cpp:
(WebCore::JSNavigator::webkitGetUserMedia):
2011-05-31 Oleg Romashin <oleg.romashin@nokia.com>
Reviewed by Benjamin Poulain.
Fix compilation with debug enabled, m_lightSource.type is not valid anymore
https://bugs.webkit.org/show_bug.cgi?id=61719
* platform/graphics/filters/arm/FELightingNEON.h:
(WebCore::FELighting::platformApplyNeon):
2011-05-31 Oliver Varga <Varga.Oliver@stud.u-szeged.hu>
Reviewed by Nikolas Zimmermann.
Invalid color handling is broken for SVG
https://bugs.webkit.org/show_bug.cgi?id=58531
Fix invalid color fallback handling. If the fill/stroke attributes computed
value leads to a an invalid color, inherit the desired color from the parent
style instead. Matches Opera/FF and SVG 1.1 Second Edition (http://www.w3.org/TR/SVG/).
Tests: svg/custom/invalid-stroke-hex.svg
svg/custom/invalid-uri-stroke.svg
* rendering/svg/RenderSVGResource.cpp:
(WebCore::inheritColorFromParentStyleIfNeeded):
(WebCore::requestPaintingResource):
2011-05-31 Vangelis Kokkevis <vangelis@chromium.org>
Reviewed by Kent Tamura.
[chromium] Avoid double deletion of DrawingBuffer's color buffer
texture.
https://bugs.webkit.org/show_bug.cgi?id=61761
Test: Verified that the DCHECK in GraphicsContext3D implementation
doesn't trigger.
* platform/graphics/chromium/DrawingBufferChromium.cpp:
(WebCore::DrawingBuffer::~DrawingBuffer):
2011-05-30 Hayato Ito <hayato@chromium.org>
Reviewed by Ryosuke Niwa.
Add a utility function for dumping a tree for the Node, including a document of a frame.
https://bugs.webkit.org/show_bug.cgi?id=61727
No new tests since added functions are only available in debug builds.
* dom/Node.cpp:
(WebCore::parentOrHostOrFrameOwner):
(WebCore::traverseNextNodeAcrossFrame):
(WebCore::Node::showTreeForThisAcrossFrame):
* dom/Node.h:
2011-05-30 James Kozianski <koz@chromium.org>
Reviewed by Kent Tamura.
[Chromium] Make isValidProtocol() accept protocols with '+'.
https://bugs.webkit.org/show_bug.cgi?id=61759
Also, detect syntax errors before security errors; some syntax errors
will also trigger a security error, but it's more helpful to the
programmer to know if they have a syntax error, which are well-defined
in the spec, rather than a security error, which aren't.
* page/Navigator.cpp:
(WebCore::Navigator::registerProtocolHandler):
Detect syntax errors before security errors.
* platform/KURLGoogle.cpp:
(WebCore::isSchemeChar):
Include '+' in the list of valid characters.
2011-05-30 Andrey Petrov <andrey.petrov@gmail.com>
Reviewed by Hajime Morita.
Using jQuery to show/hide IMG elements crashes WebKit
https://bugs.webkit.org/show_bug.cgi?id=31721
For platform code, do not assert nodes always have renderer at
the time context menu action is invoked.
Renderer can actually be empty for a given node if it was hidden
or removed from domtree by some non-user generated event (e.g timeout)
after the popup menu had been created.
Changing Chromium, Gtk, Mac, Qt, Win and WinCE.
Test: editing/pasteboard/copy-standalone-image-crash.html
* platform/chromium/PasteboardChromium.cpp:
(WebCore::Pasteboard::writeImage):
* platform/gtk/PasteboardGtk.cpp:
(WebCore::Pasteboard::writeImage):
* platform/mac/PasteboardMac.mm:
(WebCore::Pasteboard::writeImage):
* platform/qt/PasteboardQt.cpp:
(WebCore::Pasteboard::writeImage):
* platform/win/PasteboardWin.cpp:
(WebCore::Pasteboard::writeImage):
* platform/wince/PasteboardWinCE.cpp:
(WebCore::Pasteboard::writeImage):
2011-05-30 Daniel Bates <dbates@webkit.org>
Reviewed by Adam Barth.
Rename XSSFilter to XSSAuditor
https://bugs.webkit.org/show_bug.cgi?id=61718
Currently we use the names XSSFilter and XSSAuditor throughout the project.
Instead, we should choose one name for consistency.
No functionality was changed. So, no new tests.
* CMakeLists.txt:
* GNUmakefile.list.am:
* WebCore.gypi:
* WebCore.pro:
* WebCore.vcproj/WebCore.vcproj:
* WebCore.xcodeproj/project.pbxproj:
* html/parser/HTMLDocumentParser.cpp:
(WebCore::HTMLDocumentParser::HTMLDocumentParser):
(WebCore::HTMLDocumentParser::pumpTokenizer):
* html/parser/HTMLDocumentParser.h:
* html/parser/XSSAuditor.cpp: Copied from Source/WebCore/html/parser/XSSFilter.cpp.
(WebCore::XSSAuditor::XSSAuditor):
(WebCore::XSSAuditor::init):
(WebCore::XSSAuditor::filterToken):
(WebCore::XSSAuditor::filterTokenInitial):
(WebCore::XSSAuditor::filterTokenAfterScriptStartTag):
(WebCore::XSSAuditor::filterScriptToken):
(WebCore::XSSAuditor::filterObjectToken):
(WebCore::XSSAuditor::filterParamToken):
(WebCore::XSSAuditor::filterEmbedToken):
(WebCore::XSSAuditor::filterAppletToken):
(WebCore::XSSAuditor::filterIframeToken):
(WebCore::XSSAuditor::filterMetaToken):
(WebCore::XSSAuditor::filterBaseToken):
(WebCore::XSSAuditor::filterFormToken):
(WebCore::XSSAuditor::eraseDangerousAttributesIfInjected):
(WebCore::XSSAuditor::eraseAttributeIfInjected):
(WebCore::XSSAuditor::snippetForRange):
(WebCore::XSSAuditor::snippetForAttribute):
(WebCore::XSSAuditor::isContainedInRequest):
(WebCore::XSSAuditor::isSameOriginResource):
* html/parser/XSSAuditor.h: Copied from Source/WebCore/html/parser/XSSFilter.h.
* html/parser/XSSFilter.cpp: Removed.
* html/parser/XSSFilter.h: Removed.
2011-05-30 No'am Rosenthal <noam.rosenthal@nokia.com>
Reviewed by Simon Hausmann.
WebKit2: Enable serializing of data types needed for cross-process accelerated compositing
https://bugs.webkit.org/show_bug.cgi?id=61694
Expose a public clearAll() function to reset WebCore::Animation.
No new functionality, so no new tests.
* platform/animation/Animation.h:
(WebCore::Animation::clearAll):
2011-05-30 Eric Carlson <eric.carlson@apple.com>
Reviewed by Alexey Proskuryakov.
Audio and video files saved to the Application Cache should preserve the original file extension
https://bugs.webkit.org/show_bug.cgi?id=61750
<rdar://9524922>
No new tests, it isn't possible to check the name of the file in the cache from within
DRT. Changes verified manually.
* loader/appcache/ApplicationCacheStorage.cpp:
(WebCore::ApplicationCacheStorage::store): Append the original file extension to the cache
file name.
(WebCore::ApplicationCacheStorage::writeDataToUniqueFileInDirectory): Add extension parameter.
* loader/appcache/ApplicationCacheStorage.h:
2011-05-30 Jer Noble <jer.noble@apple.com>
Reviewed by Dan Bernstein.
Play/Pause button in wrong state when entering full screen on Vimeo
https://bugs.webkit.org/show_bug.cgi?id=61754
Update the play/pause button inside reset(). This ensures the button is in
the correct state when the controls are created after playback has already
started.
* html/shadow/MediaControlRootElement.cpp:
(WebCore::MediaControlRootElement::reset):
2011-05-30 No'am Rosenthal <noam.rosenthal@nokia.com>
Reviewed by Simon Hausmann.
WebKit2: Enable serializing of data types needed for cross-process accelerated compositing
https://bugs.webkit.org/show_bug.cgi?id=61694
Added a public TimingFunction::type() method.
No new functionality, so no new tests.
* platform/animation/TimingFunction.h:
(WebCore::TimingFunction::type):
2011-05-30 Noam Rosenthal <noam.rosenthal@nokia.com>
BUILD FIX for r87697 on Windows/Symbian
For now enabling TextureMapper for Mac/Linux only.
* WebCore.pri:
2011-05-30 David Kilzer <ddkilzer@apple.com>
BUILD FIX for r87692 with !ENABLE(FULLSCREEN_API)
* dom/EventDispatcher.cpp:
(WebCore::EventDispatcher::determineDispatchBehavior): Mark
shadowRoot as an unused parameter with !ENABLE(FULLSCREEN_API).
2011-05-30 No'am Rosenthal <noam.rosenthal@nokia.com>
Reviewed by Andreas Kling.
[Texmap][Qt] Enable TextureMapper by default
https://bugs.webkit.org/show_bug.cgi?id=61740
Make CONFIG+=texmap an opt-out instead of an opt-in.
No new functionality so no new tests.
* WebCore.pri:
2011-05-30 Martin Robinson <mrobinson@igalia.com>
Reviewed by Xan Lopez.
[GTK] fast/css/font-face-zero-hash-key.html is crashing on the bots
https://bugs.webkit.org/show_bug.cgi?id=61693
Do not try to read the FT_Face from m_scaledFont if it m_scaledFont is
null. A recent change fixing 0-pixel-size fonts means that m_scaledFont
may now be null.
No new tests. This change should cause fast/css/font-face-zero-hash-key.html
to stop crashing.
* platform/graphics/freetype/FontPlatformDataFreeType.cpp:
(WebCore::FontPlatformData::FontPlatformData): Do a null check before accessing
m_scaledFont.
2011-05-30 Noam Rosenthal <noam.rosenthal@nokia.com>
Reviewed by Kenneth Rohde Christiansen.
[Texmap][Qt] Disable accelerated plugins/media until they're working.
https://bugs.webkit.org/show_bug.cgi?id=61687
Until this works properly, we should indicate that our media implementation
in texture mapper doesn't support accelerated compositing.
This makes LayoutTests/compositing/video/* work again.
* platform/graphics/qt/MediaPlayerPrivateQt.h:
(WebCore::MediaPlayerPrivateQt::supportsAcceleratedRendering):
(WebCore::MediaPlayerPrivateQt::platformLayer):
2011-05-30 Mikhail Naganov <mnaganov@chromium.org>
Reviewed by Adam Barth.
[Chromium] Fix regression after r87628.
https://bugs.webkit.org/show_bug.cgi?id=61733
Having r87628 in place, Chrome reliability bot crashes in
WebCore::HTMLLinkElement::onloadTimerFired.
This is because the change makes WebCore::CachedResource::setRequest to
call checkNotify on request reset. HTMLLinkElement registers itself as
CachedResource client via m_cachedSheet, which can happen even if
m_cachedLinkResource wasn't set. As a result,
WebCore::HTMLLinkElement::notifyFinished is got called with unset
m_cachedLinkResource, which causes a crash in
HTMLLinkElement::onloadTimerFired
* html/HTMLLinkElement.cpp:
(WebCore::HTMLLinkElement::notifyFinished):
2011-05-30 Jer Noble <jer.noble@apple.com>
Reviewed by Darin Adler and Simon Fraser.
REGRESSION (r87622): Scrubbing a Vimeo movie when in fullscreen stops playback; no way to make it start again
https://bugs.webkit.org/show_bug.cgi?id=61717
rdar://problem/9522272
May be some good way to test this later. No immediate idea about the best way.
When a media element is taken into full-screen mode, stop events from propagating
outside the media element's shadow DOM, EventDispatcher::determineDispatchBehavior()
has been changed to take a shadow root node. In our full screen media element check,
we check to see if the passed shadow root is the shadow root of the full screen media
element, and if so, specify events should StayInsideShadowDOM. The end result is that
inside EventDispatcher::ensureEventAncestors, an ancestor chain is built up all the
way from the SliderThumb to the video element's shadow root, but no further.
* dom/EventDispatcher.cpp:
(WebCore::EventDispatcher::determineDispatchBehavior): Restrict events to the
shadow DOM when showing a full screen video.
* html/HTMLMediaElement.cpp:
(WebCore::HTMLMediaElement::HTMLMediaElement): Removed code to manage full screen controls.
The events telling us about activity in the shadow DOM no longer bubble out so we need to
handle this inside the shadow DOM on the root element.
(WebCore::HTMLMediaElement::play): Ditto.
(WebCore::HTMLMediaElement::playbackProgressTimerFired): Ditto.
(WebCore::HTMLMediaElement::defaultEventHandler): Ditto.
(WebCore::HTMLMediaElement::enterFullscreen): Ditto.
(WebCore::HTMLMediaElement::exitFullscreen): Ditto.
* html/HTMLMediaElement.h: Added isPlaying function, removed things moved to the root element.
* html/shadow/MediaControlElements.cpp:
(WebCore::MediaControlVolumeSliderContainerElement::defaultEventHandler): Rolled out
changes that tried to make special rules for events using preDispatchEventHandler and such.
This rolls out both r87622 and r87655.
(WebCore::MediaControlMuteButtonElement::defaultEventHandler): Ditto.
(WebCore::MediaControlPanelMuteButtonElement::defaultEventHandler): Ditto.
(WebCore::MediaControlPlayButtonElement::defaultEventHandler): Ditto.
(WebCore::MediaControlSeekButtonElement::defaultEventHandler): Ditto.
(WebCore::MediaControlRewindButtonElement::defaultEventHandler): Ditto.
(WebCore::MediaControlReturnToRealtimeButtonElement::defaultEventHandler): Ditto.
(WebCore::MediaControlToggleClosedCaptionsButtonElement::defaultEventHandler): Ditto.
(WebCore::MediaControlTimelineElement::defaultEventHandler): Ditto.
(WebCore::MediaControlVolumeSliderElement::defaultEventHandler): Ditto.
(WebCore::MediaControlFullscreenButtonElement::defaultEventHandler): Ditto.
(WebCore::MediaControlFullscreenVolumeMinButtonElement::defaultEventHandler): Ditto.
(WebCore::MediaControlFullscreenVolumeMaxButtonElement::defaultEventHandler): Ditto.
* html/shadow/MediaControlElements.h: Ditto.
* html/shadow/MediaControlRootElement.cpp:
(WebCore::MediaControlRootElement::MediaControlRootElement): Initialize new data members.
(WebCore::MediaControlRootElement::playbackStarted): Start the timer so we will consider
hiding the controls later.
(WebCore::MediaControlRootElement::playbackProgressed): Hide the controls if the mouse
is no longer over the controls.
(WebCore::MediaControlRootElement::playbackStopped): Stop the timer since we only hide
automatically if we're playing.
(WebCore::MediaControlRootElement::enteredFullscreen): Start the timer.
(WebCore::MediaControlRootElement::exitedFullscreen): Stop the timer since we only care
if we are full screen.
(WebCore::MediaControlRootElement::containsRelatedTarget): Added. Helper for next function.
(WebCore::MediaControlRootElement::defaultEventHandler): Do the hide/show and timer functions
as the mouse is moved in and out.
(WebCore::MediaControlRootElement::startHideFullscreenControlsTimer): Start the timer if
needed.
(WebCore::MediaControlRootElement::hideFullscreenControlsTimerFired): Hide if the conditions
are met.
(WebCore::MediaControlRootElement::stopHideFullscreenControlsTimer): Stop the timer.
* html/shadow/MediaControlRootElement.h: Added new functions and data members.
2011-05-30 Gavin Peters <gavinp@chromium.org>
Reviewed by Adam Barth.
prevent HTMLLinkElement from watching multiple CachedResources
https://bugs.webkit.org/show_bug.cgi?id=61686
If we modify an existing link element, stop listening to the previous
cached resource, to prevent double notifications (which crash).
Test: fast/dom/HTMLLinkElement/prefetch-too-many-clients.html
* html/HTMLLinkElement.cpp:
(WebCore::HTMLLinkElement::process):
2011-05-30 Peter Varga <pvarga@webkit.org>
Unreviewed build fix.
[Qt][V8] Fix debug build.
No new tests needed.
* css/CSSStyleDeclaration.cpp: Add missing header.
* dom/Text.cpp: Ditto.
* rendering/InlineTextBox.cpp: Ditto.
2011-05-30 Sheriff Bot <webkit.review.bot@gmail.com>
Unreviewed, rolling out r87683.
http://trac.webkit.org/changeset/87683
https://bugs.webkit.org/show_bug.cgi?id=61729
Breaks inspector tests on Chromium (Requested by apavlov on
#webkit).
* inspector/front-end/StylesSidebarPane.js:
(WebInspector.StylesSidebarPane.prototype.update):
2011-05-25 Alexander Pavlov <apavlov@chromium.org>
Reviewed by Yury Semikhatsky.
Web Inspector: node selection is slow in the Elements panel.
https://bugs.webkit.org/show_bug.cgi?id=60813
Schedule full style updates rather than request all node styles from the backend up front.
* inspector/front-end/StylesSidebarPane.js:
(WebInspector.StylesSidebarPane.prototype.update.reloadAllStyles):
(WebInspector.StylesSidebarPane.prototype.update):
2011-05-30 Andrey Kosyakov <caseq@chromium.org>
Reviewed by Pavel Feldman.
Web Inspector: do not issue frontendReused for reload or navigation.
https://bugs.webkit.org/show_bug.cgi?id=61192
- only issue frontendReused when inspector is attached after main resource committed load
- upon committing loading main resource, reset agents before sending FrameNavigated to page agent
- Ensure main resource is set early so that abbreviations of URLs in resource tree are consistent after reload
- do not enable agents explicitly in frontendReused (this is done by backend when resotring state from cookie)
* inspector/InspectorAgent.cpp:
(WebCore::InspectorAgent::InspectorAgent):
(WebCore::InspectorAgent::restore):
(WebCore::InspectorAgent::clearFrontend):
(WebCore::InspectorAgent::didCommitLoad):
* inspector/InspectorAgent.h:
* inspector/InspectorInstrumentation.cpp:
(WebCore::InspectorInstrumentation::didCommitLoadImpl):
* inspector/front-end/NetworkManager.js:
* inspector/front-end/ResourceTreeModel.js:
(WebInspector.ResourceTreeModel.prototype._processCachedResources):
(WebInspector.ResourceTreeModel.prototype._frameNavigated):
(WebInspector.ResourceTreeModel.prototype._cleanupFramesAfterNavigation):
(WebInspector.ResourceTreeModel.prototype._addFramesRecursively):
* inspector/front-end/ResourcesPanel.js:
(WebInspector.ResourcesPanel.prototype.reset):
(WebInspector.ResourcesPanel.prototype._resetResourcesTree):
(WebInspector.DatabaseTreeElement.prototype.onpopulate):
(WebInspector.SearchResultsTreeElementsTraverser.prototype._lastTreeElement):
* inspector/front-end/inspector.js:
(WebInspector.reset):
(WebInspector.frontendReused):
2011-05-30 Ryan Sleevi <rsleevi@chromium.org>
Reviewed by Darin Adler.
FEConvolveMatrix::getPixelValue() fails to properly check if y is within bounds, causing it to fail to correctly apply the kernel and edge mode to the first targetY pixels
https://bugs.webkit.org/show_bug.cgi?id=61603
Test: svg/filters/feConvolveFilter-y-bounds.svg
* platform/graphics/filters/FEConvolveMatrix.cpp:
(WebCore::FEConvolveMatrix::getPixelValue):
2011-05-30 Nate Chapin <japhet@chromium.org>
Reviewed by Antti Koivisto.
Refactor the CachedResourceLoader -> CachedResource -> CachedResourceRequest
flow so it's a little less circular.
https://bugs.webkit.org/show_bug.cgi?id=61666
* loader/cache/CachedFont.cpp:
(WebCore::CachedFont::beginLoadIfNeeded):
* loader/cache/CachedResource.cpp:
(WebCore::CachedResource::load):
* loader/cache/CachedResourceLoader.cpp:
(WebCore::CachedResourceLoader::requestImage):
(WebCore::CachedResourceLoader::setAutoLoadImages):
(WebCore::CachedResourceLoader::loadStarted):
* loader/cache/CachedResourceLoader.h:
* loader/cache/CachedResourceRequest.cpp:
(WebCore::CachedResourceRequest::load):
2011-05-30 Sheriff Bot <webkit.review.bot@gmail.com>
Unreviewed, rolling out r87618.
http://trac.webkit.org/changeset/87618
https://bugs.webkit.org/show_bug.cgi?id=61720
Causes BrowserFocusTest.FocusOnReload to fail (Requested by
abarth|gardener on #webkit).
* html/HTMLLinkElement.cpp:
(WebCore::HTMLLinkElement::process):
2011-05-29 Yuta Kitamura <yutak@chromium.org>
Reviewed by Kent Tamura.
WebSocket closing handshake
https://bugs.webkit.org/show_bug.cgi?id=35721
Implement WebSocket closing handshake based on Ian Hickson's
WebSocket protocol draft 76.
Tests: http/tests/websocket/tests/client-close.html
http/tests/websocket/tests/server-close.html
* platform/network/SocketStreamHandleBase.cpp:
(WebCore::SocketStreamHandleBase::send):
Do not send a message if we are in Closing state.
(WebCore::SocketStreamHandleBase::close):
Do not disconnect if we have pending data which have not been sent yet.
In this case, the actual disconnection will happen in sendPendingData().
(WebCore::SocketStreamHandleBase::disconnect):
Renamed from close(). Disconnect the connection immediately.
(WebCore::SocketStreamHandleBase::sendPendingData):
* platform/network/SocketStreamHandleBase.h:
* websockets/ThreadableWebSocketChannelClientWrapper.cpp:
Add didStartClosingHandshake(). Add a function argument (ClosingHandshakeCompletionStatus)
to didClose().
(WebCore::ThreadableWebSocketChannelClientWrapper::didStartClosingHandshake):
(WebCore::ThreadableWebSocketChannelClientWrapper::didClose):
(WebCore::ThreadableWebSocketChannelClientWrapper::didStartClosingHandshakeCallback):
(WebCore::ThreadableWebSocketChannelClientWrapper::didCloseCallback):
* websockets/ThreadableWebSocketChannelClientWrapper.h:
* websockets/WebSocket.cpp:
(WebCore::WebSocket::send):
(WebCore::WebSocket::close):
Fail if close() is attempted before the connection is established.
Otherwise, set the state to CLOSING and start the closing handshake.
(WebCore::WebSocket::bufferedAmount):
If the state is CLOSING, we need to consider buffered data in m_channel and sent after close().
(WebCore::WebSocket::didConnect):
(WebCore::WebSocket::didReceiveMessage):
We need to invoke message event in CLOSING state as well as OPEN state.
(WebCore::WebSocket::didReceiveMessageError):
(WebCore::WebSocket::didStartClosingHandshake):
(WebCore::WebSocket::didClose):
* websockets/WebSocket.h:
* websockets/WebSocketChannel.cpp:
(WebCore::WebSocketChannel::WebSocketChannel):
(WebCore::WebSocketChannel::close):
Start the closing handshake.
(WebCore::WebSocketChannel::disconnect):
Disconnect the socket stream, instead of close.
(WebCore::WebSocketChannel::didClose):
(WebCore::WebSocketChannel::didReceiveData): Ditto.
(WebCore::WebSocketChannel::didFail): Ditto.
(WebCore::WebSocketChannel::processBuffer):
Ditto.
Handle 0xFF 0x00 byte sequence, and discard received data once the closing handshake has started.
(WebCore::WebSocketChannel::startClosingHandshake):
Send 0xFF 0x00 byte sequence.
(WebCore::WebSocketChannel::closingTimerFired):
Disconnect the socket stream if the closing handshake has timed out.
* websockets/WebSocketChannel.h:
m_closing is true if "the WebSocket closing handshake has started" (as stated in the protocol
specification).
* websockets/WebSocketChannelClient.h:
(WebCore::WebSocketChannelClient::didStartClosingHandshake): Added.
(WebCore::WebSocketChannelClient::didClose): Add closingHandshakeCompletion parameter.
* websockets/WorkerThreadableWebSocketChannel.cpp:
Add closingHandshakeCompletion parameter to didClose(), and add didStartClosingHandshake().
(WebCore::WorkerThreadableWebSocketChannel::Peer::close):
(WebCore::workerContextDidStartClosingHandshake):
(WebCore::WorkerThreadableWebSocketChannel::Peer::didStartClosingHandshake):
(WebCore::workerContextDidClose):
(WebCore::WorkerThreadableWebSocketChannel::Peer::didClose):
* websockets/WorkerThreadableWebSocketChannel.h:
2011-05-29 Adam Barth <abarth@webkit.org>
Attempt to fix build by implementing pure virtual function.
* html/shadow/MediaControlRootElementChromium.cpp:
(WebCore::MediaControlRootElementChromium::shouldHideControls):
* html/shadow/MediaControlRootElementChromium.h:
2011-05-29 Brian Weinstein <bweinstein@apple.com>
Reviewed by Darin Adler.
Controls never hide in full screen after user stops moving mouse
https://bugs.webkit.org/show_bug.cgi?id=61715
<rdar://problem/9522182>
When we get a mouse move event in HTMLMediaElement::defaultEventHandler, and we are in full screen,
show the media controls, and then start a timer.
The timer fires 3 seconds after the user's last mouse movement (timer is restarted on every mouse
move), and hides the controls.
* html/HTMLMediaElement.cpp:
(WebCore::HTMLMediaElement::HTMLMediaElement): Initialize our new timer.
(WebCore::HTMLMediaElement::play): If we are in full screen mode, start our timer to hide the full screen
controls. We don't want the user to have to move the mouse to hide them when they use the spacebar
to play.
(WebCore::HTMLMediaElement::startHideFullscreenControlsTimer): Starts a oneshot timer 3 seconds in the future
if we are in full screen.
(WebCore::HTMLMediaElement::hideFullscreenControlsTimerFired): Make sure that we are currently playing, and
we are in full screen, and hide the controls. We don't want to hide the controls if we are paused.
(WebCore::HTMLMediaElement::stopHideFullscreenControlsTimer): Stops the timer.
(WebCore::HTMLMediaElement::defaultEventHandler): If we get a mouse move event and are in full screen, show the
controls and start a timer to hide them.
(WebCore::HTMLMediaElement::enterFullscreen): Start a timer to hide the full screen controls. The user shouldn't
have the move the mouse once they enter full screen to hide the controls.
(WebCore::HTMLMediaElement::exitFullscreen): Stop the timer to hide the full screen controls.
* html/HTMLMediaElement.h:
* html/shadow/MediaControls.h: Added pure virtual shouldHideControls() method.
* html/shadow/MediaControlRootElement.cpp:
(WebCore::MediaControlRootElement::playbackStopped): Stop the timer to hide the full screen controls.
(WebCore::MediaControlRootElement::shouldHideControls): Added, only report that
the caller should hide the controls if the panel is not hovered.
* html/shadow/MediaControlRootElement.h:
2011-05-29 Jer Noble <jer.noble@apple.com>
Reviewed by Simon Fraser.
Embedded Vimeo video, when taken fullscreen, is overlapped by content from the enclosing page
https://bugs.webkit.org/show_bug.cgi?id=61712
Tests: fullscreen/full-screen-iframe-zIndex.html
Walk up the ancestor chain for the full-screen element, marking them as full-screen
ancestors. Then, we apply a pseudo-class to those elements, which disable all their
stacking-context-creating styles. Set the z-index of all full-screen elements (and
the iframes which contain them) to a large value, ensuring they appear above other
sibling elements.
This new behavior replaces the previous "-webkit-full-screen-media-document" behavior
and pesudo-class, so remove it and replace it with the new pseudo-class.
* css/CSSSelector.cpp:
(WebCore::nameToPseudoTypeMap): Add -webkit-full-screen-ancestor and remove
-webkit-full-screen-media-document.
(WebCore::CSSSelector::pseudoId): Add PseudoFullScreenAncestor and remove
PseudoFullScreenMediaDocument
(WebCore::CSSSelector::extractPseudoType): Ditto.
* css/CSSSelector.h: Ditto.
* css/CSSStyleSelector.cpp:
(WebCore::CSSStyleSelector::SelectorChecker::checkOneSelector): Remove the
PseudoFullScreenMediaDocument implementation and replace it with
PseudoFullScreenAncestor.
* css/fullscreen.css:
(:-webkit-full-screen): Add a z-index property.
(:-webkit-full-screen-ancestor:not(iframe)): Added. Reset the z-index to
auto, and reset other stacking-context creating properties.
* dom/Document.cpp:
(WebCore::Document::setContainsFullScreenElementRecursively): Recurse up every element
instead of just the iframe elements.
(WebCore::Document::webkitWillEnterFullScreenForElement): Ditto.
* dom/Element.cpp:
(WebCore::Element::willRemove): Reset our parent's containsFullScreenElement property.
(WebCore::Element::insertedIntoTree): Ditto.
(WebCore::Element::containsFullScreenElement): Moved here from HTMLElementBase.
(WebCore::Element::setContainsFullScreenElement): Ditto.
* dom/Element.h:
* dom/ElementRareData.h:
(WebCore::ElementRareData::ElementRareData): Added ivar and initializer for
m_containsFullScreenElement.
* html/HTMLFrameElementBase.cpp:
(WebCore::HTMLFrameElementBase::HTMLFrameElementBase): Removed ivar and initializer.
(WebCore::HTMLFrameElementBase::setContainsFullScreenElement): Moved into Element.
* html/HTMLFrameElementBase.h:
* rendering/style/RenderStyleConstants.h:
2011-05-29 Dan Bernstein <mitz@apple.com>
Reviewed by Darin Adler.
<rdar://problem/9515650> 30 second rewind button obscured in fullscreen controller when video uses custom inline controls
https://bugs.webkit.org/show_bug.cgi?id=61714
* dom/Document.cpp:
(WebCore::Document::webkitDidEnterFullScreenForElement): Call didBecomeFullscreenElement() on the
new full screen element.
(WebCore::Document::webkitWillExitFullScreenForElement): Call willStopBeingFullscreenElement() on
the full screen element.
* dom/Element.h:
(WebCore::Element::didBecomeFullscreenElement): Added with a default implementation that does nothing.
(WebCore::Element::willStopBeingFullscreenElement): Ditto.
* html/HTMLMediaElement.cpp:
(WebCore::HTMLMediaElement::didBecomeFullscreenElement): Added this override, which calls
MediaControls::enteredFullscreen().
(WebCore::HTMLMediaElement::willStopBeingFullscreenElement): Added this override, which calls
MediaControls::exitedFullscreen().
* html/HTMLMediaElement.h:
* html/shadow/MediaControlElements.cpp:
(WebCore::MediaControlFullscreenButtonElement::preDispatchEventHandler): Removed calls to
enteredFullscreen() and exitedFullscreen() from here, since they are now called in response to
changes to the fullscreen-ness of the element.
2011-05-29 Darin Adler <darin@apple.com>
Reviewed by Kevin Decker.
REGRESSION (r87622): In media documents, clicking the full screen button and the play button pauses the video
https://bugs.webkit.org/show_bug.cgi?id=61713
We need to come up with a way to regression-test these changes. Nothing at the moment.
The bug is that we removed calls to preventDefault, but we still do need to prevent
default handling of this event.
* html/shadow/MediaControlElements.cpp:
(WebCore::MediaControlElement::preDispatchEventHandler): Add back the preventDefault
that was in here before r87622 as well as the stopPropagation that was added in r87622.
(WebCore::MediaControlMuteButtonElement::preDispatchEventHandler): Ditto.
(WebCore::MediaControlPlayButtonElement::preDispatchEventHandler): Ditto.
(WebCore::MediaControlSeekButtonElement::preDispatchEventHandler): Ditto.
(WebCore::MediaControlRewindButtonElement::preDispatchEventHandler): Ditto.
(WebCore::MediaControlReturnToRealtimeButtonElement::preDispatchEventHandler): Ditto.
(WebCore::MediaControlToggleClosedCaptionsButtonElement::preDispatchEventHandler): Ditto.
(WebCore::MediaControlFullscreenButtonElement::preDispatchEventHandler): Ditto.
(WebCore::MediaControlFullscreenVolumeMinButtonElement::preDispatchEventHandler): Ditto.
(WebCore::MediaControlFullscreenVolumeMaxButtonElement::preDispatchEventHandler): Ditto.
2011-05-29 Andreas Kling <kling@webkit.org>
Reviewed by Kenneth Rohde Christiansen.
Element: Micro-cleanup of scroll methods.
https://bugs.webkit.org/show_bug.cgi?id=61705
Do an early return without calculating element boundaries when asked
to scroll an element without a renderer().
* dom/Element.cpp:
(WebCore::Element::scrollIntoView):
(WebCore::Element::scrollIntoViewIfNeeded):
(WebCore::Element::scrollByUnits):
2011-05-29 Darin Adler <darin@apple.com>
Reviewed by Dan Bernstein.
Fix assertion seen when entering full screen mode for standalone video
https://bugs.webkit.org/show_bug.cgi?id=61708
We don't currently have a way to make a regression test for this.
* dom/Document.cpp:
(WebCore::Document::setAnimatingFullScreen): Call scheduleForcedStyleRecalc,
because scheduleStyleRecalc is intended to only be called when the style
system itself detects recalc is needed.
2011-05-27 Andreas Kling <kling@webkit.org>
Reviewed by James Robinson.
[Qt] Add area check to ImageBufferData::getImageData()
https://bugs.webkit.org/show_bug.cgi?id=61375
No change in behavior, just a sanity check.
* platform/graphics/qt/ImageBufferQt.cpp:
(WebCore::getImageData):
2011-05-29 Beth Dakin <bdakin@apple.com>
Reviewed by Darin Adler.
https://bugs.webkit.org/show_bug.cgi?id=61700
Need WebKit2 API to get the size of the render tree
-and corresponding-
<rdar://problem/9512733>
New member variable on RenderArena keeps track of the current amount of memory
allocated in the arena. The new client function sends this piece of data to
WebKit.
* page/ChromeClient.h:
(WebCore::ChromeClient::setRenderTreeSize):
* page/FrameView.cpp:
(WebCore::FrameView::performPostLayoutTasks):
* rendering/RenderArena.cpp:
(WebCore::RenderArena::RenderArena):
(WebCore::RenderArena::allocate):
(WebCore::RenderArena::free):
* rendering/RenderArena.h:
(WebCore::RenderArena::totalRenderArenaSize):
2011-05-29 Sheriff Bot <webkit.review.bot@gmail.com>
Unreviewed, rolling out r87566.
http://trac.webkit.org/changeset/87566
https://bugs.webkit.org/show_bug.cgi?id=61702
It made all tests assert on Qt in debug mode (Requested by
Ossy_weekend on #webkit).
* WebCore.exp.in:
* bindings/ScriptControllerBase.cpp:
(WebCore::ScriptController::executeIfJavaScriptURL):
* dom/Document.cpp:
(WebCore::Document::Document):
(WebCore::Document::suggestedMIMEType):
(WebCore::Document::lastModified):
(WebCore::Document::initSecurityContext):
(WebCore::Document::updateURLForPushOrReplaceState):
* dom/Document.h:
(WebCore::Document::setDocumentLoader):
(WebCore::Document::loader):
* html/MediaDocument.cpp:
(WebCore::MediaDocument::replaceMediaElementTimerFired):
* html/PluginDocument.cpp:
(WebCore::PluginDocumentParser::createDocumentStructure):
* platform/mac/HTMLConverter.mm:
(fileWrapperForElement):
2011-05-28 Steve Falkenburg <sfalken@apple.com>
Reviewed by Dan Bernstein.
Don't add sub-frames to global history when navigating via back/forward
https://bugs.webkit.org/show_bug.cgi?id=61701
<rdar://problem/9521222>
Instead of just checking whether the load is the first in the frame, we also need to
check to make sure we're loading in the main frame.
Not testable due to lack of global history infrastructure in DRT.
* loader/FrameLoader.cpp:
(WebCore::FrameLoader::transitionToCommitted):
2011-05-28 Alexey Proskuryakov <ap@apple.com>
Suggested by Simon Fraser.
REGRESSION (r85375): Load event is sometimes lost when multiple image elements use the same URL
https://bugs.webkit.org/show_bug.cgi?id=61692
<rdar://problem/9488628>
* loader/ImageLoader.cpp: (WebCore::ImageLoader::notifyFinished): There was no need to use
ASSERT_UNUSED here.
2011-05-28 Alexey Proskuryakov <ap@apple.com>
Reviewed by Geoff Garen.
REGRESSION (r85375): Load event is sometimes lost when multiple image elements use the same URL
https://bugs.webkit.org/show_bug.cgi?id=61692
<rdar://problem/9488628>
Test: fast/dom/gc-image-element-2.html
Manually verified that tests from bug 59604 and from bug 40926 still pass.
The problem here was that HTMLImageElement::hasPendingActivity() could return false when
a load (or error) event was still expected to fire.
* loader/cache/CachedResource.cpp:
(WebCore::CachedResource::setRequest):
* loader/cache/CachedResource.h:
(WebCore::CachedResource::wasCanceled):
(WebCore::CachedResource::errorOccurred):
Track whether the load was canceled. We want to always notify clients of load outcome,
as that's the only way they could make intelligent decisions.
* dom/ScriptElement.cpp: (WebCore::ScriptElement::execute): Cached resource clients now
get a notifyFinished call on cancellation. Handle this case, where we don't need the
execute the script, but also don't need to fire an error event.
* html/HTMLImageElement.cpp: Moved hasPendingActivity() to header, since it's just a single
function call now.
* html/HTMLImageElement.h: (WebCore::HTMLImageElement::hasPendingActivity): There is a large
window between when CachedResource::isLoading() becomes false and events are queued.
ImageLoader::haveFiredLoadEvent() is a much better indication of whether we are expecting
an event to fire.
* html/HTMLLinkElement.cpp: (WebCore::HTMLLinkElement::onloadTimerFired): Again, don't do
anything on cancellation.
* loader/ImageLoader.cpp:
(WebCore::ImageEventSender::hasPendingEvents): Made it debug-only again, and fixed to
give an accurate result while looping over the list of events to dispatch.
(WebCore::ImageLoader::notifyFinished): Don't do anything when cancelled. We don't want to
switch to a broken image icon, or to dispatch events.
(WebCore::ImageEventSender::dispatchPendingEvents): Clear the current loader from dispatching
list, as the event is no longer pending when it's being dispatched.
* loader/ImageLoader.h: Removed unnecessary hasPendingLoadEvent(). We don't care whether one
is already pending, we only care if one is expected at some time in the future, and
!haveFiredLoadEvent() is our best idea of that.
* dom/XMLDocumentParser.cpp: (WebCore::XMLDocumentParser::notifyFinished): Another place to
handle cancellation.
2011-05-28 Adam Barth <abarth@webkit.org>
Reviewed by Alexey Proskuryakov.
Audit all uses of KURL::prettyURL
https://bugs.webkit.org/show_bug.cgi?id=61201
As far as I can tell, all the callers of this API are confused. There
seems to be a cargo cult of using the "pretty" version of a URL, but in
reality folks just want the URL itself. The only case I'm unsure about
is location.href, which could have some compatibility constraints.
I've renamed prettyURL to deprecatedString to discourage folks from
further cargo-culting.
* WebCore.exp.in:
* page/Location.cpp:
(WebCore::Location::href):
(WebCore::Location::toString):
* platform/KURL.cpp:
(WebCore::KURL::deprecatedString):
* platform/KURL.h:
* platform/KURLGoogle.cpp:
(WebCore::KURL::deprecatedString):
* platform/network/soup/ResourceHandleSoup.cpp:
(WebCore::ResourceHandle::prepareForURL):
* workers/WorkerLocation.cpp:
(WebCore::WorkerLocation::href):
(WebCore::WorkerLocation::toString):
2011-05-28 Jer Noble <jer.noble@apple.com>
Reviewed by Maciej Stachowiak.
Mouse clicks propagate outside full-screen media controls.
https://bugs.webkit.org/show_bug.cgi?id=61689
Mouse click events are propagating out of the media controls, so mouse click
listeners registered on the video element are getting fired when the user
clicks on media controller buttons. By default, block propagation of click
events from MediaControlElements by overriding preDispatchEventHandler, and
convert all instances of defaultEventHandler -> preDispatchEventHandler. Change
all calls of event->setDefaultHandled() to event->stopPropagation().
* html/shadow/MediaControlElements.cpp:
(WebCore::MediaControlElement::preDispatchEventHandler): Added. Block
propagation of all mouse click events.
(WebCore::MediaControlVolumeSliderContainerElement::preDispatchEventHandler):
Renamed from setDefaultHandled.
(WebCore::MediaControlMuteButtonElement::preDispatchEventHandler): Ditto.
(WebCore::MediaControlPanelMuteButtonElement::preDispatchEventHandler): Ditto.
(WebCore::MediaControlPlayButtonElement::preDispatchEventHandler): Ditto.
(WebCore::MediaControlSeekButtonElement::preDispatchEventHandler): Ditto.
(WebCore::MediaControlRewindButtonElement::preDispatchEventHandler): Ditto.
(WebCore::MediaControlReturnToRealtimeButtonElement::preDispatchEventHandler): Ditto.
(WebCore::MediaControlToggleClosedCaptionsButtonElement::preDispatchEventHandler): Ditto.
(WebCore::MediaControlTimelineElement::preDispatchEventHandler): Ditto.
(WebCore::MediaControlVolumeSliderElement::preDispatchEventHandler): Ditto.
(WebCore::MediaControlFullscreenButtonElement::preDispatchEventHandler): Ditto.
(WebCore::MediaControlFullscreenVolumeMinButtonElement::preDispatchEventHandler): Ditto.
(WebCore::MediaControlFullscreenVolumeMaxButtonElement::preDispatchEventHandler): Ditto.
* html/shadow/MediaControlElements.h:
2011-05-28 Gavin Peters <gavinp@chromium.org>
Reviewed by Adam Barth.
prevent HTMLLinkElement from watching multiple CachedResources
https://bugs.webkit.org/show_bug.cgi?id=61686
If we modify an existing link element, stop listening to the previous
cached resource, to prevent double notifications (which crash).
Test: fast/dom/HTMLLinkElement/prefetch-too-many-clients.html
* html/HTMLLinkElement.cpp:
(WebCore::HTMLLinkElement::process):
2011-05-28 Tonis Tiigi <tonistiigi@gmail.com>
Reviewed by Pavel Feldman.
Web Inspector: there is a problem with computed style properties with wrong values
https://bugs.webkit.org/show_bug.cgi?id=60535
* inspector/front-end/StylesSidebarPane.js:
(WebInspector.StylesSidebarPane.prototype._markUsedProperties):
(WebInspector.ComputedStylePropertiesSection.prototype.rebuildComputedTrace):
2011-05-26 Antonio Gomes <agomes@rim.com>
Reviewed by Andreas Kling.
Logic error in WebCore/Page/SpatialNavigation.cpp::areRectsPartiallyAligned
https://bugs.webkit.org/show_bug.cgi?id=61606
Removed duplicated statement within if condition.
No new tests. Obvious clean up patch.
* page/SpatialNavigation.cpp:
(WebCore::areRectsPartiallyAligned):
2011-05-27 Simon Fraser <simon.fraser@apple.com>
Reviewed by Dan Bernstein.
CG BitmapImage needs to check for valid CGImage in a couple of places
https://bugs.webkit.org/show_bug.cgi?id=61684
<rdar://problem/9519348>
BitmapImage::getCGImageArray() can throw an exception if frameAtIndex()
returns null, which it may do if the image is corrupted or still
loading. Protect against that here and in getFirstCGImageRefOfSize().
* platform/graphics/cg/ImageCG.cpp:
(WebCore::BitmapImage::getFirstCGImageRefOfSize):
(WebCore::BitmapImage::getCGImageArray):
2011-05-27 Jochen Eisinger <jochen@chromium.org>
Reviewed by Adam Barth.
Add Frame parameter to all StorageArea methods. The chromium
embedder uses the Frame as context to decide whether or not
to allow usage of the storage API.
https://bugs.webkit.org/show_bug.cgi?id=61581
Test: platform/chromium/permissionclient/storage-permission.html
* storage/Storage.cpp:
(WebCore::Storage::length):
(WebCore::Storage::key):
(WebCore::Storage::getItem):
(WebCore::Storage::contains):
* storage/StorageArea.h:
* storage/StorageAreaImpl.cpp:
(WebCore::StorageAreaImpl::length):
(WebCore::StorageAreaImpl::key):
(WebCore::StorageAreaImpl::getItem):
(WebCore::StorageAreaImpl::contains):
* storage/StorageAreaImpl.h:
2011-05-27 Nate Chapin <japhet@chromium.org>
Reviewed by Jian Li.
Keep a reference to BlobResourceHandle before calling doNotifyFinish()
asynchronously to ensure it's still safe in the main thread.
https://bugs.webkit.org/show_bug.cgi?id=61669
I triggered this crash in fast/files/file-reader-abort.html during a
refactor that changed timings slightly.
* platform/network/BlobResourceHandle.cpp:
(WebCore::doNotifyFinish):
(WebCore::BlobResourceHandle::notifyFinish):
* platform/network/BlobResourceHandle.h:
(WebCore::BlobResourceHandle::aborted):
2011-05-27 Stephanie Lewis <slewis@apple.com>
Unreviewed.
Fix a typo in the order_file flag.
* Configurations/Base.xcconfig:
2011-05-27 Anders Carlsson <andersca@apple.com>
Reviewed by Sam Weinig.
Always use the default localization strategy
https://bugs.webkit.org/show_bug.cgi?id=61670
<rdar://problem/9516130>
Always use the default localization strategy when there's no platform strategy.
* platform/DefaultLocalizationStrategy.cpp:
(WebCore::DefaultLocalizationStrategy::shared):
* platform/DefaultLocalizationStrategy.h:
* platform/LocalizedStrings.cpp:
(WebCore::inputElementAltText):
(WebCore::resetButtonDefaultLabel):
(WebCore::searchableIndexIntroduction):
(WebCore::submitButtonDefaultLabel):
(WebCore::fileButtonChooseFileLabel):
(WebCore::fileButtonNoFileSelectedLabel):
(WebCore::defaultDetailsSummaryText):
(WebCore::copyImageUnknownFileLabel):
(WebCore::contextMenuItemTagOpenLinkInNewWindow):
(WebCore::contextMenuItemTagDownloadLinkToDisk):
(WebCore::contextMenuItemTagCopyLinkToClipboard):
(WebCore::contextMenuItemTagOpenImageInNewWindow):
(WebCore::contextMenuItemTagDownloadImageToDisk):
(WebCore::contextMenuItemTagCopyImageToClipboard):
(WebCore::contextMenuItemTagCopyImageUrlToClipboard):
(WebCore::contextMenuItemTagOpenFrameInNewWindow):
(WebCore::contextMenuItemTagCopy):
(WebCore::contextMenuItemTagGoBack):
(WebCore::contextMenuItemTagGoForward):
(WebCore::contextMenuItemTagStop):
(WebCore::contextMenuItemTagReload):
(WebCore::contextMenuItemTagCut):
(WebCore::contextMenuItemTagPaste):
(WebCore::contextMenuItemTagSelectAll):
(WebCore::contextMenuItemTagNoGuessesFound):
(WebCore::contextMenuItemTagIgnoreSpelling):
(WebCore::contextMenuItemTagLearnSpelling):
(WebCore::contextMenuItemTagSearchInSpotlight):
(WebCore::contextMenuItemTagSearchWeb):
(WebCore::contextMenuItemTagLookUpInDictionary):
(WebCore::contextMenuItemTagOpenLink):
(WebCore::contextMenuItemTagIgnoreGrammar):
(WebCore::contextMenuItemTagSpellingMenu):
(WebCore::contextMenuItemTagShowSpellingPanel):
(WebCore::contextMenuItemTagCheckSpelling):
(WebCore::contextMenuItemTagCheckSpellingWhileTyping):
(WebCore::contextMenuItemTagCheckGrammarWithSpelling):
(WebCore::contextMenuItemTagFontMenu):
(WebCore::contextMenuItemTagShowFonts):
(WebCore::contextMenuItemTagBold):
(WebCore::contextMenuItemTagItalic):
(WebCore::contextMenuItemTagUnderline):
(WebCore::contextMenuItemTagOutline):
(WebCore::contextMenuItemTagStyles):
(WebCore::contextMenuItemTagShowColors):
(WebCore::contextMenuItemTagSpeechMenu):
(WebCore::contextMenuItemTagStartSpeaking):
(WebCore::contextMenuItemTagStopSpeaking):
(WebCore::contextMenuItemTagWritingDirectionMenu):
(WebCore::contextMenuItemTagTextDirectionMenu):
(WebCore::contextMenuItemTagDefaultDirection):
(WebCore::contextMenuItemTagLeftToRight):
(WebCore::contextMenuItemTagRightToLeft):
(WebCore::contextMenuItemTagCorrectSpellingAutomatically):
(WebCore::contextMenuItemTagSubstitutionsMenu):
(WebCore::contextMenuItemTagShowSubstitutions):
(WebCore::contextMenuItemTagSmartCopyPaste):
(WebCore::contextMenuItemTagSmartQuotes):
(WebCore::contextMenuItemTagSmartDashes):
(WebCore::contextMenuItemTagSmartLinks):
(WebCore::contextMenuItemTagTextReplacement):
(WebCore::contextMenuItemTagTransformationsMenu):
(WebCore::contextMenuItemTagMakeUpperCase):
(WebCore::contextMenuItemTagMakeLowerCase):
(WebCore::contextMenuItemTagCapitalize):
(WebCore::contextMenuItemTagChangeBack):
(WebCore::contextMenuItemTagOpenVideoInNewWindow):
(WebCore::contextMenuItemTagOpenAudioInNewWindow):
(WebCore::contextMenuItemTagCopyVideoLinkToClipboard):
(WebCore::contextMenuItemTagCopyAudioLinkToClipboard):
(WebCore::contextMenuItemTagToggleMediaControls):
(WebCore::contextMenuItemTagToggleMediaLoop):
(WebCore::contextMenuItemTagEnterVideoFullscreen):
(WebCore::contextMenuItemTagMediaPlay):
(WebCore::contextMenuItemTagMediaPause):
(WebCore::contextMenuItemTagMediaMute):
(WebCore::contextMenuItemTagInspectElement):
(WebCore::searchMenuNoRecentSearchesText):
(WebCore::searchMenuRecentSearchesText):
(WebCore::searchMenuClearRecentSearchesText):
(WebCore::AXWebAreaText):
(WebCore::AXLinkText):
(WebCore::AXListMarkerText):
(WebCore::AXImageMapText):
(WebCore::AXHeadingText):
(WebCore::AXDefinitionListTermText):
(WebCore::AXDefinitionListDefinitionText):
(WebCore::AXARIAContentGroupText):
(WebCore::AXButtonActionVerb):
(WebCore::AXRadioButtonActionVerb):
(WebCore::AXTextFieldActionVerb):
(WebCore::AXCheckedCheckBoxActionVerb):
(WebCore::AXUncheckedCheckBoxActionVerb):
(WebCore::AXLinkActionVerb):
(WebCore::AXMenuListPopupActionVerb):
(WebCore::AXMenuListActionVerb):
(WebCore::missingPluginText):
(WebCore::crashedPluginText):
(WebCore::multipleFileUploadText):
(WebCore::unknownFileSizeText):
(WebCore::uploadFileText):
(WebCore::allFilesText):
(WebCore::keygenMenuItem512):
(WebCore::keygenMenuItem1024):
(WebCore::keygenMenuItem2048):
(WebCore::keygenKeychainItemName):
(WebCore::imageTitle):
(WebCore::mediaElementLoadingStateText):
(WebCore::mediaElementLiveBroadcastStateText):
(WebCore::localizedMediaControlElementString):
(WebCore::localizedMediaControlElementHelpText):
(WebCore::localizedMediaTimeDescription):
(WebCore::validationMessageValueMissingText):
(WebCore::validationMessageValueMissingForCheckboxText):
(WebCore::validationMessageValueMissingForFileText):
(WebCore::validationMessageValueMissingForMultipleFileText):
(WebCore::validationMessageValueMissingForRadioText):
(WebCore::validationMessageValueMissingForSelectText):
(WebCore::validationMessageTypeMismatchText):
(WebCore::validationMessageTypeMismatchForEmailText):
(WebCore::validationMessageTypeMismatchForMultipleEmailText):
(WebCore::validationMessageTypeMismatchForURLText):
(WebCore::validationMessagePatternMismatchText):
(WebCore::validationMessageTooLongText):
(WebCore::validationMessageRangeUnderflowText):
(WebCore::validationMessageRangeOverflowText):
(WebCore::validationMessageStepMismatchText):
2011-05-27 Brady Eidson <beidson@apple.com>
Reviewed by Darin Adler.
First swipe at resolving <rdar://problem/9125145> and https://bugs.webkit.org/show_bug.cgi?id=61494
Make the Document be intelligent about returning its DocumentLoader, including the possibility that
the DocumentLoader will be null.
No new tests. No change in behavior.
Instead of storing the DocumentLoader at construction and never changing it,
always calculate it based on the FrameLoader's current DocumentLoader:
* dom/Document.cpp:
(WebCore::Document::Document):
(WebCore::Document::suggestedMIMEType):
(WebCore::Document::lastModified):
(WebCore::Document::initSecurityContext):
(WebCore::Document::updateURLForPushOrReplaceState):
(WebCore::Document::loader):
* dom/Document.h:
Null-check or ASSERT that the DocumentLoader exists (or both) depending on the scenario:
* bindings/ScriptControllerBase.cpp:
(WebCore::ScriptController::executeIfJavaScriptURL):
* html/MediaDocument.cpp:
(WebCore::MediaDocument::replaceMediaElementTimerFired):
* html/PluginDocument.cpp:
(WebCore::PluginDocumentParser::createDocumentStructure):
* platform/mac/HTMLConverter.mm:
(fileWrapperForElement):
* WebCore.exp.in:
2011-05-27 Jer Noble <jer.noble@apple.com>
Reviewed by Maciej Stachowiak.
30 second rewind button obscured in fullscreen controller
https://bugs.webkit.org/show_bug.cgi?id=61663
If reset() is called while in full-screen mode, make sure to show and hide
the correct controls for that mode.
* html/shadow/MediaControlRootElement.cpp:
(WebCore::MediaControlRootElement::reset):
2011-05-27 James Robinson <jamesr@chromium.org>
Reviewed by Simon Fraser.
GraphicsLayers for overflow controls on iframe without clipping layer left out of layer tree
https://bugs.webkit.org/show_bug.cgi?id=61590
Adds overflow control layers to the compositor tree for layers without clipping layers regardless of whether the
backing is parented. This ensures that the scroll corner layer for an iframe without a clipping layer ends up
in the final layer tree. We don't currently render resizers for iframes, but we will soon and this keeps the
graphics layer tree consistent.
Test: compositing/iframes/resizer.html
* rendering/RenderLayerCompositor.cpp:
(WebCore::RenderLayerCompositor::rebuildCompositingLayerTree):
2011-05-27 Adam Barth <abarth@webkit.org>
Reviewed by Eric Seidel.
HTMLVideoElement::currentSrc() should return a KURL
https://bugs.webkit.org/show_bug.cgi?id=61578
I suspect we got into this mess because the author of this code didn't
know about the URL attribute in WebKit IDL, which is super useful!
Bad news: The line of code in question seems to have another bug, which
I've documented in a FIXME. Let the yak shaving continue!
* html/HTMLMediaElement.cpp:
(WebCore::urlForLogging):
(WebCore::HTMLMediaElement::loadResource):
(WebCore::HTMLMediaElement::isSafeToLoadURL):
(WebCore::HTMLMediaElement::selectNextSourceChild):
(WebCore::HTMLMediaElement::getPluginProxyParams):
* html/HTMLMediaElement.h:
(WebCore::HTMLMediaElement::currentSrc):
(WebCore::HTMLMediaElement::currentURL):
* html/canvas/CanvasRenderingContext.cpp:
(WebCore::CanvasRenderingContext::checkOrigin):
* rendering/HitTestResult.cpp:
(WebCore::HitTestResult::absoluteMediaURL):
- This complete URL call was unnecessary because currentSrc is
already absolute.
2011-05-27 Mikhail Naganov <mnaganov@chromium.org>
Reviewed by Pavel Feldman.
Web Inspector: [Chromium] Add support for showing URL of DOMWindow in heap profiles.
https://bugs.webkit.org/show_bug.cgi?id=61177
* inspector/front-end/HeapSnapshot.js:
(WebInspector.HeapSnapshotNode.prototype.get className):
2011-05-27 Nikolas Zimmermann <nzimmermann@rim.com>
Rubber-stamped by Rob Buis.
embedded SVG object doesn't scale right
https://bugs.webkit.org/show_bug.cgi?id=10526
Fixes crash in svg/custom/immutable-properties.html, seen on the bots.
* svg/SVGLength.cpp:
(WebCore::SVGLength::determineViewport): Oops forgot to merge-in a null check before landing.
2011-05-27 Nikolas Zimmermann <nzimmermann@rim.com>
Reviewed by Rob Buis.
embedded SVG object doesn't scale right
https://bugs.webkit.org/show_bug.cgi?id=10526
<object> tags should treat width/height on a referenced SVG as intrinsic width/height
https://bugs.webkit.org/show_bug.cgi?id=11976
Incorrect handling of percentage values for width/height on embedded elements
https://bugs.webkit.org/show_bug.cgi?id=14793
WebKit fails some WICD 1.0 core test cases
https://bugs.webkit.org/show_bug.cgi?id=15836 (partially fixed, all 'rightsizing' tests are fixed)
CSS 2.1: Support replaced elements with relative intrinsic sizes
https://bugs.webkit.org/show_bug.cgai?id=15849 (partially fixed)
SVG embedded as <object> doesn't respect width/height attributes
https://bugs.webkit.org/show_bug.cgi?id=34972
Explicit size of object tag ignored
https://bugs.webkit.org/show_bug.cgi?id=37086
Add partial support of CSS 2.1 replaced elements with intrinsic size. The feature itself is complete but has only
been implemented for RenderPart, to support SVG content document size negotiation. It serves as starting point for a generalization, in future.
The changes in RenderPart are a 1:1 transliteration of the spec (http://www.w3.org/TR/CSS21/visudet.html#inline-replaced-width/height, see code).
SVG 1.1 says:
The 'width' attribute on the outermost svg element establishes the viewport's width, unless the following conditions are met:
...
and there are CSS-compatible positioning properties ([CSS2], section 9.3) specified on the referencing element (e.g., the 'object' element)
or on the containing document's outermost svg element that are sufficient to establish the width of the viewport. Under these conditions,
the positioning properties establish the viewport's width.
If an <object> carries width/height attributes, these specify the viewport size of the embedded SVG, instead of its own
width/height or viewBox properties. If an <object> has no width/height information, its intrinsic size needs to be calculated depending
on the intrinsic ratio (viewBox width divided by height ratio) and the width/height properties on the outermost referenced <svg> element.
This requires a negotiation between the host document and the embedded document.
(There are several more factors that need to be considered, the CSS spec covers this and the RenderPart::computeReplaced* code covers this.)
Fixes dozens of long-standing bug reports. The number one integration issue when using SVG through <object> is resolved: "right sizing".
Tests: http/tests/misc/object-embedding-svg-delayed-size-negotiation.xhtml
svg/custom/object-no-size-attributes.xhtml (bug 11976, from Eric Seidel)
svg/custom/object-sizing-explicit-height.xhtml (bug 10526, from Ryan Cannon)
svg/custom/object-sizing-explicit-width-height.xhtml
svg/custom/object-sizing-explicit-width.xhtml (bug 14793, from Oliver Hunt)
svg/custom/object-sizing-no-width-height-change-content-box-size.xhtml
svg/custom/object-sizing-no-width-height.xhtml
svg/custom/object-sizing.xhtml (bug 37086, from Jeff Schiller)
svg/wicd/rightsizing-grid.xhtml (bug 15836, WICD rightsizing test now works)
svg/wicd/test-rightsizing-a.xhtml (ditto)
svg/wicd/test-rightsizing-b.xhtml (ditto)
svg/zoom/page/zoom-svg-through-object-with-absolute-size-2.xhtml
svg/zoom/page/zoom-svg-through-object-with-absolute-size.xhtml
svg/zoom/page/zoom-svg-through-object-with-huge-size.xhtml
svg/zoom/page/zoom-svg-through-object-with-override-size.html (bug 34972, from Andreas Kling)
svg/zoom/page/zoom-svg-through-object-with-percentage-size.xhtml
svg/zoom/page/zoom-svg-through-object-with-text.xhtml
* platform/Length.h:
(WebCore::Length::isSpecified):
* rendering/RenderPart.cpp:
(WebCore::RenderPart::embeddedSVGContentRenderer):
(WebCore::RenderPart::computeEmbeddedDocumentReplacedWidth):
(WebCore::RenderPart::computeEmbeddedDocumentReplacedHeight):
(WebCore::RenderPart::computeReplacedLogicalWidth):
(WebCore::RenderPart::computeReplacedLogicalHeight):
(WebCore::RenderPart::layout):
* rendering/RenderPart.h:
* rendering/RenderReplaced.cpp:
(WebCore::RenderReplaced::computeReplacedLogicalWidth):
(WebCore::RenderReplaced::computeReplacedLogicalHeight):
* rendering/svg/RenderSVGRoot.cpp:
(WebCore::RenderSVGRoot::RenderSVGRoot):
(WebCore::RenderSVGRoot::computeIntrinsicRatio):
(WebCore::RenderSVGRoot::computeIntrinsicWidth):
(WebCore::RenderSVGRoot::computeIntrinsicHeight):
(WebCore::RenderSVGRoot::negotiateSizeWithHostDocumentIfNeeded):
(WebCore::RenderSVGRoot::computeReplacedLogicalWidth):
(WebCore::RenderSVGRoot::computeReplacedLogicalHeight):
(WebCore::RenderSVGRoot::layout):
* rendering/svg/RenderSVGRoot.h:
* svg/SVGLength.cpp:
(WebCore::SVGLength::determineViewport):
* svg/SVGSVGElement.cpp:
(WebCore::SVGSVGElement::currentScale):
(WebCore::SVGSVGElement::setCurrentScale):
(WebCore::SVGSVGElement::currentViewBoxRect):
(WebCore::SVGSVGElement::viewBoxToViewTransform):
* svg/SVGSVGElement.h:
2011-05-27 Michael Saboff <msaboff@apple.com>
Reviewed by David Hyatt.
https://bugs.webkit.org/show_bug.cgi?id=61646
Duplicate Fonts Put in Font Cache on Mac Due to Duplicate CGFontRefs for Same Font
Change the platformIsEqual to just compare the m_font members if
either is not null.
No tests added - functionality unchanged, fixing memory abandonment.
* platform/graphics/cocoa/FontPlatformDataCocoa.mm:
(WebCore::FontPlatformData::platformIsEqual):
2011-05-25 Martin Robinson <mrobinson@igalia.com>
Reviewed by Dirk Schulze.
[GTK][Cairo] Twitter rendering breaks
https://bugs.webkit.org/show_bug.cgi?id=60917
When instantiating a cairo_scaled_font_t font would put the font in an error state,
leave the m_scaledFont member of platform data as null. Rendering with scaled fonts
in the error state can later lead to corrupted rendering.
Due to this change, we must always null check cairo_scaled_font_t and the platform
data now carries the cairo_font_face_t object with it, so that it can be accessed later
if there is no cairo_scaled_font_t.
Test: platform/gtk/fonts/zero-pixel-sized-fonts.html
* platform/graphics/cairo/FontCairo.cpp:
(WebCore::Font::drawGlyphs): If the scaled font is null, do not render.
* platform/graphics/freetype/FontPlatformData.h: Now include the cairo_font_face_t.
* platform/graphics/freetype/FontPlatformDataFreeType.cpp:
(WebCore::FontPlatformData::FontPlatformData): Initialize the new member.
(WebCore::FontPlatformData::operator=): Carry over the new member.
(WebCore::FontPlatformData::operator==): Check equality with the new member.
(WebCore::FontPlatformData::initializeWithFontFace): If the initialization of m_scaledFont
put the font into an error state, then just free it and return.
(WebCore::FontPlatformData::hasCompatibleCharmap): The font always has a compatible charmap
when the scaled font is null, because rendering is always a no-op and the font data never
needs to be read.
* platform/graphics/freetype/GlyphPageTreeNodeFreeType.cpp:
(WebCore::GlyphPage::fill): Don't read font data when the scaled font is null.
* platform/graphics/freetype/SimpleFontDataFreeType.cpp:
(WebCore::SimpleFontData::platformInit): Return early when there's no scaled font.
(WebCore::SimpleFontData::scaledFontData): Use the new m_font member.
(WebCore::SimpleFontData::containsCharacters): Return early when there's no scaled font.
(WebCore::SimpleFontData::platformWidthForGlyph): Ditto.
2011-05-27 David Levin <levin@chromium.org>
Reviewed by Darin Fisher.
Need a callback for when the preferred rendered size may have changed.
https://bugs.webkit.org/show_bug.cgi?id=61309
No new tests needed since no new functionality is exposed.
* page/Chrome.cpp:
(WebCore::Chrome::layoutUpdated): Plumbed through the call.
* page/Chrome.h: Added the new method.
* page/ChromeClient.h:
(WebCore::ChromeClient::layoutUpdated): Ditto.
* page/FrameView.cpp:
(WebCore::FrameView::layout): Added a callback for whem a layout has finished.
2011-05-27 Stephanie Lewis <slewis@apple.com>
Rubber Stamped by Adam Roben.
Update Order Files. Use -order_file flag since it can order more of the binary.
* Configurations/Base.xcconfig:
* WebCore.order:
2011-05-27 Sheriff Bot <webkit.review.bot@gmail.com>
Unreviewed, rolling out r87464.
http://trac.webkit.org/changeset/87464
https://bugs.webkit.org/show_bug.cgi?id=61643
client-close/server-close tests are flaky on Chromium Mac and
Windows (Requested by aklein on #webkit).
* platform/network/SocketStreamHandleBase.cpp:
(WebCore::SocketStreamHandleBase::send):
(WebCore::SocketStreamHandleBase::close):
(WebCore::SocketStreamHandleBase::sendPendingData):
* platform/network/SocketStreamHandleBase.h:
* websockets/ThreadableWebSocketChannelClientWrapper.cpp:
(WebCore::ThreadableWebSocketChannelClientWrapper::didClose):
(WebCore::ThreadableWebSocketChannelClientWrapper::didCloseCallback):
* websockets/ThreadableWebSocketChannelClientWrapper.h:
* websockets/WebSocket.cpp:
(WebCore::WebSocket::send):
(WebCore::WebSocket::close):
(WebCore::WebSocket::bufferedAmount):
(WebCore::WebSocket::didConnect):
(WebCore::WebSocket::didReceiveMessage):
(WebCore::WebSocket::didReceiveMessageError):
(WebCore::WebSocket::didClose):
* websockets/WebSocket.h:
* websockets/WebSocketChannel.cpp:
(WebCore::WebSocketChannel::WebSocketChannel):
(WebCore::WebSocketChannel::close):
(WebCore::WebSocketChannel::disconnect):
(WebCore::WebSocketChannel::didClose):
(WebCore::WebSocketChannel::didReceiveData):
(WebCore::WebSocketChannel::didFail):
(WebCore::WebSocketChannel::processBuffer):
* websockets/WebSocketChannel.h:
* websockets/WebSocketChannelClient.h:
(WebCore::WebSocketChannelClient::didClose):
* websockets/WorkerThreadableWebSocketChannel.cpp:
(WebCore::WorkerThreadableWebSocketChannel::Peer::close):
(WebCore::workerContextDidClose):
(WebCore::WorkerThreadableWebSocketChannel::Peer::didClose):
* websockets/WorkerThreadableWebSocketChannel.h:
2011-05-27 Rob Buis <rbuis@rim.com>
Reviewed by Nikolas Zimmermann.
https://bugs.webkit.org/show_bug.cgi?id=19995
hixie.ch : anchor Link fails with fragment identifiers inside SVG fragments.
Only allow links to animation elements within the document.
Test: svg/hixie/links/003.xml
* svg/SVGAElement.cpp:
(WebCore::SVGAElement::defaultEventHandler):
2011-05-27 Andreas Kling <kling@webkit.org>
Reviewed by Benjamin Poulain.
Update RGBA color serialization to match HTML5.
https://bugs.webkit.org/show_bug.cgi?id=61449
HTML5 now specifies that fully transparent colors should have their alpha value
serialized to "0" rather than "0.0" (followed by any number of extra zeroes.)
The number of decimals for alpha values between 0 and 1 is not specified,
so match Gecko and Presto by returning the lowest number of decimals needed
to represent the number. (No more trailing zeroes.)
* platform/graphics/Color.cpp:
(WebCore::Color::serialized):
2011-05-27 Hans Wennborg <hans@chromium.org>
Reviewed by Tony Gentilcore.
IndexedDB: Support mutating cursors on top of LevelDB
https://bugs.webkit.org/show_bug.cgi?id=61615
We need to support the case where a new node is added to the tree in a
transaction after the TreeIterator has covered the whole tree.
Since this is done lazily, i.e. we set a flag that the tree might have
changed, and act upon it later, some members need to be mutable,
because we might need to re-seek the tree iterator in a const function.
Test: storage/indexeddb/mutating-cursor.html
storage/indexeddb/mozilla/cursor-mutation-objectstore-only.html (existing)
* platform/leveldb/LevelDBTransaction.cpp:
(WebCore::LevelDBTransaction::set):
(WebCore::LevelDBTransaction::TreeIterator::reset):
(WebCore::LevelDBTransaction::TreeIterator::~TreeIterator):
(WebCore::LevelDBTransaction::TreeIterator::TreeIterator):
(WebCore::LevelDBTransaction::TransactionIterator::TransactionIterator):
(WebCore::LevelDBTransaction::TransactionIterator::~TransactionIterator):
(WebCore::LevelDBTransaction::TransactionIterator::next):
(WebCore::LevelDBTransaction::TransactionIterator::prev):
(WebCore::LevelDBTransaction::TransactionIterator::key):
(WebCore::LevelDBTransaction::TransactionIterator::value):
(WebCore::LevelDBTransaction::TransactionIterator::treeChanged):
(WebCore::LevelDBTransaction::TransactionIterator::refreshTreeIterator):
(WebCore::LevelDBTransaction::registerIterator):
(WebCore::LevelDBTransaction::unregisterIterator):
(WebCore::LevelDBTransaction::notifyIteratorsOfTreeChange):
* platform/leveldb/LevelDBTransaction.h:
* storage/IDBFactoryBackendImpl.cpp:
(WebCore::IDBFactoryBackendImpl::open):
* storage/IDBLevelDBBackingStore.cpp:
(WebCore::IDBLevelDBBackingStore::open):
2011-05-27 Sujin Park <sujjin.park@gmail.com>
Unreviewed, buildfix if --no-javascript-debugger.
Regression(R84125): Broke GTK build
https://bugs.webkit.org/show_bug.cgi?id=60698
No new tests since this doesn't change any behavior.
* inspector/WorkerInspectorController.h:
2011-05-26 Yael Aharon <yael.aharon@nokia.com>
Reviewed by Tony Chang.
webkit should implement the dropzone attribute
https://bugs.webkit.org/show_bug.cgi?id=58210
Add support for dropzone attribute.
http://www.whatwg.org/specs/web-apps/current-work/multipage/dnd.html#the-dropzone-attribute
If a drag event was not canceled by JavaScript, look for an element with a dropzone attribute.
If there is such an element, and it matches the drag data store, set the action defined by that
element and continue processing the drag and drop operation.
Tests: fast/events/dropzone-001.html
fast/events/dropzone-002.html
fast/events/dropzone-003.html
fast/events/dropzone-004.html
* dom/Clipboard.cpp:
(WebCore::Clipboard::hasFileOfType):
(WebCore::Clipboard::hasStringOfType):
(WebCore::convertDropZoneOperationToDragOperation):
(WebCore::convertDragOperationToDropZoneOperation):
(WebCore::Clipboard::processDropZoneKeyword):
* dom/Clipboard.h:
* html/HTMLAttributeNames.in:
* html/HTMLElement.idl:
* page/EventHandler.cpp:
(WebCore::EventHandler::findDropZone):
(WebCore::EventHandler::updateDragAndDrop):
* page/EventHandler.h:
2011-05-27 Patrick Gansterer <paroga@webkit.org>
Unreviewed WinCE build fix for r87467.
* page/wince/FrameWinCE.cpp:
2011-05-26 Hans Wennborg <hans@chromium.org>
Reviewed by Tony Gentilcore.
IndexedDB: Support NO_DUPLICATE cursors on LevelDB back-end
https://bugs.webkit.org/show_bug.cgi?id=61517
Support cursors where the direction is set to NEXT_NO_DUPLICATE,
or PREV_NO_DUPLICATE, as specified here:
http://www.w3.org/TR/IndexedDB/#widl-IDBCursor-NEXT_NO_DUPLICATE
This is tested by storage/indexeddb/mozilla/indexes.html
* storage/IDBLevelDBBackingStore.cpp:
(WebCore::IDBLevelDBBackingStore::openObjectStoreCursor):
(WebCore::IDBLevelDBBackingStore::openIndexKeyCursor):
(WebCore::IDBLevelDBBackingStore::openIndexCursor):
2011-05-26 Hans Wennborg <hans@chromium.org>
Reviewed by Tony Gentilcore.
LevelDB: turn on paranoid checks and verify checksums, log errors
https://bugs.webkit.org/show_bug.cgi?id=61516
This allows for detection of corrupted databases.
Even if we can't recover from a corrupted database, discovering the
problem is a step in the right direction.
No new functionality, no new tests.
* platform/leveldb/LevelDBDatabase.cpp:
(WebCore::LevelDBDatabase::open):
(WebCore::LevelDBDatabase::put):
(WebCore::LevelDBDatabase::remove):
(WebCore::LevelDBDatabase::get):
(WebCore::LevelDBDatabase::write):
(WebCore::IteratorImpl::checkStatus):
(WebCore::IteratorImpl::seekToLast):
(WebCore::IteratorImpl::seek):
(WebCore::IteratorImpl::next):
(WebCore::IteratorImpl::prev):
(WebCore::LevelDBDatabase::createIterator):
2011-05-27 James Robinson <jamesr@chromium.org>
Reviewed by Adam Barth.
CachedResourceLoader stores data: urls in validated URL set
https://bugs.webkit.org/show_bug.cgi?id=61604
CachedResourceLoader maintains a set of URLs that have been validated to avoid validating the same resource
multiple times for loads within the same document. This doesn't make sense for data: URLs and just wastes
memory.
* loader/cache/CachedResourceLoader.cpp:
(WebCore::CachedResourceLoader::revalidateResource):
(WebCore::CachedResourceLoader::loadResource):
2011-05-23 MORITA Hajime <morrita@google.com>
Reviewed by Tony Chang.
[Refactoring] DocumentMarker should be carried around as a pointer, not value.
https://bugs.webkit.org/show_bug.cgi?id=61262
- Changed return value of markersInRange() from Vector<DocumentMarker> to Vector<DocumentMarker*>.
- Introduced markersFor() that returns Vector<DocumentMarker*>
- Removed DocumentMarkerController::setRenderedRectForMarker() which now can be replaced by
RenderedDocumentMarker::setRenderedRect().
- This change didn't remove markersForNode() beucase there is patches on review which depends
markersForNode(). I'll remove its call after these patches are landed.
No new tests. No behavior change.
* WebCore.exp.in:
* dom/DocumentMarkerController.cpp:
(WebCore::DocumentMarkerController::addTextMatchMarker):
(WebCore::DocumentMarkerController::markersFor):
(WebCore::DocumentMarkerController::markersInRange):
(WebCore::DocumentMarkerController::hasMarkers):
* dom/DocumentMarkerController.h:
* dom/RenderedDocumentMarker.h:
(WebCore::toRenderedDocumentMarker):
* editing/CompositeEditCommand.cpp:
(WebCore::CompositeEditCommand::replaceTextInNodePreservingMarkers):
* editing/DeleteSelectionCommand.cpp:
(WebCore::DeleteSelectionCommand::originalStringForAutocorrectionAtBeginningOfSelection):
* editing/Editor.cpp:
(WebCore::Editor::selectionStartHasMarkerFor):
* editing/SpellingCorrectionController.cpp:
(WebCore::markersHaveIdenticalDescription):
(WebCore::SpellingCorrectionController::respondToChangedSelection):
(WebCore::SpellingCorrectionController::recordSpellcheckerResponseForModifiedCorrection):
(WebCore::SpellingCorrectionController::processMarkersOnTextToBeReplacedByResult):
* editing/SpellingCorrectionController.h:
(WebCore::SpellingCorrectionController::shouldStartTimerFor):
* rendering/InlineTextBox.cpp:
(WebCore::InlineTextBox::paintSpellingOrGrammarMarker):
(WebCore::InlineTextBox::paintTextMatchMarker):
(WebCore::InlineTextBox::computeRectForReplacementMarker):
(WebCore::InlineTextBox::paintDocumentMarkers):
* rendering/InlineTextBox.h:
* rendering/svg/SVGInlineFlowBox.cpp:
(WebCore::SVGInlineFlowBox::computeTextMatchMarkerRectForRenderer):
2011-05-26 MORITA Hajime <morrita@google.com>
Reviewed by Kent Tamura.
WebCore::HTMLSummaryElement::isMainSummary ReadAV@NULL
https://bugs.webkit.org/show_bug.cgi?id=61511
Removed Unnecessary wrong cast to Elmement, which can be non-Element.
Test: fast/html/details-summary-document-child.html
* html/HTMLSummaryElement.cpp:
(WebCore::HTMLSummaryElement::detailsElement):
2011-05-26 Adam Barth <abarth@webkit.org>
Reviewed by Ryosuke Niwa.
FrameLoader cannot be null
https://bugs.webkit.org/show_bug.cgi?id=61609
This code has a bunch of cargo-cult null checking.
* html/HTMLMediaElement.cpp:
(WebCore::HTMLMediaElement::createRenderer):
(WebCore::HTMLMediaElement::attach):
(WebCore::HTMLMediaElement::loadResource):
(WebCore::HTMLMediaElement::getPluginProxyParams):
(WebCore::HTMLMediaElement::createMediaPlayerProxy):
(WebCore::HTMLMediaElement::updateWidget):
2011-05-26 Shane Stephens <shanestephens@google.com>
Reviewed by James Robinson.
REGRESSION (r81992): layout triggered by position update fails to apply when transform is updated at same time
https://bugs.webkit.org/show_bug.cgi?id=60689
When a transform is modified in a style, we were upgrading our understanding
of the difference from PositionedMovementOnly to SimplifiedLayout. However,
if the position of the style is independently changed at the same time, both
PositionedMovement and SimplifiedLayout passes are required.
Test: transforms/2d/set-transform-and-top.html
* rendering/RenderObject.cpp:
Added checks for SimplifiedLayoutAndPositionedMovement - when encountered,
set both PositionedMovement and SimplifiedLayout update flasgs.
* rendering/style/RenderStyleConstants.h:
Added a new StyleDifference enum value (SimplifiedLayoutAndPositionedMovement) for
cases when both PositionedMovement and SimplifiedLayout are required.
2011-05-26 Luke Macpherson <macpherson@chromium.org>
Reviewed by Eric Seidel.
Implement webkit margin collapse CSS properties in CSSStyleApplyProperty
https://bugs.webkit.org/show_bug.cgi?id=61589
No new tests as no new functionality added.
* css/CSSStyleApplyProperty.cpp:
(WebCore::CSSStyleApplyProperty::CSSStyleApplyProperty):
Add handlers for:
CSSPropertyWebkitMarginBeforeCollapse
CSSPropertyWebkitMarginAfterCollapse
CSSPropertyWebkitMarginTopCollapse
CSSPropertyWebkitMarginBottomCollapse
CSSPropertyWebkitMarginCollapse
* css/CSSStyleSelector.cpp:
(WebCore::CSSStyleSelector::applyProperty):
Remove cases that are no longer required.
2011-05-26 Adam Barth <abarth@webkit.org>
Reviewed by Eric Seidel.
Support cross-origin property for images
https://bugs.webkit.org/show_bug.cgi?id=61015
This patch add support for the crossorigin attribute of images and
teaches 2D canvas to respect that flag and not taint a canvas if the
image drawn on the canvas is allowed by CORS.
While I was editing this code, I couldn't resist a couple touch-up
changes.
Tests: http/tests/security/canvas-remote-read-remote-image-allowed-with-credentials.html
http/tests/security/canvas-remote-read-remote-image-allowed.html
http/tests/security/canvas-remote-read-remote-image-blocked-no-crossorigin.html
* html/HTMLAttributeNames.in:
* html/HTMLCanvasElement.cpp:
(WebCore::HTMLCanvasElement::securityOrigin):
* html/HTMLCanvasElement.h:
* html/HTMLImageElement.idl:
* html/canvas/CanvasRenderingContext.cpp:
(WebCore::CanvasRenderingContext::checkOrigin):
* html/canvas/CanvasRenderingContext2D.cpp:
(WebCore::CanvasRenderingContext2D::createPattern):
* loader/ImageLoader.cpp:
(WebCore::ImageLoader::updateFromElement):
* loader/cache/CachedResource.cpp:
(WebCore::CachedResource::passesAccessControlCheck):
* loader/cache/CachedResource.h:
2011-05-26 Mihai Parparita <mihaip@chromium.org>
Reviewed by Adam Barth.
Fix worldID and destinationDomain argument names
https://bugs.webkit.org/show_bug.cgi?id=61571
As part of working on r87423, I noticed a couple of inconsistencies in
argument names:
- We would use worldId in .h files but worldID in .cpp files.
Standardize on the latter
- SecurityOrigin::addOriginAccessWhitelistEntry would take a
destinationDomains argument, even though the actual parameter was for
a single domain (renamed to be singular).
* bindings/v8/ScriptController.h:
* bindings/v8/V8Proxy.h:
* page/SecurityOrigin.cpp:
(WebCore::SecurityOrigin::addOriginAccessWhitelistEntry):
(WebCore::SecurityOrigin::removeOriginAccessWhitelistEntry):
* page/SecurityOrigin.h:
2011-05-26 Emil A Eklund <eae@chromium.org>
Reviewed by Eric Seidel.
Replace RenderLayer::x/y/width/height with location/size
https://bugs.webkit.org/show_bug.cgi?id=61414
Covered by existing tests.
* dom/MouseRelatedEvent.cpp:
(WebCore::MouseRelatedEvent::computeRelativePosition):
* rendering/RenderBox.cpp:
(WebCore::RenderBox::computeRectForRepaint):
* rendering/RenderBox.h:
(WebCore::RenderBox::maxLayoutOverflow):
* rendering/RenderInline.cpp:
(WebCore::RenderInline::clippedOverflowRectForRepaint):
(WebCore::RenderInline::computeRectForRepaint):
* rendering/RenderLayer.cpp:
(WebCore::RenderLayer::updateLayerPosition):
(WebCore::RenderLayer::convertToLayerCoords):
(WebCore::RenderLayer::offsetFromResizeCorner):
(WebCore::RenderLayer::calculateRects):
* rendering/RenderLayer.h:
(WebCore::RenderLayer::location):
(WebCore::RenderLayer::setSize):
* rendering/RenderObject.cpp:
(WebCore::RenderObject::computeRectForRepaint):
* rendering/RenderTreeAsText.cpp:
(WebCore::write):
(WebCore::writeLayers):
(WebCore::externalRepresentation):
* rendering/RenderView.cpp:
(WebCore::RenderView::absoluteRects):
(WebCore::RenderView::absoluteQuads):
2011-05-26 Annie Sullivan <sullivan@chromium.org>
Reviewed by Ryosuke Niwa.
Delete table in contentEditable/designMode produces odd contents
https://bugs.webkit.org/show_bug.cgi?id=57148
Removes border-collapse, -webkit-border-horizontal-spacing, and
-webkit-border-vertical-spacing from the list of properties which
should be preserved during edit operations. Also renames this
list to editingInheritableProperties to be more clear about what
the list is for.
Test: editing/deleting/delete-last-char-in-table.html
* editing/EditingStyle.cpp: Removes border vertical/horizontal
spacing from editingStyleProperties.
* editing/EditingStyle.h: Renames OnlyInheritableProperties to
OnlyEditingInheritableProperties.
* editing/markup.cpp: Renames InheritablePropertiesAndBackgroundColorInEffect.
2011-05-26 Yuta Kitamura <yutak@chromium.org>
Reviewed by Kent Tamura.
WebSocket closing handshake
https://bugs.webkit.org/show_bug.cgi?id=35721
Implement WebSocket closing handshake based on Ian Hickson's
WebSocket protocol draft 76.
Tests: http/tests/websocket/tests/client-close.html
http/tests/websocket/tests/server-close.html
* platform/network/SocketStreamHandleBase.cpp:
(WebCore::SocketStreamHandleBase::send):
Do not send a message if we are in Closing state.
(WebCore::SocketStreamHandleBase::close):
Do not disconnect if we have pending data which have not been sent yet.
In this case, the actual disconnection will happen in sendPendingData().
(WebCore::SocketStreamHandleBase::disconnect):
Renamed from close(). Disconnect the connection immediately.
(WebCore::SocketStreamHandleBase::sendPendingData):
* platform/network/SocketStreamHandleBase.h:
* websockets/ThreadableWebSocketChannelClientWrapper.cpp:
Add didStartClosingHandshake(). Add a function argument (ClosingHandshakeCompletionStatus)
to didClose().
(WebCore::ThreadableWebSocketChannelClientWrapper::didStartClosingHandshake):
(WebCore::ThreadableWebSocketChannelClientWrapper::didClose):
(WebCore::ThreadableWebSocketChannelClientWrapper::didStartClosingHandshakeCallback):
(WebCore::ThreadableWebSocketChannelClientWrapper::didCloseCallback):
* websockets/ThreadableWebSocketChannelClientWrapper.h:
* websockets/WebSocket.cpp:
(WebCore::WebSocket::send):
(WebCore::WebSocket::close):
Fail if close() is attempted before the connection is established.
Otherwise, set the state to CLOSING and start the closing handshake.
(WebCore::WebSocket::bufferedAmount):
If the state is CLOSING, we need to consider buffered data in m_channel and sent after close().
(WebCore::WebSocket::didConnect):
(WebCore::WebSocket::didReceiveMessage):
We need to invoke message event in CLOSING state as well as OPEN state.
(WebCore::WebSocket::didReceiveMessageError):
(WebCore::WebSocket::didStartClosingHandshake):
(WebCore::WebSocket::didClose):
* websockets/WebSocket.h:
* websockets/WebSocketChannel.cpp:
(WebCore::WebSocketChannel::WebSocketChannel):
(WebCore::WebSocketChannel::close):
Start the closing handshake.
(WebCore::WebSocketChannel::disconnect):
Disconnect the socket stream, instead of close.
(WebCore::WebSocketChannel::didClose):
(WebCore::WebSocketChannel::didReceiveData): Ditto.
(WebCore::WebSocketChannel::didFail): Ditto.
(WebCore::WebSocketChannel::processBuffer):
Ditto.
Handle 0xFF 0x00 byte sequence, and discard received data once the closing handshake has started.
(WebCore::WebSocketChannel::startClosingHandshake):
Send 0xFF 0x00 byte sequence.
(WebCore::WebSocketChannel::closingTimerFired):
Disconnect the socket stream if the closing handshake has timed out.
* websockets/WebSocketChannel.h:
m_closing is true if "the WebSocket closing handshake has started" (as stated in the protocol
specification).
* websockets/WebSocketChannelClient.h:
(WebCore::WebSocketChannelClient::didStartClosingHandshake): Added.
(WebCore::WebSocketChannelClient::didClose): Add closingHandshakeCompletion parameter.
* websockets/WorkerThreadableWebSocketChannel.cpp:
Add closingHandshakeCompletion parameter to didClose(), and add didStartClosingHandshake().
(WebCore::WorkerThreadableWebSocketChannel::Peer::close):
(WebCore::workerContextDidStartClosingHandshake):
(WebCore::WorkerThreadableWebSocketChannel::Peer::didStartClosingHandshake):
(WebCore::workerContextDidClose):
(WebCore::WorkerThreadableWebSocketChannel::Peer::didClose):
* websockets/WorkerThreadableWebSocketChannel.h:
2011-05-26 David Levin <levin@chromium.org>
Reviewed by Dmitry Titov.
WebKit's font notification has problems when the WebKit main thread != UI thread.
https://bugs.webkit.org/show_bug.cgi?id=61391
This doesn't happen in DumpRenderTree, so it needs a unit test which is taking me
some time to write correctly. In the meantime, this issues happens to be causing
some crashes in Chrome so here's the fix alone for the time being.
* platform/graphics/mac/FontCacheMac.mm:
(WebCore::invalidateFontCache): Ensure that FontCache::invalidate is only called on WebKit's main thread.
(WebCore::fontCacheRegisteredFontsChangedNotificationCallback): Call common function for font cache invalidation.
Note that the call to fontCache() is fine since the singleton is initialized well before calling this function. Theoretically,
there could be a problem due to a lack of a memory barrier but that is highly unlikely and this is debug only code.
(WebCore::fontCacheATSNotificationCallback): Ditto.
2011-05-26 Stephanie Lewis <slewis@apple.com>
Reviewed by Geoff Garen.
https://bugs.webkit.org/show_bug.cgi?id=61345
part of <rdar://problem/8675177>
Roll back in now that the Crashes are fixed. ResourceResponseBase and ResourceResponse had two different definitions
for m_isNull. ResourceResponse treats m_isNull as meaning there isn't any platform ResourceResponse.
ResourceResponseBase treats m_isNull as meaning no fields have been initialized. Consolidate calls into ResourceResponseBase meaning.
Don't initialize ResourceResponse.m_suggestedFilename until we want to use it. Initializing it requires reading in and parsing a plist.
Add new initialization state CommonAndUncommonFields to ResourceResponse. This will be for all the header fields.
Move suggestedFilename initialization to AllFields so it is never initialized unless we ask for it.
Add "Content-Type" to common headers since it is looked for by every CSS sheet load.
No new functionality so no new tests.
* platform/network/ResourceResponseBase.cpp:
(WebCore::ResourceResponseBase::adopt):
(WebCore::ResourceResponseBase::suggestedFilename):
(WebCore::ResourceResponseBase::setSuggestedFilename):
(WebCore::ResourceResponseBase::httpStatusText):
(WebCore::ResourceResponseBase::setHTTPStatusText):
(WebCore::ResourceResponseBase::httpHeaderField):
(WebCore::ResourceResponseBase::setHTTPHeaderField):
(WebCore::ResourceResponseBase::httpHeaderFields):
(WebCore::ResourceResponseBase::isAttachment):
(WebCore::ResourceResponseBase::setLastModifiedDate):
(WebCore::ResourceResponseBase::lastModifiedDate):
(WebCore::ResourceResponseBase::wasCached):
(WebCore::ResourceResponseBase::connectionReused):
(WebCore::ResourceResponseBase::setConnectionReused):
(WebCore::ResourceResponseBase::connectionID):
(WebCore::ResourceResponseBase::setConnectionID):
(WebCore::ResourceResponseBase::resourceLoadTiming):
(WebCore::ResourceResponseBase::setResourceLoadTiming):
(WebCore::ResourceResponseBase::resourceLoadInfo):
(WebCore::ResourceResponseBase::setResourceLoadInfo):
* platform/network/ResourceResponseBase.h:
* platform/network/cf/ResourceResponse.h:
(WebCore::ResourceResponse::ResourceResponse):
* platform/network/cf/ResourceResponseCFNet.cpp:
(WebCore::ResourceResponse::platformLazyInit):
* platform/network/mac/ResourceResponseMac.mm:
2011-05-26 James Kozianski <koz@chromium.org>
Reviewed by Eric Seidel.
Implement a whitelist for registerProtocolHandler
https://bugs.webkit.org/show_bug.cgi?id=60322
* page/Navigator.cpp:
(WebCore::initProtocolHandlerWhitelist):
(WebCore::isProtocolWhitelisted):
(WebCore::verifyProtocolHandlerScheme):
2011-05-26 Annie Sullivan <sullivan@chromium.org>
Reviewed by Ryosuke Niwa.
[debug feature] CSSStyleDeclaration should have a way to print cssText
https://bugs.webkit.org/show_bug.cgi?id=61570
Adds a method to print the cssText to stderr for debugging.
* css/CSSStyleDeclaration.cpp:
(WebCore::CSSStyleDeclaration::showStyle): New method to print cssText to stderr
* css/CSSStyleDeclaration.h: New method declaration
2011-05-26 Syed Idris Shah <syed.idris-shah@nokia.com>
Reviewed by Andreas Kling.
[Qt] fast/canvas/webgl/gl-uniform-arrays.html failing for Qt on Linux
https://bugs.webkit.org/show_bug.cgi?id=60377
LayoutTests/fast/canvas/webgl/gl-uniform-arrays.html
For an array of active uniform, we should be careful while truncating the name of the uniform.
Currently we are truncating the last three characters of an array with out checking for [0].
As a result we are truncating the the actual name of the active uniforms i.e. color to co.
* html/canvas/WebGLRenderingContext.cpp:
(WebCore::WebGLRenderingContext::getUniform): Strip "[0]" from the name if it's an array and is part of the name.
2011-05-26 Sheriff Bot <webkit.review.bot@gmail.com>
Unreviewed, rolling out r87444.
http://trac.webkit.org/changeset/87444
https://bugs.webkit.org/show_bug.cgi?id=61582
Layout test regressions in Chromium/WebKit: fast/css/first-
letter-text-fragment-crash.html, fast/css/first-letter-
visibility.html (Requested by aklein on #webkit).
* page/Chrome.cpp:
* page/Chrome.h:
* page/ChromeClient.h:
* page/FrameView.cpp:
(WebCore::FrameView::setContentsSize):
* page/FrameView.h:
2011-05-26 David Levin <levin@chromium.org>
Reviewed by Darin Fisher.
Need a callback for when the preferred rendered size changed.
https://bugs.webkit.org/show_bug.cgi?id=61309
No new tests needed since no new functionality is exposed.
* page/Chrome.cpp:
(WebCore::Chrome::contentsPreferredSizeChanged): Plumbed through the call.
* page/Chrome.h: Added the new method.
* page/ChromeClient.h: Ditto.
* page/FrameView.cpp:
(WebCore::FrameView::setContentsSize): Added calculations for the preferred size
and the call to contentsPreferredSizeChanged.
2011-05-25 Levi Weintraub <leviw@chromium.org>
Reviewed by Eric Seidel.
Switch controlClipRect to use IntPoint
https://bugs.webkit.org/show_bug.cgi?id=60806
Switching controlClipRect to take an IntPoint representing the
offset to be added instead of a pair of ints.
No new tests as this is just refactoring.
* WebCore.xcodeproj/project.pbxproj:
* rendering/RenderBlock.cpp:
(WebCore::RenderBlock::nodeAtPoint):
* rendering/RenderBox.cpp:
(WebCore::RenderBox::pushContentsClip):
* rendering/RenderBox.h:
(WebCore::RenderBox::controlClipRect):
* rendering/RenderButton.cpp:
(WebCore::RenderButton::controlClipRect):
* rendering/RenderButton.h:
* rendering/RenderListBox.cpp:
(WebCore::RenderListBox::paintItemBackground):
(WebCore::RenderListBox::controlClipRect):
* rendering/RenderListBox.h:
* rendering/RenderMenuList.cpp:
(WebCore::RenderMenuList::controlClipRect):
* rendering/RenderMenuList.h:
* rendering/RenderTextControlSingleLine.cpp:
(WebCore::RenderTextControlSingleLine::controlClipRect):
* rendering/RenderTextControlSingleLine.h:
2011-05-25 Levi Weintraub <leviw@chromium.org>
Reviewed by Eric Seidel.
Switch controlClipRect to use IntPoint
https://bugs.webkit.org/show_bug.cgi?id=60806
Switching controlClipRect to take an IntPoint representing the
offset to be added instead of a pair of ints.
No new tests as this is just refactoring.
* WebCore.xcodeproj/project.pbxproj:
* rendering/RenderBlock.cpp:
(WebCore::RenderBlock::nodeAtPoint):
* rendering/RenderBox.cpp:
(WebCore::RenderBox::pushContentsClip):
* rendering/RenderBox.h:
(WebCore::RenderBox::controlClipRect):
* rendering/RenderButton.cpp:
(WebCore::RenderButton::controlClipRect):
* rendering/RenderButton.h:
* rendering/RenderListBox.cpp:
(WebCore::RenderListBox::paintItemBackground):
(WebCore::RenderListBox::controlClipRect):
* rendering/RenderListBox.h:
* rendering/RenderMenuList.cpp:
(WebCore::RenderMenuList::controlClipRect):
* rendering/RenderMenuList.h:
* rendering/RenderTextControlSingleLine.cpp:
(WebCore::RenderTextControlSingleLine::controlClipRect):
* rendering/RenderTextControlSingleLine.h:
2011-05-26 Jeff Miller <jeffm@apple.com>
Reviewed by Steve Falkenburg.
Fullscreen content is sometimes obscured by taskbar (which even covers up the "exit fullscreen" button)
https://bugs.webkit.org/show_bug.cgi?id=61569
<rdar://problem/9454315>
Normally, when the background fullscreen window is animated in, the Windows taskbar will be hidden, but this doesn't always work for some reason.
Workaround this issue by setting the real fullscreen window to be a topmost window.
* platform/graphics/win/FullScreenController.cpp:
(FullScreenController::Private::fullscreenClientWndProc): Exit fullscreen when m_fullScreenWindow is deactivated.
(FullScreenController::enterFullScreenRepaintCompleted): Make m_fullScreenWindow a topmost window before animating it in to ensure the taskbar is hidden.
2011-05-26 James Robinson <jamesr@chromium.org>
Reviewed by Darin Fisher.
[skia] Add area check to ImageBufferData::getImageData
https://bugs.webkit.org/show_bug.cgi?id=61375
No change in behavior, just a sanity check.
* platform/graphics/skia/ImageBufferSkia.cpp:
(WebCore::getImageData):
2011-05-26 Levi Weintraub <leviw@chromium.org>
Reviewed by Eric Seidel.
Switch positionOverflowControls to IntSize
https://bugs.webkit.org/show_bug.cgi?id=61493
Switching positionOverflowControls to take a layerOffset IntSize
as opposed to a pair of ints.
No new tests since this is just refactoring.
* rendering/RenderLayer.cpp:
(WebCore::RenderLayer::updateLayerPositions):
(WebCore::RenderLayer::positionOverflowControls):
(WebCore::RenderLayer::paintOverflowControls):
* rendering/RenderLayer.h:
2011-05-26 Sheriff Bot <webkit.review.bot@gmail.com>
Unreviewed, rolling out r87368.
http://trac.webkit.org/changeset/87368
https://bugs.webkit.org/show_bug.cgi?id=61564
Wrong approach, will do the wrong thing if the element needs
simplified normal flow layout but is not positioned (Requested
by jamesr on #webkit).
* rendering/RenderObject.h:
(WebCore::RenderObject::needsPositionedMovementLayout):
2011-05-02 Robert Hogan <robert@webkit.org>
Reviewed by Adam Roben.
[Qt] Allow popup windows from plugins when initiated by a user gesture
https://bugs.webkit.org/show_bug.cgi?id=41292
If the event is from a user gesture and the plugin doesn't support
NPN_PushPopupsEnabledState() and NPN_PopPopupsEnabledState(), allow popups.
* plugins/qt/PluginViewQt.cpp:
(WebCore::PluginView::dispatchNPEvent):
2011-05-26 Leandro Gracia Gil <leandrogracia@chromium.org>
Reviewed by Dmitry Titov.
[V8] Add missing compile guards for WebWorkers in WebCore.
https://bugs.webkit.org/show_bug.cgi?id=61535
No new tests - refactoring only.
* bindings/v8/V8AbstractEventListener.cpp:
(WebCore::V8AbstractEventListener::invokeEventHandler):
* bindings/v8/V8DOMWrapper.cpp:
(WebCore::V8DOMWrapper::instantiateV8Object):
2011-05-26 Mihai Parparita <mihaip@chromium.org>
Reviewed by Adam Barth.
Support cross-origin XMLHttpRequest in isolated worlds
https://bugs.webkit.org/show_bug.cgi?id=59843
Allows isolated worlds to be associated with a different SecurityOrigin
(exposed as a setIsolatedWorldSecurityOrigin function in
ScriptController).
The XMLHttpRequest constructor can then check that it's being
instantiated in an isolated world and use its security origin.
XMLHttpRequest, ThreadableLoader and DocumentThreadableLoader had to be
changed to use the copied SecurityOrigin instead of always grabbing the
Document's.
Test: http/tests/security/isolatedWorld/cross-origin-xhr.html
* bindings/v8/ScriptController.cpp:
(WebCore::ScriptController::setIsolatedWorldSecurityOrigin):
* bindings/v8/ScriptController.h:
* bindings/v8/V8IsolatedContext.cpp:
(WebCore::V8IsolatedContext::setSecurityOrigin):
* bindings/v8/V8IsolatedContext.h:
(WebCore::V8IsolatedContext::securityOrigin):
* bindings/v8/V8Proxy.cpp:
(WebCore::V8Proxy::evaluateInIsolatedWorld):
(WebCore::V8Proxy::setIsolatedWorldSecurityOrigin):
(WebCore::V8Proxy::resetIsolatedWorlds):
* bindings/v8/V8Proxy.h:
* bindings/v8/custom/V8XMLHttpRequestConstructor.cpp:
(WebCore::V8XMLHttpRequest::constructorCallback):
* loader/DocumentThreadableLoader.cpp:
(WebCore::DocumentThreadableLoader::DocumentThreadableLoader):
(WebCore::DocumentThreadableLoader::makeCrossOriginAccessRequestWithPreflight):
(WebCore::DocumentThreadableLoader::didReceiveResponse):
(WebCore::DocumentThreadableLoader::preflightSuccess):
(WebCore::DocumentThreadableLoader::isAllowedRedirect):
(WebCore::DocumentThreadableLoader::securityOrigin):
* loader/DocumentThreadableLoader.h:
* loader/ThreadableLoader.h:
* xml/XMLHttpRequest.cpp:
(WebCore::XMLHttpRequest::create):
(WebCore::XMLHttpRequest::XMLHttpRequest):
(WebCore::XMLHttpRequest::securityOrigin):
(WebCore::XMLHttpRequest::responseXML):
(WebCore::XMLHttpRequest::createRequest):
(WebCore::XMLHttpRequest::setRequestHeader):
(WebCore::XMLHttpRequest::getAllResponseHeaders):
(WebCore::XMLHttpRequest::getResponseHeader):
* xml/XMLHttpRequest.h:
2011-05-26 Michael Nordman <michaeln@google.com>
Reviewed by Darin Fisher.
[Chromium] Use SecurityOrigin produced databaseIdentifier strings, instead of
SecurityOrigin RefPtrs, as the top level key into the DatabaseTracker's
collection of open databases. Otherwise we can fail to lookup databases when
trying to forceably close them via WebDatabase::closeDatabaseImmediately.
https://bugs.webkit.org/show_bug.cgi?id=61417
New new functionality, no tests.
* storage/DatabaseTracker.h:
* storage/chromium/DatabaseTrackerChromium.cpp:
(WebCore::DatabaseTracker::addOpenDatabase):
(WebCore::DatabaseTracker::removeOpenDatabase):
(WebCore::DatabaseTracker::getOpenDatabases):
(WebCore::DatabaseTracker::interruptAllDatabasesForContext):
2011-05-25 Jer Noble <jer.noble@apple.com>
Reviewed by Maciej Stachowiak.
Safari Web Content crashes while entering/exiting the full screen mode of the video content
https://bugs.webkit.org/show_bug.cgi?id=61498
No new tests, as DRT does not currently animate the full screen transition.
To guard against m_fullScreenRenderer being called after it has been deleted, add
code in RenderFullScreen which notifies the document when its full-screen renderer
will be destroyed.
Also, add some sanity checks when accessing the full-screen renderer's layer backing.
* dom/Document.cpp:
(WebCore::Document::webkitWillEnterFullScreenForElement): Guard against a missing
full-screen renderer layer.
(WebCore::Document::webkitWillExitFullScreenForElement): Ditto.
(WebCore::Document::setFullScreenRenderer): Added ASSERT.
(WebCore::Document::fullScreenRendererDestroyed): Added.
(WebCore::Document::setAnimatingFullScreen): Guard against the full-screen
element having been removed from the document.
* dom/Document.h:
* rendering/RenderFullScreen.cpp:
(RenderFullScreen::destroy): Added. Tell the Document that it's full-screen
renderer is about to be destroyed.
* rendering/RenderFullScreen.h:
2011-05-26 Andreas Kling <kling@webkit.org>
Reviewed by Geoffrey Garen.
Overload resolution in generated JSC bindings could be more efficient.
https://bugs.webkit.org/show_bug.cgi?id=61544
Only fetch the arguments once, and not until they are needed (less work
in the case of an early return.)
* bindings/scripts/CodeGeneratorJS.pm:
* bindings/scripts/test/JS/JSTestObj.cpp: Rebaselined.
(WebCore::jsTestObjPrototypeFunctionOverloadedMethod):
2011-05-26 Adrienne Walker <enne@google.com>
Reviewed by James Robinson.
[chromium] Be robust to empty viewports in the compositor
https://bugs.webkit.org/show_bug.cgi?id=61545
It's possible for a frame to be requested to be drawn before it is
non-empty. The compositor should be robust to that possibility. The
changes in LayerTilerChromium are the only required changes to handle
this, but having an early out in LayerRendererChromium seemed like a
good sanity check.
* platform/graphics/chromium/LayerRendererChromium.cpp:
(WebCore::LayerRendererChromium::updateAndDrawLayers):
(WebCore::LayerRendererChromium::drawLayers):
* platform/graphics/chromium/LayerTilerChromium.cpp:
(WebCore::LayerTilerChromium::prepareToUpdate):
(WebCore::LayerTilerChromium::updateRect):
(WebCore::LayerTilerChromium::draw):
2011-05-26 Emil A Eklund <eae@chromium.org>
Reviewed by Eric Seidel.
Change RenderObject to use FloatPoint::scale and FloatQuad::scale
https://bugs.webkit.org/show_bug.cgi?id=61497
Covered by existing test.
* platform/graphics/FloatQuad.h:
(WebCore::FloatQuad::scale):
* rendering/RenderObject.h:
(WebCore::adjustFloatQuadForAbsoluteZoom):
(WebCore::adjustFloatRectForAbsoluteZoom):
(WebCore::adjustFloatQuadForPageScale):
(WebCore::adjustFloatRectForPageScale):
2011-05-26 Alexis Menard <alexis.menard@openbossa.org>
Unreviewed build fix for Qt and QuickTime backend.
r87328 added a new system interface, we need to add it too.
* platform/qt/WebCoreSystemInterface.h:
* platform/qt/WebCoreSystemInterface.mm:
2011-05-26 Andrey Kosyakov <caseq@chromium.org>
Unreviewed follow-up to r87395, added checks to avoid accessing undefined member for certain timeline events.
* inspector/front-end/TimelinePanel.js:
(WebInspector.TimelinePanel.prototype._innerAddRecordToTimeline):
(WebInspector.TimelinePanel.FormattedRecord):
2011-05-25 Ryosuke Niwa <rniwa@webkit.org>
Reviewed by Enrica Casucci.
WebKit duplicates styles from css rules on copy and paste
https://bugs.webkit.org/show_bug.cgi?id=61466
Fixed the bug by removing duplicate properties from inline style declarations in ReplaceSelectionCommand.
Also moved the code to obtain style from rules from markup.cpp to EditingStyle.cpp to share code.
Test: editing/pasteboard/style-from-rules.html
* editing/EditingStyle.cpp:
(WebCore::EditingStyle::EditingStyle): Added a null check.
(WebCore::EditingStyle::extractFontSizeDelta): Ditto.
(WebCore::styleFromMatchedRulesForElement): Moved from markup.cpp.
(WebCore::EditingStyle::mergeStyleFromRules): Extracted from StyledMarkupAccumulator::appendElement.
(WebCore::EditingStyle::mergeStyleFromRulesForSerialization): Ditto.
(WebCore::EditingStyle::removeStyleFromRules): Added.
* editing/EditingStyle.h:
* editing/ReplaceSelectionCommand.cpp:
(WebCore::ReplaceSelectionCommand::removeRedundantStylesAndKeepStyleSpanInline): Renamed from
negateStyleRulesThatAffectAppearance; Calls removeStyleFromRules.
* editing/markup.cpp:
(WebCore::StyledMarkupAccumulator::appendElement): Calls mergeStyleFromRulesForSerialization.
(WebCore::styleFromMatchedRulesAndInlineDecl): Calls mergeStyleFromRules; changed the return type
from CSSMutableStyleDeclaration to EditingStyle.
(WebCore::isElementPresentational): Calls styleFromMatchedRulesAndInlineDecl.
(WebCore::shouldIncludeWrapperForFullySelectedRoot): Ditto.
(WebCore::highestAncestorToWrapMarkup): Calls shouldIncludeWrapperForFullySelectedRoot.
(WebCore::createMarkup): Calls styleFromMatchedRulesAndInlineDecl.
2011-05-26 Michael Schneider <michschn@google.com>
Reviewed by Pavel Feldman.
WebInspector: Added API to access the timeline data in a inspector extension.
https://bugs.webkit.org/show_bug.cgi?id=61098
* WebCore.gypi:
* WebCore.vcproj/WebCore.vcproj:
* inspector/front-end/ExtensionAPI.js:
(WebInspector.injectedExtensionAPI.InspectorExtensionAPI):
(WebInspector.injectedExtensionAPI):
* inspector/front-end/ExtensionServer.js:
(WebInspector.ExtensionServer):
(WebInspector.ExtensionServer.prototype._addRecordToTimeline):
(WebInspector.ExtensionServer.prototype._onSubscribe):
(WebInspector.ExtensionServer.prototype._onUnsubscribe):
(WebInspector.ExtensionServer.prototype._registerHandler):
(WebInspector.ExtensionServer.prototype._registerSubscriptionHandler):
* inspector/front-end/TimelineManager.js: Added.
(WebInspector.TimelineManager):
(WebInspector.TimelineManager.prototype.start):
(WebInspector.TimelineManager.prototype.stop):
(WebInspector.TimelineDispatcher):
(WebInspector.TimelineDispatcher.prototype.started):
(WebInspector.TimelineDispatcher.prototype.stopped):
(WebInspector.TimelineDispatcher.prototype.eventRecorded):
* inspector/front-end/TimelinePanel.js:
(WebInspector.TimelinePanel):
(WebInspector.TimelinePanel.prototype._toggleTimelineButtonClicked):
(WebInspector.TimelinePanel.prototype._onTimelineEventRecorded):
* inspector/front-end/WebKit.qrc:
* inspector/front-end/inspector.html:
2011-05-26 Andrey Kosyakov <caseq@chromium.org>
Reviewed by Yury Semikhatsky.
Web Inspector: TimelinePanel should not modify input timeline data when processing timeline event
https://bugs.webkit.org/show_bug.cgi?id=61529
Do not modify input timeline data when processing timeline event.
* inspector/front-end/TimelinePanel.js:
(WebInspector.TimelinePanel.prototype._addRecordToTimeline):
(WebInspector.TimelinePanel.prototype._innerAddRecordToTimeline):
(WebInspector.TimelinePanel.FormattedRecord):
(WebInspector.TimelinePanel.FormattedRecord.prototype._generatePopupContent):
(WebInspector.TimelinePanel.FormattedRecord.prototype._refreshDetails):
(WebInspector.TimelinePanel.FormattedRecord.prototype._getRecordDetails):
2011-05-26 Rob Buis <rbuis@rim.com>
Reviewed by Dirk Schulze.
Dynamically created <animate> elements do not animate upon document insertion as they should
https://bugs.webkit.org/show_bug.cgi?id=20028
Tests: svg/animations/animate-insert-begin.html
svg/animations/animate-insert-no-begin.html
Move animation initializing and rescheduling to insertedIntoDocument. This way animate elements
dynamicaly inserted into the document using js start as well.
* svg/animation/SVGSMILElement.cpp:
(WebCore::SVGSMILElement::insertedIntoDocument):
* svg/animation/SVGSMILElement.h:
2011-05-26 Andreas Kling <kling@webkit.org>
Reviewed by Benjamin Poulain.
JSC DOM bindings: ExecState::argumentCount() is size_t, not int.
https://bugs.webkit.org/show_bug.cgi?id=61530
* bindings/scripts/CodeGeneratorJS.pm:
* bindings/scripts/test/JS/JSTestObj.cpp:
(WebCore::jsTestObjPrototypeFunctionOptionsObject):
(WebCore::jsTestObjPrototypeFunctionWithDynamicFrameAndOptionalArg):
(WebCore::jsTestObjPrototypeFunctionWithDynamicFrameAndUserGestureASAD):
(WebCore::jsTestObjPrototypeFunctionMethodWithOptionalArg):
(WebCore::jsTestObjPrototypeFunctionMethodWithNonOptionalArgAndOptionalArg):
(WebCore::jsTestObjPrototypeFunctionMethodWithNonOptionalArgAndTwoOptionalArgs):
(WebCore::jsTestObjPrototypeFunctionOverloadedMethod2):
(WebCore::jsTestObjPrototypeFunctionClassMethodWithOptional):
2011-05-26 Simon Fraser <simon.fraser@apple.com>
Reviewed by Adam Roben.
Some repeating linear gradients look wrong
https://bugs.webkit.org/show_bug.cgi?id=61371
Test: fast/gradients/css3-repeating-linear-gradients2.html
Fix incorrect stop duplication code when filling forwards a repeating
gradient. The "if (srcStopOrdinal < originalNumStops - 1)" test was wrong
because srcStopOrdinal had been adjusted for stops added by start-filling,
but originalNumStops had not. Fix by considering srcStopOrdinal as an index
into the original stops, so comparing it with originalNumStops remains valid.
* css/CSSGradientValue.cpp:
(WebCore::CSSGradientValue::addStops):
2011-05-26 Vsevolod Vlasov <vsevik@chromium.org>
Reviewed by Yury Semikhatsky.
Web Inspector: In network panel, show transfer size in a first line of resource row.
https://bugs.webkit.org/show_bug.cgi?id=61354
* English.lproj/localizedStrings.js:
* inspector/front-end/NetworkPanel.js:
(WebInspector.NetworkPanel.prototype._createTable):
(WebInspector.NetworkDataGridNode.prototype._refreshSizeCell):
2011-05-25 Simon Fraser <simon.fraser@apple.com>
Reviewed by Dan Bernstein.
Always antialias borders, outlines and rules when scaling
https://bugs.webkit.org/show_bug.cgi?id=61502
r84273 changed the behavior of drawLineForBoxSide() to never antialias by default.
This actually disabled antialiasing in some circumstances where it used to be enabled,
for example collapsed table border drawing.
Fix by allowing antialiasing for collapsed table borders, column rules and span
outlines when the context is scaled.
Test: fast/borders/border-antialiasing.html
* rendering/RenderBlock.cpp:
(WebCore::RenderBlock::paintColumnRules):
* rendering/RenderInline.cpp:
(WebCore::RenderInline::paintOutline):
(WebCore::RenderInline::paintOutlineForLine):
* rendering/RenderTableCell.cpp:
(WebCore::RenderTableCell::paintCollapsedBorder):
2011-05-26 Vsevolod Vlasov <vsevik@chromium.org>
Reviewed by Yury Semikhatsky.
Web Inspector: Use different SourceFrame instances for ResourcesPanel and NetworkPanel
https://bugs.webkit.org/show_bug.cgi?id=59193
* inspector/front-end/NetworkItemView.js:
(WebInspector.NetworkItemView):
(WebInspector.NetworkItemView._contentViewForResource):
* inspector/front-end/NetworkPanel.js:
(WebInspector.NetworkPanel.prototype._refreshResource):
* inspector/front-end/Resource.js:
(WebInspector.Resource.prototype.get messages):
(WebInspector.Resource.prototype.addMessage):
(WebInspector.Resource.prototype.set errors):
(WebInspector.Resource.prototype.set warnings):
(WebInspector.Resource.prototype.clearErrorsAndWarnings):
* inspector/front-end/ResourceTreeModel.js:
(WebInspector.ResourceTreeModel.prototype._consoleMessageAdded):
* inspector/front-end/ResourceView.js:
(WebInspector.ResourceView.hasTextContent):
(WebInspector.ResourceView.nonSourceViewForResource):
(WebInspector.ResourceSourceFrame):
(WebInspector.ResourceSourceFrame.mimeTypeForResource):
(WebInspector.ResourceSourceFrame.prototype.requestContent):
(WebInspector.ResourceSourceFrame.prototype.suggestedFileName):
(WebInspector.EditableResourceSourceFrame):
(WebInspector.EditableResourceSourceFrame.prototype.doubleClick):
(WebInspector.EditableResourceSourceFrame.prototype.editContent):
(WebInspector.EditableResourceSourceFrame.prototype.cancelEditing):
(WebInspector.EditableResourceSourceFrame.prototype.afterTextChanged):
(WebInspector.EditableResourceSourceFrame.prototype._clearIncrementalUpdateTimer):
(WebInspector.ResourceRevisionSourceFrame):
(WebInspector.ResourceRevisionSourceFrame.prototype.requestContent):
* inspector/front-end/ResourcesPanel.js:
(WebInspector.ResourcesPanel.prototype.showResource):
(WebInspector.ResourcesPanel.prototype._showResourceView):
(WebInspector.ResourcesPanel.prototype._resourceViewForResource):
(WebInspector.ResourcesPanel.prototype._showRevisionView):
(WebInspector.ResourcesPanel.prototype._sourceViewForRevision):
(WebInspector.ResourcesPanel.prototype.searchCanceled):
(WebInspector.ResourcesPanel.prototype._findTreeElementForRevision):
(WebInspector.ResourcesPanel.prototype._findTreeElementForRevision.getParent):
(WebInspector.FrameResourceTreeElement):
(WebInspector.FrameResourceTreeElement.prototype.onattach):
(WebInspector.FrameResourceTreeElement.prototype._updateErrorsAndWarningsBubbles):
(WebInspector.FrameResourceTreeElement.prototype._errorsWarningsCleared):
(WebInspector.FrameResourceTreeElement.prototype._errorsWarningsMessageAdded):
(WebInspector.FrameResourceTreeElement.prototype._appendRevision):
(WebInspector.FrameResourceTreeElement.prototype.sourceView):
(WebInspector.FrameResourceTreeElement.prototype._createSourceView):
(WebInspector.FrameResourceTreeElement.prototype._recreateSourceView):
(WebInspector.ResourceRevisionTreeElement):
(WebInspector.ResourceRevisionTreeElement.prototype._handleContextMenuEvent):
(WebInspector.ResourceRevisionTreeElement.prototype.sourceView):
2011-05-26 Andreas Kling <kling@webkit.org>
Reviewed by Darin Adler.
JSC DOM bindings: Use isUndefinedOrNull() instead of (isNull() || isUndefined()).
https://bugs.webkit.org/show_bug.cgi?id=61472
* bindings/scripts/CodeGeneratorJS.pm:
* bindings/scripts/test/JS/JSTestObj.cpp: Rebaselined.
(WebCore::jsTestObjPrototypeFunctionMethodWithCallbackAndOptionalArg):
(WebCore::jsTestObjPrototypeFunctionOverloadedMethod):
2011-05-26 Keishi Hattori <keishi@webkit.org>
Reviewed by Kent Tamura.
Add <input type=color> appearance.
https://bugs.webkit.org/show_bug.cgi?id=61275
Test: fast/forms/color/input-appearance-color.html
* css/html.css:
(input[type="color"]): Adds square-button appearance.
(input[type="color"]::-webkit-color-swatch-wrapper):
(input[type="color"]::-webkit-color-swatch):
(input[type="color"][list]): Adds menulist appearance.
(input[type="color"][list]::-webkit-color-swatch-wrapper):
(input[type="color"][list]::-webkit-color-swatch):
* html/ColorInputType.cpp:
(WebCore::ColorInputType::createShadowSubtree): Creates -webkit-color-swatch inside -webkit-color-swatch-wrapper.
(WebCore::ColorInputType::updateColorSwatch): Updates background color of shadowColorSwatch.
(WebCore::ColorInputType::valueChanged): Calls updateColorSwatch.
(WebCore::ColorInputType::shadowColorSwatch): Gets shadowColorSwatch element.
* html/ColorInputType.h:
(WebCore::ColorInputType::ColorInputType): Changed to inherit InputType.
2011-05-26 Kent Tamura <tkent@chromium.org>
Reviewed by Dimitri Glazkov.
Fix a bug that <input type="number"> dispatches two blurs when tabbing
from an invalid number
https://bugs.webkit.org/show_bug.cgi?id=59071
NumberInputType::handleBlurEvent() dispatched an extra focus event
and an extra blur event because
SelectionController::textWillBeReplaced() called by
RenderTextControlSingleLine::updateFromElement() focuses a node
with the selection.
In order to avoid this problem,
- Introduce Node::willBlur()
It is called before any state changes by a blur event.
- Call RenderTextControlSingleLine::updateFromElement() in willBlur()
It avoids extra focus/blur events because Document::m_focusedNode is
still the number input during willBlur().
Test: fast/forms/input-number-blur-twice.html
* dom/Document.cpp:
(WebCore::Document::setFocusedNode): Calls Node::beforeBlueEvent().
* dom/Node.cpp:
(WebCore::Node::willBlur):
Default empty implementation of willBlur().
* dom/Node.h: Declare willBlur().
* html/HTMLInputElement.cpp:
(WebCore::HTMLInputElement::willBlur):
Added. It just calls InputType::willBlur().
(WebCore::HTMLInputElement::handleBlurEvent):
Removed InputType::handleBlurEvent() call.
* html/HTMLInputElement.h: Declare willBlur().
* html/InputType.cpp:
(WebCore::InputType::willBlur): Default empty implementation.
(WebCore::InputType::handleBlurEvent): Removed.
* html/InputType.h: Declare willBlur(), remove handleBlurEvent().
* html/NumberInputType.cpp:
(WebCore::NumberInputType::willBlur):
Move the code in handleBlurEvent() here.
* html/NumberInputType.h: Declare willBlur().
2011-05-25 Hans Wennborg <hans@chromium.org>
Reviewed by Steve Block.
IndexedDB: Support LevelDB transactions.
https://bugs.webkit.org/show_bug.cgi?id=61270
Introduce LevelDBTransaction, which implements in-memory transaction
support on top of LevelDB, and hook this up for IndexedDB to use.
This is all covered by existing tests.
* CMakeLists.txt:
* GNUmakefile.list.am:
* WebCore.gypi:
* WebCore.pro:
* WebCore.xcodeproj/project.pbxproj:
* platform/leveldb/LevelDBDatabase.cpp:
(WebCore::LevelDBDatabase::open):
(WebCore::LevelDBDatabase::put):
(WebCore::LevelDBDatabase::remove):
(WebCore::LevelDBDatabase::write):
(WebCore::IteratorImpl::IteratorImpl):
(WebCore::IteratorImpl::isValid):
(WebCore::IteratorImpl::seekToLast):
(WebCore::IteratorImpl::seek):
(WebCore::IteratorImpl::next):
(WebCore::IteratorImpl::prev):
(WebCore::IteratorImpl::key):
(WebCore::IteratorImpl::value):
(WebCore::LevelDBDatabase::createIterator):
(WebCore::LevelDBDatabase::comparator):
* platform/leveldb/LevelDBDatabase.h:
* platform/leveldb/LevelDBIterator.h:
(WebCore::LevelDBIterator::~LevelDBIterator):
* platform/leveldb/LevelDBTransaction.cpp: Added.
(WebCore::LevelDBTransaction::create):
(WebCore::LevelDBTransaction::LevelDBTransaction):
(WebCore::LevelDBTransaction::clearTree):
(WebCore::LevelDBTransaction::~LevelDBTransaction):
(WebCore::makeVector):
(WebCore::LevelDBTransaction::set):
(WebCore::LevelDBTransaction::put):
(WebCore::LevelDBTransaction::remove):
(WebCore::LevelDBTransaction::get):
(WebCore::LevelDBTransaction::commit):
(WebCore::LevelDBTransaction::rollback):
(WebCore::LevelDBTransaction::createIterator):
(WebCore::LevelDBTransaction::TreeIterator::create):
(WebCore::LevelDBTransaction::TreeIterator::isValid):
(WebCore::LevelDBTransaction::TreeIterator::seekToLast):
(WebCore::LevelDBTransaction::TreeIterator::seek):
(WebCore::LevelDBTransaction::TreeIterator::next):
(WebCore::LevelDBTransaction::TreeIterator::prev):
(WebCore::LevelDBTransaction::TreeIterator::key):
(WebCore::LevelDBTransaction::TreeIterator::value):
(WebCore::LevelDBTransaction::TreeIterator::isDeleted):
(WebCore::LevelDBTransaction::TreeIterator::reset):
(WebCore::LevelDBTransaction::TreeIterator::~TreeIterator):
(WebCore::LevelDBTransaction::TreeIterator::TreeIterator):
(WebCore::LevelDBTransaction::TransactionIterator::create):
(WebCore::LevelDBTransaction::TransactionIterator::TransactionIterator):
(WebCore::LevelDBTransaction::TransactionIterator::isValid):
(WebCore::LevelDBTransaction::TransactionIterator::seekToLast):
(WebCore::LevelDBTransaction::TransactionIterator::seek):
(WebCore::LevelDBTransaction::TransactionIterator::next):
(WebCore::LevelDBTransaction::TransactionIterator::prev):
(WebCore::LevelDBTransaction::TransactionIterator::key):
(WebCore::LevelDBTransaction::TransactionIterator::value):
(WebCore::LevelDBTransaction::TransactionIterator::handleConflictsAndDeletes):
(WebCore::LevelDBTransaction::TransactionIterator::setCurrentIteratorToSmallestKey):
(WebCore::LevelDBTransaction::TransactionIterator::setCurrentIteratorToLargestKey):
(WebCore::LevelDBTransaction::registerIterator):
(WebCore::LevelDBTransaction::unregisterIterator):
(WebCore::LevelDBTransaction::resetIterators):
* platform/leveldb/LevelDBTransaction.h: Added.
(WebCore::LevelDBTransaction::AVLTreeAbstractor::get_less):
(WebCore::LevelDBTransaction::AVLTreeAbstractor::set_less):
(WebCore::LevelDBTransaction::AVLTreeAbstractor::get_greater):
(WebCore::LevelDBTransaction::AVLTreeAbstractor::set_greater):
(WebCore::LevelDBTransaction::AVLTreeAbstractor::get_balance_factor):
(WebCore::LevelDBTransaction::AVLTreeAbstractor::set_balance_factor):
(WebCore::LevelDBTransaction::AVLTreeAbstractor::compare_key_key):
(WebCore::LevelDBTransaction::AVLTreeAbstractor::compare_key_node):
(WebCore::LevelDBTransaction::AVLTreeAbstractor::compare_node_node):
(WebCore::LevelDBTransaction::AVLTreeAbstractor::null):
(WebCore::LevelDBTransaction::TransactionIterator::~TransactionIterator):
* platform/leveldb/LevelDBWriteBatch.cpp:
(WebCore::LevelDBWriteBatch::create):
(WebCore::LevelDBWriteBatch::LevelDBWriteBatch):
(WebCore::LevelDBWriteBatch::~LevelDBWriteBatch):
(WebCore::makeSlice):
(WebCore::LevelDBWriteBatch::put):
(WebCore::LevelDBWriteBatch::remove):
(WebCore::LevelDBWriteBatch::clear):
* storage/IDBLevelDBBackingStore.cpp:
(WebCore::getInt):
(WebCore::putInt):
(WebCore::getString):
(WebCore::putString):
(WebCore::getNewObjectStoreId):
(WebCore::IDBLevelDBBackingStore::createObjectStore):
(WebCore::deleteRange):
(WebCore::IDBLevelDBBackingStore::deleteObjectStore):
(WebCore::IDBLevelDBBackingStore::getObjectStoreRecord):
(WebCore::getNewVersionNumber):
(WebCore::IDBLevelDBBackingStore::putObjectStoreRecord):
(WebCore::IDBLevelDBBackingStore::clearObjectStore):
(WebCore::IDBLevelDBBackingStore::deleteObjectStoreRecord):
(WebCore::IDBLevelDBBackingStore::nextAutoIncrementNumber):
(WebCore::IDBLevelDBBackingStore::keyExistsInObjectStore):
(WebCore::IDBLevelDBBackingStore::forEachObjectStoreRecord):
(WebCore::getNewIndexId):
(WebCore::IDBLevelDBBackingStore::createIndex):
(WebCore::IDBLevelDBBackingStore::putIndexDataForRecord):
(WebCore::findGreatestKeyLessThan):
(WebCore::versionExists):
(WebCore::IDBLevelDBBackingStore::getPrimaryKeyViaIndex):
(WebCore::IDBLevelDBBackingStore::keyExistsInIndex):
(WebCore::findLastIndexKeyEqualTo):
(WebCore::IDBLevelDBBackingStore::openObjectStoreCursor):
(WebCore::IDBLevelDBBackingStore::openIndexKeyCursor):
(WebCore::IDBLevelDBBackingStore::openIndexCursor):
(WebCore::IDBLevelDBBackingStore::createTransaction):
(WebCore::IDBLevelDBBackingStore::Transaction::create):
(WebCore::IDBLevelDBBackingStore::Transaction::Transaction):
(WebCore::IDBLevelDBBackingStore::Transaction::begin):
(WebCore::IDBLevelDBBackingStore::Transaction::commit):
(WebCore::IDBLevelDBBackingStore::Transaction::rollback):
* storage/IDBLevelDBBackingStore.h:
* storage/IDBTransactionBackendImpl.cpp:
(WebCore::IDBTransactionBackendImpl::abort):
2011-05-26 Shane Stephens <shanestephens@google.com>
Reviewed by James Robinson.
REGRESSION (r81992): layout triggered by position update fails to apply when transform is updated at same time
https://bugs.webkit.org/show_bug.cgi?id=60689
Test: transforms/2d/set-transform-and-top.html
* rendering/RenderBlock.cpp:
(WebCore::RenderBlock::simplifiedLayout):
2011-05-26 Igor Oliveira <igor.oliveira@openbossa.org>
Reviewed by Andreas Kling.
drag-not-loaded-image.html test crashes when WebKit is built with debug option
https://bugs.webkit.org/show_bug.cgi?id=61480
Checks if image has content before starting to drag.
* page/DragController.cpp:
(WebCore::DragController::startDrag):
2011-05-26 Alok Priyadarshi <alokp@chromium.org>
Reviewed by James Robinson.
[chromium] Cannot create stencil render-buffer for accelerated drawing on desktop GL
https://bugs.webkit.org/show_bug.cgi?id=61444
Used DEPTH24_STENCIL8 format for stencil buffer instead of STENCIL_INDEX8.
Packed depth-stencil buffer is the most common format supported by graphics cards.
It is not very robust to rely on just one format being supported,
so long term the task of creating FBO should be delegated to SKIA,
which has necessary code to iterate through all possible formats.
* platform/graphics/chromium/LayerTextureUpdaterCanvas.cpp:
(WebCore::LayerTextureUpdaterSkPicture::deleteFrameBuffer):
(WebCore::LayerTextureUpdaterSkPicture::createFrameBuffer):
2011-05-25 Jer Noble <jer.noble@apple.com>
Reviewed by Dan Bernstein.
30 second rewind button dysfunctional viewing trailers fullscreen.
https://bugs.webkit.org/show_bug.cgi?id=61505
Add support for painting MediaReturnToRealtimeButton, as well as hide and show
the correct default video control buttons when entering full-screen mode.
* css/fullscreenQuickTime.css:
(video:-webkit-full-screen::-webkit-media-controls-return-to-realtime-button):
* html/shadow/MediaControlRootElement.cpp:
(WebCore::MediaControlRootElement::enteredFullscreen): Show the "Back 30s" and
"Return to Realtime" buttons for Live Streams in full-screen mode.
(WebCore::MediaControlRootElement::exitedFullscreen): Reset the styles of
all the buttons affected by enteredFullscreen().
* rendering/RenderMediaControls.cpp:
(WebCore::RenderMediaControls::paintMediaControlsPart): Add support for
MediaReturnToRealtimeButton.
2011-05-25 Luke Macpherson <macpherson@chromium.org>
Reviewed by Dimitri Glazkov.
Implement various CSS font properties in CSSStyleApplyProperty.
https://bugs.webkit.org/show_bug.cgi?id=60603
No new tests - refactoring only.
* css/CSSStyleApplyProperty.cpp:
(WebCore::ApplyPropertyFont):
Added templated class to handle font properties
(WebCore::ApplyPropertyFontWeight):
Added class to handle font weight calculation
(WebCore::CSSStyleApplyProperty::CSSStyleApplyProperty):
Instantiate ApplyPropertyFont/ApplyPropertyFontWeight for appropriate properties.
* css/CSSStyleSelector.cpp:
(WebCore::CSSStyleSelector::applyProperty):
Remove properties that are now implemented in CSSStyleApplyProperty
* css/CSSStyleSelector.h:
(WebCore::CSSStyleSelector::fontDescription):
Added getter for m_style->fontDescription()
(WebCore::CSSStyleSelector::parentFontDescription):
Added getter for m_parentStyle->fontDescription()
(WebCore::CSSStyleSelector::setFontDescription):
Added setter for m_style->setFontDescription() that automatically sets m_fontDirty
2011-05-25 James Simonsen <simonjam@chromium.org>
Reviewed by Adam Barth.
Add site-specific hack for zipcar.com with old versions of requirejs.
https://bugs.webkit.org/show_bug.cgi?id=61321
Old versions of requirejs (< 0.15.0) try to load scripts in parallel but execute them in
order. This used to work in webkit by setting a bogus script type (script/cache), then
changing the type to a valid one when they wanted to execute it. This hack translates the
behavior into the new API (by disabling forceAsync).
* html/HTMLScriptElement.cpp:
(WebCore::needsOldRequirejsQuirk): Added.
(WebCore::HTMLScriptElement::insertedIntoDocument):
If hack is needed, set a proper script type so script loads.
If script isn't async, disable forceAsync so script executes in order.
2011-05-25 Andreas Kling <kling@webkit.org>
Reviewed by David Levin.
Rebaseline run-bindings-tests.
https://bugs.webkit.org/show_bug.cgi?id=61469
* bindings/scripts/test/JS/:
* bindings/scripts/test/V8/:
2011-05-25 Levi Weintraub <leviw@chromium.org>
Reviewed by Eric Seidel.
Switch itemBoundingBoxRect to use IntPoint
https://bugs.webkit.org/show_bug.cgi?id=60789
Changing itemBoundingBoxRect to use an IntPoint representing the offset
to be added tot he box rect instead of a pair of ints.
No new tests since this is just refactoring.
* accessibility/AccessibilityListBox.cpp:
(WebCore::AccessibilityListBox::elementAccessibilityHitTest):
* accessibility/AccessibilityListBoxOption.cpp:
(WebCore::AccessibilityListBoxOption::elementRect):
* rendering/RenderListBox.cpp:
(WebCore::RenderListBox::itemBoundingBoxRect):
(WebCore::RenderListBox::addFocusRingRects):
(WebCore::RenderListBox::paintItemForeground):
(WebCore::RenderListBox::paintItemBackground):
(WebCore::RenderListBox::nodeAtPoint):
* rendering/RenderListBox.h:
2011-05-24 MORITA Hajime <morrita@google.com>
Reviewed by Dimitri Glazkov.
RenderText with empty text is not created inside ShadowContentElement
https://bugs.webkit.org/show_bug.cgi?id=61111
- Changed Text::rendererIsNeeded() to be shadow-aware.
- previousRenderer(), nextRenderer() and parentRenderer() on NodeRenderingContext is now
safe even if it's used with an attached node, which was originally used only during attach().
We need this change because these APIs are called inside CharacterData::updateRenderer() callstack.
Tests: fast/html/details-replace-summary-child.html
fast/html/details-replace-text.html
* dom/NodeRenderingContext.cpp:
(WebCore::NodeRenderingContext::NodeRenderingContext):
(WebCore::NodeRenderingContext::nextRenderer):
(WebCore::NodeRenderingContext::previousRenderer):
(WebCore::NodeRenderingContext::parentRenderer):
(WebCore::NodeRenderingContext::shouldCreateRenderer):
* dom/NodeRenderingContext.h:
(WebCore::NodeRenderingContext::parentNodeForRenderingAndStyle):
* dom/Text.cpp:
(WebCore::Text::rendererIsNeeded):
2011-05-25 Sailesh Agrawal <sail@chromium.org>
Reviewed by Tony Chang.
Rename ScrollbarOverlayUtilitiesMac to ScrollbarOverlayUtilitiesChromiumMac
https://bugs.webkit.org/show_bug.cgi?id=61401
ScrollbarOverlayUtilitiesMac.mm was being excluded from the WebCore project. Fix was to make sure the file name ended with ChromiumMac.
* WebCore.gypi:
* platform/chromium/ScrollbarOverlayUtilitiesChromiumMac.h: Copied from Source/WebCore/platform/chromium/ScrollbarOverlayUtilitiesMac.h.
* platform/chromium/ScrollbarOverlayUtilitiesChromiumMac.mm: Copied from Source/WebCore/platform/chromium/ScrollbarOverlayUtilitiesMac.mm.
* platform/chromium/ScrollbarOverlayUtilitiesMac.h: Removed.
* platform/chromium/ScrollbarOverlayUtilitiesMac.mm: Removed.
2011-05-25 James Robinson <jamesr@chromium.org>
Reviewed by Geoffrey Garen
CachedResource overhead size calculation ignores the actual size of the URL
https://bugs.webkit.org/show_bug.cgi?id=61481
CachedResource::overheadSize is used to determine the size of an entry in the memory cache to know when to evict
it. When the resource is a large data: URL, for example representing image or audio data, the URL size itself
can be significant.
This patch uses an estimate of actual number of bytes used by the URL that is valid for ASCII urls and close for
other types of strings instead of a fixed number.
* loader/cache/CachedResource.cpp:
(WebCore::CachedResource::overheadSize):
2011-05-25 Oliver Hunt <oliver@apple.com>
Reviewed by Geoffrey Garen.
Make RegExp GC allocated
https://bugs.webkit.org/show_bug.cgi?id=61490
RegExp is GC'd so we don't need the RefPtr shenanigans anymore.
* bindings/js/SerializedScriptValue.cpp:
(WebCore::CloneDeserializer::readTerminal):
2011-05-25 Martin Robinson <mrobinson@igalia.com>
Reviewed by Dirk Schulze.
[Cairo] Move the global alpha property from GraphicsContext to PlatformContextCairo
https://bugs.webkit.org/show_bug.cgi?id=60185
Remove Cairo #ifdefs from GraphicsContext.h by pushing the global alpha
state into PlatformContextCairo. Since Cairo is the only platform that needs
to store this, this is the proper place for it. Change the image mask stack into
a more generic state stack that can keep track of the multiple bits of platform
specific state and properly handle save/restore pairs.
No new tests. This is just a code refactor.
* platform/graphics/GraphicsContext.h: Remove Cairo #ifdefs.
(WebCore::GraphicsContextState::GraphicsContextState): Ditto.
* platform/graphics/cairo/ContextShadowCairo.cpp: Access global alpha from PlatformContextCairo now.
(WebCore::ContextShadow::drawRectShadow):
* platform/graphics/cairo/FontCairo.cpp: Ditto.
(WebCore::Font::drawGlyphs):
* platform/graphics/cairo/GraphicsContextCairo.cpp:
(WebCore::setPlatformFill): Ditto.
(WebCore::setPlatformStroke): Ditto.
(WebCore::GraphicsContext::setAlpha): Ditto.
* platform/graphics/cairo/PlatformContextCairo.cpp: Moved ImageMaskInformation class from the
header file, since it can be private now. Abstract the image mask state and the global alpha
in a generic State class.
(WebCore::ImageMaskInformation::update):
(WebCore::ImageMaskInformation::isValid):
(WebCore::ImageMaskInformation::maskSurface):
(WebCore::ImageMaskInformation::maskRect):
(WebCore::PlatformContextCairo::State::State): Added.
(WebCore::PlatformContextCairo::PlatformContextCairo): Intialize the state
class when this class is constructed.
(WebCore::PlatformContextCairo::restore): Now pop the last state off the state stack.
(WebCore::PlatformContextCairo::~PlatformContextCairo): Added this so that we can forward
declare the State class in the header.
(WebCore::PlatformContextCairo::save): Push a new state onto the stack.
(WebCore::PlatformContextCairo::pushImageMask): Operate on the state stack now.
(WebCore::PlatformContextCairo::globalAlpha): Added.
(WebCore::PlatformContextCairo::setGlobalAlpha): Added.
(WebCore::PlatformContextCairo::drawSurfaceToContext: Call globalAlpha().
* platform/graphics/cairo/PlatformContextCairo.h: Changed the image mask stack
into a more generic state stack, much like PlatformContextChromium.
2011-05-25 Mark Rowe <mrowe@apple.com>
Reviewed by Sam Weinig.
<rdar://problem/9504058> Need some way to query user gesture state from injected bundle
* WebCore.exp.in: Add an export that WebKit2 needs.
2011-05-25 Jer Noble <jer.noble@apple.com>
Ureviewed; Build fix for Leopard and Snow Leopard.
Move _wkQTMovieResolvedURL outside of a #if check for Leopard and SL.
* WebCore.exp.in:
2011-05-25 Michael Saboff <msaboff@apple.com>
Reviewed by Sam Weinig.
Cleanup of commented items from https://bugs.webkit.org/show_bug.cgi?id=61222
https://bugs.webkit.org/show_bug.cgi?id=61478
Cleanup of further comments after patch was landed. Changes include
using /2 instead of >>1, adding a blank line after class include,
making method names start with lower case and adding clarifying
comments.
No new tests as the changes are stylistic and not functional.
* loader/cache/MemoryCache.cpp:
(WebCore::MemoryCache::pruneLiveResourcesToPercentage):
(WebCore::MemoryCache::pruneDeadResourcesToPercentage):
* loader/cache/MemoryCache.h:
(WebCore::MemoryCache::pruneToPercentage):
* platform/mac/MemoryPressureHandlerMac.mm:
(WebCore::MemoryPressureHandler::respondToMemoryPressure):
2011-05-25 Stephanie Lewis <slewis@apple.com>
Reviewed by Brady Eidson.
https://bugs.webkit.org/show_bug.cgi?id=61407
part of <rdar://problem/8675177>
Move Quicklook quirk down into WebCore so it can be caculated when the user
starts a reload. Restructure the conditions so it only called when absolutely
necessary.
No change in functionality so no new tests.
* loader/FrameLoader.cpp:
(WebCore::FrameLoader::subresourceCachePolicy):
* page/Settings.cpp:
(WebCore::Settings::Settings):
* page/Settings.h:
* platform/network/cf/ResourceRequest.h:
* platform/network/mac/ResourceRequestMac.mm:
(WebCore::initQuickLookResourceCachingQuirks):
(WebCore::ResourceRequest::useQuickLookResourceCachingQuirks):
2011-05-24 Jer Noble <jer.noble@apple.com>
Reviewed by Darin Adler.
Video fails to play on Vimeo
https://bugs.webkit.org/show_bug.cgi?id=61403
No new tests; Covered by media/video-canvas-source.html.
Vimeo redirects their assets from player.vimeo.com to av.vimeo.com, which is rejected
by AVFoundation and QTKit due to our setting a ForbidCrossSiteReference option when
creating an AVAsset or QTMovie. Instead, we should just reject local->remote and
remote->local and make our answer to hasSingleSecurityOrigin dynamic.
When checking whether a given request has a single security origin, use a
SecurityOrigin to check the host, port, and scheme.
* WebCore.exp.in:
* platform/graphics/avfoundation/MediaPlayerPrivateAVFoundation.h:
(WebCore::MediaPlayerPrivateAVFoundation::assetURL): Added.
* platform/graphics/avfoundation/MediaPlayerPrivateAVFoundationObjC.h:
* platform/graphics/avfoundation/MediaPlayerPrivateAVFoundationObjC.mm:
(WebCore::MediaPlayerPrivateAVFoundationObjC::createAVAssetForURL): Exchange ForbidCrossSiteReference
for ForbidRemoteReferenceToLocal and ForbidLocalReferenceToRemote
(WebCore::MediaPlayerPrivateAVFoundationObjC::hasSingleSecurityOrigin): Check to see that the
requested and resolved URLs have the same host and port.
* platform/graphics/mac/MediaPlayerPrivateQTKit.mm:
(WebCore::MediaPlayerPrivateQTKit::commonMovieAttributes): Exchange NoCrossSiteAttribute for
NoRemoteToLocalSiteAttribute and NoLocalToRemoteSiteAttribute.
(WebCore::MediaPlayerPrivateQTKit::hasSingleSecurityOrigin): Check to see that the
requested and resolved URLs have the same host and port.
* platform/mac/WebCoreSystemInterface.h: Added wkAVAssetResolvedURL.
* platform/mac/WebCoreSystemInterface.mm: Ditto.
2011-05-25 Andrew Scherkus <scherkus@chromium.org>
Reviewed by Eric Carlson.
Fix media element regression where ended event stopped firing after changing the src attribute.
https://bugs.webkit.org/show_bug.cgi?id=61336
Test: media/media-ended.html
* html/HTMLMediaElement.cpp:
(WebCore::HTMLMediaElement::prepareForLoad):
2011-05-25 Jer Noble <jer.noble@apple.com>
Reviewed by Darin Adler.
REGRESSION: Fullscreen button on embedded Vimeo videos does nothing
https://bugs.webkit.org/show_bug.cgi?id=61461
Tests: fullscreen/full-screen-iframe-legacy.html
Allow calls from the legacy full-screen API to bypass the iframe
"webkitallowfullscreen" requirement by adding a parameter to
Document::webkitRequestFullScreenForElement specifying the strictness
of that check. Specify this new parameter everywhere that function is
called, including in the default controls' full-screen button handler.
* dom/Document.cpp:
(WebCore::Document::webkitRequestFullScreenForElement):
* dom/Document.h:
* dom/Element.cpp:
(WebCore::Element::requestFullScreen): Renamed from webkitRequestFullScreen.
* html/HTMLMediaElement.cpp:
(WebCore::HTMLMediaElement::enterFullscreen):
* html/shadow/MediaControlElements.cpp:
(WebCore::MediaControlFullscreenButtonElement::defaultEventHandler):
2011-05-25 Kulanthaivel Palanichamy <kulanthaivel@codeaurora.org>
Reviewed by David Hyatt.
Selector matching doesn't update when DOM changes ("[data-a=x] #x")
https://bugs.webkit.org/show_bug.cgi?id=60752
Currently CSSStyleSelector maintains a HashSet of attributes (m_selectorAttrs)
which are used in CSS attribute selectors to determine the need for style
recalculation whenever element attributes are manipulated in DOM.
In certain conditions (element with no style, element is styled and attribute
is not a mapped attribute, attribute is of type 'type' or read-only)
even when attribute selector matches for an element, the attribute is not
added to m_selectorAttrs. This results in missing style recalculations
when a DOM element attribute is changed and is not found in m_selectorAttrs.
Removing the above said conditions in
CSSStyleSelector::SelectorChecker::checkOneSelector() for registering
attributes in m_selectorAttrs will solve this issue. But this particular
function is called numerous times which triggers adding duplicate attributes
again and again.
This patch follows the approach taken for collecting ids in selectors, where
all the attributes in selectors are added to a HashSet at the time of adding
style rules to CSSStyleSelector from StyleSheets and when
CSSStyleSelector::hasSelectorForAttribute() is called, the attribute is
simply looked up in this pre-populated hash set.
Test: fast/css/attribute-selector-dynamic-no-elementstyle.html
* css/CSSStyleSelector.cpp:
(WebCore::CSSStyleSelector::SelectorChecker::checkSelector):
(WebCore::CSSStyleSelector::checkSelector):
(WebCore::CSSStyleSelector::SelectorChecker::checkOneSelector):
(WebCore::collectFeaturesFromSelector):
(WebCore::CSSStyleSelector::applyProperty):
(WebCore::CSSStyleSelector::hasSelectorForAttribute):
* css/CSSStyleSelector.h:
2011-05-25 Ryosuke Niwa <rniwa@webkit.org>
Reviewed by James Robinson.
CSSStyleSelector should provide a way to obtain rules from non-author stylesheets
https://bugs.webkit.org/show_bug.cgi?id=61454
Replaced bool and enum arguments of styleRulesForElement and pseudoStyleRulesForElement
by one enum, and provided a way to obtain rules from UA/user stylesheets.
* css/CSSRule.h: Removed CSSRuleFilter.
* css/CSSStyleSelector.cpp:
(WebCore::CSSStyleSelector::styleRulesForElement): See above.
(WebCore::CSSStyleSelector::pseudoStyleRulesForElement): Ditto.
* css/CSSStyleSelector.h: Moved CSSRuleFilter here.
* editing/markup.cpp:
(WebCore::styleFromMatchedRulesForElement): Calls styleRulesForElement.
* inspector/InspectorCSSAgent.cpp:
(WebCore::InspectorCSSAgent::getStylesForNode): Ditto.
* page/DOMWindow.cpp:
(WebCore::DOMWindow::getMatchedCSSRules): Ditto.
2011-05-25 Caio Marcelo de Oliveira Filho <caio.oliveira@openbossa.org>
Reviewed by Andreas Kling.
[Qt] JSC bridge: implement __qt_sender__ without using Scope Chain
https://bugs.webkit.org/show_bug.cgi?id=61343
Create a stack to keep track of the sender objects. This is simpler than
the similar mechanism in QObject (C++ API), that keeps a stack per-object.
Since we do not support multiple threads, one static stack will be enough for
handling the behavior.
This behavior is covered by the tst_QWebFrame::connectAndDisconnect() auto test.
* bridge/qt/qt_instance.cpp:
(JSC::Bindings::QtInstance::qtSenderStack):
We have one static stack of QObject*. The top of the stack contains the
last object that emitted signal that called a JavaScript function.
* bridge/qt/qt_instance.h:
(JSC::Bindings::QtInstance::QtSenderStack::top):
(JSC::Bindings::QtInstance::QtSenderStack::push):
(JSC::Bindings::QtInstance::QtSenderStack::pop):
Minimal functionality to manipulate the sender stack.
* bridge/qt/qt_runtime.cpp:
(JSC::Bindings::QtConnectionObject::execute):
Remove the previous code that modified the scope chain. Push the sender object
to the stack before calling the JavaScript function (the "slot" in Qt-speak) and
pop it afterwards.
2011-05-25 Sheriff Bot <webkit.review.bot@gmail.com>
Unreviewed, rolling out r87257.
http://trac.webkit.org/changeset/87257
https://bugs.webkit.org/show_bug.cgi?id=61457
This broke layout tests, see bug 61431. (Requested by
hwennborg on #webkit).
* storage/IDBBackingStore.h:
* storage/IDBFactoryBackendImpl.cpp:
(WebCore::IDBFactoryBackendImpl::IDBFactoryBackendImpl):
(WebCore::IDBFactoryBackendImpl::open):
* storage/IDBFactoryBackendImpl.h:
* storage/IDBFactoryBackendInterface.h:
* storage/IDBLevelDBBackingStore.cpp:
* storage/IDBLevelDBBackingStore.h:
* storage/IDBSQLiteBackingStore.cpp:
* storage/IDBSQLiteBackingStore.h:
2011-05-25 Alexis Menard <alexis.menard@openbossa.org>
Reviewed by Eric Carlson.
[Qt] Enable usage of QuickTime mediaplayer for the Qt port on Mac.
https://bugs.webkit.org/show_bug.cgi?id=61279
Enable the QuickTime backend for the Qt port on Mac. The patch adds the bits in WebCore
to enable the QTKit backend of the Mac port. It can be enabled by passing DEFINES+=USE_QTKIT=1
when calling build-webkit.
* WebCore.pri:
* WebCore.pro:
* features.pri:
* platform/KURL.h:
* platform/SharedBuffer.h:
* platform/cf/KURLCFNet.cpp:
* platform/cf/SharedBufferCF.cpp:
* platform/graphics/FloatSize.h:
* platform/graphics/IntRect.h:
* platform/graphics/IntSize.h:
* platform/graphics/MediaPlayer.cpp:
* platform/graphics/cg/FloatSizeCG.cpp:
* platform/graphics/cg/IntRectCG.cpp:
* platform/graphics/mac/MediaPlayerPrivateQTKit.h:
* platform/graphics/mac/MediaPlayerPrivateQTKit.mm:
(WebCore::MediaPlayerPrivateQTKit::createQTMovieView):
(WebCore::MediaPlayerPrivateQTKit::createQTVideoRenderer):
(WebCore::MediaPlayerPrivateQTKit::createQTMovieLayer):
(WebCore::MediaPlayerPrivateQTKit::preferredRenderingMode):
(WebCore::MediaPlayerPrivateQTKit::paint):
(-[WebCoreMovieObserver layerHostChanged:]):
* platform/mac/KURLMac.mm:
* platform/mac/SharedBufferMac.mm:
(+[WebCoreSharedBufferData initialize]):
* platform/mac/WebCoreObjCExtras.mm:
* platform/qt/WebCoreSystemInterface.h: Added.
* platform/qt/WebCoreSystemInterface.mm: Added.
2011-05-25 Rob Buis <rbuis@rim.com>
Reviewed by Eric Seidel.
New test rubber-stamped by Dirk Schulze.
WebKit does not handle missing filter elements correctly
https://bugs.webkit.org/show_bug.cgi?id=12569
Do not render elements that reference non-existant filters.
Test: svg/W3C-SVG-1.1-SE/filters-felem-01-b.svg
* rendering/svg/SVGRenderSupport.cpp:
(WebCore::SVGRenderSupport::prepareToRenderSVGContent):
2011-05-25 Nate Chapin <japhet@chromium.org>
Reviewed by Adam Barth.
Put view-source documents in a unique origin and always allow them to run scripts. This ensures tools like
XMLViewer work even when scripts are disabled, while still providing the protections expected when scripts are disabled.
https://bugs.webkit.org/show_bug.cgi?id=59113
* bindings/ScriptControllerBase.cpp:
(WebCore::ScriptController::canExecuteScripts): Check whether the document is viewing source, and allow scripts in that case.
* css/CSSStyleSelector.cpp:
(WebCore::CSSStyleSelector::matchUARules):
* dom/Document.cpp:
(WebCore::Document::Document):
(WebCore::Document::setIsViewSource): Renamed from setUsesViewSourceStyles(), set's a unique security origin if we are viewing source.
* dom/Document.h:
(WebCore::Document::isViewSource): Renamed from usesViewSourceStyles().
* html/HTMLViewSourceDocument.cpp:
(WebCore::HTMLViewSourceDocument::HTMLViewSourceDocument):
* loader/FrameLoader.cpp:
(WebCore::FrameLoader::receivedFirstData):
* xml/XMLTreeViewer.cpp:
(WebCore::XMLTreeViewer::transformDocumentToTreeView):
2011-05-25 Julien Chaffraix <jchaffraix@codeaurora.org>
Reviewed by James Robinson.
http://philip.html5.org/tests/canvas/suite/tests/2d.composite.uncovered.fill.source-in.html fails
https://bugs.webkit.org/show_bug.cgi?id=39027
And:
- Fix LayoutTests/canvas/philip/tests/2d.composite.uncovered.fill.source-out.html
https://bugs.webkit.org/show_bug.cgi?id=48295
- Fix LayoutTests/canvas/philip/tests/2d.composite.uncovered.pattern.source-in.html
https://bugs.webkit.org/show_bug.cgi?id=48304
- Fix LayoutTests/canvas/philip/tests/2d.composite.uncovered.pattern.source-out.html
https://bugs.webkit.org/show_bug.cgi?id=48305
Those 4 tests have the same root cause for failing. Instead of splitting them in 2 fixes, I squashed
them together as the fix is common.
Based on an older work by Ariya Hidayat.
* html/canvas/CanvasRenderingContext2D.cpp:
(WebCore::CanvasRenderingContext2D::fill):
(WebCore::CanvasRenderingContext2D::fillRect): Added call displayTransparencyEverywhere for those 2
cases if we have to.
(WebCore::CanvasRenderingContext2D::shouldDisplayTransparencyEverywhere): This method returns true if
the spec says to display transparency everywhere. We only do so for source-in and source-out for now.
(WebCore::CanvasRenderingContext2D::displayTransparencyEverywhere): This method implements the spec
(which matches other browsers' behavior) and "display transparency elsewhere".
* html/canvas/CanvasRenderingContext2D.h: Added the two previous methods.
2011-05-25 Levi Weintraub <leviw@chromium.org>
Reviewed by Eric Seidel.
Add IntPoint versions of IntRect::move and IntPoint::move
https://bugs.webkit.org/show_bug.cgi?id=61390
Adding move methods to IntRect and IntPoint that take an IntPoint
that's acting as an offset. Since we also apply negative offsets,
also adding a single parameter operator- for IntPoint.
No new tests since this is refactoring.
* page/FrameView.cpp:
(WebCore::FrameView::invalidateScrollbarRect):
(WebCore::FrameView::convertFromRenderer):
(WebCore::FrameView::convertToRenderer):
* platform/ScrollView.cpp:
(WebCore::ScrollView::wheelEvent):
* platform/ScrollView.h:
(WebCore::ScrollView::convertChildToSelf):
(WebCore::ScrollView::convertSelfToChild):
* platform/ScrollbarThemeComposite.cpp:
(WebCore::ScrollbarThemeComposite::invalidatePart):
* platform/graphics/IntPoint.h:
(WebCore::IntPoint::move):
(WebCore::operator-):
* platform/graphics/IntRect.h:
(WebCore::IntRect::move):
* platform/graphics/filters/FilterEffect.cpp:
(WebCore::FilterEffect::requestedRegionOfInputImageData):
* platform/graphics/gpu/Texture.cpp:
(WebCore::Texture::updateSubRect):
* platform/mac/WidgetMac.mm:
(WebCore::Widget::paint):
* rendering/RenderBlock.cpp:
(WebCore::RenderBlock::logicalRectToPhysicalRect):
(WebCore::RenderBlock::selectionGaps):
* rendering/RenderBox.cpp:
(WebCore::RenderBox::offsetFromContainer):
(WebCore::RenderBox::computeRectForRepaint):
(WebCore::RenderBox::localCaretRect):
* rendering/RenderDetailsMarker.cpp:
(WebCore::RenderDetailsMarker::paint):
* rendering/RenderInline.cpp:
(WebCore::RenderInline::culledInlineVisualOverflowBoundingBox):
* rendering/RenderInputSpeech.cpp:
(WebCore::RenderInputSpeech::paintInputFieldSpeechButton):
* rendering/RenderLayerBacking.cpp:
(WebCore::paintScrollbar):
(WebCore::RenderLayerBacking::paintContents):
* rendering/RenderLayerCompositor.cpp:
(WebCore::paintScrollbar):
(WebCore::RenderLayerCompositor::paintContents):
* rendering/RenderListItem.cpp:
(WebCore::RenderListItem::positionListMarker):
* rendering/RenderListMarker.cpp:
(WebCore::RenderListMarker::paint):
* rendering/RenderTableCell.cpp:
(WebCore::RenderTableCell::computeRectForRepaint):
* rendering/RenderTextControlSingleLine.cpp:
(WebCore::RenderTextControlSingleLine::nodeAtPoint):
* rendering/RenderView.cpp:
(WebCore::RenderView::repaintViewRectangle):
2011-05-25 Levi Weintraub <leviw@chromium.org>
Reviewed by Eric Seidel.
Switch addFocusRingRects to use IntPoint
https://bugs.webkit.org/show_bug.cgi?id=60783
Switching addFocusRingRects to use an IntPoint representing the offset being
applied instead of a pair of ints.
No new tests as this is only refactoring.
* platform/graphics/FloatSize.h:
(WebCore::flooredIntPoint):
* rendering/RenderBlock.cpp:
(WebCore::RenderBlock::addFocusRingRects):
* rendering/RenderBlock.h:
* rendering/RenderBox.cpp:
(WebCore::RenderBox::addFocusRingRects):
* rendering/RenderBox.h:
* rendering/RenderInline.cpp:
(WebCore::RenderInline::addFocusRingRects):
* rendering/RenderInline.h:
* rendering/RenderListBox.cpp:
(WebCore::RenderListBox::addFocusRingRects):
* rendering/RenderListBox.h:
* rendering/RenderObject.cpp:
(WebCore::RenderObject::paintFocusRing):
(WebCore::RenderObject::absoluteFocusRingQuads):
* rendering/RenderObject.h:
(WebCore::RenderObject::addFocusRingRects):
* rendering/RenderTextControl.cpp:
(WebCore::RenderTextControl::addFocusRingRects):
* rendering/RenderTextControl.h:
* rendering/RenderTextControlSingleLine.cpp:
(WebCore::RenderTextControlSingleLine::addFocusRingRects):
* rendering/RenderTextControlSingleLine.h:
* rendering/svg/RenderSVGContainer.cpp:
(WebCore::RenderSVGContainer::addFocusRingRects):
* rendering/svg/RenderSVGContainer.h:
* rendering/svg/RenderSVGImage.cpp:
(WebCore::RenderSVGImage::addFocusRingRects):
* rendering/svg/RenderSVGImage.h:
* rendering/svg/RenderSVGPath.cpp:
(WebCore::RenderSVGPath::addFocusRingRects):
* rendering/svg/RenderSVGPath.h:
2011-05-25 Sheriff Bot <webkit.review.bot@gmail.com>
Unreviewed, rolling out r87229.
http://trac.webkit.org/changeset/87229
https://bugs.webkit.org/show_bug.cgi?id=61445
Lots of tests crashing in
CFNetwork!URLResponse::createFilenameFromResponseHeaders on
Windows XP (Requested by aroben on #webkit).
* platform/network/ResourceResponseBase.cpp:
(WebCore::ResourceResponseBase::adopt):
(WebCore::ResourceResponseBase::suggestedFilename):
(WebCore::ResourceResponseBase::setSuggestedFilename):
(WebCore::ResourceResponseBase::httpStatusText):
(WebCore::ResourceResponseBase::setHTTPStatusText):
(WebCore::ResourceResponseBase::httpHeaderField):
(WebCore::ResourceResponseBase::setHTTPHeaderField):
(WebCore::ResourceResponseBase::httpHeaderFields):
(WebCore::ResourceResponseBase::isAttachment):
(WebCore::ResourceResponseBase::setLastModifiedDate):
(WebCore::ResourceResponseBase::lastModifiedDate):
(WebCore::ResourceResponseBase::wasCached):
(WebCore::ResourceResponseBase::connectionReused):
(WebCore::ResourceResponseBase::setConnectionReused):
(WebCore::ResourceResponseBase::connectionID):
(WebCore::ResourceResponseBase::setConnectionID):
(WebCore::ResourceResponseBase::resourceLoadTiming):
(WebCore::ResourceResponseBase::setResourceLoadTiming):
(WebCore::ResourceResponseBase::resourceLoadInfo):
(WebCore::ResourceResponseBase::setResourceLoadInfo):
* platform/network/ResourceResponseBase.h:
* platform/network/cf/ResourceResponse.h:
(WebCore::ResourceResponse::ResourceResponse):
* platform/network/cf/ResourceResponseCFNet.cpp:
(WebCore::ResourceResponse::platformLazyInit):
* platform/network/mac/ResourceResponseMac.mm:
(WebCore::ResourceResponse::platformLazyInit):
2011-05-25 Igor Oliveira <igor.oliveira@openbossa.org>
Reviewed by Antonio Gomes.
[Qt] QtWebKit crashes when dragging not loaded images
https://bugs.webkit.org/show_bug.cgi?id=61314
Checks if nativeImageForCurrentFrame is a valid pointer.
Test: http/tests/misc/drag-not-loaded-image.html
* platform/qt/DragImageQt.cpp:
(WebCore::createDragImageFromImage):
2011-05-25 Ryuan Choi <ryuan.choi@samsung.com>
Reviewed by Xan Lopez.
[GTK] combobox and scrollbar are rendered small size at gtk+2.22.0
https://bugs.webkit.org/show_bug.cgi?id=61436
Fix arguments of gdk_drawable_get_size.
No new tests, no behavior change.
* platform/gtk/GtkVersioning.c:
(getGdkDrawableSize):
2011-05-23 Alexander Pavlov <apavlov@chromium.org>
Reviewed by Yury Semikhatsky.
Web Inspector: extreme lagging when searching for "img[src*="
https://bugs.webkit.org/show_bug.cgi?id=61282
No new tests, as this is a refactoring: ElementsTreeElement DOM is manipulated directly
when built and search-highlighted, rather than through innerHTML.
* inspector/front-end/DOMSyntaxHighlighter.js:
(WebInspector.DOMSyntaxHighlighter):
(WebInspector.DOMSyntaxHighlighter.prototype.createSpan):
* inspector/front-end/ElementsPanel.js:
(WebInspector.ElementsPanel.prototype._hideSearchHighlights):
* inspector/front-end/ElementsTreeOutline.js:
(WebInspector.ElementsTreeElement.prototype.highlightSearchResults):
(WebInspector.ElementsTreeElement.prototype.hideSearchHighlights):
(WebInspector.ElementsTreeElement.prototype._updateSearchHighlight.updateEntryShow):
(WebInspector.ElementsTreeElement.prototype._updateSearchHighlight.updateEntryHide):
(WebInspector.ElementsTreeElement.prototype._updateSearchHighlight):
(WebInspector.ElementsTreeElement.prototype._addNewAttribute):
(WebInspector.ElementsTreeElement.prototype.updateTitle):
(WebInspector.ElementsTreeElement.prototype._buildAttributeDOM):
():
* inspector/front-end/utilities.js:
():
2011-05-25 Leandro Gracia Gil <leandrogracia@chromium.org>
Reviewed by Tony Gentilcore.
Introduce HTML5 track list objects.
https://bugs.webkit.org/show_bug.cgi?id=60184
Introduce the TrackList, MultipleTrackList and ExclusiveTrackList objects
for their use in the MediaStream API and the HTML Media Element.
Current spec: http://www.whatwg.org/specs/web-apps/current-work/multipage/the-iframe-element.html#tracklist
The Media Stream API will test this feature in the bug 56587.
More tests related to the HTML Media Element may be added later.
* CMakeLists.txt:
* CodeGenerators.pri:
* DerivedSources.cpp:
* DerivedSources.make:
* GNUmakefile.list.am:
* WebCore.gypi:
* WebCore.pro:
* WebCore.vcproj/WebCore.vcproj:
* WebCore.xcodeproj/project.pbxproj:
* bindings/js/JSEventTarget.cpp:
(WebCore::toJS):
* bindings/v8/V8DOMWrapper.cpp:
(WebCore::V8DOMWrapper::convertEventTargetToV8Object):
* dom/DOMAllInOne.cpp:
* dom/EventTarget.cpp:
(WebCore::EventTarget::toTrackList):
(WebCore::EventTarget::toMultipleTrackList):
(WebCore::EventTarget::toExclusiveTrackList):
* dom/EventTarget.h:
* dom/ExclusiveTrackList.cpp: Added.
(WebCore::ExclusiveTrackList::create):
(WebCore::ExclusiveTrackList::ExclusiveTrackList):
(WebCore::ExclusiveTrackList::~ExclusiveTrackList):
(WebCore::ExclusiveTrackList::clear):
(WebCore::ExclusiveTrackList::select):
(WebCore::ExclusiveTrackList::toExclusiveTrackList):
* dom/ExclusiveTrackList.h: Added.
(WebCore::ExclusiveTrackList::selectedIndex):
* dom/ExclusiveTrackList.idl: Added.
* dom/MultipleTrackList.cpp: Added.
(WebCore::MultipleTrackList::create):
(WebCore::MultipleTrackList::MultipleTrackList):
(WebCore::MultipleTrackList::~MultipleTrackList):
(WebCore::MultipleTrackList::clear):
(WebCore::MultipleTrackList::isEnabled):
(WebCore::MultipleTrackList::enable):
(WebCore::MultipleTrackList::disable):
(WebCore::MultipleTrackList::toMultipleTrackList):
* dom/MultipleTrackList.h: Added.
* dom/MultipleTrackList.idl: Added.
* dom/TrackList.cpp: Added.
(WebCore::Track::create):
(WebCore::Track::Track):
(WebCore::TrackList::create):
(WebCore::TrackList::TrackList):
(WebCore::TrackList::~TrackList):
(WebCore::TrackList::length):
(WebCore::TrackList::checkIndex):
(WebCore::TrackList::getID):
(WebCore::TrackList::getKind):
(WebCore::TrackList::getLabel):
(WebCore::TrackList::getLanguage):
(WebCore::TrackList::clear):
(WebCore::TrackList::postChangeEvent):
(WebCore::TrackList::dispatchChangeEvent):
(WebCore::TrackList::toTrackList):
(WebCore::TrackList::scriptExecutionContext):
(WebCore::TrackList::eventTargetData):
(WebCore::TrackList::ensureEventTargetData):
* dom/TrackList.h: Added.
(WebCore::Track::id):
(WebCore::Track::kind):
(WebCore::Track::label):
(WebCore::Track::language):
(WebCore::TrackList::DispatchTask::create):
(WebCore::TrackList::DispatchTask::performTask):
(WebCore::TrackList::DispatchTask::DispatchTask):
(WebCore::TrackList::refEventTarget):
(WebCore::TrackList::derefEventTarget):
* dom/TrackList.idl: Added.
2011-05-25 Keishi Hattori <keishi@webkit.org>
Reviewed by Kent Tamura.
Move ElementWithPseudoId to separate file
https://bugs.webkit.org/show_bug.cgi?id=61430
No new tests because no behavior changes.
* CMakeLists.txt: Added ElementWithPseudoId.cpp
* GNUmakefile.list.am: Added ElementWithPseudoId.{h,cpp}
* WebCore.gypi: Added ElementWithPseudoId.{h,cpp}
* WebCore.pro: Added ElementWithPseudoId.{h,cpp}
* WebCore.vcproj/WebCore.vcproj: Added ElementWithPseudoId.{h,cpp}
* WebCore.xcodeproj/project.pbxproj: Added ElementWithPseudoId.{h,cpp}
* html/ValidationMessage.cpp: Removed ElementWithPseudoId definition.
* html/shadow/ElementWithPseudoId.cpp: Added.
(WebCore::ElementWithPseudoId::shadowPseudoId):
* html/shadow/ElementWithPseudoId.h: Added.
(WebCore::ElementWithPseudoId::create):
(WebCore::ElementWithPseudoId::ElementWithPseudoId):
2011-05-25 Alexis Menard <alexis.menard@openbossa.org>
Reviewed by Antonio Gomes.
[Qt] When QWebView has a different style set on it then the scrollbars are not rendered correctly
https://bugs.webkit.org/show_bug.cgi?id=34635
Make sure the scrollbar is properly rendered on Mac with another style than the Mac style. The code had
two paths, one for Mac and one for any other styles. The problem is that on Mac you can still run the
application with -style plastique for example, therefore the code used for other styles should also be
used whenever the current style is not the Mac style.
* platform/qt/ScrollbarThemeQt.cpp:
(WebCore::ScrollbarThemeQt::paint):
2011-05-25 Yuta Kitamura <yutak@chromium.org>
Reviewed by Kent Tamura.
WebSocket: Use fail() when WebSocketChannel has failed
https://bugs.webkit.org/show_bug.cgi?id=61353
An existing error message has been modified, but it is impossible
to test this message in LayoutTests because it is only shown when
memory allocation has failed, which is hard to reproduce reliably.
One new message has been added. It is covered by an existing test
http/tests/websocket/tests/frame-length-overflow.html.
There is no other change in behavior. No new tests are added.
* websockets/WebSocketChannel.cpp:
(WebCore::WebSocketChannel::fail):
Do not close if we know the socket stream is already closed. This does not
change the behavior, because SocketStreamBase does nothing if it is already
closed.
(WebCore::WebSocketChannel::didOpen):
(WebCore::WebSocketChannel::didReceiveData):
We need to set m_shouldDiscardReceivedData to true before calling fail(),
so I moved the error message from appendToBuffer() to here.
The error message was rephrased in order to improve readability.
(WebCore::WebSocketChannel::appendToBuffer):
Unnested the code.
(WebCore::WebSocketChannel::processBuffer):
2011-05-16 Alexander Pavlov <apavlov@chromium.org>
Reviewed by David Levin.
CSSParser: m_implicitShorthand should probably be RAII
https://bugs.webkit.org/show_bug.cgi?id=51586
It was impossible to entirely eliminate the m_implicitShorthand manual changes
due to the parseFill*() method stateful call chains.
No new tests, as this is a refactoring.
* css/CSSParser.cpp:
(ImplicitScope::ImplicitScope):
(ImplicitScope::~ImplicitScope):
(WebCore::CSSParser::parseShorthand):
(WebCore::CSSParser::parse4Values):
(WebCore::CSSParser::parseBorderRadius):
2011-05-24 Pavel Podivilov <podivilov@chromium.org>
Reviewed by Yury Semikhatsky.
Web Inspector: inspected page crashes when call stack is empty after live edit.
https://bugs.webkit.org/show_bug.cgi?id=61364
* bindings/v8/ScriptDebugServer.cpp:
(WebCore::ScriptDebugServer::currentCallFrame):
2011-05-23 Yury Semikhatsky <yurys@chromium.org>
Reviewed by Adam Barth.
Chromium DevTools: Tab crashes with "Aw, snap!" on entering "(new Image())." in console
https://bugs.webkit.org/show_bug.cgi?id=61194
Test: inspector/console/console-eval-syntax-error.html
* bindings/v8/custom/V8InjectedScriptHostCustom.cpp:
(WebCore::V8InjectedScriptHost::evaluateCallback): return immediately in case of syntax error
2011-05-25 Yuzo Fujishima <yuzo@google.com>
Reviewed by Kent Tamura.
Fix for Bug 61352 - Refactor RenderView::{enable,disable}LayoutState call sites to use RIIA
https://bugs.webkit.org/show_bug.cgi?id=61352
No new tests because no behavior changes.
* html/shadow/MediaControlElements.cpp:
(WebCore::RenderMediaVolumeSliderContainer::layout):
* page/FrameView.cpp:
(WebCore::FrameView::layout):
* rendering/RenderBlock.cpp:
(WebCore::RenderBlock::repaintOverhangingFloats):
(WebCore::RenderBlock::updateFirstLetter):
* rendering/RenderLayer.cpp:
(WebCore::RenderLayer::updateLayerPositions):
(WebCore::RenderLayer::updateScrollInfoAfterLayout):
* rendering/RenderListBox.cpp:
(WebCore::RenderListBox::layout):
* rendering/RenderListItem.cpp:
(WebCore::RenderListItem::updateMarkerLocation):
* rendering/RenderMedia.cpp:
(WebCore::RenderMedia::layout):
* rendering/RenderView.h:
(WebCore::RenderView::disableLayoutState):
(WebCore::RenderView::enableLayoutState):
(WebCore::LayoutStateDisabler::LayoutStateDisabler):
(WebCore::LayoutStateDisabler::~LayoutStateDisabler):
* rendering/svg/RenderSVGRoot.cpp:
(WebCore::RenderSVGRoot::layout):
2011-05-24 Csaba Osztrogonác <ossy@webkit.org>
[Qt] Unreviewed typo fix after r87228.
* WebCore.pro:
2011-05-24 Keishi Hattori <keishi@webkit.org>
Reviewed by Kent Tamura.
Disable textfield implementation of <input type=color>. Add INPUT_COLOR feature flag. Add input color sanitizer.
https://bugs.webkit.org/show_bug.cgi?id=61273
Test: fast/forms/color/input-value-sanitization-color.html
* Configurations/FeatureDefines.xcconfig: Added COLOR_INPUT feature flag.
* GNUmakefile.am: Added COLOR_INPUT feature flag.
* features.pri: Added COLOR_INPUT feature flag.
* html/ColorInputType.cpp: Wrapped with COLOR_INPUT feature flag.
(WebCore::ColorInputType::isColorControl): Added.
(WebCore::ColorInputType::fallbackValue): Added. Fallback value defined in spec.
(WebCore::ColorInputType::sanitizeValue): Added. Sanitize value string as defined in spec.
* html/ColorInputType.h: Wrapped with COLOR_INPUT feature flag.
(WebCore::ColorInputType::ColorInputType): Changed to inherit BaseButtonInputType.
* html/InputType.cpp:
(WebCore::InputType::isColorControl): Added.
* html/InputType.h:
2011-05-24 Steve Lacey <sjl@chromium.org>
Reviewed by Eric Carlson.
Move chromium media controls timeline back to flexible rather than absolute
layout.
https://bugs.webkit.org/show_bug.cgi?id=61379
* css/mediaControlsChromium.css:
(audio::-webkit-media-controls-current-time-display, video::-webkit-media-controls-current-time-display):
(audio::-webkit-media-controls-timeline, video::-webkit-media-controls-timeline):
2011-05-24 Fumitoshi Ukai <ukai@chromium.org>
Unreviewed. Fix clang error.
error: initialization of pointer of type 'WebCore::MHTMLArchive *' to
NULL from a constant boolean expression [-Werror,-Wbool-conversio
* loader/archive/mhtml/MHTMLArchive.cpp:
(WebCore::MHTMLArchive::create):
2011-05-24 Adam Barth <abarth@webkit.org>
Reviewed by Eric Seidel.
Add FIXME comments about removing FrameLoader::isProcessingUserGesture
https://bugs.webkit.org/show_bug.cgi?id=61395
All the callers of the API are wrong. They should call the more modern
static member function of ScriptController instead. I'll remove the
FrameLoader function in a future patch.
* html/HTMLMediaElement.cpp:
(WebCore::HTMLMediaElement::processingUserGesture):
* rendering/RenderFileUploadControl.cpp:
(WebCore::RenderFileUploadControl::click):
2011-05-24 Gyuyoung Kim <gyuyoung.kim@samsung.com>
Unreviewed. Fix style error.
* platform/efl/WidgetEfl.cpp:
(WebCore::WidgetPrivate::WidgetPrivate):
2011-05-24 Greg Simon <gregsimon@chromium.org>
Reviewed by Dimitri Glazkov.
Control Indexeddb backends from LayoutTestController
https://bugs.webkit.org/show_bug.cgi?id=61000
Test: storage/indexeddb/migrate-basics.html
* storage/IDBBackingStore.h:
* storage/IDBFactoryBackendImpl.cpp:
(WebCore::IDBFactoryBackendImpl::IDBFactoryBackendImpl):
(WebCore::IDBFactoryBackendImpl::open):
(WebCore::IDBFactoryBackendImpl::setEnableMigration):
(WebCore::IDBFactoryBackendImpl::migrate):
* storage/IDBFactoryBackendImpl.h:
* storage/IDBFactoryBackendInterface.h:
* storage/IDBLevelDBBackingStore.cpp:
(WebCore::IDBLevelDBBackingStore::backingStoreExists):
* storage/IDBLevelDBBackingStore.h:
(WebCore::IDBLevelDBBackingStore::backingStoreType):
* storage/IDBSQLiteBackingStore.cpp:
(WebCore::IDBSQLiteBackingStore::backingStoreExists):
* storage/IDBSQLiteBackingStore.h:
(WebCore::IDBSQLiteBackingStore::backingStoreType):
2011-05-24 Leo Yang <leo.yang@torchmobile.com.cn>
Reviewed by Ryosuke Niwa.
[SVG] Assertion failure by dragging text between input fields inside <foreignObject>s
https://bugs.webkit.org/show_bug.cgi?id=60692
Add NULL check of 'holder' in WebCore::ReplacementFragment::ReplacementFragment()
before call VisibleSelection::selectionFromContentsOfNode() to prevent crashing.
Test: editing/pasteboard/drag-drop-input-in-svg.svg
* editing/ReplaceSelectionCommand.cpp:
(WebCore::ReplacementFragment::ReplacementFragment):
2011-05-24 Andy Estes <aestes@apple.com>
Reviewed by Geoffrey Garen.
REGRESSION (r70748): WebKit cannot play QuickTime movies on Mac OS X Wiki Server pages
https://bugs.webkit.org/show_bug.cgi?id=61229
This site-specific hack maintains compatibility with Mac OS X Wiki Server,
which embeds QuickTime movies using an object tag containing QuickTime's
ActiveX classid. Treat this classid as valid only if OS X Server's unique
'generator' meta tag is present. Only apply this quirk if there is no
fallback content, which ensures the quirk will disable itself if Wiki
Server is updated to generate an alternate embed tag as fallback content.
* html/HTMLObjectElement.cpp:
(WebCore::HTMLObjectElement::shouldAllowQuickTimeClassIdQuirk): Return
true if site-specific quirks are enabled, the object element has no
fallback content, the classid attribute matches QuickTime's classid and
the document has a 'generator' meta tag matching Mac OS X Web Services
Server's unique generator string.
(WebCore::HTMLObjectElement::hasValidClassId): Call
shouldAllowQuickTimeClassIdQuirk()
* html/HTMLObjectElement.h:
2011-05-24 Nate Chapin <japhet@chromium.org>
Reviewed by Adam Barth.
Change CachedResources to take a ResourceRequest instead of
a url in their constructors and provide a very minimal set of
cases for avoiding reusing a CachedResource. The ResourceRequest
part of this change requires pushing responsibility
for calling Document::completeURL() to the caller, instead of
CachedResourceLoader, since ResourceRequest ASSERTs if it
is constructed with an invalid url.
https://bugs.webkit.org/show_bug.cgi?id=61318
Refactor, no new tests.
* css/CSSFontSelector.cpp:
(WebCore::CSSFontSelector::addFontFaceRule):
* css/CSSImageValue.cpp:
(WebCore::CSSImageValue::cachedImage):
* css/CSSImportRule.cpp:
(WebCore::CSSImportRule::insertedIntoParent):
* dom/ProcessingInstruction.cpp:
(WebCore::ProcessingInstruction::checkStyleSheet):
* dom/ScriptElement.cpp:
(WebCore::ScriptElement::requestScript):
* html/HTMLLinkElement.cpp:
(WebCore::HTMLLinkElement::process):
* loader/ImageLoader.cpp:
(WebCore::ImageLoader::updateFromElement):
* loader/cache/CachedCSSStyleSheet.cpp:
(WebCore::CachedCSSStyleSheet::CachedCSSStyleSheet):
(WebCore::CachedCSSStyleSheet::didAddClient):
(WebCore::CachedCSSStyleSheet::checkNotify):
* loader/cache/CachedCSSStyleSheet.h:
* loader/cache/CachedFont.cpp:
(WebCore::CachedFont::CachedFont):
* loader/cache/CachedFont.h:
* loader/cache/CachedImage.cpp:
(WebCore::CachedImage::CachedImage):
(WebCore::CachedImage::checkShouldPaintBrokenImage):
* loader/cache/CachedImage.h:
* loader/cache/CachedResource.cpp:
(WebCore::CachedResource::CachedResource):
(WebCore::reuseRequest):
(WebCore::CachedResource::allowReuseOfRequest):
(WebCore::CachedResource::removeClient):
(WebCore::CachedResource::canUseCacheValidator):
* loader/cache/CachedResource.h:
(WebCore::CachedResource::resourceRequest):
(WebCore::CachedResource::url):
* loader/cache/CachedResourceLoader.cpp:
* loader/cache/CachedResourceLoader.h:
* loader/cache/CachedResourceRequest.cpp:
(WebCore::CachedResourceRequest::load):
* loader/cache/CachedScript.cpp:
(WebCore::CachedScript::CachedScript):
* loader/cache/CachedScript.h:
* loader/cache/CachedXSLStyleSheet.cpp:
(WebCore::CachedXSLStyleSheet::CachedXSLStyleSheet):
(WebCore::CachedXSLStyleSheet::didAddClient):
(WebCore::CachedXSLStyleSheet::checkNotify):
* loader/cache/CachedXSLStyleSheet.h:
* svg/SVGFEImageElement.cpp:
(WebCore::SVGFEImageElement::requestImageResource):
* svg/SVGFontFaceUriElement.cpp:
(WebCore::SVGFontFaceUriElement::loadFont):
* xml/XSLImportRule.cpp:
(WebCore::XSLImportRule::loadSheet):
2011-05-24 Kent Tamura <tkent@chromium.org>
Reviewed by Dimitri Glazkov.
Use Element::shadowPseudoId() for text field decoration elements
https://bugs.webkit.org/show_bug.cgi?id=61351
No new tests. Covered by existing tests.
* css/CSSSelector.cpp: Remove support for the following static pseudo selectors:
- -webkit-inner-spin-button
- -webkit-input-speech-button
- -webkit-outer-spin-button
- -webkit-search-cancel-button
- -webkit-search-decoration
- -webkit-search-results-button
- -webkit-search-results-decoration
(WebCore::CSSSelector::pseudoId):
(WebCore::nameToPseudoTypeMap):
(WebCore::CSSSelector::extractPseudoType):
* css/CSSSelector.h: ditto.
* css/CSSStyleSelector.cpp:
(WebCore::CSSStyleSelector::matchRules):
Store shadowPseudoId() result in a local variable because
SearchFieldResultsButtonElement::shadowPseudoId() is a little expensive.
* html/shadow/TextControlInnerElements.cpp:
Override Element::shadowPseudoId() instead of Element::styleForRenderer().
(WebCore::SearchFieldResultsButtonElement::shadowPseudoId):
(WebCore::SearchFieldCancelButtonElement::shadowPseudoId):
(WebCore::SpinButtonElement::shadowPseudoId):
(WebCore::InputFieldSpeechButtonElement::shadowPseudoId):
* html/shadow/TextControlInnerElements.h: Update declarations.
* rendering/RenderTextControlSingleLine.cpp: Remove createFooStyle() functions.
* rendering/RenderTextControlSingleLine.h: ditto.
* rendering/style/RenderStyleConstants.h: Remove unused pseudo IDs.
2011-05-24 Dimitri Glazkov <dglazkov@chromium.org>
Sorted WebCore.xcodeproj again.
* WebCore.xcodeproj/project.pbxproj: Ran sort-XCode-project-file.
2011-05-24 Stephanie Lewis <slewis@apple.com>
Reviewed by Geoff Garen.
https://bugs.webkit.org/show_bug.cgi?id=61345
part of <rdar://problem/8675177>
Don't initialize ResourceResponse.m_suggestedFilename until we want to use it. Initializing it requires reading in and parsing a plist.
Add new initialization state CommonAndUncommonFields to ResourceResponse. This will be for all the header fields.
Move suggestedFilename initialization to AllFields so it is never initialized unless we ask for it.
Add "Content-Type" to common headers since it is looked for by every CSS sheet load.
No new tests because functionality has not changed.
* platform/network/ResourceResponseBase.cpp:
(WebCore::ResourceResponseBase::adopt):
(WebCore::ResourceResponseBase::suggestedFilename):
(WebCore::ResourceResponseBase::setSuggestedFilename):
(WebCore::ResourceResponseBase::httpStatusText):
(WebCore::ResourceResponseBase::setHTTPStatusText):
(WebCore::ResourceResponseBase::httpHeaderField):
(WebCore::ResourceResponseBase::setHTTPHeaderField):
(WebCore::ResourceResponseBase::httpHeaderFields):
(WebCore::ResourceResponseBase::isAttachment):
(WebCore::ResourceResponseBase::setLastModifiedDate):
(WebCore::ResourceResponseBase::lastModifiedDate):
(WebCore::ResourceResponseBase::wasCached):
(WebCore::ResourceResponseBase::connectionReused):
(WebCore::ResourceResponseBase::setConnectionReused):
(WebCore::ResourceResponseBase::connectionID):
(WebCore::ResourceResponseBase::setConnectionID):
(WebCore::ResourceResponseBase::resourceLoadTiming):
(WebCore::ResourceResponseBase::setResourceLoadTiming):
(WebCore::ResourceResponseBase::resourceLoadInfo):
(WebCore::ResourceResponseBase::setResourceLoadInfo):
* platform/network/ResourceResponseBase.h:
* platform/network/cf/ResourceResponse.h:
(WebCore::ResourceResponse::ResourceResponse):
* platform/network/cf/ResourceResponseCFNet.cpp:
(WebCore::ResourceResponse::platformLazyInit):
* platform/network/mac/ResourceResponseMac.mm:
(WebCore::ResourceResponse::platformLazyInit):
2011-05-24 Michael Saboff <msaboff@apple.com>
Reviewed by Geoffrey Garen.
Improve handling in WebCore of low memory situations
https://bugs.webkit.org/show_bug.cgi?id=61222
Added new class, MemoryPressureHandler, to platform to respond to low
system memory events. Added Mac specific implementation that reduces the
page cache, NSURL cache, WebCore cache by half their current usage
and then garbage collects. This can allow Safari to continue operating
in a low memory situation with minimal paging.
Split up prune operations in MemoryCache to allow for pruning to a
specific actual size to support this change.
No tests added as the functionality of WebKit wasn't changed.
* GNUmakefile.list.am:
* WebCore.exp.in:
* WebCore.gypi:
* WebCore.pro:
* WebCore.vcproj/WebCore.vcproj:
* WebCore.xcodeproj/project.pbxproj:
* loader/cache/MemoryCache.cpp:
(WebCore::MemoryCache::pruneLiveResources):
(WebCore::MemoryCache::forcePruneLiveResources):
(WebCore::MemoryCache::pruneLiveResourcesToTarget):
(WebCore::MemoryCache::pruneDeadResources):
(WebCore::MemoryCache::forcePruneDeadResources):
(WebCore::MemoryCache::pruneDeadResourcesToTarget):
* loader/cache/MemoryCache.h:
(WebCore::MemoryCache::forcePrune):
* platform/MemoryPressureHandler.cpp: Added.
(WebCore::memoryPressureHandler):
(WebCore::MemoryPressureHandler::MemoryPressureHandler):
(WebCore::MemoryPressureHandler::install):
(WebCore::MemoryPressureHandler::respondToMemoryPressure):
* platform/MemoryPressureHandler.h: Added.
* platform/mac/MemoryPressureHandler.mm: Added.
(WebCore::MemoryPressureHandler::install):
(WebCore::MemoryPressureHandler::respondToMemoryPressure):
2011-05-24 Kent Tamura <tkent@chromium.org>
Reviewed by Dimitri Glazkov.
Node::shadowAncestorNode() and shadowTreeRootNode() should be const.
https://bugs.webkit.org/show_bug.cgi?id=61398
shadowAncestorNode() and shadowTreeRootNode() should be const
though they can return 'this' pointer.
No new tests. This doesn't change any visible behavior.
* dom/Node.cpp:
(WebCore::Node::shadowAncestorNode): Make this const.
(WebCore::Node::shadowTreeRootNode): ditto.
* dom/Node.h: Update declarations.
* html/shadow/TextControlInnerElements.h:
(WebCore::SpinButtonElement::isEnabledFormControl): Need no const_cast<>.
(WebCore::SpinButtonElement::isReadOnlyFormControl): ditto.
2011-05-24 James Simonsen <simonjam@chromium.org>
Reviewed by Eric Seidel.
ASSERT_NOT_REACHED reached with broken ideograph and system fallback
https://bugs.webkit.org/show_bug.cgi?id=53528
Test: fast/text/justify-ideograph-vertical.html (on chromium linux)
* platform/graphics/FontFastPath.cpp:
(WebCore::Font::glyphDataForCharacter): Identify and handle broken ideographs as any other variant.
* platform/graphics/SimpleFontData.h:
(WebCore::SimpleFontData::variantFontData): Added BrokenIdeographVariant.
2011-05-24 Syed Idris Shah <syed.idris-shah@nokia.com>
Reviewed by Andreas Kling.
[Qt] fast/canvas/webgl/gl-uniform-arrays.html failing for Qt on Linux
https://bugs.webkit.org/show_bug.cgi?id=60377
LayoutTests/fast/canvas/webgl/gl-uniform-arrays.html
We do not need assert for the useProgram as program can be null.
* platform/graphics/qt/GraphicsContext3DQt.cpp:
(WebCore::GraphicsContext3D::useProgram): Program can be null. Removing assert.
2011-05-24 Ryosuke Niwa <rniwa@webkit.org>
Reviewed by Darin Adler.
Undo gets broken in contenteditable area when a text field's value is set by script
https://bugs.webkit.org/show_bug.cgi?id=61340
The bug was caused by RenderTextControl::setInnerTextValue's clearing undo stack by
calling clearUndoRedoOperations whenever script sets new value to input or textarea.
Fixed the bug by removing the offending call to clearUndoRedoOperations. While this call
was added by r15565 to fix a crash, SimpleEditCommands have since become much more robust
and the test added by r15565 (fast/forms/text-field-setvalue-crash.html) still passes.
Test: editing/undo/undo-after-setting-value.html
* rendering/RenderTextControl.cpp:
(WebCore::RenderTextControl::setInnerTextValue):
2011-05-24 Dan Bernstein <mitz@apple.com>
Reviewed by Dave Hyatt.
Move code to discover if a CTFont has vertical glyphs out of SimpleFontData::platformInit()
https://bugs.webkit.org/show_bug.cgi?id=61392
* platform/graphics/mac/SimpleFontDataMac.mm:
(WebCore::fontHasVerticalGlyphs): Moved code here...
(WebCore::SimpleFontData::platformInit): ...from here.
2011-05-24 Kenneth Russell <kbr@google.com>
Reviewed by James Robinson.
Implement Float64Array
https://bugs.webkit.org/show_bug.cgi?id=39144
Implemented Float64Array based on the existing Float32Array sources.
Built and tested in Chromium on Linux and Mac OS X and Safari on Mac OS X.
* CMakeLists.txt:
* CodeGenerators.pri:
* DerivedSources.cpp:
* DerivedSources.make:
* GNUmakefile.list.am:
* UseJSC.cmake:
* WebCore.gypi:
* WebCore.pro:
* WebCore.vcproj/WebCore.vcproj:
* WebCore.xcodeproj/project.pbxproj:
* bindings/js/JSBindingsAllInOne.cpp:
* bindings/js/JSDOMWindowCustom.cpp:
(WebCore::JSDOMWindow::float64Array):
* bindings/js/JSFloat64ArrayCustom.cpp: Added.
(WebCore::JSFloat64Array::indexSetter):
(WebCore::toJS):
(WebCore::JSFloat64Array::set):
(WebCore::JSFloat64ArrayConstructor::constructJSFloat64Array):
* bindings/v8/custom/V8Float64ArrayCustom.cpp: Added.
(WebCore::V8Float64Array::constructorCallback):
(WebCore::V8Float64Array::setCallback):
(WebCore::toV8):
* html/canvas/ArrayBufferView.h:
(WebCore::ArrayBufferView::isDoubleArray):
* html/canvas/Float64Array.cpp: Added.
(WebCore::Float64Array::create):
(WebCore::Float64Array::Float64Array):
(WebCore::Float64Array::subarray):
* html/canvas/Float64Array.h: Added.
(WebCore::Float64Array::set):
(WebCore::Float64Array::item):
(WebCore::Float64Array::isDoubleArray):
* html/canvas/Float64Array.idl: Added.
* page/DOMWindow.idl:
* workers/WorkerContext.idl:
2011-05-24 Simon Fraser <simon.fraser@apple.com>
Reviewed by Chris Marrin.
Add ability to set compositing layer bounds origin
https://bugs.webkit.org/show_bug.cgi?id=61381
On Core Animation layers, the origin of the bounds
rectangle affects where layer content is rendered, as well
as the offset of sublayers. Currently we always set the
bounds offset to a zero point, but may need to make use
of the bounds offset in future, so expose it via GraphicsLayer.
* platform/graphics/GraphicsLayer.h:
(WebCore::GraphicsLayer::boundsOrigin):
(WebCore::GraphicsLayer::setBoundsOrigin):
* platform/graphics/ca/GraphicsLayerCA.cpp:
(WebCore::GraphicsLayerCA::setSize):
(WebCore::GraphicsLayerCA::setBoundsOrigin):
(WebCore::GraphicsLayerCA::setAllowTiledLayer):
(WebCore::GraphicsLayerCA::commitLayerChangesBeforeSublayers):
(WebCore::GraphicsLayerCA::updateBounds):
(WebCore::GraphicsLayerCA::ensureStructuralLayer):
(WebCore::GraphicsLayerCA::swapFromOrToTiledLayer):
* platform/graphics/ca/GraphicsLayerCA.h:
2011-05-24 Leandro Pereira <leandro@profusion.mobi>
[EFL] Build fix.
* CMakeLists.txt: Also build platform/network/ContentTypeParser.cpp,
added by r86289.
2011-05-24 Leandro Pereira <leandro@profusion.mobi>
[EFL] Build fix.
* bridge/runtime_root.cpp: Include <heap/Weak.h> instead of
<JavaScriptCore/Weak.h>.
2011-05-24 Jay Civelli <jcivelli@chromium.org>
Reviewed by Adam Barth.
Adding MHTML reading support. That required some basic MIME header parsing.
Modified DocumentLoader to keep a reference to the currently Archive loaded,
so we can have different policies for loading subresources depending on the
archive type.
https://bugs.webkit.org/show_bug.cgi?id=7168
* CMakeLists.txt:
* Configurations/FeatureDefines.xcconfig:
* GNUmakefile.am:
* GNUmakefile.list.am:
* WebCore.gyp/WebCore.gyp:
* WebCore.gypi:
* WebCore.pro:
* WebCore.vcproj/WebCore.vcproj:
* WebCore.xcodeproj/project.pbxproj:
* features.pri:
* loader/DocumentLoader.cpp:
(WebCore::DocumentLoader::commitLoad):
(WebCore::DocumentLoader::setupForReplaceByMIMEType):
(WebCore::DocumentLoader::popArchiveForSubframe):
(WebCore::DocumentLoader::scheduleArchiveLoad):
* loader/DocumentLoader.h:
* loader/FrameLoader.cpp:
(WebCore::FrameLoader::loadURLIntoChildFrame):
(WebCore::FrameLoader::loadArchive):
(WebCore::FrameLoader::stopAllLoaders):
(WebCore::FrameLoader::finishedLoadingDocument):
* loader/FrameLoader.h:
(WebCore::FrameLoader::archive):
* loader/MainResourceLoader.cpp:
(WebCore::MainResourceLoader::continueAfterContentPolicy):
* loader/ResourceLoader.cpp:
(WebCore::ResourceLoader::start):
* loader/archive/Archive.cpp: Added.
* loader/archive/Archive.h:
(WebCore::Archive::mainResource):
* loader/archive/ArchiveFactory.cpp:
(WebCore::archiveFactoryCreate):
(WebCore::archiveMIMETypes):
(WebCore::ArchiveFactory::create):
(WebCore::ArchiveFactory::registerKnownArchiveMIMETypes):
* loader/archive/ArchiveFactory.h:
* loader/archive/ArchiveResourceCollection.cpp:
(WebCore::ArchiveResourceCollection::addAllResources):
(WebCore::ArchiveResourceCollection::popSubframeArchive):
* loader/archive/ArchiveResourceCollection.h:
* loader/archive/cf/LegacyWebArchive.cpp:
(WebCore::LegacyWebArchive::create):
(WebCore::LegacyWebArchive::type):
* loader/archive/cf/LegacyWebArchive.h:
* loader/archive/mhtml/MHTMLArchive.cpp: Added.
* loader/archive/mhtml/MHTMLArchive.h: Added.
* loader/archive/mhtml/MHTMLParser.cpp: Added.
* loader/archive/mhtml/MHTMLParser.h: Added.
* platform/MIMETypeRegistry.cpp:
(WebCore::initializeSupportedNonImageMimeTypes):
* platform/mac/PasteboardMac.mm:
(WebCore::Pasteboard::documentFragment):
* platform/network/MIMEHeader.cpp: Added.
* platform/network/MIMEHeader.h: Added.
2011-05-24 Geoffrey Garen <ggaren@apple.com>
Try to fix some builds: #include Weak.h for Weak<T>.
* bridge/runtime_root.h:
2011-05-24 Sam Weinig <sam@webkit.org>
Reviewed by Beth Dakin.
Can't scroll scaled page that has overflow:hidden on its root
<rdar://problem/9029189>
https://bugs.webkit.org/show_bug.cgi?id=61339
Test: fast/events/scroll-in-scaled-page-with-overflow-hidden.html
* page/FrameView.cpp:
(WebCore::FrameView::applyOverflowToViewport):
Scrollbars should be enabled for the viewport when scaled, even if overflow:hidden
is specified.
2011-05-24 Adam Roben <aroben@apple.com>
Leopard build fix
* bridge/runtime_root.cpp: Added a missing #include.
2011-05-24 Jian Li <jianli@chromium.org>
Reviewed by Kenneth Russell.
Make start parameter of Blob.slice optional.
https://bugs.webkit.org/show_bug.cgi?id=59628
The start parameter should be optional per the latest FILE API
spec: http://dev.w3.org/2006/webapi/FileAPI/#dfn-Blob.
* fileapi/Blob.h:
* fileapi/Blob.idl: Make start parameter optional.
2011-05-24 Adam Roben <aroben@apple.com>
Invalidate RuntimeObjects when they are finalized
This will cause the underlying NPObject to be released at finalization time, rather than at
destruction time (which is unpredictable and could occur after the plugin has been
unloaded).
Test: plugins/npobject-js-wrapper-destroyed-after-plugin-unload.html
Fixes <http://webkit.org/b/61317> <rdar://problem/9489829> Crash in _NPN_DeallocateObject
when reloading yahoo.com webarchive in WebKit1
Reviewed by Oliver Hunt.
* bridge/runtime_object.cpp:
(JSC::Bindings::RuntimeObject::~RuntimeObject): Assert that we've already been invalidated.
* bridge/runtime_root.cpp:
(JSC::Bindings::RootObject::invalidate):
(JSC::Bindings::RootObject::addRuntimeObject):
Updated for m_runtimeObjects type change.
(JSC::Bindings::RootObject::finalize): Added. Invalidates the RuntimeObject and removes it
from the map.
* bridge/runtime_root.h: Now inherits from WeakHandleOwner.
Changed m_runtimeObjects from a WeakGCMap to a HashMap of JSC::Weak objects so that we will
be notified when the RuntimeObjects are finalized.
2011-05-24 Mike Reed <reed@google.com>
Reviewed by Kenneth Russell.
skia: fix stroking of zero-height rectangles
https://bugs.webkit.org/show_bug.cgi?id=61284
Tests: canvas/philip/tests/2d.line.miter.lineedge.html
canvas/philip/tests/2d.strokeRect.zero.4.html
* platform/graphics/skia/GraphicsContextSkia.cpp:
(WebCore::GraphicsContext::strokeRect):
2011-05-24 Zan Dobersek <zandobersek@gmail.com> and Philippe Normand <pnormand@igalia.com>
Reviewed by Kenneth Russell.
Enable FloatArray usage outside WebGL guards
https://bugs.webkit.org/show_bug.cgi?id=61356
* webaudio/AudioBuffer.cpp:
* webaudio/AudioBuffer.idl:
* webaudio/RealtimeAnalyser.cpp:
* webaudio/RealtimeAnalyser.h:
* webaudio/RealtimeAnalyserNode.h:
* webaudio/RealtimeAnalyserNode.idl:
2011-05-24 Adam Klein <adamk@chromium.org>
Unreviewed, rolling out r87145.
http://trac.webkit.org/changeset/87145
https://bugs.webkit.org/show_bug.cgi?id=61194
Regression in LayoutTests/inspector/debugger/scripts-panel.html on Chromium Win & Linux.
* bindings/v8/custom/V8InjectedScriptHostCustom.cpp:
(WebCore::V8InjectedScriptHost::evaluateCallback):
2011-05-24 Matthew Delaney <mdelaney@apple.com>
Reviewed by Simon Fraser.
Clamp coordinates to integers for canvas create/getImageData routines
https://bugs.webkit.org/show_bug.cgi?id=61135
Test: fast/canvas/canvas-getImageData-largeNonintegralDimensions.html
* html/HTMLCanvasElement.cpp:
(WebCore::HTMLCanvasElement::convertLogicalToDevice): clamp to ints
* html/canvas/CanvasRenderingContext2D.cpp:
(WebCore::CanvasRenderingContext2D::createImageData):
(WebCore::CanvasRenderingContext2D::getImageData):
* platform/graphics/cg/ImageBufferDataCG.cpp:
(WebCore::ImageBufferData::getData):
2011-05-24 Robin Dunn <robin@alldunn.com>
Reviewed by Kevin Ollivier.
[wx] Make sure x and y adjustments are applied to all operations, and fix the calculations
for the height and width checks to take into account x and y offsets.
https://bugs.webkit.org/show_bug.cgi?id=61367
* platform/graphics/wx/ImageWx.cpp:
(WebCore::Image::drawPattern):
2011-05-24 Tony Chang <tony@chromium.org>
Reviewed by James Robinson.
fix render overflow computation for input type=range
https://bugs.webkit.org/show_bug.cgi?id=61132
Test: fast/forms/slider-hit-testing.html
We need to clear m_overflow otherwise we use the first
size of the slider for hit testing (i.e., changes to the size
cause problems). This only shows up if the thumb isn't contained
in the bounds of the slider. Making the range have a smaller height
than the thumb shows the bug.
* rendering/RenderSlider.cpp:
(WebCore::RenderSlider::layout): Clear the overflow during layout
so we re-compute the overflow based on the current size of the
slider.
2011-05-24 Alok Priyadarshi <alokp@chromium.org>
Reviewed by James Robinson.
Enable skia gpu rendering for content layers
https://bugs.webkit.org/show_bug.cgi?id=56749
This patch adds gpu accelerated rendering for content and root layers.
Layer textures are updated in two stages:
1. Paint: The non-accelerated path paints the layer contents into a bitmap.
The accelerated path paints into an SkPicture, which is essentially a display list.
2. Upload: The non-accelerated path uploads the pixels obtained in the first stage to a texture.
The accelerated path renders the picture directly into the texture.
The accelerated path can be enabled by --enable-accelerated-drawing command-line flag in chromium.
Note that this patch does not accelerate the CG path on mac. We have two options here - use skia or accelrate CG path.
Any bugs should be caught by layout tests.
* platform/graphics/chromium/ContentLayerChromium.cpp:
(WebCore::ContentLayerChromium::createTextureUpdater):
* platform/graphics/chromium/LayerRendererChromium.cpp:
(WebCore::LayerRendererChromium::create):
(WebCore::LayerRendererChromium::LayerRendererChromium):
(WebCore::LayerRendererChromium::skiaContext):
(WebCore::LayerRendererChromium::updateAndDrawLayers):
(WebCore::LayerRendererChromium::createRootLayerTextureUpdater):
* platform/graphics/chromium/LayerRendererChromium.h:
(WebCore::LayerRendererChromium::acceleratedDrawing):
* platform/graphics/chromium/LayerTextureUpdaterCanvas.cpp:
(WebCore::LayerTextureUpdaterSkPicture::LayerTextureUpdaterSkPicture):
(WebCore::LayerTextureUpdaterSkPicture::~LayerTextureUpdaterSkPicture):
(WebCore::LayerTextureUpdaterSkPicture::prepareToUpdate):
(WebCore::LayerTextureUpdaterSkPicture::updateTextureRect):
(WebCore::LayerTextureUpdaterSkPicture::deleteFrameBuffer):
(WebCore::LayerTextureUpdaterSkPicture::createFrameBuffer):
(WebCore::LayerTextureUpdaterSkPicture::clearFrameBuffer):
* platform/graphics/chromium/LayerTextureUpdaterCanvas.h:
(WebCore::LayerTextureUpdaterSkPicture::orientation):
* platform/graphics/chromium/LayerTilerChromium.cpp:
(WebCore::LayerTilerChromium::updateRect):
(WebCore::LayerTilerChromium::draw):
2011-05-24 Pavel Podivilov <podivilov@chromium.org>
Reviewed by Yury Semikhatsky.
Web Inspector: display keyboard shortcuts in scripts panel sidebar buttons tooltip text.
https://bugs.webkit.org/show_bug.cgi?id=61358
* English.lproj/localizedStrings.js:
* inspector/front-end/CallStackSidebarPane.js:
(WebInspector.CallStackSidebarPane.prototype._selectedPlacardByIndex):
(WebInspector.CallStackSidebarPane.prototype.registerShortcuts):
* inspector/front-end/Panel.js:
(WebInspector.Panel.prototype.registerShortcut):
* inspector/front-end/ScriptsPanel.js:
(WebInspector.ScriptsPanel):
(WebInspector.ScriptsPanel.prototype._createSidebarButtons):
(WebInspector.ScriptsPanel.prototype._createSidebarButtonAndRegisterShortcuts):
2011-05-24 Philippe Normand <pnormand@igalia.com>
Reviewed by Andres Kling.
JSAudioContextCustom doesn't encode errors
https://bugs.webkit.org/show_bug.cgi?id=61357
Fix AudioContext return values
* bindings/js/JSAudioContextCustom.cpp:
(WebCore::JSAudioContextConstructor::constructJSAudioContext):
2011-05-24 Rob Buis <rbuis@rim.com>
Rubber-stamped by Dirk Schulze.
Remove requiresLayer inlines, already provided by RenderSVGModelObject.
* rendering/svg/RenderSVGHiddenContainer.h:
(WebCore::RenderSVGHiddenContainer::isSVGHiddenContainer):
* rendering/svg/RenderSVGImage.h:
2011-05-24 Nikolas Zimmermann <nzimmermann@rim.com>
Not reviewed, build fix.
Remove platform layering violation: TextRun stores RenderObjects for SVG Fonts support
https://bugs.webkit.org/show_bug.cgi?id=60254
Forgot to rename the destructor.
* platform/graphics/SimpleFontData.h:
(WebCore::SimpleFontData::AdditionalFontData::~AdditionalFontData):
2011-05-24 Nikolas Zimmermann <nzimmermann@rim.com>
Not reviewed, build fix.
Remove platform layering violation: TextRun stores RenderObjects for SVG Fonts support
https://bugs.webkit.org/show_bug.cgi?id=60254
Rename SimpleFontData::FontData subclass to AdditionalFontData, to avoid clashes with the WebCore::FontData class, which breaks the win build.
* platform/graphics/SimpleFontData.cpp:
(WebCore::SimpleFontData::SimpleFontData):
* platform/graphics/SimpleFontData.h:
(WebCore::SimpleFontData::fontData):
* svg/SVGFontData.h:
2011-05-24 Nikolas Zimmermann <nzimmermann@rim.com>
Reviewed by Antti Koivisto.
Remove platform layering violation: TextRun stores RenderObjects for SVG Fonts support
https://bugs.webkit.org/show_bug.cgi?id=60254
First part:
Remove a long-standing layering violation in TextRun: it stores RenderObject/RenderSVGResource pointers for SVG Fonts support.
Replace the two Render* pointers with a single RefPtr<AbstractRenderingContext>. AbstractRenderingContext is a helper class,
that can be derived from in order to associate additional data with a TextRun. This effectively reduces the memory consumption of TextRun.
Introduce rendering/TextRunRenderingContext.h, which inherits from TextRun::AbstractRenderingContext and holds additional data.
If the primary font in use is a SVG Font then allocate a TextRunRenderingContext object and store it in the RefPtr<AbstractRenderingContext>
in TextRun. If the primary font is not a SVG Font, don't even allocate the TextRunRenderingContext structure, as we won't need the context data.
SVG Fonts glyph matching only works within a context, so we need access to the RenderObject that's drawing the text.
This is the main preparation patch for the SVG Fonts rewrite, that will allow us to share the simple text code path for SVG Fonts as well,
making all CSS text properties work for HTML text using SVG Fonts, and allows proper integration within the GlyphPage concept. Soon
we can intermix WOFF/SVG & native fonts, within segment font declarations.
Second part:
Remove a long-standing layering violation in SimpleFontData: it stores SVGFontData objects, that are living in svg/.
Use the same concept as above, introduce SimpleFontData::AbstractFontData, and let SVGFontData inherit from AbstractFontData and extent it.
If SVG Fonts are used, CSSFontFaceSource will create a SVGFontData object and pass it as PassOwnPtr<AbstractFontData> to SimpleFontData.
All layering violations are gone now, SVG Fonts are cleanly integrated now.
Doesn't affect any tests yet, refactoring only.
* CMakeLists.txt:
* GNUmakefile.list.am:
* WebCore.gypi:
* WebCore.pro:
* WebCore.vcproj/WebCore.vcproj:
* WebCore.xcodeproj/project.pbxproj:
* css/CSSFontFaceSource.cpp:
(WebCore::CSSFontFaceSource::getFontData):
* platform/graphics/Font.cpp:
(WebCore::Font::drawText):
(WebCore::Font::width):
(WebCore::Font::selectionRectForText):
(WebCore::Font::offsetForPosition):
* platform/graphics/Font.h:
* platform/graphics/SimpleFontData.cpp:
(WebCore::SimpleFontData::SimpleFontData):
(WebCore::SimpleFontData::~SimpleFontData):
* platform/graphics/SimpleFontData.h:
(WebCore::SimpleFontData::FontData::~FontData):
(WebCore::SimpleFontData::fontMetrics):
(WebCore::SimpleFontData::setMaxCharWidth):
(WebCore::SimpleFontData::setAvgCharWidth):
(WebCore::SimpleFontData::setSpaceWidth):
(WebCore::SimpleFontData::setSpaceGlyph):
(WebCore::SimpleFontData::setZeroWidthSpaceGlyph):
(WebCore::SimpleFontData::fontData):
(WebCore::SimpleFontData::isSVGFont):
(WebCore::SimpleFontData::setMissingGlyphData):
* platform/graphics/TextRun.h:
(WebCore::TextRun::TextRun):
(WebCore::TextRun::setAllowTabs):
(WebCore::TextRun::setXPos):
(WebCore::TextRun::RenderingContext::~RenderingContext):
(WebCore::TextRun::renderingContext):
(WebCore::TextRun::setRenderingContext):
* rendering/EllipsisBox.cpp:
(WebCore::EllipsisBox::paint):
(WebCore::EllipsisBox::selectionRect):
(WebCore::EllipsisBox::paintSelection):
* rendering/InlineTextBox.cpp:
(WebCore::InlineTextBox::selectionRect):
(WebCore::InlineTextBox::paint):
(WebCore::InlineTextBox::paintSelection):
(WebCore::InlineTextBox::paintCompositionBackground):
(WebCore::InlineTextBox::paintSpellingOrGrammarMarker):
(WebCore::InlineTextBox::paintTextMatchMarker):
(WebCore::InlineTextBox::computeRectForReplacementMarker):
(WebCore::InlineTextBox::offsetForPosition):
(WebCore::InlineTextBox::positionForOffset):
(WebCore::InlineTextBox::constructTextRun):
* rendering/InlineTextBox.h:
* rendering/RenderBlock.cpp:
(WebCore::stripTrailingSpace):
(WebCore::RenderBlock::constructTextRun):
* rendering/RenderBlock.h:
* rendering/RenderBlockLineLayout.cpp:
(WebCore::setLogicalWidthForTextRun):
(WebCore::textWidth):
(WebCore::tryHyphenating):
(WebCore::RenderBlock::LineBreaker::nextLineBreak):
(WebCore::RenderBlock::checkLinesForTextOverflow):
* rendering/RenderCombineText.cpp:
(WebCore::RenderCombineText::combineText):
* rendering/RenderFileUploadControl.cpp:
(WebCore::RenderFileUploadControl::paintObject):
(WebCore::RenderFileUploadControl::computePreferredLogicalWidths):
* rendering/RenderFlexibleBox.cpp:
(WebCore::RenderFlexibleBox::applyLineClamp):
* rendering/RenderImage.cpp:
(WebCore::RenderImage::setImageSizeForAltText):
(WebCore::RenderImage::paintReplaced):
* rendering/RenderListBox.cpp:
(WebCore::RenderListBox::updateFromElement):
* rendering/RenderListMarker.cpp:
(WebCore::RenderListMarker::paint):
(WebCore::RenderListMarker::computePreferredLogicalWidths):
(WebCore::RenderListMarker::getRelativeMarkerRect):
* rendering/RenderText.cpp:
(WebCore::RenderText::widthFromCache):
(WebCore::RenderText::trimmedPrefWidths):
(WebCore::RenderText::computePreferredLogicalWidths):
(WebCore::RenderText::width):
* rendering/RenderTextControl.cpp:
(WebCore::RenderTextControl::getAvgCharWidth):
* rendering/svg/RenderSVGAllInOne.cpp:
* rendering/svg/SVGInlineTextBox.cpp:
(WebCore::SVGInlineTextBox::offsetForPositionInFragment):
(WebCore::SVGInlineTextBox::prepareGraphicsContextForTextPainting):
(WebCore::SVGInlineTextBox::restoreGraphicsContextAfterTextPainting):
(WebCore::SVGInlineTextBox::constructTextRun):
(WebCore::SVGInlineTextBox::paintText):
* rendering/svg/SVGTextLayoutEngineSpacing.cpp:
(WebCore::SVGTextLayoutEngineSpacing::calculateSVGKerning):
* rendering/svg/SVGTextMetrics.cpp:
(WebCore::constructTextRun):
(WebCore::SVGTextMetrics::measureCharacterRange):
* rendering/svg/SVGTextRunRenderingContext.cpp: Copied from svg/SVGFont.cpp.
(WebCore::svgFontAndFontFaceElementForFontData):
(WebCore::firstParentRendererForNonTextNode):
(WebCore::referencingRenderObjectFromRun):
(WebCore::activePaintingResourceFromRun):
(WebCore::SVGTextRunWalker::walk):
(WebCore::floatWidthMissingGlyphCallback):
(WebCore::floatWidthOfSubStringUsingSVGFont):
(WebCore::SVGTextRunRenderingContext::floatWidthUsingSVGFont):
(WebCore::SVGTextRunRenderingContext::drawTextUsingSVGFont):
(WebCore::SVGTextRunRenderingContext::selectionRectForTextUsingSVGFont):
(WebCore::SVGTextRunRenderingContext::offsetForPositionForTextUsingSVGFont):
* rendering/svg/SVGTextRunRenderingContext.h: Added.
(WebCore::SVGTextRunRenderingContext::create):
(WebCore::SVGTextRunRenderingContext::context):
(WebCore::SVGTextRunRenderingContext::activePaintingResource):
(WebCore::SVGTextRunRenderingContext::setActivePaintingResource):
(WebCore::SVGTextRunRenderingContext::SVGTextRunRenderingContext):
(WebCore::textRunNeedsRenderingContext):
* svg/SVGAllInOne.cpp:
* svg/SVGFont.cpp: Removed.
* svg/SVGFontData.cpp:
(WebCore::SVGFontData::initializeFontData):
* svg/SVGFontData.h:
(WebCore::SVGFontData::create):
(WebCore::SVGFontData::isSVGFontData):
* svg/SVGGlyphElement.cpp:
(WebCore::SVGGlyphElement::SVGGlyphElement):
(WebCore::SVGGlyphElement::buildGenericGlyphIdentifier):
(WebCore::SVGGlyphElement::buildGlyphIdentifier):
* svg/SVGHKernElement.cpp:
(WebCore::SVGHKernElement::SVGHKernElement):
(WebCore::SVGHKernElement::buildHorizontalKerningPair):
* svg/SVGVKernElement.cpp:
(WebCore::SVGVKernElement::SVGVKernElement):
(WebCore::SVGVKernElement::buildVerticalKerningPair):
* svg/SVGVKernElement.h:
2011-05-24 Ryuan Choi <ryuan.choi@samsung.com>
Reviewed by Andreas Kling.
[GTK] Implement GraphicsContextCairo::imageInterpolationQuality().
https://bugs.webkit.org/show_bug.cgi?id=60827
Implement getter/setter of imageInterpolationQuality and logic to change
interpolation algorithm when drawing image.
Mac and Qt already implemented it.
* platform/graphics/cairo/GraphicsContextCairo.cpp:
(WebCore::GraphicsContext::setImageInterpolationQuality):
(WebCore::GraphicsContext::imageInterpolationQuality):
* platform/graphics/cairo/GraphicsContextPlatformPrivateCairo.h:
* platform/graphics/cairo/PlatformContextCairo.cpp:
(WebCore::PlatformContextCairo::drawSurfaceToContext):
* platform/graphics/cairo/PlatformContextCairo.h:
(WebCore::PlatformContextCairo::setImageInterpolationQuality): Added.
(WebCore::PlatformContextCairo::imageInterpolationQuality): Added.
2011-05-24 Leandro Gracia Gil <leandrogracia@chromium.org>
Reviewed by Tony Gentilcore.
Media Stream API: adding Stream and GeneratedStream classes.
https://bugs.webkit.org/show_bug.cgi?id=56666
Add the code for the Stream and GeneratedStream classes and integrate it
with the existing stream generation requests.
Tests for the Media Stream API will be provided by the bug 56587.
* CMakeLists.txt:
* CodeGenerators.pri:
* DerivedSources.cpp:
* DerivedSources.make:
* GNUmakefile.list.am:
* WebCore.gypi:
* WebCore.pro:
* WebCore.vcproj/WebCore.vcproj:
* WebCore.xcodeproj/project.pbxproj:
* bindings/js/JSEventTarget.cpp:
(WebCore::toJS):
* bindings/v8/V8DOMWrapper.cpp:
(WebCore::V8DOMWrapper::convertEventTargetToV8Object):
* dom/DOMAllInOne.cpp:
* dom/EventTarget.cpp:
(WebCore::EventTarget::toStream):
(WebCore::EventTarget::toGeneratedStream):
* dom/EventTarget.h:
* dom/GeneratedStream.cpp: Added.
(WebCore::GeneratedStream::DispatchUpdateTask::create):
(WebCore::GeneratedStream::DispatchUpdateTask::performTask):
(WebCore::GeneratedStream::DispatchUpdateTask::DispatchUpdateTask):
(WebCore::GeneratedStream::create):
(WebCore::GeneratedStream::GeneratedStream):
(WebCore::GeneratedStream::~GeneratedStream):
(WebCore::GeneratedStream::toGeneratedStream):
(WebCore::GeneratedStream::detachEmbedder):
(WebCore::GeneratedStream::stop):
(WebCore::GeneratedStream::onStop):
* dom/GeneratedStream.h: Added.
* dom/GeneratedStream.idl: Added.
* dom/Stream.cpp: Added.
(WebCore::Stream::create):
(WebCore::Stream::Stream):
(WebCore::Stream::~Stream):
(WebCore::Stream::toStream):
(WebCore::Stream::streamEnded):
(WebCore::Stream::scriptExecutionContext):
(WebCore::Stream::eventTargetData):
(WebCore::Stream::ensureEventTargetData):
* dom/Stream.h: Added.
(WebCore::Stream::readyState):
(WebCore::Stream::label):
(WebCore::Stream::refEventTarget):
(WebCore::Stream::derefEventTarget):
* dom/Stream.idl: Added.
* page/CallbackTask.h:
(WebCore::CallbackTask1::Scheduler::~Scheduler):
* page/MediaStreamClient.h:
* page/MediaStreamController.cpp:
(WebCore::MediaStreamController::stopGeneratedStream):
(WebCore::MediaStreamController::streamFailed):
* page/MediaStreamController.h:
* page/MediaStreamFrameController.cpp:
(WebCore::MediaStreamFrameController::Request::Request):
(WebCore::MediaStreamFrameController::GenerateStreamRequest::create):
(WebCore::MediaStreamFrameController::GenerateStreamRequest::abort):
(WebCore::MediaStreamFrameController::GenerateStreamRequest::GenerateStreamRequest):
(WebCore::MediaStreamFrameController::unregister):
(WebCore::MediaStreamFrameController::getStreamFromLabel):
(WebCore::MediaStreamFrameController::generateStream):
(WebCore::MediaStreamFrameController::stopGeneratedStream):
(WebCore::MediaStreamFrameController::streamGenerated):
(WebCore::MediaStreamFrameController::streamGenerationFailed):
(WebCore::MediaStreamFrameController::streamFailed):
* page/MediaStreamFrameController.h:
(WebCore::MediaStreamFrameController::StreamClient::StreamClient):
(WebCore::MediaStreamFrameController::StreamClient::isGeneratedStream):
* page/NavigatorUserMediaError.h:
(WebCore::NavigatorUserMediaError::create):
(WebCore::NavigatorUserMediaError::NavigatorUserMediaError):
* page/NavigatorUserMediaSuccessCallback.h:
* page/NavigatorUserMediaSuccessCallback.idl:
2011-05-23 Antti Koivisto <antti@apple.com>
Reviewed by Oliver Hunt.
REGRESSION (r45620): Node list caches never deleted
https://bugs.webkit.org/show_bug.cgi?id=61268
<rdar://problem/9467379>
NodeListsNodeData::isEmpty() tests if RefCounted objects have refcount of zero which is impossible.
As a results NodeList caches are never deleted, causing bad performance in DOM mutating operations as
they repeatedly invalidate caches.
* dom/Node.cpp:
(WebCore::Node::childNodes):
Construct m_childNodeListCaches lazily.
(WebCore::Node::unregisterDynamicNodeList):
(WebCore::Node::notifyLocalNodeListsAttributeChanged):
(WebCore::Node::notifyLocalNodeListsChildrenChanged):
(WebCore::Node::removeNodeListCacheIfPossible):
Add a helper.
(WebCore::NodeListsNodeData::invalidateCaches):
Invalidate m_childNodeListCaches by clearing it if there are no additional clients
(WebCore::NodeListsNodeData::isEmpty):
Test emptiness of various NodeListCaches simply by testing hash emptiness instead of testing for non-zero ref count of items.
m_childNodeListCaches is empty if it is null.
* dom/Node.h:
* dom/NodeRareData.h:
(WebCore::NodeListsNodeData::NodeListsNodeData):
Construct m_childNodeListCaches lazily.
2011-05-24 Mikhail Naganov <mnaganov@chromium.org>
Reviewed by Yury Semikhatsky.
Web Inspector: Reorganize InspectorBackendDispatch code to eliminate duplication
https://bugs.webkit.org/show_bug.cgi?id=61300
* inspector/CodeGeneratorInspector.pm:
2011-05-23 Yury Semikhatsky <yurys@chromium.org>
Reviewed by Adam Barth.
Chromium DevTools: Tab crashes with "Aw, snap!" on entering "(new Image())." in console
https://bugs.webkit.org/show_bug.cgi?id=61194
Test: inspector/console/console-eval-syntax-error.html
* bindings/v8/custom/V8InjectedScriptHostCustom.cpp:
(WebCore::V8InjectedScriptHost::evaluateCallback): return immediately in case of syntax error
2011-04-13 Steve Block <steveblock@google.com>
Reviewed by Eric Seidel.
Geolocation callbacks should make use of new callback generation mechanism
https://bugs.webkit.org/show_bug.cgi?id=40065
No new tests, refactoring only.
* Android.derived.jscbindings.mk:
* Android.derived.v8bindings.mk:
* Android.jscbindings.mk:
* Android.v8bindings.mk:
* CMakeLists.txt:
* CodeGenerators.pri:
* DerivedSources.cpp:
* DerivedSources.make:
* GNUmakefile.list.am:
* UseJSC.cmake:
* WebCore.gypi:
* WebCore.order:
* WebCore.pro:
* WebCore.vcproj/WebCore.vcproj:
* WebCore.xcodeproj/project.pbxproj:
* bindings/js/JSBindingsAllInOne.cpp:
* bindings/js/JSCustomPositionCallback.cpp: Removed.
* bindings/js/JSCustomPositionCallback.h: Removed.
* bindings/js/JSCustomPositionErrorCallback.cpp: Removed.
* bindings/js/JSCustomPositionErrorCallback.h: Removed.
* bindings/js/JSGeolocationCustom.cpp:
(WebCore::JSGeolocation::getCurrentPosition):
(WebCore::JSGeolocation::watchPosition):
* bindings/v8/custom/V8CustomPositionCallback.cpp: Removed.
* bindings/v8/custom/V8CustomPositionCallback.h: Removed.
* bindings/v8/custom/V8CustomPositionErrorCallback.cpp: Removed.
* bindings/v8/custom/V8CustomPositionErrorCallback.h: Removed.
* bindings/v8/custom/V8GeolocationCustom.cpp:
(WebCore::V8Geolocation::getCurrentPositionCallback):
(WebCore::V8Geolocation::watchPositionCallback):
* page/PositionCallback.h:
* page/PositionCallback.idl: Added.
* page/PositionErrorCallback.h:
* page/PositionErrorCallback.idl: Added.
2011-05-23 Pavel Podivilov <podivilov@chromium.org>
Reviewed by Yury Semikhatsky.
Web Inspector: watched expressions buttons do not match inspector styles.
https://bugs.webkit.org/show_bug.cgi?id=30554
* WebCore.gypi:
* inspector/front-end/BreakpointsSidebarPane.js:
(WebInspector.XHRBreakpointsSidebarPane):
* inspector/front-end/Images/deleteIcon.png: Added.
* inspector/front-end/Images/paneRefreshButtons.png: Added.
* inspector/front-end/WatchExpressionsSidebarPane.js:
(WebInspector.WatchExpressionsSidebarPane.prototype.reset):
(WebInspector.WatchExpressionsSidebarPane.prototype._addButtonClicked):
(WebInspector.WatchExpressionsSidebarPane.prototype._refreshButtonClicked):
(WebInspector.WatchExpressionsSidebarPane.prototype.refreshExpressions):
(WebInspector.WatchExpressionsSection):
(WebInspector.WatchExpressionsSection.prototype.update.appendResult):
(WebInspector.WatchExpressionsSection.prototype.update):
(WebInspector.WatchExpressionsSection.prototype.saveExpressions):
(WebInspector.WatchExpressionsSection.prototype._mouseMove):
(WebInspector.WatchExpressionsSection.prototype._mouseOut):
(WebInspector.WatchExpressionsSection.prototype._updateHoveredElement):
(WebInspector.WatchExpressionsSection.CompareProperties):
(WebInspector.WatchExpressionTreeElement.prototype.update):
(WebInspector.WatchExpressionTreeElement.prototype.editingCancelled):
* inspector/front-end/WebKit.qrc:
* inspector/front-end/inspector.css:
(.properties-tree.watch-expressions):
(.properties-tree.watch-expressions li):
(.section .properties .delete-button):
(.section .properties li.hovered .delete-button):
(.pane > .title > .pane-title-button):
(.pane > .title > .pane-title-button:hover):
(.pane > .title > .pane-title-button:active):
(.pane > .title > .pane-title-button.add):
(.pane > .title > .pane-title-button.refresh):
2011-05-24 Yuta Kitamura <yutak@chromium.org>
Reviewed by Kent Tamura.
WebSocket: Add fail() to WebSocketChannel and its family
https://bugs.webkit.org/show_bug.cgi?id=61277
This is the first part of refactoring effort described in bug 61115.
Existing error reports will be modified to use fail() in a later patch.
No change in behavior, thus no new tests.
* websockets/ThreadableWebSocketChannel.h:
* websockets/WebSocketChannel.cpp:
(WebCore::WebSocketChannel::fail):
* websockets/WebSocketChannel.h:
* websockets/WorkerThreadableWebSocketChannel.cpp:
(WebCore::WorkerThreadableWebSocketChannel::fail):
(WebCore::WorkerThreadableWebSocketChannel::Peer::fail):
(WebCore::WorkerThreadableWebSocketChannel::mainThreadFail):
(WebCore::WorkerThreadableWebSocketChannel::Bridge::fail):
* websockets/WorkerThreadableWebSocketChannel.h:
2011-05-24 Andras Becsi <abecsi@webkit.org>
Reviewed by Csaba Osztrogonác.
[Qt][V8] REGRESSION (r87063): Fix the build.
https://bugs.webkit.org/show_bug.cgi?id=61290
No new tests needed.
* bindings/scripts/CodeGeneratorV8.pm: disable the unsupported call
tracked in: https://bugs.webkit.org/show_bug.cgi?id=61291
2011-05-24 Naoki Takano <takano.naoki@gmail.com>
Reviewed by Kent Tamura.
[Chromium]Add clipping for listBox in popup window to fix wrong location display when the autofill item is really long.
https://bugs.webkit.org/show_bug.cgi?id=61252
http://code.google.com/p/chromium/issues/detail?id=83539
Manual test: manual-tests/autofill-popup-location.html.
* manual-tests/autofill-popup-location.html: With long long text, test the shown location is correct.
* platform/chromium/PopupMenuChromium.cpp:
(WebCore::PopupListBox::setBaseWidth): Clip width with m_maxWindowWidth.
(WebCore::PopupListBox::PopupListBox): Add m_maxWindowWidth initialization.
(WebCore::PopupContainer::layoutAndCalculateWidgetRect): Call setMaxWidthAndLayout() when the width is clipped with screen size.
(WebCore::PopupListBox::setMaxWidthAndLayout): Set m_maxWindowWidth and call layout().
(WebCore::PopupListBox::layout): Compare renewed windowWidth and m_maxWindowWidth, and clip the it.
2011-05-24 James Robinson <jamesr@chromium.org>
Reviewed by Kenneth Russell.
[chromium] Properly handle huge initial dimensions for 2d canvas when accelerated 2d canvas is enabled
https://bugs.webkit.org/show_bug.cgi?id=60077
Return NULL from DrawingBuffer::create() if the initial dimensions are larger than we can support in hardware so
that we properly use the software canvas path and not enable the compositor for the canvas.
compositing/tiling/huge-layer-img.html triggers this case by trying to create a 20000 pixel high canvas. The
failure was previously masked by other bugs fixed by r85661.
* platform/graphics/chromium/DrawingBufferChromium.cpp:
(WebCore::DrawingBuffer::DrawingBuffer):
Return NULL from DrawingBuffer::create() if resize() fails.
2011-05-24 Fumitoshi Ukai <ukai@chromium.org>
Reviewed by Adam Barth.
close before open WebSocket doesn't fire close event.
https://bugs.webkit.org/show_bug.cgi?id=57301
In platformClose(), m_readStream may be 0 until proxy is resolved.
It should callback didClose() in such case.
Test: http/tests/websocket/tests/close-before-open.html
* platform/network/cf/SocketStreamHandleCFNet.cpp:
(WebCore::SocketStreamHandle::platformClose):
2011-05-23 Sheriff Bot <webkit.review.bot@gmail.com>
Unreviewed, rolling out r87118.
http://trac.webkit.org/changeset/87118
https://bugs.webkit.org/show_bug.cgi?id=61347
patch breaks layout tests
(https://bugs.webkit.org/show_bug.cgi?id=61342), and chromium
tests (browser_test MacTestCmdUp and ui_test Scrollbar)
(Requested by ukai_ on #webkit).
* WebCore.gyp/WebCore.gyp:
* WebCore.gypi:
* platform/ScrollAnimator.cpp:
* platform/chromium/ScrollAnimatorChromiumMac.h: Removed.
* platform/chromium/ScrollAnimatorChromiumMac.mm: Removed.
* platform/graphics/IntPoint.h:
2011-05-23 Julien Chaffraix <jchaffraix@codeaurora.org>
Reviewed by Adam Barth.
Remove Node::deprecatedParserAddChild
https://bugs.webkit.org/show_bug.cgi?id=60818
No new tests as this is just a removal.
* dom/ContainerNode.cpp:
* dom/ContainerNode.h:
* dom/Node.cpp:
* dom/Node.h:
Removed the method now that the last instance got removed as part of the <input>
shadow DOM refactoring.
2011-05-23 Dirk Schulze <krit@webkit.org>
Reviewed by Darin Adler.
SVGTextPositioning attributes are marked as NumberList instead of LengthList
https://bugs.webkit.org/show_bug.cgi?id=61301
SVGTextPositioningElement attributes x, y, dx and dy were marked as AnimatedNumberList
instead of AnimatedLengthList.
See specification http://www.w3.org/TR/SVG/text.html#InterfaceSVGTextPositioningElement
This does not affect the behavior, since we do not respect SVG units in SMIL animation yet.
No new tests added.
* svg/SVGTextPositioningElement.cpp:
(WebCore::SVGTextPositioningElement::fillPassedAttributeToPropertyTypeMap):
2011-05-19 MORITA Hajime <morrita@google.com>
Reviewed by Dimitri Glazkov.
[Refactoring] Pass NodeRenderingContext to Node::rendererIsNeeded()
https://bugs.webkit.org/show_bug.cgi?id=61114
- Extracted NodeRenderingContext from NodeRendererFactory, giving separate files to it.
- Changed signature rendererIsNeeded(RenderStyle*)
to rendererIsNeeded(const NodeRenderingContext&).
The style object is retrieved from NodeRendererFactory::style()
This will allow rendererIsNeeded() to access contextual
information like attaching phase and rendering-parent.
No new tests. No behaviour change.
* CMakeLists.txt:
* GNUmakefile.list.am:
* WebCore.gypi:
* WebCore.pro:
* WebCore.vcproj/WebCore.vcproj:
* WebCore.xcodeproj/project.pbxproj:
* dom/CharacterData.cpp:
(WebCore::CharacterData::updateRenderer): Pass unresolved NodeRenderingContext& to rendererIsNeeded()
(WebCore::CharacterData::rendererIsNeeded):
* dom/CharacterData.h:
* dom/DOMAllInOne.cpp:
* dom/EditingText.cpp:
(WebCore::EditingText::rendererIsNeeded):
* dom/EditingText.h:
* dom/Node.cpp:
(WebCore::Node::parentNodeForRenderingAndStyle):
(WebCore::Node::rendererIsNeeded):
* dom/Node.h:
* dom/NodeRenderingContext.cpp: Added.
(WebCore::NodeRenderingContext::NodeRenderingContext):
(WebCore::NodeRenderingContext::~NodeRenderingContext):
(WebCore::NodeRenderingContext::setStyle):
(WebCore::NodeRenderingContext::releaseStyle):
(WebCore::NodeRenderingContext::nextRenderer):
(WebCore::NodeRenderingContext::parentRenderer):
(WebCore::NodeRenderingContext::hostChildrenChanged):
(WebCore::NodeRenderingContext::shouldCreateRenderer):
(WebCore::NodeRendererFactory::NodeRendererFactory):
(WebCore::NodeRendererFactory::createRendererAndStyle):
(WebCore::wrapWithRenderFullScreen):
(WebCore::NodeRendererFactory::createRendererIfNeeded):
* dom/NodeRenderingContext.h: Added.
(WebCore::NodeRenderingContext::node):
(WebCore::NodeRenderingContext::parentNodeForRenderingAndStyle):
(WebCore::NodeRenderingContext::style):
(WebCore::NodeRendererFactory::context):
* dom/ShadowContentElement.h:
* dom/Text.cpp:
* dom/Text.h:
* html/HTMLAppletElement.cpp:
* html/HTMLAppletElement.h:
* html/HTMLElement.cpp:
* html/HTMLElement.h:
* html/HTMLEmbedElement.cpp:
* html/HTMLEmbedElement.h:
* html/HTMLFormElement.cpp:
* html/HTMLFormElement.h:
* html/HTMLFrameElement.cpp:
* html/HTMLFrameElement.h:
* html/HTMLFrameSetElement.cpp:
* html/HTMLFrameSetElement.h:
* html/HTMLIFrameElement.cpp:
* html/HTMLIFrameElement.h:
* html/HTMLInputElement.cpp:
* html/HTMLInputElement.h:
* html/HTMLMediaElement.cpp:
* html/HTMLMediaElement.h:
* html/HTMLNoScriptElement.h:
* html/HTMLObjectElement.cpp:
* html/HTMLObjectElement.h:
* html/HTMLOptGroupElement.h:
* html/HTMLOptionElement.h:
* html/HTMLVideoElement.cpp:
* html/HTMLVideoElement.h:
* html/shadow/DetailsMarkerControl.cpp:
* html/shadow/DetailsMarkerControl.h:
* html/shadow/MeterShadowElement.cpp:
* html/shadow/MeterShadowElement.h:
* html/shadow/ProgressShadowElement.cpp:
* html/shadow/ProgressShadowElement.h:
* svg/SVGDescElement.h:
* svg/SVGElement.h:
* svg/SVGFilterPrimitiveStandardAttributes.cpp:
* svg/SVGFilterPrimitiveStandardAttributes.h:
* svg/SVGFontElement.h:
* svg/SVGGElement.cpp:
* svg/SVGGElement.h:
* svg/SVGGlyphElement.h:
* svg/SVGHKernElement.h:
* svg/SVGMarkerElement.h:
* svg/SVGMissingGlyphElement.h:
* svg/SVGSVGElement.h:
* svg/SVGStyledElement.cpp:
* svg/SVGStyledElement.h:
* svg/SVGSymbolElement.h:
* svg/SVGTRefElement.cpp:
* svg/SVGTRefElement.h:
* svg/SVGTSpanElement.cpp:
* svg/SVGTSpanElement.h:
* svg/SVGTextPathElement.cpp:
* svg/SVGTextPathElement.h:
* svg/SVGTitleElement.h:
* svg/SVGVKernElement.h:
* svg/SVGViewElement.h:
2011-05-20 MORITA Hajime <morrita@google.com>
Reviewed by Dimitri Glazkov.
[Refactoring] attach() following detach() should be replaced with Node::reattach()
https://bugs.webkit.org/show_bug.cgi?id=61011
- Renamed forceReattach() to reattach()
- Introduced reattachIfAttached() as a variant.
No new tests. No behavior change.
* dom/CharacterData.cpp:
(WebCore::CharacterData::updateRenderer):
* dom/Element.cpp:
(WebCore::Element::recalcStyle):
* dom/Node.h:
(WebCore::Node::reattach):
(WebCore::Node::reattachIfAttached):
* dom/Text.cpp:
(WebCore::Text::recalcStyle):
* html/HTMLDetailsElement.cpp:
(WebCore::HTMLDetailsElement::refreshMainSummary):
(WebCore::HTMLDetailsElement::parseMappedAttribute):
* html/HTMLInputElement.cpp:
(WebCore::HTMLInputElement::parseMappedAttribute):
* html/HTMLObjectElement.cpp:
(WebCore::HTMLObjectElement::renderFallbackContent):
* html/HTMLPlugInImageElement.cpp:
(WebCore::HTMLPlugInImageElement::recalcStyle):
* html/HTMLSelectElement.cpp:
(WebCore::HTMLSelectElement::parseMappedAttribute):
2011-05-23 Mark Rowe <mrowe@apple.com>
Build fix after r87117.
When moving #defines out in to separate files I find that code is more likely to compile
when the new header file is actually #included.
* editing/SpellingCorrectionController.h:
2011-05-23 Mike Lawther <mikelawther@chromium.org>
Reviewed by James Robinson.
implement image-rendering: optimize-contrast (with a vendor prefix) as defined in CSS3 image values
https://bugs.webkit.org/show_bug.cgi?id=56627
Tests: css3/images/optimize-contrast-canvas.html
css3/images/optimize-contrast-image.html
* WebCore.xcodeproj/project.pbxproj:
* css/CSSComputedStyleDeclaration.cpp:
(WebCore::CSSComputedStyleDeclaration::getPropertyCSSValue):
* css/CSSParser.cpp:
(WebCore::CSSParser::parseValue):
* css/CSSPrimitiveValueMappings.h:
(WebCore::CSSPrimitiveValue::CSSPrimitiveValue):
(WebCore::CSSPrimitiveValue::operator EImageRendering):
* css/CSSPropertyNames.in:
* css/CSSStyleSelector.cpp:
(WebCore::CSSStyleSelector::applyProperty):
* css/CSSValueKeywords.in:
* css/SVGCSSComputedStyleDeclaration.cpp:
(WebCore::CSSComputedStyleDeclaration::getSVGPropertyCSSValue):
* css/SVGCSSPropertyNames.in:
* css/SVGCSSStyleSelector.cpp:
(WebCore::CSSStyleSelector::applySVGProperty):
* css/SVGCSSValueKeywords.in:
* html/HTMLCanvasElement.cpp:
(WebCore::HTMLCanvasElement::paint):
* html/HTMLCanvasElement.h:
* platform/graphics/ImageRenderingMode.h: Added.
* rendering/RenderBoxModelObject.cpp:
(WebCore::ImageQualityController::shouldPaintAtLowQuality):
* rendering/RenderHTMLCanvas.cpp:
(WebCore::RenderHTMLCanvas::paintReplaced):
* rendering/style/RenderStyle.cpp:
(WebCore::RenderStyle::diff):
* rendering/style/RenderStyle.h:
(WebCore::InheritedFlags::imageRendering):
(WebCore::InheritedFlags::setImageRendering):
(WebCore::InheritedFlags::initialImageRendering):
* rendering/style/RenderStyleConstants.h:
* rendering/style/SVGRenderStyle.cpp:
(WebCore::SVGRenderStyle::diff):
* rendering/style/SVGRenderStyle.h:
(WebCore::SVGRenderStyle::InheritedFlags::operator==):
(WebCore::SVGRenderStyle::setBitDefaults):
* rendering/style/SVGRenderStyleDefs.h:
* rendering/svg/SVGRenderTreeAsText.cpp:
(WebCore::writeStyle):
2011-05-23 Sailesh Agrawal <sail@chromium.org>
Reviewed by James Robinson.
Chromium Mac: Use ScrollAnimatorMac.mm for overlay scrollbar support
https://bugs.webkit.org/show_bug.cgi?id=59753
No new tests. Just forking ScrollAnimatorMac to ScrollAnimatorChromiumMac.
* WebCore.gyp/WebCore.gyp:
* WebCore.gypi:
* platform/ScrollAnimator.cpp:
* platform/chromium/ScrollAnimatorChromiumMac.h: Added.
(WebCore::ScrollAnimatorChromiumMac::setIsDrawingIntoLayer):
(WebCore::ScrollAnimatorChromiumMac::isDrawingIntoLayer):
(WebCore::ScrollAnimatorChromiumMac::haveScrolledSincePageLoad):
* platform/chromium/ScrollAnimatorChromiumMac.mm: Added. Forked from ScrollAnimatorMac and replaced all instances of ScrollAnimatorMac with ScrollAnimatorChromiumMac and ScrollbarThemeMac with ScrollbarThemeChromiumMac. Removed the ENABLE(SMOOTH_SCROLLING) around the file.
(abs):
(-[ScrollAnimationHelperDelegate initWithScrollAnimator:WebCore::]):
(-[ScrollAnimationHelperDelegate scrollAnimatorDestroyed]):
(-[ScrollAnimationHelperDelegate bounds]):
(-[ScrollAnimationHelperDelegate _immediateScrollToPoint:]):
(-[ScrollAnimationHelperDelegate _pixelAlignProposedScrollPosition:]):
(-[ScrollAnimationHelperDelegate convertSizeToBase:]):
(-[ScrollAnimationHelperDelegate convertSizeFromBase:]):
(-[ScrollAnimationHelperDelegate convertSizeToBacking:]):
(-[ScrollAnimationHelperDelegate convertSizeFromBacking:]):
(-[ScrollAnimationHelperDelegate superview]):
(-[ScrollAnimationHelperDelegate documentView]):
(-[ScrollAnimationHelperDelegate window]):
(-[ScrollAnimationHelperDelegate _recursiveRecomputeToolTips]):
(-[ScrollbarPainterControllerDelegate initWithScrollAnimator:WebCore::]):
(-[ScrollbarPainterControllerDelegate scrollAnimatorDestroyed]):
(-[ScrollbarPainterControllerDelegate contentAreaRectForScrollerImpPair:]):
(-[ScrollbarPainterControllerDelegate inLiveResizeForScrollerImpPair:]):
(-[ScrollbarPainterControllerDelegate mouseLocationInContentAreaForScrollerImpPair:]):
(-[ScrollbarPainterControllerDelegate scrollerImpPair:convertContentPoint:toScrollerImp:]):
(-[ScrollbarPainterControllerDelegate scrollerImpPair:setContentAreaNeedsDisplayInRect:]):
(-[ScrollbarPainterControllerDelegate scrollerImpPair:updateScrollerStyleForNewRecommendedScrollerStyle:]):
(-[ScrollbarPartAnimation initWithScrollbarPainter:part:WebCore::scrollAnimator:WebCore::animateAlphaTo:duration:]):
(-[ScrollbarPartAnimation setCurrentProgress:]):
(-[ScrollbarPartAnimation scrollAnimatorDestroyed]):
(-[ScrollbarPainterDelegate initWithScrollAnimator:WebCore::]):
(-[ScrollbarPainterDelegate cancelAnimations]):
(-[ScrollbarPainterDelegate convertRectToBacking:]):
(-[ScrollbarPainterDelegate convertRectFromBacking:]):
(-[ScrollbarPainterDelegate layer]):
(-[ScrollbarPainterDelegate setUpAnimation:scrollerPainter:part:WebCore::animateAlphaTo:duration:]):
(-[ScrollbarPainterDelegate scrollerImp:animateKnobAlphaTo:duration:]):
(-[ScrollbarPainterDelegate scrollerImp:animateTrackAlphaTo:duration:]):
(-[ScrollbarPainterDelegate scrollerImp:overlayScrollerStateChangedTo:]):
(-[ScrollbarPainterDelegate scrollAnimatorDestroyed]):
(WebCore::ScrollAnimator::create):
(WebCore::ScrollAnimatorChromiumMac::ScrollAnimatorChromiumMac):
(WebCore::ScrollAnimatorChromiumMac::~ScrollAnimatorChromiumMac):
(WebCore::ScrollAnimatorChromiumMac::scroll):
(WebCore::ScrollAnimatorChromiumMac::scrollToOffsetWithoutAnimation):
(WebCore::ScrollAnimatorChromiumMac::adjustScrollXPositionIfNecessary):
(WebCore::ScrollAnimatorChromiumMac::adjustScrollYPositionIfNecessary):
(WebCore::ScrollAnimatorChromiumMac::adjustScrollPositionIfNecessary):
(WebCore::ScrollAnimatorChromiumMac::immediateScrollToPoint):
(WebCore::ScrollAnimatorChromiumMac::immediateScrollByDeltaX):
(WebCore::ScrollAnimatorChromiumMac::immediateScrollByDeltaY):
(WebCore::ScrollAnimatorChromiumMac::notityPositionChanged):
(WebCore::ScrollAnimatorChromiumMac::contentAreaWillPaint):
(WebCore::ScrollAnimatorChromiumMac::mouseEnteredContentArea):
(WebCore::ScrollAnimatorChromiumMac::mouseExitedContentArea):
(WebCore::ScrollAnimatorChromiumMac::mouseMovedInContentArea):
(WebCore::ScrollAnimatorChromiumMac::willStartLiveResize):
(WebCore::ScrollAnimatorChromiumMac::contentsResized):
(WebCore::ScrollAnimatorChromiumMac::willEndLiveResize):
(WebCore::ScrollAnimatorChromiumMac::contentAreaDidShow):
(WebCore::ScrollAnimatorChromiumMac::contentAreaDidHide):
(WebCore::ScrollAnimatorChromiumMac::didBeginScrollGesture):
(WebCore::ScrollAnimatorChromiumMac::didEndScrollGesture):
(WebCore::ScrollAnimatorChromiumMac::didAddVerticalScrollbar):
(WebCore::ScrollAnimatorChromiumMac::willRemoveVerticalScrollbar):
(WebCore::ScrollAnimatorChromiumMac::didAddHorizontalScrollbar):
(WebCore::ScrollAnimatorChromiumMac::willRemoveHorizontalScrollbar):
(WebCore::ScrollAnimatorChromiumMac::cancelAnimations):
(WebCore::elasticDeltaForTimeDelta):
(WebCore::reboundDeltaForElasticDelta):
(WebCore::elasticDeltaForReboundDelta):
(WebCore::scrollWheelMultiplier):
(WebCore::ScrollAnimatorChromiumMac::handleWheelEvent):
(WebCore::ScrollAnimatorChromiumMac::handleGestureEvent):
(WebCore::ScrollAnimatorChromiumMac::pinnedInDirection):
(WebCore::ScrollAnimatorChromiumMac::allowsVerticalStretching):
(WebCore::ScrollAnimatorChromiumMac::allowsHorizontalStretching):
(WebCore::ScrollAnimatorChromiumMac::smoothScrollWithEvent):
(WebCore::ScrollAnimatorChromiumMac::beginScrollGesture):
(WebCore::ScrollAnimatorChromiumMac::endScrollGesture):
(WebCore::ScrollAnimatorChromiumMac::snapRubberBand):
(WebCore::roundTowardZero):
(WebCore::roundToDevicePixelTowardZero):
(WebCore::ScrollAnimatorChromiumMac::snapRubberBandTimerFired):
(WebCore::ScrollAnimatorChromiumMac::startScrollbarPaintTimer):
(WebCore::ScrollAnimatorChromiumMac::scrollbarPaintTimerIsActive):
(WebCore::ScrollAnimatorChromiumMac::stopScrollbarPaintTimer):
(WebCore::ScrollAnimatorChromiumMac::initialScrollbarPaintTimerFired):
(WebCore::ScrollAnimatorChromiumMac::setVisibleScrollerThumbRect):
* platform/graphics/IntPoint.h:
2011-05-22 MORITA Hajime <morrita@google.com>
Reviewed by Ryosuke Niwa.
SUPPORT_AUTOCORRECTION_PANEL should be USE(AUTOCORRECTION_PANEL)
https://bugs.webkit.org/show_bug.cgi?id=61181
- Removed SUPPORT_AUTOCORRECTION_PANEL and REMOVE_MARKERS_UPON_EDITING from SpellingCorrectionController.h
- Define WTF_USE_UNIFIED_TEXT_CHECKING and WTF_USE_AUTOMATIC_TEXT_REPLACEMENT at TextChecking.h
No new tests. Just renaming a compilation conditional.
* editing/Editor.cpp:
(WebCore::Editor::markAllMisspellingsAndBadGrammarInRanges):
* editing/SpellingCorrectionCommand.cpp:
(WebCore::SpellingCorrectionCommand::doApply):
* editing/SpellingCorrectionController.cpp:
* editing/SpellingCorrectionController.h:
(WebCore::SpellingCorrectionController::shouldRemoveMarkersUponEditing):
* loader/EmptyClients.h:
* page/EditorClient.h:
* platform/text/TextChecking.h:
2011-05-23 Sheriff Bot <webkit.review.bot@gmail.com>
Unreviewed, rolling out r87007.
http://trac.webkit.org/changeset/87007
https://bugs.webkit.org/show_bug.cgi?id=61329
patch unnecessarily breaks HTML5 compatibility (Requested by
estes on #webkit).
* html/HTMLObjectElement.cpp:
(WebCore::HTMLObjectElement::hasValidClassId):
2011-05-23 Julien Chaffraix <jchaffraix@codeaurora.org>
Reviewed by Darin Adler.
Crash from null pointer dereference below WebCore::StorageAreaImpl::setItem()
https://bugs.webkit.org/show_bug.cgi?id=57140
Test: fast/storage/storage-detached-iframe.html
Access of localStorage on a detached iframe was causing a crash because a detached
iframe has a null m_page, and WebCore::privateBrowsingEnabled() wasn't testing for such.
* storage/StorageAreaImpl.cpp:
(WebCore::privateBrowsingEnabled): check that child->page() is non-null before
accessing it.
2011-05-23 Chris Fleizach <cfleizach@apple.com>
Reviewed by David Kilzer.
VO doesn't work with HTML5 range (slider) input @step attribute
https://bugs.webkit.org/show_bug.cgi?id=61298
Test: platform/mac/accessibility/range-alter-by-step.html
* accessibility/AccessibilityObject.h:
(WebCore::AccessibilityObject::stepValueForRange):
* accessibility/AccessibilityRenderObject.cpp:
(WebCore::AccessibilityRenderObject::alterSliderValue):
(WebCore::AccessibilityRenderObject::increment):
(WebCore::AccessibilityRenderObject::decrement):
(WebCore::AccessibilityRenderObject::stepValueForRange):
(WebCore::AccessibilityRenderObject::changeValueByStep):
* accessibility/AccessibilityRenderObject.h:
2011-05-23 Gavin Peters <gavinp@chromium.org>
Reviewed by Adam Barth.
fix rel=prerender target types
https://bugs.webkit.org/show_bug.cgi?id=61297
The original fix in https://bugs.webkit.org/show_bug.cgi?id=61079
didn't properly map the target type, and didn't carry the target
types through to chromium properly. Fixed.
No new tests; it's very hard to catch these with a layout test, however
all of the chromium Prerender browser tests will test this functionality
when I land an upcoming chromium CL.
* loader/cache/CachedResourceRequest.cpp:
(WebCore::cachedResourceTypeToTargetType):
2011-05-23 Matthew Delaney <mdelaney@apple.com>
Reviewed by Simon Fraser.
Remove safeFloatToInt() in FloatRect.cpp and replace with working version of clampToInteger()
https://bugs.webkit.org/show_bug.cgi?id=58216
No new tests. The SVG tests mask-excessive-malloc.svg and pattern-excessive-malloc.svg exercise this code path.
* platform/graphics/FloatRect.cpp:
(WebCore::enclosingIntRect):
2011-05-20 Jeremy Noble <jer.noble@apple.com>
Reviewed by Darin Adler.
Video looks squished when animating to full screen.
https://bugs.webkit.org/show_bug.cgi?id=61220
No new tests, because DumpRenderTree does not currently "animate" the full-screen transition.
There are three issues animating video content to full screen which this patch is meant to
address:
1) The animation scales between the client sizes of the element before and after full-screen.
Because these sizes have different aspect ratios, the video appears "squished" for part of
the animation. Instead, we will animate between the content box sizes before and after full
screen which, in the case of video now and object-fit content in the future, will have the
same aspect ratio before and after full screen.
2) Now that we are animating the full-screen video element's content box, the black letterbox
bars appear above and below the video (depending on the video's aspect ratio) as soon as the
animation begins. This is extremely jarring, so set the background color to clear. The
full-screen renderer's background color will serve the same purpose (providing the letterbox
background) once the animation completes.
3) Now that the letterbox color is gone, the full screen controls can appear to float in thin
air beneath the video (again, depending on aspect ratio) during the animation, so to avoid
that effect and to make the animation consistent with the old webkitenterfullscreen()
animation, we will hide the controls during the animation by adding a new CSS pseudo class
-webkit-animating-full-screen-transition.
Added a new css pseudo-class: -webkit-animating-full-screen. During the transition animation, this
pseudo-class will be applied to the current full-screen element. Styles have been added to
fullscreenQuickTime.css to hide the video element's built-in controller during the full-screen
animation.
To accomplish this, the ivar tracking whether the full-screen animation is taking place has been moved
from the RenderFullScreen renderer, to the current full-screen Document. Because changing
isAnimatingFullScreen causes style changes, make sure to call recalcStyle on the full-screen element
after changing.
This extra transition caused assertions in HTMLFormControlElement::updateFromElementCallback. A
full-screen media control's renderer is disabled during the style recalculation when exiting full
screen. This assertion was exposed by the extra recalcStyle() issued during the exit transition, and
has been removed.
* WebCore.exp.in:
* css/CSSSelector.cpp:
(WebCore::CSSSelector::pseudoId): Add support for new pseudo class -webkit-animate-full-screen-transition.
(WebCore::nameToPseudoTypeMap): Ditto.
(WebCore::CSSSelector::extractPseudoType): Ditto.
* css/CSSSelector.h:
* css/CSSStyleSelector.cpp:
(WebCore::CSSStyleSelector::SelectorChecker::checkOneSelector): Ditto.
* css/fullscreen.css:
(video:-webkit-full-screen): Set full screen video background color to clear.
* css/fullscreenQuickTime.css:
(video:-webkit-full-screen::-webkit-media-controls-panel): Set a default opacity transition.
(video:-webkit-animating-full-screen::-webkit-media-controls-panel): Set the opacity to 0 and
disable the transition.
* dom/Document.cpp:
(WebCore::Document::Document):
(WebCore::Document::webkitWillEnterFullScreenForElement): Call our new setAnimatingFullScreen function.
(WebCore::Document::webkitDidEnterFullScreenForElement): Ditto.
(WebCore::Document::webkitWillExitFullScreenForElement): Ditto.
(WebCore::Document::webkitDidExitFullScreenForElement): Ditto.
(WebCore::Document::isAnimatingFullScreen): Moved here from RenderFullScreen.
(WebCore::Document::setAnimatingFullScreen): Ditto.
* dom/Document.h:
* html/HTMLFormControlElement.cpp:
(WebCore::updateFromElementCallback): Use the Document's isAnimatingFullScreen function.
* page/FrameView.cpp:
(WebCore::isDocumentRunningFullScreenAnimation): Ditto.
* rendering/RenderFullScreen.cpp:
* rendering/RenderFullScreen.h:
* rendering/RenderLayerCompositor.cpp:
(WebCore::RenderLayerCompositor::rebuildCompositingLayerTree): Ditto.
(WebCore::RenderLayerCompositor::requiresCompositingForFullScreen): Ditto.
* rendering/style/RenderStyleConstants.h:
2011-05-23 Emil A Eklund <eae@chromium.org>
Reviewed by Eric Seidel.
Change RenderBlock hit testing to use IntPoint instead x,y pair
https://bugs.webkit.org/show_bug.cgi?id=61146
Covered by existing tests.
* platform/graphics/IntPoint.h:
(WebCore::toSize):
Add toSize function for converting from point to size.
* rendering/RenderBlock.cpp:
(WebCore::RenderBlock::isPointInOverflowControl):
(WebCore::RenderBlock::nodeAtPoint):
(WebCore::RenderBlock::hitTestFloats):
(WebCore::RenderBlock::hitTestColumns):
(WebCore::RenderBlock::hitTestContents):
* rendering/RenderBlock.h:
Change hit testing code in RenderBlock to use IntPoint.
* rendering/RenderListBox.cpp:
(WebCore::RenderListBox::isPointInOverflowControl):
* rendering/RenderListBox.h:
Change overridden method to use IntPoint.
2011-05-23 Mike Reed <reed@google.com>
Reviewed by James Robinson.
Skia: Need to implement GraphicsContext::clipConvexPolygon()
https://bugs.webkit.org/show_bug.cgi?id=41311
No new tests.
* platform/graphics/skia/GraphicsContextSkia.cpp:
(WebCore::setPathFromConvexPoints):
(WebCore::GraphicsContext::drawConvexPolygon):
(WebCore::GraphicsContext::clipConvexPolygon):
2011-05-23 James Simonsen <simonjam@chromium.org>
Reviewed by Adam Barth.
Convert raw pointer to RefPtr.
https://bugs.webkit.org/show_bug.cgi?id=61196
* dom/XMLDocumentParserLibxml2.cpp:
(WebCore::XMLDocumentParser::endElementNs):
* dom/XMLDocumentParserQt.cpp:
(WebCore::XMLDocumentParser::parseEndElement):
2011-05-23 Ryosuke Niwa <rniwa@webkit.org>
Reviewed by Alexey Proskuryakov.
selectstart is fired for every mouse move
https://bugs.webkit.org/show_bug.cgi?id=19489
Fixed the bug by dispatching selectstart event immediately before modifying selection in
handleMousePressEventSingleClick and updateSelectionForMouseDrag.
Also replaced a boolean EventHandler::m_beganSelectingText by an enum-valued m_selectionInitiationState
to retain 3 states:
1. HaveNotStartedSelection - Selection has not been set by a mouse drag or a mouse click
2. PlacedCaret - A caret was placed by a mouse click, double click, or triple click, and is about
to replace selection if a mouse drag never occurs.
3. ExtendedSelection - A range selection was set by a mouse click, a double click, a triple click,
or a mouse drag; otherwise a caret selection was set by a mouse drag.
State 1 corresponds to m_beganSelectingText being false and state 3 corresponds to m_beganSelectingText
being true. State 2 is used in updateSelectionForMouseDrag to avoid dispatching selectstart twice.
States 1 and 2 are set by updateSelectionForMouseDownDispatchingSelectStart and state 3 is set by
updateSelectionForMouseDrag.
Test: fast/events/selectstart-by-double-triple-clicks.html
fast/events/selectstart-by-drag.html
fast/events/selectstart-by-single-click-with-shift.html
* page/EventHandler.cpp: Removed canMouseDragExtendSelect.
(WebCore::EventHandler::EventHandler): Initializes m_selectionInitiationState.
(WebCore::dispatchSelectStart): Returns true only if selectstart was successfully fired
and default action was not prevented.
(WebCore::EventHandler::updateSelectionForMouseDownDispatchingSelectStart): Updates m_selectionInitiationState
and modifies the selection if dispatchSelectStart returns true.
(WebCore::EventHandler::selectClosestWordFromMouseEvent): Calls updateSelectionForMouseDownDispatchingSelectStart.
(WebCore::EventHandler::selectClosestWordOrLinkFromMouseEvent): Ditto.
(WebCore::EventHandler::handleMousePressEventDoubleClick):
(WebCore::EventHandler::handleMousePressEventTripleClick): Ditto.
(WebCore::EventHandler::handleMousePressEventSingleClick): Ditto.
(WebCore::canMouseDownStartSelect): No longer dispatches startselect; also renamed from
EventHandler::canMouseDownStartSelect.
(WebCore::EventHandler::handleMousePressEvent): No longer calls canMouseDragExtendSelect.
(WebCore::EventHandler::handleMouseDraggedEvent):
(WebCore::EventHandler::updateSelectionForMouseDrag): Exit early if m_selectionInitiationState is
HaveNotStartedSelection and dispatchSelectStart returns false. Since setSelectionIfPossible dispatches
selectstart event before assigning PlacedCaret or ExtendedSelection to m_selectionInitiationState,
there is no need to dispatch event for those two cases.
(WebCore::EventHandler::handleMouseReleaseEvent):
* page/EventHandler.h: Removed canMouseDownStartSelect and canMouseDragExtendSelect from EventHandler
and added setSelectionIfPossible.
2011-05-23 Adam Klein <adamk@chromium.org>
Reviewed by Jian Li.
[fileapi] Add a File::createWithName method to avoid obfuscated filename leakage from FileEntry.file() method
https://bugs.webkit.org/show_bug.cgi?id=61155
Covered by existing tests: fast/filesystem/file-from-file-entry.html
fast/filesystem/workers/file-from-file-entry.html
fast/filesystem/workers/file-from-file-entry-sync.html
* fileapi/DOMFileSystem.cpp:
(WebCore::DOMFileSystem::createFile): Updated to call createWithName().
* fileapi/DOMFileSystemSync.cpp:
(WebCore::DOMFileSystemSync::createFile): Updated to call createWithName().
* fileapi/File.cpp:
(WebCore::createBlobDataForFile): Added an optional name argument to fix MIME type lookup.
(WebCore::File::createWithRelativePath): Renamed from create() for consistency with new method.
(WebCore::File::File):
* fileapi/File.h:
(WebCore::File::createWithName):
* html/FileInputType.cpp:
(WebCore::FileInputType::setFileList): Updated the single caller of File::createWithRelativePath().
2011-05-23 Adrienne Walker <enne@google.com>
Reviewed by James Robinson.
[chromium] Fix division by zero in TilingData for boundary case texture sizes
https://bugs.webkit.org/show_bug.cgi?id=61164
* platform/graphics/gpu/TilingData.cpp:
(WebCore::TilingData::tileXIndexFromSrcCoord):
(WebCore::TilingData::tileYIndexFromSrcCoord):
2011-05-23 Adam Barth <abarth@webkit.org>
Reviewed by Eric Seidel.
Update ImageDecoder::create to match sniffing spec
https://bugs.webkit.org/show_bug.cgi?id=47683
This change is difficult to test. We're making this change to comply
with standards even if the change is difficult to observe. (This patch
also causes us to match Firefox.)
Test: fast/images/busted-oval-does-not-render.html
* platform/image-decoders/ImageDecoder.cpp:
2011-05-23 Ruben <chromium@hybridsource.org>
Reviewed by Tony Chang.
Chromium gyp patch to use new POSIX defines toolkit_uses_gtk and os_posix
https://bugs.webkit.org/show_bug.cgi?id=61219
No new tests, just changing gyp defines.
* WebCore.gyp/WebCore.gyp:
2011-05-23 Abhishek Arya <inferno@chromium.org>
Reviewed by Simon Fraser.
Terminate css color parsing on integers which are not followed
by a terminator.
https://bugs.webkit.org/show_bug.cgi?id=61293
Test: fast/css/parse-color-int-or-percent-crash.html
* css/CSSParser.cpp:
(WebCore::parseColorIntOrPercentage):
2011-05-20 Ryosuke Niwa <rniwa@webkit.org>
Reviewed by Enrica Casucci.
REGRESSION(r84311): WebKit copies too much styles when copying
https://bugs.webkit.org/show_bug.cgi?id=60914
The bug was caused by WebKit's cloning node hierarchy up until the node that has background color.
Fixed the bug by not cloning background color and adding the effective background color to the wrapping
style span.
Tests: editing/pasteboard/do-no-clone-unnecessary-styles-2.html
editing/pasteboard/do-no-clone-unnecessary-styles.html
* editing/EditingStyle.cpp:
(WebCore::cssValueToRGBA): Extracted from getRGBAFontColor.
(WebCore::getRGBAFontColor): Moved.
(WebCore::rgbaBackgroundColorInEffect): Added.
(WebCore::EditingStyle::init): Added support for InheritablePropertiesAndBackgroundColorInEffect.
(WebCore::EditingStyle::prepareToApplyAt): Include the effective background color at the given position.
Also remove the background color property when the effective background color is equal to the background
color property (in terms of RGBA value) of the editing style.
(WebCore::hasTransparentBackgroundColor): Moved from Editor class.
(WebCore::backgroundColorInEffect): Extracted from Editor::selectionStartCSSPropertyValue.
* editing/EditingStyle.h: Added prototypes for hasTransparentBackgroundColor and backgroundColorInEffect.
* editing/Editor.cpp:
(WebCore::Editor::selectionStartCSSPropertyValue): Calls backgroundColorInEffect.
* editing/Editor.h: Removed hasTransparentBackgroundColor.
* editing/markup.cpp:
(WebCore::isElementPresentational): Reverted r85090 and r84311.
(WebCore::createMarkup): Include the background color in effect when computing the editing style.
2011-05-23 Roland Steiner <rolandsteiner@chromium.org>
Reviewed by Dimitri Glazkov.
Update node list cache count on the containing TreeScope rather than the Document
https://bugs.webkit.org/show_bug.cgi?id=59983
Change code to call add/removeNodeListCache() and hasNodeListCaches() on the proper tree scope.
Move updating of the node list cache count from setDocument() to setTreeScopeRecursively().
Make setDocument() and setDocumentRecursively() private.
No new tests. (refactoring)
* dom/ContainerNode.cpp:
(WebCore::ContainerNode::childrenChanged):
* dom/Node.cpp:
(WebCore::Node::~Node):
(WebCore::Node::setDocument):
(WebCore::Node::setTreeScopeRecursively):
(WebCore::Node::childNodes):
(WebCore::Node::registerDynamicNodeList):
(WebCore::Node::unregisterDynamicNodeList):
(WebCore::Node::notifyLocalNodeListsAttributeChanged):
(WebCore::Node::notifyLocalNodeListsChildrenChanged):
(WebCore::Node::getElementsByTagName):
(WebCore::Node::getElementsByTagNameNS):
(WebCore::Node::getElementsByName):
(WebCore::Node::getElementsByClassName):
* dom/Node.h:
* html/HTMLFormControlElement.cpp:
(WebCore::HTMLFormControlElement::labels):
2011-05-23 Yury Semikhatsky <yurys@chromium.org>
Reviewed by Pavel Feldman.
[Chromium] Web Inspector: provide initial implementation of worker inspector transport
https://bugs.webkit.org/show_bug.cgi?id=60267
All methods of WorkerContextInspectorProxy are inlined in WorkerContextProxy and
the class itself is removed. Messages from worker inspector to page inspector
are sent by means of WorkerReportingProxy.
* GNUmakefile.list.am:
* WebCore.gypi:
* WebCore.vcproj/WebCore.vcproj:
* WebCore.xcodeproj/project.pbxproj:
* inspector/InspectorWorkerAgent.cpp:
(WebCore::InspectorWorkerAgent::WorkerFrontendChannel::WorkerFrontendChannel):
(WebCore::InspectorWorkerAgent::WorkerFrontendChannel::proxy):
(WebCore::InspectorWorkerAgent::WorkerFrontendChannel::dispatchMessageFromWorker):
(WebCore::InspectorWorkerAgent::sendMessageToWorker):
(WebCore::InspectorWorkerAgent::didStartWorkerContext):
* inspector/InspectorWorkerAgent.h:
* inspector/WorkerInspectorController.cpp:
(WebCore::WorkerInspectorController::connectFrontend):
(WebCore::WorkerInspectorController::disconnectFrontend):
* inspector/WorkerInspectorController.h:
* workers/DefaultSharedWorkerRepository.cpp:
(WebCore::SharedWorkerProxy::postMessageToPageInspector):
* workers/WorkerContextInspectorProxy.h: Removed.
* workers/WorkerContextProxy.h:
(WebCore::WorkerContextProxy::PageInspector::~PageInspector):
(WebCore::WorkerContextProxy::connectToInspector):
(WebCore::WorkerContextProxy::disconnectFromInspector):
(WebCore::WorkerContextProxy::sendMessageToInspector):
* workers/WorkerMessagingProxy.cpp:
(WebCore::WorkerMessagingProxy::postMessageToPageInspector):
* workers/WorkerMessagingProxy.h:
* workers/WorkerReportingProxy.h:
2011-05-23 Sheriff Bot <webkit.review.bot@gmail.com>
Unreviewed, rolling out r87070.
http://trac.webkit.org/changeset/87070
https://bugs.webkit.org/show_bug.cgi?id=61285
broke resource-parameters.html on win, weird failures on wk2
(Requested by caseq on #webkit).
* inspector/front-end/HAREntry.js:
(WebInspector.HAREntry.prototype.build):
(WebInspector.HAREntry.prototype._buildRequest):
(WebInspector.HAREntry.prototype._buildResponse):
(WebInspector.HAREntry.prototype._buildContent):
(WebInspector.HAREntry.prototype._buildCookie):
(WebInspector.HAREntry.prototype._interval):
(WebInspector.HARLog.prototype.build):
* inspector/front-end/Resource.js:
(WebInspector.Resource.prototype.set requestHeaders):
(WebInspector.Resource.prototype.get requestHeadersText):
(WebInspector.Resource.prototype.set requestHeadersText):
(WebInspector.Resource.prototype.get requestHeadersSize):
(WebInspector.Resource.prototype.set responseHeaders):
(WebInspector.Resource.prototype.get responseHeadersText):
(WebInspector.Resource.prototype.set responseHeadersText):
(WebInspector.Resource.prototype.get responseHeadersSize):
(WebInspector.Resource.prototype._headersSize):
2011-05-18 Pavel Podivilov <podivilov@chromium.org>
Reviewed by Yury Semikhatsky.
Web Inspector: source mapping for pretty-printed scripts is sometimes inaccurate after indented comments.
https://bugs.webkit.org/show_bug.cgi?id=61037
* inspector/front-end/JavaScriptFormatter.js:
(FormattedContentBuilder.prototype.addToken):
(FormattedContentBuilder.prototype._addComment):
(FormattedContentBuilder.prototype._addText):
(FormattedContentBuilder.prototype._addMappingIfNeeded):
2011-05-23 Mike West <mkwst@chromium.org>
Reviewed by Yury Semikhatsky.
Web Inspector: Missing fields in HAR
https://bugs.webkit.org/show_bug.cgi?id=58127
Specifically, this patch adds:
- entry.request.httpVersion
- entry.request.headersSize
- entry.request.bodySize
- entry.response.httpVersion
- entry.response.headersSize
- entry.response.bodySize
- entry.response.content.compression
Tests: http/tests/inspector/resource-har-conversion.html
http/tests/inspector/resource-har-headers.html
http/tests/inspector/resource-parameters.html
http/tests/inspector/network/network-size.html
* inspector/front-end/HAREntry.js:
(WebInspector.HAREntry.prototype.build):
(WebInspector.HAREntry.prototype._buildRequest):
(WebInspector.HAREntry.prototype._buildResponse):
(WebInspector.HAREntry.prototype._buildContent):
(WebInspector.HAREntry.prototype._buildCookie):
(WebInspector.HAREntry.prototype._interval):
(WebInspector.HAREntry.prototype.get requestBodySize):
(WebInspector.HAREntry.prototype.get responseBodySize):
(WebInspector.HAREntry.prototype.get responseCompression):
(WebInspector.HARLog.prototype.build):
* inspector/front-end/Resource.js:
(WebInspector.Resource.prototype.set requestHeaders):
(WebInspector.Resource.prototype.get requestHeadersText):
(WebInspector.Resource.prototype.set requestHeadersText):
(WebInspector.Resource.prototype.get requestHeadersSize):
(WebInspector.Resource.prototype.get requestHttpVersion):
(WebInspector.Resource.prototype.set responseHeaders):
(WebInspector.Resource.prototype.get responseHeadersText):
(WebInspector.Resource.prototype.set responseHeadersText):
(WebInspector.Resource.prototype.get responseHeadersSize):
(WebInspector.Resource.prototype.get responseHttpVersion):
2011-05-23 Andrey Kosyakov <caseq@chromium.org>
Reviewed by Yury Semikhatsky.
Web Inspector: keyboard shortcut panel is 1px too short
https://bugs.webkit.org/show_bug.cgi?id=61242
Fixed bottom margin of attached helpscreen so it's glued to status bar.
* inspector/front-end/helpScreen.css:
(body.attached .help-window-outer):
2011-05-23 Kent Tamura <tkent@chromium.org>
Reviewed by Dimitri Glazkov.
Change text-based <input> types to the new shadow DOM model
https://bugs.webkit.org/show_bug.cgi?id=54179
By this change, text field inputs and textareas have one extra
shadow node at the root of shadow trees.
e.g. Before the change:
<textarea> --(shadow-connection)-- <div> -- ...
After the change:
<textarea> --(shadow-connection)-- {#shadow-root} -- <div> -- ...
The goals of this change are
- Change to the new shadow DOM model, and
- Minimize the patch size.
We should use shadowPseudoId() in the new shadow DOM model, but the
shadow elements in this patch don't use it in order to reduce the patch
size.
Note: This is a re-landing for r87014 with a small fix of
Element::removeShadowRoot().
* css/html.css:
(input::-webkit-inner-spin-button):
Add vertical-align in order to avoid the button affect the baseline.
(input::-webkit-outer-spin-button): ditto.
(input::-webkit-input-speech-button): ditto.
* dom/Element.cpp:
(WebCore::Element::recalcStyle): Calls styleForRenderer() so that a
subclass of Element can override it.
(WebCore::Element::remvoeShadowRoot):
Fix a wrong parameter for willRemoveDOMNode().
(WebCore::Element::isSpellCheckingEnabled):
Handle ShadowRoot, which is not an Element.
* dom/Node.cpp:
Add utility functions for editing code.
(WebCore::Node::nonBoundaryShadowTreeRootNode):
(WebCore::Node::nonShadowBoundaryParentNode):
* dom/Node.h: Declare them.
* dom/Position.cpp:
- Add some assertions about ShadowRoot
- Replace parentNode() with nonShadowBoundaryParentNode()
Because input/textarea shadow structures are changed.
(WebCore::Position::Position):
(WebCore::Position::containerNode):
(WebCore::Position::parentAnchoredEquivalent):
(WebCore::Position::previous):
(WebCore::Position::next):
(WebCore::Position::parentEditingBoundary):
(WebCore::Position::atStartOfTree):
(WebCore::Position::atEndOfTree):
* dom/Position.h: ditto.
(WebCore::positionInParentBeforeNode):
(WebCore::positionInParentAfterNode):
* editing/CompositeEditCommand.cpp: ditto.
(WebCore::CompositeEditCommand::insertNodeAfter):
(WebCore::CompositeEditCommand::removeNode):
* editing/Editor.cpp:
(WebCore::Editor::findString): ditto.
* editing/FrameSelection.cpp:
(WebCore::FrameSelection::selectAll): Inline shadowTreeRootNode() calls.
* editing/FrameSelection.h:
Remove shadowTreeRootNode(). It is used only by FrameSelection::selectAll().
* editing/InsertParagraphSeparatorCommand.cpp:
(WebCore::InsertParagraphSeparatorCommand::doApply): Use nonShadowBoundaryParentNode()
* editing/ReplaceSelectionCommand.cpp:
(WebCore::ReplacementFragment::removeNode): ditto.
(WebCore::ReplacementFragment::insertNodeBefore): ditto.
* editing/VisibleSelection.cpp:
Rename shadowTreeRootNode() to nonBoundaryShadowTreeRootNode(), and it reutrns
a child node of ShadowRoot.
(WebCore::VisibleSelection::isAll):
(WebCore::VisibleSelection::adjustSelectionToAvoidCrossingShadowBoundaries):
(WebCore::VisibleSelection::nonBoundaryShadowTreeRootNode):
* editing/VisibleSelection.h: ditto.
* editing/htmlediting.cpp: Add assertions.
(WebCore::visiblePositionBeforeNode):
(WebCore::visiblePositionAfterNode):
* html/HTMLInputElement.cpp:
(WebCore::HTMLInputElement::create): Calls createShadowSubtree().
(WebCore::HTMLInputElement::createShadowSubtree):
Calls InputType::createShadowSubTree().
(WebCore::HTMLInputElement::innerTextElement):
Accessor of a shadow node. This is used by RenderTextControlSingleLine.
(WebCore::HTMLInputElement::innerBlockElement): ditto.
(WebCore::HTMLInputElement::innerSpinButtonElement): ditto.
(WebCore::HTMLInputElement::outerSpinButtonElement): ditto.
(WebCore::HTMLInputElement::resultsButtonElement): ditto.
(WebCore::HTMLInputElement::cancelButtonElement): ditto.
(WebCore::HTMLInputElement::speechButtonElement): ditto.
(WebCore::HTMLInputElement::parseMappedAttribute):
Rebuild shadow trees because x-webkit-speech attribute affects it.
* html/HTMLInputElement.h: Add declarations.
* html/HTMLIsIndexElement.cpp:
(WebCore::HTMLIsIndexElement::create): Calls createShadowSubtree().
* html/HTMLTextAreaElement.cpp:
(WebCore::HTMLTextAreaElement::create): Calls createShadowSubtree().
(WebCore::HTMLTextAreaElement::createShadowSubtree): Added.
* html/HTMLTextAreaElement.h: Declare createShadowSubtree().
* html/InputType.h: Add default implementations of accessors.
(WebCore::InputType::innerBlockElement):
(WebCore::InputType::innerTextElement):
(WebCore::InputType::innerSpinButtonElement):
(WebCore::InputType::outerSpinButtonElement):
(WebCore::InputType::resultsButtonElement):
(WebCore::InputType::cancelButtonElement):
(WebCore::InputType::speechButtonElement):
* html/SearchInputType.cpp:
(WebCore::SearchInputType::SearchInputType): Initializes new data members.
(WebCore::SearchInputType::createShadowSubtree):
Moved from RenderTextControlSingleLine.
(WebCore::SearchInputType::destroyShadowSubtree): Clear element references.
* html/SearchInputType.h: Add declarations.
(WebCore::SearchInputType::innerBlockElement):
(WebCore::SearchInputType::resultsButtonElement):
(WebCore::SearchInputType::cancelButtonElement):
* html/TextFieldInputType.cpp:
(WebCore::TextFieldInputType::TextFieldInputType):
Initializes new data members.
(WebCore::TextFieldInputType::createShadowSubtree):
Moved from RenderTextControlSingleLine.
(WebCore::TextFieldInputType::destroyShadowSubtree): Clear element references.
* html/TextFieldInputType.h: Add declarations.
(WebCore::TextFieldInputType::innerTextElement):
(WebCore::TextFieldInputType::innerSpinButtonElement):
(WebCore::TextFieldInputType::outerSpinButtonElement):
(WebCore::TextFieldInputType::speechButtonElement):
(WebCore::TextFieldInputType::setInnerTextElement):
(WebCore::TextFieldInputType::setSpeechButtonElement):
* html/shadow/TextControlInnerElements.cpp:
(WebCore::TextControlInnerElement::TextControlInnerElement):
Remove shadowParent parameter. It is unnecessary because we switch to
new shadow model.
(WebCore::TextControlInnerElement::create):
Change the parameter type to Document.
(WebCore::TextControlInnerElement::styleForRenderer):
Override this in order to set style by
RenderTextControlSingleLine::createInnerBlockStyle().
(WebCore::TextControlInnerTextElement::TextControlInnerTextElement):
Remove shadowParent parameter.
Inherit HTMLDivElement, not TextControlInnerElement.
(WebCore::TextControlInnerTextElement::create): Remove shadowParent parameter.
(WebCore::TextControlInnerTextElement::styleForRenderer):
Override this in order to set style by
RenderTextControlSingleLine::createInnerTextStyle().
(WebCore::SearchFieldResultsButtonElement::SearchFieldResultsButtonElement):
Inherit HTMLDivElement, not TextControlInnerElement.
(WebCore::SearchFieldResultsButtonElement::styleForRenderer):
Override this in order to set style by
RenderTextControlSingleLine::createResultButtonStyle().
(WebCore::SearchFieldCancelButtonElement::SearchFieldCancelButtonElement):
Inherit HTMLDivElement, not TextControlInnerElement.
(WebCore::SearchFieldCancelButtonElement::styleForRenderer):
Override this in order to set style by
RenderTextControlSingleLine::createCancelButtonStyle().
(WebCore::SearchFieldCancelButtonElement::detach):
Update for the parent class change.
(WebCore::SpinButtonElement::SpinButtonElement):
- Change the parameter type: shadowParent -> Document
- Add the inner flag
- Inherit HTMLDivElement, not TextControlInnerElement.
(WebCore::SpinButtonElement::createInner): Introduce a new factory
method to hide a bool parameter of the constructor.
(WebCore::SpinButtonElement::createOuter): ditto.
(WebCore::SpinButtonElement::styleForRenderer):
Override this in order to set style by
RenderTextControlSingleLine::createInnerSpinButtonStyle() or
createOuterSpinButtonStyle().
(WebCore::SpinButtonElement::detach): Update for the parent class change.
(WebCore::SpinButtonElement::setHovered): ditto.
(WebCore::InputFieldSpeechButtonElement::InputFieldSpeechButtonElement):
- Change the parameter type: shadowParent -> Document
- Inherit HTMLDivElement, not TextControlInnerElement.
- Do not register this as a speech input listener here.
(WebCore::InputFieldSpeechButtonElement::create):
Update for the parameter change.
(WebCore::InputFieldSpeechButtonElement::defaultEventHandler):
Do not handle click event if listener registration is not done.
(WebCore::InputFieldSpeechButtonElement::attach):
Register this as a speech input listener.
(WebCore::InputFieldSpeechButtonElement::detach):
Update for the parent class change.
(WebCore::InputFieldSpeechButtonElement::styleForRenderer):
Override this in order to set style by
RenderTextControlSingleLine::createSpeechButtonStyle().
* html/shadow/TextControlInnerElements.h:
(WebCore::TextControlInnerTextElement::isMouseFocusable):
Add this because the class is not a subclass of TextControllInnerElement.
(WebCore::SearchFieldResultsButtonElement::isMouseFocusable): ditto.
(WebCore::SearchFieldCancelButtonElement::isMouseFocusable): ditto.
(WebCore::SpinButtonElement::isMouseFocusable): ditto.
(WebCore::InputFieldSpeechButtonElement::isMouseFocusable): ditto.
* rendering/RenderTextControl.cpp:
(WebCore::RenderTextControl::~RenderTextControl): Remove unnecessary code.
(WebCore::RenderTextControl::styleDidChange):
innerTextElement can have no renderer.
Explicitly call setNeedsStyleRecals() for innerTextElement. It is
needed for LayoutTests/editing/selection/select-across-readonly-input-*.html.
(WebCore::RenderTextControl::textBlockWidth): Member data -> function
(WebCore::RenderTextControl::updateFromElement): ditto.
(WebCore::RenderTextControl::setInnerTextValue): ditto.
(WebCore::RenderTextControl::hasVisibleTextArea): ditto.
(WebCore::RenderTextControl::isSelectableElement): ditto.
(WebCore::RenderTextControl::selection): ditto.
(WebCore::RenderTextControl::visiblePositionForIndex): ditto.
(WebCore::RenderTextControl::indexForVisiblePosition): ditto.
(WebCore::RenderTextControl::text): ditto.
(WebCore::RenderTextControl::textWithHardLineBreaks): ditto.
(WebCore::RenderTextControl::computeLogicalHeight): ditto.
(WebCore::RenderTextControl::hitInnerTextElement): ditto.
(WebCore::RenderTextControl::forwardEvent): ditto.
(WebCore::RenderTextControl::computePreferredLogicalWidths): ditto.
* rendering/RenderTextControl.h:
- Make m_innerText virtual function.
- Make createInnerTextStyle() public in order that
TextControlInnerElements can call it.
* rendering/RenderTextControlMultiLine.cpp:
(WebCore::RenderTextControlMultiLine::innerTextElement): Added.
(WebCore::RenderTextControlMultiLine::updateFromElement):
Remove unnecessary createSubtreeIfNeeded() call.
* rendering/RenderTextControlMultiLine.h: Add a declaration.
* rendering/RenderTextControlSingleLine.cpp:
(WebCore::RenderTextControlSingleLine::~RenderTextControlSingleLine):
Remove unnecessary code.
(WebCore::RenderTextControlSingleLine::innerTextElement): Added.
(WebCore::RenderTextControlSingleLine::innerBlockElement): Added.
(WebCore::RenderTextControlSingleLine::innerSpinButtonElement): Added.
(WebCore::RenderTextControlSingleLine::outerSpinButtonElement): Added.
(WebCore::RenderTextControlSingleLine::resultsButtonElement): Added.
(WebCore::RenderTextControlSingleLine::cancelButtonElement): Added.
(WebCore::RenderTextControlSingleLine::speechButtonElement): Added.
(WebCore::RenderTextControlSingleLine::textBaseStyle): Data member -> function
(WebCore::RenderTextControlSingleLine::subtreeHasChanged): ditto.
(WebCore::RenderTextControlSingleLine::layout): ditto.
(WebCore::RenderTextControlSingleLine::nodeAtPoint): ditto.
(WebCore::RenderTextControlSingleLine::forwardEvent): ditto.
(WebCore::RenderTextControlSingleLine::styleDidChange): ditto.
(WebCore::RenderTextControlSingleLine::hasControlClip): ditto.
(WebCore::RenderTextControlSingleLine::controlClipRect): ditto.
(WebCore::RenderTextControlSingleLine::textBlockWidth): ditto.
(WebCore::RenderTextControlSingleLine::decorationWidthRight): ditto.
(WebCore::RenderTextControlSingleLine::preferredContentWidth): ditto.
(WebCore::RenderTextControlSingleLine::preferredDecorationWidthRight): ditto.
(WebCore::RenderTextControlSingleLine::adjustControlHeightBasedOnLineHeight): ditto.
(WebCore::RenderTextControlSingleLine::updateFromElement):
ditto, and remove unnecessary createSubtreeIfNeeded() call.
(WebCore::RenderTextControlSingleLine::createInnerTextStyle):
Data member -> function
(WebCore::RenderTextControlSingleLine::updateCancelButtonVisibility): ditto.
(WebCore::RenderTextControlSingleLine::clientPaddingLeft): ditto.
(WebCore::RenderTextControlSingleLine::clientPaddingRight): ditto.
(WebCore::RenderTextControlSingleLine::textBlockInsetTop): ditto.
* rendering/RenderTextControlSingleLine.h:
Add declarations, and remove unnecessary data members.
2011-05-19 Vitaly Repeshko <vitalyr@chromium.org>
Reviewed by Adam Barth.
[V8] Explicitly mark objects with complex GC rules.
https://bugs.webkit.org/show_bug.cgi?id=61131
From the GC point view there are two kinds of objects: the ones
that may participate in object grouping (i.e. their lifetime
depends on other objects) and the ones that never participate in
grouping (independent). V8 added support for marking persistent
handles as independent so that the GC can process the objects they
hold faster. The motivating use case here is typed arrays.
This patch adds V8-specific inherited IDL attribute
V8DependentLifetime to types used in V8GCController, which is
exactly the set of types with object lifetimes depending on other
objects. The handles for the types that are not marked with the
new attribute can be marked as independent and GC-ed faster.
* bindings/scripts/CodeGeneratorV8.pm: Added proccessing of the new attribute.
Updated test output:
* bindings/scripts/test/V8/V8TestInterface.cpp:
(WebCore::V8TestInterface::wrapSlow):
* bindings/scripts/test/V8/V8TestInterface.h:
* bindings/scripts/test/V8/V8TestMediaQueryListListener.cpp:
(WebCore::V8TestMediaQueryListListener::wrapSlow):
* bindings/scripts/test/V8/V8TestMediaQueryListListener.h:
* bindings/scripts/test/V8/V8TestObj.cpp:
(WebCore::V8TestObj::wrapSlow):
* bindings/scripts/test/V8/V8TestObj.h:
* bindings/scripts/test/V8/V8TestSerializedScriptValueInterface.cpp:
(WebCore::V8TestSerializedScriptValueInterface::wrapSlow):
* bindings/scripts/test/V8/V8TestSerializedScriptValueInterface.h:
Added the new attribute:
* css/CSSRule.idl:
* css/CSSRuleList.idl:
* css/CSSStyleDeclaration.idl:
* css/CSSValue.idl:
* css/StyleSheet.idl:
* css/StyleSheetList.idl:
* dom/DOMImplementation.idl:
* dom/Node.idl:
2011-05-23 Sheriff Bot <webkit.review.bot@gmail.com>
Unreviewed, rolling out r87014, r87016, and r87017.
http://trac.webkit.org/changeset/87014
http://trac.webkit.org/changeset/87016
http://trac.webkit.org/changeset/87017
https://bugs.webkit.org/show_bug.cgi?id=61266
It made more tests assert (Requested by Ossy on #webkit).
* css/html.css:
(input::-webkit-inner-spin-button):
(input::-webkit-outer-spin-button):
(input::-webkit-input-speech-button):
* dom/Element.cpp:
(WebCore::Element::recalcStyle):
(WebCore::Element::isSpellCheckingEnabled):
* dom/Node.cpp:
* dom/Node.h:
* dom/Position.cpp:
(WebCore::Position::Position):
(WebCore::Position::containerNode):
(WebCore::Position::parentAnchoredEquivalent):
(WebCore::Position::previous):
(WebCore::Position::next):
(WebCore::Position::parentEditingBoundary):
(WebCore::Position::atStartOfTree):
(WebCore::Position::atEndOfTree):
* dom/Position.h:
(WebCore::positionInParentBeforeNode):
(WebCore::positionInParentAfterNode):
* editing/CompositeEditCommand.cpp:
(WebCore::CompositeEditCommand::insertNodeAfter):
(WebCore::CompositeEditCommand::removeNode):
* editing/Editor.cpp:
(WebCore::Editor::findString):
* editing/FrameSelection.cpp:
(WebCore::FrameSelection::selectAll):
* editing/FrameSelection.h:
(WebCore::FrameSelection::shadowTreeRootNode):
* editing/InsertParagraphSeparatorCommand.cpp:
(WebCore::InsertParagraphSeparatorCommand::doApply):
* editing/ReplaceSelectionCommand.cpp:
(WebCore::ReplacementFragment::removeNode):
(WebCore::ReplacementFragment::insertNodeBefore):
* editing/VisibleSelection.cpp:
(WebCore::VisibleSelection::isAll):
(WebCore::VisibleSelection::adjustSelectionToAvoidCrossingShadowBoundaries):
(WebCore::VisibleSelection::shadowTreeRootNode):
* editing/VisibleSelection.h:
* editing/htmlediting.cpp:
(WebCore::visiblePositionBeforeNode):
(WebCore::visiblePositionAfterNode):
* html/HTMLInputElement.cpp:
(WebCore::HTMLInputElement::create):
(WebCore::HTMLInputElement::parseMappedAttribute):
* html/HTMLInputElement.h:
* html/HTMLIsIndexElement.cpp:
(WebCore::HTMLIsIndexElement::create):
* html/HTMLTextAreaElement.cpp:
(WebCore::HTMLTextAreaElement::create):
* html/HTMLTextAreaElement.h:
* html/InputType.h:
* html/SearchInputType.cpp:
* html/SearchInputType.h:
(WebCore::SearchInputType::SearchInputType):
* html/TextFieldInputType.cpp:
* html/TextFieldInputType.h:
(WebCore::TextFieldInputType::TextFieldInputType):
* html/shadow/TextControlInnerElements.cpp:
(WebCore::TextControlInnerElement::TextControlInnerElement):
(WebCore::TextControlInnerElement::create):
(WebCore::TextControlInnerElement::attachInnerElement):
(WebCore::TextControlInnerElement::detach):
(WebCore::TextControlInnerTextElement::TextControlInnerTextElement):
(WebCore::TextControlInnerTextElement::create):
(WebCore::SearchFieldResultsButtonElement::SearchFieldResultsButtonElement):
(WebCore::SearchFieldCancelButtonElement::SearchFieldCancelButtonElement):
(WebCore::SearchFieldCancelButtonElement::detach):
(WebCore::SpinButtonElement::SpinButtonElement):
(WebCore::SpinButtonElement::create):
(WebCore::SpinButtonElement::detach):
(WebCore::SpinButtonElement::setHovered):
(WebCore::InputFieldSpeechButtonElement::InputFieldSpeechButtonElement):
(WebCore::InputFieldSpeechButtonElement::create):
(WebCore::InputFieldSpeechButtonElement::defaultEventHandler):
(WebCore::InputFieldSpeechButtonElement::detach):
* html/shadow/TextControlInnerElements.h:
* rendering/RenderTextControl.cpp:
(WebCore::RenderTextControl::~RenderTextControl):
(WebCore::RenderTextControl::styleDidChange):
(WebCore::RenderTextControl::setInnerTextStyle):
(WebCore::RenderTextControl::createSubtreeIfNeeded):
(WebCore::RenderTextControl::textBlockWidth):
(WebCore::RenderTextControl::updateFromElement):
(WebCore::RenderTextControl::setInnerTextValue):
(WebCore::RenderTextControl::hasVisibleTextArea):
(WebCore::RenderTextControl::isSelectableElement):
(WebCore::RenderTextControl::selection):
(WebCore::RenderTextControl::visiblePositionForIndex):
(WebCore::RenderTextControl::indexForVisiblePosition):
(WebCore::RenderTextControl::text):
(WebCore::RenderTextControl::textWithHardLineBreaks):
(WebCore::RenderTextControl::computeLogicalHeight):
(WebCore::RenderTextControl::hitInnerTextElement):
(WebCore::RenderTextControl::forwardEvent):
(WebCore::RenderTextControl::computePreferredLogicalWidths):
(WebCore::RenderTextControl::innerTextElement):
* rendering/RenderTextControl.h:
* rendering/RenderTextControlMultiLine.cpp:
(WebCore::RenderTextControlMultiLine::updateFromElement):
* rendering/RenderTextControlMultiLine.h:
* rendering/RenderTextControlSingleLine.cpp:
(WebCore::RenderTextControlSingleLine::~RenderTextControlSingleLine):
(WebCore::RenderTextControlSingleLine::textBaseStyle):
(WebCore::RenderTextControlSingleLine::subtreeHasChanged):
(WebCore::RenderTextControlSingleLine::layout):
(WebCore::RenderTextControlSingleLine::nodeAtPoint):
(WebCore::RenderTextControlSingleLine::forwardEvent):
(WebCore::RenderTextControlSingleLine::styleDidChange):
(WebCore::RenderTextControlSingleLine::hasControlClip):
(WebCore::RenderTextControlSingleLine::controlClipRect):
(WebCore::RenderTextControlSingleLine::textBlockWidth):
(WebCore::RenderTextControlSingleLine::decorationWidthRight):
(WebCore::RenderTextControlSingleLine::preferredContentWidth):
(WebCore::RenderTextControlSingleLine::preferredDecorationWidthRight):
(WebCore::RenderTextControlSingleLine::adjustControlHeightBasedOnLineHeight):
(WebCore::RenderTextControlSingleLine::createSubtreeIfNeeded):
(WebCore::RenderTextControlSingleLine::updateFromElement):
(WebCore::RenderTextControlSingleLine::createInnerTextStyle):
(WebCore::RenderTextControlSingleLine::updateCancelButtonVisibility):
(WebCore::RenderTextControlSingleLine::clientPaddingLeft):
(WebCore::RenderTextControlSingleLine::clientPaddingRight):
(WebCore::RenderTextControlSingleLine::textBlockInsetTop):
* rendering/RenderTextControlSingleLine.h:
2011-05-23 Syed Idris Shah <syed.idris-shah@nokia.com>
Reviewed by Andreas Kling.
GraphicsContext3DInternal object should be called for getAttachedShaders.
[Qt] fast/canvas/webgl/gl-object-get-calls.html crash for Qt based webkit
https://bugs.webkit.org/show_bug.cgi?id=61202
LayoutTests/fast/canvas/webgl/gl-object-get-calls.html
getAttachedShaders should be called on GraphicsContext3DInternal instance.
It was left out by mistake.
* platform/graphics/qt/GraphicsContext3DQt.cpp:
(WebCore::GraphicsContext3D::getAttachedShaders): GraphicsContext3DInternal instance should be called.
2011-05-23 Carlos Garcia Campos <cgarcia@igalia.com>
Unreviewed. Strict PassOwnPtr build fix.
* platform/text/gtk/TextCodecGtk.cpp:
(WebCore::newTextCodecGtk):
2011-05-23 Mikhail Naganov <mnaganov@chromium.org>
Reviewed by Yury Semikhatsky.
Web Inspector: [Chromium] Show "Please wait" message during initial
heap snapshot processing.
https://bugs.webkit.org/show_bug.cgi?id=61040
* inspector/front-end/DetailedHeapshotView.js:
(WebInspector.HeapSnapshotSortableDataGrid.prototype.sortingChanged.sort):
(WebInspector.HeapSnapshotSortableDataGrid.prototype.sortingChanged):
(WebInspector.DetailedHeapshotView.profileCallback):
(WebInspector.DetailedHeapshotView.setDataSource):
(WebInspector.DetailedHeapshotView):
(WebInspector.DetailedHeapshotView.prototype._changeBase.baseProfileLoaded):
(WebInspector.DetailedHeapshotView.prototype._changeBase.setDataSource):
(WebInspector.DetailedHeapshotView.prototype._changeBase):
(WebInspector.DetailedHeapshotView.prototype._changeView.setDataSource):
(WebInspector.DetailedHeapshotView.prototype._changeView):
* inspector/front-end/PleaseWaitMessage.js:
(WebInspector.PleaseWaitMessage.prototype.showAndWaitFor):
2011-05-23 Adam Barth <abarth@webkit.org>
Strict PassOwnPtr build fixes.
* platform/gtk/GeolocationServiceGtk.cpp:
(WebCore::GeolocationServiceGtk::create):
* platform/gtk/RenderThemeGtk.cpp:
(WebCore::RenderThemeGtk::adjustSliderTrackStyle):
(WebCore::RenderThemeGtk::adjustSliderThumbStyle):
(WebCore::RenderThemeGtk::adjustProgressBarStyle):
2011-05-22 Adam Barth <abarth@webkit.org>
Strict PassOwnPtr build fix.
* platform/efl/RenderThemeEfl.cpp:
(WebCore::RenderThemeEfl::adjustProgressBarStyle):
2011-05-22 Andrew Wason <rectalogic@rectalogic.com>
Reviewed by Benjamin Poulain.
[Qt] Implement toImageData() in QtWebKit Bridge
https://bugs.webkit.org/show_bug.cgi?id=60897
Tests are in WebKit/qt/tests/hybridPixmap
* bridge/qt/qt_pixmapruntime.cpp:
(JSC::Bindings::QtPixmapToImageDataMethod::name):
(JSC::Bindings::QtPixmapToImageDataMethod::invoke):
(JSC::Bindings::QtPixmapToImageDataMethod::copyPixels):
(JSC::Bindings::QtPixmapClass::methodsNamed):
(JSC::Bindings::QtPixmapInstance::getPropertyNames):
Add toImageData() to Qt Bridge, alternative to
assignToHTMLImageElement().
2011-05-22 Dominic Cooney <dominicc@chromium.org>
Reviewed by Dimitri Glazkov.
When removing a shadow root, also remove it from the render tree.
https://bugs.webkit.org/show_bug.cgi?id=61245
Test: existing fast/dom/shadow/layout-tests-can-access-shadow.html
* dom/Element.cpp:
(WebCore::Element::removeShadowRoot): Call detach if attached.
2011-05-22 Dirk Schulze <krit@webkit.org>
Reviewed by Nikolas Zimmermann.
Don't do manually style resolution for SVGElements with renderer
https://bugs.webkit.org/show_bug.cgi?id=59176
General clean-up.
Don't resolve style manually, instead ask the RenderObject for its style.
Cleanup svgattrs.in, some SVG element names were accidently listed there as attributes.
No new tests needed. No change of behavior.
* svg/SVGFEDiffuseLightingElement.cpp:
(WebCore::SVGFEDiffuseLightingElement::build):
* svg/SVGFEDropShadowElement.cpp:
(WebCore::SVGFEDropShadowElement::build):
* svg/SVGFEFloodElement.cpp:
(WebCore::SVGFEFloodElement::build):
* svg/SVGFESpecularLightingElement.cpp:
(WebCore::SVGFESpecularLightingElement::build):
* svg/svgattrs.in:
2011-05-21 Dirk Schulze <krit@webkit.org>
Reviewed by Darin Adler.
REGRESSION(r66731): pointer-events are broken in some cases
https://bugs.webkit.org/show_bug.cgi?id=45467
The SVGSVGElement shouldn't be the target of a mouse event, if its pointer-events attribute is set
to 'none'. This matches the behavior on Firefox where an embedded SVG element is the target of an event,
if none of its childs caught the event. This is the case for all pointer-events other than 'none'.
Tests: svg/custom/pointer-events-on-svg-with-pointer.xhtml
svg/custom/pointer-events-on-svg-without-pointer.xhtml
* rendering/svg/RenderSVGRoot.cpp:
(WebCore::RenderSVGRoot::nodeAtPoint):
2011-05-21 Dan Bernstein <mitz@apple.com>
Reviewed by Darin Adler.
<rdar://problem/9479926> REGRESSION (r82144): Icon overlaps text in Twitter message dialog
https://bugs.webkit.org/show_bug.cgi?id=61241
Test: fast/block/positioning/start-ignoring-before.html
* rendering/RenderBlockLineLayout.cpp:
(WebCore::TrailingObjects::updateMidpointsForTrailingBoxes): Added a boolean parameter saying
whether to merge the first trailing space with the line break.
(WebCore::RenderBlock::LineBreaker::nextLineBreak): When adding a midpoint behind the current
character, account for trailing positioned objects that occurred after the midpoint by calling
updateMidpointsForTrailingBoxes(), which adds midpoints for them.
2011-05-21 Jeremy Noble <jer.noble@apple.com>
Reviewed by Eric Carlson.
WebKit2: fix failing fullscreen/full-screen-remove* tests.
https://bugs.webkit.org/show_bug.cgi?id=61027
* dom/Document.cpp:
(WebCore::Document::fullScreenChangeDelayTimerFired): dispatchEvent can be
synchronous, so make sure to check whether the current element is
in the DOM before dispatching.
2011-05-21 Gavin Peters <gavinp@chromium.org>
Reviewed by Adam Barth.
Add rel type prerender to distinguish prerender from prefetch
https://bugs.webkit.org/show_bug.cgi?id=61079
Chrome right now uses <link rel=prefetch ...> for one of two things,
to warm the cache in the same way as firefox, or to launch a speculative
rendering of a web page, for faster "loading" when the user navigates to it.
This new rel type will let us distinguish the two cases; the rel type prerender
isn't used on the web today, but the Google Web Search example prerendering application
is ready to experiment with it.
Test: fast/dom/HTMLLinkElement/prerender.html
* html/HTMLLinkElement.cpp:
(WebCore::HTMLLinkElement::tokenizeRelAttribute):
(WebCore::HTMLLinkElement::process):
* html/HTMLLinkElement.h:
(WebCore::HTMLLinkElement::RelAttribute::RelAttribute):
* loader/cache/CachedResource.cpp:
(WebCore::defaultPriorityForResourceType):
* loader/cache/CachedResource.h:
(WebCore::CachedResource::isLinkResource):
* loader/cache/CachedResourceLoader.cpp:
(WebCore::createResource):
(WebCore::CachedResourceLoader::requestLinkResource):
(WebCore::CachedResourceLoader::canRequest):
* loader/cache/CachedResourceLoader.h:
* loader/cache/CachedResourceRequest.cpp:
(WebCore::cachedResourceTypeToTargetType):
(WebCore::CachedResourceRequest::load):
* platform/network/ResourceRequestBase.h:
2011-05-21 Emil A Eklund <eae@chromium.org>
Reviewed by Eric Seidel.
Change RenderLineBoxList::hitTest to use IntPoint
https://bugs.webkit.org/show_bug.cgi?id=61156
Change the RenderLineBoxList hit testing to use IntPoint and clean up the rect calculation.
Covered by existing tests.
* rendering/RenderBlock.cpp:
(WebCore::RenderBlock::hitTestContents):
* rendering/RenderInline.cpp:
(WebCore::RenderInline::nodeAtPoint):
* rendering/RenderLineBoxList.cpp:
(WebCore::RenderLineBoxList::hitTest):
* rendering/RenderLineBoxList.h:
2011-05-21 Emil A Eklund <eae@chromium.org>
Reviewed by Eric Seidel.
Change HitTestResult to use IntPoint
https://bugs.webkit.org/show_bug.cgi?id=61230
Covered by existing tests.
* rendering/EllipsisBox.cpp:
(WebCore::EllipsisBox::nodeAtPoint):
* rendering/HitTestResult.cpp:
(WebCore::HitTestResult::addNodeToRectBasedTestResult):
* rendering/HitTestResult.h:
(WebCore::HitTestResult::isRectBasedTest):
* rendering/InlineFlowBox.cpp:
(WebCore::InlineFlowBox::nodeAtPoint):
* rendering/InlineTextBox.cpp:
(WebCore::InlineTextBox::nodeAtPoint):
* rendering/RenderBlock.cpp:
(WebCore::RenderBlock::nodeAtPoint):
(WebCore::RenderBlock::hitTestColumns):
* rendering/RenderBox.cpp:
(WebCore::RenderBox::nodeAtPoint):
* rendering/RenderTable.cpp:
(WebCore::RenderTable::nodeAtPoint):
* rendering/svg/RenderSVGRoot.cpp:
(WebCore::RenderSVGRoot::nodeAtPoint):
2011-05-21 Jochen Eisinger <jochen@chromium.org>
Reviewed by Darin Fisher.
[chromium] add extraData field to resource requests
https://bugs.webkit.org/show_bug.cgi?id=61033
* platform/network/chromium/ResourceRequest.h:
(WebCore::ResourceRequest::ExtraData::~ExtraData):
(WebCore::ResourceRequest::extraData):
(WebCore::ResourceRequest::setExtraData):
2011-05-21 Kent Tamura <tkent@chromium.org>
Reviewed by Dimitri Glazkov.
Change text-based <input> types to the new shadow DOM model
https://bugs.webkit.org/show_bug.cgi?id=54179
By this change, text field inputs and textareas have one extra
shadow node at the root of shadow trees.
e.g. Before the change:
<textarea> --(shadow-connection)-- <div> -- ...
After the change:
<textarea> --(shadow-connection)-- {#shadow-root} -- <div> -- ...
The goals of this change are
- Change to the new shadow DOM model, and
- Minimize the patch size.
We should use shadowPseudoId() in the new shadow DOM model, but the
shadow elements in this patch don't use it in order to reduce the patch
size.
* css/html.css:
(input::-webkit-inner-spin-button):
Add vertical-align in order to avoid the button affect the baseline.
(input::-webkit-outer-spin-button): ditto.
(input::-webkit-input-speech-button): ditto.
* dom/Element.cpp:
(WebCore::Element::recalcStyle): Calls styleForRenderer() so that a
subclass of Element can override it.
(WebCore::Element::isSpellCheckingEnabled):
Handle ShadowRoot, which is not an Element.
* dom/Node.cpp:
Add utility functions for editing code.
(WebCore::Node::nonBoundaryShadowTreeRootNode):
(WebCore::Node::nonShadowBoundaryParentNode):
* dom/Node.h: Declare them.
* dom/Position.cpp:
- Add some assertions about ShadowRoot
- Replace parentNode() with nonShadowBoundaryParentNode()
Because input/textarea shadow structures are changed.
(WebCore::Position::Position):
(WebCore::Position::containerNode):
(WebCore::Position::parentAnchoredEquivalent):
(WebCore::Position::previous):
(WebCore::Position::next):
(WebCore::Position::parentEditingBoundary):
(WebCore::Position::atStartOfTree):
(WebCore::Position::atEndOfTree):
* dom/Position.h: ditto.
(WebCore::positionInParentBeforeNode):
(WebCore::positionInParentAfterNode):
* editing/CompositeEditCommand.cpp: ditto.
(WebCore::CompositeEditCommand::insertNodeAfter):
(WebCore::CompositeEditCommand::removeNode):
* editing/Editor.cpp:
(WebCore::Editor::findString): ditto.
* editing/FrameSelection.cpp:
(WebCore::FrameSelection::selectAll): Inline shadowTreeRootNode() calls.
* editing/FrameSelection.h:
Remove shadowTreeRootNode(). It is used only by FrameSelection::selectAll().
* editing/InsertParagraphSeparatorCommand.cpp:
(WebCore::InsertParagraphSeparatorCommand::doApply): Use nonShadowBoundaryParentNode()
* editing/ReplaceSelectionCommand.cpp:
(WebCore::ReplacementFragment::removeNode): ditto.
(WebCore::ReplacementFragment::insertNodeBefore): ditto.
* editing/VisibleSelection.cpp:
Rename shadowTreeRootNode() to nonBoundaryShadowTreeRootNode(), and it reutrns
a child node of ShadowRoot.
(WebCore::VisibleSelection::isAll):
(WebCore::VisibleSelection::adjustSelectionToAvoidCrossingShadowBoundaries):
(WebCore::VisibleSelection::nonBoundaryShadowTreeRootNode):
* editing/VisibleSelection.h: ditto.
* editing/htmlediting.cpp: Add assertions.
(WebCore::visiblePositionBeforeNode):
(WebCore::visiblePositionAfterNode):
* html/HTMLInputElement.cpp:
(WebCore::HTMLInputElement::create): Calls createShadowSubtree().
(WebCore::HTMLInputElement::createShadowSubtree):
Calls InputType::createShadowSubTree().
(WebCore::HTMLInputElement::innerTextElement):
Accessor of a shadow node. This is used by RenderTextControlSingleLine.
(WebCore::HTMLInputElement::innerBlockElement): ditto.
(WebCore::HTMLInputElement::innerSpinButtonElement): ditto.
(WebCore::HTMLInputElement::outerSpinButtonElement): ditto.
(WebCore::HTMLInputElement::resultsButtonElement): ditto.
(WebCore::HTMLInputElement::cancelButtonElement): ditto.
(WebCore::HTMLInputElement::speechButtonElement): ditto.
(WebCore::HTMLInputElement::parseMappedAttribute):
Rebuild shadow trees because x-webkit-speech attribute affects it.
* html/HTMLInputElement.h: Add declarations.
* html/HTMLIsIndexElement.cpp:
(WebCore::HTMLIsIndexElement::create): Calls createShadowSubtree().
* html/HTMLTextAreaElement.cpp:
(WebCore::HTMLTextAreaElement::create): Calls createShadowSubtree().
(WebCore::HTMLTextAreaElement::createShadowSubtree): Added.
* html/HTMLTextAreaElement.h: Declare createShadowSubtree().
* html/InputType.h: Add default implementations of accessors.
(WebCore::InputType::innerBlockElement):
(WebCore::InputType::innerTextElement):
(WebCore::InputType::innerSpinButtonElement):
(WebCore::InputType::outerSpinButtonElement):
(WebCore::InputType::resultsButtonElement):
(WebCore::InputType::cancelButtonElement):
(WebCore::InputType::speechButtonElement):
* html/SearchInputType.cpp:
(WebCore::SearchInputType::SearchInputType): Initializes new data members.
(WebCore::SearchInputType::createShadowSubtree):
Moved from RenderTextControlSingleLine.
(WebCore::SearchInputType::destroyShadowSubtree): Clear element references.
* html/SearchInputType.h: Add declarations.
(WebCore::SearchInputType::innerBlockElement):
(WebCore::SearchInputType::resultsButtonElement):
(WebCore::SearchInputType::cancelButtonElement):
* html/TextFieldInputType.cpp:
(WebCore::TextFieldInputType::TextFieldInputType):
Initializes new data members.
(WebCore::TextFieldInputType::createShadowSubtree):
Moved from RenderTextControlSingleLine.
(WebCore::TextFieldInputType::destroyShadowSubtree): Clear element references.
* html/TextFieldInputType.h: Add declarations.
(WebCore::TextFieldInputType::innerTextElement):
(WebCore::TextFieldInputType::innerSpinButtonElement):
(WebCore::TextFieldInputType::outerSpinButtonElement):
(WebCore::TextFieldInputType::speechButtonElement):
(WebCore::TextFieldInputType::setInnerTextElement):
(WebCore::TextFieldInputType::setSpeechButtonElement):
* html/shadow/TextControlInnerElements.cpp:
(WebCore::TextControlInnerElement::TextControlInnerElement):
Remove shadowParent parameter. It is unnecessary because we switch to
new shadow model.
(WebCore::TextControlInnerElement::create):
Change the parameter type to Document.
(WebCore::TextControlInnerElement::styleForRenderer):
Override this in order to set style by
RenderTextControlSingleLine::createInnerBlockStyle().
(WebCore::TextControlInnerTextElement::TextControlInnerTextElement):
Remove shadowParent parameter.
Inherit HTMLDivElement, not TextControlInnerElement.
(WebCore::TextControlInnerTextElement::create): Remove shadowParent parameter.
(WebCore::TextControlInnerTextElement::styleForRenderer):
Override this in order to set style by
RenderTextControlSingleLine::createInnerTextStyle().
(WebCore::SearchFieldResultsButtonElement::SearchFieldResultsButtonElement):
Inherit HTMLDivElement, not TextControlInnerElement.
(WebCore::SearchFieldResultsButtonElement::styleForRenderer):
Override this in order to set style by
RenderTextControlSingleLine::createResultButtonStyle().
(WebCore::SearchFieldCancelButtonElement::SearchFieldCancelButtonElement):
Inherit HTMLDivElement, not TextControlInnerElement.
(WebCore::SearchFieldCancelButtonElement::styleForRenderer):
Override this in order to set style by
RenderTextControlSingleLine::createCancelButtonStyle().
(WebCore::SearchFieldCancelButtonElement::detach):
Update for the parent class change.
(WebCore::SpinButtonElement::SpinButtonElement):
- Change the parameter type: shadowParent -> Document
- Add the inner flag
- Inherit HTMLDivElement, not TextControlInnerElement.
(WebCore::SpinButtonElement::createInner): Introduce a new factory
method to hide a bool parameter of the constructor.
(WebCore::SpinButtonElement::createOuter): ditto.
(WebCore::SpinButtonElement::styleForRenderer):
Override this in order to set style by
RenderTextControlSingleLine::createInnerSpinButtonStyle() or
createOuterSpinButtonStyle().
(WebCore::SpinButtonElement::detach): Update for the parent class change.
(WebCore::SpinButtonElement::setHovered): ditto.
(WebCore::InputFieldSpeechButtonElement::InputFieldSpeechButtonElement):
- Change the parameter type: shadowParent -> Document
- Inherit HTMLDivElement, not TextControlInnerElement.
- Do not register this as a speech input listener here.
(WebCore::InputFieldSpeechButtonElement::create):
Update for the parameter change.
(WebCore::InputFieldSpeechButtonElement::defaultEventHandler):
Do not handle click event if listener registration is not done.
(WebCore::InputFieldSpeechButtonElement::attach):
Register this as a speech input listener.
(WebCore::InputFieldSpeechButtonElement::detach):
Update for the parent class change.
(WebCore::InputFieldSpeechButtonElement::styleForRenderer):
Override this in order to set style by
RenderTextControlSingleLine::createSpeechButtonStyle().
* html/shadow/TextControlInnerElements.h:
(WebCore::TextControlInnerTextElement::isMouseFocusable):
Add this because the class is not a subclass of TextControllInnerElement.
(WebCore::SearchFieldResultsButtonElement::isMouseFocusable): ditto.
(WebCore::SearchFieldCancelButtonElement::isMouseFocusable): ditto.
(WebCore::SpinButtonElement::isMouseFocusable): ditto.
(WebCore::InputFieldSpeechButtonElement::isMouseFocusable): ditto.
* rendering/RenderTextControl.cpp:
(WebCore::RenderTextControl::~RenderTextControl): Remove unnecessary code.
(WebCore::RenderTextControl::styleDidChange):
innerTextElement can have no renderer.
Explicitly call setNeedsStyleRecals() for innerTextElement. It is
needed for LayoutTests/editing/selection/select-across-readonly-input-*.html.
(WebCore::RenderTextControl::textBlockWidth): Member data -> function
(WebCore::RenderTextControl::updateFromElement): ditto.
(WebCore::RenderTextControl::setInnerTextValue): ditto.
(WebCore::RenderTextControl::hasVisibleTextArea): ditto.
(WebCore::RenderTextControl::isSelectableElement): ditto.
(WebCore::RenderTextControl::selection): ditto.
(WebCore::RenderTextControl::visiblePositionForIndex): ditto.
(WebCore::RenderTextControl::indexForVisiblePosition): ditto.
(WebCore::RenderTextControl::text): ditto.
(WebCore::RenderTextControl::textWithHardLineBreaks): ditto.
(WebCore::RenderTextControl::computeLogicalHeight): ditto.
(WebCore::RenderTextControl::hitInnerTextElement): ditto.
(WebCore::RenderTextControl::forwardEvent): ditto.
(WebCore::RenderTextControl::computePreferredLogicalWidths): ditto.
* rendering/RenderTextControl.h:
- Make m_innerText virtual function.
- Make createInnerTextStyle() public in order that
TextControlInnerElements can call it.
* rendering/RenderTextControlMultiLine.cpp:
(WebCore::RenderTextControlMultiLine::innerTextElement): Added.
(WebCore::RenderTextControlMultiLine::updateFromElement):
Remove unnecessary createSubtreeIfNeeded() call.
* rendering/RenderTextControlMultiLine.h: Add a declaration.
* rendering/RenderTextControlSingleLine.cpp:
(WebCore::RenderTextControlSingleLine::~RenderTextControlSingleLine):
Remove unnecessary code.
(WebCore::RenderTextControlSingleLine::innerTextElement): Added.
(WebCore::RenderTextControlSingleLine::innerBlockElement): Added.
(WebCore::RenderTextControlSingleLine::innerSpinButtonElement): Added.
(WebCore::RenderTextControlSingleLine::outerSpinButtonElement): Added.
(WebCore::RenderTextControlSingleLine::resultsButtonElement): Added.
(WebCore::RenderTextControlSingleLine::cancelButtonElement): Added.
(WebCore::RenderTextControlSingleLine::speechButtonElement): Added.
(WebCore::RenderTextControlSingleLine::textBaseStyle): Data member -> function
(WebCore::RenderTextControlSingleLine::subtreeHasChanged): ditto.
(WebCore::RenderTextControlSingleLine::layout): ditto.
(WebCore::RenderTextControlSingleLine::nodeAtPoint): ditto.
(WebCore::RenderTextControlSingleLine::forwardEvent): ditto.
(WebCore::RenderTextControlSingleLine::styleDidChange): ditto.
(WebCore::RenderTextControlSingleLine::hasControlClip): ditto.
(WebCore::RenderTextControlSingleLine::controlClipRect): ditto.
(WebCore::RenderTextControlSingleLine::textBlockWidth): ditto.
(WebCore::RenderTextControlSingleLine::decorationWidthRight): ditto.
(WebCore::RenderTextControlSingleLine::preferredContentWidth): ditto.
(WebCore::RenderTextControlSingleLine::preferredDecorationWidthRight): ditto.
(WebCore::RenderTextControlSingleLine::adjustControlHeightBasedOnLineHeight): ditto.
(WebCore::RenderTextControlSingleLine::updateFromElement):
ditto, and remove unnecessary createSubtreeIfNeeded() call.
(WebCore::RenderTextControlSingleLine::createInnerTextStyle):
Data member -> function
(WebCore::RenderTextControlSingleLine::updateCancelButtonVisibility): ditto.
(WebCore::RenderTextControlSingleLine::clientPaddingLeft): ditto.
(WebCore::RenderTextControlSingleLine::clientPaddingRight): ditto.
(WebCore::RenderTextControlSingleLine::textBlockInsetTop): ditto.
* rendering/RenderTextControlSingleLine.h:
Add declarations, and remove unnecessary data members.
2011-05-21 Chris Rogers <crogers@google.com>
Reviewed by Kenneth Russell.
AudioBufferSourceNode noteOff() method must respect scheduling time
https://bugs.webkit.org/show_bug.cgi?id=61226
No new tests since audio API is not yet implemented.
* webaudio/AudioBufferSourceNode.cpp:
(WebCore::AudioBufferSourceNode::AudioBufferSourceNode):
(WebCore::AudioBufferSourceNode::process):
(WebCore::AudioBufferSourceNode::provideInput):
(WebCore::AudioBufferSourceNode::finish):
(WebCore::AudioBufferSourceNode::noteGrainOn):
(WebCore::AudioBufferSourceNode::noteOff):
* webaudio/AudioBufferSourceNode.h:
2011-05-20 Dirk Schulze <krit@webkit.org>
Reviewed by Nikolas Zimmermann.
Share more code in PathTraversalState
https://bugs.webkit.org/show_bug.cgi?id=61238
Share more code between SVGPathTraversalStateBuilder and Path in PathTraversalState.
No change in functionality, so no new tests.
* platform/graphics/Path.cpp:
(WebCore::pathLengthApplierFunction):
* platform/graphics/PathTraversalState.cpp:
(WebCore::PathTraversalState::processSegment):
* platform/graphics/PathTraversalState.h:
* svg/SVGPathTraversalStateBuilder.cpp:
(WebCore::SVGPathTraversalStateBuilder::continueConsuming):
2011-05-21 Nikolas Zimmermann <nzimmermann@rim.com>
Reviewed by Rob Buis.
SVG svgAttributeChanged/synchronizeProperty/parseMappedAttribute should be optimized
https://bugs.webkit.org/show_bug.cgi?id=61183
Example: rect.x.baseVal.value = 100;
What happens: SVGRectElement::svgAttributeChanged(const QualifiedName& attrName) is invoked with "SVGNames::rectAttr" as parameter.
void SVGRectElement::svgAttributeChanged(const QualifiedName& attrName)
{
SVGStyledTransformableElement::svgAttributeChanged(attrName);
// Handle my own attribute changes...
}
Currently we always traverse the base class hierarchy, when invoking svgAttributeChanged. Every svgAttributeChanged call from a class
like SVGRectElement has to reach the base class SVGStyledElement::svgAttributeChanged, as it handles invalidation of the instances of
an element. Say that a <rect> is referenced by a <use> and we change the 'x' attribute of the <rect>, then SVGStyledElement::svgAttributeChanged,
calls SVGElementInstance::invalidateAllInstancesOfElement(this), so that the <use> can rebuild its shadow tree...
That's the only reason all svgAttributeChanged implementations call the base class immediately, so SVGStyledElement is always reached.
Switch to a more efficient pattern, by providing a "bool isSupportedAttribute(const QualifiedName&);" function for all SVG*Elements.
It contains all attributes the particular SVG*Element class handles (but not its parent classes attributes). For example SVGRectElement
contains x/y/width/height/rx/ry attributes, and the ones from SVGTests/SVGLangSpace/SVGExternalResourcesRequired (xml:space/lang, etc.),
but not eg. transform as that's handled by the parent class SVGStyledTransformableElement.
void SVGRectElement::svgAttributeChanged(const QualifiedName& attrName)
{
if (!isSupportedAttribute.contains(attrName)) {
SVGStyledTransformableElement::svgAttributeChanged(attrName);
return;
}
// When we get here, we know for sure it's one of our attributes that has changed.
// Note for eg. SVGNames::transformAttr, the call from SVGRectElement::svgAttributeChanged, would be immediately forwarded to the base class, which handles transformAttr changes)
if (attrName == SVGNames::xAttr) { do_work(); return; }
if (attrName == SVGNames::yAttr) { do_work(); return; }
...
// Assure that we handled all properties we claim support for in "isSupportedAttribute()".
ASSERT_NOT_REACHED();
}
Exactly the same pattern can be applied to synchronizeProperty and parseMappedAttribute to speed them up as well.
Add "SVGElementInstance::InvalidationGuard guard(this)" statements in all svgAttributeChanged implementations, that calls invalidateAllInstancesOfElement(this)
upon destruction, after we've reacted to the svg attribute change. This assures we never forget to call the invalidation method anywhere, and don't
need to rely on the base class svgAttributeChanged() call to do it.
It's a slight overal performance progression.
* svg/SVGAElement.cpp:
(WebCore::SVGAElement::isSupportedAttribute):
(WebCore::SVGAElement::parseMappedAttribute):
(WebCore::SVGAElement::svgAttributeChanged):
(WebCore::SVGAElement::synchronizeProperty):
* svg/SVGAElement.h:
* svg/SVGAnimateMotionElement.cpp:
(WebCore::SVGAnimateMotionElement::isSupportedAttribute):
(WebCore::SVGAnimateMotionElement::parseMappedAttribute):
* svg/SVGAnimateMotionElement.h:
* svg/SVGAnimateTransformElement.cpp:
(WebCore::SVGAnimateTransformElement::isSupportedAttribute):
(WebCore::SVGAnimateTransformElement::parseMappedAttribute):
* svg/SVGAnimateTransformElement.h:
* svg/SVGAnimationElement.cpp:
(WebCore::SVGAnimationElement::isSupportedAttribute):
(WebCore::SVGAnimationElement::parseMappedAttribute):
* svg/SVGAnimationElement.h:
* svg/SVGCircleElement.cpp:
(WebCore::SVGCircleElement::isSupportedAttribute):
(WebCore::SVGCircleElement::parseMappedAttribute):
(WebCore::SVGCircleElement::svgAttributeChanged):
(WebCore::SVGCircleElement::synchronizeProperty):
* svg/SVGCircleElement.h:
* svg/SVGClipPathElement.cpp:
(WebCore::SVGClipPathElement::isSupportedAttribute):
(WebCore::SVGClipPathElement::parseMappedAttribute):
(WebCore::SVGClipPathElement::svgAttributeChanged):
(WebCore::SVGClipPathElement::synchronizeProperty):
* svg/SVGClipPathElement.h:
* svg/SVGComponentTransferFunctionElement.cpp:
(WebCore::SVGComponentTransferFunctionElement::isSupportedAttribute):
(WebCore::SVGComponentTransferFunctionElement::parseMappedAttribute):
(WebCore::SVGComponentTransferFunctionElement::synchronizeProperty):
* svg/SVGComponentTransferFunctionElement.h:
* svg/SVGCursorElement.cpp:
(WebCore::SVGCursorElement::isSupportedAttribute):
(WebCore::SVGCursorElement::parseMappedAttribute):
(WebCore::SVGCursorElement::svgAttributeChanged):
(WebCore::SVGCursorElement::synchronizeProperty):
* svg/SVGCursorElement.h:
* svg/SVGElementInstance.h:
(WebCore::SVGElementInstance::InvalidationGuard::InvalidationGuard):
(WebCore::SVGElementInstance::InvalidationGuard::~InvalidationGuard):
* svg/SVGEllipseElement.cpp:
(WebCore::SVGEllipseElement::isSupportedAttribute):
(WebCore::SVGEllipseElement::parseMappedAttribute):
(WebCore::SVGEllipseElement::svgAttributeChanged):
(WebCore::SVGEllipseElement::synchronizeProperty):
* svg/SVGEllipseElement.h:
* svg/SVGExternalResourcesRequired.cpp:
(WebCore::SVGExternalResourcesRequired::addSupportedAttributes):
* svg/SVGExternalResourcesRequired.h:
* svg/SVGFEBlendElement.cpp:
(WebCore::SVGFEBlendElement::isSupportedAttribute):
(WebCore::SVGFEBlendElement::parseMappedAttribute):
(WebCore::SVGFEBlendElement::svgAttributeChanged):
(WebCore::SVGFEBlendElement::synchronizeProperty):
* svg/SVGFEBlendElement.h:
* svg/SVGFEColorMatrixElement.cpp:
(WebCore::SVGFEColorMatrixElement::isSupportedAttribute):
(WebCore::SVGFEColorMatrixElement::parseMappedAttribute):
(WebCore::SVGFEColorMatrixElement::svgAttributeChanged):
(WebCore::SVGFEColorMatrixElement::synchronizeProperty):
* svg/SVGFEColorMatrixElement.h:
* svg/SVGFEComponentTransferElement.cpp:
(WebCore::SVGFEComponentTransferElement::isSupportedAttribute):
(WebCore::SVGFEComponentTransferElement::parseMappedAttribute):
(WebCore::SVGFEComponentTransferElement::synchronizeProperty):
* svg/SVGFEComponentTransferElement.h:
* svg/SVGFECompositeElement.cpp:
(WebCore::SVGFECompositeElement::isSupportedAttribute):
(WebCore::SVGFECompositeElement::parseMappedAttribute):
(WebCore::SVGFECompositeElement::svgAttributeChanged):
(WebCore::SVGFECompositeElement::synchronizeProperty):
* svg/SVGFECompositeElement.h:
* svg/SVGFEConvolveMatrixElement.cpp:
(WebCore::SVGFEConvolveMatrixElement::isSupportedAttribute):
(WebCore::SVGFEConvolveMatrixElement::parseMappedAttribute):
(WebCore::SVGFEConvolveMatrixElement::svgAttributeChanged):
(WebCore::SVGFEConvolveMatrixElement::synchronizeProperty):
* svg/SVGFEConvolveMatrixElement.h:
* svg/SVGFEDiffuseLightingElement.cpp:
(WebCore::SVGFEDiffuseLightingElement::isSupportedAttribute):
(WebCore::SVGFEDiffuseLightingElement::parseMappedAttribute):
(WebCore::SVGFEDiffuseLightingElement::svgAttributeChanged):
(WebCore::SVGFEDiffuseLightingElement::synchronizeProperty):
* svg/SVGFEDiffuseLightingElement.h:
* svg/SVGFEDisplacementMapElement.cpp:
(WebCore::SVGFEDisplacementMapElement::isSupportedAttribute):
(WebCore::SVGFEDisplacementMapElement::parseMappedAttribute):
(WebCore::SVGFEDisplacementMapElement::svgAttributeChanged):
(WebCore::SVGFEDisplacementMapElement::synchronizeProperty):
* svg/SVGFEDisplacementMapElement.h:
* svg/SVGFEDropShadowElement.cpp:
(WebCore::SVGFEDropShadowElement::isSupportedAttribute):
(WebCore::SVGFEDropShadowElement::parseMappedAttribute):
(WebCore::SVGFEDropShadowElement::svgAttributeChanged):
(WebCore::SVGFEDropShadowElement::synchronizeProperty):
* svg/SVGFEDropShadowElement.h:
* svg/SVGFEGaussianBlurElement.cpp:
(WebCore::SVGFEGaussianBlurElement::isSupportedAttribute):
(WebCore::SVGFEGaussianBlurElement::parseMappedAttribute):
(WebCore::SVGFEGaussianBlurElement::svgAttributeChanged):
(WebCore::SVGFEGaussianBlurElement::synchronizeProperty):
* svg/SVGFEGaussianBlurElement.h:
* svg/SVGFEImageElement.cpp:
(WebCore::SVGFEImageElement::isSupportedAttribute):
(WebCore::SVGFEImageElement::parseMappedAttribute):
(WebCore::SVGFEImageElement::svgAttributeChanged):
(WebCore::SVGFEImageElement::synchronizeProperty):
* svg/SVGFEImageElement.h:
* svg/SVGFELightElement.cpp:
(WebCore::SVGFELightElement::isSupportedAttribute):
(WebCore::SVGFELightElement::parseMappedAttribute):
(WebCore::SVGFELightElement::svgAttributeChanged):
(WebCore::SVGFELightElement::synchronizeProperty):
* svg/SVGFELightElement.h:
* svg/SVGFEMergeNodeElement.cpp:
(WebCore::SVGFEMergeNodeElement::isSupportedAttribute):
(WebCore::SVGFEMergeNodeElement::parseMappedAttribute):
(WebCore::SVGFEMergeNodeElement::svgAttributeChanged):
(WebCore::SVGFEMergeNodeElement::synchronizeProperty):
* svg/SVGFEMergeNodeElement.h:
* svg/SVGFEMorphologyElement.cpp:
(WebCore::SVGFEMorphologyElement::isSupportedAttribute):
(WebCore::SVGFEMorphologyElement::parseMappedAttribute):
(WebCore::SVGFEMorphologyElement::svgAttributeChanged):
(WebCore::SVGFEMorphologyElement::synchronizeProperty):
* svg/SVGFEMorphologyElement.h:
* svg/SVGFEOffsetElement.cpp:
(WebCore::SVGFEOffsetElement::isSupportedAttribute):
(WebCore::SVGFEOffsetElement::parseMappedAttribute):
(WebCore::SVGFEOffsetElement::svgAttributeChanged):
(WebCore::SVGFEOffsetElement::synchronizeProperty):
* svg/SVGFEOffsetElement.h:
* svg/SVGFESpecularLightingElement.cpp:
(WebCore::SVGFESpecularLightingElement::isSupportedAttribute):
(WebCore::SVGFESpecularLightingElement::parseMappedAttribute):
(WebCore::SVGFESpecularLightingElement::svgAttributeChanged):
(WebCore::SVGFESpecularLightingElement::synchronizeProperty):
* svg/SVGFESpecularLightingElement.h:
* svg/SVGFETileElement.cpp:
(WebCore::SVGFETileElement::isSupportedAttribute):
(WebCore::SVGFETileElement::parseMappedAttribute):
(WebCore::SVGFETileElement::svgAttributeChanged):
(WebCore::SVGFETileElement::synchronizeProperty):
* svg/SVGFETileElement.h:
* svg/SVGFETurbulenceElement.cpp:
(WebCore::SVGFETurbulenceElement::isSupportedAttribute):
(WebCore::SVGFETurbulenceElement::parseMappedAttribute):
(WebCore::SVGFETurbulenceElement::svgAttributeChanged):
(WebCore::SVGFETurbulenceElement::synchronizeProperty):
* svg/SVGFETurbulenceElement.h:
* svg/SVGFilterElement.cpp:
(WebCore::SVGFilterElement::isSupportedAttribute):
(WebCore::SVGFilterElement::parseMappedAttribute):
(WebCore::SVGFilterElement::svgAttributeChanged):
(WebCore::SVGFilterElement::synchronizeProperty):
* svg/SVGFilterElement.h:
* svg/SVGFilterPrimitiveStandardAttributes.cpp:
(WebCore::SVGFilterPrimitiveStandardAttributes::isSupportedAttribute):
(WebCore::SVGFilterPrimitiveStandardAttributes::parseMappedAttribute):
(WebCore::SVGFilterPrimitiveStandardAttributes::svgAttributeChanged):
(WebCore::SVGFilterPrimitiveStandardAttributes::synchronizeProperty):
* svg/SVGFilterPrimitiveStandardAttributes.h:
* svg/SVGFitToViewBox.cpp:
(WebCore::SVGFitToViewBox::parseMappedAttribute):
(WebCore::SVGFitToViewBox::synchronizeProperties):
(WebCore::SVGFitToViewBox::addSupportedAttributes):
* svg/SVGFitToViewBox.h:
* svg/SVGForeignObjectElement.cpp:
(WebCore::SVGForeignObjectElement::isSupportedAttribute):
(WebCore::SVGForeignObjectElement::parseMappedAttribute):
(WebCore::SVGForeignObjectElement::svgAttributeChanged):
(WebCore::SVGForeignObjectElement::synchronizeProperty):
* svg/SVGForeignObjectElement.h:
* svg/SVGGElement.cpp:
(WebCore::SVGGElement::isSupportedAttribute):
(WebCore::SVGGElement::parseMappedAttribute):
(WebCore::SVGGElement::svgAttributeChanged):
(WebCore::SVGGElement::synchronizeProperty):
* svg/SVGGElement.h:
* svg/SVGGradientElement.cpp:
(WebCore::SVGGradientElement::isSupportedAttribute):
(WebCore::SVGGradientElement::parseMappedAttribute):
(WebCore::SVGGradientElement::svgAttributeChanged):
(WebCore::SVGGradientElement::synchronizeProperty):
* svg/SVGGradientElement.h:
* svg/SVGImageElement.cpp:
(WebCore::SVGImageElement::isSupportedAttribute):
(WebCore::SVGImageElement::parseMappedAttribute):
(WebCore::SVGImageElement::svgAttributeChanged):
(WebCore::SVGImageElement::synchronizeProperty):
* svg/SVGImageElement.h:
* svg/SVGLangSpace.cpp:
(WebCore::SVGLangSpace::addSupportedAttributes):
* svg/SVGLangSpace.h:
* svg/SVGLineElement.cpp:
(WebCore::SVGLineElement::isSupportedAttribute):
(WebCore::SVGLineElement::parseMappedAttribute):
(WebCore::SVGLineElement::svgAttributeChanged):
(WebCore::SVGLineElement::synchronizeProperty):
* svg/SVGLineElement.h:
* svg/SVGLinearGradientElement.cpp:
(WebCore::SVGLinearGradientElement::isSupportedAttribute):
(WebCore::SVGLinearGradientElement::parseMappedAttribute):
(WebCore::SVGLinearGradientElement::svgAttributeChanged):
(WebCore::SVGLinearGradientElement::synchronizeProperty):
* svg/SVGLinearGradientElement.h:
* svg/SVGMPathElement.cpp:
(WebCore::SVGMPathElement::isSupportedAttribute):
(WebCore::SVGMPathElement::parseMappedAttribute):
(WebCore::SVGMPathElement::synchronizeProperty):
* svg/SVGMPathElement.h:
* svg/SVGMarkerElement.cpp:
(WebCore::SVGMarkerElement::isSupportedAttribute):
(WebCore::SVGMarkerElement::parseMappedAttribute):
(WebCore::SVGMarkerElement::svgAttributeChanged):
(WebCore::SVGMarkerElement::synchronizeProperty):
* svg/SVGMarkerElement.h:
* svg/SVGMaskElement.cpp:
(WebCore::SVGMaskElement::isSupportedAttribute):
(WebCore::SVGMaskElement::parseMappedAttribute):
(WebCore::SVGMaskElement::svgAttributeChanged):
(WebCore::SVGMaskElement::synchronizeProperty):
* svg/SVGMaskElement.h:
* svg/SVGPathElement.cpp:
(WebCore::SVGPathElement::isSupportedAttribute):
(WebCore::SVGPathElement::parseMappedAttribute):
(WebCore::SVGPathElement::svgAttributeChanged):
(WebCore::SVGPathElement::synchronizeProperty):
* svg/SVGPathElement.h:
* svg/SVGPatternElement.cpp:
(WebCore::SVGPatternElement::isSupportedAttribute):
(WebCore::SVGPatternElement::parseMappedAttribute):
(WebCore::SVGPatternElement::svgAttributeChanged):
(WebCore::SVGPatternElement::synchronizeProperty):
* svg/SVGPatternElement.h:
* svg/SVGPolyElement.cpp:
(WebCore::SVGPolyElement::isSupportedAttribute):
(WebCore::SVGPolyElement::parseMappedAttribute):
(WebCore::SVGPolyElement::svgAttributeChanged):
* svg/SVGPolyElement.h:
* svg/SVGRadialGradientElement.cpp:
(WebCore::SVGRadialGradientElement::isSupportedAttribute):
(WebCore::SVGRadialGradientElement::parseMappedAttribute):
(WebCore::SVGRadialGradientElement::svgAttributeChanged):
(WebCore::SVGRadialGradientElement::synchronizeProperty):
* svg/SVGRadialGradientElement.h:
* svg/SVGRectElement.cpp:
(WebCore::SVGRectElement::isSupportedAttribute):
(WebCore::SVGRectElement::parseMappedAttribute):
(WebCore::SVGRectElement::svgAttributeChanged):
(WebCore::SVGRectElement::synchronizeProperty):
* svg/SVGRectElement.h:
* svg/SVGSVGElement.cpp:
(WebCore::SVGSVGElement::svgAttributeChanged):
(WebCore::SVGSVGElement::synchronizeProperty):
* svg/SVGScriptElement.cpp:
(WebCore::SVGScriptElement::isSupportedAttribute):
(WebCore::SVGScriptElement::parseMappedAttribute):
(WebCore::SVGScriptElement::svgAttributeChanged):
(WebCore::SVGScriptElement::synchronizeProperty):
* svg/SVGScriptElement.h:
* svg/SVGStopElement.cpp:
(WebCore::SVGStopElement::isSupportedAttribute):
(WebCore::SVGStopElement::parseMappedAttribute):
(WebCore::SVGStopElement::svgAttributeChanged):
(WebCore::SVGStopElement::synchronizeProperty):
* svg/SVGStopElement.h:
* svg/SVGStyleElement.cpp:
(WebCore::SVGStyleElement::isSupportedAttribute):
(WebCore::SVGStyleElement::parseMappedAttribute):
* svg/SVGStyleElement.h:
* svg/SVGStyledElement.cpp:
(WebCore::SVGStyledElement::parseMappedAttribute):
(WebCore::SVGStyledElement::svgAttributeChanged):
(WebCore::SVGStyledElement::synchronizeProperty):
* svg/SVGStyledTransformableElement.cpp:
(WebCore::SVGStyledTransformableElement::isSupportedAttribute):
(WebCore::SVGStyledTransformableElement::parseMappedAttribute):
(WebCore::SVGStyledTransformableElement::svgAttributeChanged):
(WebCore::SVGStyledTransformableElement::synchronizeProperty):
* svg/SVGStyledTransformableElement.h:
* svg/SVGSymbolElement.cpp:
(WebCore::SVGSymbolElement::isSupportedAttribute):
(WebCore::SVGSymbolElement::parseMappedAttribute):
(WebCore::SVGSymbolElement::svgAttributeChanged):
(WebCore::SVGSymbolElement::synchronizeProperty):
* svg/SVGSymbolElement.h:
* svg/SVGTRefElement.cpp:
(WebCore::SVGTRefElement::isSupportedAttribute):
(WebCore::SVGTRefElement::parseMappedAttribute):
(WebCore::SVGTRefElement::svgAttributeChanged):
(WebCore::SVGTRefElement::synchronizeProperty):
* svg/SVGTRefElement.h:
* svg/SVGTests.cpp:
(WebCore::SVGTests::addSupportedAttributes):
* svg/SVGTests.h:
* svg/SVGTextContentElement.cpp:
(WebCore::SVGTextContentElement::isSupportedAttribute):
(WebCore::SVGTextContentElement::parseMappedAttribute):
(WebCore::SVGTextContentElement::synchronizeProperty):
(WebCore::SVGTextContentElement::svgAttributeChanged):
* svg/SVGTextContentElement.h:
* svg/SVGTextElement.cpp:
(WebCore::SVGTextElement::isSupportedAttribute):
(WebCore::SVGTextElement::parseMappedAttribute):
(WebCore::SVGTextElement::svgAttributeChanged):
(WebCore::SVGTextElement::synchronizeProperty):
* svg/SVGTextElement.h:
* svg/SVGTextPathElement.cpp:
(WebCore::SVGTextPathElement::isSupportedAttribute):
(WebCore::SVGTextPathElement::parseMappedAttribute):
(WebCore::SVGTextPathElement::svgAttributeChanged):
(WebCore::SVGTextPathElement::synchronizeProperty):
* svg/SVGTextPathElement.h:
* svg/SVGTextPositioningElement.cpp:
(WebCore::SVGTextPositioningElement::isSupportedAttribute):
(WebCore::SVGTextPositioningElement::parseMappedAttribute):
(WebCore::SVGTextPositioningElement::svgAttributeChanged):
(WebCore::SVGTextPositioningElement::synchronizeProperty):
* svg/SVGTextPositioningElement.h:
* svg/SVGTransformable.cpp:
* svg/SVGTransformable.h:
* svg/SVGURIReference.cpp:
(WebCore::SVGURIReference::addSupportedAttributes):
* svg/SVGURIReference.h:
* svg/SVGUseElement.cpp:
(WebCore::SVGUseElement::isSupportedAttribute):
(WebCore::SVGUseElement::parseMappedAttribute):
(WebCore::SVGUseElement::svgAttributeChanged):
(WebCore::SVGUseElement::synchronizeProperty):
* svg/SVGUseElement.h:
* svg/SVGViewElement.cpp:
(WebCore::SVGViewElement::isSupportedAttribute):
(WebCore::SVGViewElement::parseMappedAttribute):
(WebCore::SVGViewElement::synchronizeProperty):
* svg/SVGViewElement.h:
* svg/SVGZoomAndPan.cpp:
(WebCore::SVGZoomAndPan::addSupportedAttributes):
* svg/SVGZoomAndPan.h:
2011-05-20 Simon Fraser <simon.fraser@apple.com>
Reviewed by Dan Bernstein.
Allow ShadowBlur to do tiling when the context is scaled
https://bugs.webkit.org/show_bug.cgi?id=61232
If the GraphicsContext is scaled or rotated by a multiple of 90deg, have ShadowBlur
use the tiling code path, to avoid blurring large areas on pages like cracked.com
when the context is scaled.
* platform/graphics/ShadowBlur.cpp:
(WebCore::ShadowBlur::drawRectShadow): Call preservesAxisAlignment()
to decide when to not use tiling.
(WebCore::ShadowBlur::drawInsetShadow): Ditto.
(WebCore::ShadowBlur::drawLayerPieces): Round to device pixels when drawing tiles
to avoid pixel cracks in scaled contexts.
* platform/graphics/transforms/AffineTransform.h:
(WebCore::AffineTransform::preservesAxisAlignment): Return true if there is the matrix
contains a transform that results in axis alignment (no rotation or skew, or rotations
which are multiples of 90deg).
2011-05-20 Alexey Proskuryakov <ap@apple.com>
Reviewed by Kent Tamura.
Special characters can be inserted in text field having reached maxlength
https://bugs.webkit.org/show_bug.cgi?id=19479
<rdar://problem/7828739>
Test: platform/mac/editing/input/maxlength.html
* editing/CompositeEditCommand.cpp:
(WebCore::CompositeEditCommand::insertTextIntoNode):
(WebCore::CompositeEditCommand::replaceTextInNode):
Avoid hitting an assertion below, now that we can get here with empty text.
* editing/TypingCommand.cpp: (WebCore::TypingCommand::insertText): There is still work to do
even if beforetextinput removed all text from the event. At the very least, we should delete
the current selection.
2011-05-20 Andy Estes <aestes@apple.com>
Reviewed by Darin Adler.
REGRESSION (r70748): WebKit cannot play videos created by Podcast Producer.
https://bugs.webkit.org/show_bug.cgi?id=61229
Podcast Producer uses an object tag with a classid attribute to embed
QuickTime Player into a page. In r70748, we changed our behavior to
render the object's fallback content when a non-empty classid is
encountered, per HTML5. Since Podcast Producer videos have no fallback
content, this change in behavior causes the video to fail to load.
Since the object tag has a valid type attribute, we would be able to
load it if weren't for the non-empty classid. This patch changes our
policy to allow objects with non-empty classids if there is no fallback
content. We still continue to prefer fallback content if it exists,
however.
* html/HTMLObjectElement.cpp:
(WebCore::HTMLObjectElement::hasValidClassId): Treat a non-empty
classid as valid if the object has no fallback content.
2011-05-20 Kulanthaivel Palanichamy <kulanthaivel@codeaurora.org>
Reviewed by Simon Fraser.
If both border-radius and box-shadow applied, shadow is not fully visible
https://bugs.webkit.org/show_bug.cgi?id=59577
The current implementation of RoundedIntRect::inflateWithRadii() inflates
its rect size and corner radii out of sync. This leads to validation failure in
Path::addRoundedRect() and results in ignoring radii in the path.
When this invalid path is used to clip out the rounded corner box before painting
the box shadow, the entire rectangle is clipped out without the corner radii.
This patch implements RoundedIntRect::inflateWithRadii() properly to inflate
rounded rect radii based on inflate ratios of rect size.
Test: fast/css/box-shadow-and-border-radius.html
* platform/graphics/RoundedIntRect.cpp:
(WebCore::RoundedIntRect::inflateWithRadii):
* platform/graphics/RoundedIntRect.h:
2011-05-20 Michael Nordman <michaeln@google.com>
Reviewed by Darin Fisher.
[Chromium] Support the new webkit apis so the WebDatabase system participates
in the unified quota management system.
https://bugs.webkit.org/show_bug.cgi?id=60985
No change in functionality, no new tests.
* platform/chromium/PlatformBridge.h:
* storage/chromium/QuotaTracker.cpp:
(WebCore::QuotaTracker::getDatabaseSizeAndSpaceAvailableToOrigin):
(WebCore::QuotaTracker::updateDatabaseSize):
(WebCore::QuotaTracker::updateSpaceAvailableToOrigin):
(WebCore::QuotaTracker::resetSpaceAvailableToOrigin):
* storage/chromium/QuotaTracker.h:
2011-05-20 Andy Estes <aestes@apple.com>
Reviewed by Darin Adler.
WebView loses firstResponder status when entering full-screen mode.
https://bugs.webkit.org/show_bug.cgi?id=61153
No test possible via DRT. Add a manual test instead.
* manual-tests/full-screen-keypress.html: Added.
2011-05-20 Jeremy Noble <jer.noble@apple.com>
Reviewed by Maciej Stachowiak.
WebKit2: Exit full screen mode if the WebProcess crashes.
https://bugs.webkit.org/show_bug.cgi?id=61151
* platform/graphics/win/FullScreenController.h:
* platform/graphics/win/FullScreenController.cpp:
(FullScreenController::close): Added. Close the full-screen window without animation
if called.
2011-05-20 Enrica Casucci <enrica@apple.com>
Reviewed by David Kilzer.
Add delegate methods about focus and blur to all elements.
https://bugs.webkit.org/show_bug.cgi?id=61218
We want to have delegates for these events for all the elements, not only the form elements.
The patch moves the call to the delegate in the Node class and changes the name
of the methods not to be form element specific.
* dom/Node.cpp:
(WebCore::Node::dispatchFocusEvent): Added call to delegate with the new name.
(WebCore::Node::dispatchBlurEvent): Added call to delegate with the new name.
* html/HTMLFormControlElement.cpp:
(WebCore::HTMLFormControlElement::dispatchBlurEvent): Removed code that calls the delegate since
it has been moved into Node.
* html/HTMLFormControlElement.h: Removed dispatchFocusEvent, since we are using the default inplementation in Node.
* loader/EmptyClients.h:
(WebCore::EmptyChromeClient::elementDidFocus): Name changed.
(WebCore::EmptyChromeClient::elementDidBlur): Name changed.
* page/ChromeClient.h:
(WebCore::ChromeClient::elementDidFocus): Name changed.
(WebCore::ChromeClient::elementDidBlur): Name changed.
2011-05-20 Ryosuke Niwa <rniwa@webkit.org>
Reviewed by Enrica Casucci.
Wrap copied contents by one style span instead of two
https://bugs.webkit.org/show_bug.cgi?id=60988
Replaced sourceDocumentStyleSpan and copiedRangeStyleSpan by one wrapping style span. Instead
of wrapping the copied contents by user-applied style and document default style in serialization,
take the difference with the document default's style in paste code.
This will dramatically simplify our copy and paste code and pave a way to fix the bug 60914.
No new tests because copy & paste is tested by existing layout tests.
* editing/EditingStyle.cpp:
(WebCore::EditingStyle::prepareToApplyAt): Remove the color property if RGBA values of color
matches that of the computed style at the specified position.
* editing/ReplaceSelectionCommand.cpp:
(WebCore::ReplaceSelectionCommand::handleStyleSpans): Replaced sourceDocumentStyleSpan and
copiedRangeStyleSpan by wrappingStyleSpan. When pasting as a quotation, compare style against
the document's default style to avoid keeping the document default style (tested by
editing/pasteboard/4930986-3.html).
* editing/ReplaceSelectionCommand.h:
* editing/markup.cpp:
(WebCore::createMarkup): Only use one style span to wrap the serialized contents.
2011-05-20 Simon Fraser <simon.fraser@apple.com>
Reviewed by Sam Weinig.
numberOfActiveAnimations() can include animations from documents in the page cache
https://bugs.webkit.org/show_bug.cgi?id=53641
Some transition tests using layoutTestController.numberOfActiveAnimations() failed
in WebKit2 because numberOfActiveAnimations() could include those from other documents
in the page cache.
Fix by passing in the document for which we wish to count animations.
* WebCore.exp.in:
* page/animation/AnimationController.cpp:
(WebCore::AnimationControllerPrivate::numberOfActiveAnimations):
(WebCore::AnimationController::numberOfActiveAnimations):
* page/animation/AnimationController.h:
* page/animation/AnimationControllerPrivate.h:
2011-05-20 Adam Barth <abarth@webkit.org>
Reviewed by Alexey Proskuryakov.
Factor CORS request preparation out of DocumentThreadableLoader
https://bugs.webkit.org/show_bug.cgi?id=61209
DocumentThreadableLoader has two jobs:
1) Proxy loads between threads.
2) Run the CORS state machine.
This patch begins the work of separating those concerns, allowing CORS
to be used elsewhere in the loading pipeline. In particular, this
patch moves knowledge of how to prepare CORS requests out of
DocumentThreadableLoder.
* loader/CrossOriginAccessControl.cpp:
(WebCore::isOnAccessControlSimpleRequestHeaderWhitelist):
(WebCore::updateRequestForAccessControl):
(WebCore::createAccessControlPreflightRequest):
* loader/CrossOriginAccessControl.h:
* loader/DocumentThreadableLoader.cpp:
(WebCore::DocumentThreadableLoader::DocumentThreadableLoader):
(WebCore::DocumentThreadableLoader::makeSimpleCrossOriginAccessRequest):
(WebCore::DocumentThreadableLoader::makeCrossOriginAccessRequestWithPreflight):
2011-05-20 Rob Buis <rbuis@rim.com>
Reviewed by Dirk Schulze.
Use test from ietestcenter fails
https://bugs.webkit.org/show_bug.cgi?id=60844
When an id changes on an in-document element, we need to check whether the id
is part of the pending elements. Since this is the same thing as happens in
insertedIntoDocument, split out the common code into buildPendingResourcesIfNeeded.
Test: svg/W3C-SVG-1.1-SE/struct-use-14-f.svg
* svg/SVGStyledElement.cpp:
(WebCore::SVGStyledElement::svgAttributeChanged):
(WebCore::SVGStyledElement::insertedIntoDocument):
(WebCore::SVGStyledElement::buildPendingResourcesIfNeeded):
* svg/SVGStyledElement.h:
2011-05-20 Abhishek Arya <inferno@chromium.org>
Reviewed by Kent Tamura.
Make auto-focus a post attach callback in
HTMLFormControlElement::attach().
https://bugs.webkit.org/show_bug.cgi?id=32882
Original patch by Darin Adler. This one uses a part of it.
Test: fast/forms/input-element-attach-crash.html
* dom/Document.cpp:
(WebCore::Document::recalcStyle): Make sure that m_inStyleRecalc is
already false by the time post-attach callbacks are done so that
layout triggered inside those callbacks can work properly.
* html/HTMLFormControlElement.cpp:
(WebCore::shouldAutofocus): Helper function that expresses
the rule for which form control elements should auto-focus.
(WebCore::focusPostAttach): Called post-attach to focus an
element if we discover it should be focused during attach.
(WebCore::HTMLFormControlElement::attach): Refactored code for
which elements need auto-focus into a separate function. Instead
of focusing right away, use the focusPostAttach function to focus
after attach is done. Also added calls to suspendPostAttachCallbacks
and resumePostAttachCallbacks so post-attach callbacks happen late
enough. Before, they could run inside the base attach function.
* html/HTMLInputElement.cpp:
(WebCore::HTMLInputElement::attach): Added calls to
suspendPostAttachCallbacks and resumePostAttachCallbacks so
post-attach callbacks happen late enough
2011-05-20 Alok Priyadarshi <alokp@chromium.org>
Reviewed by James Robinson.
[chromium] Remove LayerRendererChromium::useShader
https://bugs.webkit.org/show_bug.cgi?id=61143
GPU compositor tests should be sufficient.
* platform/graphics/chromium/LayerRendererChromium.cpp:
(WebCore::LayerRendererChromium::LayerRendererChromium):
* platform/graphics/chromium/LayerRendererChromium.h:
* platform/graphics/chromium/LayerTilerChromium.cpp:
(WebCore::LayerTilerChromium::draw):
* platform/graphics/chromium/RenderSurfaceChromium.cpp:
(WebCore::RenderSurfaceChromium::drawSurface):
* platform/graphics/chromium/cc/CCCanvasLayerImpl.cpp:
(WebCore::CCCanvasLayerImpl::draw):
* platform/graphics/chromium/cc/CCHeadsUpDisplay.cpp:
(WebCore::CCHeadsUpDisplay::draw):
* platform/graphics/chromium/cc/CCLayerImpl.cpp:
(WebCore::CCLayerImpl::drawDebugBorder):
* platform/graphics/chromium/cc/CCPluginLayerImpl.cpp:
(WebCore::CCPluginLayerImpl::draw):
* platform/graphics/chromium/cc/CCVideoLayerImpl.cpp:
(WebCore::CCVideoLayerImpl::drawYUV):
(WebCore::CCVideoLayerImpl::drawRGBA):
2011-05-20 Dirk Schulze <krit@webkit.org>
Reviewed by Darin Adler.
SVGPathSegList needs better getTotalLength, getSegmentAtLength path traversal code
https://bugs.webkit.org/show_bug.cgi?id=12047
Right now SVGPathElement::getTotalLength and SVGPathElement::getPointAtLength use toPathData()
to transform a SVGPathByteStream to a Path. This Path gets traversed to find the searched value.
With this patch both functions use the SVGPathByteStream directly together with the existing
traversing code in SVG. This avoids the intermediate transforming to a platform path and gives
platform independent results.
The traversal code in SVG needed to be extended to support all PathTraversalActions.
No new tests added. The existing tests cover the changes.
* svg/SVGPathElement.cpp:
(WebCore::SVGPathElement::getTotalLength):
(WebCore::SVGPathElement::getPointAtLength):
* svg/SVGPathParserFactory.cpp:
(WebCore::SVGPathParserFactory::getTotalLengthOfSVGPathByteStream):
(WebCore::SVGPathParserFactory::getPointAtLengthOfSVGPathByteStream):
* svg/SVGPathParserFactory.h:
* svg/SVGPathTraversalStateBuilder.cpp:
(WebCore::SVGPathTraversalStateBuilder::continueConsuming):
(WebCore::SVGPathTraversalStateBuilder::totalLength):
(WebCore::SVGPathTraversalStateBuilder::currentPoint):
* svg/SVGPathTraversalStateBuilder.h:
2011-05-20 Mark Pilgrim <pilgrim@chromium.org>
Reviewed by Tony Chang.
IndexedDB createObjectStore should throw if name is null
https://bugs.webkit.org/show_bug.cgi?id=58465
Test: storage/indexeddb/mozilla/create-objectstore-null-name.html
* storage/IDBDatabase.idl:
* storage/IDBDatabaseBackendImpl.cpp:
(WebCore::IDBDatabaseBackendImpl::createObjectStore):
2011-05-20 Xiaomei Ji <xji@chromium.org>
Reviewed by Ryosuke Niwa.
ctrl-arrow does not work on words separated by multiple spaces.
https://bugs.webkit.org/show_bug.cgi?id=57543.
Add the leftmost boundary of a box in RTL block or the rightmost boundary of a box in LTR
block as word break if its inlineBox is the current box and it is a word break.
* editing/visible_units.cpp:
(WebCore::previousWordBreakInBoxInsideBlockWithSameDirectionality): Add the rightmost
boundary of a box in LTR block or leftmost boundary of a box in RTL block as visually
first word break.
(WebCore::nextWordBreakInBoxInsideBlockWithDifferentDirectionality):
(WebCore::collectWordBreaksInBoxInsideBlockWithDifferntDirectionality):
(WebCore::leftWordBoundary): Fix bug change "box" to "adjacentBox".
(WebCore::rightWordBoundary): Fix bug change "box" to "adjacentBox".
2011-05-19 Evan Martin <evan@chromium.org>
Reviewed by Tony Chang.
[chromium] remove <(library) variable
https://bugs.webkit.org/show_bug.cgi?id=61158
This was for a build experiment; we can just use the correct value now.
* WebCore.gyp/WebCore.gyp:
2011-05-20 Pavel Podivilov <podivilov@chromium.org>
Reviewed by Pavel Feldman.
Web Inspector: breakpoints disappear from ui after navigation.
https://bugs.webkit.org/show_bug.cgi?id=61133
* inspector/front-end/DebuggerPresentationModel.js:
(WebInspector.DebuggerPresentationModel.prototype._debuggerWasEnabled):
(WebInspector.DebuggerPresentationModel.prototype._saveBreakpoints):
2011-05-20 Sheriff Bot <webkit.review.bot@gmail.com>
Unreviewed, rolling out r86958.
http://trac.webkit.org/changeset/86958
https://bugs.webkit.org/show_bug.cgi?id=61195
broke breakpoints persisting (Requested by podivilov on
#webkit).
* inspector/front-end/DebuggerPresentationModel.js:
(WebInspector.DebuggerPresentationModel.prototype._debuggerWasEnabled):
(WebInspector.DebuggerPresentationModel.prototype._saveBreakpoints):
2011-05-19 Sergey Vorobyev <sergeyvorobyev@google.com>
Reviewed by Yury Semikhatsky.
Web Inspector: Background network events collection - add GUI to Inspector.
https://bugs.webkit.org/show_bug.cgi?id=58652
Now in WebInspector Network panel avalaible new checkbox item in context menu:
"Background events collection". It allows to save all network events when inspector
frontend closed. Events that occur before collection enabling are not preserved after
frontend reopening. Property unique for each page. Disabled by default.
Tests: http/tests/inspector/network/network-clear-after-disabled.html
http/tests/inspector/network/network-close-load-open.html
http/tests/inspector/network/network-open-load-reopen.html
* inspector/EventsCollector.cpp:
(WebCore::EventsCollector::clear):
* inspector/EventsCollector.h:
* inspector/Inspector.json:
* inspector/InspectorFrontendProxy.cpp:
(WebCore::InspectorFrontendProxy::inspectorFrontendChannel):
* inspector/InspectorFrontendProxy.h:
* inspector/InspectorResourceAgent.cpp:
(WebCore::InspectorResourceAgent::setFrontend):
(WebCore::InspectorResourceAgent::clearFrontend):
(WebCore::InspectorResourceAgent::isBackgroundEventsCollectionEnabled):
(WebCore::InspectorResourceAgent::setBackgroundEventsCollectionEnabled):
(WebCore::InspectorResourceAgent::initializeBackgroundCollection):
(WebCore::InspectorResourceAgent::InspectorResourceAgent):
* inspector/InspectorResourceAgent.h:
* inspector/front-end/NetworkPanel.js:
(WebInspector.NetworkPanel):
(WebInspector.NetworkPanel.prototype._contextMenu):
(WebInspector.NetworkPanel.prototype._toggleBackgroundEventsCollection):
2011-05-20 Pavel Podivilov <podivilov@chromium.org>
Reviewed by Pavel Feldman.
Web Inspector: breakpoints disappear from ui after navigation.
https://bugs.webkit.org/show_bug.cgi?id=61133
* inspector/front-end/DebuggerPresentationModel.js:
(WebInspector.DebuggerPresentationModel.prototype._debuggerWasEnabled):
(WebInspector.DebuggerPresentationModel.prototype._saveBreakpoints):
2011-05-20 Jer Noble <jer.noble@apple.com>
Reviewed by Maciej Stachowiak.
Win: non-full-screen content is briefly seen when entering full-screen mode (and vice versa)
https://bugs.webkit.org/show_bug.cgi?id=61108
Instead of repainting the full- and non-full-screen windows in WebCore, delegate that
responsibility to the FullScreenControllerClient. Because the repaint operation may
be asynchronous, add a new method for clients to use to indicate repainting has completed.
* platform/graphics/win/FullScreenController.cpp:
(FullScreenController::Private::Private): Added new ivars.
(FullScreenController::enterFullScreen): Split into two functions (pre-and post repaint)
(FullScreenController::enterFullScreenRepaintCompleted): Ditto.
(FullScreenController::exitFullScreen): Ditto.
(FullScreenController::exitFullScreenRepaintCompleted): Ditto.
(FullScreenController::repaintCompleted): Call the appropriated repaint completed function.
* platform/graphics/win/FullScreenController.h:
* platform/graphics/win/FullScreenControllerClient.h:
2011-05-20 Yury Semikhatsky <yurys@chromium.org>
Reviewed by Pavel Feldman.
Web Inspector: use RefPtr instead of OwnPtr to store InspectorBackendDispatcher
https://bugs.webkit.org/show_bug.cgi?id=61188
* inspector/WorkerInspectorController.cpp:
(WebCore::WorkerInspectorController::connectFrontend):
(WebCore::WorkerInspectorController::disconnectFrontend):
* inspector/WorkerInspectorController.h:
2011-05-20 Tonis Tiigi <tonistiigi@gmail.com>
Reviewed by Pavel Feldman.
Web Inspector: Network panel should only show pointer cursor over valid resources
https://bugs.webkit.org/show_bug.cgi?id=55240
Cursor style removed from filler area.
* inspector/front-end/networkPanel.css:
(.network-sidebar .data-grid tr:not(.filler) td.name-column):
2011-05-20 Peter Varga <pvarga@webkit.org>
Reviewed by Simon Hausmann.
[Qt][V8] Use qtscript-staging's shipped version of V8 when building with --v8
https://bugs.webkit.org/show_bug.cgi?id=56649
Use the provided V8 and functionality of
http://qt.gitorious.org/+qt-developers/qt/qtscript-staging to build QtWebKit+V8.
Based on the original patch of Andras Becsi <abecsi@webkit.org>.
No new tests needed.
* CodeGenerators.pri: Add generating of DebuggerScriptSource.h
* WebCore.pri: Fix the options for V8 build.
* WebCore.pro: Ditto.
* bindings/v8/NPV8Object.cpp:
(WebCore::npObjectTypeInfo): Add missing initializer.
* bindings/v8/ScriptController.cpp:
(WebCore::ScriptController::disableEval): Temporarily disable
unsupported feature on Qt.
* bindings/v8/ScriptControllerQt.cpp:
(WebCore::ScriptController::qtScriptEngine): use the QtScriptEngine
constructor of qtscript-staging.
* bindings/v8/custom/V8HTMLAudioElementConstructor.cpp: Add missing
initializer.
* bindings/v8/custom/V8HTMLImageElementConstructor.cpp: Ditto.
* bindings/v8/custom/V8HTMLOptionElementConstructor.cpp: Ditto.
* loader/appcache/ApplicationCacheGroup.cpp: Add missing header.
* loader/cache/CachedResourceRequest.cpp: Ditto.
* page/PageSerializer.cpp: Ditto.
* page/qt/FrameQt.cpp: Ditto.
* storage/StorageEventDispatcher.cpp: Ditto.
2011-05-20 Tonis Tiigi <tonistiigi@gmail.com>
Reviewed by Pavel Feldman.
Web Inspector: console.log(XMLDocument) should be case preserving
https://bugs.webkit.org/show_bug.cgi?id=60765
Changes the XML document checking from base documents MIME type
to xmlVersion parameter.
* inspector/InspectorDOMAgent.cpp:
(WebCore::InspectorDOMAgent::buildObjectForNode):
* inspector/front-end/DOMAgent.js:
(WebInspector.DOMNode):
* inspector/front-end/ElementsTreeOutline.js:
(WebInspector.ElementsTreeOutline.prototype.set rootDOMNode):
2011-05-20 Mikhail Naganov <mnaganov@chromium.org>
Reviewed by Yury Semikhatsky.
Web Inspector: [Chromium] Use bottom-up CPU profile tree built in VM,
instead of building it on Inspector's side.
https://bugs.webkit.org/show_bug.cgi?id=61185
* bindings/js/ScriptProfile.cpp:
(WebCore::ScriptProfile::bottomUpHead):
(WebCore::ScriptProfile::buildInspectorObjectForBottomUpHead):
* bindings/js/ScriptProfile.h:
* bindings/v8/ScriptProfile.cpp:
(WebCore::ScriptProfile::bottomUpHead):
(WebCore::ScriptProfile::buildInspectorObjectForBottomUpHead):
* bindings/v8/ScriptProfile.h:
* inspector/InspectorProfilerAgent.cpp:
(WebCore::InspectorProfilerAgent::getProfile):
* inspector/front-end/ProfileView.js:
(WebInspector.CPUProfileView.prototype.get bottomUpProfileDataGridTree):
2011-05-20 Adam Roben <aroben@apple.com>
Mac build fix after r86936
* WebCore.xcodeproj/project.pbxproj: Added preprocessor.pm like the
other .pm files.
2011-05-20 Kent Tamura <tkent@chromium.org>
Try to fix Windows CE build.
Touch html.css to kick UA style sheet generation.
* css/html.css:
2011-05-20 Kent Tamura <tkent@chromium.org>
Try to fix Windows CE build.
* CMakeLists.txt: Add --preprocessor flag.
2011-05-20 Kent Tamura <tkent@chromium.org>
Reviewed by Hajime Morita.
Apply feature flags to user-agent style sheets
https://bugs.webkit.org/show_bug.cgi?id=52612
A user-agent style sheet should not have style definitions for disabled
features because such definitions makes feature detection harder and
causes incorrect behavior (See Bug 52214).
We have handled such feature-dependent style definitions by providing
separated CSS files and selecting them in build files. Adding such style
definition was hard because we need to update each of build files. This
change simplifies the process to add such style definitions by applying
preprocessor to the CSS files.
Implementation:
make-css-file-arrays.pl invokes a preprocessor if it has --defines
option. Otherwise, it just remove lines beginning with #.
In this change, we pass --defines on Mac, Windows, Chromium, GTK, and
CMake platforms. Qt and Android have no behavior change.
* CMakeLists.txt:
- IDL handling depends on preprocessor.pm.
- Pass --defines option to make-css-file-arrays.pl
- Add WebCore/bindings/scripts to @INC for make-css-file-arrays.pl
* CodeGenerators.pri: IDL handling depends on preprocessor.pm.
* DerivedSources.make: ditto.
* GNUmakefile.am: ditto.
* WebCore.gyp/WebCore.gyp: ditto.
* WebCore.gyp/scripts/action_useragentstylesheets.py:
Change parameter order to support perl modules and options.
Many code is taken from rule_bindings.py.
* WebCore.vcproj/MigrateScripts: Handles preprocessor.pm.
* bindings/scripts/IDLParser.pm:
Move the preprocessor code to preprocessor.pm.
* bindings/scripts/preprocessor.pm:
Added. The code was moved from IDLParser.pm
* css/html.css: Enclose some style definitions with #if-#endif.
* css/make-css-file-arrays.pl:
- Add --defines and --preprocessor options.
- Invoke a preprocessor if --defines is specified.
2011-05-20 Dirk Schulze <krit@webkit.org>
Rubber-stamped by Nikolas Zimmermann.
Remove unnecessary class Path inlcude from PathTraversalState.
* platform/graphics/PathTraversalState.h:
2011-05-19 Pavel Podivilov <podivilov@chromium.org>
Reviewed by Pavel Feldman.
Web Inspector: ctrl+s should not switch source frame to read only mode.
https://bugs.webkit.org/show_bug.cgi?id=61125
* inspector/front-end/SourceFrame.js:
(WebInspector.SourceFrame.prototype.commitEditing.didEditContent):
(WebInspector.SourceFrame.prototype.commitEditing):
* inspector/front-end/inspector.js:
(WebInspector.documentKeyDown):
2011-05-20 Piroska András <Piroska.Andras@stud.u-szeged.hu>
Reviewed by Nikolas Zimmermann.
Apply the ParallelJobs support to FEConvolveMatrix
https://bugs.webkit.org/show_bug.cgi?id=61171
The FEConvolveMatrix filter of SVG can consume lots of resources if it is
applied to a large area. The computation can be distributed to multiple
cores if the architecture supports.
The average performance progression is 20-30% on dual-core machines.
Developed in cooperation with Gabor Loki.
* platform/graphics/filters/FEConvolveMatrix.cpp:
(WebCore::FEConvolveMatrix::fastSetInteriorPixels):
(WebCore::FEConvolveMatrix::setInteriorPixels):
(WebCore::FEConvolveMatrix::setInteriorPixelsWorker):
(WebCore::FEConvolveMatrix::apply):
* platform/graphics/filters/FEConvolveMatrix.h:
2011-05-20 Sheriff Bot <webkit.review.bot@gmail.com>
Unreviewed, rolling out r86920.
http://trac.webkit.org/changeset/86920
https://bugs.webkit.org/show_bug.cgi?id=61173
It cause compile error on some buildbot in chromium. e.g.
http://build.chromium.org/p/chromium.memory/builders/Chromium%20Mac%20Builder%20%28valgrind%29/builds/12336/steps/compile/logs/stdio#error1
(Requested by ukai_ on #webkit).
* WebCore.xcodeproj/project.pbxproj:
* css/CSSComputedStyleDeclaration.cpp:
(WebCore::CSSComputedStyleDeclaration::getPropertyCSSValue):
* css/CSSParser.cpp:
(WebCore::CSSParser::parseValue):
* css/CSSPrimitiveValueMappings.h:
(WebCore::CSSPrimitiveValue::CSSPrimitiveValue):
(WebCore::CSSPrimitiveValue::operator EImageRendering):
* css/CSSPropertyNames.in:
* css/CSSStyleSelector.cpp:
(WebCore::CSSStyleSelector::applyProperty):
* css/CSSValueKeywords.in:
* css/SVGCSSComputedStyleDeclaration.cpp:
(WebCore::CSSComputedStyleDeclaration::getSVGPropertyCSSValue):
* css/SVGCSSPropertyNames.in:
* css/SVGCSSStyleSelector.cpp:
(WebCore::CSSStyleSelector::applySVGProperty):
* css/SVGCSSValueKeywords.in:
* html/HTMLCanvasElement.cpp:
(WebCore::HTMLCanvasElement::paint):
* html/HTMLCanvasElement.h:
* platform/graphics/ImageRenderingMode.h: Removed.
* rendering/RenderBoxModelObject.cpp:
(WebCore::ImageQualityController::shouldPaintAtLowQuality):
* rendering/RenderHTMLCanvas.cpp:
(WebCore::RenderHTMLCanvas::paintReplaced):
* rendering/style/RenderStyle.cpp:
(WebCore::RenderStyle::diff):
* rendering/style/RenderStyle.h:
* rendering/style/RenderStyleConstants.h:
* rendering/style/SVGRenderStyle.cpp:
(WebCore::SVGRenderStyle::diff):
* rendering/style/SVGRenderStyle.h:
(WebCore::SVGRenderStyle::initialImageRendering):
(WebCore::SVGRenderStyle::setImageRendering):
(WebCore::SVGRenderStyle::imageRendering):
(WebCore::SVGRenderStyle::InheritedFlags::operator==):
(WebCore::SVGRenderStyle::setBitDefaults):
* rendering/style/SVGRenderStyleDefs.h:
* rendering/style/StyleRareInheritedData.cpp:
(WebCore::StyleRareInheritedData::StyleRareInheritedData):
(WebCore::StyleRareInheritedData::operator==):
* rendering/style/StyleRareInheritedData.h:
* rendering/svg/SVGRenderTreeAsText.cpp:
(WebCore::writeStyle):
2011-05-20 Dirk Schulze <krit@webkit.org>
Reviewed by Eric Seidel.
SVG Large curve path segment OOM crash
https://bugs.webkit.org/show_bug.cgi?id=42079
Limit the depth of repeatedly splitting a segment on length calculation to 20. The limitation
is necessary for very big segments that would be splitter into millions of parts otherwise.
The limitation just cause a less accurate approximation.
At the moment the limit is fixed to 20. This is comparable with splitting the segment into
~1 million parts as a worst case. We might want to be more flexible later.
Test: svg/custom/path-getTotalLength-on-big-segment-crash.svg
* platform/graphics/PathTraversalState.cpp:
(WebCore::midPoint):
(WebCore::curveLength):
(WebCore::PathTraversalState::PathTraversalState):
(WebCore::PathTraversalState::moveTo):
(WebCore::PathTraversalState::quadraticBezierTo):
(WebCore::PathTraversalState::cubicBezierTo):
* platform/graphics/PathTraversalState.h:
2011-05-20 Leo Yang <leo.yang@torchmobile.com.cn>
Reviewed by Nikolas Zimmermann.
SVGRootInlineBox triggers calculateBoundaries twice in layout
https://bugs.webkit.org/show_bug.cgi?id=60979
SVGRootInlineBox was calculating boundaries for children twice
in computePerCharacterLayoutInformation(). The first time of
calculation was in layoutChildBoxes() which is called by
computePerCharacterLayoutInformation(), and the second time of
calculation was in layoutRootBox() following layoutChildBoxes().
This patch calculates rectangle of children in layoutChildBoxes()
and then uses the rectange in layoutRootBox() to reduce a pass
of calculating child boundaries.
No functionality change, no new tests.
* rendering/svg/SVGRootInlineBox.cpp:
(WebCore::SVGRootInlineBox::computePerCharacterLayoutInformation):
(WebCore::SVGRootInlineBox::layoutChildBoxes):
(WebCore::SVGRootInlineBox::layoutRootBox):
* rendering/svg/SVGRootInlineBox.h:
2011-05-19 Naoki Takano <takano.naoki@gmail.com>
Reviewed by Kent Tamura.
Fix a problem that updating HTMLInputElement::value sets the cursor to a wrong position.
https://bugs.webkit.org/show_bug.cgi?id=61163
Manual test input-number-localization.html.
Because we can't assume any number formats in various WebKit ports.
* html/HTMLInputElement.cpp:
(WebCore::HTMLInputElement::setValue): The cursor must be the last position of visibleValue(), not m_value.
* manual-tests/input-number-localization.html: Added manual test to check the cursor correctly moved to the last poisition of the input.
2011-05-19 Jer Noble <jer.noble@apple.com>
Reviewed by Maciej Stachowiak.
WebKit2: Flashing when entering and exiting full screen mode
https://bugs.webkit.org/show_bug.cgi?id=56957
Guard against the parameter of setAnimating() matching the ivar value it's
setting, thus avoiding tearing down the renderer's layer backing.
* rendering/RenderFullScreen.cpp:
(RenderFullScreen::setAnimating):
2011-05-19 Julien Chaffraix <jchaffraix@codeaurora.org>
Reviewed by Adam Barth.
Remove Node::deprecatedParserAddChild
https://bugs.webkit.org/show_bug.cgi?id=60818
Refactoring only so no new tests.
This patch fails short of one instance of deprecatedParserAddChild which will
require a refactoring of <input> shadow DOM to be removed.
* dom/XMLDocumentParser.cpp:
(WebCore::XMLDocumentParser::pushCurrentNode): Updated to use a ContainerNode.
(WebCore::XMLDocumentParser::clearCurrentNodeStack): We now need to clear
up m_leafTextNode too.
(WebCore::XMLDocumentParser::enterText):
(WebCore::XMLDocumentParser::exitText):
Those methods were updated to use m_leafTextNode instead of m_currentNode.
* dom/XMLDocumentParser.h:
Changed the currentNode logic to use ContainerNode. Also fixed the style of the
forward declarations.
* dom/XMLDocumentParserLibxml2.cpp:
(WebCore::XMLDocumentParser::startElementNs):
(WebCore::XMLDocumentParser::endElementNs):
(WebCore::XMLDocumentParser::characters):
(WebCore::XMLDocumentParser::processingInstruction):
(WebCore::XMLDocumentParser::cdataBlock):
(WebCore::XMLDocumentParser::comment):
* dom/XMLDocumentParserQt.cpp:
(WebCore::XMLDocumentParser::parse):
(WebCore::XMLDocumentParser::parseStartElement):
(WebCore::XMLDocumentParser::parseEndElement):
(WebCore::XMLDocumentParser::parseCharacters):
(WebCore::XMLDocumentParser::parseProcessingInstruction):
(WebCore::XMLDocumentParser::parseCdata):
(WebCore::XMLDocumentParser::parseComment):
Removed the calls to deprecatedParserAddChild, changed the code to use
m_leafTextNode when it made sense and used ContainerNode instead of
Node for m_currentNode.
2011-05-19 Mike Lawther <mikelawther@chromium.org>
Reviewed by Simon Fraser.
implement image-rendering: optimize-contrast (with a vendor prefix) as defined in CSS3 image values
https://bugs.webkit.org/show_bug.cgi?id=56627
Tests: css3/images/optimize-contrast-canvas.html
css3/images/optimize-contrast-image.html
* WebCore.xcodeproj/project.pbxproj:
* css/CSSComputedStyleDeclaration.cpp:
(WebCore::CSSComputedStyleDeclaration::getPropertyCSSValue):
* css/CSSParser.cpp:
(WebCore::CSSParser::parseValue):
* css/CSSPrimitiveValueMappings.h:
(WebCore::CSSPrimitiveValue::CSSPrimitiveValue):
(WebCore::CSSPrimitiveValue::operator EImageRendering):
* css/CSSPropertyNames.in:
* css/CSSStyleSelector.cpp:
(WebCore::CSSStyleSelector::applyProperty):
* css/CSSValueKeywords.in:
* css/SVGCSSComputedStyleDeclaration.cpp:
(WebCore::CSSComputedStyleDeclaration::getSVGPropertyCSSValue):
* css/SVGCSSPropertyNames.in:
* css/SVGCSSStyleSelector.cpp:
(WebCore::CSSStyleSelector::applySVGProperty):
* css/SVGCSSValueKeywords.in:
* html/HTMLCanvasElement.cpp:
(WebCore::HTMLCanvasElement::paint):
* html/HTMLCanvasElement.h:
* platform/graphics/ImageRenderingMode.h: Added.
* rendering/RenderBoxModelObject.cpp:
(WebCore::ImageQualityController::shouldPaintAtLowQuality):
* rendering/RenderHTMLCanvas.cpp:
(WebCore::RenderHTMLCanvas::paintReplaced):
* rendering/style/RenderStyle.cpp:
(WebCore::RenderStyle::diff):
* rendering/style/RenderStyle.h:
(WebCore::InheritedFlags::imageRendering):
(WebCore::InheritedFlags::setImageRendering):
(WebCore::InheritedFlags::initialImageRendering):
* rendering/style/RenderStyleConstants.h:
* rendering/style/SVGRenderStyle.cpp:
(WebCore::SVGRenderStyle::diff):
* rendering/style/SVGRenderStyle.h:
(WebCore::SVGRenderStyle::InheritedFlags::operator==):
(WebCore::SVGRenderStyle::setBitDefaults):
* rendering/style/SVGRenderStyleDefs.h:
* rendering/svg/SVGRenderTreeAsText.cpp:
(WebCore::writeStyle):
2011-05-18 Kenneth Russell <kbr@google.com>
Reviewed by James Robinson.
[chromium] Disable blending in compositor for WebGL layers with alpha=false
https://bugs.webkit.org/show_bug.cgi?id=61091
Test: compositing/webgl/webgl-no-alpha.html
* platform/graphics/chromium/CanvasLayerChromium.cpp:
(WebCore::CanvasLayerChromium::CanvasLayerChromium):
(WebCore::CanvasLayerChromium::pushPropertiesTo):
* platform/graphics/chromium/CanvasLayerChromium.h:
* platform/graphics/chromium/WebGLLayerChromium.cpp:
(WebCore::WebGLLayerChromium::setContext):
* platform/graphics/chromium/cc/CCCanvasLayerImpl.cpp:
(WebCore::CCCanvasLayerImpl::CCCanvasLayerImpl):
(WebCore::CCCanvasLayerImpl::draw):
* platform/graphics/chromium/cc/CCCanvasLayerImpl.h:
(WebCore::CCCanvasLayerImpl::setHasAlpha):
2011-05-18 Jeremy Noble <jer.noble@apple.com>
Reviewed by Darin Adler.
Poster is not shown in Safari for video element with no playable source elements.
https://bugs.webkit.org/show_bug.cgi?id=61109
Test: media/video-src-invalid-poster.html
In the case where no video sources are playable, update the display state and
renderer, allowing the poster image to display.
* html/HTMLMediaElement.cpp:
(WebCore::HTMLMediaElement::waitForSourceChange):
2011-05-19 Andrew Wilson <atwilson@chromium.org>
Reviewed by Darin Adler.
MessagePortArray cloning code needs to verify source before copying.
https://bugs.webkit.org/show_bug.cgi?id=61130
* bindings/js/JSMessagePortCustom.cpp:
(WebCore::fillMessagePortArray):
Changed code to not pre-allocate the destination array.
* bindings/v8/custom/V8MessagePortCustom.cpp:
(WebCore::getMessagePortArray):
Changed code to not pre-allocate the destination array.
2011-05-19 Sheriff Bot <webkit.review.bot@gmail.com>
Unreviewed, rolling out r86869, r86873, r86875, and r86877.
http://trac.webkit.org/changeset/86869
http://trac.webkit.org/changeset/86873
http://trac.webkit.org/changeset/86875
http://trac.webkit.org/changeset/86877
https://bugs.webkit.org/show_bug.cgi?id=61139
broke builds and debug DRT (Requested by rniwa on #webkit).
* DerivedSources.make:
* WebCore.exp.in:
* WebCore.gyp/WebCore.gyp:
* WebCore.gypi:
* WebCore.xcodeproj/project.pbxproj:
* testing/Internals.cpp: Removed.
* testing/Internals.h: Removed.
* testing/Internals.idl: Removed.
* testing/js/WebCoreTestSupport.cpp: Removed.
* testing/js/WebCoreTestSupport.h: Removed.
* testing/v8/WebCoreTestSupport.cpp: Removed.
* testing/v8/WebCoreTestSupport.h: Removed.
2011-05-19 Dimitri Glazkov <dglazkov@chromium.org>
One more fix after r86869.
* WebCore.exp.in: Made __ZN7WebCore12JSDOMWrapperD2Ev only export for debug builds.
2011-05-19 Anders Carlsson <andersca@apple.com>
Add two more symbols needed by the window.internals library.
* WebCore.exp.in:
2011-05-19 Dimitri Glazkov <dglazkov@chromium.org>
Fix Leopard build after r86869.
* WebCore.exp.in: Moved now-always-used exported symbols out of the conditional guard.
2011-05-19 Robert Hogan <robert@webkit.org>
Reviewed by Andreas Kling.
[Qt] Fix plugins/windowless_plugin_paint_test.html
https://bugs.webkit.org/show_bug.cgi?id=60992
Call gdk_init_check before gdk_display_get_default().
If we don't do this, gdk_display_get_default() will hang
the next time it's called.
* plugins/qt/PluginViewQt.cpp:
(WebCore::getPluginDisplay):
2011-05-18 Dimitri Glazkov <dglazkov@chromium.org>
Reviewed by Darin Adler.
Add build logistics and plumbing for window.internals object.
https://bugs.webkit.org/show_bug.cgi?id=60313
Test: fast/harness/internals-object.html
* DerivedSources.make: Added support for generating from Internals.idl.
* WebCore.gyp/WebCore.gyp: Added new webcore_test_support library.
* WebCore.gypi: Ditto.
* WebCore.xcodeproj/project.pbxproj: Added WebCoreTestSupport library.
* testing/Internals.cpp: Added.
* testing/Internals.h: Added.
* testing/Internals.idl: Added.
* testing/js/WebCoreTestSupport.cpp: Added.
* testing/js/WebCoreTestSupport.h: Added.
* testing/v8/WebCoreTestSupport.cpp: Added.
* testing/v8/WebCoreTestSupport.h: Added.
2011-05-19 Dimitri Glazkov <dglazkov@chromium.org>
Accept XCode's decisions to keep modifying WebCore.xcodeproj.
* WebCore.xcodeproj/project.pbxproj: Opened in XCode then closed.
2011-05-19 Andrew Wason <rectalogic@rectalogic.com>
Reviewed by Darin Adler.
Fix GraphicsContext3DQt.cpp compile error
https://bugs.webkit.org/show_bug.cgi?id=61128
* platform/graphics/qt/GraphicsContext3DQt.cpp:
(WebCore::GraphicsContext3D::GraphicsContext3D):
clear() m_internal OwnPtr.
2011-05-19 Tonis Tiigi <tonistiigi@gmail.com>
Reviewed by Pavel Feldman.
Web Inspector: Resizing columns in the network panel is weird
https://bugs.webkit.org/show_bug.cgi?id=55238
Makes network panel column resizing more usable by adding "first only" and "last only"
resizing methods to WebInspector.DataGrid. Current behavior is named "nearest" and
remains default. Network panels datagrid is set to use method "last".
* inspector/front-end/DataGrid.js:
(WebInspector.DataGrid.prototype.get resizeMethod):
(WebInspector.DataGrid.prototype.set resizeMethod):
(WebInspector.DataGrid.prototype._resizerDragging):
* inspector/front-end/NetworkPanel.js:
(WebInspector.NetworkPanel.prototype._createTable):
2011-05-19 Ryosuke Niwa <rniwa@webkit.org>
Reviewed by Darin Adler.
JoinTextNodesCommand is never used
https://bugs.webkit.org/show_bug.cgi?id=61089
Deleted JoinTextNodesCommand because it's never used.
* CMakeLists.txt:
* GNUmakefile.list.am:
* WebCore.gypi:
* WebCore.pro:
* WebCore.vcproj/WebCore.vcproj:
* WebCore.xcodeproj/project.pbxproj:
* editing/CompositeEditCommand.cpp:
* editing/CompositeEditCommand.h:
* editing/EditingAllInOne.cpp:
* editing/JoinTextNodesCommand.cpp: Removed.
* editing/JoinTextNodesCommand.h: Removed.
2011-05-19 Ryosuke Niwa <rniwa@webkit.org>
Reviewed by Darin Adler.
REGRESSION (r83322): Many crashes in Mail.app in WebCore::Node::nodeIndex
https://bugs.webkit.org/show_bug.cgi?id=61012
The crash was caused by ReplaceSelectionCommand's inserting content into a middle of the paragraph
being moved when the insertion position's container node is the node to split to. Fixed the crash
by not changing the insertion position in such a case.
Unfortunately, this fix caused markup to bloat in some tests but we'll take this regression since
it's much better than crashing.
Test: editing/pasteboard/paste-after-inline-style-element.html
* editing/ReplaceSelectionCommand.cpp:
(WebCore::ReplaceSelectionCommand::doApply):
2011-05-19 Brady Eidson <beidson@apple.com>
Try to fix SUPPORT_AUTOCORRECTION_PANEL build.
* editing/SpellingCorrectionController.cpp:
(WebCore::SpellingCorrectionController::recordSpellcheckerResponseForModifiedCorrection):
(WebCore::SpellingCorrectionController::processMarkersOnTextToBeReplacedByResult):
2011-05-19 Darin Adler <darin@apple.com>
Try to fix SUPPORT_AUTOCORRECTION_PANEL build.
* editing/SpellingCorrectionController.cpp:
(WebCore::markersHaveIdenticalDescription): Call description() function.
2011-05-19 Andrey Adaikin <aandrey@google.com>
Reviewed by Pavel Feldman.
Web Inspector: switch to Scripts panel is too slow
https://bugs.webkit.org/show_bug.cgi?id=61030
- It is very expensive to listen to the DOM mutation events, thus we remove the listeners whenever we do any internal
DOM manipulations (such as expand/collapse line rows) and set the listeners back when we are finished.
- Also, when we switch to the Scripts panel that have a non-zero scrollTop offset, we would do the rendering work twice.
* inspector/front-end/SourceFrame.js:
(WebInspector.SourceFrame.prototype.show):
* inspector/front-end/TextViewer.js:
(WebInspector.TextEditorMainPanel):
(WebInspector.TextEditorMainPanel.prototype.beginDomUpdates):
(WebInspector.TextEditorMainPanel.prototype.endDomUpdates):
(WebInspector.TextEditorMainPanel.prototype._enableDOMNodeRemovedListener):
(WebInspector.TextEditorMainChunk):
(WebInspector.TextEditorMainChunk.prototype.set expanded):
(WebInspector.TextEditorMainChunk.prototype._createRow):
2011-05-19 Pavel Feldman <pfeldman@google.com>
Not reviewed: inspector protocol tests fixed.
* inspector/InjectedScriptSource.js:
2011-05-19 David Grogan <dgrogan@chromium.org>
Reviewed by David Levin.
Make EventQueue post a Task to the task queue for each asynchronous event
https://bugs.webkit.org/show_bug.cgi?id=60790
Currently EventQueue queues up events to be fired asynchronously and
fires each of them when a single DOMTimer goes off. In the words of
dimich, "Having 2 queues will sooner or later cause problems with
ordering of tasks, termination, suspension and other things that all
require some control on how queues operate."
No new tests; this is just a refactoring to avoid potential future
problems.
* dom/EventQueue.cpp:
(WebCore::EventQueue::EventQueue):
(WebCore::EventQueue::EventDispatcherTask::create):
(WebCore::EventQueue::EventDispatcherTask::dispatchEvent):
(WebCore::EventQueue::EventDispatcherTask::performTask):
(WebCore::EventQueue::EventDispatcherTask::cancel):
(WebCore::EventQueue::EventDispatcherTask::EventDispatcherTask):
(WebCore::EventQueue::removeEvent):
(WebCore::EventQueue::enqueueEvent):
(WebCore::EventQueue::enqueueOrDispatchScrollEvent):
(WebCore::EventQueue::cancelEvent):
(WebCore::EventQueue::cancelQueuedEvents):
* dom/EventQueue.h:
2011-05-18 Yury Semikhatsky <yurys@chromium.org>
Reviewed by Pavel Feldman.
InjectedScriptSource.js - "Don't be eval()."
https://bugs.webkit.org/show_bug.cgi?id=60800
Thanks to Adam Barth for providing JSC implementation!
InjectedScriptHost.evaluate is used to perform script evaluations for
inspector needs. This method is not affected by CSP and should fix inspector
on pages with CSP restrictions.
Test: inspector/console/console-eval-blocked.html
* bindings/js/JSInjectedScriptHostCustom.cpp:
(WebCore::JSInjectedScriptHost::evaluate):
* bindings/v8/custom/V8InjectedScriptHostCustom.cpp:
(WebCore::V8InjectedScriptHost::evaluateCallback):
(WebCore::V8InjectedScriptHost::inspectedNodeCallback):
* inspector/InjectedScriptHost.idl:
* inspector/InjectedScriptSource.js:
(.):
2011-05-19 Pavel Feldman <pfeldman@google.com>
Reviewed by Yury Semikhatsky.
Web Inspector: expose object class name as a part of RemoteObject mirror.
https://bugs.webkit.org/show_bug.cgi?id=61067
* inspector/InjectedScriptSource.js:
* inspector/Inspector.json:
2011-05-19 Pavel Feldman <pfeldman@google.com>
Reviewed by Yury Semikhatsky.
Web Inspector: make "this" a part of callFrame, not scope in the protocol.
https://bugs.webkit.org/show_bug.cgi?id=61057
* inspector/InjectedScriptSource.js:
* inspector/Inspector.json:
* inspector/front-end/ScopeChainSidebarPane.js:
(WebInspector.ScopeChainSidebarPane.prototype.update):
2011-05-19 Kent Tamura <tkent@chromium.org>
Reviewed by Hajime Morita.
tooLong validity should not be true for a value set by a script
https://bugs.webkit.org/show_bug.cgi?id=60948
The specification has been updated so that tooLong should be true only
for user-edit values.
Introduce m_wasModifiedByUser flag to HTMLInputElement and
HTMLTextAreaElemnt. It is set to true when a renderer updates the
value, and is cleared when the value is updated by others.
* html/HTMLInputElement.cpp:
(WebCore::HTMLInputElement::HTMLInputElement):
Initialize m_wasModifiedByUser.
(WebCore::HTMLInputElement::tooLong):
Skip the check if m_wasModifiedByUser is false.
(WebCore::HTMLInputElement::updateType): Clear m_wasModifiedByUser.
(WebCore::HTMLInputElement::copyNonAttributeProperties):
(WebCore::HTMLInputElement::setValue): If sendChange is true,
m_wasModifiedByUser should be true because sendChange is set in a case
of form auto-fill. We assume a value set by form auto-fill is a kind
of user-edit.
(WebCore::HTMLInputElement::setValueFromRenderer):
m_wasModifiedByUser should be true for the update by a renderer.
* html/HTMLInputElement.h: Declare m_wasModifiedByUser.
* html/HTMLTextAreaElement.cpp:
(WebCore::HTMLTextAreaElement::HTMLTextAreaElement):
Initialize m_wasModifiedByUser.
(WebCore::HTMLTextAreaElement::updateValue):
m_wasModifiedByUser should be true for the update by a renderer.
(WebCore::HTMLTextAreaElement::setValueCommon): Clear m_wasModifiedByUser.
(WebCore::HTMLTextAreaElement::tooLong):
Skip the check if m_wasModifiedByUser is false.
* html/HTMLTextAreaElement.h: Declare m_wasModifiedByUser.
2011-05-19 David Barr <davidbarr@chromium.org>
Reviewed by Simon Fraser.
CSS3: We fail 'border radius sum of radii' test
https://bugs.webkit.org/show_bug.cgi?id=38788
Ignore border-radius properties with negative values.
Test: fast/css/border-radius-non-negative.html
* WebCore.xcodeproj/project.pbxproj:
* css/CSSParser.cpp:
(WebCore::CSSParser::parseValue):
(WebCore::CSSParser::parseBorderRadius):
2011-05-19 Yuta Kitamura <yutak@chromium.org>
Reviewed by Kent Tamura.
WebSocket: Use ScriptContext::Task to hold pending events of ThreadableWebSocketChannelClientWrapper
https://bugs.webkit.org/show_bug.cgi?id=61034
Refactoring only. No new tests.
* websockets/ThreadableWebSocketChannelClientWrapper.cpp:
(WebCore::ThreadableWebSocketChannelClientWrapper::ThreadableWebSocketChannelClientWrapper):
(WebCore::ThreadableWebSocketChannelClientWrapper::didConnect):
(WebCore::ThreadableWebSocketChannelClientWrapper::didReceiveMessage):
(WebCore::ThreadableWebSocketChannelClientWrapper::didClose):
(WebCore::ThreadableWebSocketChannelClientWrapper::resume):
(WebCore::ThreadableWebSocketChannelClientWrapper::processPendingTasks):
(WebCore::ThreadableWebSocketChannelClientWrapper::didConnectCallback):
(WebCore::ThreadableWebSocketChannelClientWrapper::didReceiveMessageCallback):
(WebCore::ThreadableWebSocketChannelClientWrapper::didCloseCallback):
* websockets/ThreadableWebSocketChannelClientWrapper.h:
Remove m_pendingConnected, m_pendingMessages and m_pendingClosed, and use ScriptContext::Task
to hold these pending events.
2011-05-19 Emil A Eklund <eae@chromium.org>
Reviewed by Alexey Proskuryakov.
REGRESSION (r80808): Multiple <select> - Selection reset to first element from multiple selected ones
https://bugs.webkit.org/show_bug.cgi?id=60986
* html/HTMLSelectElement.cpp:
(WebCore::HTMLSelectElement::setMultiple):
Don't restore selection if the multiple attribute hasn't changed.
2011-05-18 Fumitoshi Ukai <ukai@chromium.org>
Reviewed by Alexey Proskuryakov.
http/tests/websocket/tests/workers/worker-handshake-challenge-randomness.html crashed once on Windows XP Debug (Tests)
https://bugs.webkit.org/show_bug.cgi?id=57048
* platform/network/cf/SocketStreamHandleCFNet.cpp:
(WebCore::SocketStreamHandle::platformClose): use loaderRunLoop to schedule streams on platform WIN
2011-05-18 MORITA Hajime <morrita@google.com>
Unreviewed attempt to fix clang build.
* rendering/InlineTextBox.h:
2011-05-18 Nat Duca <nduca@chromium.org>
Reviewed by James Robinson.
[chromium] Add histograms for paint times
https://bugs.webkit.org/show_bug.cgi?id=61010
* platform/graphics/chromium/ContentLayerChromium.cpp:
(WebCore::ContentLayerPainter::paint):
2011-05-18 Adrienne Walker <enne@google.com>
Reviewed by James Robinson.
[chromium] Fix incorrect size when clipping image layer upload rects
https://bugs.webkit.org/show_bug.cgi?id=61105
The clipped destination and source rects should have the same size.
* platform/graphics/chromium/ImageLayerChromium.cpp:
(WebCore::ImageLayerTextureUpdater::updateTextureRect):
2011-05-17 MORITA Hajime <morrita@google.com>
Reviewed by Tony Chang.
[Refactoring] Member variables of DocumentMarker should be encapsulated.
https://bugs.webkit.org/show_bug.cgi?id=56814
- Moved DocumentMarker's member variables to private and added getters for them.
- Added DocumentMarker setters and constructors, which contain assertions against m_type values
because description and activeMatch are used with specific type of MarkerType.
- Moved chromium's WebKit::WebFrameImpl::addMarker() to DocumentMarkerController::addTextMatchMarker()
because it accesses DocumentMarker internals.
- Moved a version of DMC::addMarker() to private and add alternatives that hide
internals of DocumentMarker. (The internal will be renewed by upcoming change.)
* dom/DocumentMarker.h:
(WebCore::DocumentMarker::type):
(WebCore::DocumentMarker::startOffset):
(WebCore::DocumentMarker::endOffset):
(WebCore::DocumentMarker::description):
(WebCore::DocumentMarker::hasDescription):
(WebCore::DocumentMarker::activeMatch):
(WebCore::DocumentMarker::clearDescription):
(WebCore::DocumentMarker::setStartOffset):
(WebCore::DocumentMarker::setEndOffset):
(WebCore::DocumentMarker::operator==):
(WebCore::DocumentMarker::DocumentMarker):
(WebCore::DocumentMarker::shiftOffsets):
(WebCore::DocumentMarker::setActiveMatch):
* dom/DocumentMarkerController.cpp:
(WebCore::DocumentMarkerController::addMarker):
(WebCore::DocumentMarkerController::addTextMatchMarker):
(WebCore::DocumentMarkerController::copyMarkers):
(WebCore::DocumentMarkerController::removeMarkers):
(WebCore::DocumentMarkerController::markerContainingPoint):
(WebCore::DocumentMarkerController::markersInRange):
(WebCore::DocumentMarkerController::renderedRectsForMarkers):
(WebCore::DocumentMarkerController::removeMarkersFromList):
(WebCore::DocumentMarkerController::repaintMarkers):
(WebCore::DocumentMarkerController::shiftMarkers):
(WebCore::DocumentMarkerController::setMarkersActive):
(WebCore::DocumentMarkerController::hasMarkers):
(WebCore::DocumentMarkerController::clearDescriptionOnMarkersIntersectingRange):
(WebCore::DocumentMarkerController::showMarkers):
* dom/DocumentMarkerController.h:
* editing/CompositeEditCommand.cpp:
(WebCore::CompositeEditCommand::replaceTextInNodePreservingMarkers):
* editing/DeleteSelectionCommand.cpp:
(WebCore::DeleteSelectionCommand::originalStringForAutocorrectionAtBeginningOfSelection):
* editing/Editor.cpp:
(WebCore::Editor::selectionStartHasMarkerFor):
* editing/SpellingCorrectionController.cpp:
(WebCore::SpellingCorrectionController::respondToChangedSelection):
* editing/SpellingCorrectionController.h:
(WebCore::SpellingCorrectionController::shouldStartTimerFor):
* rendering/HitTestResult.cpp:
(WebCore::HitTestResult::spellingToolTip):
(WebCore::HitTestResult::replacedString):
* rendering/InlineTextBox.cpp:
(WebCore::InlineTextBox::paintSpellingOrGrammarMarker):
(WebCore::InlineTextBox::paintTextMatchMarker):
(WebCore::InlineTextBox::computeRectForReplacementMarker):
(WebCore::InlineTextBox::paintDocumentMarkers):
* rendering/svg/SVGInlineFlowBox.cpp:
(WebCore::SVGInlineFlowBox::computeTextMatchMarkerRectForRenderer):
2011-05-18 Oliver Hunt <oliver@apple.com>
Reviewed by Geoffrey Garen.
+[WebScriptObject throwException:] doesn't work when invoked from obj-c field access
https://bugs.webkit.org/show_bug.cgi?id=61100
The objc bindings were written to assume exceptions would
come from obj-c style exceptions, rather than throwException:
This code simply calls the global ObjcInstance mechanism for
transferring the reported exception.
* bridge/objc/objc_instance.h:
* bridge/objc/objc_runtime.mm:
(JSC::Bindings::ObjcField::valueFromInstance):
(JSC::Bindings::ObjcField::setValueToInstance):
2011-05-16 Adrienne Walker <enne@google.com>
Reviewed by James Robinson.
[chromium] Robustly handle mapTexSubImage2D returning NULL
https://bugs.webkit.org/show_bug.cgi?id=60934
Also, lazily create the temp buffer so that both the map and non-map
cases can use it.
* platform/graphics/chromium/LayerTextureSubImage.cpp:
(WebCore::LayerTextureSubImage::setSubImageSize):
(WebCore::LayerTextureSubImage::uploadWithTexSubImage):
(WebCore::LayerTextureSubImage::uploadWithMapTexSubImage):
2011-05-18 Emil A Eklund <eae@chromium.org>
Reviewed by Darin Adler.
Change RenderTextControl::hitInnerTextElement to use IntPoint
https://bugs.webkit.org/show_bug.cgi?id=61003
Covered by existing tests.
* rendering/RenderTextControl.cpp:
(WebCore::RenderTextControl::hitInnerTextElement):
* rendering/RenderTextControl.h:
* rendering/RenderTextControlMultiLine.cpp:
(WebCore::RenderTextControlMultiLine::nodeAtPoint):
* rendering/RenderTextControlSingleLine.cpp:
(WebCore::RenderTextControlSingleLine::nodeAtPoint):
2011-05-18 Chris Fleizach <cfleizach@apple.com>
Reviewed by Maciej Stachowiak.
WK2: VoiceOver cannot move focus into a web area programmatically
https://bugs.webkit.org/show_bug.cgi?id=60661
Accessibility code relies on the ability to bring focus to the containing widget view.
In WK2, that message needs to be propagated to the UI process.
* page/ChromeClient.h:
(WebCore::ChromeClient::makeFirstResponder):
* page/mac/ChromeMac.mm:
(WebCore::Chrome::focusNSView):
* platform/mac/WidgetMac.mm:
(WebCore::Widget::setFocus):
2011-05-18 Alok Priyadarshi <alokp@chromium.org> and Adrienne Walker <enne@google.com>
Reviewed by James Robinson.
[chromium] Split canvas from LayerTilerChromium
https://bugs.webkit.org/show_bug.cgi?id=60719
LayerTilerChromium now just does tiling. It delegates the task of painting and updating textures to LayerTextureUpdater.
Also abstracted LayerTextureSubImage to upload texture pixels.
* WebCore.gypi:
* platform/chromium/TraceEvent.h:
* platform/graphics/chromium/ContentLayerChromium.cpp:
(WebCore::ContentLayerChromium::create):
(WebCore::ContentLayerChromium::ContentLayerChromium):
(WebCore::ContentLayerChromium::~ContentLayerChromium):
(WebCore::ContentLayerChromium::paintContentsIfDirty):
(WebCore::ContentLayerChromium::cleanupResources):
(WebCore::ContentLayerChromium::setLayerRenderer):
(WebCore::ContentLayerChromium::createTextureUpdater):
(WebCore::ContentLayerChromium::drawsContent):
(WebCore::ContentLayerChromium::createTilerIfNeeded):
(WebCore::ContentLayerChromium::updateCompositorResources):
* platform/graphics/chromium/ContentLayerChromium.h:
* platform/graphics/chromium/ImageLayerChromium.cpp:
(WebCore::ImageLayerTextureUpdater::ImageLayerTextureUpdater):
(WebCore::ImageLayerTextureUpdater::~ImageLayerTextureUpdater):
(WebCore::ImageLayerTextureUpdater::orientation):
(WebCore::ImageLayerTextureUpdater::prepareToUpdate):
(WebCore::ImageLayerTextureUpdater::updateTextureRect):
(WebCore::ImageLayerTextureUpdater::imageRect):
(WebCore::ImageLayerChromium::paintContentsIfDirty):
(WebCore::ImageLayerChromium::updateCompositorResources):
(WebCore::ImageLayerChromium::createTextureUpdater):
* platform/graphics/chromium/ImageLayerChromium.h:
* platform/graphics/chromium/LayerPainterChromium.h: Added.
* platform/graphics/chromium/LayerRendererChromium.cpp:
(WebCore::LayerRendererChromium::create):
(WebCore::LayerRendererChromium::LayerRendererChromium):
(WebCore::LayerRendererChromium::updateRootLayerContents):
(WebCore::LayerRendererChromium::drawRootLayer):
(WebCore::LayerRendererChromium::updateAndDrawLayers):
(WebCore::LayerRendererChromium::updateLayers):
* platform/graphics/chromium/LayerRendererChromium.h:
* platform/graphics/chromium/LayerTextureSubImage.cpp: Added.
(WebCore::LayerTextureSubImage::LayerTextureSubImage):
(WebCore::LayerTextureSubImage::~LayerTextureSubImage):
(WebCore::LayerTextureSubImage::setSubImageSize):
(WebCore::LayerTextureSubImage::upload):
(WebCore::LayerTextureSubImage::uploadWithTexSubImage):
(WebCore::LayerTextureSubImage::uploadWithMapTexSubImage):
* platform/graphics/chromium/LayerTextureSubImage.h: Copied from Source/WebCore/platform/chromium/TraceEvent.h.
* platform/graphics/chromium/LayerTextureUpdater.h: Copied from Source/WebCore/platform/chromium/TraceEvent.h.
(WebCore::LayerTextureUpdater::LayerTextureUpdater):
(WebCore::LayerTextureUpdater::~LayerTextureUpdater):
(WebCore::LayerTextureUpdater::context):
* platform/graphics/chromium/LayerTextureUpdaterCanvas.cpp: Added.
(WebCore::LayerTextureUpdaterCanvas::LayerTextureUpdaterCanvas):
(WebCore::LayerTextureUpdaterCanvas::paintContents):
(WebCore::LayerTextureUpdaterBitmap::LayerTextureUpdaterBitmap):
(WebCore::LayerTextureUpdaterBitmap::prepareToUpdate):
(WebCore::LayerTextureUpdaterBitmap::updateTextureRect):
* platform/graphics/chromium/LayerTextureUpdaterCanvas.h: Added.
(WebCore::LayerTextureUpdaterCanvas::~LayerTextureUpdaterCanvas):
(WebCore::LayerTextureUpdaterCanvas::contentRect):
(WebCore::LayerTextureUpdaterBitmap::~LayerTextureUpdaterBitmap):
(WebCore::LayerTextureUpdaterBitmap::orientation):
* platform/graphics/chromium/LayerTilerChromium.cpp:
(WebCore::LayerTilerChromium::create):
(WebCore::LayerTilerChromium::LayerTilerChromium):
(WebCore::LayerTilerChromium::setTileSize):
(WebCore::LayerTilerChromium::prepareToUpdate):
(WebCore::LayerTilerChromium::updateRect):
(WebCore::LayerTilerChromium::draw):
* platform/graphics/chromium/LayerTilerChromium.h:
(WebCore::LayerTilerChromium::Tile::Tile):
* platform/graphics/chromium/cc/CCHeadsUpDisplay.cpp:
(WebCore::CCHeadsUpDisplay::draw):
2011-05-18 Mark Pilgrim <pilgrim@chromium.org>
Reviewed by Tony Chang.
IndexedDB put() should fail adding to object store that uses
out-of-line keys and has no key generator and the key parameter
was not provided
https://bugs.webkit.org/show_bug.cgi?id=58609
Out-of-line keys means that objectStore->m_keyPath is null in ::put(),
no key generator means that objectStore->autoIncrement() is false, and
key parameter was not provided means that prpKey will be a null pointer.
The combination of these 3 should throw a DATA_ERR.
Test: storage/indexeddb/mozilla/key-requirements-put-no-key.html
* storage/IDBObjectStoreBackendImpl.cpp:
(WebCore::IDBObjectStoreBackendImpl::put):
2011-05-18 Chris Rogers <crogers@google.com>
Reviewed by James Robinson.
EqualPowerPanner is not using the correct azimuth range for stereo panning
https://bugs.webkit.org/show_bug.cgi?id=61085
No new tests since audio API is not yet implemented.
* platform/audio/EqualPowerPanner.cpp:
(WebCore::EqualPowerPanner::pan):
2011-05-18 Yi Shen <yi.4.shen@nokia.com>
Reviewed by Andreas Kling.
[Qt] Enterkey to go to Newline does not work in the text area(in HTML form)
https://bugs.webkit.org/show_bug.cgi?id=33179
Fill the missing key text for the EnterKey event.
Tests: fast/events/onsearch-enter.html
* platform/qt/PlatformKeyboardEventQt.cpp:
(WebCore::keyTextForKeyEvent):
2011-05-17 Timothy Hatcher <timothy@apple.com>
Update the the context menu to reflect the system search provider on Mac.
<rdar://problem/9198419>
Reviewed by Sam Weinig.
* English.lproj/Localizable.strings: Updated.
* Source/WebCore/WebCore.exp.in: Added _wkCopyDefaultSearchProviderDisplayName.
* platform/DefaultLocalizationStrategy.cpp:
(WebCore::DefaultLocalizationStrategy::contextMenuItemTagSearchWeb): Use wkCopyDefaultSearchProviderDisplayName to
create the string.
* platform/mac/WebCoreSystemInterface.h: Added wkCopyDefaultSearchProviderDisplayName.
* platform/mac/WebCoreSystemInterface.mm: Ditto.
2011-05-18 Rob Buis <rbuis@rim.com>
Reviewed by Nikolas Zimmermann.
Marker test from ietestcenter fails
https://bugs.webkit.org/show_bug.cgi?id=60721
Change <marker> renderer creation behaviour to always create the renderer. This fixes
the problem that no marker is rendered when display=none is set on the <marker>. The
specification states that display=none should have no influence on <marker> usage:
"The ‘display’ property does not apply to the ‘marker’ element; thus, ..., and ‘marker’
elements are available for referencing even when the ‘display’ property on the ‘marker’
element or any of its ancestors is set to none."
Tests: svg/W3C-SVG-1.1-SE/painting-marker-07-f.svg
svg/custom/painting-marker-07-f-inherit.svg
* svg/SVGMarkerElement.h:
(WebCore::SVGMarkerElement::rendererIsNeeded):
2011-05-18 Alexis Menard <alexis.menard@openbossa.org>, Simon Hausmann <simon.hausmann@nokia.com>
Reviewed by Eric Carlson.
MediaElements fails to load the data in some cases.
https://bugs.webkit.org/show_bug.cgi?id=60760
WebKitWebSourceGStreamer is the interface between WebKit and GStreamer
that uses the ResourceHandle API to request data and pass it down. For
our builds it is absolutely essential that we have a NetworkingContext
available there, in order to get access to the QNetworkAccessManager.
No access means we basically cannot load the video. The WebSource gains
access to the NetworkingContext through a WebCore::Frame pointer it has.
MediaPlayerPrivateGStreamer is responsible for propagating a pointer of
the WebCore::Frame to the WebKitWebSource in
mediaPlayerPrivateSourceChangedCallback. In there we used the MediaPlayer's
frameView() accessor to access the frame. However the frameView() member
is only set through the render tree's RenderVideo, which is rather unreliable
given that some sites create "fake" video tags initially that only become
visible later (or never).
A more reliable way is to simply use the document of the MediaPlayerClient,
which is provided at constructor time.
Test: http/tests/media/media-can-load-when-hidden.html
* platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:
(WebCore::MediaPlayerPrivateGStreamer::sourceChanged):
2011-05-18 Adrienne Walker <enne@google.com>
Reviewed by James Robinson.
[chromium] Check HUD texture reserve status before using texture
https://bugs.webkit.org/show_bug.cgi?id=61082
This only changes behavior behind a flag, so shouldn't impact any tests.
* platform/graphics/chromium/cc/CCHeadsUpDisplay.cpp:
(WebCore::CCHeadsUpDisplay::draw):
2011-05-18 Oliver Hunt <oliver@apple.com>
Reviewed by Sam Weinig.
JSGlobalObject and some others do GC allocation during initialization, which can cause heap corruption
https://bugs.webkit.org/show_bug.cgi?id=61090
Rather than having Constructor objects create their structure
as part of initialisation, we now pass their expected structure
in as an argument. This required fixing the few custom Constructors
and the code generator.
* bindings/js/JSAudioConstructor.cpp:
(WebCore::JSAudioConstructor::JSAudioConstructor):
* bindings/js/JSAudioConstructor.h:
* bindings/js/JSDOMGlobalObject.h:
(WebCore::getDOMConstructor):
Pass the Constructor objects structure in as an argument
* bindings/js/JSImageConstructor.cpp:
(WebCore::JSImageConstructor::JSImageConstructor):
* bindings/js/JSImageConstructor.h:
* bindings/js/JSOptionConstructor.cpp:
(WebCore::JSOptionConstructor::JSOptionConstructor):
* bindings/js/JSOptionConstructor.h:
* bindings/scripts/CodeGeneratorJS.pm:
2011-05-18 Abhishek Arya <inferno@chromium.org>
Reviewed by Beth Dakin.
Remove removeChild on table caption since destroy call
already does that.
https://bugs.webkit.org/show_bug.cgi?id=61083
Test: fast/table/table-captions-child-visible-crash.html
* rendering/RenderTable.cpp:
(WebCore::RenderTable::recalcCaption):
2011-05-18 Evan Martin <evan@chromium.org>
Reviewed by Tony Chang.
[chromium] make action_derivedsourcesallinone.py quiet
https://bugs.webkit.org/show_bug.cgi?id=61081
In gyp, it's the responsibility of the build system to print what actions are doing;
for example, the compile command is generally silent, while the build system prints
"compiling".
Make this program behave like a compiler: silent on success.
* WebCore.gyp/scripts/action_derivedsourcesallinone.py:
delete a print statement.
2011-05-18 David Kilzer <ddkilzer@apple.com>
<http://webkit.org/b/61078> Use toHTTPPipeliningPriority() in initializeMaximumHTTPConnectionCountPerHost()
Reviewed by Joseph Pecoraro.
* platform/network/cf/ResourceRequestCFNet.cpp:
(WebCore::initializeMaximumHTTPConnectionCountPerHost): Use
toHTTPPipeliningPriority() to convert arguments passed to
wkSetHTTPPipeliningMaximumPriority() and
wkSetHTTPPipeliningMinimumFastLanePriority().
2011-05-18 Erik Arvidsson <arv@chromium.org>
Reviewed by Ojan Vafai.
event.clientX/clientY is 0/0 in a click generated through a label
https://bugs.webkit.org/show_bug.cgi?id=56606
This copies the coordinates from the underlying event to the simulated mouse event if the underlying event
is a mouse event.
This makes us match Firefox and IE.
Test: fast/events/simulated-click-coords.html
* dom/MouseEvent.cpp:
(WebCore::SimulatedMouseEvent::SimulatedMouseEvent):
2011-05-18 Nikolas Zimmermann <nzimmermann@rim.com>
Not reviewed. Sorted XCode project file.
* WebCore.xcodeproj/project.pbxproj:
2011-05-18 Alexander Pavlov <apavlov@chromium.org>
Reviewed by Pavel Feldman.
Web Inspector: Non-color CSS property values can get a color-picker
https://bugs.webkit.org/show_bug.cgi?id=61056
* inspector/front-end/CSSKeywordCompletions.js:
(WebInspector.CSSKeywordCompletions.forProperty):
(WebInspector.CSSKeywordCompletions.isColorAwareProperty):
* inspector/front-end/StylesSidebarPane.js:
(WebInspector.StylePropertyTreeElement.prototype.updateTitle):
2011-05-18 Pratik Solanki <psolanki@apple.com>
Reviewed by Dan Bernstein.
Don't use DEFINE_STATIC_LOCAL with an unsigned
https://bugs.webkit.org/show_bug.cgi?id=61026
* storage/StorageTracker.cpp:
(WebCore::StorageTracker::syncFileSystemAndTrackerDatabase): DEFINE_STATIC_LOCAL is meant
for objects, not unsigned ints. We can just use static here.
2011-05-18 Rob Buis <rbuis@rim.com>
Reviewed by Nikolas Zimmermann.
NULL deref when SVG elements have table styles
https://bugs.webkit.org/show_bug.cgi?id=45561
Restrict computed CSS values for SVG display property to block, inline or none.
Tests: svg/custom/display-table-caption-foreignObject.svg
svg/custom/display-table-caption-inherit-foreignObject.xhtml
svg/custom/display-table-caption-inherit-text.xhtml
svg/custom/display-table-caption-text.svg
* css/CSSStyleSelector.cpp:
(WebCore::SVGDisplayPropertyGuard::SVGDisplayPropertyGuard):
(WebCore::SVGDisplayPropertyGuard::~SVGDisplayPropertyGuard):
(WebCore::isAcceptableForSVGElement):
(WebCore::CSSStyleSelector::applyProperty):
2011-05-18 Pavel Feldman <pfeldman@google.com>
Reviewed by Yury Semikhatsky.
Web Inspector: [REGRESSION] Completion while on a breakpoint is not working.
https://bugs.webkit.org/show_bug.cgi?id=60811
Test: inspector/debugger/debugger-completions-on-call-frame.html
* inspector/InjectedScriptSource.js:
* inspector/front-end/ConsoleView.js:
(WebInspector.ConsoleView.prototype.completions.else.evaluated):
* inspector/front-end/DebuggerPresentationModel.js:
(WebInspector.PresenationCallFrame.prototype.get variables):
* inspector/front-end/ScriptsPanel.js:
(WebInspector.ScriptsPanel.prototype.selectedCallFrameVariables):
2011-05-18 Nikolas Zimmermann <nzimmermann@rim.com>
Reviewed by Rob Buis.
All animated SVG enum properties are now ints
https://bugs.webkit.org/show_bug.cgi?id=10749
DECLARE/DEFINE_ANIMATED_ENUMERATION created fooBaseVal()/setFooBaseVal() methods that take int parameters, and stored all enum types as integers.
Modify the SVG DOM API to store real enums, and get rid of any int<->enum conversions. It's now impossible to change any enum values to undefined
types, which is the root of several filter security bugs in the past, that were fixed by adding workarounds.
(Usual workaround: svgAttributeChanged(): if fooAttr has been changed from SVG DOM, and if it's an enum, check whether the enum is in range, or fix it up.)
Using a type-safe internal representation for these enum values we can get rid of ugly int<->enum conversions.
A lot of parseMappedAttribute() functions duplicated the code for parsing enum values (eg. userSpaceOnUse/objectBoundingBox unit values, in pattern/filter/mask/etc..)
Add dozens of new SVGPropertyTraits<EnumType> specializations for all enums we expose to JS, and offer static fromString/toString conversion methods in single places.
Use the new SVGPropertyTraits everywhere in svg/.
This also fixes SVG DOM <-> XML DOM synchronization for SVGAnimatedEnumeration types.
Example: <clipPath clipPathUnits="objectBoundingBox">
myClipPath.clipPathUnits.baseVal = SVGUnitTypes.SVG_UNIT_TYPE_USERSPACEONUSE;
alert(myClipPath.getAttribute('clipPathUnits')); <- without this patch it says "1", now it says "userSpaceOnUse" as expected, and as other browsers do.
We're now properly converting the enum values to strings.
Add testcases for all SVGAnimatedEnumeration objects used in the SVG DOM API. Found several small bugs:
- SVGFEConvolveMatrix 'edgeMode' SVG DOM <-> XML DOM synchronization was not working, because of a typo: s/operatorAttr/edgeModeAttr
- SVGFEConvolveMatrix was missing an synchronizeProperty() implementation, disabling SVG <-> XML DOM synchronization completly.
Tests: svg/dom/SVGAnimatedEnumeration-SVGClipPathElement.html
svg/dom/SVGAnimatedEnumeration-SVGComponentTransferFunctionElement.html
svg/dom/SVGAnimatedEnumeration-SVGFEBlendElement.html
svg/dom/SVGAnimatedEnumeration-SVGFEColorMatrixElement.html
svg/dom/SVGAnimatedEnumeration-SVGFECompositeElement.html
svg/dom/SVGAnimatedEnumeration-SVGFEConvolveMatrixElement.html
svg/dom/SVGAnimatedEnumeration-SVGFEDisplacementMapElement.html
svg/dom/SVGAnimatedEnumeration-SVGFEMorphologyElement.html
svg/dom/SVGAnimatedEnumeration-SVGFETurbulenceElement.html
svg/dom/SVGAnimatedEnumeration-SVGFilterElement.html
svg/dom/SVGAnimatedEnumeration-SVGGradientElement.html
svg/dom/SVGAnimatedEnumeration-SVGMarkerElement.html
svg/dom/SVGAnimatedEnumeration-SVGMaskElement.html
svg/dom/SVGAnimatedEnumeration-SVGPatternElement.html
svg/dom/SVGAnimatedEnumeration-SVGTextContentElement.html
svg/dom/SVGAnimatedEnumeration-SVGTextPathElement.html
Fixes existing svg/dynamic-update/SVGTextContentElement-svgdom-lengthAdjust-prop.html where I found the bug initially.
* GNUmakefile.list.am: Add svg/properties/SVGAnimatedEnumerationPropertyTearOff.h to build.
* WebCore.gypi: Ditto.
* WebCore.pro: Ditto.
* WebCore.vcproj/WebCore.vcproj: Ditto.
* WebCore.xcodeproj/project.pbxproj: Ditto.
* bindings/scripts/CodeGeneratorV8.pm: Add V8 magic, to avoid ambigious conversion warning in toV8(PassRefPtr<SVGAnimatedEnumeration>).
* platform/graphics/GraphicsTypes.h: Cleanup GradientSpreadMethod, as the SVG dependency is gone.
* platform/graphics/filters/FEBlend.cpp:
(WebCore::FEBlend::apply): Turn early-returns (introduce in security patches a while ago) into ASSERTs, as the underlying bug has been fixed.
* platform/graphics/filters/FEDisplacementMap.cpp:
(WebCore::FEDisplacementMap::apply): Ditto.
* rendering/svg/RenderSVGResourceClipper.h: Remove toUnitType() usage, the clipPathUnits() provided by SVGClipPathElement have the correct enum type now.
(WebCore::RenderSVGResourceClipper::clipPathUnits):
* rendering/svg/RenderSVGResourceFilter.h: Remove toUnitType() usage, the filterUnits()/primitiveUnits() provided by SVGFilterElement have the correct enum type now.
(WebCore::RenderSVGResourceFilter::filterUnits):
(WebCore::RenderSVGResourceFilter::primitiveUnits):
* rendering/svg/RenderSVGResourceGradient.cpp: Add helper method platformSpreadMethodFromSVGType() converting from SVGGradientElement::SVGSpreadMethodType to GradientSpreadMethod (platform).
(WebCore::RenderSVGResourceGradient::applyResource):
* rendering/svg/RenderSVGResourceGradient.h: Ditto.
* rendering/svg/RenderSVGResourceLinearGradient.cpp:
(WebCore::RenderSVGResourceLinearGradient::buildGradient): Use platformSpreadMethodFromSVGType().
* rendering/svg/RenderSVGResourceMarker.h: Remove toUnitType() usage, the markerUnits() provided by SVGMarkerElement have the correct enum type now.
(WebCore::RenderSVGResourceMarker::markerUnits):
* rendering/svg/RenderSVGResourceMasker.h: Remove toUnitType() usage, the maskUnits()/maskContentUnits() provided by SVGMaskElement have the correct enum type now.
(WebCore::RenderSVGResourceMasker::maskUnits):
(WebCore::RenderSVGResourceMasker::maskContentUnits):
* rendering/svg/RenderSVGResourceRadialGradient.cpp:
(WebCore::RenderSVGResourceRadialGradient::buildGradient): Use platformSpreadMethodFromSVGType().
* rendering/svg/SVGRenderTreeAsText.cpp:
(WebCore::operator<<): Use SVGPropertyTraits<SomeSVGEnumType>::toString() to convert from enum to string, remove code duplication.
(WebCore::writeCommonGradientProperties):
* rendering/svg/SVGTextChunkBuilder.cpp:
(WebCore::SVGTextChunkBuilder::addTextChunk): Remove int->enum casting for SVGAnimatedEnumeration types, they are enums now.
* rendering/svg/SVGTextLayoutEngine.cpp:
(WebCore::SVGTextLayoutEngine::parentDefinesTextLength): Ditto.
(WebCore::SVGTextLayoutEngine::beginTextPathLayout): Ditto.
* svg/GradientAttributes.h: Change spread method type from platform GradientSpreadMethod to SVGSpreadMethodType.
(WebCore::GradientAttributes::GradientAttributes):
(WebCore::GradientAttributes::spreadMethod):
(WebCore::GradientAttributes::setSpreadMethod):
* svg/SVGAnimatedBoolean.idl: Enable potential exception raising on baseVal setting for the primitive types.
* svg/SVGAnimatedEnumeration.h: Switch from generic SVGAnimatedStaticPropertyTearOff<int> to new SVGAnimatedEnumerationPropertyTearOff<EnumType>.
* svg/SVGAnimatedEnumeration.idl: Enable potential exception raising on baseVal setting for the primitive types.
Only SVGAnimatedEnumeration makes use of this if the assigned value is out of range.
* svg/SVGAnimatedInteger.idl: Ditto.
* svg/SVGAnimatedNumber.idl: Ditto.
* svg/SVGAnimatedString.idl: Ditto.
* svg/SVGClipPathElement.cpp:
(WebCore::SVGClipPathElement::parseMappedAttribute): Convert attribute parsing to use SVGPropertyTraits<EnumType>::fromString(attr->value()).
* svg/SVGClipPathElement.h:
* svg/SVGComponentTransferFunctionElement.cpp:
(WebCore::SVGComponentTransferFunctionElement::SVGComponentTransferFunctionElement): Initialize type to identity, not unknown, as per spec.
(WebCore::SVGComponentTransferFunctionElement::parseMappedAttribute): Convert attribute parsing to use SVGPropertyTraits<EnumType>::fromString(attr->value()).
(WebCore::SVGComponentTransferFunctionElement::transferFunction): Remove int->enum casting for SVGAnimatedEnumeration types, they are enums now.
* svg/SVGComponentTransferFunctionElement.h: Remove svgAttributeChanged() method, that verified the enum value is not out of range.
It's not possible anymore for these values to go out of range.
* svg/SVGFEBlendElement.cpp:
(WebCore::SVGFEBlendElement::parseMappedAttribute): Convert attribute parsing to use SVGPropertyTraits<BlendModeType>::fromString(attr->value()).
(WebCore::SVGFEBlendElement::setFilterEffectAttribute): Remove int->enum casting for SVGAnimatedEnumeration types, they are enums now.
(WebCore::SVGFEBlendElement::build): Ditto.
* svg/SVGFEBlendElement.h: Add SVGPropertyTraits<BlendModeType> specializations.
* svg/SVGFEColorMatrixElement.cpp:
(WebCore::SVGFEColorMatrixElement::parseMappedAttribute): Convert attribute parsing to use SVGPropertyTraits<ColorMatrixType>::fromString(attr->value()).
(WebCore::SVGFEColorMatrixElement::setFilterEffectAttribute): Remove int->enum casting for SVGAnimatedEnumeration types, they are enums now..
(WebCore::SVGFEColorMatrixElement::build): Ditto.
* svg/SVGFEColorMatrixElement.h: Add SVGPropertyTraits<ColorMatrixType> specializations.
* svg/SVGFECompositeElement.cpp:
(WebCore::SVGFECompositeElement::parseMappedAttribute): Convert attribute parsing to use SVGPropertyTraits<CompositeOperationType>::fromString(attr->value()).
(WebCore::SVGFECompositeElement::setFilterEffectAttribute): Remove int->enum casting for SVGAnimatedEnumeration types, they are enums now.
(WebCore::SVGFECompositeElement::build): Ditto.
* svg/SVGFECompositeElement.h: Add SVGPropertyTraits<CompositeOperationType> specializations.
* svg/SVGFEConvolveMatrixElement.cpp: Fix typo, edgeMode needs to be associated with SVGNames::edgeModeAttr, not SVGNames::operatorAttr.
(WebCore::SVGFEConvolveMatrixElement::parseMappedAttribute): Convert attribute parsing to use SVGPropertyTraits<EdgeModeType>::fromString(attr->value()).
(WebCore::SVGFEConvolveMatrixElement::setFilterEffectAttribute): Remove int->enum casting for SVGAnimatedEnumeration types, they are enums now.
(WebCore::SVGFEConvolveMatrixElement::synchronizeProperty): Add missing synchronizeProperty() implementation, otherwhise SVG DOM <-> XML DOM is not in sync.
(WebCore::SVGFEConvolveMatrixElement::build): Remove int->enum casting for SVGAnimatedEnumeration types, they are enums now.
* svg/SVGFEConvolveMatrixElement.h: Add SVGPropertyTraits<EdgeModeType> specializations.
* svg/SVGFEDisplacementMapElement.cpp:
(WebCore::SVGFEDisplacementMapElement::parseMappedAttribute): Convert attribute parsing to use SVGPropertyTraits<ChannelSelectorType>::fromString(attr->value()).
(WebCore::SVGFEDisplacementMapElement::setFilterEffectAttribute): Remove int->enum casting for SVGAnimatedEnumeration types, they are enums now.
(WebCore::SVGFEDisplacementMapElement::svgAttributeChanged): Remove range validation for enum types, they are always in range now.
(WebCore::SVGFEDisplacementMapElement::build): Remove int->enum casting for SVGAnimatedEnumeration types, they are enums now.
* svg/SVGFEDisplacementMapElement.h: Add SVGPropertyTraits<ChannelSelectorType> specializations.
* svg/SVGFEMorphologyElement.cpp:
(WebCore::SVGFEMorphologyElement::parseMappedAttribute): Convert attribute parsing to use SVGPropertyTraits<MorphologyOperatorType>::fromString(attr->value()).
(WebCore::SVGFEMorphologyElement::setFilterEffectAttribute): Remove int->enum casting for SVGAnimatedEnumeration types, they are enums now.
(WebCore::SVGFEMorphologyElement::build): Ditto.
* svg/SVGFEMorphologyElement.h: Add SVGPropertyTraits<MorphologyOperatorType> specializations.
* svg/SVGFETurbulenceElement.cpp:
(WebCore::SVGFETurbulenceElement::parseMappedAttribute): Convert attribute parsing to use SVGPropertyTraits<SVGStitchOptions/TurbulenceType>::fromString(attr->value()).
(WebCore::SVGFETurbulenceElement::setFilterEffectAttribute): Remove int->enum casting for SVGAnimatedEnumeration types, they are enums now.
(WebCore::SVGFETurbulenceElement::build): Ditto.
* svg/SVGFETurbulenceElement.h: Add SVGPropertyTraits<SVGStitchOptions/TurbulenceType> specializations.
* svg/SVGFilterElement.cpp:
(WebCore::SVGFilterElement::parseMappedAttribute): Convert attribute parsing to use SVGPropertyTraits<SVGUnitType>::fromString(attr->value()).
* svg/SVGFilterElement.h:
* svg/SVGGradientElement.cpp:
(WebCore::SVGGradientElement::SVGGradientElement): Missing spread method default initialization: set it to 'pad' as per spec.
(WebCore::SVGGradientElement::parseMappedAttribute): Convert attribute parsing to use SVGPropertyTraits<SVGUnitType/SVGSpreadMethodType>::fromString(attr->value()).
* svg/SVGGradientElement.h: Add SVGPropertyTraits<SVGSpreadMethodType> specializations.
* svg/SVGLinearGradientElement.cpp:
(WebCore::SVGLinearGradientElement::collectGradientAttributes): Remove int->enum casting for SVGAnimatedEnumeration types, they are enums now.
* svg/SVGMarkerElement.cpp:
(WebCore::SVGMarkerElement::parseMappedAttribute): Convert attribute parsing to use SVGPropertyTraits<EnumType>::fromString(attr->value()).
(WebCore::SVGMarkerElement::synchronizeOrientType): Add a custom synchronization method, that handles orientType/orientAngle -> orientAttr synchronization, which is special
as it depends on to other SVG DOM objects (SVGAnimatedAngle and SVGAnimatedEnumeration). All covered by new tests.
(WebCore::SVGMarkerElement::orientTypeAnimated): Custom tear off creation method, which would usually be generated by the DECLARE_ANIMATED_... macros.
* svg/SVGMarkerElement.h: Add SVGPropertyTraits<SVGMarkerUnitsType/SVGMarkerOrientType> specializations.
(WebCore::SVGMarkerElement::orientType): Add custom property handling for the 'orientType' SVGAnimatedEnumeration object, as it has special demands, based on 'orientAngle'.
(WebCore::SVGMarkerElement::orientTypeBaseValue): Ditto.
(WebCore::SVGMarkerElement::setOrientTypeBaseValue): Ditto.
* svg/SVGMaskElement.cpp:
(WebCore::SVGMaskElement::parseMappedAttribute): Convert attribute parsing to use SVGPropertyTraits<EnumType>::fromString(attr->value()).
* svg/SVGMaskElement.h:
* svg/SVGPatternElement.cpp:
(WebCore::SVGPatternElement::parseMappedAttribute): Convert attribute parsing to use SVGPropertyTraits<EnumType>::fromString(attr->value()).
* svg/SVGPatternElement.h:
* svg/SVGRadialGradientElement.cpp:
(WebCore::SVGRadialGradientElement::collectGradientAttributes): Remove int->enum casting for SVGAnimatedEnumeration types, they are enums now.
* svg/SVGTextContentElement.cpp:
(WebCore::SVGTextContentElement::parseMappedAttribute): Convert attribute parsing to use SVGPropertyTraits<SVGLengthAdjustType>::fromString(attr->value()).
* svg/SVGTextContentElement.h: Add SVGPropertyTraits<SVGLengthAdjustType> specializations.
* svg/SVGTextPathElement.cpp:
(WebCore::SVGTextPathElement::parseMappedAttribute): Convert attribute parsing to use SVGPropertyTraits<SVGTextPathMethodType/SVGTextPathSpacingType>::fromString(attr->value()).
* svg/SVGTextPathElement.h: Add SVGPropertyTraits<SVGTextPathMethodType/SVGTextPathSpacingType> specializations.
* svg/SVGUnitTypes.h: Add SVGPropertyTraits<SVGUnitType> specializations.
* svg/properties/SVGAnimatedEnumerationPropertyTearOff.h: Added. SVGAnimatedEnumerationPropertyTearOff inherits from SVGAnimatedStaticPropertyTearOff<int>.
SVGAnimatedEnumeration remains a typedef to SVGAnimatedStaticPropertyTearOff<int>, to have a common base
class for all enum types. This special tear off object, overrides setBaseVal, to verify the incoming int
is within the enum range, otherwhise raise an SVG DOM exception. This makes it impossible to make any of
the enums go out of range anymore (which lead to security bugs in the past).
(WebCore::SVGAnimatedEnumerationPropertyTearOff::setBaseVal):
(WebCore::SVGAnimatedEnumerationPropertyTearOff::create):
(WebCore::SVGAnimatedEnumerationPropertyTearOff::SVGAnimatedEnumerationPropertyTearOff):
* svg/properties/SVGAnimatedStaticPropertyTearOff.h:
(WebCore::SVGAnimatedStaticPropertyTearOff::setBaseVal): Made this method virtual, to SVGAnimatedEnumerationPropertyTearOff can override the default behaviour. Also added an ExceptionCode param.
(WebCore::SVGAnimatedStaticPropertyTearOff::~SVGAnimatedStaticPropertyTearOff):
2011-05-18 Kinuko Yasuda <kinuko@chromium.org>
Reviewed by David Levin.
Expose webkitStorageInfo.requestQuota() for Quota API if QUOTA flag is enabled
https://bugs.webkit.org/show_bug.cgi?id=59681
Test: storage/storageinfo-request-quota.html
* CMakeLists.txt:
* CodeGenerators.pri:
* DerivedSources.cpp:
* DerivedSources.make:
* GNUmakefile.am:
* GNUmakefile.list.am:
* WebCore.gypi:
* WebCore.vcproj/WebCore.vcproj:
* WebCore.xcodeproj/project.pbxproj:
* storage/StorageInfo.idl: Added requestQuota().
* storage/StorageInfoQuotaCallback.idl: Added.
2011-05-18 Renata Hodovan <reni@webkit.org>
Reviewed by Nikolas Zimmermann.
Apply the ParallelJobs support to FEGaussianBlur
https://bugs.webkit.org/show_bug.cgi?id=61049
The Gaussian blur filter of SVG can consume lots of resources if it is
applied to a large area. The computation can be distributed to multiple
cores if the architecture supports.
The average performance progression is about 15% on dual-core machines.
Developed in cooperation with Gabor Loki and Zoltan Herczeg.
* platform/graphics/filters/FEGaussianBlur.cpp:
(WebCore::FEGaussianBlur::platformApplyWorker):
(WebCore::FEGaussianBlur::platformApply):
* platform/graphics/filters/FEGaussianBlur.h:
2011-05-18 Pavel Feldman <pfeldman@google.com>
Reviewed by Yury Semikhatsky.
Web Inspector: make parentId for frame optional.
https://bugs.webkit.org/show_bug.cgi?id=61032
* inspector/Inspector.json:
* inspector/InspectorPageAgent.cpp:
(WebCore::InspectorPageAgent::buildObjectForFrame):
* inspector/front-end/ResourceTreeModel.js:
(WebInspector.ResourceTreeModel.prototype._addFrame):
2011-05-18 Gabor Loki <loki@webkit.org>
Reviewed by Nikolas Zimmermann.
Apply the ParallelJobs support to FELighting
https://bugs.webkit.org/show_bug.cgi?id=61048
The lighting filter of SVG can consume lots of resources if it is
applied to a large area. The computation can be distributed to multiple
cores if the architecture supports.
The average performance progression is 10-20% on dual-core machines.
Developed in cooperation with Zoltan Herczeg.
* platform/graphics/filters/FELighting.cpp:
(WebCore::FELighting::platformApplyGenericPaint):
(WebCore::FELighting::platformApplyGenericWorker):
(WebCore::FELighting::platformApplyGeneric):
* platform/graphics/filters/FELighting.h:
* platform/graphics/filters/arm/FELightingNEON.cpp:
(WebCore::FELighting::platformApplyNeonWorker):
* platform/graphics/filters/arm/FELightingNEON.h:
(WebCore::FELighting::platformApplyNeon):
2011-05-18 Caio Marcelo de Oliveira Filho <caio.oliveira@openbossa.org>
Reviewed by Andreas Kling.
[Qt] Fix tst_QWebFrame::getSetStaticProperty() autotest
https://bugs.webkit.org/show_bug.cgi?id=60984
The code for converting objects to QVariantMap was causing exception,
that was "leaking" to the next evaluation. One situation was reading
the property 'localStorage' when we do not have a proper security
origin, which throws a SECURITY_ERR.
Now, we will simply not include on the QVariantMap those properties,
and make sure that we clean the exception if necessary.
* bridge/qt/qt_runtime.cpp:
(JSC::Bindings::convertValueToQVariantMap):
Extracted function that performs conversion from JSObject to a QVariantMap. This
functions makes sure that exception is clean after its execution.
(JSC::Bindings::convertValueToQVariant):
Use the previous function. Add a comment explaining the choice of distance value.
2011-05-18 Ilya Tikhonovsky <loislo@chromium.org>
Reviewed by Yury Semikhatsky.
Web Inspector: scripts panel file selector element doesn't track keyboard events
https://bugs.webkit.org/show_bug.cgi?id=61047
* inspector/front-end/ScriptsPanel.js:
(WebInspector.ScriptsPanel):
2011-05-16 Pavel Podivilov <podivilov@chromium.org>
Reviewed by Yury Semikhatsky.
Web Inspector: refactoring: ScriptDebugListener::didParseSource has too many parameters.
https://bugs.webkit.org/show_bug.cgi?id=60900
* bindings/js/ScriptDebugServer.cpp:
(WebCore::ScriptDebugServer::dispatchDidParseSource):
* bindings/v8/ScriptDebugServer.cpp:
(WebCore::ScriptDebugServer::dispatchDidParseSource):
* inspector/InspectorDebuggerAgent.cpp:
(WebCore::InspectorDebuggerAgent::getScriptSource):
(WebCore::InspectorDebuggerAgent::didParseSource):
* inspector/InspectorDebuggerAgent.h:
* inspector/ScriptDebugListener.h:
(WebCore::ScriptDebugListener::Script::Script):
2011-05-18 Alexander Pavlov <apavlov@chromium.org>
Reviewed by Pavel Feldman.
Web Inspector: model-based CSS editing does not update @import-ed stylesheet resources
https://bugs.webkit.org/show_bug.cgi?id=60966
Imported stylesheets didn't use to be returned by InspectorCSSAgent.
* inspector/InspectorCSSAgent.cpp:
(WebCore::InspectorCSSAgent::getAllStyleSheets):
(WebCore::InspectorCSSAgent::collectStyleSheets):
* inspector/InspectorCSSAgent.h:
2011-05-18 Pavel Feldman <pfeldman@google.com>
Reviewed by Yury Semikhatsky.
Web Inspector: make "Id" suffixes use consistent case.
https://bugs.webkit.org/show_bug.cgi?id=61028
* inspector/InjectedScriptSource.js:
* inspector/Inspector.json:
* inspector/InspectorConsoleAgent.cpp:
(WebCore::InspectorConsoleAgent::addMessageToConsole):
* inspector/InspectorConsoleAgent.h:
* inspector/InspectorConsoleInstrumentation.h:
(WebCore::InspectorInstrumentation::addMessageToConsole):
* inspector/InspectorDebuggerAgent.cpp:
(WebCore::parseLocation):
(WebCore::InspectorDebuggerAgent::resolveBreakpoint):
(WebCore::InspectorDebuggerAgent::editScriptSource):
(WebCore::InspectorDebuggerAgent::getScriptSource):
(WebCore::InspectorDebuggerAgent::didParseSource):
* inspector/InspectorDebuggerAgent.h:
* inspector/InspectorInstrumentation.cpp:
(WebCore::InspectorInstrumentation::addMessageToConsoleImpl):
* inspector/InspectorInstrumentation.h:
* inspector/InspectorResourceAgent.cpp:
(WebCore::buildObjectForResourceResponse):
* inspector/ScriptDebugListener.h:
* inspector/front-end/DebuggerModel.js:
(WebInspector.DebuggerModel.prototype.scriptForSourceID):
(WebInspector.DebuggerModel.prototype.queryScripts):
(WebInspector.DebuggerModel.prototype.editScriptSource):
(WebInspector.DebuggerModel.prototype._didEditScriptSource):
(WebInspector.DebuggerModel.prototype._parsedScriptSource):
(WebInspector.DebuggerDispatcher.prototype.scriptParsed):
(WebInspector.DebuggerDispatcher.prototype.breakpointResolved):
* inspector/front-end/DebuggerPresentationModel.js:
(WebInspector.DebuggerPresentationModel.prototype.editScriptSource.didReceiveSource):
(WebInspector.DebuggerPresentationModel.prototype.editScriptSource):
(WebInspector.DebuggerPresentationModel.prototype._setBreakpointInDebugger.didRequestSourceMapping):
(WebInspector.DebuggerPresentationModel.prototype._setBreakpointInDebugger):
(WebInspector.DebuggerPresentationModel.prototype._debuggerPaused):
(WebInspector.DebuggerPresentationModel.prototype._sourceFileForScript):
(WebInspector.DebuggerPresentationModel.prototype._scriptForSourceFileId):
(WebInspector.DebuggerPresentationModel.prototype._createSourceFileId):
(WebInspector.PresenationCallFrame):
* inspector/front-end/NetworkManager.js:
(WebInspector.NetworkDispatcher.prototype._updateResourceWithResponse):
* inspector/front-end/Script.js:
(WebInspector.Script):
(WebInspector.Script.prototype.requestSource):
(WebInspector.Script.prototype.editSource):
* inspector/front-end/SourceFile.js:
(WebInspector.SourceFile.prototype.forceLoadContent):
(WebInspector.SourceFile.prototype._concatenateScriptsContent):
(WebInspector.SourceMapping.prototype._sourceLocationToScriptLocation):
(WebInspector):
2011-05-18 Sheriff Bot <webkit.review.bot@gmail.com>
Unreviewed, rolling out r86747.
http://trac.webkit.org/changeset/86747
https://bugs.webkit.org/show_bug.cgi?id=61039
Breaks JSC debugger tests. (Requested by pfeldman on #webkit).
* inspector/InjectedScriptSource.js:
():
* inspector/Inspector.json:
* inspector/InspectorConsoleAgent.cpp:
(WebCore::InspectorConsoleAgent::addMessageToConsole):
* inspector/InspectorConsoleAgent.h:
* inspector/InspectorConsoleInstrumentation.h:
(WebCore::InspectorInstrumentation::addMessageToConsole):
* inspector/InspectorDebuggerAgent.cpp:
(WebCore::parseLocation):
(WebCore::InspectorDebuggerAgent::resolveBreakpoint):
(WebCore::InspectorDebuggerAgent::editScriptSource):
(WebCore::InspectorDebuggerAgent::getScriptSource):
(WebCore::InspectorDebuggerAgent::didParseSource):
* inspector/InspectorDebuggerAgent.h:
* inspector/InspectorInstrumentation.cpp:
(WebCore::InspectorInstrumentation::addMessageToConsoleImpl):
* inspector/InspectorInstrumentation.h:
* inspector/InspectorResourceAgent.cpp:
(WebCore::buildObjectForResourceResponse):
* inspector/ScriptDebugListener.h:
* inspector/front-end/DebuggerModel.js:
(WebInspector.DebuggerModel.prototype.scriptForSourceID):
(WebInspector.DebuggerModel.prototype.queryScripts):
(WebInspector.DebuggerModel.prototype.editScriptSource):
(WebInspector.DebuggerModel.prototype._didEditScriptSource):
(WebInspector.DebuggerModel.prototype._parsedScriptSource):
(WebInspector.DebuggerDispatcher.prototype.scriptParsed):
(WebInspector.DebuggerDispatcher.prototype.breakpointResolved):
* inspector/front-end/DebuggerPresentationModel.js:
(WebInspector.DebuggerPresentationModel.prototype.editScriptSource.didReceiveSource):
(WebInspector.DebuggerPresentationModel.prototype.editScriptSource):
(WebInspector.DebuggerPresentationModel.prototype._setBreakpointInDebugger.didRequestSourceMapping):
(WebInspector.DebuggerPresentationModel.prototype._setBreakpointInDebugger):
(WebInspector.DebuggerPresentationModel.prototype._debuggerPaused):
(WebInspector.DebuggerPresentationModel.prototype._sourceFileForScript):
(WebInspector.DebuggerPresentationModel.prototype._scriptForSourceFileId):
(WebInspector.DebuggerPresentationModel.prototype._createSourceFileId):
(WebInspector.PresenationCallFrame):
* inspector/front-end/NetworkManager.js:
(WebInspector.NetworkDispatcher.prototype._updateResourceWithResponse):
* inspector/front-end/Script.js:
(WebInspector.Script):
(WebInspector.Script.prototype.requestSource):
(WebInspector.Script.prototype.editSource):
* inspector/front-end/SourceFile.js:
(WebInspector.SourceFile.prototype.forceLoadContent):
(WebInspector.SourceFile.prototype._concatenateScriptsContent):
(WebInspector.SourceMapping.prototype._sourceLocationToScriptLocation):
(WebInspector):
2011-05-18 Abhishek Arya <inferno@chromium.org>
Reviewed by Dirk Schulze.
When SMIL element is getting removed, make sure to remove it
from target's animation elements list.
https://bugs.webkit.org/show_bug.cgi?id=60980
Test: svg/animations/smil-element-not-removed-crash.html
* svg/animation/SVGSMILElement.cpp:
(WebCore::SVGSMILElement::~SVGSMILElement):
2011-05-18 Pavel Feldman <pfeldman@google.com>
Reviewed by Yury Semikhatsky.
Web Inspector: make "Id" suffixes use consistent case.
https://bugs.webkit.org/show_bug.cgi?id=61028
* inspector/InjectedScriptSource.js:
* inspector/Inspector.json:
* inspector/InspectorConsoleAgent.cpp:
(WebCore::InspectorConsoleAgent::addMessageToConsole):
* inspector/InspectorConsoleAgent.h:
* inspector/InspectorConsoleInstrumentation.h:
(WebCore::InspectorInstrumentation::addMessageToConsole):
* inspector/InspectorDebuggerAgent.cpp:
(WebCore::parseLocation):
(WebCore::InspectorDebuggerAgent::resolveBreakpoint):
(WebCore::InspectorDebuggerAgent::editScriptSource):
(WebCore::InspectorDebuggerAgent::getScriptSource):
(WebCore::InspectorDebuggerAgent::didParseSource):
* inspector/InspectorDebuggerAgent.h:
* inspector/InspectorInstrumentation.cpp:
(WebCore::InspectorInstrumentation::addMessageToConsoleImpl):
* inspector/InspectorInstrumentation.h:
* inspector/InspectorResourceAgent.cpp:
(WebCore::buildObjectForResourceResponse):
* inspector/ScriptDebugListener.h:
* inspector/front-end/DebuggerModel.js:
(WebInspector.DebuggerModel.prototype.scriptForSourceID):
(WebInspector.DebuggerModel.prototype.queryScripts):
(WebInspector.DebuggerModel.prototype.editScriptSource):
(WebInspector.DebuggerModel.prototype._didEditScriptSource):
(WebInspector.DebuggerModel.prototype._parsedScriptSource):
(WebInspector.DebuggerDispatcher.prototype.scriptParsed):
(WebInspector.DebuggerDispatcher.prototype.breakpointResolved):
* inspector/front-end/DebuggerPresentationModel.js:
(WebInspector.DebuggerPresentationModel.prototype.editScriptSource.didReceiveSource):
(WebInspector.DebuggerPresentationModel.prototype.editScriptSource):
(WebInspector.DebuggerPresentationModel.prototype._setBreakpointInDebugger.didRequestSourceMapping):
(WebInspector.DebuggerPresentationModel.prototype._setBreakpointInDebugger):
(WebInspector.DebuggerPresentationModel.prototype._debuggerPaused):
(WebInspector.DebuggerPresentationModel.prototype._sourceFileForScript):
(WebInspector.DebuggerPresentationModel.prototype._scriptForSourceFileId):
(WebInspector.DebuggerPresentationModel.prototype._createSourceFileId):
(WebInspector.PresenationCallFrame):
* inspector/front-end/NetworkManager.js:
(WebInspector.NetworkDispatcher.prototype._updateResourceWithResponse):
* inspector/front-end/Script.js:
(WebInspector.Script):
(WebInspector.Script.prototype.requestSource):
(WebInspector.Script.prototype.editSource):
* inspector/front-end/SourceFile.js:
(WebInspector.SourceFile.prototype.forceLoadContent):
(WebInspector.SourceFile.prototype._concatenateScriptsContent):
(WebInspector.SourceMapping.prototype._sourceLocationToScriptLocation):
(WebInspector):
2011-05-18 Pavel Feldman <pfeldman@google.com>
Reviewed by Yury Semikhatsky.
Web Inspector: do not reveal line -1 when navigating to anchor without line specified.
https://bugs.webkit.org/show_bug.cgi?id=60971
* inspector/front-end/ResourcesPanel.js:
(WebInspector.ResourcesPanel.prototype.showAnchorLocation):
* inspector/front-end/ScriptsPanel.js:
(WebInspector.ScriptsPanel.prototype.showAnchorLocation.):
(WebInspector.ScriptsPanel.prototype.showAnchorLocation):
* inspector/front-end/inspector.js:
(WebInspector._showAnchorLocation):
2011-05-18 Kent Tamura <tkent@chromium.org>
Reviewed by Hajime Morita.
valueMissing validity for <select> is lame when selecting a value by a key operation
https://bugs.webkit.org/show_bug.cgi?id=61021
We missed updating validity in case that SelectElement::defaultEventHandler
update selections. So, SelectElement::setSelectedIndex() updates validity.
* dom/SelectElement.cpp:
(WebCore::SelectElement::setSelectedIndex): Call SelectElement::updateValidity().
* html/HTMLSelectElement.cpp:
(WebCore::HTMLSelectElement::setSelectedIndex):
Remove unnecessary setNeedsValidityCheck() call.
SelectElement::setSlectedIndex() calls it.
(WebCore::HTMLSelectElement::setSelectedIndexByUser): ditto.
2011-05-17 Mikhail Naganov <mnaganov@chromium.org>
Reviewed by Pavel Feldman.
Web Inspector: [Chromium] Enable detailed heap snapshots by default.
https://bugs.webkit.org/show_bug.cgi?id=60286
* inspector/front-end/ProfilesPanel.js:
2011-05-17 Mikhail Naganov <mnaganov@chromium.org>
Reviewed by Pavel Feldman.
Web Inspector: [Chromium] Make retaining paths list of the Detailed
heap snapshots view resizable.
https://bugs.webkit.org/show_bug.cgi?id=60960
* inspector/front-end/DetailedHeapshotView.js:
(WebInspector.DetailedHeapshotView.prototype.resize):
(WebInspector.DetailedHeapshotView.prototype._startRetainersHeaderDragging):
(WebInspector.DetailedHeapshotView.prototype._retainersHeaderDragging):
(WebInspector.DetailedHeapshotView.prototype._endRetainersHeaderDragging):
(WebInspector.DetailedHeapshotView.prototype._updateRetainmentViewHeight):
* inspector/front-end/heapProfiler.css:
2011-05-16 Jeremy Noble <jer.noble@apple.com>
Reviewed by Darin Adler.
Disable keyboard input (with exceptions) in full-screen mode.
https://bugs.webkit.org/show_bug.cgi?id=60943
Tests: fullscreen/full-screen-keyboard-disabled.html
fullscreen/full-screen-keyboard-enabled.html
* page/EventHandler.cpp:
(WebCore::EventHandler::isKeyEventAllowedInFullScreen): Added. Implements the
list of allowed keyboard events in the proposed API.
(WebCore::EventHandler::keyEvent): Discard events which are not allowed in
full-screen mode.
* page/EventHandler.h:
2011-05-17 Nikolas Zimmermann <nzimmermann@rim.com>
Reviewed by Dirk Schulze.
Refactor TextRun creation
https://bugs.webkit.org/show_bug.cgi?id=60255
Add constructTextRun() methods to RenderBlock/InlineTextBox and use it in various places in rendering/.
The long-term goal is to remove the ugly eight parameters catch-it-all TextRun constructor, and
replace it with explicit setters/getters. To avoid expanding dozens of callsites, when removing
the catch-it-all constructor, these helper functions are introduced, which hide the details of
creating a TextRun.
Furthermore it will be used to remove the platform layering violation, that TextRun stores
RenderObject pointers for the sake of SVG Fonts support, see bug 60254.
No change in functionaliy, no new tests.
* rendering/EllipsisBox.cpp:
(WebCore::EllipsisBox::paint):
(WebCore::EllipsisBox::selectionRect):
(WebCore::EllipsisBox::paintSelection):
* rendering/InlineTextBox.cpp:
(WebCore::InlineTextBox::selectionRect):
(WebCore::InlineTextBox::paint):
(WebCore::InlineTextBox::paintSelection):
(WebCore::InlineTextBox::paintCompositionBackground):
(WebCore::InlineTextBox::paintSpellingOrGrammarMarker):
(WebCore::InlineTextBox::paintTextMatchMarker):
(WebCore::InlineTextBox::computeRectForReplacementMarker):
(WebCore::InlineTextBox::offsetForPosition):
(WebCore::InlineTextBox::positionForOffset):
(WebCore::InlineTextBox::constructTextRun):
* rendering/InlineTextBox.h:
* rendering/RenderBlock.cpp:
(WebCore::RenderBlock::constructTextRunAllowTrailingExpansion):
* rendering/RenderBlock.h:
* rendering/RenderEmbeddedObject.cpp:
(WebCore::RenderEmbeddedObject::getReplacementTextGeometry):
* rendering/RenderFileUploadControl.cpp:
(WebCore::RenderFileUploadControl::paintObject):
(WebCore::RenderFileUploadControl::computePreferredLogicalWidths):
* rendering/RenderImage.cpp:
(WebCore::RenderImage::setImageSizeForAltText):
(WebCore::RenderImage::paintReplaced):
* rendering/RenderListBox.cpp:
(WebCore::RenderListBox::updateFromElement):
* rendering/RenderTextControl.cpp:
(WebCore::RenderTextControl::getAvgCharWidth):
2011-05-17 Jeremy Noble <jer.noble@apple.com>
Reviewed by Darin Adler.
Removing a full-screen element or ancestor from the DOM should trigger exiting full-screen mode.
https://bugs.webkit.org/show_bug.cgi?id=60997
Tests: fullscreen/full-screen-remove-ancestor.html
fullscreen/full-screen-remove-children.html
fullscreen/full-screen-remove.html
* dom/Document.cpp:
(WebCore::Document::fullScreenChangeDelayTimerFired): If the target node was removed from the document
make sure to message the documentElement() as well.
(WebCore::Document::fullScreenElementRemoved): Cancel full screen mode.
2011-05-17 Yuta Kitamura <yutak@chromium.org>
Reviewed by Kent Tamura.
WebSocket: Add CLOSING state
https://bugs.webkit.org/show_bug.cgi?id=60878
No new tests are added because there is no change in functionality.
* platform/network/SocketStreamHandleBase.h:
* websockets/WebSocket.h:
* websockets/WebSocket.idl:
2011-05-16 MORITA Hajime <morrita@google.com>
Reviewed by Dimitri Glazkov.
[Refactoring] ShadowContentElement should be part of dom/
https://bugs.webkit.org/show_bug.cgi?id=59117
- Moved html/shadow/ShadowContentElement.h to dom/ShadowContentElement.h
- Pulled ShadowContentElement up to a subclass of StyledElement, from HTMLDivElement
- Added ShadowContentElement.cpp
- Extracted ShadowContentSelector.{cpp,h} from ShadowRoot.{cpp,h}
No new tests, no behavior change.
* CMakeLists.txt:
* GNUmakefile.list.am:
* WebCore.gypi:
* WebCore.pro:
* WebCore.vcproj/WebCore.vcproj:
* WebCore.xcodeproj/project.pbxproj:
* dom/DOMAllInOne.cpp: Added new ShadowContentSelector.cpp and ShadowContentElement.cpp.
* dom/Node.h:
(WebCore::Node::forceReattach): Moved from static local function to share between classes.
* dom/ShadowContentElement.cpp: Copied from Source/WebCore/html/shadow/ShadowContentElement.h.
(WebCore::ShadowContentElement::attach):
* dom/ShadowContentElement.h: Copied from Source/WebCore/html/shadow/ShadowContentElement.h.
(WebCore::ShadowContentElement::ShadowContentElement):
(WebCore::ShadowContentElement::isShadowBoundary):
(WebCore::ShadowContentElement::rendererIsNeeded):
(WebCore::ShadowContentElement::createRenderer):
* dom/ShadowContentSelector.cpp: Copied from Source/WebCore/html/shadow/ShadowContentElement.h.
(WebCore::ShadowContentSelector::ShadowContentSelector):
(WebCore::ShadowContentSelector::~ShadowContentSelector):
(WebCore::ShadowContentSelector::attachChildrenFor):
* dom/ShadowContentSelector.h: Renamed from Source/WebCore/html/shadow/ShadowContentElement.h.
(WebCore::ShadowContentSelector::shadowRoot):
(WebCore::ShadowContentSelector::activeElement):
(WebCore::ShadowContentSelector::currentInstance):
* dom/ShadowRoot.cpp:
(WebCore::ShadowRoot::recalcStyle):
* html/HTMLDetailsElement.cpp:
(WebCore::DetailsContentElement::DetailsContentElement):
(WebCore::DetailsSummaryElement::DetailsSummaryElement):
* html/HTMLSummaryElement.cpp:
(WebCore::SummaryContentElement::SummaryContentElement):
2011-05-17 Cris Neckar <cdn@chromium.org>
Reviewed by Adam Barth.
Clear the image from ImageLoader rather than clearing the ImageLoader in HTMLObjectElement::renderFallbackContent.
https://bugs.webkit.org/show_bug.cgi?id=61005
Test: http/tests/loading/nested_bad_objects.php
* html/HTMLObjectElement.cpp:
(WebCore::HTMLObjectElement::renderFallbackContent):
2011-05-17 Chris Rogers <crogers@google.com>
Reviewed by Kenneth Russell.
Make sure that AudioNode gets re-enabled after having been disconnected and re-connected.
https://bugs.webkit.org/show_bug.cgi?id=60995
No new tests since audio API is not yet implemented.
* webaudio/AudioNode.cpp:
(WebCore::AudioNode::ref):
2011-05-17 Brady Eidson <beidson@apple.com>
Reviewed by Darin Adler.
<rdar://problem/9366728> and https://webkit.org/b/60796
Crash when code inside a ResourceLoadDelegate method calls [WebView stopLoading:]
Break up ResourceLoader::didCancel() into willCancel() and didCancel(), and making them pure virtual.
This change has the following benefits:
- Managing ResourceLoader state can be in the base class; Subclasses no longer need to protect
themselves, check these variables as often, or ASSERT them.
- ResourceLoader subclasses no longer have to call the base class ::didCancel
- ResourceLoader::cancel becomes more capable of handling reentrancy with the design that the
cancellation is completed inside the last call.
No new tests - No change in behavior for previous tests, and new test would require API usage outside
the scope of DumpRenderTree.
* loader/ResourceLoader.cpp:
(WebCore::ResourceLoader::ResourceLoader):
(WebCore::ResourceLoader::cancel): Moved from ResourceLoader::didCancel, and does all of that same work
except it interposes calls to "willCancel" and "didCancel" as required to maintain the same behavior.
* loader/ResourceLoader.h: Added pure virtual didCancel() and willCancel().
Split-up into willCancel() and didCancel(), based on when the base class didCancel() used to be called:
* loader/MainResourceLoader.cpp:
(WebCore::MainResourceLoader::willCancel):
(WebCore::MainResourceLoader::didCancel):
* loader/MainResourceLoader.h:
Split-up into willCancel() and didCancel(), based on when the "reached terminal state" flag used to be checked:
* loader/NetscapePlugInStreamLoader.cpp:
(WebCore::NetscapePlugInStreamLoader::didReceiveResponse): Call the entry point cancel() instead of the old didCancel()
(WebCore::NetscapePlugInStreamLoader::willCancel):
(WebCore::NetscapePlugInStreamLoader::didCancel):
* loader/NetscapePlugInStreamLoader.h:
Split-up into willCancel() and didCancel(), based on when the "reached terminal state" flag used to be checked:
* loader/SubresourceLoader.cpp:
(WebCore::SubresourceLoader::willCancel):
(WebCore::SubresourceLoader::didCancel):
* loader/SubresourceLoader.h:
2011-05-17 Nat Duca <nduca@chromium.org>
Reviewed by James Robinson.
[chromium] Always set layerRenderer, even on non-drawn-layers
https://bugs.webkit.org/show_bug.cgi?id=60977
This is a defensive fixe for crbug.com/82799, in which
a RenderLayer could not prepare itself because its owning layerImpl
had no associated layerRenderer. The underlying issue is that we
sometimes put renderSurfaces onto the list that won't actually render.
For now, the priority is to reduce fragility so that invisible layers
dont lead to crashers. We do this by being more agressive about
binding CCLayerImpls to the LayerRenderer, doing it all the time rather
than only when we think it will get rendered.
* platform/graphics/chromium/LayerRendererChromium.cpp:
(WebCore::LayerRendererChromium::paintLayerContents):
2011-05-17 Anders Carlsson <andersca@apple.com>
Fix the clang build.
* rendering/RenderText.h:
(WebCore::RenderText::nodeAtPoint):
nodeAtPoint should take a const IntPoint reference.
2011-05-17 Erik Arvidsson <arv@chromium.org>
Reviewed by Ryosuke Niwa.
document.activeElement doesn't point to the focused frame
https://bugs.webkit.org/show_bug.cgi?id=49509
This makes us match IE and Firefox and there is an ongoing WHATWG discussion to make the spec match this.
Test: fast/dom/HTMLDocument/active-element-frames.html
* html/HTMLDocument.cpp:
(WebCore::HTMLDocument::activeElement): Walk up the frame tree from the focusedFrame to find the active frame if any.
2011-05-17 Emil A Eklund <eae@chromium.org>
Reviewed by Eric Seidel.
Change nodeAtPoint to take IntPoint instead of int x, int y
https://bugs.webkit.org/show_bug.cgi?id=60663
Change nodeAtPoint to take a single const IntPoint& instead of a pair of
ints for the location.
Covered by existing tests.
* platform/graphics/FloatPoint.h:
(WebCore::flooredIntPoint):
* rendering/EllipsisBox.cpp:
(WebCore::EllipsisBox::nodeAtPoint):
* rendering/EllipsisBox.h:
* rendering/InlineBox.cpp:
(WebCore::InlineBox::nodeAtPoint):
* rendering/InlineBox.h:
* rendering/InlineFlowBox.cpp:
(WebCore::InlineFlowBox::nodeAtPoint):
* rendering/InlineFlowBox.h:
* rendering/InlineTextBox.cpp:
(WebCore::InlineTextBox::nodeAtPoint):
* rendering/InlineTextBox.h:
* rendering/RenderBlock.cpp:
(WebCore::RenderBlock::nodeAtPoint):
(WebCore::RenderBlock::hitTestContents):
* rendering/RenderBlock.h:
* rendering/RenderBox.cpp:
(WebCore::RenderBox::nodeAtPoint):
* rendering/RenderBox.h:
* rendering/RenderFrameSet.cpp:
(WebCore::RenderFrameSet::nodeAtPoint):
* rendering/RenderFrameSet.h:
* rendering/RenderImage.cpp:
(WebCore::RenderImage::nodeAtPoint):
* rendering/RenderImage.h:
* rendering/RenderInline.cpp:
(WebCore::RenderInline::nodeAtPoint):
* rendering/RenderInline.h:
* rendering/RenderLineBoxList.cpp:
(WebCore::RenderLineBoxList::hitTest):
* rendering/RenderListBox.cpp:
(WebCore::RenderListBox::nodeAtPoint):
* rendering/RenderListBox.h:
* rendering/RenderObject.cpp:
(WebCore::RenderObject::hitTest):
(WebCore::RenderObject::nodeAtPoint):
* rendering/RenderObject.h:
* rendering/RenderTable.cpp:
(WebCore::RenderTable::nodeAtPoint):
* rendering/RenderTable.h:
* rendering/RenderTableRow.cpp:
(WebCore::RenderTableRow::nodeAtPoint):
* rendering/RenderTableRow.h:
* rendering/RenderTableSection.cpp:
(WebCore::RenderTableSection::nodeAtPoint):
* rendering/RenderTableSection.h:
* rendering/RenderText.h:
(WebCore::RenderText::nodeAtPoint):
* rendering/RenderTextControlMultiLine.cpp:
(WebCore::RenderTextControlMultiLine::nodeAtPoint):
* rendering/RenderTextControlMultiLine.h:
* rendering/RenderTextControlSingleLine.cpp:
(WebCore::RenderTextControlSingleLine::nodeAtPoint):
* rendering/RenderTextControlSingleLine.h:
* rendering/RenderWidget.cpp:
(WebCore::RenderWidget::nodeAtPoint):
* rendering/RenderWidget.h:
* rendering/RootInlineBox.cpp:
(WebCore::RootInlineBox::nodeAtPoint):
* rendering/RootInlineBox.h:
* rendering/svg/RenderSVGForeignObject.cpp:
(WebCore::RenderSVGForeignObject::nodeAtFloatPoint):
(WebCore::RenderSVGForeignObject::nodeAtPoint):
* rendering/svg/RenderSVGForeignObject.h:
* rendering/svg/RenderSVGModelObject.cpp:
(WebCore::RenderSVGModelObject::nodeAtPoint):
* rendering/svg/RenderSVGModelObject.h:
* rendering/svg/RenderSVGRoot.cpp:
(WebCore::RenderSVGRoot::nodeAtPoint):
* rendering/svg/RenderSVGRoot.h:
* rendering/svg/RenderSVGText.cpp:
(WebCore::RenderSVGText::nodeAtFloatPoint):
(WebCore::RenderSVGText::nodeAtPoint):
* rendering/svg/RenderSVGText.h:
2011-05-17 Andrew Wilson <atwilson@chromium.org>
Unreviewed, rolling out r86647.
http://trac.webkit.org/changeset/86647
https://bugs.webkit.org/show_bug.cgi?id=56814
Broke tests downstream in Chromium
* dom/DocumentMarker.h:
(WebCore::DocumentMarker::operator==):
(WebCore::DocumentMarker::operator!=):
* dom/DocumentMarkerController.cpp:
(WebCore::DocumentMarkerController::addMarker):
(WebCore::DocumentMarkerController::copyMarkers):
(WebCore::DocumentMarkerController::removeMarkers):
(WebCore::DocumentMarkerController::markerContainingPoint):
(WebCore::DocumentMarkerController::markersInRange):
(WebCore::DocumentMarkerController::renderedRectsForMarkers):
(WebCore::DocumentMarkerController::removeMarkersFromList):
(WebCore::DocumentMarkerController::repaintMarkers):
(WebCore::DocumentMarkerController::shiftMarkers):
(WebCore::DocumentMarkerController::setMarkersActive):
(WebCore::DocumentMarkerController::hasMarkers):
(WebCore::DocumentMarkerController::clearDescriptionOnMarkersIntersectingRange):
(WebCore::DocumentMarkerController::showMarkers):
* dom/DocumentMarkerController.h:
* editing/CompositeEditCommand.cpp:
(WebCore::CompositeEditCommand::replaceTextInNodePreservingMarkers):
* editing/DeleteSelectionCommand.cpp:
(WebCore::DeleteSelectionCommand::originalStringForAutocorrectionAtBeginningOfSelection):
* editing/Editor.cpp:
(WebCore::Editor::selectionStartHasMarkerFor):
* editing/SpellingCorrectionController.cpp:
(WebCore::SpellingCorrectionController::respondToChangedSelection):
* editing/SpellingCorrectionController.h:
(WebCore::SpellingCorrectionController::shouldStartTimerFor):
* rendering/HitTestResult.cpp:
(WebCore::HitTestResult::spellingToolTip):
(WebCore::HitTestResult::replacedString):
* rendering/InlineTextBox.cpp:
(WebCore::InlineTextBox::paintSpellingOrGrammarMarker):
(WebCore::InlineTextBox::paintTextMatchMarker):
(WebCore::InlineTextBox::computeRectForReplacementMarker):
(WebCore::InlineTextBox::paintDocumentMarkers):
* rendering/svg/SVGInlineFlowBox.cpp:
(WebCore::SVGInlineFlowBox::computeTextMatchMarkerRectForRenderer):
2011-05-17 Andrew Wilson <atwilson@chromium.org>
Unreviewed, rolling out r86656.
http://trac.webkit.org/changeset/86656
Broke tests downstream in Chromium
* editing/SpellingCorrectionController.cpp:
(WebCore::markersHaveIdenticalDescription):
(WebCore::SpellingCorrectionController::recordSpellcheckerResponseForModifiedCorrection):
(WebCore::SpellingCorrectionController::processMarkersOnTextToBeReplacedByResult):
2011-05-17 Yufeng Shen <miletus@chromium.org>
Reviewed by Darin Fisher.
Make WebKit expose extra touch information
https://bugs.webkit.org/show_bug.cgi?id=59030
* dom/Document.cpp:
(WebCore::Document::createTouch):
* dom/Document.h:
* dom/Document.idl:
* dom/Touch.cpp:
(WebCore::Touch::Touch):
* dom/Touch.h:
(WebCore::Touch::create):
(WebCore::Touch::webkitRadiusX):
(WebCore::Touch::webkitRadiusY):
(WebCore::Touch::webkitRotationAngle):
* dom/Touch.idl:
* page/EventHandler.cpp:
(WebCore::EventHandler::handleTouchEvent):
* platform/PlatformTouchPoint.h:
(WebCore::PlatformTouchPoint::radiusX):
(WebCore::PlatformTouchPoint::radiusY):
(WebCore::PlatformTouchPoint::rotationAngle):
2011-05-17 Eric Seidel <eric@webkit.org>
Reviewed by Ryosuke Niwa.
Add a LineLayoutState object to hold global state during line layout
https://bugs.webkit.org/show_bug.cgi?id=60113
Like LayoutState for layout(), LineLayoutState keeps track of global information
during an entire linebox tree layout pass (aka layoutInlineChildren).
For now it just holds isFullLayout and the logicalRepaintTop/Bottom.
It's possible we should hold the useRepaintBounds bool as well as
the startLine and endLine RootInlineBox pointers.
No change in behavior, thus no tests.
* rendering/RenderBlock.cpp:
(WebCore::RenderBlock::layoutBlock):
* rendering/RenderBlock.h:
* rendering/RenderBlockLineLayout.cpp:
(WebCore::LineLayoutState::LineLayoutState):
(WebCore::LineLayoutState::markForFullLayout):
(WebCore::LineLayoutState::isFullLayout):
(WebCore::LineLayoutState::setRepaintRange):
(WebCore::LineLayoutState::updateRepaintRangeFromBox):
(WebCore::LineLayoutState::startLine):
(WebCore::LineLayoutState::endLine):
(WebCore::deleteLineRange):
(WebCore::RenderBlock::layoutRunsAndFloats):
(WebCore::RenderBlock::layoutInlineChildren):
(WebCore::RenderBlock::checkFloatsInCleanLine):
(WebCore::RenderBlock::determineStartPosition):
(WebCore::RenderBlock::determineEndPosition):
(WebCore::RenderBlock::matchedEndLine):
2011-05-17 Andreas Kling <kling@webkit.org>
Reviewed by Kenneth Rohde Christiansen.
Area element doesn't update region when dynamically altered.
https://bugs.webkit.org/show_bug.cgi?id=54636
Recompute the clickable region after the "shape" or "coords" attribute
of an area element is changed.
Test: fast/images/imagemap-dynamic-area-updates.html
* html/HTMLAreaElement.cpp:
(WebCore::HTMLAreaElement::parseMappedAttribute):
(WebCore::HTMLAreaElement::invalidateCachedRegion):
* html/HTMLAreaElement.h:
2011-05-09 Luiz Agostini <luiz.agostini@openbossa.org>
Reviewed by Kenneth Rohde Christiansen.
[Qt] Redirection of HTTP POST (3xx) incorrectly includes original POST data
https://bugs.webkit.org/show_bug.cgi?id=60440
Makes sure that the HTTP headers Content-type and Content-length are not included in
the requests that do not have any content.
Tests: http/tests/navigation/post-301-response.html
http/tests/navigation/post-302-response.html
http/tests/navigation/post-303-response.html
http/tests/navigation/post-307-response.html
* platform/network/qt/QNetworkReplyHandler.cpp:
(WebCore::QNetworkReplyHandler::sendNetworkRequest):
2011-05-17 Andreas Kling <kling@webkit.org>
Reviewed by Benjamin Poulain.
[Qt] GraphicsLayerQtImpl: Remove an unused variable.
* platform/graphics/qt/GraphicsLayerQt.cpp:
(WebCore::GraphicsLayerQtImpl::paint):
2011-05-17 Pavel Feldman <pfeldman@google.com>
Reviewed by Yury Semikhatsky.
Web Inspector: navigating from elements panel does not show source view.
https://bugs.webkit.org/show_bug.cgi?id=60970
* inspector/front-end/TextViewer.js:
(WebInspector.TextViewer.prototype.highlightLine):
(WebInspector.TextEditorChunkedPanel.prototype.makeLineAChunk):
2011-05-17 Sam Magnuson <smagnuson@netflix.com>
Reviewed by Kenneth Rohde Christiansen.
[Qt] Node that have both an opacity and a transform animation on them seem not to fire.
https://bugs.webkit.org/show_bug.cgi?id=40841
Test: compositing/animation/busy-indicator.html
* platform/graphics/qt/GraphicsLayerQt.cpp:
(WebCore::GraphicsLayerQtImpl::recache):
(WebCore::GraphicsLayerQtImpl::flushChanges):
(WebCore::GraphicsLayerQt::setContentsToImage):
(WebCore::TransformAnimationQt::getAnimatedProperty):
(WebCore::OpacityAnimationQt::getAnimatedProperty):
(WebCore::GraphicsLayerQt::addAnimation):
2011-05-17 Grace Kloba <klobag@chromium.org>
Reviewed by Kenneth Russell.
GraphicsContext3DSkia needs to honor the platform Sk_x_SHIFT value instead of assuming BGRA color
https://bugs.webkit.org/show_bug.cgi?id=60965
* platform/graphics/skia/GraphicsContext3DSkia.cpp:
(WebCore::GraphicsContext3D::getImageData):
2011-05-17 Alexander Pavlov <apavlov@chromium.org>
Reviewed by Yury Semikhatsky.
Web Inspector: Enter/Tab after editing a CSS property does not invoke editor on next field
https://bugs.webkit.org/show_bug.cgi?id=60962
* inspector/front-end/ElementsPanel.js:
(WebInspector.ElementsPanel.prototype.updateStyles):
2011-05-17 Sheriff Bot <webkit.review.bot@gmail.com>
Unreviewed, rolling out r86660.
http://trac.webkit.org/changeset/86660
https://bugs.webkit.org/show_bug.cgi?id=60958
broke search in console panel (Requested by podivilov on
#webkit).
* inspector/front-end/ConsoleView.js:
(WebInspector.ConsoleView.prototype.show):
(WebInspector.ConsoleView.prototype.afterShow):
(WebInspector.ConsoleView.prototype.hide):
(WebInspector.ConsoleView.prototype.addMessage):
(WebInspector.ConsoleView.prototype.clearMessages):
* inspector/front-end/DebuggerPresentationModel.js:
(WebInspector.DebuggerPresentationModel):
* inspector/front-end/Drawer.js:
(WebInspector.Drawer.prototype.set visibleView):
(WebInspector.Drawer.prototype.show.animationFinished):
(WebInspector.Drawer.prototype.show):
* inspector/front-end/Panel.js:
(WebInspector.Panel):
* inspector/front-end/ResourceTreeModel.js:
(WebInspector.ResourceTreeModel):
* inspector/front-end/inspector.html:
* inspector/front-end/inspector.js:
(WebInspector._createPanels):
2011-05-17 Alexis Menard <alexis.menard@openbossa.org>
Unreviewed warning fix introduced by r86377.
* rendering/RenderFieldset.cpp:
(WebCore::RenderFieldset::paintMask):
2011-05-17 Yuta Kitamura <yutak@chromium.org>
Reviewed by Kent Tamura.
WebSocket: Uninline methods in ThreadableWebSocketChannelClientWrapper
https://bugs.webkit.org/show_bug.cgi?id=60945
Add ThreadableWebSocketChannelClientWrapper.cpp. Uninline methods in this class and
move these definitions into .cpp in order to allow further modifications in this class.
No new tests, as this is just refactoring.
* CMakeLists.txt:
* GNUmakefile.list.am:
* WebCore.gypi:
* WebCore.pro:
* WebCore.vcproj/WebCore.vcproj:
* WebCore.xcodeproj/project.pbxproj:
* websockets/ThreadableWebSocketChannelClientWrapper.cpp: Added.
(WebCore::ThreadableWebSocketChannelClientWrapper::ThreadableWebSocketChannelClientWrapper):
(WebCore::ThreadableWebSocketChannelClientWrapper::create):
(WebCore::ThreadableWebSocketChannelClientWrapper::clearSyncMethodDone):
(WebCore::ThreadableWebSocketChannelClientWrapper::setSyncMethodDone):
(WebCore::ThreadableWebSocketChannelClientWrapper::syncMethodDone):
(WebCore::ThreadableWebSocketChannelClientWrapper::sent):
(WebCore::ThreadableWebSocketChannelClientWrapper::setSent):
(WebCore::ThreadableWebSocketChannelClientWrapper::bufferedAmount):
(WebCore::ThreadableWebSocketChannelClientWrapper::setBufferedAmount):
(WebCore::ThreadableWebSocketChannelClientWrapper::clearClient):
(WebCore::ThreadableWebSocketChannelClientWrapper::didConnect):
(WebCore::ThreadableWebSocketChannelClientWrapper::didReceiveMessage):
(WebCore::ThreadableWebSocketChannelClientWrapper::didClose):
(WebCore::ThreadableWebSocketChannelClientWrapper::suspend):
(WebCore::ThreadableWebSocketChannelClientWrapper::resume):
(WebCore::ThreadableWebSocketChannelClientWrapper::processPendingEvents):
* websockets/ThreadableWebSocketChannelClientWrapper.h:
2011-05-17 Andreas Kling <andreas.kling@nokia.com>
Reviewed by Kenneth Rohde Christiansen.
[Qt] Support shadowed text in fast font path.
https://bugs.webkit.org/show_bug.cgi?id=60462
* platform/graphics/Font.cpp:
(WebCore::Font::drawText): Remove complex path shortcut for shadowed text.
* platform/graphics/qt/FontQt.cpp:
(WebCore::Font::drawGlyphs): Paint shadows for simple text.
2011-05-17 Andreas Kling <kling@webkit.org>
Reviewed by Kenneth Rohde Christiansen.
[Qt] Construct GraphicsLayerQtImpl::State with correct values.
https://bugs.webkit.org/show_bug.cgi?id=60902
The GraphicsLayerQtImpl initial state should match the initial values
of the corresponding GraphicsLayer flags.
* platform/graphics/qt/GraphicsLayerQt.cpp:
(WebCore::GraphicsLayerQtImpl::State::State):
2011-05-12 Hans Wennborg <hans@chromium.org>
Reviewed by Steve Block.
IndexedDB: Index population should ignore records without key for index
https://bugs.webkit.org/show_bug.cgi?id=60697
When populating a new index, records which do not have a key on the
index's key path should be ignored.
* storage/IDBObjectStoreBackendImpl.cpp:
2011-05-17 Young Han Lee <joybro@company100.net>
Reviewed by Csaba Osztrogonác.
[Texmap][Qt] Enable strict PassOwnPtr for Qt with texmap enabled.
https://bugs.webkit.org/show_bug.cgi?id=60947
No new tests. Build fix.
* platform/graphics/qt/TextureMapperQt.cpp:
(WebCore::TextureMapper::create):
* platform/graphics/qt/TextureMapperQt.h:
(WebCore::TextureMapperQt::create):
* platform/graphics/texmap/GraphicsLayerTextureMapper.cpp:
(WebCore::GraphicsLayer::create):
2011-05-17 Alexander Pavlov <apavlov@chromium.org>
Reviewed by Yury Semikhatsky.
Web Inspector: Increment/decrement of very big CSS numeric values results in invalid CSS
https://bugs.webkit.org/show_bug.cgi?id=60890
* inspector/front-end/MetricsSidebarPane.js:
(WebInspector.MetricsSidebarPane.prototype._handleKeyDown):
* inspector/front-end/StylesSidebarPane.js:
(WebInspector.StylesSidebarPane.alteredFloatNumber):
(WebInspector.StylePropertyTreeElement.prototype):
2011-05-17 Pavel Podivilov <podivilov@chromium.org>
Reviewed by Yury Semikhatsky.
Web Inspector: merge ConsoleView into ConsolePanel.
https://bugs.webkit.org/show_bug.cgi?id=54670
Console view in drawer looks exactly the same as console panel. Merging ConsoleView and ConsolePanel together
will allow us to reuse panel's functionality (e.g. resizable sidebar) even when console is docked.
* inspector/front-end/ConsoleView.js:
(WebInspector.ConsolePanel.prototype.get toolbarItemLabel):
(WebInspector.ConsolePanel.prototype.show):
(WebInspector.ConsolePanel.prototype.hide):
(WebInspector.ConsolePanel.prototype.showInDrawer):
(WebInspector.ConsolePanel.prototype.afterShowInDrawer):
(WebInspector.ConsolePanel.prototype.hideInDrawer):
(WebInspector.ConsolePanel.prototype.addMessage):
(WebInspector.ConsolePanel.prototype.clearMessages):
* inspector/front-end/DebuggerPresentationModel.js:
(WebInspector.DebuggerPresentationModel):
* inspector/front-end/Drawer.js:
(WebInspector.Drawer.prototype.set visibleView):
(WebInspector.Drawer.prototype.show.animationFinished):
(WebInspector.Drawer.prototype.show):
* inspector/front-end/Panel.js:
(WebInspector.Panel):
* inspector/front-end/ResourceTreeModel.js:
(WebInspector.ResourceTreeModel):
* inspector/front-end/inspector.html:
* inspector/front-end/inspector.js:
(WebInspector._createPanels):
2011-05-16 Yuta Kitamura <yutak@chromium.org>
Reviewed by Kent Tamura.
WebSocket: WebSocketHandshake prints a carriage return to console
https://bugs.webkit.org/show_bug.cgi?id=60880
* websockets/WebSocketHandshake.cpp:
(WebCore::WebSocketHandshake::readStatusLine):
WebSocketHandshake should not print a carriage return to console. To fix this,
we first check whether the status line ends with CRLF. After that,
we can print the first (lineLength - 2) characters of the status line
which do not contain a carriage return.
2011-05-16 MORITA Hajime <morrita@google.com>
Unreviewed build fix for r86647, which broke SUPPORT_AUTOCORRECTION_PANEL.
* editing/SpellingCorrectionController.cpp:
(WebCore::markersHaveIdenticalDescription):
(WebCore::SpellingCorrectionController::recordSpellcheckerResponseForModifiedCorrection):
(WebCore::SpellingCorrectionController::processMarkersOnTextToBeReplacedByResult):
2011-05-16 Kent Tamura <tkent@chromium.org>
Fix Leopard build.
* html/HTMLInputElement.cpp:
(WebCore::HTMLInputElement::stepUpFromRenderer): Use double instead of int.
2011-05-16 James Robinson <jamesr@chromium.org>
Reviewed by Kenneth Russell.
[chromium] Decouple LayerChromium/CCLayerImpl trees
https://bugs.webkit.org/show_bug.cgi?id=58830
Makes the CCLayerImpl tree self-hosting and provides an explicit step
to synchronize the LayerChromium tree to the CCLayerImpl tree.
Tested by compositing/ layout tests and by unit tests in WebKit/chromium.
* WebCore.gypi:
* platform/graphics/chromium/CanvasLayerChromium.cpp:
(WebCore::CanvasLayerChromium::createCCLayerImpl):
* platform/graphics/chromium/LayerChromium.cpp:
(WebCore::LayerChromium::LayerChromium):
(WebCore::LayerChromium::~LayerChromium):
(WebCore::LayerChromium::cleanupResources):
(WebCore::LayerChromium::dumpLayer):
(WebCore::LayerChromium::dumpLayerProperties):
(WebCore::LayerChromium::createCCLayerImpl):
(WebCore::LayerChromium::ccLayerImpl):
* platform/graphics/chromium/LayerChromium.h:
(WebCore::LayerChromium::id):
(WebCore::LayerChromium::setCCLayerImpl):
* platform/graphics/chromium/LayerRendererChromium.cpp:
(WebCore::LayerRendererChromium::updateAndDrawLayers):
(WebCore::LayerRendererChromium::updateLayers):
(WebCore::LayerRendererChromium::updatePropertiesAndRenderSurfaces):
(WebCore::LayerRendererChromium::updateCompositorResourcesRecursive):
* platform/graphics/chromium/LayerRendererChromium.h:
* platform/graphics/chromium/PluginLayerChromium.cpp:
(WebCore::PluginLayerChromium::createCCLayerImpl):
* platform/graphics/chromium/TreeSynchronizer.cpp: Added.
(WebCore::TreeSynchronizer::addCCLayerImplsToMapRecursive):
(WebCore::TreeSynchronizer::synchronizeTreeRecursive):
(WebCore::TreeSynchronizer::synchronizeTrees):
* platform/graphics/chromium/TreeSynchronizer.h:
* platform/graphics/chromium/VideoLayerChromium.cpp:
(WebCore::VideoLayerChromium::createCCLayerImpl):
* platform/graphics/chromium/cc/CCCanvasLayerImpl.cpp:
(WebCore::CCCanvasLayerImpl::CCCanvasLayerImpl):
* platform/graphics/chromium/cc/CCCanvasLayerImpl.h:
(WebCore::CCCanvasLayerImpl::create):
* platform/graphics/chromium/cc/CCLayerImpl.cpp:
(WebCore::CCLayerImpl::CCLayerImpl):
(WebCore::CCLayerImpl::addChild):
(WebCore::CCLayerImpl::removeFromParent):
(WebCore::CCLayerImpl::removeAllChildren):
(WebCore::CCLayerImpl::clearChildList):
(WebCore::CCLayerImpl::descendantsDrawsContent):
(WebCore::CCLayerImpl::drawsContent):
(WebCore::CCLayerImpl::updateCompositorResources):
* platform/graphics/chromium/cc/CCLayerImpl.h:
(WebCore::CCLayerImpl::create):
(WebCore::CCLayerImpl::parent):
(WebCore::CCLayerImpl::children):
(WebCore::CCLayerImpl::setMaskLayer):
(WebCore::CCLayerImpl::maskLayer):
(WebCore::CCLayerImpl::setReplicaLayer):
(WebCore::CCLayerImpl::replicaLayer):
(WebCore::CCLayerImpl::id):
(WebCore::CCLayerImpl::owner):
(WebCore::CCLayerImpl::setParent):
* platform/graphics/chromium/cc/CCPluginLayerImpl.cpp:
(WebCore::CCPluginLayerImpl::CCPluginLayerImpl):
* platform/graphics/chromium/cc/CCPluginLayerImpl.h:
(WebCore::CCPluginLayerImpl::create):
* platform/graphics/chromium/cc/CCVideoLayerImpl.cpp:
(WebCore::CCVideoLayerImpl::CCVideoLayerImpl):
* platform/graphics/chromium/cc/CCVideoLayerImpl.h:
(WebCore::CCVideoLayerImpl::create):
2011-05-16 Naoki Takano <takano.naoki@gmail.com>
Reviewed by Kent Tamura.
HTML5 Number Spinbox displays a 0 in situations where a 0 is not between the min and max.
https://bugs.webkit.org/show_bug.cgi?id=60871
Test: fast/forms/input-stepup-stepdown-from-renderer.html
In number input type, if the value is not a number, including empty, the currect valued is assumed 0.
But we have to handle it separately from the case when the value is actuall "0".
* html/HTMLInputElement.cpp:
(WebCore::HTMLInputElement::stepUpFromRenderer): Added cliping for default value.
2011-05-16 Adam Barth <abarth@webkit.org>
Reviewed by Eric Seidel.
Remove bogus ASSERT in Document::setCompatibilityMode
https://bugs.webkit.org/show_bug.cgi?id=60935
The ASSERT is invalid when the parser is in the initial state and the
document is non-empty, which is strange but not impossible.
Test: fast/parser/append-child-followed-by-document-write.html
* dom/Document.cpp:
(WebCore::Document::setCompatibilityMode):
2011-05-16 MORITA Hajime <morrita@google.com>
Reviewed by Tony Chang.
[Refactoring] Member variables of DocumentMarker should be encapsulated.
https://bugs.webkit.org/show_bug.cgi?id=56814
- Moved DocumentMarker's member variables to private and added getters for them.
- Added DocumentMarker setters and constructors, which contain assertions against m_type values
because description and activeMatch are used with specific type of MarkerType.
- Moved chromium's WebKit::WebFrameImpl::addMarker() to DocumentMarkerController because
it accesses DocumentMarker internals.
- Moved a version of DMC::addMarker() to private and add alternatives that hide
internals of DocumentMarker. (The internal will be renewed by upcoming change.)
* dom/DocumentMarker.h:
(WebCore::DocumentMarker::type):
(WebCore::DocumentMarker::startOffset):
(WebCore::DocumentMarker::endOffset):
(WebCore::DocumentMarker::description):
(WebCore::DocumentMarker::hasDescription):
(WebCore::DocumentMarker::activeMatch):
(WebCore::DocumentMarker::clearDescription):
(WebCore::DocumentMarker::setStartOffset):
(WebCore::DocumentMarker::setEndOffset):
(WebCore::DocumentMarker::operator==):
(WebCore::DocumentMarker::DocumentMarker):
(WebCore::DocumentMarker::shiftOffsets):
(WebCore::DocumentMarker::setActiveMatch):
* dom/DocumentMarkerController.cpp:
(WebCore::DocumentMarkerController::addMarker):
(WebCore::DocumentMarkerController::addTextMatchMarker):
(WebCore::DocumentMarkerController::copyMarkers):
(WebCore::DocumentMarkerController::removeMarkers):
(WebCore::DocumentMarkerController::markerContainingPoint):
(WebCore::DocumentMarkerController::markersInRange):
(WebCore::DocumentMarkerController::renderedRectsForMarkers):
(WebCore::DocumentMarkerController::removeMarkersFromList):
(WebCore::DocumentMarkerController::repaintMarkers):
(WebCore::DocumentMarkerController::shiftMarkers):
(WebCore::DocumentMarkerController::setMarkersActive):
(WebCore::DocumentMarkerController::hasMarkers):
(WebCore::DocumentMarkerController::clearDescriptionOnMarkersIntersectingRange):
(WebCore::DocumentMarkerController::showMarkers):
* dom/DocumentMarkerController.h:
* editing/CompositeEditCommand.cpp:
(WebCore::CompositeEditCommand::replaceTextInNodePreservingMarkers):
* editing/DeleteSelectionCommand.cpp:
(WebCore::DeleteSelectionCommand::originalStringForAutocorrectionAtBeginningOfSelection):
* editing/Editor.cpp:
(WebCore::Editor::selectionStartHasMarkerFor):
* editing/SpellingCorrectionController.cpp:
(WebCore::SpellingCorrectionController::respondToChangedSelection):
* editing/SpellingCorrectionController.h:
(WebCore::SpellingCorrectionController::shouldStartTimerFor):
* rendering/HitTestResult.cpp:
(WebCore::HitTestResult::spellingToolTip):
(WebCore::HitTestResult::replacedString):
* rendering/InlineTextBox.cpp:
(WebCore::InlineTextBox::paintSpellingOrGrammarMarker):
(WebCore::InlineTextBox::paintTextMatchMarker):
(WebCore::InlineTextBox::computeRectForReplacementMarker):
(WebCore::InlineTextBox::paintDocumentMarkers):
* rendering/svg/SVGInlineFlowBox.cpp:
(WebCore::SVGInlineFlowBox::computeTextMatchMarkerRectForRenderer):
2011-05-16 Martin Robinson <mrobinson@igalia.com>
Fix the Cairo build for older versions of GTK+.
* platform/gtk/GtkWidgetBackingStoreX11.cpp: Include GtkVersioning.h to
satisfy older versions of GTK+ 2.x.
2011-05-16 Ian Henderson <ianh@apple.com>
Reviewed by Joseph Pecoraro.
Page::goToItem doesn't work while loading is deferred
https://bugs.webkit.org/show_bug.cgi?id=60412
If goToItem is called while loading is deferred, save the arguments
and try again later instead of doing nothing.
Test: loader/navigation-while-deferring-loads.html
* loader/FrameLoader.cpp:
(WebCore::FrameLoader::setDefersLoading):
Pipe the "defersLoading" state into HistoryController.
* loader/HistoryController.cpp:
(WebCore::HistoryController::HistoryController):
(WebCore::HistoryController::goToItem):
Save the HistoryItem and FrameLoadType if loading is deferred.
(WebCore::HistoryController::setDefersLoading):
If we have a saved HistoryItem after resuming, try going to it.
* loader/HistoryController.h:
* page/Page.cpp:
(WebCore::Page::goToItem):
No longer bail early if loading is deferred, since HistoryController
now handles this case.
2011-05-16 Andrew Wilson <atwilson@chromium.org>
Unreviewed, rolling out r86625.
http://trac.webkit.org/changeset/86625
https://bugs.webkit.org/show_bug.cgi?id=60719
Caused failed assertion on Chromium gpu canary bots
* WebCore.gypi:
* platform/chromium/TraceEvent.h:
* platform/graphics/chromium/ContentLayerChromium.cpp:
(WebCore::ContentLayerChromium::create):
(WebCore::ContentLayerChromium::ContentLayerChromium):
(WebCore::ContentLayerChromium::~ContentLayerChromium):
(WebCore::ContentLayerChromium::paintContentsIfDirty):
(WebCore::ContentLayerChromium::setLayerRenderer):
(WebCore::ContentLayerChromium::createTilerIfNeeded):
(WebCore::ContentLayerChromium::updateCompositorResources):
* platform/graphics/chromium/ContentLayerChromium.h:
(WebCore::ContentLayerChromium::drawsContent):
* platform/graphics/chromium/ImageLayerChromium.cpp:
(WebCore::ImageLayerChromium::paintContentsIfDirty):
(WebCore::ImageLayerChromium::updateCompositorResources):
* platform/graphics/chromium/ImageLayerChromium.h:
* platform/graphics/chromium/LayerPainterChromium.h: Removed.
* platform/graphics/chromium/LayerRendererChromium.cpp:
(WebCore::LayerRendererChromium::create):
(WebCore::LayerRendererChromium::LayerRendererChromium):
(WebCore::LayerRendererChromium::updateRootLayerContents):
(WebCore::LayerRendererChromium::drawRootLayer):
(WebCore::LayerRendererChromium::updateAndDrawLayers):
(WebCore::LayerRendererChromium::updateLayers):
* platform/graphics/chromium/LayerRendererChromium.h:
* platform/graphics/chromium/LayerTextureSubImage.cpp: Removed.
* platform/graphics/chromium/LayerTextureSubImage.h: Removed.
* platform/graphics/chromium/LayerTextureUpdater.h: Removed.
* platform/graphics/chromium/LayerTextureUpdaterCanvas.cpp: Removed.
* platform/graphics/chromium/LayerTextureUpdaterCanvas.h: Removed.
* platform/graphics/chromium/LayerTilerChromium.cpp:
(WebCore::LayerTilerChromium::create):
(WebCore::LayerTilerChromium::LayerTilerChromium):
(WebCore::LayerTilerChromium::setLayerRenderer):
(WebCore::LayerTilerChromium::setTileSize):
(WebCore::LayerTilerChromium::update):
(WebCore::LayerTilerChromium::uploadCanvas):
(WebCore::LayerTilerChromium::updateFromPixels):
(WebCore::LayerTilerChromium::draw):
* platform/graphics/chromium/LayerTilerChromium.h:
(WebCore::LayerTilerChromium::Tile::Tile):
* platform/graphics/chromium/cc/CCHeadsUpDisplay.cpp:
(WebCore::CCHeadsUpDisplay::draw):
2011-05-16 Antti Koivisto <antti@apple.com>
Reviewed by Dave Kilzer.
https://bugs.webkit.org/show_bug.cgi?id=60927
fastCheckSelector() does not inline correctly in all cases
Use anonymous namespace instead of static qualifier to get internal linkage.
Use functions as template arguments instead of classes.
* css/CSSStyleSelector.cpp:
(WebCore::CSSStyleSelector::SelectorChecker::fastCheckSelector):
2011-05-16 Chris Rogers <crogers@google.com>
Unreviewed build fix.
Just return "nullptr" to fix compile errors
https://bugs.webkit.org/show_bug.cgi?id=60932
* platform/audio/mac/AudioBusMac.mm:
(WebCore::AudioBus::loadPlatformResource):
* platform/audio/mac/AudioFileReaderMac.cpp:
(WebCore::AudioFileReader::createBus):
2011-05-16 Emil A Eklund <eae@chromium.org>
Reviewed by Eric Seidel.
Replace docTop/Right/Bottom/Left/Width/Height with documentRect
https://bugs.webkit.org/show_bug.cgi?id=60743
Change RenderView::documentRect to compute rect once rather than four times.
Replace all uses of docTop/Right/Bottom/Left/Width/Height with documentRect to
simplify the code and reduce complexity.
Covered by existing tests.
* WebCore.exp.in:
* page/FrameView.cpp:
(WebCore::FrameView::adjustViewSize):
(WebCore::FrameView::forceLayoutForPagination):
* page/PrintContext.cpp:
(WebCore::PrintContext::computePageRects):
* rendering/RenderBox.cpp:
(WebCore::RenderBox::paintRootBoxFillLayers):
* rendering/RenderLayerCompositor.cpp:
(WebCore::RenderLayerCompositor::updateRootLayerPosition):
* rendering/RenderView.cpp:
(WebCore::RenderView::documentRect):
* rendering/RenderView.h:
2011-05-16 Tony Chang <tony@chromium.org>
Reviewed by Adam Barth.
[chromium] shard V8DerivedSources into 19 files
https://bugs.webkit.org/show_bug.cgi?id=60926
This reduces the clobber build time by 4s on my machine. It helps
by making the slowest to compile V8DerivedSources faster (and thus
more parallelizable). With 8 files, the 3 slowest are 23s, 18s and
10s. With 19 files, the 3 slowest are 16s, 10s, and 10s.
* WebCore.gyp/WebCore.gyp:
* storage/IDBObjectStore.h: Fix a missing include that was working
because a different .cpp file before it was including the header.
2011-05-16 Chris Rogers <crogers@google.com>
Unreviewed build fix.
Fix web audio enabled mac port compile errors
https://bugs.webkit.org/show_bug.cgi?id=60930
* platform/audio/mac/AudioBusMac.mm:
(WebCore::AudioBus::loadPlatformResource):
* platform/audio/mac/AudioFileReaderMac.cpp:
(WebCore::AudioFileReader::createBus):
2011-05-16 Eric Seidel <eric@webkit.org>
Reviewed by Adam Barth.
Document why RenderBlockLineLayout has its own deleteLineBoxTree implementation
https://bugs.webkit.org/show_bug.cgi?id=60925
I suspect this difference is really just papering over other bugs
but now that I finally understand the difference, I should at least
document it for others.
* rendering/RenderBlockLineLayout.cpp:
(WebCore::deleteLineRange):
(WebCore::RenderBlock::determineStartPosition):
2011-05-16 Alok Priyadarshi <alokp@chromium.org>
Reviewed by James Robinson.
[chromium] Split canvas from LayerTilerChromium
https://bugs.webkit.org/show_bug.cgi?id=60719
LayerTilerChromium now just does tiling. It delegates the task of painting and updating textures to LayerTextureUpdater.
Also abstracted LayerTextureSubImage to upload texture pixels.
* WebCore.gypi:
* platform/chromium/TraceEvent.h:
* platform/graphics/chromium/ContentLayerChromium.cpp:
(WebCore::ContentLayerChromium::create):
(WebCore::ContentLayerChromium::ContentLayerChromium):
(WebCore::ContentLayerChromium::~ContentLayerChromium):
(WebCore::ContentLayerChromium::paintContentsIfDirty):
(WebCore::ContentLayerChromium::cleanupResources):
(WebCore::ContentLayerChromium::setLayerRenderer):
(WebCore::ContentLayerChromium::createTextureUpdater):
(WebCore::ContentLayerChromium::drawsContent):
(WebCore::ContentLayerChromium::createTilerIfNeeded):
(WebCore::ContentLayerChromium::updateCompositorResources):
* platform/graphics/chromium/ContentLayerChromium.h:
* platform/graphics/chromium/ImageLayerChromium.cpp:
(WebCore::ImageLayerTextureUpdater::ImageLayerTextureUpdater):
(WebCore::ImageLayerTextureUpdater::~ImageLayerTextureUpdater):
(WebCore::ImageLayerTextureUpdater::orientation):
(WebCore::ImageLayerTextureUpdater::prepareToUpdate):
(WebCore::ImageLayerTextureUpdater::updateTextureRect):
(WebCore::ImageLayerTextureUpdater::imageRect):
(WebCore::ImageLayerChromium::paintContentsIfDirty):
(WebCore::ImageLayerChromium::updateCompositorResources):
(WebCore::ImageLayerChromium::createTextureUpdater):
* platform/graphics/chromium/ImageLayerChromium.h:
* platform/graphics/chromium/LayerPainterChromium.h: Added.
* platform/graphics/chromium/LayerRendererChromium.cpp:
(WebCore::LayerRendererChromium::create):
(WebCore::LayerRendererChromium::LayerRendererChromium):
(WebCore::LayerRendererChromium::updateRootLayerContents):
(WebCore::LayerRendererChromium::drawRootLayer):
(WebCore::LayerRendererChromium::updateAndDrawLayers):
(WebCore::LayerRendererChromium::updateLayers):
* platform/graphics/chromium/LayerRendererChromium.h:
* platform/graphics/chromium/LayerTextureSubImage.cpp: Added.
(WebCore::LayerTextureSubImage::LayerTextureSubImage):
(WebCore::LayerTextureSubImage::~LayerTextureSubImage):
(WebCore::LayerTextureSubImage::setSubImageSize):
(WebCore::LayerTextureSubImage::upload):
(WebCore::LayerTextureSubImage::uploadWithTexSubImage):
(WebCore::LayerTextureSubImage::uploadWithMapTexSubImage):
* platform/graphics/chromium/LayerTextureSubImage.h: Added.
* platform/graphics/chromium/LayerTextureUpdater.h: Added.
(WebCore::LayerTextureUpdater::LayerTextureUpdater):
(WebCore::LayerTextureUpdater::~LayerTextureUpdater):
(WebCore::LayerTextureUpdater::context):
* platform/graphics/chromium/LayerTextureUpdaterCanvas.cpp: Added.
(WebCore::LayerTextureUpdaterCanvas::LayerTextureUpdaterCanvas):
(WebCore::LayerTextureUpdaterCanvas::paintContents):
(WebCore::LayerTextureUpdaterBitmap::LayerTextureUpdaterBitmap):
(WebCore::LayerTextureUpdaterBitmap::prepareToUpdate):
(WebCore::LayerTextureUpdaterBitmap::updateTextureRect):
* platform/graphics/chromium/LayerTextureUpdaterCanvas.h: Added.
(WebCore::LayerTextureUpdaterCanvas::~LayerTextureUpdaterCanvas):
(WebCore::LayerTextureUpdaterCanvas::contentRect):
(WebCore::LayerTextureUpdaterBitmap::~LayerTextureUpdaterBitmap):
(WebCore::LayerTextureUpdaterBitmap::orientation):
* platform/graphics/chromium/LayerTilerChromium.cpp:
(WebCore::LayerTilerChromium::create):
(WebCore::LayerTilerChromium::LayerTilerChromium):
(WebCore::LayerTilerChromium::setTileSize):
(WebCore::LayerTilerChromium::prepareToUpdate):
(WebCore::LayerTilerChromium::updateRect):
(WebCore::LayerTilerChromium::draw):
* platform/graphics/chromium/LayerTilerChromium.h:
(WebCore::LayerTilerChromium::Tile::Tile):
* platform/graphics/chromium/cc/CCHeadsUpDisplay.cpp:
(WebCore::CCHeadsUpDisplay::draw):
2011-05-16 Andrew Wilson <atwilson@chromium.org>
Unreviewed prospective build fix/workaround for chromium ARM compiler error.
* platform/graphics/GraphicsLayer.cpp:
(WebCore::GraphicsLayer::animationNameForTransition):
2011-05-16 Martin Robinson <mrobinson@igalia.com>
Reviewed by Anders Carlsson.
[GTK] [WebKit2] Provide a fast version of the backing store for X11
https://bugs.webkit.org/show_bug.cgi?id=60912
No new tests. This will be covered by WebKit2 pixel tests.
* GNUmakefile.list.am: Added new GtkWidgetBackingStore source and header files.
* platform/gtk/GtkWidgetBackingStore.h: Added.
* platform/gtk/GtkWidgetBackingStoreCairo.cpp: Added this implementation of the backing
store that uses Cairo and has the same performance characteristics as the WebKit2 implementaiton.
* platform/gtk/GtkWidgetBackingStoreX11.cpp: Added this implementation of the backing
store that uses X11 directly and has better performance than the Cairo version.
2011-05-16 Chris Rogers <crogers@google.com>
Reviewed by senorblanco@chromium.org.
Add DynamicsCompressorNode implementation
https://bugs.webkit.org/show_bug.cgi?id=60682
No new tests since audio API is not yet implemented.
* DerivedSources.make:
* WebCore.gypi:
* WebCore.xcodeproj/project.pbxproj:
* platform/audio/DynamicsCompressor.cpp: Added.
(WebCore::DynamicsCompressor::DynamicsCompressor):
(WebCore::DynamicsCompressor::initializeParameters):
(WebCore::DynamicsCompressor::parameterValue):
(WebCore::DynamicsCompressor::setEmphasisStageParameters):
(WebCore::DynamicsCompressor::setEmphasisParameters):
(WebCore::DynamicsCompressor::process):
(WebCore::DynamicsCompressor::reset):
* platform/audio/DynamicsCompressor.h: Added.
(WebCore::DynamicsCompressor::isStereo):
(WebCore::DynamicsCompressor::sampleRate):
(WebCore::DynamicsCompressor::nyquist):
* platform/audio/DynamicsCompressorKernel.cpp: Added.
(WebCore::saturate):
(WebCore::DynamicsCompressorKernel::DynamicsCompressorKernel):
(WebCore::DynamicsCompressorKernel::setPreDelayTime):
(WebCore::DynamicsCompressorKernel::process):
(WebCore::DynamicsCompressorKernel::reset):
* platform/audio/DynamicsCompressorKernel.h: Added.
(WebCore::DynamicsCompressorKernel::latencyFrames):
(WebCore::DynamicsCompressorKernel::sampleRate):
* platform/audio/ZeroPole.cpp: Added.
(WebCore::ZeroPole::process):
* platform/audio/ZeroPole.h: Added.
(WebCore::ZeroPole::ZeroPole):
(WebCore::ZeroPole::reset):
(WebCore::ZeroPole::setZero):
(WebCore::ZeroPole::setPole):
(WebCore::ZeroPole::zero):
(WebCore::ZeroPole::pole):
* webaudio/AudioContext.cpp:
(WebCore::AudioContext::createDynamicsCompressor):
* webaudio/AudioContext.h:
* webaudio/AudioContext.idl:
* webaudio/AudioNode.h:
* webaudio/DynamicsCompressorNode.cpp: Added.
(WebCore::DynamicsCompressorNode::DynamicsCompressorNode):
(WebCore::DynamicsCompressorNode::~DynamicsCompressorNode):
(WebCore::DynamicsCompressorNode::process):
(WebCore::DynamicsCompressorNode::reset):
(WebCore::DynamicsCompressorNode::initialize):
(WebCore::DynamicsCompressorNode::uninitialize):
* webaudio/DynamicsCompressorNode.h: Added.
(WebCore::DynamicsCompressorNode::create):
* webaudio/DynamicsCompressorNode.idl: Added.
2011-05-16 Yuzo Fujishima <yuzo@google.com>
Reviewed by Antti Koivisto.
Fix for Bug 43704 - Web font is printed as blank if it is not cached
https://bugs.webkit.org/show_bug.cgi?id=43704
In setting printing, we should not validate resources already cached
for the document. If we do, web fonts used for screen are revalidated
and possiby reloaded. Then the fonts can be shown as blank on print.
This patch won't save the case where screen and print use different web
fonts. Nonetheless, this is an improvement.
No new tests because there seems to be no good way to test print images.
* editing/Editor.cpp:
(WebCore::Editor::paste): Use ResourceCacheValidationSuppressor instead of explicitly allowing/disallowing stale resources.
* loader/cache/CachedResourceLoader.h:
(WebCore::ResourceCacheValidationSuppressor::ResourceCacheValidationSuppressor): RAII class for allowing/disallowing stale resources.
(WebCore::ResourceCacheValidationSuppressor::~ResourceCacheValidationSuppressor):
* page/DragController.cpp:
(WebCore::DragController::concludeEditDrag): Use ResourceCacheValidationSuppressor instead of explicitly allowing/disallowing stale resources.
* page/Frame.cpp:
(WebCore::Frame::setPrinting): Use ResourceCacheValidationSuppressor to allow stale resources in printing.
2011-05-16 Dan Bernstein <mitz@apple.com>
Reviewed by Darin Adler.
<rdar://problem/9446653> REGRESSION (r84750): Moving by word stops at apostrophe mid-word
https://bugs.webkit.org/show_bug.cgi?id=60915
CFStringTokenizer’s kCFStringTokenizerUnitWord considers “Here’s” as two separate tokens.
Switching to CFStringTokenizer in r84750 was an attempt to address an issue with Japanese word
boundaries for searches with WebFindOptionsAtWordStarts, but it turned out to be insufficient,
and in r86387 the Japanese word issue was addressed independently of text boundaries, so just
revert r84750.
* platform/text/mac/TextBoundaries.mm:
(WebCore::findNextWordFromIndex):
2011-05-16 David Kilzer <ddkilzer@apple.com>
<http://webkit.org/b/60913> C++ exceptions should not be enabled when building with llvm-gcc-4.2
<rdar://problem/9446430>
Reviewed by Mark Rowe.
* Configurations/Base.xcconfig: Fixed typo.
2011-05-16 Jon Lee <jonlee@apple.com>
Fix for broken regression tests. Adding null pointer check
* page/FrameView.cpp:
(WebCore::FrameView::didAddHorizontalScrollbar):
(WebCore::FrameView::willRemoveHorizontalScrollbar):
2011-05-16 Adrienne Walker <enne@google.com>
Reviewed by James Robinson.
[chromium] Remove unused member variables from LayerRendererChromium
https://bugs.webkit.org/show_bug.cgi?id=60899
These should have been removed when tiling was enabled for root
layers.
* platform/graphics/chromium/LayerRendererChromium.h:
2011-05-16 Andrew Wilson <atwilson@chromium.org>
Unreviewed, rolling out r86589.
http://trac.webkit.org/changeset/86589
https://bugs.webkit.org/show_bug.cgi?id=54670
Broke chromium inspector tests.
* inspector/front-end/ConsoleView.js:
(WebInspector.ConsoleView.prototype.show):
(WebInspector.ConsoleView.prototype.afterShow):
(WebInspector.ConsoleView.prototype.hide):
(WebInspector.ConsoleView.prototype.addMessage):
(WebInspector.ConsoleView.prototype.clearMessages):
* inspector/front-end/DebuggerPresentationModel.js:
(WebInspector.DebuggerPresentationModel):
* inspector/front-end/Drawer.js:
(WebInspector.Drawer.prototype.set visibleView):
(WebInspector.Drawer.prototype.show.animationFinished):
(WebInspector.Drawer.prototype.show):
* inspector/front-end/Panel.js:
(WebInspector.Panel):
* inspector/front-end/ResourceTreeModel.js:
(WebInspector.ResourceTreeModel):
* inspector/front-end/inspector.html:
* inspector/front-end/inspector.js:
(WebInspector._createPanels):
2011-05-16 Brian Weinstein <bweinstein@apple.com>
Reviewed by Enrica Casucci.
REGRESSION (r86542): Dropping URL onto Desktop creates broken Internet Shortcut file.
r86477 fixed this bug by using latin1 as the CString's encoding instead of ascii, but r86542
undid this change.
Change it back to latin1 to fix the bug.
* platform/win/ClipboardWin.cpp:
(WebCore::ClipboardWin::writeURL):
2011-05-16 Jeremy Noble <jer.noble@apple.com>
Unreviewed; build fix for non-SnowLeopard builds.
* platform/graphics/mac/MediaPlayerPrivateQTKit.mm: Wrap definition
of layerIsDescendentOf in a #if check.
2011-05-16 Pavel Podivilov <podivilov@chromium.org>
Reviewed by Yury Semikhatsky.
Web Inspector: merge ConsoleView into ConsolePanel.
https://bugs.webkit.org/show_bug.cgi?id=54670
Console view in drawer looks exactly the same as console panel. Merging ConsoleView and ConsolePanel together
will allow us to reuse panel's functionality (e.g. resizable sidebar) even when console is docked.
* inspector/front-end/ConsoleView.js:
(WebInspector.ConsolePanel.prototype.get toolbarItemLabel):
(WebInspector.ConsolePanel.prototype.show):
(WebInspector.ConsolePanel.prototype.hide):
(WebInspector.ConsolePanel.prototype.showInDrawer):
(WebInspector.ConsolePanel.prototype.afterShowInDrawer):
(WebInspector.ConsolePanel.prototype.hideInDrawer):
(WebInspector.ConsolePanel.prototype.addMessage):
(WebInspector.ConsolePanel.prototype.clearMessages):
* inspector/front-end/DebuggerPresentationModel.js:
(WebInspector.DebuggerPresentationModel):
* inspector/front-end/Drawer.js:
(WebInspector.Drawer.prototype.set visibleView):
(WebInspector.Drawer.prototype.show.animationFinished):
(WebInspector.Drawer.prototype.show):
* inspector/front-end/Panel.js:
(WebInspector.Panel):
* inspector/front-end/ResourceTreeModel.js:
(WebInspector.ResourceTreeModel):
* inspector/front-end/inspector.html:
* inspector/front-end/inspector.js:
(WebInspector._createPanels):
2011-05-13 Jer Noble <jer.noble@apple.com>
Reviewed by Simon Fraser.
Video is blank, controller is misplaced on trailers.apple.com movie in fullscreen (with two screens)
https://bugs.webkit.org/show_bug.cgi?id=60826
Listen for a WebKitLayerHostChanged notification and, if the affected layer is an
ancestor layer of the qtMovieLayer, tear down the layer and recreate it the
next time setVisible(true) is called.
* dom/Document.cpp:
(WebCore::Document::webkitDidEnterFullScreenForElement): Call setFullScreenRootLayer(0)
before disabling animation on the full screen renderer.
* platform/graphics/mac/MediaPlayerPrivateQTKit.h:
* platform/graphics/mac/MediaPlayerPrivateQTKit.mm:
(WebCore::MediaPlayerPrivateQTKit::createQTMovie): Register an observer for the new
WebKitLayerHostChanged notification.
(WebCore::layerIsDescendentOf): Added.
(WebCore::MediaPlayerPrivateQTKit::layerHostChanged): Added. If the changed
layer is an ancestor of the movie layer, tear down rendering and re-
create the next time setVisible(true) is called.
(-[WebCoreMovieObserver layerHostChanged:]): Added ObjC listener wrapper.
2011-05-16 Adam Barth <abarth@webkit.org>
Reviewed by Darin Adler.
Remove disable-javascript-urls CSP directive
https://bugs.webkit.org/show_bug.cgi?id=60874
After talking this out with various folks in the CSP working group, we
decided that this syntax isn't the right way to approach this issue.
If we want to address the use case of enabling JavaScript URLs
separately from inline script, we'll probably just make
script-src javascript:
work that way.
* page/ContentSecurityPolicy.cpp:
(WebCore::ContentSecurityPolicy::ContentSecurityPolicy):
(WebCore::ContentSecurityPolicy::allowJavaScriptURLs):
(WebCore::ContentSecurityPolicy::addDirective):
* page/ContentSecurityPolicy.h:
2011-05-16 Jon Lee <jonlee@apple.com>
Reviewed by Simon Fraser.
Can't horizontally scroll iframes and overflow because wheel events are always accepted
https://bugs.webkit.org/show_bug.cgi?id=60779
* dom/Document.cpp:
(WebCore::Document::Document): Initialize wheel event handler count
(WebCore::Document::didAddWheelEventHandler): Increment count, and tell the main frame
to recalculate the total number of wheel event handlers in all of its frames' documents
(WebCore::Document::didRemoveWheelEventHandler): Reverse of previous method
* dom/Document.h:
(WebCore::Document::wheelEventHandlerCount): Access the count
* dom/Node.cpp:
(WebCore::tryAddEventListener): If the event listener is a mouse wheel event, then
tell the document to increment its count
(WebCore::tryRemoveEventListener): Reverse of previous method
* page/ChromeClient.h: Two new methods:
numWheelEventHandlersChanged: WebProcess tells UIProcess to update its cached
count of total wheel event handlers, which in this case only include horizontal
scrollbars and mouse wheel JS handlers
shouldRubberBandInDirection: allow the UIProcess to provide some control over
whether rubber banding is allowed when scrolling in a particular direction
* loader/EmptyClients.h:
(WebCore::EmptyChromeClient::numWheelEventHandlersChanged): Default empty impl
(WebCore::EmptyChromeClient::shouldRubberBandInDirection): Default empty impl
* page/EventHandler.cpp:
(WebCore::EventHandler::handleWheelEvent): Remove a redundant pointer check
* page/Frame.cpp:
(WebCore::Frame::setDocument): When the frame's document changes, calculate that
document's total wheel event handlers, and notify the UIProcess
(WebCore::Frame::notifyChromeClientWheelEventHandlerCountChanged): Performs a crawl
of the frame tree to aggregate the count
* page/Frame.h:
* platform/ScrollableArea.h: Virtualize didAddHorizontalScrollbar and
willRemoveHorizontalScrollbar for overriding in RenderLayer and FrameView
(WebCore::ScrollableArea::isHorizontalScrollerPinnedToMinimumPosition): Returns true if there is
no scrollbar or the scroller position is in the minimum scroll position.
(WebCore::ScrollableArea::isHorizontalScrollerPinnedToMaximumPosition): Converse of the above.
(WebCore::ScrollableArea::shouldRubberBandInDirection): Default impl
* page/FrameView.cpp:
(WebCore::FrameView::didAddHorizontalScrollbar): Updates the frame's document's count
(WebCore::FrameView::willRemoveHorizontalScrollbar): Updates the frame's document's
count
(WebCore::FrameView::shouldRubberBandInDirection): Connective glue
* page/FrameView.h: Adding overriding methods from ScrollableArea
* rendering/RenderLayer.cpp: Similar functionality to FrameView
(WebCore::RenderLayer::didAddHorizontalScrollbar):
(WebCore::RenderLayer::willRemoveHorizontalScrollbar):
* rendering/RenderLayer.h:
* platform/mac/ScrollAnimatorMac.h: Fix typo of "momentum"
* platform/mac/ScrollAnimatorMac.mm:
(WebCore::ScrollAnimatorMac::ScrollAnimatorMac): Fix typo of "momentum"
(WebCore::ScrollAnimatorMac::smoothScrollWithEvent): Fix typo of "coalesced"
(WebCore::ScrollAnimatorMac::beginScrollGesture): Fix typo of "coalesced"
(WebCore::ScrollAnimatorMac::snapRubberBand): Fix typo of "momentum"
(WebCore::ScrollAnimatorMac::handleWheelEvent): New logic for determining whether
to allow rubber-banding based on the area's scroll position and the wheel event.
Could prevent accepting the wheel event. Also, fix typo of "momentum"
(WebCore::isScrollingLeftAndShouldNotRubberBand): Inline helper function for logic
(WebCore::isScrollingRightAndShouldNotRubberBand): Inline helper function for logic
2011-05-16 Leandro Gracia Gil <leandrogracia@chromium.org>
Reviewed by Tony Gentilcore.
Media Stream API: add local stream requests.
https://bugs.webkit.org/show_bug.cgi?id=60177
Add the code and messages for requesting the generation of local streams and getting the reply back.
Tests for the Media Stream API will be provided by the bug 56587.
One test is re-enabled with this patch.
Test: fast/dom/MediaStream/argument-types.html
* GNUmakefile.list.am:
* WebCore.gypi:
* WebCore.pro:
* WebCore.vcproj/WebCore.vcproj:
* WebCore.xcodeproj/project.pbxproj:
* page/CallbackTask.h: Added.
(WebCore::CallbackTask1::create):
(WebCore::CallbackTask1::performTask):
(WebCore::CallbackTask1::Scheduler::scheduleCallback):
(WebCore::CallbackTask1::CallbackTask1):
* page/MediaStreamClient.h:
* page/MediaStreamController.cpp:
(WebCore::MediaStreamController::isClientAvailable):
(WebCore::MediaStreamController::unregisterFrameController):
(WebCore::MediaStreamController::registerRequest):
(WebCore::MediaStreamController::registerStream):
(WebCore::MediaStreamController::generateStream):
(WebCore::MediaStreamController::streamGenerated):
(WebCore::MediaStreamController::streamGenerationFailed):
* page/MediaStreamController.h:
* page/MediaStreamFrameController.cpp:
(WebCore::MediaStreamFrameController::GenerateStreamRequest::GenerateStreamRequest):
(WebCore::MediaStreamFrameController::GenerateStreamRequest::~GenerateStreamRequest):
(WebCore::MediaStreamFrameController::GenerateStreamRequest::isGenerateStreamRequest):
(WebCore::MediaStreamFrameController::GenerateStreamRequest::abort):
(WebCore::MediaStreamFrameController::GenerateStreamRequest::successCallback):
(WebCore::MediaStreamFrameController::GenerateStreamRequest::errorCallback):
(WebCore::::unregisterAll):
(WebCore::::detachEmbedder):
(WebCore::MediaStreamFrameController::MediaStreamFrameController):
(WebCore::MediaStreamFrameController::pageController):
(WebCore::MediaStreamFrameController::unregister):
(WebCore::MediaStreamFrameController::enterDetachedState):
(WebCore::MediaStreamFrameController::isClientAvailable):
(WebCore::MediaStreamFrameController::disconnectFrame):
(WebCore::MediaStreamFrameController::parseGenerateStreamOptions):
(WebCore::MediaStreamFrameController::generateStream):
(WebCore::MediaStreamFrameController::streamGenerated):
(WebCore::MediaStreamFrameController::streamGenerationFailed):
* page/MediaStreamFrameController.h:
(WebCore::MediaStreamFrameController::ClientBase::ClientBase):
(WebCore::MediaStreamFrameController::ClientBase::~ClientBase):
(WebCore::MediaStreamFrameController::ClientBase::mediaStreamFrameController):
(WebCore::MediaStreamFrameController::ClientBase::clientId):
(WebCore::MediaStreamFrameController::ClientBase::isStream):
(WebCore::MediaStreamFrameController::ClientBase::isGeneratedStream):
(WebCore::MediaStreamFrameController::ClientBase::detachEmbedder):
(WebCore::MediaStreamFrameController::ClientBase::associateFrameController):
(WebCore::MediaStreamFrameController::ClientBase::unregisterClient):
(WebCore::MediaStreamFrameController::StreamClient::StreamClient):
(WebCore::MediaStreamFrameController::StreamClient::~StreamClient):
(WebCore::MediaStreamFrameController::StreamClient::isStream):
(WebCore::MediaStreamFrameController::StreamClient::unregister):
(WebCore::MediaStreamFrameController::IdGenerator::IdGenerator):
(WebCore::MediaStreamFrameController::IdGenerator::getNextId):
(WebCore::MediaStreamFrameController::ClientMapBase::ClientMapBase):
* page/Navigator.cpp:
(WebCore::Navigator::webkitGetUserMedia):
* page/NavigatorUserMediaErrorCallback.h:
2011-05-16 Pavel Podivilov <podivilov@chromium.org>
Reviewed by Yury Semikhatsky.
Web Inspector: debuggerWasEnabled notification should not be send to front-end on navigation.
https://bugs.webkit.org/show_bug.cgi?id=60888
* inspector/InspectorController.cpp:
(WebCore::InspectorController::disableDebugger):
* inspector/InspectorDebuggerAgent.cpp:
(WebCore::InspectorDebuggerAgent::enable):
(WebCore::InspectorDebuggerAgent::disable):
(WebCore::InspectorDebuggerAgent::restore):
(WebCore::InspectorDebuggerAgent::clearFrontend):
* inspector/InspectorDebuggerAgent.h:
2011-05-16 Yury Semikhatsky <yurys@chromium.org>
Unreviewed. Windows build fix.
* inspector/InspectorConsoleInstrumentation.h:
(WebCore::InspectorInstrumentation::consoleMarkTimeline):
2011-05-16 Yury Semikhatsky <yurys@chromium.org>
Unreviewed. Build fix.
* inspector/InspectorInstrumentation.h:
(WebCore::InspectorInstrumentation::willStartWorkerContext):
2011-05-11 Yury Semikhatsky <yurys@chromium.org>
Reviewed by Pavel Feldman.
Web Inspector: use InstrumentingAgents to access agents from InspectorInstrumentation
https://bugs.webkit.org/show_bug.cgi?id=60624
InspectorInstrumentation retrieves inspector agents from corresponding InstrumentingAgents
instance. Each agent notifies InstrumentingAgents whenever it wants to receive notifications
about changes in WebCore.
* inspector/InspectorAgent.cpp:
(WebCore::InspectorAgent::InspectorAgent):
(WebCore::InspectorAgent::inspectedPageDestroyed):
* inspector/InspectorAgent.h:
* inspector/InspectorConsoleInstrumentation.h:
(WebCore::InspectorInstrumentation::addMessageToConsole):
(WebCore::InspectorInstrumentation::consoleCount):
(WebCore::InspectorInstrumentation::startConsoleTiming):
(WebCore::InspectorInstrumentation::stopConsoleTiming):
(WebCore::InspectorInstrumentation::consoleMarkTimeline):
(WebCore::InspectorInstrumentation::addStartProfilingMessageToConsole):
(WebCore::InspectorInstrumentation::addProfile):
(WebCore::InspectorInstrumentation::profilerEnabled):
(WebCore::InspectorInstrumentation::getCurrentUserInitiatedProfileName):
* inspector/InspectorController.cpp:
(WebCore::InspectorController::InspectorController):
(WebCore::InspectorController::inspectedPageDestroyed):
(WebCore::InspectorController::didClearWindowObjectInWorld):
(WebCore::InspectorController::inspectedPage):
* inspector/InspectorController.h:
* inspector/InspectorDatabaseInstrumentation.h: FAST_RETURN_IF_NO_FRONTENDS macros
is used for early return in common case when inspector is not opened. In this
case inspector instrumentation costs one additional check of a static field.
(WebCore::InspectorInstrumentation::didOpenDatabase):
* inspector/InspectorInstrumentation.cpp:
(WebCore::InspectorInstrumentation::instrumentingAgents):
(WebCore::InspectorInstrumentation::didClearWindowObjectInWorldImpl):
(WebCore::InspectorInstrumentation::inspectedPageDestroyedImpl):
(WebCore::InspectorInstrumentation::willInsertDOMNodeImpl):
(WebCore::InspectorInstrumentation::didInsertDOMNodeImpl):
(WebCore::InspectorInstrumentation::willRemoveDOMNodeImpl):
(WebCore::InspectorInstrumentation::didRemoveDOMNodeImpl):
(WebCore::InspectorInstrumentation::willModifyDOMAttrImpl):
(WebCore::InspectorInstrumentation::didModifyDOMAttrImpl):
(WebCore::InspectorInstrumentation::didInvalidateStyleAttrImpl):
(WebCore::InspectorInstrumentation::mouseDidMoveOverElementImpl):
(WebCore::InspectorInstrumentation::handleMousePressImpl):
(WebCore::InspectorInstrumentation::characterDataModifiedImpl):
(WebCore::InspectorInstrumentation::willSendXMLHttpRequestImpl):
(WebCore::InspectorInstrumentation::didScheduleResourceRequestImpl):
(WebCore::InspectorInstrumentation::didInstallTimerImpl):
(WebCore::InspectorInstrumentation::didRemoveTimerImpl):
(WebCore::InspectorInstrumentation::willCallFunctionImpl):
(WebCore::InspectorInstrumentation::willChangeXHRReadyStateImpl):
(WebCore::InspectorInstrumentation::willDispatchEventImpl):
(WebCore::InspectorInstrumentation::willDispatchEventOnWindowImpl):
(WebCore::InspectorInstrumentation::willEvaluateScriptImpl):
(WebCore::InspectorInstrumentation::willFireTimerImpl):
(WebCore::InspectorInstrumentation::willLayoutImpl):
(WebCore::InspectorInstrumentation::willLoadXHRImpl):
(WebCore::InspectorInstrumentation::willPaintImpl):
(WebCore::InspectorInstrumentation::willRecalculateStyleImpl):
(WebCore::InspectorInstrumentation::applyUserAgentOverrideImpl):
(WebCore::InspectorInstrumentation::willSendRequestImpl):
(WebCore::InspectorInstrumentation::continueAfterPingLoaderImpl):
(WebCore::InspectorInstrumentation::markResourceAsCachedImpl):
(WebCore::InspectorInstrumentation::didLoadResourceFromMemoryCacheImpl):
(WebCore::InspectorInstrumentation::willReceiveResourceDataImpl):
(WebCore::InspectorInstrumentation::willReceiveResourceResponseImpl):
(WebCore::InspectorInstrumentation::didReceiveResourceResponseImpl):
(WebCore::InspectorInstrumentation::didReceiveContentLengthImpl):
(WebCore::InspectorInstrumentation::didFinishLoadingImpl):
(WebCore::InspectorInstrumentation::didFailLoadingImpl):
(WebCore::InspectorInstrumentation::resourceRetrievedByXMLHttpRequestImpl):
(WebCore::InspectorInstrumentation::scriptImportedImpl):
(WebCore::InspectorInstrumentation::domContentLoadedEventFiredImpl):
(WebCore::InspectorInstrumentation::loadEventFiredImpl):
(WebCore::InspectorInstrumentation::frameDetachedFromParentImpl):
(WebCore::InspectorInstrumentation::didCommitLoadImpl):
(WebCore::InspectorInstrumentation::willWriteHTMLImpl):
(WebCore::InspectorInstrumentation::addMessageToConsoleImpl):
(WebCore::InspectorInstrumentation::consoleCountImpl):
(WebCore::InspectorInstrumentation::startConsoleTimingImpl):
(WebCore::InspectorInstrumentation::stopConsoleTimingImpl):
(WebCore::InspectorInstrumentation::consoleMarkTimelineImpl):
(WebCore::InspectorInstrumentation::addStartProfilingMessageToConsoleImpl):
(WebCore::InspectorInstrumentation::addProfileImpl):
(WebCore::InspectorInstrumentation::getCurrentUserInitiatedProfileNameImpl):
(WebCore::InspectorInstrumentation::profilerEnabledImpl):
(WebCore::InspectorInstrumentation::didOpenDatabaseImpl):
(WebCore::InspectorInstrumentation::didUseDOMStorageImpl):
(WebCore::InspectorInstrumentation::didStartWorkerContextImpl):
(WebCore::InspectorInstrumentation::didCreateWorkerImpl):
(WebCore::InspectorInstrumentation::didDestroyWorkerImpl):
(WebCore::InspectorInstrumentation::didCreateWebSocketImpl):
(WebCore::InspectorInstrumentation::willSendWebSocketHandshakeRequestImpl):
(WebCore::InspectorInstrumentation::didReceiveWebSocketHandshakeResponseImpl):
(WebCore::InspectorInstrumentation::didCloseWebSocketImpl):
(WebCore::InspectorInstrumentation::networkStateChangedImpl):
(WebCore::InspectorInstrumentation::updateApplicationCacheStatusImpl):
(WebCore::InspectorInstrumentation::hasFrontend):
(WebCore::InspectorInstrumentation::pauseOnNativeEventIfNeeded):
(WebCore::InspectorInstrumentation::cancelPauseOnNativeEvent):
(WebCore::InspectorInstrumentation::retrieveTimelineAgent):
* inspector/InspectorInstrumentation.h:
(WebCore::InspectorInstrumentation::bindInstrumentingAgents):
(WebCore::InspectorInstrumentation::unbindInstrumentingAgents):
(WebCore::InspectorInstrumentation::didClearWindowObjectInWorld):
(WebCore::InspectorInstrumentation::inspectedPageDestroyed):
(WebCore::InspectorInstrumentation::willInsertDOMNode):
(WebCore::InspectorInstrumentation::didInsertDOMNode):
(WebCore::InspectorInstrumentation::willRemoveDOMNode):
(WebCore::InspectorInstrumentation::willModifyDOMAttr):
(WebCore::InspectorInstrumentation::didModifyDOMAttr):
(WebCore::InspectorInstrumentation::didInvalidateStyleAttr):
(WebCore::InspectorInstrumentation::mouseDidMoveOverElement):
(WebCore::InspectorInstrumentation::handleMousePress):
(WebCore::InspectorInstrumentation::characterDataModified):
(WebCore::InspectorInstrumentation::willSendXMLHttpRequest):
(WebCore::InspectorInstrumentation::didScheduleResourceRequest):
(WebCore::InspectorInstrumentation::didInstallTimer):
(WebCore::InspectorInstrumentation::didRemoveTimer):
(WebCore::InspectorInstrumentation::willCallFunction):
(WebCore::InspectorInstrumentation::willChangeXHRReadyState):
(WebCore::InspectorInstrumentation::willDispatchEvent):
(WebCore::InspectorInstrumentation::willDispatchEventOnWindow):
(WebCore::InspectorInstrumentation::willEvaluateScript):
(WebCore::InspectorInstrumentation::willFireTimer):
(WebCore::InspectorInstrumentation::willLayout):
(WebCore::InspectorInstrumentation::willLoadXHR):
(WebCore::InspectorInstrumentation::willPaint):
(WebCore::InspectorInstrumentation::willRecalculateStyle):
(WebCore::InspectorInstrumentation::applyUserAgentOverride):
(WebCore::InspectorInstrumentation::willSendRequest):
(WebCore::InspectorInstrumentation::continueAfterPingLoader):
(WebCore::InspectorInstrumentation::markResourceAsCached):
(WebCore::InspectorInstrumentation::didLoadResourceFromMemoryCache):
(WebCore::InspectorInstrumentation::willReceiveResourceData):
(WebCore::InspectorInstrumentation::willReceiveResourceResponse):
(WebCore::InspectorInstrumentation::continueAfterXFrameOptionsDenied):
(WebCore::InspectorInstrumentation::continueWithPolicyDownload):
(WebCore::InspectorInstrumentation::continueWithPolicyIgnore):
(WebCore::InspectorInstrumentation::didReceiveContentLength):
(WebCore::InspectorInstrumentation::didFinishLoading):
(WebCore::InspectorInstrumentation::didFailLoading):
(WebCore::InspectorInstrumentation::resourceRetrievedByXMLHttpRequest):
(WebCore::InspectorInstrumentation::scriptImported):
(WebCore::InspectorInstrumentation::domContentLoadedEventFired):
(WebCore::InspectorInstrumentation::loadEventFired):
(WebCore::InspectorInstrumentation::frameDetachedFromParent):
(WebCore::InspectorInstrumentation::didCommitLoad):
(WebCore::InspectorInstrumentation::willWriteHTML):
(WebCore::InspectorInstrumentation::didUseDOMStorage):
(WebCore::InspectorInstrumentation::willStartWorkerContext):
(WebCore::InspectorInstrumentation::didStartWorkerContext):
(WebCore::InspectorInstrumentation::didCreateWorker):
(WebCore::InspectorInstrumentation::didDestroyWorker):
(WebCore::InspectorInstrumentation::didCreateWebSocket):
(WebCore::InspectorInstrumentation::willSendWebSocketHandshakeRequest):
(WebCore::InspectorInstrumentation::didReceiveWebSocketHandshakeResponse):
(WebCore::InspectorInstrumentation::didCloseWebSocket):
(WebCore::InspectorInstrumentation::networkStateChanged):
(WebCore::InspectorInstrumentation::updateApplicationCacheStatus):
(WebCore::InspectorInstrumentation::hasFrontend):
(WebCore::InspectorInstrumentation::instrumentingAgentsForContext):
(WebCore::InspectorInstrumentation::instrumentingAgentsForPage):
(WebCore::InspectorInstrumentation::instrumentingAgentsForFrame):
(WebCore::InspectorInstrumentation::instrumentingAgentsWithFrontendForFrame):
(WebCore::InspectorInstrumentation::instrumentingAgentsWithFrontendForPage):
(WebCore::InspectorInstrumentation::instrumentingAgentsWithFrontendForContext):
(WebCore::InspectorInstrumentation::instrumentingAgentsWithFrontendForDocument):
2011-05-16 Vsevolod Vlasov <vsevik@chromium.org>
Reviewed by Pavel Feldman.
Web Inspector: Move Resources Panel search to backend
https://bugs.webkit.org/show_bug.cgi?id=59596
* inspector/Inspector.json:
* inspector/InspectorPageAgent.cpp:
(WebCore::decodeMainResource):
(WebCore::InspectorPageAgent::resourceContent):
(WebCore::cachedResourcesForFrame):
(WebCore::InspectorPageAgent::getCookies):
(WebCore::InspectorPageAgent::deleteCookie):
(WebCore::createSearchRegexSource):
(WebCore::countRegularExpressionMatches):
(WebCore::buildObjectForSearchMatch):
(WebCore::InspectorPageAgent::searchInResources):
(WebCore::InspectorPageAgent::domContentEventFired):
(WebCore::InspectorPageAgent::loadEventFired):
(WebCore::InspectorPageAgent::frameNavigated):
(WebCore::InspectorPageAgent::frameDetached):
(WebCore::InspectorPageAgent::buildObjectForFrameTree):
* inspector/InspectorPageAgent.h:
* inspector/front-end/ResourcesPanel.js:
(WebInspector.ResourcesPanel.prototype._showResourceView):
(WebInspector.ResourcesPanel.prototype.performSearch.searchInEditedResource):
(WebInspector.ResourcesPanel.prototype.performSearch.callback):
(WebInspector.ResourcesPanel.prototype.performSearch):
(WebInspector.ResourcesPanel.prototype._ensureViewSearchPerformed):
(WebInspector.ResourcesPanel.prototype._showSearchResult.callback):
(WebInspector.ResourcesPanel.prototype._showSearchResult):
(WebInspector.ResourcesPanel.prototype._resetSearchResults):
(WebInspector.ResourcesPanel.prototype.searchCanceled):
(WebInspector.ResourcesPanel.prototype.jumpToNextSearchResult):
(WebInspector.ResourcesPanel.prototype.jumpToPreviousSearchResult):
(WebInspector.FrameTreeElement.prototype.resourceByURL):
(WebInspector.FrameResourceTreeElement.prototype._resetSearchResults):
(WebInspector.FrameResourceTreeElement.prototype.get searchMatchesCount):
(WebInspector.FrameResourceTreeElement.prototype.searchMatchesFound):
(WebInspector.ResourcesSearchController):
(WebInspector.ResourcesSearchController.prototype.nextSearchResult):
(WebInspector.ResourcesSearchController.prototype.previousSearchResult):
(WebInspector.ResourcesSearchController.prototype._searchResult):
(WebInspector.SearchResultsTreeElementsTraverser):
(WebInspector.SearchResultsTreeElementsTraverser.prototype.first):
(WebInspector.SearchResultsTreeElementsTraverser.prototype.last):
(WebInspector.SearchResultsTreeElementsTraverser.prototype.next):
(WebInspector.SearchResultsTreeElementsTraverser.prototype.previous):
(WebInspector.SearchResultsTreeElementsTraverser.prototype._traverseNext):
(WebInspector.SearchResultsTreeElementsTraverser.prototype._elementHasSearchResults):
(WebInspector.SearchResultsTreeElementsTraverser.prototype._traversePrevious):
(WebInspector.SearchResultsTreeElementsTraverser.prototype._lastTreeElement):
* inspector/front-end/SourceFrame.js:
(WebInspector.SourceFrame.createSearchRegex):
(WebInspector.SourceFrame.prototype.performSearch.doFindSearchMatches):
(WebInspector.SourceFrame.prototype.performSearch):
(WebInspector.SourceFrame.prototype.hasSearchResults):
(WebInspector.SourceFrame.prototype.jumpToFirstSearchResult):
(WebInspector.SourceFrame.prototype.jumpToLastSearchResult):
(WebInspector.SourceFrame.prototype.jumpToNextSearchResult):
(WebInspector.SourceFrame.prototype.jumpToPreviousSearchResult):
(WebInspector.SourceFrame.prototype.jumpToSearchResult):
(WebInspector.SourceFrame.prototype._collectRegexMatches):
* inspector/front-end/utilities.js:
():
2011-05-16 Andreas Kling <kling@webkit.org>
Reviewed by Darin Adler.
CSS: Fast path for 'px' lengths should be case-insensitive.
https://bugs.webkit.org/show_bug.cgi?id=60703
No new tests, this is an optimization that avoids creating
a full CSSParser to parse the value.
* css/CSSParser.cpp:
(WebCore::parseSimpleLengthValue):
2011-05-16 Naiem Shaik <naiem.shaik@gmail.com>
Reviewed by Adam Barth.
This is for fixing build break in webgl due to https://bugs.webkit.org/show_bug.cgi?id=59861
The bug raised for fixing this is https://bugs.webkit.org/show_bug.cgi?id=60867
No new tests. This does not change any functionality.
* platform/graphics/gtk/GraphicsContext3DGtk.cpp:
(WebCore::GraphicsContext3D::create):
* platform/graphics/gtk/GraphicsContext3DInternal.cpp:
(WebCore::GraphicsContext3DInternal::create):
* platform/graphics/gtk/GraphicsContext3DInternal.h:
2011-05-16 Pavel Feldman <pfeldman@chromium.org>
Reviewed by Yury Semikhatsky.
Web Inspector: parse edited attributes by means of InspectorDOMAgent.
https://bugs.webkit.org/show_bug.cgi?id=60807
This change moves attribute parsing from the front-end to the backend.
* inspector/InspectorDOMAgent.cpp:
(WebCore::InspectorDOMAgent::setAttribute):
* inspector/front-end/DOMAgent.js:
(WebInspector.DOMNode.prototype.setAttribute):
* inspector/front-end/ElementsTreeOutline.js:
(WebInspector.ElementsTreeElement.prototype._attributeEditingCommitted.moveToNextAttributeIfNeeded):
(WebInspector.ElementsTreeElement.prototype._attributeEditingCommitted):
2011-05-16 Nikolas Zimmermann <nzimmermann@rim.com>
Not reviewed.
Switch from Vector<UChar> to StringBuilder in dom/
https://bugs.webkit.org/show_bug.cgi?id=57843
Incorporate comment from Darin/Andreas.
* dom/DatasetDOMStringMap.cpp:
(WebCore::convertAttributeNameToPropertyName): Use 'character' local, instead of charaters[i].
(WebCore::convertPropertyNameToAttributeName): Ditto.
2011-05-16 Alexander Pavlov <apavlov@chromium.org>
Reviewed by Pavel Feldman.
Web Inspector: Fix SourceJavaScriptTokenizer keyword parsing
https://bugs.webkit.org/show_bug.cgi?id=60773
* inspector/front-end/SourceJavaScriptTokenizer.js:
(WebInspector.SourceJavaScriptTokenizer.prototype.nextToken):
* inspector/front-end/SourceJavaScriptTokenizer.re2js:
2011-05-16 Nikolas Zimmermann <nzimmermann@rim.com>
Reviewed by Darin Adler.
Switch from Vector<UChar> to StringBuilder in dom/
https://bugs.webkit.org/show_bug.cgi?id=57843
* dom/DatasetDOMStringMap.cpp:
(WebCore::convertAttributeNameToPropertyName):
(WebCore::convertPropertyNameToAttributeName):
* dom/Range.cpp:
(WebCore::Range::toString):
* dom/ScriptElement.cpp:
(WebCore::ScriptElement::scriptContent):
2011-05-05 Pavel Podivilov <podivilov@chromium.org>
Reviewed by Pavel Feldman.
Web Inspector: move double click handling from TextEditor to SourceFrame.
https://bugs.webkit.org/show_bug.cgi?id=60271
It is SourceFrame's responsibility to check if content is editable and
to configure TextEditor component (e.g. set editable range) when user
tries to initiate editing.
* inspector/front-end/ResourceView.js:
(WebInspector.ResourceSourceFrame.prototype.doubleClick):
(WebInspector.RevisionSourceFrame.prototype.doubleClick):
* inspector/front-end/SourceFrame.js:
(WebInspector.SourceFrame.prototype.beforeTextChanged):
(WebInspector.SourceFrame.prototype.afterTextChanged):
(WebInspector.SourceFrame.prototype.doubleClick):
(WebInspector.SourceFrame.prototype.commitEditing.didEditContent):
(WebInspector.SourceFrame.prototype.commitEditing):
(WebInspector.SourceFrame.prototype.cancelEditing):
(WebInspector.SourceFrame.prototype._setReadOnly):
* inspector/front-end/TextViewer.js:
(WebInspector.TextViewer.prototype.set readOnly):
(WebInspector.TextViewer.prototype._enterInternalTextChangeMode):
(WebInspector.TextViewer.prototype._exitInternalTextChangeMode):
(WebInspector.TextViewer.prototype._doubleClick):
(WebInspector.TextViewer.prototype._commitEditing):
(WebInspector.TextViewer.prototype._cancelEditing):
(WebInspector.TextViewerDelegate.prototype.doubleClick):
(WebInspector.TextViewerDelegate.prototype.beforeTextChanged):
(WebInspector.TextViewerDelegate.prototype.afterTextChanged):
2011-05-15 Robert Hogan <robert@webkit.org>
Reviewed by Yury Semikhatsky.
[Qt] Fix crash in inspector/console/console-long-eval-crash.html
https://bugs.webkit.org/show_bug.cgi?id=60858
The client may be gone when sendMessageToBackend() is called.
* inspector/InspectorFrontendHost.cpp:
(WebCore::InspectorFrontendHost::sendMessageToBackend):
2011-05-16 Nikolas Zimmermann <nzimmermann@rim.com>
Reviewed by Dirk Schulze.
Replace direct StringConcatenate usage, by using operator+ (again)
https://bugs.webkit.org/show_bug.cgi?id=60700
Remove makeString() usage everywhere, instead directly use operator+.
* accessibility/AccessibilityObject.cpp:
(WebCore::AccessibilityObject::listMarkerTextForNodeAndPosition):
* bindings/js/JSDOMWindowBase.cpp:
* bindings/js/ScriptDebugServer.cpp:
(WebCore::ScriptDebugServer::setBreakpoint):
* bindings/v8/V8Proxy.cpp:
(WebCore::V8Proxy::reportUnsafeAccessTo):
* css/CSSMutableStyleDeclaration.cpp:
(WebCore::CSSMutableStyleDeclaration::borderSpacingValue):
* dom/ExceptionBase.cpp:
(WebCore::ExceptionBase::ExceptionBase):
* dom/XMLDocumentParser.cpp:
(WebCore::XMLDocumentParser::handleError):
* html/FTPDirectoryDocument.cpp:
(WebCore::processFileDateString):
* inspector/CodeGeneratorInspector.pm:
* inspector/InspectorConsoleAgent.cpp:
(WebCore::InspectorConsoleAgent::count):
(WebCore::InspectorConsoleAgent::didReceiveResponse):
* inspector/InspectorDOMAgent.cpp:
* inspector/InspectorDOMDebuggerAgent.cpp:
(WebCore::InspectorDOMDebuggerAgent::pauseOnNativeEventIfNeeded):
* inspector/InspectorDebuggerAgent.cpp:
(WebCore::InspectorDebuggerAgent::setBreakpointByUrl):
(WebCore::InspectorDebuggerAgent::setBreakpoint):
* loader/FrameLoader.cpp:
(WebCore::FrameLoader::checkIfDisplayInsecureContent):
(WebCore::FrameLoader::checkIfRunInsecureContent):
(WebCore::FrameLoader::shouldAllowNavigation):
* loader/archive/cf/LegacyWebArchive.cpp:
(WebCore::LegacyWebArchive::createFromSelection):
* loader/cache/CachedResourceLoader.cpp:
(WebCore::CachedResourceLoader::printAccessDeniedMessage):
* page/ContentSecurityPolicy.cpp:
(WebCore::CSPDirective::CSPDirective):
(WebCore::ContentSecurityPolicy::checkSourceAndReportViolation):
* page/DOMWindow.cpp:
(WebCore::DOMWindow::postMessageTimerFired):
(WebCore::DOMWindow::crossDomainAccessErrorMessage):
* page/PageSerializer.cpp:
(WebCore::SerializerMarkupAccumulator::SerializerMarkupAccumulator):
(WebCore::SerializerMarkupAccumulator::appendElement):
(WebCore::PageSerializer::urlForBlankFrame):
* page/PrintContext.cpp:
(WebCore::PrintContext::pageProperty):
(WebCore::PrintContext::pageSizeAndMarginsInPixels):
* platform/efl/PlatformKeyboardEventEfl.cpp:
(WebCore::createKeyMap):
(WebCore::createWindowsKeyMap):
* platform/efl/RenderThemeEfl.cpp:
(WebCore::RenderThemeEfl::formatMediaControlsCurrentTime):
* platform/graphics/GraphicsLayer.cpp:
(WebCore::GraphicsLayer::animationNameForTransition):
* platform/graphics/brew/ImageBrew.cpp:
(WebCore::Image::loadPlatformResource):
* platform/graphics/ca/GraphicsLayerCA.cpp:
(WebCore::animationIdentifier):
* platform/graphics/cg/ImageBufferCG.cpp:
(WebCore::CGImageToDataURL):
* platform/graphics/gtk/ImageBufferGtk.cpp:
(WebCore::ImageBuffer::toDataURL):
* platform/graphics/haiku/ImageBufferHaiku.cpp:
(WebCore::ImageBuffer::toDataURL):
* platform/graphics/qt/ImageBufferQt.cpp:
(WebCore::ImageBuffer::toDataURL):
* platform/graphics/skia/ImageBufferSkia.cpp:
(WebCore::ImageToDataURL):
* platform/network/CredentialStorage.cpp:
(WebCore::originStringFromURL):
* platform/network/cf/SocketStreamHandleCFNet.cpp:
(WebCore::SocketStreamHandle::reportErrorToClient):
* platform/sql/SQLiteDatabase.cpp:
(WebCore::SQLiteDatabase::setSynchronous):
* platform/text/wince/TextCodecWinCE.cpp:
(WebCore::LanguageManager::LanguageManager):
* platform/win/ClipboardUtilitiesWin.cpp:
* platform/win/ClipboardWin.cpp:
(WebCore::ClipboardWin::writeURL):
* platform/win/FileSystemWin.cpp:
(WebCore::listDirectory):
* platform/win/LanguageWin.cpp:
(WebCore::platformDefaultLanguage):
* platform/win/PathWalker.cpp:
(WebCore::PathWalker::PathWalker):
* platform/win/SystemInfo.cpp:
(WebCore::osVersionForUAString):
(WebCore::windowsVersionForUAString):
* plugins/PluginStream.cpp:
(WebCore::PluginStream::startStream):
* svg/SVGAngle.cpp:
(WebCore::SVGAngle::valueAsString):
* svg/SVGLength.cpp:
(WebCore::SVGLength::valueAsString):
* svg/SVGPaint.cpp:
(WebCore::SVGPaint::cssText):
* svg/SVGPointList.cpp:
(WebCore::SVGPointList::valueAsString):
* svg/SVGPreserveAspectRatio.cpp:
(WebCore::SVGPreserveAspectRatio::valueAsString):
* svg/SVGTransform.cpp:
(WebCore::SVGTransform::valueAsString):
* svg/SVGTransformList.cpp:
* svg/SVGUseElement.cpp:
(WebCore::dumpInstanceTree):
* websockets/WebSocket.cpp:
(WebCore::WebSocket::connect):
* websockets/WebSocketChannel.cpp:
(WebCore::WebSocketChannel::didFail):
(WebCore::WebSocketChannel::appendToBuffer):
* websockets/WebSocketHandshake.cpp:
(WebCore::WebSocketHandshake::readServerHandshake):
2011-05-12 Yury Semikhatsky <yurys@chromium.org>
Reviewed by Pavel Feldman.
Web Inspector: inspector console should be searchable
https://bugs.webkit.org/show_bug.cgi?id=60711
Search now works for Console panel. It shows number of matching console entries
and allows to jump to the next matching console entry. Also the matches count
is dynamically updated when new messages are added to the console.
ResourceTreeModel and DebuggerPresentationModel now listen to console events instead
of being called directly from ConsoleView.
* inspector/front-end/ConsolePanel.js:
(WebInspector.ConsolePanel):
(WebInspector.ConsolePanel.prototype.show):
(WebInspector.ConsolePanel.prototype.hide):
(WebInspector.ConsolePanel.prototype.searchCanceled):
(WebInspector.ConsolePanel.prototype.performSearch):
(WebInspector.ConsolePanel.prototype.jumpToNextSearchResult):
(WebInspector.ConsolePanel.prototype.jumpToPreviousSearchResult):
(WebInspector.ConsolePanel.prototype._clearCurrentSearchResultHighlight):
(WebInspector.ConsolePanel.prototype._jumpToSearchResult):
(WebInspector.ConsolePanel.prototype._consoleMessageAdded):
(WebInspector.ConsolePanel.prototype._consoleCleared):
* inspector/front-end/ConsoleView.js:
(WebInspector.ConsoleView.prototype.addMessage):
(WebInspector.ConsoleView.prototype.clearMessages):
(WebInspector.ConsoleMessage.prototype.clearHighlight):
(WebInspector.ConsoleMessage.prototype.highlightSearchResults):
(WebInspector.ConsoleMessage.prototype.matchesRegex):
(WebInspector.ConsoleMessage.prototype.toMessageElement):
(WebInspector.ConsoleCommand.prototype.clearHighlight):
(WebInspector.ConsoleCommand.prototype.highlightSearchResults):
(WebInspector.ConsoleCommand.prototype.matchesRegex):
(WebInspector.ConsoleCommand.prototype.toMessageElement):
(WebInspector.ConsoleCommand.prototype._formatCommand):
* inspector/front-end/DebuggerPresentationModel.js:
(WebInspector.DebuggerPresentationModel):
(WebInspector.DebuggerPresentationModel.prototype.setFormatSourceFiles):
(WebInspector.DebuggerPresentationModel.prototype._consoleMessageAdded):
(WebInspector.DebuggerPresentationModel.prototype._consoleCleared):
* inspector/front-end/ResourceTreeModel.js:
(WebInspector.ResourceTreeModel):
(WebInspector.ResourceTreeModel.prototype._consoleMessageAdded):
* inspector/front-end/ScriptsPanel.js:
(WebInspector.ScriptsPanel):
(WebInspector.ScriptsPanel.prototype._consoleMessagesCleared):
* inspector/front-end/utilities.js:
():
2011-05-16 Adam Barth <abarth@webkit.org>
[Qt] QtPlatformPlugin create methods should use PassOwnPtr
https://bugs.webkit.org/show_bug.cgi?id=60873
* plugins/qt/PluginViewQt.cpp:
(WebCore::PluginView::platformStart):
2011-05-15 Adam Barth <abarth@webkit.org>
Attempt to fix Qt build. (Strict PassOwnPtr fix.)
* platform/graphics/qt/GraphicsLayerQt.cpp:
(WebCore::GraphicsLayerQt::GraphicsLayerQt):
(WebCore::GraphicsLayer::create):
2011-05-15 Adam Barth <abarth@webkit.org>
Attempt to fix Qt build. (Strict PassOwnPtr fix.)
* platform/text/qt/TextCodecQt.cpp:
(WebCore::newTextCodecQt):
2011-05-15 Adam Barth <abarth@webkit.org>
Attempt to fix Qt build. (Strict PassOwnPtr fix.)
* platform/network/qt/QNetworkReplyHandler.cpp:
(WebCore::QNetworkReplyWrapper::release):
(WebCore::QNetworkReplyWrapper::receiveMetaData):
(WebCore::QNetworkReplyWrapper::receiveSniffedMIMEType):
(WebCore::QNetworkReplyHandler::release):
(WebCore::QNetworkReplyHandler::finish):
(WebCore::QNetworkReplyHandler::redirect):
(WebCore::QNetworkReplyHandler::start):
2011-05-15 Adam Barth <abarth@webkit.org>
Attempt to fix Qt build. (Strict PassOwnPtr fix.)
* dom/XMLDocumentParserQt.cpp:
(WebCore::XMLDocumentParser::doEnd):
2011-05-15 Kenichi Ishibashi <bashi@chromium.org>
Reviewed by Kent Tamura.
<output>, <meter> and <progress> elements with display:block can be focused if you try to tab to it
https://bugs.webkit.org/show_bug.cgi?id=60602
HTMLFormControlElement::isFocusable() returns true when the element is
visible as a block element. However, for output, meter, and progress
elements, the function should not return true unless they have
tabindex attributes. Override supportsFocus() of these elements to
apply the result of Node::supportsFocus() because it takes care of
whether the element has tabindex or not.
Test: fast/forms/focus-with-display-block.html
* html/HTMLFormControlElement.h: Made supportsFocus() protected.
* html/HTMLMeterElement.cpp:
(WebCore::HTMLMeterElement::supportsFocus): Added.
* html/HTMLMeterElement.h:
* html/HTMLOutputElement.cpp:
(WebCore::HTMLOutputElement::supportsFocus): Added.
* html/HTMLOutputElement.h:
* html/HTMLProgressElement.cpp:
(WebCore::HTMLProgressElement::supportsFocus): Added.
* html/HTMLProgressElement.h:
2011-05-15 Jon Lee <jonlee@apple.com>
Reviewed by Dan Bernstein.
Missing migration from Editor::TextCheckingOptions to TextCheckingType in SpellingCorrectionController.cpp
https://bugs.webkit.org/show_bug.cgi?id=60870
* editing/SpellingCorrectionController.cpp:
(WebCore::SpellingCorrectionController::correctionPanelTimerFired): Migrating to using TextCheckingType
2011-05-15 Geoffrey Garen <ggaren@apple.com>
Reviewed by Gavin Barraclough.
https://bugs.webkit.org/show_bug.cgi?id=59699
Global object is recreated on teardown, for no good reason
(Another partial fix for <rdar://problem/9417875> REGRESSION: SunSpider
~7% slower in browser than on command line (was 17%))
I'm basically rolling out http://trac.webkit.org/changeset/49786 because
(a) it created this performance problem
and
(b) a more complete fix, which obsoletes http://trac.webkit.org/changeset/49786,
was committed in http://trac.webkit.org/changeset/53439.
Tested with the file attached to https://bugs.webkit.org/show_bug.cgi?id=29832.
* page/Frame.cpp:
(WebCore::Frame::~Frame): Don't create a new window every time we destroy
a frame.
2011-05-12 MORITA Hajime <morrita@google.com>
ShadowContentElement should affect the order of renderer children
https://bugs.webkit.org/show_bug.cgi?id=59157
Introduced ShadowContentSelector to collect and forward content
children for each ShadowContentElement. ShadowRoot collects child
nodes of its host (we call these children "content children"), and
the descendant ShadowContentElement pulls that these content
children and put it under its child during
ShadowContentElement::attach().
Content children no longer create its renderer during its normal
attach() phase (called "light" phase). And they create it during
attach() as a content children instead (called "forwarded phase").
These phases are detected by NodeRendererFactory and represented
as NodeRendererFactory::AttachPhase value AttachContentLight and
AttachContentForwarded.
Tests: fast/html/details-add-details-child-1.html
fast/html/details-add-details-child-2.html
fast/html/details-nested-1.html
fast/html/details-nested-2.html
* dom/Element.cpp:
(WebCore::Element::attach):
(WebCore::Element::childrenChanged):
* dom/Node.cpp:
(WebCore::NodeRendererFactory::NodeRendererFactory):
(WebCore::NodeRendererFactory::shouldCreateRenderer):
(WebCore::NodeRendererFactory::nextRenderer):
(WebCore::NodeRendererFactory::createRendererIfNeeded):
* dom/ShadowRoot.cpp:
(WebCore::forceReattach):
(WebCore::ShadowContentSelector::shadowRoot):
(WebCore::ShadowContentSelector::activeElement):
(WebCore::ShadowContentSelector::currentInstance):
(WebCore::ShadowContentSelector::ShadowContentSelector):
(WebCore::ShadowContentSelector::~ShadowContentSelector):
(WebCore::ShadowContentSelector::attachChildrenFor):
(WebCore::ShadowContentElement::attach):
(WebCore::ShadowRoot::recalcStyle):
(WebCore::ShadowRoot::activeContentContainer):
(WebCore::ShadowRoot::hostChildrenChanged):
(WebCore::ShadowRoot::attach):
* dom/ShadowRoot.h:
* html/shadow/ShadowContentElement.h:
(WebCore::ShadowContentElement::rendererIsNeeded):
* rendering/RenderDetails.cpp:
* rendering/RenderDetails.h:
2011-05-13 MORITA Hajime <morrita@google.com>
Reviewed by Ryosuke Niwa.
Refactoring: Editor::TextCheckingOptions should be replaced with TextCheckingType
https://bugs.webkit.org/show_bug.cgi?id=57088
Removed Editor::TextCheckingOptions and replaced it with TextCheckingTypeMask
No new tests, no behavior change.
* editing/Editor.cpp:
(WebCore::Editor::replaceSelectionWithFragment):
(WebCore::Editor::markMisspellingsAfterTypingToWord):
(WebCore::Editor::markAllMisspellingsAndBadGrammarInRanges):
(WebCore::Editor::markMisspellingsAndBadGrammar):
(WebCore::Editor::resolveTextCheckingTypeMask):
* editing/Editor.h:
* platform/text/TextChecking.h: Added TextCheckingTypeShowCorrectionPanel
2011-05-15 Ilya Tikhonovsky <loislo@chromium.org>
Reviewed by Yury Semikhatsky.
Web Inspector: chromium renderer crash at eval in console.
https://bugs.webkit.org/show_bug.cgi?id=60616
Renderer of inspected page is crashing when modal dialog
has been opened via console eval and page is reloaded.
Test: inspector/console/console-long-eval-crash.html
* inspector/CodeGeneratorInspector.pm:
* inspector/InspectorController.cpp:
(WebCore::InspectorController::connectFrontend):
(WebCore::InspectorController::dispatchMessageFromFrontend):
* inspector/InspectorController.h:
2011-05-15 Eric Carlson <eric.carlson@apple.com>
Reviewed by Maciej Stachowiak.
Use new AVAssetReferenceRestrictions to prevent cross site media references
https://bugs.webkit.org/show_bug.cgi?id=60791
<rdar://problem/9374202>
Test: http/tests/media/video-cross-site.html
* platform/graphics/avfoundation/MediaPlayerPrivateAVFoundationObjC.mm:
(WebCore::MediaPlayerPrivateAVFoundationObjC::createAVAssetForURL): Set restriction
to prevent cross-domain references from being followed.
2011-05-15 Arno Renevier <arno@renevier.net>
Reviewed by Darin Adler.
remove unecessary includes from Source/WebCore/html/HTMLFrameElementBase.cpp
https://bugs.webkit.org/show_bug.cgi?id=60775
No new tests. This change only impacts compilation.
* html/HTMLFrameElementBase.cpp:
2011-05-14 Malcolm MacLeod <malcolm.macleod@tshwanedje.com>
Reviewed by Kevin Ollivier.
[wx] Fix strokeArc and fillRoundedRect drawing, and add clipPath support.
https://bugs.webkit.org/show_bug.cgi?id=60847
* platform/graphics/wx/GraphicsContextWx.cpp:
(WebCore::GraphicsContext::strokeArc):
(WebCore::GraphicsContext::clipConvexPolygon):
(WebCore::GraphicsContext::fillRoundedRect):
(WebCore::GraphicsContext::drawFocusRing):
(WebCore::GraphicsContext::clipOut):
(WebCore::GraphicsContext::clipPath):
(WebCore::GraphicsContext::clip):
(WebCore::GraphicsContext::addInnerRoundedRectClip):
2011-05-14 Eric Carlson <eric.carlson@apple.com>
Reviewed by Dan Bernstein.
HTTP video-on-demand streams frequently have live stream UI
https://bugs.webkit.org/show_bug.cgi?id=60849
<rdar://problem/9440502>
No new tests, we don't currently have tests for http live streams. Changes verified manually.
* html/HTMLMediaElement.cpp:
(WebCore::HTMLMediaElement::mediaPlayerDurationChanged): Reset the media controls so
a duration change which identifies a format will be picked up.
(WebCore::HTMLMediaElement::mediaPlayerCharacteristicChanged): New, reset media controls
so they can be reconfigured for the media file characteristics.
* html/HTMLMediaElement.h:
* platform/graphics/MediaPlayer.cpp:
(WebCore::MediaPlayer::characteristicChanged): New, pass through to the element.
* platform/graphics/MediaPlayer.h:
(WebCore::MediaPlayerClient::mediaPlayerCharacteristicChanged):
* platform/graphics/avfoundation/MediaPlayerPrivateAVFoundation.cpp:
(WebCore::MediaPlayerPrivateAVFoundation::setHasVideo): Call characteristicChanged when
setting changes.
(WebCore::MediaPlayerPrivateAVFoundation::setHasAudio): Ditto.
(WebCore::MediaPlayerPrivateAVFoundation::setHasClosedCaptions): Ditto.
(WebCore::MediaPlayerPrivateAVFoundation::loadedTimeRangesChanged): Move the duration
change notification logic to invalidateCachedDuration.
(WebCore::MediaPlayerPrivateAVFoundation::invalidateCachedDuration): New, invalidate
the cached duration and notify the element when it changes.
(WebCore::MediaPlayerPrivateAVFoundation::dispatchNotification): Call invalidateCachedDuration
for the DurationChanged notification.
* platform/graphics/avfoundation/MediaPlayerPrivateAVFoundation.h: Define DurationChanged.
* platform/graphics/avfoundation/MediaPlayerPrivateAVFoundationObjC.mm:
(WebCore::MediaPlayerPrivateAVFoundationObjC::platformDuration): Don't check asset or
item duration until they have been loaded.
(WebCore::itemKVOProperties): Listen for duration change.
(-[WebCoreAVFMovieObserver observeValueForKeyPath:ofObject:change:context:]): Deal with
duration change notification.
2011-05-14 Abhishek Arya <inferno@chromium.org>
Reviewed by Dan Bernstein.
As per spec, only allow one font family name in a font face rule.
Other things like initial value, inherited value or multiple names
are discarded.
https://bugs.webkit.org/show_bug.cgi?id=60837
Test: fast/css/invalid-font-family-in-font-face-crash.html
* css/CSSParser.cpp:
(WebCore::CSSParser::createFontFaceRule):
2011-05-13 Oliver Hunt <oliver@apple.com>
Reviewed by Geoffrey Garen.
Make GC validation more aggressive
https://bugs.webkit.org/show_bug.cgi?id=60802
This makes GC_VALIDATION much more aggressive in webcore,
adding logic to every visitChildren method to ensure that
the structure still has correct flags.
Additionally every function generated for the dom bindings
makes use of the new GC_VALIDATION object assertions to further
ensure that the object appears to be sensible.
* bindings/js/JSAttrCustom.cpp:
(WebCore::JSAttr::visitChildren):
* bindings/js/JSAudioContextCustom.cpp:
(WebCore::JSAudioContext::visitChildren):
* bindings/js/JSCSSRuleCustom.cpp:
(WebCore::JSCSSRule::visitChildren):
* bindings/js/JSCSSStyleDeclarationCustom.cpp:
(WebCore::JSCSSStyleDeclaration::visitChildren):
* bindings/js/JSCanvasRenderingContextCustom.cpp:
(WebCore::JSCanvasRenderingContext::visitChildren):
* bindings/js/JSDOMGlobalObject.cpp:
(WebCore::JSDOMGlobalObject::visitChildren):
(WebCore::JSDOMGlobalObject::setInjectedScript):
* bindings/js/JSDOMWindowCustom.cpp:
(WebCore::JSDOMWindow::visitChildren):
* bindings/js/JSDOMWindowShell.cpp:
(WebCore::JSDOMWindowShell::visitChildren):
* bindings/js/JSEventListener.cpp:
(WebCore::JSEventListener::JSEventListener):
* bindings/js/JSEventListener.h:
(WebCore::JSEventListener::jsFunction):
* bindings/js/JSJavaScriptAudioNodeCustom.cpp:
(WebCore::JSJavaScriptAudioNode::visitChildren):
* bindings/js/JSMessageChannelCustom.cpp:
(WebCore::JSMessageChannel::visitChildren):
* bindings/js/JSMessagePortCustom.cpp:
(WebCore::JSMessagePort::visitChildren):
* bindings/js/JSNamedNodeMapCustom.cpp:
(WebCore::JSNamedNodeMap::visitChildren):
* bindings/js/JSNodeCustom.cpp:
(WebCore::JSNode::visitChildren):
* bindings/js/JSNodeFilterCustom.cpp:
(WebCore::JSNodeFilter::visitChildren):
* bindings/js/JSNodeIteratorCustom.cpp:
(WebCore::JSNodeIterator::visitChildren):
* bindings/js/JSSVGElementInstanceCustom.cpp:
(WebCore::JSSVGElementInstance::visitChildren):
* bindings/js/JSSharedWorkerCustom.cpp:
(WebCore::JSSharedWorker::visitChildren):
* bindings/js/JSStyleSheetCustom.cpp:
(WebCore::JSStyleSheet::visitChildren):
* bindings/js/JSTreeWalkerCustom.cpp:
(WebCore::JSTreeWalker::visitChildren):
* bindings/js/JSWebGLRenderingContextCustom.cpp:
(WebCore::JSWebGLRenderingContext::visitChildren):
* bindings/js/JSWorkerContextCustom.cpp:
(WebCore::JSWorkerContext::visitChildren):
* bindings/js/JSXMLHttpRequestCustom.cpp:
(WebCore::JSXMLHttpRequest::visitChildren):
* bindings/js/JSXPathResultCustom.cpp:
(WebCore::JSXPathResult::visitChildren):
* bindings/scripts/CodeGeneratorJS.pm:
2011-05-13 Oliver Hunt <oliver@apple.com>
Reviewed by Geoffrey Garen.
Make GC validation more aggressive
https://bugs.webkit.org/show_bug.cgi?id=60802
This makes GC_VALIDATION much more aggressive in webcore,
adding logic to every visitChildren method to ensure that
the structure still has correct flags.
Additionally every function generated for the dom bindings
makes use of the new GC_VALIDATION object assertions to further
ensure that the object appears to be sensible.
* bindings/js/JSAttrCustom.cpp:
(WebCore::JSAttr::visitChildren):
* bindings/js/JSAudioContextCustom.cpp:
(WebCore::JSAudioContext::visitChildren):
* bindings/js/JSCSSRuleCustom.cpp:
(WebCore::JSCSSRule::visitChildren):
* bindings/js/JSCSSStyleDeclarationCustom.cpp:
(WebCore::JSCSSStyleDeclaration::visitChildren):
* bindings/js/JSCanvasRenderingContextCustom.cpp:
(WebCore::JSCanvasRenderingContext::visitChildren):
* bindings/js/JSDOMGlobalObject.cpp:
(WebCore::JSDOMGlobalObject::visitChildren):
(WebCore::JSDOMGlobalObject::setInjectedScript):
* bindings/js/JSDOMWindowCustom.cpp:
(WebCore::JSDOMWindow::visitChildren):
* bindings/js/JSDOMWindowShell.cpp:
(WebCore::JSDOMWindowShell::visitChildren):
* bindings/js/JSEventListener.cpp:
(WebCore::JSEventListener::JSEventListener):
* bindings/js/JSEventListener.h:
(WebCore::JSEventListener::jsFunction):
* bindings/js/JSJavaScriptAudioNodeCustom.cpp:
(WebCore::JSJavaScriptAudioNode::visitChildren):
* bindings/js/JSMessageChannelCustom.cpp:
(WebCore::JSMessageChannel::visitChildren):
* bindings/js/JSMessagePortCustom.cpp:
(WebCore::JSMessagePort::visitChildren):
* bindings/js/JSNamedNodeMapCustom.cpp:
(WebCore::JSNamedNodeMap::visitChildren):
* bindings/js/JSNodeCustom.cpp:
(WebCore::JSNode::visitChildren):
* bindings/js/JSNodeFilterCustom.cpp:
(WebCore::JSNodeFilter::visitChildren):
* bindings/js/JSNodeIteratorCustom.cpp:
(WebCore::JSNodeIterator::visitChildren):
* bindings/js/JSSVGElementInstanceCustom.cpp:
(WebCore::JSSVGElementInstance::visitChildren):
* bindings/js/JSSharedWorkerCustom.cpp:
(WebCore::JSSharedWorker::visitChildren):
* bindings/js/JSStyleSheetCustom.cpp:
(WebCore::JSStyleSheet::visitChildren):
* bindings/js/JSTreeWalkerCustom.cpp:
(WebCore::JSTreeWalker::visitChildren):
* bindings/js/JSWebGLRenderingContextCustom.cpp:
(WebCore::JSWebGLRenderingContext::visitChildren):
* bindings/js/JSWorkerContextCustom.cpp:
(WebCore::JSWorkerContext::visitChildren):
* bindings/js/JSXMLHttpRequestCustom.cpp:
(WebCore::JSXMLHttpRequest::visitChildren):
* bindings/js/JSXPathResultCustom.cpp:
(WebCore::JSXPathResult::visitChildren):
* bindings/scripts/CodeGeneratorJS.pm:
2011-05-14 Oliver Hunt <oliver@apple.com>
Reviewed by Anders Carlsson.
Make Qt bindings GC safe
https://bugs.webkit.org/show_bug.cgi?id=60841
Trying to do cache management by using "this" as a key from a GC
object's destructor leads to a violation of GC semantics. Make
the qt bindings use a Weak<> handle for finalization.
* bridge/qt/qt_runtime.cpp:
(JSC::Bindings::QtRuntimeMethod::QtRuntimeMethod):
(JSC::Bindings::QtRuntimeMethod::~QtRuntimeMethod):
* bridge/qt/qt_runtime.h:
(JSC::Bindings::QtRuntimeMethodData::finalize):
2011-05-14 Ryosuke Niwa <rniwa@webkit.org>
Reviewed by Eric Seidel.
Make canHaveChildrenForEditing more efficient
https://bugs.webkit.org/show_bug.cgi?id=53564
Improved the performance (1-2% in release and 20% in debug) by adding virtual member function
canContainRangeEndPoint to Node. It returns true whenever the associated node can have be a container
node for a position.
As of this revision, canContainRangeEndPoint returns true on Document, DocumentFragment, Text nodes
and any elements except:
HTML: applet, br, embed, frame, frameset, hr (unless has children), img, input, keygen,
meter, object (unless uses fallback content), output, progress, select, and textarea.
No new tests are added since this change cannot be tested directly.
* dom/Document.h:
(WebCore::Document::canContainRangeEndPoint): Added; returns false.
* dom/DocumentFragment.h:
(WebCore::DocumentFragment::canContainRangeEndPoint): Added; returns true.
* dom/Element.h:
(WebCore::Element::canContainRangeEndPoint): Ditto.
* dom/Node.h:
(WebCore::Node::canContainRangeEndPoint): Added; returns false.
* dom/Text.h:
(WebCore::Text::canContainRangeEndPoint): Added; returns true.
* editing/htmlediting.cpp: Removed editingIgnoresContent and canHaveChildrenForEditing.
* editing/htmlediting.h:
(WebCore::editingIgnoresContent): Moved from htmlediting.cpp; made it inline.
(WebCore::canHaveChildrenForEditing): Ditto.
* html/HTMLBRElement.h:
(WebCore::HTMLBRElement::canContainRangeEndPoint): Added; returns false.
* html/HTMLButtonElement.h:
(WebCore::HTMLDataGridElement::canContainRangeEndPoint): Ditto.
* html/HTMLFormControlElement.h:
(WebCore::HTMLFormControlElementWithState::canContainRangeEndPoint): Ditto.
* html/HTMLFrameElementBase.h:
(WebCore::HTMLFrameElementBase::canContainRangeEndPoint): Ditto.
* html/HTMLImageElement.h:
(WebCore::HTMLImageElement::canContainRangeEndPoint): Ditto.
* html/HTMLMeterElement.h:
(WebCore::HTMLMeterElement::canContainRangeEndPoint): Ditto.
* html/HTMLOutputElement.h:
(WebCore::HTMLOutputElement::canContainRangeEndPoint): Ditto.
* html/HTMLPlugInElement.h:
(WebCore::HTMLPlugInElement::canContainRangeEndPoint): Ditto.
* html/HTMLProgressElement.h:
(WebCore::HTMLProgressElement::canContainRangeEndPoint): Ditto.
* html/HTMLHRElement.h:
(WebCore::HTMLHRElement::canContainRangeEndPoint): Added; returns true iff it has children.
* html/HTMLObjectElement.h:
(WebCore::HTMLObjectElement::canContainRangeEndPoint): Added; returns true iff it uses fallback
content.
2011-05-14 Jeremy Noble <jer.noble@apple.com>
Reviewed by Darin Adler.
Exiting full screen causes <video> element inline controls to become visible
https://bugs.webkit.org/show_bug.cgi?id=60142
Create a queue of elements who must be targeted with webkitfullscreenchange events. Instead of dispatching
a single event with whatever the current value of m_fullScreenElement is (which may have been cleared, or
changed since the timer was asked to fire), dispatch one event for each entry in the queue.
Test: fullscreen/video-controls-override.html
* dom/Document.cpp:
(WebCore::Document::webkitDidEnterFullScreenForElement): Push current full screen element onto the
webkitfullscreenchange event delay queue.
(WebCore::Document::webkitDidExitFullScreenForElement): Ditto.
(WebCore::Document::fullScreenElementRemoved): Ditto.
(WebCore::Document::fullScreenChangeDelayTimerFired): Empty the queue, dispatching a
webkitfullscreenchange event for each entry.
* dom/Document.h:
2011-05-14 Patrick Gansterer <paroga@webkit.org>
Reviewed by Andreas Kling.
Buildfix for SharedTimerWx.cpp
https://bugs.webkit.org/show_bug.cgi?id=60829
* platform/wx/SharedTimerWx.cpp:
(WebCore::WebKitTimer::WebKitTimer):
We can't call the constructor of a base class in the body of the constructor.
2011-05-14 Patrick Gansterer <paroga@webkit.org>
Unreviewed WinCE build fix for r86477.
Remove the global namespace prefix from GlobalLock/GlobalUnlock.
* platform/win/ClipboardUtilitiesWin.cpp:
2011-05-14 Csaba Osztrogonác <ossy@webkit.org>
Unreviewed, rolling out r86469 and r86471, because they made hundreds tests crash on Qt.
Make GC validation more aggressive
https://bugs.webkit.org/show_bug.cgi?id=60802
* bindings/js/JSAttrCustom.cpp:
(WebCore::JSAttr::visitChildren):
* bindings/js/JSAudioContextCustom.cpp:
(WebCore::JSAudioContext::visitChildren):
* bindings/js/JSCSSRuleCustom.cpp:
(WebCore::JSCSSRule::visitChildren):
* bindings/js/JSCSSStyleDeclarationCustom.cpp:
(WebCore::JSCSSStyleDeclaration::visitChildren):
* bindings/js/JSCanvasRenderingContextCustom.cpp:
(WebCore::JSCanvasRenderingContext::visitChildren):
* bindings/js/JSDOMGlobalObject.cpp:
(WebCore::JSDOMGlobalObject::visitChildren):
(WebCore::JSDOMGlobalObject::setInjectedScript):
* bindings/js/JSDOMWindowCustom.cpp:
(WebCore::JSDOMWindow::visitChildren):
* bindings/js/JSDOMWindowShell.cpp:
(WebCore::JSDOMWindowShell::visitChildren):
* bindings/js/JSEventListener.cpp:
(WebCore::JSEventListener::JSEventListener):
* bindings/js/JSEventListener.h:
(WebCore::JSEventListener::jsFunction):
* bindings/js/JSJavaScriptAudioNodeCustom.cpp:
(WebCore::JSJavaScriptAudioNode::visitChildren):
* bindings/js/JSMessageChannelCustom.cpp:
(WebCore::JSMessageChannel::visitChildren):
* bindings/js/JSMessagePortCustom.cpp:
(WebCore::JSMessagePort::visitChildren):
* bindings/js/JSNamedNodeMapCustom.cpp:
(WebCore::JSNamedNodeMap::visitChildren):
* bindings/js/JSNodeCustom.cpp:
(WebCore::JSNode::visitChildren):
* bindings/js/JSNodeFilterCustom.cpp:
(WebCore::JSNodeFilter::visitChildren):
* bindings/js/JSNodeIteratorCustom.cpp:
(WebCore::JSNodeIterator::visitChildren):
* bindings/js/JSSVGElementInstanceCustom.cpp:
(WebCore::JSSVGElementInstance::visitChildren):
* bindings/js/JSSharedWorkerCustom.cpp:
(WebCore::JSSharedWorker::visitChildren):
* bindings/js/JSStyleSheetCustom.cpp:
(WebCore::JSStyleSheet::visitChildren):
* bindings/js/JSTreeWalkerCustom.cpp:
(WebCore::JSTreeWalker::visitChildren):
* bindings/js/JSWebGLRenderingContextCustom.cpp:
(WebCore::JSWebGLRenderingContext::visitChildren):
* bindings/js/JSWorkerContextCustom.cpp:
(WebCore::JSWorkerContext::visitChildren):
* bindings/js/JSXMLHttpRequestCustom.cpp:
(WebCore::JSXMLHttpRequest::visitChildren):
* bindings/js/JSXPathResultCustom.cpp:
(WebCore::JSXPathResult::visitChildren):
* bindings/scripts/CodeGeneratorJS.pm:
2011-05-13 Alexey Proskuryakov <ap@apple.com>
Reviewed by Darin Adler.
HTML5 Application Cache Update Failures on Page Refresh
https://bugs.webkit.org/show_bug.cgi?id=60598
<rdar://problem/9418639>
Test: http/tests/appcache/interrupted-update.html
The reason was two-fold:
1) Cache group state wasn't fully reset after a failed cache update (or an initial load).
2) The cache group is not deleted until after after the navigation (from autorelease pool),
so the failed and sorry old version was picked up by cache selection algorithm.
The latter is more of a surprising behavior than a problem in itself. Keeping an appcache in
memory for reload is generally a good thing for performance.
* loader/appcache/ApplicationCacheGroup.cpp:
(WebCore::ApplicationCacheGroup::stopLoading): Added a FIXME about half-baked state resetting
code that sent me looking for a wrong fix originally.
(WebCore::ApplicationCacheGroup::stopLoadingInFrame): Stopped load is an update failure like
any other, so we should call cacheUpdateFailed(), which knows how to reset state.
2011-05-13 Enrica Casucci <enrica@apple.com>
Reviewed by Darin Adler and Brian Weinstein.
REGRESSION (WK2): Can't drag and drop a link or image from Safari to Desktop
https://bugs.webkit.org/show_bug.cgi?id=60819
<rdar://problem/9370689>
To support drag-and-drop to the desktop and other windows applications,
we need to support the fileDescriptor and fileContentZero clipboard formats.
This patch adds the support for serializing these types across the process boundary.
It also fixes a regression introduced by r70914, that was causing the content of the
shortcut files to be corrupted. Using ascii() to convert from String to CString was
causing '\n' and '\r' to be replaced with '?'.
* platform/DragData.h:
* platform/win/ClipboardUtilitiesWin.cpp:
(WebCore::fileDescriptorFormat): Moved from ClipboardWin.cpp.
(WebCore::fileContentFormatZero): Moved from ClipboardWin.cpp.
(WebCore::getFileDescriptorData): Serialize FileDescriptor type.
(WebCore::getFileContentData): Serialize FileContent type.
(WebCore::setFileDescriptorData): Deserialize FileDescriptor type.
(WebCore::setFileContentData): Deserialize FileContent type.
(WebCore::setCFData): Added missing initialization of the tymed field
that was causing the cfHDrop format not to be deserialized correctly.
* platform/win/ClipboardUtilitiesWin.h:
* platform/win/ClipboardWin.cpp:
(WebCore::createGlobalHDropContent): Changed ascii() to latin1().
(WebCore::ClipboardWin::writeURL):
* platform/win/DragDataWin.cpp:
(WebCore::DragData::getDragFileDescriptorData):
(WebCore::DragData::getDragFileContentData):
2011-05-13 Daniel Cheng <dcheng@chromium.org>
Fix the build.
Add includes that the builders are suddenly complaining about...
* page/DragState.h:
2011-05-13 Daniel Cheng <dcheng@chromium.org>
Reviewed by Tony Chang.
Improve drag start logic
https://bugs.webkit.org/show_bug.cgi?id=59409
Rewrite and simplify the dragging logic to better match IE, Firefox, and the behavior
defined in the spec. Among other things:
- draggableNode() no longer returns text nodes when dragging anchors.
- When starting a drag over an image in a selection, prefer to drag the selection.
- Several redundant hit tests have been removed.
- Minor refactoring to make the logic easier to follow.
Test: platform/mac/editing/pasteboard/drag-selections-to-contenteditable.html
* WebCore.xcodeproj/project.pbxproj:
* page/DragController.cpp:
(WebCore::DragController::draggableNode):
(WebCore::DragController::startDrag):
* page/DragController.h:
* page/DragState.h:
(WebCore::DragState::shouldDispatchEvents):
* page/EventHandler.cpp:
(WebCore::EventHandler::EventHandler):
(WebCore::EventHandler::eventMayStartDrag):
(WebCore::EventHandler::updateDragSourceActionsAllowed):
(WebCore::EventHandler::updateDragAndDrop):
(WebCore::EventHandler::cancelDragAndDrop):
(WebCore::EventHandler::dragHysteresisExceeded):
(WebCore::EventHandler::dragSourceEndedAt):
(WebCore::ExactlyOneBitSet):
(WebCore::EventHandler::handleDrag):
* page/EventHandler.h:
2011-05-13 Oliver Hunt <oliver@apple.com>
Reviewed by Geoffrey Garen.
Make GC validation more aggressive
https://bugs.webkit.org/show_bug.cgi?id=60802
This makes GC_VALIDATION much more aggressive in webcore,
adding logic to every visitChildren method to ensure that
the structure still has correct flags.
Additionally every function generated for the dom bindings
makes use of the new GC_VALIDATION object assertions to further
ensure that the object appears to be sensible.
* bindings/js/JSAttrCustom.cpp:
(WebCore::JSAttr::visitChildren):
* bindings/js/JSAudioContextCustom.cpp:
(WebCore::JSAudioContext::visitChildren):
* bindings/js/JSCSSRuleCustom.cpp:
(WebCore::JSCSSRule::visitChildren):
* bindings/js/JSCSSStyleDeclarationCustom.cpp:
(WebCore::JSCSSStyleDeclaration::visitChildren):
* bindings/js/JSCanvasRenderingContextCustom.cpp:
(WebCore::JSCanvasRenderingContext::visitChildren):
* bindings/js/JSDOMGlobalObject.cpp:
(WebCore::JSDOMGlobalObject::visitChildren):
(WebCore::JSDOMGlobalObject::setInjectedScript):
* bindings/js/JSDOMWindowCustom.cpp:
(WebCore::JSDOMWindow::visitChildren):
* bindings/js/JSDOMWindowShell.cpp:
(WebCore::JSDOMWindowShell::visitChildren):
* bindings/js/JSEventListener.cpp:
(WebCore::JSEventListener::JSEventListener):
* bindings/js/JSEventListener.h:
(WebCore::JSEventListener::jsFunction):
* bindings/js/JSJavaScriptAudioNodeCustom.cpp:
(WebCore::JSJavaScriptAudioNode::visitChildren):
* bindings/js/JSMessageChannelCustom.cpp:
(WebCore::JSMessageChannel::visitChildren):
* bindings/js/JSMessagePortCustom.cpp:
(WebCore::JSMessagePort::visitChildren):
* bindings/js/JSNamedNodeMapCustom.cpp:
(WebCore::JSNamedNodeMap::visitChildren):
* bindings/js/JSNodeCustom.cpp:
(WebCore::JSNode::visitChildren):
* bindings/js/JSNodeFilterCustom.cpp:
(WebCore::JSNodeFilter::visitChildren):
* bindings/js/JSNodeIteratorCustom.cpp:
(WebCore::JSNodeIterator::visitChildren):
* bindings/js/JSSVGElementInstanceCustom.cpp:
(WebCore::JSSVGElementInstance::visitChildren):
* bindings/js/JSSharedWorkerCustom.cpp:
(WebCore::JSSharedWorker::visitChildren):
* bindings/js/JSStyleSheetCustom.cpp:
(WebCore::JSStyleSheet::visitChildren):
* bindings/js/JSTreeWalkerCustom.cpp:
(WebCore::JSTreeWalker::visitChildren):
* bindings/js/JSWebGLRenderingContextCustom.cpp:
(WebCore::JSWebGLRenderingContext::visitChildren):
* bindings/js/JSWorkerContextCustom.cpp:
(WebCore::JSWorkerContext::visitChildren):
* bindings/js/JSXMLHttpRequestCustom.cpp:
(WebCore::JSXMLHttpRequest::visitChildren):
* bindings/js/JSXPathResultCustom.cpp:
(WebCore::JSXPathResult::visitChildren):
* bindings/scripts/CodeGeneratorJS.pm:
2011-05-13 Mikhail Naganov <mnaganov@chromium.org>
Web Inspector: Unreviewed image glyph position fix in CSS after r85588.
* inspector/front-end/heapProfiler.css:
(.heapshot-help-status-bar-item .glyph):
2011-05-13 Adam Barth <abarth@webkit.org>
Reviewed by Eric Seidel.
iframe sandbox doesn't properly block popups
https://bugs.webkit.org/show_bug.cgi?id=60784
Previously, we weren't implementing this requirement from the spec:
"This flag also prevents content from creating new auxiliary browsing
contexts, e.g. using the target attribute or the window.open() method."
Tests: http/tests/security/no-popup-from-sandbox-top.html
http/tests/security/no-popup-from-sandbox.html
* loader/PolicyChecker.cpp:
(WebCore::PolicyChecker::checkNewWindowPolicy):
2011-05-13 Ryosuke Niwa <rniwa@webkit.org>
Reviewed by Darin Adler.
click event shouldn't fire when the target is ever removed in mouseup
https://bugs.webkit.org/show_bug.cgi?id=60600
Fixed the bug by invalidating m_clickNode when it or one of its ancestors has been removed
from the document. New behavior matches Internet Explorer and Firefox.
Tests: fast/events/remove-target-in-mouseup-deep.html
fast/events/remove-target-in-mouseup-insertback.html
fast/events/remove-target-in-mouseup-twice.html
fast/events/remove-target-in-mouseup.html
* dom/Document.cpp:
(WebCore::Document::nodeChildrenWillBeRemoved): Calls EventHandler::nodeWillBeRemoved.
(WebCore::Document::nodeWillBeRemoved): Calls EventHandler::nodeWillBeRemoved.
* page/EventHandler.cpp:
(WebCore::EventHandler::nodeWillBeRemoved): Added; invalidates m_clickNode when m_clickNode
or one of its ancestor is removed from the document.
* page/EventHandler.h:
2011-05-13 Alexey Proskuryakov <ap@apple.com>
Reviewed by Joseph Pecoraro.
Hide appcache status bar items
https://bugs.webkit.org/show_bug.cgi?id=60799
We have a number of non-trivial bugs that make these more misleading than helpful to developers.
* inspector/front-end/ApplicationCacheItemsView.js: (WebInspector.ApplicationCacheItemsView):
Just hide the items for now. Removing all support code would be complicated, and not helpful.
2011-05-13 Adam Barth <abarth@webkit.org>
Reviewed by Eric Seidel.
indexedDB is visible inside iframe sandbox
https://bugs.webkit.org/show_bug.cgi?id=60785
We're supposed to return a null indexedDB factory when inside an iframe
sandbox.
Test: http/tests/security/no-indexeddb-from-sandbox.html
* page/DOMWindow.cpp:
(WebCore::DOMWindow::webkitIndexedDB):
2011-05-13 Adam Roben <aroben@apple.com>
Fix manual tests that got broken by the move of WebCore into Source
* manual-tests/plugins/object-clipping.html:
* manual-tests/pointer-events.html:
* manual-tests/video-waiting-seeking.html:
Updated some paths.
2011-05-13 Nat Duca <nduca@chromium.org>
Reviewed by James Robinson.
[chromium] compositing tests are failing
https://bugs.webkit.org/show_bug.cgi?id=60738
Bind texture before setting its filtering state.
* platform/graphics/chromium/LayerTilerChromium.cpp:
(WebCore::LayerTilerChromium::updateFromPixels):
2011-05-13 Alexey Proskuryakov <ap@apple.com>
Reviewed by Dan Bernstein.
https://bugs.webkit.org/show_bug.cgi?id=60787
Add some assertions to ApplicationCacheGroup
* loader/appcache/ApplicationCacheGroup.cpp:
(WebCore::ApplicationCacheGroup::finishedLoadingMainResource): Check that count doesn't underflow.
(WebCore::ApplicationCacheGroup::failedLoadingMainResource): Ditto.
(WebCore::ApplicationCacheGroup::stopLoading): Check that we are the handle's client before
resetting it.
(WebCore::ApplicationCacheGroup::update): Check that there isn't a stale current handle or
resource hanging around.
(WebCore::ApplicationCacheGroup::didFail): Check that the handle is either manifest or current one.
2011-05-13 Sam Weinig <sam@webkit.org>
Reviewed by Anders Carlsson.
Prune #includes from FrameView.h (Part 2)
https://bugs.webkit.org/show_bug.cgi?id=60748
- Replace #includes in FrameView.h of Frame.h and Page.h
with Color.h, wtf/text/WTFString.h, and the new AdjustViewSizeOrNot.h
- Update files that were depending on FrameView.h #including Frame.h or
Page.h.
* GNUmakefile.list.am:
* WebCore.exp.in:
* WebCore.pro:
* WebCore.vcproj/WebCore.vcproj:
* WebCore.xcodeproj/project.pbxproj:
* accessibility/AccessibilityRenderObject.cpp:
* accessibility/AccessibilityScrollView.cpp:
* accessibility/chromium/AXObjectCacheChromium.cpp:
* accessibility/mac/AccessibilityObjectWrapper.mm:
* css/MediaQueryMatcher.cpp:
* dom/Range.cpp:
* editing/SpellingCorrectionController.cpp:
* history/CachedFrame.cpp:
* html/HTMLBodyElement.cpp:
* html/canvas/WebGLRenderingContext.cpp:
* html/parser/HTMLParserScheduler.cpp:
* page/AdjustViewSizeOrNot.h: Added.
* page/EditorClient.h:
* page/Frame.h:
* page/FrameView.cpp:
(WebCore::FrameView::forceLayoutForPagination):
* page/FrameView.h:
* page/PrintContext.cpp:
(WebCore::PrintContext::begin):
(WebCore::PrintContext::end):
* page/chromium/FrameChromium.cpp:
* page/win/FrameCGWin.cpp:
* page/win/FrameWin.cpp:
* platform/efl/PopupMenuEfl.cpp:
* platform/graphics/avfoundation/MediaPlayerPrivateAVFoundation.cpp:
* platform/graphics/mac/MediaPlayerPrivateQTKit.mm:
* platform/graphics/qt/MediaPlayerPrivateQt.cpp:
* platform/graphics/win/MediaPlayerPrivateQuickTimeVisualContext.cpp:
* platform/graphics/win/MediaPlayerPrivateQuickTimeWin.cpp:
* platform/gtk/WidgetGtk.cpp:
* plugins/IFrameShimSupport.cpp:
* rendering/RenderBlock.cpp:
* rendering/RenderBoxModelObject.cpp:
* rendering/RenderFrameBase.cpp:
* rendering/RenderIFrame.cpp:
* rendering/RenderMenuList.cpp:
* rendering/RenderTextControlSingleLine.cpp:
* rendering/RenderWidget.cpp:
* svg/SVGSVGElement.cpp:
2011-05-13 Levi Weintraub <leviw@chromium.org>
Reviewed by Eric Seidel.
Switch paintCollapsedBorder to use IntRect
https://bugs.webkit.org/show_bug.cgi?id=60739
Updating the last offending paint function that takes four ints
instead of an IntRect.
No new tests as this is simple refactoring.
* rendering/RenderTableCell.cpp:
(WebCore::RenderTableCell::paint):
(WebCore::RenderTableCell::paintCollapsedBorder):
* rendering/RenderTableCell.h:
2011-05-13 Abhishek Arya <inferno@chromium.org>
Reviewed by Dave Hyatt.
Regression(r75823): Revert initialization back to the first RenderBlock
in the parent chain.
https://bugs.webkit.org/show_bug.cgi?id=60780
Test: fast/block/float/float-not-removed-crash.html
* rendering/RenderBox.cpp:
(WebCore::RenderBox::removeFloatingOrPositionedChildFromBlockLists):
In r75823, I forgot to initialize parentBlock, when the original code
did and Hyatt did mention in c#5. Now, initializing parentBlock to the
first RenderBlock in the parent chain.
2011-05-05 Pavel Podivilov <podivilov@chromium.org>
Reviewed by Yury Semikhatsky.
Web Inspector: TextEditor should support editing a range.
https://bugs.webkit.org/show_bug.cgi?id=59688
* inspector/front-end/TextViewer.js:
(WebInspector.TextEditorChunkedPanel.prototype.makeLineAChunk):
(WebInspector.TextEditorChunkedPanel.prototype._splitChunkOnALine):
(WebInspector.TextEditorMainPanel.prototype.setEditableRange):
(WebInspector.TextEditorMainPanel.prototype.clearEditableRange):
(WebInspector.TextEditorMainPanel.prototype._splitChunkOnALine):
(WebInspector.TextEditorMainPanel.prototype._applyDomUpdates):
(WebInspector.TextEditorMainChunk):
(WebInspector.TextEditorMainChunk.prototype.set expanded):
(WebInspector.TextEditorMainChunk.prototype.set readOnly):
(WebInspector.TextEditorMainChunk.prototype.get readOnly):
(WebInspector.TextEditorMainChunk.prototype._updateElementReadOnlyState):
* inspector/front-end/textViewer.css:
(.text-editor-read-only):
2011-05-05 Pavel Podivilov <podivilov@chromium.org>
Reviewed by Yury Semikhatsky.
Web Inspector: fix source mapping for formatted scripts.
https://bugs.webkit.org/show_bug.cgi?id=60263
Source mapping is broken for script chunks that are already formatted at the beginning
and at the end of the script (see script-formatter.html).
* inspector/front-end/ScriptFormatter.js:
(WebInspector.ScriptFormatter.prototype._didFormatContent):
(WebInspector.FormattedSourceMapping):
(WebInspector.FormattedSourceMapping.prototype.originalToFormatted):
(WebInspector.FormattedSourceMapping.prototype.formattedToOriginal):
(WebInspector.FormattedSourceMapping.prototype._convertPosition):
* inspector/front-end/ScriptFormatterWorker.js:
(onmessage):
(HTMLScriptFormatter.prototype.format):
* inspector/front-end/SourceFile.js:
(WebInspector.FormattedSourceFile.prototype._didRequestContent):
(WebInspector.SourceMappingForFormattedSourceFile):
(WebInspector.SourceMappingForFormattedSourceFile.prototype.scriptLocationToSourceLine):
(WebInspector.SourceMappingForFormattedSourceFile.prototype.sourceLineToScriptLocation):
2011-05-13 Adam Roben <aroben@apple.com>
Tell ScrollView's child Widgets that their frame rects have changed when its own frame rect
changes
r79167 moved some code from setFrameRect to setBoundsSize, including a call to
frameRectsChanged. This was done because positionScrollbarLayers, which is called by
frameRectsChanged, only needs to be called when the bounds change, not when the frame rect
changes. But the recursive calls inside frameRectsChanged *do* need to be called when the
frame rect changes.
This patch moves the positionScrollbarLayers call out of frameRectsChanged, since it needs
to be called at different times from frameRectsChanged. Then it restores the
frameRectsChanged call to setFrameRect, which fixes the bug.
Test: platform/win/plugins/iframe-inside-overflow.html
Fixes <http://webkit.org/b/60194> <rdar://problem/9383760> REGRESSION (r79167): Windowed
plugins in Google Reader don't move when the article list is scrolled
Reviewed by Dan Bernstein.
* platform/ScrollView.cpp:
(WebCore::ScrollView::updateScrollbars): Added a positionScrollbarLayers call here now that
frameRectsChanged doesn't call it for us. Also added a FIXME because it seems strange to
call frameRectsChanged here when our frame rect hasn't changed.
(WebCore::ScrollView::setFrameRect): Added back the frameRectsChanged call that was removed
in r79167.
(WebCore::ScrollView::setBoundsSize): Replaced a frameRectsChanged call with a call to
positionScrollbarLayers. We were only calling frameRectsChanged here in order to get
positionScrollbarLayers to be called.
(WebCore::ScrollView::frameRectsChanged): Removed the call to positionScrollbarLayers. All
callers of frameRectsChanged have been updated to call positionScrollbarLayers if needed.
2011-05-13 Martin Robinson <mrobinson@igalia.com>
Reviewed by Eric Seidel.
[GTK] Share the GTK+ key binding code between WebKit1 and WebKit2
https://bugs.webkit.org/show_bug.cgi?id=59765
Move the keybinding code form WebKit1/WebKit2 to this utility class. This code is
almost directly moved from the WebKit layer.
No new tests. This is covered by the editing tests.
* GNUmakefile.list.am:
* platform/gtk/KeyBindingTranslator.cpp: Added.
(WebCore::backspaceCallback):Added.
(WebCore::selectAllCallback):Added.
(WebCore::cutClipboardCallback):Added.
(WebCore::copyClipboardCallback):Added.
(WebCore::pasteClipboardCallback):Added.
(WebCore::toggleOverwriteCallback):Added.
(WebCore::popupMenuCallback):Added.
(WebCore::showHelpCallback):Added.
(WebCore::deleteFromCursorCallback):Added.
(WebCore::moveCursorCallback):Added.
(WebCore::KeyBindingTranslator::KeyBindingTranslator):Added.
(WebCore::KeyBindingTranslator::getEditorCommandsForKeyEvent):Added.
* platform/gtk/KeyBindingTranslator.h: Added.
(WebCore::KeyBindingTranslator::addPendingEditorCommand):Added.
2011-05-01 Holger Hans Peter Freyther <holger@moiji-mobile.com>
Reviewed by Adam Barth.
[android] Forward declare types for PlatformWidget and DragImage
https://bugs.webkit.org/show_bug.cgi?id=59890
This is a simple build fix.
* platform/DragImage.h:
* platform/Widget.h:
2011-05-06 Pavel Podivilov <podivilov@chromium.org>
Reviewed by Yury Semikhatsky.
Web Inspector: fix incremental html highlight.
https://bugs.webkit.org/show_bug.cgi?id=60163
SourceTokenizers for html, js, and css are declared to be stateless. However they store some state in
various ways (like using _internalJavaScriptTokenizer field in html tokenizer, or modifying "static"
initialCondition object via condition link). This all worked because of another bug in tokenizers registry
that always returned new tokenizer object.
For incremental highlighting, we need to be able to stringify tokenizers state and then restore the
state from string. That's why we need tokenizers to be truly stateless.
* inspector/front-end/DOMSyntaxHighlighter.js:
(WebInspector.DOMSyntaxHighlighter.prototype.syntaxHighlightNode):
* inspector/front-end/SourceCSSTokenizer.js:
(WebInspector.SourceCSSTokenizer):
(WebInspector.SourceCSSTokenizer.prototype.createInitialCondition):
* inspector/front-end/SourceCSSTokenizer.re2js:
* inspector/front-end/SourceHTMLTokenizer.js:
(WebInspector.SourceHTMLTokenizer):
(WebInspector.SourceHTMLTokenizer.prototype.createInitialCondition):
(WebInspector.SourceHTMLTokenizer.prototype.set line):
(WebInspector.SourceHTMLTokenizer.prototype.get _internalJavaScriptTokenizer):
(WebInspector.SourceHTMLTokenizer.prototype.get _internalCSSTokenizer):
(WebInspector.SourceHTMLTokenizer.prototype.scriptStarted):
(WebInspector.SourceHTMLTokenizer.prototype.styleSheetStarted):
(WebInspector.SourceHTMLTokenizer.prototype.nextToken):
* inspector/front-end/SourceHTMLTokenizer.re2js:
* inspector/front-end/SourceJavaScriptTokenizer.js:
(WebInspector.SourceJavaScriptTokenizer):
(WebInspector.SourceJavaScriptTokenizer.prototype.createInitialCondition):
* inspector/front-end/SourceJavaScriptTokenizer.re2js:
* inspector/front-end/SourceTokenizer.js:
(WebInspector.SourceTokenizer.Registry.prototype.getTokenizer):
* inspector/front-end/TextEditorHighlighter.js:
(WebInspector.TextEditorHighlighter.prototype._highlightLines):
2011-05-13 Adam Roben <aroben@apple.com>
Build fix after r86418
* platform/graphics/avfoundation/MediaPlayerPrivateAVFoundationObjC.h:
Made the destructor public so that this class can be used with
[Pass]OwnPtr.
2011-05-11 Hans Wennborg <hans@chromium.org>
Reviewed by Tony Gentilcore.
IndexedDB: Fix integer comparison bug in LevelDB coding routines
https://bugs.webkit.org/show_bug.cgi?id=60623
Fix the code for comparing two int64_t variables.
Also remove faulty line in ObjectStoreNamesKey::encode which was
uncovered by the unit test in this patch.
Very hard to cover with layout tests; covered by unit test.
* storage/IDBLevelDBCoding.cpp:
(WebCore::IDBLevelDBCoding::compareInts):
(WebCore::IDBLevelDBCoding::KeyPrefix::compare):
(WebCore::IDBLevelDBCoding::DatabaseFreeListKey::compare):
(WebCore::IDBLevelDBCoding::ObjectStoreMetaDataKey::compare):
(WebCore::IDBLevelDBCoding::IndexMetaDataKey::compare):
(WebCore::IDBLevelDBCoding::ObjectStoreFreeListKey::compare):
(WebCore::IDBLevelDBCoding::IndexFreeListKey::compare):
(WebCore::IDBLevelDBCoding::ObjectStoreNamesKey::encode):
(WebCore::IDBLevelDBCoding::IndexNamesKey::compare):
(WebCore::IDBLevelDBCoding::IndexDataKey::compare):
2011-05-13 Andrew Wason <rectalogic@rectalogic.com>
Reviewed by Darin Adler.
GraphicsContext3DQt.cpp fails to compile
https://bugs.webkit.org/show_bug.cgi?id=60740
* platform/graphics/qt/GraphicsContext3DQt.cpp:
(WebCore::GraphicsContext3D::GraphicsContext3D):
Change order of initializers.
2011-05-05 Hans Wennborg <hans@chromium.org>
Reviewed by Steve Block.
IndexedDB: Transaction rollback prevented by open SQLite statement
https://bugs.webkit.org/show_bug.cgi?id=60032
Let the IDBTransactionbackendImpl keep track of all open cursors, and
"close" them (i.e. finalizing the underlying SQLiteStatement) before
committing or rolling back the transaction. This fixes the problem
with opened cursors preventing transaction rollback.
Test: storage/indexeddb/transaction-rollback.html
* storage/IDBBackingStore.h:
* storage/IDBCursorBackendImpl.cpp:
(WebCore::IDBCursorBackendImpl::IDBCursorBackendImpl):
(WebCore::IDBCursorBackendImpl::~IDBCursorBackendImpl):
(WebCore::IDBCursorBackendImpl::close):
* storage/IDBCursorBackendImpl.h:
* storage/IDBLevelDBBackingStore.cpp:
* storage/IDBSQLiteBackingStore.cpp:
* storage/IDBTransactionBackendImpl.cpp:
(WebCore::IDBTransactionBackendImpl::abort):
(WebCore::IDBTransactionBackendImpl::registerOpenCursor):
(WebCore::IDBTransactionBackendImpl::unregisterOpenCursor):
(WebCore::IDBTransactionBackendImpl::commit):
(WebCore::IDBTransactionBackendImpl::closeOpenCursors):
* storage/IDBTransactionBackendImpl.h:
* storage/IDBTransactionBackendInterface.h:
(WebCore::IDBTransactionBackendInterface::registerOpenCursor):
(WebCore::IDBTransactionBackendInterface::unregisterOpenCursor):
2011-05-13 Patrick Gansterer <paroga@webkit.org>
Reviewed by Adam Barth.
Enable OwnPtr strict mode in MediaPlayer
https://bugs.webkit.org/show_bug.cgi?id=59466
Let the CreateMediaEnginePlayer function return a PassOwnPtr instead of a raw pointer.
Also fix the templete argument of OwnPtr for the m_private member variable.
* platform/graphics/MediaPlayer.cpp:
(WebCore::MediaPlayer::MediaPlayer):
(WebCore::MediaPlayer::loadWithNextMediaEngine):
* platform/graphics/MediaPlayer.h:
* platform/graphics/avfoundation/MediaPlayerPrivateAVFoundationObjC.h:
* platform/graphics/avfoundation/MediaPlayerPrivateAVFoundationObjC.mm:
(WebCore::MediaPlayerPrivateAVFoundationObjC::create):
* platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:
(WebCore::MediaPlayerPrivateGStreamer::create):
* platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.h:
* platform/graphics/mac/MediaPlayerPrivateQTKit.h:
* platform/graphics/mac/MediaPlayerPrivateQTKit.mm:
(WebCore::MediaPlayerPrivateQTKit::create):
* platform/graphics/qt/MediaPlayerPrivatePhonon.cpp:
(WebCore::MediaPlayerPrivatePhonon::create):
* platform/graphics/qt/MediaPlayerPrivatePhonon.h:
* platform/graphics/qt/MediaPlayerPrivateQt.cpp:
(WebCore::MediaPlayerPrivateQt::create):
* platform/graphics/qt/MediaPlayerPrivateQt.h:
* platform/graphics/win/MediaPlayerPrivateQuickTimeVisualContext.cpp:
(WebCore::MediaPlayerPrivateQuickTimeVisualContext::create):
* platform/graphics/win/MediaPlayerPrivateQuickTimeVisualContext.h:
* platform/graphics/win/MediaPlayerPrivateQuickTimeWin.cpp:
(WebCore::MediaPlayerPrivate::create):
* platform/graphics/win/MediaPlayerPrivateQuickTimeWin.h:
* platform/graphics/wince/MediaPlayerPrivateWinCE.h:
2011-05-13 Alexey Proskuryakov <ap@apple.com>
Reviewed by Pavel Feldman.
Web Inspector: Show Error Messages for Application Cache Errors
https://bugs.webkit.org/show_bug.cgi?id=41642
* loader/appcache/ApplicationCacheGroup.cpp:
(WebCore::ApplicationCacheGroup::didReceiveResponse):
(WebCore::ApplicationCacheGroup::didFail):
(WebCore::ApplicationCacheGroup::didReceiveManifestResponse):
(WebCore::ApplicationCacheGroup::didFinishLoadingManifest):
(WebCore::ApplicationCacheGroup::cacheUpdateFailedDueToOriginQuota):
Added console error logging.
2011-05-12 Pratik Solanki <psolanki@apple.com>
Reviewed by Antti Koivisto.
Part of WebCore should use CFNetwork-based loader on Mac
https://bugs.webkit.org/show_bug.cgi?id=51836
Fixes for warnings and other minor cleanups when we enable USE_CFNETWORK on Mac.
* platform/network/cf/ResourceErrorCF.cpp:
(WebCore::ResourceError::cfStreamError):
* platform/network/cf/ResourceHandleCFNet.cpp:
(WebCore::allowsAnyHTTPSCertificateHosts):
(WebCore::clientCerts):
(WebCore::willSendRequest):
(WebCore::didReceiveResponse):
(WebCore::didReceiveData):
(WebCore::didSendBodyData):
(WebCore::shouldUseCredentialStorageCallback):
(WebCore::didFinishLoading):
(WebCore::didFail):
(WebCore::didReceiveChallenge):
(WebCore::makeFinalRequest):
(WebCore::ResourceHandle::willLoadFromCache):
2011-05-12 Pratik Solanki <psolanki@apple.com>
Reviewed by Antti Koivisto.
Part of WebCore should use CFNetwork-based loader on Mac
https://bugs.webkit.org/show_bug.cgi?id=51836
Implement ResourceHandle::schedule()/unschedule() based on CF for Mac.
* WebCore.exp.in:
* platform/cf/SchedulePair.h:
* platform/mac/SchedulePairMac.mm:
* platform/network/cf/ResourceHandleCFNet.cpp:
(WebCore::ResourceHandle::schedule):
(WebCore::ResourceHandle::unschedule):
2011-05-12 Pratik Solanki <psolanki@apple.com>
Reviewed by Antti Koivisto.
Part of WebCore should use CFNetwork-based loader on Mac
https://bugs.webkit.org/show_bug.cgi?id=51836
Implement mac specific Authentication functions when using CFNetwork.
* WebCore.exp.in:
* WebCore.xcodeproj/project.pbxproj:
* platform/network/ResourceHandle.h:
* platform/network/cf/AuthenticationCF.cpp:
(WebCore::AuthenticationChallenge::authenticationClient):
(WebCore::createCF):
(WebCore::core):
* platform/network/cf/AuthenticationCF.h:
* platform/network/cf/AuthenticationChallenge.h:
* platform/network/mac/AuthenticationMac.mm:
(WebCore::core):
(WebCore::mac):
* platform/network/mac/CredentialStorageMac.mm:
2011-05-12 Ben Wells <benwells@chromium.org>
Reviewed by Simon Fraser.
RGBA colors in outlines show overpainting at the corners
https://bugs.webkit.org/show_bug.cgi?id=58999
Added FIXMEs near temporary $if !USE(SKIA)s, referencing bug 60342.
* rendering/RenderInline.cpp:
(WebCore::RenderInline::paintOutline):
* rendering/RenderObject.cpp:
(WebCore::RenderObject::paintOutline):
2011-05-12 Adele Peterson <adele@apple.com>
Reviewed by Darin Adler and Adam Barth.
Fix for <rdar://problem/9253454> Solar Walk For Mac: Info window is blank (HTML5 parser)
https://bugs.webkit.org/show_bug.cgi?id=60685
Detect the Solar Walk application so we can add targeted parser quirks.
* WebCore.exp.in:
* platform/RuntimeApplicationChecks.cpp: (WebCore::applicationIsSolarWalk):
* platform/RuntimeApplicationChecks.h:
2011-05-12 Jia Pu <jpu@apple.com>
Reviewed by Darin Adler.
Regression caused by changeset 86281
https://bugs.webkit.org/show_bug.cgi?id=60712
Changed wording in some tests to reflect AppKit UI change.
* manual-tests/autocorrection/delete-to-end-of-word-to-show-reversion.html:
* manual-tests/autocorrection/move-to-end-of-word-to-show-reversion.html:
2011-05-12 Daniel Bates <dbates@rim.com>
Attempt to fix the build after changeset 86391 <http://trac.webkit.org/changeset/86391>
(https://bugs.webkit.org/show_bug.cgi?id=60681).
* page/PluginHalter.cpp:
(WebCore::PluginHalter::PluginHalter): Substitute m_client for client in ASSERT_ARG since client is now of type PassOwnPtr
so it becomes 0 when assigned to another variable.
2011-05-12 Patrick Gansterer <paroga@webkit.org>
Reviewed by Darin Adler.
Rename SimpleFontData::scaledFontData to createScaledFontData
https://bugs.webkit.org/show_bug.cgi?id=60723
* platform/graphics/SimpleFontData.h:
* platform/graphics/chromium/SimpleFontDataChromiumWin.cpp:
* platform/graphics/chromium/SimpleFontDataLinux.cpp:
* platform/graphics/freetype/SimpleFontDataFreeType.cpp:
* platform/graphics/haiku/SimpleFontDataHaiku.cpp:
* platform/graphics/mac/SimpleFontDataMac.mm:
* platform/graphics/pango/SimpleFontDataPango.cpp:
* platform/graphics/qt/SimpleFontDataQt.cpp:
* platform/graphics/win/SimpleFontDataWin.cpp:
* platform/graphics/wince/SimpleFontDataWinCE.cpp:
* platform/graphics/wx/SimpleFontDataWx.cpp:
2011-05-12 Levi Weintraub <leviw@chromium.org>
Reviewed by Simon Fraser.
Switch paintOutline to use IntRect
https://bugs.webkit.org/show_bug.cgi?id=60718
Switching paintOutline to use an IntRect instead of 4 ints.
No new tests as this is just refactoring.
* rendering/RenderBlock.cpp:
(WebCore::RenderBlock::paintObject):
* rendering/RenderObject.cpp:
(WebCore::RenderObject::paintOutline):
* rendering/RenderObject.h:
* rendering/RenderReplaced.cpp:
(WebCore::RenderReplaced::paint):
* rendering/RenderTable.cpp:
(WebCore::RenderTable::paintObject):
* rendering/svg/RenderSVGContainer.cpp:
(WebCore::RenderSVGContainer::paint):
* rendering/svg/RenderSVGImage.cpp:
(WebCore::RenderSVGImage::paint):
* rendering/svg/RenderSVGPath.cpp:
(WebCore::RenderSVGPath::paint):
* rendering/svg/RenderSVGRoot.cpp:
(WebCore::RenderSVGRoot::paint):
2011-05-12 Anders Carlsson <andersca@apple.com>
Address review comment by Dan Bernstein.
* loader/DocumentLoader.cpp:
(WebCore::DocumentLoader::substituteResourceDeliveryTimerFired):
2011-05-12 Anders Carlsson <andersca@apple.com>
Reviewed by Dan Bernstein.
Crash when a plug-in tries to load a resource from the application cache
https://bugs.webkit.org/show_bug.cgi?id=60735
<rdar://problem/8216142>
When loading application cache resources from disk, we would never restore the
HTTP status code, which means that resources would always have a 0 status code.
This led to the plug-in stream loader canceling the load, something which the application
cache loading machinery couldn't deal and thus would crash.
Fix the reading of the HTTP status code, and make the loader more robust against
application cache loads being canceled.
Unfortunately, I couldn't come up with a test for this because I couldn't find a reliable way
to force the application cache to be read from disk, so all resources would have valid values.
* loader/DocumentLoader.cpp:
(WebCore::DocumentLoader::substituteResourceDeliveryTimerFired):
* loader/appcache/ApplicationCacheStorage.cpp:
(WebCore::ApplicationCacheStorage::loadCache):
2011-05-12 Emil A Eklund <eae@chromium.org>
Reviewed by Darin Adler.
Convert RenderBox::setLocation, setLogicalLocation and setLogicalSize to IntPoint/IntSize
https://bugs.webkit.org/show_bug.cgi?id=60585
Refactoring, covered by existing tests.
* rendering/RenderBox.cpp:
(WebCore::RenderBox::positionLineBox):
* rendering/RenderBox.h:
(WebCore::RenderBox::setLogicalLocation):
(WebCore::RenderBox::setLogicalSize):
(WebCore::RenderBox::setLocation):
* rendering/RenderFrameSet.cpp:
(WebCore::RenderFrameSet::positionFrames):
(WebCore::RenderFrameSet::positionFramesWithFlattening):
* rendering/RenderMedia.cpp:
(WebCore::RenderMedia::layout):
* rendering/RenderScrollbarPart.cpp:
(WebCore::RenderScrollbarPart::paintIntoRect):
* rendering/RenderTable.cpp:
(WebCore::RenderTable::adjustLogicalHeightForCaption):
(WebCore::RenderTable::layout):
* rendering/RenderTableSection.cpp:
(WebCore::RenderTableSection::layoutRows):
* rendering/RenderTextControlSingleLine.cpp:
(WebCore::RenderTextControlSingleLine::layout):
* rendering/svg/SVGRootInlineBox.cpp:
(WebCore::SVGRootInlineBox::layoutRootBox):
2011-05-12 Adrienne Walker <enne@google.com>
Reviewed by James Robinson.
[chromium] show-composited-layer-tree crashes on null ptr deref
https://bugs.webkit.org/show_bug.cgi?id=60734
The tiler is created lazily, so it won't not be around for the first
dumpLayerProperties call.
* platform/graphics/chromium/ContentLayerChromium.cpp:
(WebCore::ContentLayerChromium::dumpLayerProperties):
2011-05-12 Patrick Gansterer <paroga@webkit.org>
Reviewed by Adam Barth.
Enable OwnPtr strict mode in PluginHalter
https://bugs.webkit.org/show_bug.cgi?id=60681
Pass PluginHalterClient as (Pass)OwnPtr to Page and PluginHalter.
* WebCore.exp.in:
* page/Page.cpp:
(WebCore::Page::Page):
(WebCore::Page::PageClients::PageClients):
* page/Page.h:
* page/PluginHalter.cpp:
(WebCore::PluginHalter::PluginHalter):
* page/PluginHalter.h:
2011-05-12 Daniel Bates <dbates@rim.com>
Reviewed by Adele Peterson.
Frame's noResize attribute can not be set by JavaScript
https://bugs.webkit.org/show_bug.cgi?id=14845
Tests: fast/frames/frame-inherit-noresize-from-frameset.html
fast/frames/frame-programmatic-noresize.html
fast/frames/frame-with-noresize-can-be-resized-after-removal-of-noresize.html
fast/frames/frame-with-noresize-can-be-resized-after-setting-noResize-to-false.html
Implements support to programmatically allow and disallow frame resizing.
Currently, HTMLFrameElement::parseMappedAttribute() is hardcoded to disallow frame resize (i.e.
m_noResize = true) when either the noresize DOM attribute is specified (or existed at some
point in time) or the value of the noResize attribute is modified. Instead we should allow/disallow
frame resize depending on the presence of the noresize DOM attribute/the value of the noResize
attribute.
* html/HTMLFrameElement.cpp:
(WebCore::HTMLFrameElement::HTMLFrameElement):
(WebCore::HTMLFrameElement::noResize): Made this a non-inline function since this
code path isn't performance critical.
(WebCore::HTMLFrameElement::attach): Removed code to inherit noresize attribute from
parent <frameset> since this functionality is part of RenderFrameSet::computeEdgeInfo().
(WebCore::HTMLFrameElement::parseMappedAttribute):
* html/HTMLFrameElement.h:
* rendering/RenderFrame.cpp:
(WebCore::RenderFrame::updateFromElement): Added.
* rendering/RenderFrame.h:
* rendering/RenderFrameSet.cpp:
(WebCore::RenderFrameSet::notifyFrameEdgeInfoChanged): Added.
* rendering/RenderFrameSet.h:
2011-05-12 Emil A Eklund <eae@chromium.org>
Reviewed by Darin Adler.
Replace IntPoint with const IntPoint& in RenderFlexibleBox::placeChild
https://bugs.webkit.org/show_bug.cgi?id=60640
Pass by const reference instead of by value for consistency reasons.
Refactoring, covered by existing tests.
* rendering/RenderFlexibleBox.cpp:
(WebCore::RenderFlexibleBox::placeChild):
* rendering/RenderFlexibleBox.h:
Use const IntPoint& instead of just IntPoint to avoid extra constructor overhead
2011-05-12 Dan Bernstein <mitz@apple.com>
Reviewed by Sam Weinig.
<rdar://problem/9427336> WebFindOptionsAtWordStarts still fails with some Japanese words
https://bugs.webkit.org/show_bug.cgi?id=60730
* editing/TextIterator.cpp:
(WebCore::SearchBuffer::isWordStartMatch): Consider all positions before a CJK ideograph as
word starts.
2011-05-12 Levi Weintraub <leviw@chromium.org>
Reviewed by Eric Seidel.
Switch paintBoxDecorationWithSize to IntRect
https://bugs.webkit.org/show_bug.cgi?id=60679
Switching paintBoxDecorationWithSize to take an IntRect instead of 4 ints.
No new tests as this is simple refactoring.
* rendering/RenderBox.cpp:
(WebCore::RenderBox::paintBoxDecorations): Cleaning up amazingly confusing logic.
(WebCore::RenderBox::paintBoxDecorationsWithSize):
* rendering/RenderBox.h:
* rendering/RenderTextControlSingleLine.cpp:
(WebCore::RenderTextControlSingleLine::paintBoxDecorations):
2011-05-12 Levi Weintraub <leviw@chromium.org>
Reviewed by Eric Seidel.
Switch paintBoxShadow to use IntRect
https://bugs.webkit.org/show_bug.cgi?id=60713
Switching paintBoxShadow from taking four ints to taking an IntRect.
No new tests since this is refactoring.
* rendering/InlineFlowBox.cpp:
(WebCore::InlineFlowBox::paintBoxShadow):
(WebCore::InlineFlowBox::paintBoxDecorations):
* rendering/InlineFlowBox.h:
* rendering/RenderBox.cpp:
(WebCore::RenderBox::paintBoxDecorationsWithSize):
* rendering/RenderBoxModelObject.cpp:
(WebCore::RenderBoxModelObject::paintBoxShadow):
* rendering/RenderBoxModelObject.h:
* rendering/RenderFieldset.cpp:
(WebCore::RenderFieldset::paintBoxDecorations):
* rendering/RenderTable.cpp:
(WebCore::RenderTable::paintBoxDecorations):
* rendering/RenderTableCell.cpp:
(WebCore::RenderTableCell::paintBoxDecorations):
2011-05-12 Maciej Stachowiak <mjs@apple.com>
Reviewed by Darin Adler.
XMLDocumentParserLibxml2 should play nice with strict OwnPtrs
https://bugs.webkit.org/show_bug.cgi?id=59394
Properly fix this (formerly rolled out for breaking the build). I think the original
failure had nothing to do with Deque<OwnPtr>, which in fact appears to work fine.
* dom/XMLDocumentParserLibxml2.cpp:
(WebCore::PendingCallbacks::~PendingCallbacks):
(WebCore::PendingCallbacks::create):
(WebCore::PendingCallbacks::appendStartElementNSCallback):
(WebCore::PendingCallbacks::appendEndElementNSCallback):
(WebCore::PendingCallbacks::appendCharactersCallback):
(WebCore::PendingCallbacks::appendProcessingInstructionCallback):
(WebCore::PendingCallbacks::appendCDATABlockCallback):
(WebCore::PendingCallbacks::appendCommentCallback):
(WebCore::PendingCallbacks::appendInternalSubsetCallback):
(WebCore::PendingCallbacks::appendErrorCallback):
(WebCore::PendingCallbacks::PendingCallbacks):
(WebCore::XMLDocumentParser::XMLDocumentParser):
2011-05-12 Daniel Bates <dbates@rim.com>
Reviewed by Kenneth Rohde Christiansen.
[Qt] fast/events/fire-mousedown-while-pressing-mouse-button.html failing
https://bugs.webkit.org/show_bug.cgi?id=58863
Fixes an issue where a platform mouse event corresponding to mouse button A
may be associated with the wrong WebCore mouse button when the event occurs
while pressing and holding a mouse button B, where A != B.
For example, a person clicks the middle mouse button while pressing and holding
the left mouse button. Then we dispatch the following DOM events: mouse down for
left button, mouse down for left button, mouse up for left button. But, we should
have dispatched: mouse down for left button, mouse down for middle button, mouse up
for middle button.
* platform/qt/PlatformMouseEventQt.cpp:
(WebCore::mouseEventTypeAndMouseButtonFromQEvent): Added.
(WebCore::PlatformMouseEvent::PlatformMouseEvent): Modified to call mouseEventTypeAndMouseButtonFromQEvent()
to determine the WebCore mouse event type and button from the platform-specific event.
2011-05-12 Levi Weintraub <leviw@chromium.org>
Reviewed by Eric Seidel.
Switch paintMask and paintMaskImages off of ints
https://bugs.webkit.org/show_bug.cgi?id=60578
Primarily switching paintMask and paintMaskImages to use IntSize and IntRect respectively.
In the process of that:
- added an "expand" function to IntRect that allows you to add an IntSize or pair of
integers to the size portion of an IntRect.
- changed borderFitAdjust to take an IntRect. It modifies only the x and width attributes.
No new tests since this refactoring.
* platform/graphics/IntRect.h:
(WebCore::IntRect::expand): Added for convenience.
* rendering/RenderBlock.cpp:
(WebCore::RenderBlock::paintObject):
(WebCore::RenderBlock::borderFitAdjust):
* rendering/RenderBlock.h:
* rendering/RenderBox.cpp:
(WebCore::RenderBox::paintBoxDecorationsWithSize):
(WebCore::RenderBox::paintMask):
(WebCore::RenderBox::paintMaskImages):
* rendering/RenderBox.h:
(WebCore::RenderBox::borderFitAdjust):
* rendering/RenderFieldset.cpp:
(WebCore::RenderFieldset::paintMask):
* rendering/RenderFieldset.h:
* rendering/RenderReplaced.cpp:
(WebCore::RenderReplaced::paint):
* rendering/RenderReplica.cpp:
(WebCore::RenderReplica::paint):
* rendering/RenderTable.cpp:
(WebCore::RenderTable::paintObject):
(WebCore::RenderTable::paintMask):
* rendering/RenderTable.h:
* rendering/RenderTableCell.cpp:
(WebCore::RenderTableCell::paintMask):
* rendering/RenderTableCell.h:
* rendering/RenderWidget.cpp:
(WebCore::RenderWidget::paint):
2011-05-12 Patrick Gansterer <paroga@webkit.org>
Reviewed by Eric Seidel.
SimpleFontData::scaledFontData should return a PassOwnPtr
https://bugs.webkit.org/show_bug.cgi?id=60657
Let scaledFontData return a PassOwnPtr instead of a raw pointer
to make SimpleFontData build without LOOSE_PASS_OWN_PTR.
* platform/graphics/SimpleFontData.h:
* platform/graphics/chromium/SimpleFontDataChromiumWin.cpp:
(WebCore::SimpleFontData::scaledFontData):
* platform/graphics/chromium/SimpleFontDataLinux.cpp:
(WebCore::SimpleFontData::scaledFontData):
* platform/graphics/freetype/SimpleFontDataFreeType.cpp:
(WebCore::SimpleFontData::scaledFontData):
* platform/graphics/haiku/SimpleFontDataHaiku.cpp:
(WebCore::SimpleFontData::scaledFontData):
* platform/graphics/mac/SimpleFontDataMac.mm:
(WebCore::SimpleFontData::scaledFontData):
* platform/graphics/pango/SimpleFontDataPango.cpp:
(WebCore::SimpleFontData::scaledFontData):
* platform/graphics/qt/SimpleFontDataQt.cpp:
(WebCore::SimpleFontData::scaledFontData):
* platform/graphics/win/SimpleFontDataWin.cpp:
(WebCore::SimpleFontData::scaledFontData):
* platform/graphics/wince/SimpleFontDataWinCE.cpp:
(WebCore::SimpleFontData::scaledFontData):
* platform/graphics/wx/SimpleFontDataWx.cpp:
(WebCore::SimpleFontData::scaledFontData):
2011-05-12 Jessie Berlin <jberlin@apple.com>
Reviewed by Darin Adler.
Assertion failure when requesting that storage be deleted for an origin without storage.
https://bugs.webkit.org/show_bug.cgi?id=60709
* storage/StorageTracker.cpp:
(WebCore::StorageTracker::syncDeleteOrigin):
If the path to the storage location for the givin origin is empty, return early instead of
asserting.
2011-05-12 Jessie Berlin <jberlin@apple.com>
Reviewed by Darin Adler.
[Windows WebKit2] Use cookies set in WebKit1
https://bugs.webkit.org/show_bug.cgi?id=60274
Make sure any Private Browsing session is based off the default session.
* platform/network/cf/ResourceHandleCFNet.cpp:
(WebCore::ResourceHandle::createPrivateBrowsingStorageSession):
2011-05-12 Rob Buis <rbuis@rim.com>
Reviewed by Eric Seidel.
SVGStyledElement::resolveStyle(RenderStyle*) must be removed/fixed!
https://bugs.webkit.org/show_bug.cgi?id=15479
Finally remove resolveStyle, it is not used anymore.
* svg/SVGStyledElement.cpp:
(WebCore::SVGStyledElement::childrenChanged):
* svg/SVGStyledElement.h:
2011-05-12 Adam Barth <abarth@webkit.org>
Reviewed by Darin Adler.
REGRESSION (r65868): createContextualFragment does not work with <style>
https://bugs.webkit.org/show_bug.cgi?id=60155
createContextualFragment doesn't have a spec, so it's hard to tell what
we're supposed to do exactly. This patch appears to make our behavior
more like Firefox and should fix the compat issue with this site.
Tests: fast/parser/style-in-create-contextual-fragment-head.html
fast/parser/style-in-create-contextual-fragment.html
* dom/Element.cpp:
(WebCore::Element::deprecatedCreateContextualFragment):
2011-05-12 Ryosuke Niwa <rniwa@webkit.org>
Reviewed by Darin Adler.
WebKit inserts base, link, meta, style, and title elements into an editable region
when pasting table cells from Excel
https://bugs.webkit.org/show_bug.cgi?id=60644
Strip base, link, meta, style, and tile elements from the fragment to be pasted prior
to the merge. We don't have to strip these elements in performTrivialReplace because
the function only handles a fragment that consists of exactly one text node.
Test: editing/pasteboard/paste-head-contents.html
* editing/ReplaceSelectionCommand.cpp:
(WebCore::removeHeadContents): Added.
(WebCore::ReplaceSelectionCommand::doApply): Calls removeHeadContents before handing
style spans.
2011-05-12 Levi Weintraub <leviw@chromium.org>
Reviewed by Simon Fraser.
Switch calculateBackgroundImageGeometry to use IntRect
https://bugs.webkit.org/show_bug.cgi?id=60671
Replacing the four ints passed into calculateBackgroundImageGeometry with an IntRect.
No new tests since this is just refactoring.
* rendering/RenderBox.cpp:
(WebCore::RenderBox::maskClipRect):
(WebCore::RenderBox::repaintLayerRectsForImage):
* rendering/RenderBoxModelObject.cpp:
(WebCore::RenderBoxModelObject::paintFillLayerExtended):
(WebCore::RenderBoxModelObject::calculateBackgroundImageGeometry):
* rendering/RenderBoxModelObject.h:
2011-05-12 Carol Szabo <carol@webkit.org>
Reviewed by David Hyatt.
Fix reparenting and destruction of counter nodes.
https://bugs.webkit.org/show_bug.cgi?id=57929
Fixed several issues related to not met assertions.
See below in the per file description.
Test: fast/css/counters/element-removal-crash.xhtml
* dom/ContainerNode.cpp:
(WebCore::ContainerNode::removeChildren):
Fixed the fact that Node::detach() used to be called
while the DOM tree was in an inconsistent state.
* rendering/RenderCounter.cpp:
(WebCore::RenderCounter::rendererRemovedFromTree):
Introduced this function to remove counters from
descendents of renderers removed from the renderer
tree not only from the removed renderers themselves.
* rendering/RenderCounter.h:
* rendering/RenderObjectChildList.cpp:
(WebCore::RenderObjectChildList::removeChildNode):
Changed to call RenderCounter::rendererRemovedFromTree
instead of RenderCounter::destroyCounters.
2011-05-12 Luke Macpherson <macpherson@chromium.org>
Reviewed by Dimitri Glazkov.
Merge ApplyPropertyExpanding and ApplyPropertyExpandingSuppressValue classes using template.
https://bugs.webkit.org/show_bug.cgi?id=60691
No new tests - refactoring only.
* css/CSSStyleApplyProperty.cpp:
(WebCore::ApplyPropertyExpanding::applyValue):
Use new template parameter to early exit if needed.
(WebCore::CSSStyleApplyProperty::CSSStyleApplyProperty):
Specify template parameters for ApplyPropertyExpanding.
2011-05-12 Simon Fraser <simon.fraser@apple.com>
Followup to r86351; give the vectors some inline capacity
to avoid heap allocations in most cases.
* page/animation/AnimationBase.cpp:
(WebCore::PropertyWrapperShadow::blendMismatchedShadowLists):
2011-05-12 Simon Fraser <simon.fraser@apple.com>
Reviewed by Dan Bernstein.
Mismatched multiple box-shadows do not transition as expected
https://bugs.webkit.org/show_bug.cgi?id=60137
When animating between two sets of shadows of different lengths, we need
to walk the ShadowData list backwards, since it stores the shadows in
reverse order relative to the CSS (so that painting is back-to-front).
This progresses the behavior of the transitions/multiple-shadow-transitions.html
test, which is given new expected results.
Test: transitions/mismatched-shadow-transitions.html
* page/animation/AnimationBase.cpp:
(WebCore::shadowListLength): Utility to walk the list of ShadowData and count the number
of shadows.
(WebCore::shadowForBlending): Return a ShadowData* that is useful as a blending target,
based on the shadow type, and whether it's a -webkit-box-shadow.
(WebCore::PropertyWrapperShadow::blend): Call one of the specialized blend methods.
(WebCore::PropertyWrapperShadow::blendSimpleOrMatchedShadowLists): Fast path
for shadow blending, when the list lengths match, or both are single or null shadows.
(WebCore::PropertyWrapperShadow::blendMismatchedShadowLists): Slower path that builds
vectors for each list to reverse them.
2011-05-12 Adam Roben <aroben@apple.com>
Attempted WinCairo build fix after r86169, part II
* platform/network/curl/CredentialStorageCurl.cpp: Added a missing #include.
2011-05-12 Adam Roben <aroben@apple.com>
Fix linker warnings in Production builds
* WebCore.vcproj/WebCore.vcproj: Exclude JSSVGFEDropShadowElement.cpp from the build in the
Production configuration, just like in the other configurations. Let VS resort some files
(again).
2011-05-12 Philippe Normand <pnormand@igalia.com>
Reviewed by Adam Roben.
Autocorrection persists after deleting and retyping the same word at same location.
https://bugs.webkit.org/show_bug.cgi?id=60555
Follow-up fix for the 3 editing/deleting tests crashing on GTK,
Leopard and Windows XP. Don't create the Range if the start of the
selection has no next position.
* editing/DeleteSelectionCommand.cpp:
(WebCore::DeleteSelectionCommand::originalStringForAutocorrectionAtBeginningOfSelection):
2011-05-12 Adam Roben <aroben@apple.com>
Attempted WinCairo build fix after r86169
* WebCore.vcproj/WebCore.vcproj: Added CredentialStorageCurl.cpp. Also let VS do what it
wants.
* platform/network/curl/CredentialStorageCurl.cpp: Added.
(WebCore::CredentialStorage::getFromPersistentStorage): Stubbed out.
2011-05-12 Adam Roben <aroben@apple.com>
Build fixes after r86325
* editing/SpellingCorrectionController.cpp:
* editing/SpellingCorrectionController.h:
Added missing declarations/#includes.
2011-05-12 Nikolas Zimmermann <nzimmermann@rim.com>
Not reviewed.
String operator+ reallocates unnecessary when concatting > 2 strings
https://bugs.webkit.org/show_bug.cgi?id=58420
Attempt to fix the WinCE build. WinCE/WinCairo still won't link because of unresolved symbols, hmm. If we had EWS for those, I would have caught the problem earlier.
* platform/wince/FileSystemWinCE.cpp:
(WebCore::listDirectory):
2011-05-12 Nikolas Zimmermann <nzimmermann@rim.com>
Not reviewed.
String operator+ reallocates unnecessary when concatting > 2 strings
https://bugs.webkit.org/show_bug.cgi?id=58420
Fix fast/forms/input-image-submit.html regression, seens on the bots - by removing a last-minute typo: s/!!/!/
* html/ImageInputType.cpp:
(WebCore::ImageInputType::appendFormData):
2011-05-12 Rob Buis <rwlbuis@gmail.com>
Reviewed by Eric Seidel.
REGRESSION(79985): Changes in fill-opacity should trigger repaint but don't
https://bugs.webkit.org/show_bug.cgi?id=59941
Also consider fill-opacity when determining whether StyleDifferenceRepaint is needed.
Test: svg/custom/fill-opacity-update.svg
* rendering/style/SVGRenderStyle.cpp:
(WebCore::SVGRenderStyle::diff):
2011-05-12 Nikolas Zimmermann <nzimmermann@rim.com>
Reviewed by Darin Adler.
String operator+ reallocates unnecessary when concatting > 2 strings
https://bugs.webkit.org/show_bug.cgi?id=58420
Provide a faster String append operator. See Source/JavaScriptCore/ChangeLog for details.
* dom/XMLDocumentParserLibxml2.cpp:
(WebCore::handleElementAttributes):
* editing/MarkupAccumulator.cpp:
(WebCore::MarkupAccumulator::shouldAddNamespaceElement):
* html/HTMLAnchorElement.cpp:
(WebCore::HTMLAnchorElement::hash):
(WebCore::HTMLAnchorElement::search):
* html/ImageInputType.cpp:
(WebCore::ImageInputType::appendFormData):
* html/parser/HTMLTreeBuilder.cpp:
* loader/CrossOriginAccessControl.cpp:
(WebCore::passesAccessControlCheck):
* page/Location.cpp:
(WebCore::Location::search):
(WebCore::Location::hash):
* page/NavigatorBase.cpp:
(WebCore::NavigatorBase::platform):
* platform/chromium/ClipboardChromium.cpp:
(WebCore::writeImageToDataObject):
* platform/gtk/PasteboardHelper.cpp:
(WebCore::PasteboardHelper::fillSelectionData):
* platform/network/cf/ResourceHandleCFNet.cpp:
(WebCore::encodeBasicAuthorization):
* platform/network/cf/SocketStreamHandleCFNet.cpp:
(WebCore::SocketStreamHandle::copyCFStreamDescription):
* platform/network/mac/ResourceHandleMac.mm:
(WebCore::encodeBasicAuthorization):
* workers/WorkerLocation.cpp:
(WebCore::WorkerLocation::search):
(WebCore::WorkerLocation::hash):
2011-05-06 Yury Semikhatsky <yurys@chromium.org>
Reviewed by Pavel Feldman.
Web Inspector: move agents from InspectorAgent to InspectorController
https://bugs.webkit.org/show_bug.cgi?id=60359
All inspector agents are now created and owned by InspectorController which
in turned is owned by the inspected Page. InspectorInstrumentation gets access
to the instrumenting agents by means of InspectorAgent::instrumentingAgents().
In addition to managing inspector agents lifetime InspectorController sets
InspectorFronted on the agents when the front-end is connected.
* inspector/InspectorAgent.cpp:
(WebCore::InspectorAgent::InspectorAgent):
(WebCore::InspectorAgent::~InspectorAgent):
(WebCore::InspectorAgent::inspectedPageDestroyed):
(WebCore::InspectorAgent::restore):
(WebCore::InspectorAgent::setFrontend):
(WebCore::InspectorAgent::clearFrontend):
* inspector/InspectorAgent.h: all accessors to other agents were removed along with
the agents themselves from InspectorAgent. Every agent that depends on some other agents
receives pointers to them explicitely in its constructor. All access to the agents
from WebCore should go through InspectorInstrumentation which retrieves corresponding
agents using InstrumentingAgents structure which represents the set of active agents.
(WebCore::InspectorAgent::instrumentingAgents):
* inspector/InspectorController.cpp:
(WebCore::InspectorController::InspectorController):
(WebCore::InspectorController::~InspectorController):
(WebCore::InspectorController::inspectedPageDestroyed):
(WebCore::InspectorController::startTimelineProfiler):
(WebCore::InspectorController::stopTimelineProfiler):
(WebCore::InspectorController::connectFrontend):
(WebCore::InspectorController::disconnectFrontend):
(WebCore::InspectorController::restoreInspectorStateFromCookie):
(WebCore::InspectorController::drawNodeHighlight):
(WebCore::InspectorController::inspect):
(WebCore::InspectorController::timelineProfilerEnabled):
(WebCore::InspectorController::hideHighlight):
(WebCore::InspectorController::highlightedNode):
(WebCore::InspectorController::enableProfiler):
(WebCore::InspectorController::disableProfiler):
(WebCore::InspectorController::profilerEnabled):
(WebCore::InspectorController::debuggerEnabled):
(WebCore::InspectorController::disableDebugger):
(WebCore::InspectorController::startUserInitiatedProfiling):
(WebCore::InspectorController::stopUserInitiatedProfiling):
(WebCore::InspectorController::isRecordingUserInitiatedProfile):
(WebCore::InspectorController::resume):
* inspector/InspectorController.h:
* inspector/InspectorInstrumentation.cpp:
(WebCore::InspectorInstrumentation::didInsertDOMNodeImpl):
(WebCore::InspectorInstrumentation::didRemoveDOMNodeImpl):
(WebCore::InspectorInstrumentation::didModifyDOMAttrImpl):
(WebCore::InspectorInstrumentation::didInvalidateStyleAttrImpl):
(WebCore::InspectorInstrumentation::characterDataModifiedImpl):
(WebCore::InspectorInstrumentation::didReceiveResourceResponseImpl):
(WebCore::InspectorInstrumentation::didFailLoadingImpl):
(WebCore::InspectorInstrumentation::resourceRetrievedByXMLHttpRequestImpl):
(WebCore::InspectorInstrumentation::addMessageToConsoleImpl):
(WebCore::InspectorInstrumentation::consoleCountImpl):
(WebCore::InspectorInstrumentation::startConsoleTimingImpl):
(WebCore::InspectorInstrumentation::stopConsoleTimingImpl):
(WebCore::InspectorInstrumentation::addStartProfilingMessageToConsoleImpl):
(WebCore::InspectorInstrumentation::addProfileImpl):
(WebCore::InspectorInstrumentation::getCurrentUserInitiatedProfileNameImpl):
(WebCore::InspectorInstrumentation::profilerEnabledImpl):
(WebCore::InspectorInstrumentation::cancelPauseOnNativeEvent):
* page/Page.cpp:
(WebCore::Page::~Page): we send two notifications when inspected Page is being
destroyed: one to the inspector instrumentation and another one to the InspectorController
which is owned by the Page.
2011-05-12 Tony Gentilcore <tonyg@chromium.org>
Build fix: include ExceptionCode.h
https://bugs.webkit.org/show_bug.cgi?id=60694
* dom/Range.cpp:
2011-05-10 Tony Gentilcore <tonyg@chromium.org>
Reviewed by Darin Adler.
Perform some forward declarations suggested by include-what-you-use
https://bugs.webkit.org/show_bug.cgi?id=60545
* accessibility/AccessibilityObject.cpp:
* accessibility/AccessibilityRenderObject.cpp:
* accessibility/mac/AccessibilityObjectWrapper.mm:
* dom/DocumentMarkerController.cpp:
* dom/Position.cpp:
* dom/PositionIterator.cpp:
* dom/Range.cpp:
* editing/ApplyBlockElementCommand.cpp:
* editing/ApplyStyleCommand.cpp:
* editing/Editor.cpp:
* editing/EditorCommand.cpp:
* editing/FrameSelection.cpp:
* editing/HTMLInterchange.cpp:
* editing/IndentOutdentCommand.cpp:
* editing/ReplaceSelectionCommand.cpp:
* editing/SpellChecker.h:
* editing/SpellingCorrectionCommand.cpp:
* editing/SpellingCorrectionController.h:
* editing/TextCheckingHelper.cpp:
* editing/TextIterator.h:
* editing/htmlediting.h:
* editing/markup.cpp:
* editing/visible_units.cpp:
* editing/visible_units.h:
* fileapi/DOMFileSystem.cpp:
* fileapi/DirectoryReaderSync.cpp:
* fileapi/DirectoryReaderSync.h:
* fileapi/FileEntry.h:
* fileapi/FileWriter.h:
* fileapi/FileWriterBase.h:
* fileapi/FileWriterSync.h:
* history/CachedFrame.cpp:
* history/CachedPage.cpp:
* history/HistoryItem.cpp:
* history/HistoryItem.h:
* history/PageCache.h:
* loader/HistoryController.h:
* loader/PingLoader.h:
* loader/ResourceLoader.h:
* loader/appcache/DOMApplicationCache.h:
* loader/cache/CachedCSSStyleSheet.h:
* loader/cache/CachedFont.cpp:
* loader/cache/CachedFont.h:
* loader/cache/CachedResourceRequest.cpp:
* loader/cache/CachedResourceRequest.h:
* loader/cache/MemoryCache.h:
* notifications/Notification.cpp:
* notifications/Notification.h:
* notifications/NotificationCenter.cpp:
* notifications/NotificationCenter.h:
* page/Chrome.cpp:
* page/Chrome.h:
* page/DOMSelection.cpp:
* page/DOMTimer.h:
* page/DOMWindow.cpp:
* page/EventHandler.cpp:
* page/FocusController.h:
* page/Geolocation.cpp:
* page/Geolocation.h:
* page/History.cpp:
* rendering/RenderListBox.cpp:
* workers/WorkerContext.cpp:
2011-05-12 Yuta Kitamura <yutak@chromium.org>
Unreviewed, another attempt of build fix.
* websockets/CloseEvent.h:
* websockets/CloseEvent.idl:
2011-05-12 Yuta Kitamura <yutak@chromium.org>
Unreviewed, trying to fix Qt minimal compile.
* websockets/CloseEvent.idl:
2011-05-12 ojab <ojab@ojab.ru>
Reviewed by Eric Seidel.
Fix build with --disable-video --enable-fullscreen-api
https://bugs.webkit.org/show_bug.cgi?id=60542
* css/CSSStyleSelector.cpp:
(WebCore::CSSStyleSelector::SelectorChecker::checkOneSelector):
2011-05-12 Yuta Kitamura <yutak@chromium.org>
Reviewed by Kent Tamura.
WebSocket add new event: CloseEvent
https://bugs.webkit.org/show_bug.cgi?id=35573
Original patch was written by Fumitoshi Ukai <ukai@chromium.org>.
I added CloseEvent constructor to DOMWindow, so it can be referred
in the new test (close-event.html).
Test: http/tests/websocket/tests/close-event.html
* CMakeLists.txt:
* CodeGenerators.pri:
* DerivedSources.cpp:
* DerivedSources.make:
* GNUmakefile.list.am:
* WebCore.gypi:
* WebCore.pro:
* WebCore.vcproj/WebCore.vcproj:
* WebCore.xcodeproj/project.pbxproj:
* bindings/js/JSEventCustom.cpp:
(WebCore::toJS):
* bindings/v8/custom/V8EventCustom.cpp:
(WebCore::toV8):
* dom/Event.cpp:
(WebCore::Event::isCloseEvent):
* dom/Event.h:
* page/DOMWindow.idl: Add CloseEvent constructor.
* websockets/CloseEvent.h: Added.
(WebCore::CloseEvent::isCloseEvent):
(WebCore::CloseEvent::create):
(WebCore::CloseEvent::initCloseEvent):
(WebCore::CloseEvent::wasClean):
(WebCore::CloseEvent::CloseEvent):
* websockets/CloseEvent.idl: Added.
* websockets/WebSocket.cpp:
(WebCore::WebSocket::didClose):
2011-05-12 Ben Wells <benwells@chromium.org>
Reviewed by Simon Fraser.
RGBA colors in outlines show overpainting at the corners
https://bugs.webkit.org/show_bug.cgi?id=58999
Tests: fast/borders/outline-alpha-block.html
fast/borders/outline-alpha-inline.html
Updated baseline images for tests with rgba outlines:
fast/box-shadow/box-shadow-radius.html
fast/layers/self-painting-outline.html
* rendering/RenderInline.cpp:
(WebCore::RenderInline::paintOutline):
(WebCore::RenderInline::paintOutlineForLine):
* rendering/RenderInline.h:
* rendering/RenderObject.cpp:
(WebCore::RenderObject::paintOutline):
2011-05-11 Levi Weintraub <leviw@chromium.org>
Reviewed by Eric Seidel.
Rename Widget::pos()
https://bugs.webkit.org/show_bug.cgi?id=60575
Renaming Widget::pos() to the more-descriptive location().
No new tests as this is a simple rename
* page/FrameView.cpp:
(WebCore::FrameView::create):
* platform/Widget.h:
(WebCore::Widget::location):
(WebCore::Widget::resize):
2011-05-10 MORITA Hajime <morrita@google.com>
Reviewed by Kent Tamura.
Crashes if the document inside iframe is removed during pasting some text into it.
https://bugs.webkit.org/show_bug.cgi?id=60534
Added missing null check.
Test: editing/pasteboard/paste-removing-iframe.html
* editing/Editor.cpp:
(WebCore::Editor::shouldChangeSelection):
2011-05-11 Brian Salomon <bsalomon@google.com>
Reviewed by Eric Seidel.
Handle case when GrContext creation fails
https://bugs.webkit.org/show_bug.cgi?id=60410
Exercised by all canvas tests when DRT is run with skia-gpu
* platform/graphics/gpu/SharedGraphicsContext3D.cpp:
(WebCore::SharedGraphicsContext3D::grContext):
2011-05-11 Pratik Solanki <psolanki@apple.com>
Reviewed by Andreas Kling.
Remove empty class CallbackGuard
https://bugs.webkit.org/show_bug.cgi?id=60610
CallbackGuard was only ever used on Tiger and it is now an empty class. Remove all uses of it.
* platform/network/mac/ResourceHandleMac.mm:
(-[WebCoreResourceHandleAsDelegate connection:willSendRequest:redirectResponse:]):
(-[WebCoreResourceHandleAsDelegate connectionShouldUseCredentialStorage:]):
(-[WebCoreResourceHandleAsDelegate connection:didReceiveAuthenticationChallenge:]):
(-[WebCoreResourceHandleAsDelegate connection:didCancelAuthenticationChallenge:]):
(-[WebCoreResourceHandleAsDelegate connection:canAuthenticateAgainstProtectionSpace:]):
(-[WebCoreResourceHandleAsDelegate connection:didReceiveResponse:]):
(-[WebCoreResourceHandleAsDelegate connection:didReceiveData:lengthReceived:]):
(-[WebCoreResourceHandleAsDelegate connection:willStopBufferingData:]):
(-[WebCoreResourceHandleAsDelegate connection:didSendBodyData:totalBytesWritten:totalBytesExpectedToWrite:]):
(-[WebCoreResourceHandleAsDelegate connectionDidFinishLoading:]):
(-[WebCoreResourceHandleAsDelegate connection:didFailWithError:]):
(-[WebCoreResourceHandleAsDelegate connection:willCacheResponse:]):
2011-05-11 Luke Macpherson <macpherson@chromium.org>
Reviewed by Eric Seidel.
Implement CSSPropertyMargin and CSSPropertyPadding in CSSStyleApplyProperty.
https://bugs.webkit.org/show_bug.cgi?id=60609
No new tests - refactoring only.
* css/CSSStyleApplyProperty.cpp:
(WebCore::CSSStyleApplyProperty::CSSStyleApplyProperty):
Initialise CSSPropertyMargin and CSSPropertyPadding handlers.
* css/CSSStyleSelector.cpp:
(WebCore::CSSStyleSelector::applyProperty):
Remove unused implementations.
2011-05-11 Robin Dunn <robin@alldunn.com>
Reviewed by Kevin Ollivier.
[wx] Implement more clipping functions for wxWebKit.
https://bugs.webkit.org/show_bug.cgi?id=60662
* platform/graphics/wx/GraphicsContextWx.cpp:
(WebCore::GraphicsContext::clip):
(WebCore::GraphicsContext::clipOut):
2011-05-11 Damian Kaleta <dkaleta@apple.com>
Reviewed by Brady Eidson.
Need a new API that will try to restore the scrollbars' position, when navigating in the back/forward history
https://bugs.webkit.org/show_bug.cgi?id=60674
* WebCore.exp.in: Export restoreScrollPositionAndViewState()
2011-05-11 Levi Weintraub <leviw@chromium.org>
Reviewed by Eric Seidel.
Switch paintFillLayer and its progeny to use IntRect instead of four ints
https://bugs.webkit.org/show_bug.cgi?id=60596
Changing integers passed into paintFillLayer and other derivatives to IntRects
and IntSizes that reflect their function.
No new tests since this is just refactoring.
* rendering/InlineFlowBox.cpp:
(WebCore::InlineFlowBox::paintFillLayers):
(WebCore::InlineFlowBox::paintFillLayer):
(WebCore::InlineFlowBox::paintBoxDecorations):
(WebCore::InlineFlowBox::paintMask):
* rendering/InlineFlowBox.h:
* rendering/RenderBox.cpp:
(WebCore::RenderBox::paintRootBoxFillLayers):
(WebCore::RenderBox::paintBoxDecorationsWithSize):
(WebCore::RenderBox::paintMaskImages):
(WebCore::RenderBox::paintFillLayers):
(WebCore::RenderBox::paintFillLayer):
* rendering/RenderBox.h:
* rendering/RenderBoxModelObject.cpp:
(WebCore::RenderBoxModelObject::paintFillLayerExtended):
* rendering/RenderBoxModelObject.h:
* rendering/RenderFieldset.cpp:
(WebCore::RenderFieldset::paintBoxDecorations):
* rendering/RenderTable.cpp:
(WebCore::RenderTable::paintBoxDecorations):
* rendering/RenderTableCell.cpp:
(WebCore::RenderTableCell::paintBackgroundsBehindCell):
2011-05-11 Nat Duca <nduca@chromium.org>
Reviewed by James Robinson.
[chromium] Use mapTexSubImage2D for tile uploads if available
https://bugs.webkit.org/show_bug.cgi?id=60008
* platform/graphics/chromium/LayerTilerChromium.cpp:
(WebCore::LayerTilerChromium::LayerTilerChromium):
(WebCore::LayerTilerChromium::update):
(WebCore::LayerTilerChromium::updateFromPixels):
* platform/graphics/chromium/LayerTilerChromium.h:
2011-05-11 Alexis Menard <alexis.menard@openbossa.org>
Reviewed by Kenneth Rohde Christiansen.
[Qt] Implements a disable appearance for Media Elements of Qt port.
https://bugs.webkit.org/show_bug.cgi?id=60561
Implements a disable appearance for the media controls of the Qt port
when the media is not yet available.
* platform/qt/RenderThemeQt.cpp:
(WebCore::mediaElementCanPlay):
(WebCore::RenderThemeQt::getMediaControlForegroundColor):
(WebCore::RenderThemeQt::paintMediaSliderThumb):
2011-05-11 Kent Tamura <tkent@chromium.org>
Reviewed by Dimitri Glazkov.
input type=email is too strict
https://bugs.webkit.org/show_bug.cgi?id=55988
Follow the updated specification.
* html/EmailInputType.cpp: Update the pattern to allow a domain part without periods.
2011-05-11 Jia Pu <jpu@apple.com>
Reviewed by Darin Adler.
Autocorrection persists after deleting and retyping the same word at same location.
https://bugs.webkit.org/show_bug.cgi?id=60555
<rdar://problem/9373915>
This patch intends to alleviate the issue of repetitively applying the same autocorrection
when user delete and retype the same word at the same location. This scenario is especially
common when autocorrection modifies the first letter of the word.
This patch consists following major changes:
1. Added a new marker type, DeletedAutocorrection. This marker is added to the whitespace that
precedes a deleted autocorrection. If the user later types the same original word at after
this whitespace, the autocorrection will not be applied again.
2. In DeleteSelectionCommand, added code to notify SpellingCorrectionController about the
autocorrection that has just been deleted.
3. In Editor and SpellingCorrectionController, added code to apply the marker and to suppress
autocorrection when necessary.
4. The change in CompositeEditCommand::replaceTextInNode is necessary for preserving markers.
Otherwise, we will loose the DeletedAutocorrection on the whitespace, when inserting text
after the whitespace.
Test: platform/mac/editing/spelling/delete-autocorrected-word-2.html
* dom/DocumentMarker.h: Added new marker type DeletedAutocorrection.
(WebCore::DocumentMarker::AllMarkers::AllMarkers):
* dom/DocumentMarkerController.cpp:
(WebCore::DocumentMarkerController::markersInRange): Support querying multiple marker types.
* dom/DocumentMarkerController.h:
* editing/CompositeEditCommand.cpp:
(WebCore::CompositeEditCommand::replaceTextInNodeAndPreserveMarkers):
(WebCore::CompositeEditCommand::rebalanceWhitespaceOnTextSubstring):
(WebCore::CompositeEditCommand::prepareWhitespaceAtPositionForSplit):
* editing/CompositeEditCommand.h:
* editing/DeleteSelectionCommand.cpp:
(WebCore::DeleteSelectionCommand::DeleteSelectionCommand):
(WebCore::DeleteSelectionCommand::fixupWhitespace):
(WebCore::DeleteSelectionCommand::originalStringForAutocorrectionAtBeginningOfSelection): Extracting
the original string if we are deleting an autocorrection.
(WebCore::DeleteSelectionCommand::doApply): Notify editor about the deleted autocorrection and its position.
* editing/DeleteSelectionCommand.h:
* editing/Editor.cpp:
(WebCore::Editor::markAllMisspellingsAndBadGrammarInRanges): Moved all logic of determining
when to suppress an autocorrection into SpellingCorrectionController.
(WebCore::Editor::deletedAutocorrectionAtPosition):
* editing/Editor.h:
* editing/InsertParagraphSeparatorCommand.cpp:
(WebCore::InsertParagraphSeparatorCommand::doApply):
* editing/SpellingCorrectionController.cpp:
(WebCore::SpellingCorrectionController::respondToAppliedEditing):
(WebCore::SpellingCorrectionController::deletedAutocorrectionAtPosition):
(WebCore::SpellingCorrectionController::markPrecedingWhitespaceForDeletedAutocorrectionAfterCommand):
(WebCore::SpellingCorrectionController::processMarkersOnTextToBeReplacedByResult):
* editing/SpellingCorrectionController.h:
(WebCore::SpellingCorrectionController::UNLESS_ENABLED):
* editing/visible_units.cpp:
(WebCore::isStartOfWord):
* editing/visible_units.h:
* manual-tests/autocorrection/spell-checking-after-reversion.html:
2011-05-11 Dan Bernstein <mitz@apple.com>
Reviewed by Darin Adler.
<rdar://problem/9414874> Layout unnecessarily interrupts smooth scrolling at msnbc.com
https://bugs.webkit.org/show_bug.cgi?id=60677
* platform/ScrollView.cpp:
(WebCore::ScrollView::updateScrollbars): Only perform an immediate scroll, aborting any running
animation, if the new scroll offset computed here is different from the current scroll offset.
2011-05-11 Kent Tamura <tkent@chromium.org>
Reviewed by Dimitri Glazkov.
<input pattern="1|10" value="10"> doesn't work correctly.
https://bugs.webkit.org/show_bug.cgi?id=60619
Fixes a bug that patternMismatch returns a wrong result if
- a whole value matches to a pattern,
- a sub-string of the value also matches to the pattern, and
- the sub-string matching has priority.
* html/BaseTextInputType.cpp:
(WebCore::BaseTextInputType::patternMismatch):
Enclose the specified pattern with ^( and )$.
2011-05-11 Zelidrag Hornung <zelidrag@chromium.org>
Reviewed by David Levin.
Prevented DOMFileSystemBase from imposing file naming restrictions on
external file systems.
https://bugs.webkit.org/show_bug.cgi?id=60583
There are no new tests for this change since it requires the presence
of external file system provider which is specific to the platform host
process. Chromium implementation will test this within its extension API
test suite.
* fileapi/DOMFileSystemBase.cpp:
(WebCore::pathToAbsolutePath):
(WebCore::DOMFileSystemBase::getFile):
(WebCore::DOMFileSystemBase::getDirectory):
2011-05-11 Antoine Labour <piman@chromium.org>
Reviewed by David Levin.
Expose shouldBufferData to ThreadableLoaderOptions to be able to disable buffering of the
loaded resource.
https://bugs.webkit.org/show_bug.cgi?id=60656
* loader/DocumentThreadableLoader.cpp:
(WebCore::DocumentThreadableLoader::loadRequest):
Pass the shouldBufferData to the resource load scheduler, forcing it to true for the
preflight request.
* loader/ResourceLoadScheduler.cpp:
(WebCore::ResourceLoadScheduler::scheduleSubresourceLoad):
Pass through shouldBufferData to SubresourceLoader::create
* loader/ResourceLoadScheduler.h:
* loader/SubresourceLoader.cpp:
(WebCore::SubresourceLoader::create):
Set shouldBufferData on the newly created loader
* loader/SubresourceLoader.h:
* loader/ThreadableLoader.h:
(WebCore::ThreadableLoaderOptions::ThreadableLoaderOptions):
Add shouldBufferData to the options, defaulting to true.
2011-05-11 Jay Civelli <jcivelli@chromium.org>
Reviewed by Adam Barth.
Adding a Content-Type parser. This is needed for MHTML support.
https://bugs.webkit.org/show_bug.cgi?id=60637
(WebCore::ScriptController::disableEval):
* platform/network/ContentTypeParser.cpp: Added.
* platform/network/ContentTypeParser.h: Added.
2011-05-11 Jessie Berlin <jberlin@apple.com>
Reviewed by Steve Falkenburg.
[Windows WebKit2] Use cookies set in WebKit1
https://bugs.webkit.org/show_bug.cgi?id=60274
Share the default storage session between the UI and Web Processes.
* platform/network/cf/CookieStorageCFNet.cpp:
(WebCore::defaultSessionCookieStorage):
Keep track of the default storage session cookie storage.
(WebCore::currentCookieStorage):
Call defaultCookieStorage to get the default cookie storage.
(WebCore::defaultCookieStorage):
If there is a default storage session cookie storage, prefer that over getting the default
cookie storage. In the Web Process, asking CFNetwork for the default cookie storage directly
without specifying a storage session will not get the cookie storage being shared by the UI
and Web Processes.
* platform/network/ResourceHandle.h:
* platform/network/cf/ResourceHandleCFNet.cpp:
(WebCore::willSendRequest):
Make sure to set the current storage session on any requests used by the Web
Process before CFNetwork has to do anything with them, in order for CFNetwork to avoid
doing anything with the Web Process's default storage session (which is not the one shared
with the UI Process).
(WebCore::makeFinalRequest):
Ditto.
(WebCore::ResourceHandle::willSendRequest):
Ditto.
(WebCore::ResourceHandle::currentStorageSession):
If there is a Private Browsing storage session, return that.
If not, on Windows return the default storage session that is being shared with the UI
Process and on Mac return 0.
(WebCore::defaultCFURLStorageSession):
(WebCore::ResourceHandle::setDefaultStorageSession):
(WebCore::ResourceHandle::defaultStorageSession):
* platform/network/cf/ResourceRequestCFNet.cpp:
(WebCore::ResourceRequest::doUpdatePlatformRequest):
Make sure to set the current storage session on any requests used by the Web
Process before CFNetwork has to do anything with them, in order for CFNetwork to avoid
doing anything with the Web Process's default storage session (which is not the one shared
with the UI Process).
2011-05-11 Lucas De Marchi <lucas.demarchi@profusion.mobi>
Reviewed by David Kilzer.
Remove wml directory from include lists
https://bugs.webkit.org/show_bug.cgi?id=60646
Remove wml dir from CMake, Autotools and qmake build systems since WML
was removed in r85256.
No new tests since no change in functionality.
* CMakeLists.txt:
* GNUmakefile.am:
* WebCore.pri:
2011-05-11 Lucas De Marchi <lucas.demarchi@profusion.mobi>
Reviewed by Antonio Gomes.
[CMAKE] Move EFL-specific file to CMakeListsEfl.txt
https://bugs.webkit.org/show_bug.cgi?id=60642
Move file EFL-specific file to the CMakeListsEfl.txt file. This implies
having to include CMakeLists${PORT}.txt before the ADD_CUSTOM_COMMAND
calls, since they depend on lists that now may change inside a port
like WebCore_USER_AGENT_STYLE_SHEETS.
No new tests since no change in functionality.
* CMakeLists.txt: remove css file specific to EFL port.
* CMakeListsEfl.txt: move file here.
2011-05-11 Tao Bai <michaelbai@chromium.org>
Reviewed by David Kilzer.
Return empty Favicon URL instead of default one when the frame isn't top level one
https://bugs.webkit.org/show_bug.cgi?id=60527
This issue was discovered by chromium browser test.
* dom/Document.cpp:
(WebCore::Document::setIconURL):
Restored original logic which was inadvertently flipped by http://trac.webkit.org/changeset/85785.
* loader/FrameLoader.cpp:
(WebCore::FrameLoader::iconURLs):
(WebCore::FrameLoader::fillIconURL):
Restored original logic, the empty URL should be returned instead of default one. The client (at
least chromium) may rely on the returned value to decided whether the favicon should be changed.
2011-05-11 Nat Duca <nduca@chromium.org>
Reviewed by Kenneth Russell.
[chromium] Make throttling of WebGL based on webgl frames, not compositor frames
https://bugs.webkit.org/show_bug.cgi?id=60508
When a WebGL layer is dirtied outside of a requestAnimFrame callback, we need
to prevent WebGL from running too far ahead of the GPU process. The current
throttling mechanism relies on prepareTexture being called for every WebGL frame.
However, in a non-requestAnimFrame application, multiple frames might get created
before the compositor runs and calls prepareTexture on the surface.
To address this, we post a task that calls a special rate limiting GL extension on
the WebGL context after every WebGL "frame." When the compositor runs, it calls
prepareTexture as usual.
* platform/graphics/chromium/Extensions3DChromium.h:
* platform/graphics/chromium/LayerRendererChromium.cpp:
(WebCore::LayerRendererChromium::LayerRendererChromium):
* platform/graphics/chromium/LayerRendererChromium.h:
(WebCore::LayerRendererChromium::setIsAnimating):
(WebCore::LayerRendererChromium::isAnimating):
* platform/graphics/chromium/WebGLLayerChromium.cpp:
(WebCore::WebGLLayerChromiumRateLimitTask::WebGLLayerChromiumRateLimitTask):
(WebCore::WebGLLayerChromiumRateLimitTask::run):
(WebCore::WebGLLayerChromiumRateLimitTask::cancel):
(WebCore::WebGLLayerChromium::WebGLLayerChromium):
(WebCore::WebGLLayerChromium::~WebGLLayerChromium):
(WebCore::WebGLLayerChromium::setTextureUpdated):
(WebCore::WebGLLayerChromium::setContext):
* platform/graphics/chromium/WebGLLayerChromium.h:
(WebCore::WebGLLayerChromium::context):
2011-05-11 Noam Rosenthal <noam.rosenthal@nokia.com>
Reviewed by Kenneth Rohde Christiansen.
[Texmap][Qt] Upstream texture-mapper changes from Qt's WebKit2 branch
https://bugs.webkit.org/show_bug.cgi?id=60439
Patch 12/12: Enable accelerated animations in texture-mapper. The entire interpolation
mechanism happens inside TextureMapper, and we interpolate right before we paint.
No new tests. Tests in LayoutTests/compositing cover this.
* platform/graphics/texmap/GraphicsLayerTextureMapper.cpp:
(WebCore::GraphicsLayerTextureMapper::GraphicsLayerTextureMapper):
(WebCore::GraphicsLayerTextureMapper::syncCompositingState):
(WebCore::GraphicsLayerTextureMapper::addAnimation):
(WebCore::GraphicsLayerTextureMapper::pauseAnimation):
(WebCore::GraphicsLayerTextureMapper::removeAnimation):
(WebCore::GraphicsLayerTextureMapper::animationStartedTimerFired):
* platform/graphics/texmap/TextureMapperNode.cpp:
(WebCore::TextureMapperNode::descendantsOrSelfHaveRunningAnimations):
(WebCore::normalizedAnimationValue):
(WebCore::TextureMapperNode::applyOpacityAnimation):
(WebCore::solveEpsilon):
(WebCore::solveCubicBezierFunction):
(WebCore::solveStepsFunction):
(WebCore::applyTimingFunction):
(WebCore::TextureMapperNode::applyTransformAnimation):
(WebCore::TextureMapperNode::applyAnimationFrame):
(WebCore::TextureMapperNode::applyAnimation):
(WebCore::TextureMapperNode::hasRunningOpacityAnimation):
(WebCore::TextureMapperNode::hasRunningTransformAnimation):
(WebCore::TextureMapperNode::syncAnimations):
(WebCore::copyTimingFunction):
(WebCore::copyAnimationValue):
(WebCore::TextureMapperAnimation::TextureMapperAnimation):
* platform/graphics/texmap/TextureMapperNode.h:
(WebCore::TextureMapperAnimation::create):
2011-05-11 Noam Rosenthal <noam.rosenthal@nokia.com>
Reviewed by Kenneth Rohde Christiansen.
[Texmap][Qt] Upstream texture-mapper changes from Qt's WebKit2 branch
https://bugs.webkit.org/show_bug.cgi?id=60439
Patch 11/12: Patch PluginView to build with TextureMapper on Linux.
No new tests. This is a build fix.
* platform/qt/QWebPageClient.h:
(QWebPageClient::setRootGraphicsLayer):
2011-05-11 Noam Rosenthal <noam.rosenthal@nokia.com>
Reviewed by Kenneth Rohde Christiansen.
[Texmap][Qt] Upstream texture-mapper changes from Qt's WebKit2 branch
https://bugs.webkit.org/show_bug.cgi?id=60439
Patch 10/12: Glue the TextureMapper refactoring into Webkit(1).
Pass a GraphicsLayer* instead of a PlatformLayer* to the QWebPageClient.
No new tests. Tests in LayoutTests/compositing cover this.
* platform/qt/QWebPageClient.h:
(QWebPageClient::setRootGraphicsLayer):
2011-05-11 Noam Rosenthal <noam.rosenthal@nokia.com>
Reviewed by Kenneth Rohde Christiansen.
[Texmap][Qt] Upstream texture-mapper changes from Qt's WebKit2 branch
https://bugs.webkit.org/show_bug.cgi?id=60439
Patch 9/12: Refactor TextureMapperNode for performance, readability and accuracy.
Changes include:
1. Support the new TextureMapperPlatformLayer for media & WebGL.
2. Use a pool for intermediate surfaces, to avoid constant allocating/freeing of textures.
3. Divide computation operations to different smaller functions.
4. Get rid of scissor/clip layers, use transformed clip instead.
5. Allow tiling for big layers.
No new tests. Tests in LayoutTests/compositing cover this.
* platform/graphics/texmap/GraphicsLayerTextureMapper.cpp:
(WebCore::GraphicsLayerTextureMapper::GraphicsLayerTextureMapper):
(WebCore::GraphicsLayerTextureMapper::setNeedsDisplayInRect):
(WebCore::GraphicsLayerTextureMapper::setContentsToMedia):
(WebCore::GraphicsLayerTextureMapper::platformLayer):
* platform/graphics/texmap/GraphicsLayerTextureMapper.h:
(WebCore::GraphicsLayerTextureMapper::setContentsNeedsDisplay):
(WebCore::GraphicsLayerTextureMapper::setContentsToCanvas):
(WebCore::GraphicsLayerTextureMapper::node):
* platform/graphics/texmap/TextureMapperNode.cpp:
(WebCore::TextureMapperSurfaceManager::getIntermediateSurface):
(WebCore::TextureMapperSurfaceManager::releaseIntermediateSurface):
(WebCore::toTextureMapperNode):
(WebCore::TextureMapperNode::rootLayer):
(WebCore::TextureMapperNode::setTransform):
(WebCore::TextureMapperNode::computePerspectiveTransformIfNeeded):
(WebCore::TextureMapperNode::countDescendantsWithContent):
(WebCore::TextureMapperNode::computeOverlapsIfNeeded):
(WebCore::TextureMapperNode::computeReplicaTransformIfNeeded):
(WebCore::TextureMapperNode::computeLocalTransformIfNeeded):
(WebCore::TextureMapperNode::needsToComputeBoundingRect):
(WebCore::TextureMapperNode::computeAllTransforms):
(WebCore::TextureMapperNode::computeBoundingRectFromRootIfNeeded):
(WebCore::TextureMapperNode::computeTiles):
(WebCore::TextureMapperNode::computeVisibleRectIfNeeded):
(WebCore::TextureMapperNode::renderContent):
(WebCore::TextureMapperNode::paint):
(WebCore::TextureMapperNode::targetRectForTileRect):
(WebCore::TextureMapperNode::paintSelf):
(WebCore::TextureMapperNode::compareGraphicsLayersZValue):
(WebCore::TextureMapperNode::sortByZOrder):
(WebCore::TextureMapperNode::paintSelfAndChildren):
(WebCore::TextureMapperNode::paintReflection):
(WebCore::TextureMapperNode::paintRecursive):
(WebCore::TextureMapperNode::~TextureMapperNode):
(WebCore::TextureMapperNode::resetDescendants):
(WebCore::TextureMapperNode::setContentScale):
(WebCore::TextureMapperNode::setVisibleRect):
(WebCore::TextureMapperNode::syncCompositingState):
(WebCore::TextureMapperNode::invalidateOverlaps):
(WebCore::TextureMapperNode::syncCompositingStateSelf):
(WebCore::TextureMapperNode::descendantsOrSelfHaveRunningAnimations):
* platform/graphics/texmap/TextureMapperNode.h:
(WebCore::TextureMapperPaintOptions::TextureMapperPaintOptions):
(WebCore::TextureMapperAnimation::create):
(WebCore::TextureMapperNode::TextureMapperNode):
(WebCore::TextureMapperNode::size):
(WebCore::TextureMapperNode::setOpacity):
(WebCore::TextureMapperNode::setTextureMapper):
(WebCore::TextureMapperNode::media):
(WebCore::TextureMapperNode::texture):
(WebCore::TextureMapperNode::targetRect):
(WebCore::TextureMapperNode::entireRect):
(WebCore::TextureMapperNode::contentSize):
(WebCore::TextureMapperNode::State::State):
(WebCore::deleteOwnedPtr):
2011-05-07 Noam Rosenthal <noam.rosenthal@nokia.com>
Reviewed by Kenneth Rohde Christiansen.
[Texmap][Qt] Upstream texture-mapper changes from Qt's WebKit2 branch
https://bugs.webkit.org/show_bug.cgi?id=60439
Patch 8/12: Changes to the GL backend of TextureMapper. The code for these changes is intertwined so it was hard to separate
them to different patches. This is the summary of what the changes do:
1. Use stencil for clipping instead of scissors, refactor beginClip/endClip functions to accomodate that.
2. Get rid of the "Target" program which forced an intermediate framebuffer for any content. Instead,
we upload the texture with BGRA from the start. Ports other than Qt can optimize this for their needs.
3. Use glGetAttribLocation instead of glBindAttribLocation; On some platforms we might be polluting the
GL context otherwise.
4. Use image UIDs (cache-key in Qt) instead of image pointers. This is important for images that change their
internal content.
5. Allow packing and unpacking. This is currently a stub, for future memory optimizations.
6. Put some of the initialization code here (beginPainting/endPainting).
7. Allow painting a texture via an ID instead of a BitmapTexture data type.
8. Get rid of makeContextCurrent / obtainCurrentContext. We only use texture-mapper when the context is current.
No new tests. Tests in LayoutTests/compositing test this.
* platform/graphics/opengl/TextureMapperGL.cpp:
(WebCore::debugGLCommand):
(WebCore::TextureMapperGLData::GlobalGLData::createShaderProgram):
(WebCore::TextureMapperGLData::GlobalGLData::GlobalGLData):
(WebCore::TextureMapperGLData::DirectlyCompositedImageRepository::findOrCreate):
(WebCore::TextureMapperGLData::DirectlyCompositedImageRepository::deref):
(WebCore::TextureMapperGLData::DirectlyCompositedImageRepository::~DirectlyCompositedImageRepository):
(WebCore::TextureMapperGLData::TextureMapperGLData):
(WebCore::BitmapTextureGL::id):
(WebCore::BitmapTextureGL::isOpaque):
(WebCore::BitmapTextureGL::relativeSize):
(WebCore::BitmapTextureGL::setTextureMapper):
(WebCore::BitmapTextureGL::pack):
(WebCore::BitmapTextureGL::unpack):
(WebCore::BitmapTextureGL::isPacked):
(WebCore::BitmapTextureGL::BitmapTextureGL):
(WebCore::TextureMapperGL::TextureMapperGL):
(WebCore::TextureMapperGL::initializeShaders):
(WebCore::TextureMapperGL::beginPainting):
(WebCore::TextureMapperGL::endPainting):
(WebCore::TextureMapperGL::drawTexture):
(WebCore::BitmapTextureGL::reset):
(WebCore::BitmapTextureGL::endPaint):
(WebCore::BitmapTextureGL::setContentsToImage):
(WebCore::createProjectionMatrix):
(WebCore::BitmapTextureGL::bind):
(WebCore::BitmapTextureGL::destroy):
(WebCore::TextureMapperGL::~TextureMapperGL):
(WebCore::TextureMapperGL::bindSurface):
(WebCore::TextureMapperGL::beginClip):
(WebCore::TextureMapperGL::endClip):
(WebCore::TextureMapperGL::createTexture):
* platform/graphics/opengl/TextureMapperGL.h:
(WebCore::TextureMapperGL::allowSurfaceForRoot):
(WebCore::TextureMapperGL::create):
(WebCore::TextureMapperGL::setGraphicsContext):
(WebCore::TextureMapperGL::graphicsContext):
(WebCore::TextureMapperGL::isOpenGLBacked):
* platform/graphics/qt/GraphicsContext3DQt.cpp:
(WebCore::GraphicsContext3DInternal::paintToTextureMapper):
(WebCore::GraphicsContext3DInternal::boundingRect):
(WebCore::GraphicsContext3DInternal::paint):
* platform/graphics/qt/MediaPlayerPrivateQt.cpp:
(WebCore::MediaPlayerPrivateQt::repaint):
(WebCore::MediaPlayerPrivateQt::paintToTextureMapper):
* platform/graphics/qt/MediaPlayerPrivateQt.h:
(WebCore::MediaPlayerPrivateQt::acceleratedRenderingStateChanged):
(WebCore::MediaPlayerPrivateQt::platformLayer):
2011-05-11 Noam Rosenthal <noam.rosenthal@nokia.com>
Reviewed by Kenneth Rohde Christiansen.
[Texmap][Qt] Upstream texture-mapper changes from Qt's WebKit2 branch
https://bugs.webkit.org/show_bug.cgi?id=60439
Patch 7/12: Allow a 3D-context (WebGL) to paint itself into a TextureMapper.
This allows using a WebGL canvas with CSS.
No new tests. Tests in LayoutTests/compositing/webgl cover this.
* platform/graphics/qt/GraphicsContext3DQt.cpp:
(WebCore::GraphicsContext3DInternal::paintToTextureMapper):
(WebCore::GraphicsContext3DInternal::boundingRect):
(WebCore::GraphicsContext3DInternal::paint):
* platform/graphics/qt/MediaPlayerPrivateQt.cpp:
(WebCore::MediaPlayerPrivateQt::repaint):
(WebCore::MediaPlayerPrivateQt::paintToTextureMapper):
* platform/graphics/qt/MediaPlayerPrivateQt.h:
(WebCore::MediaPlayerPrivateQt::acceleratedRenderingStateChanged):
(WebCore::MediaPlayerPrivateQt::platformLayer):
2011-05-11 Noam Rosenthal <noam.rosenthal@nokia.com>
Reviewed by Kenneth Rohde Christiansen.
[Texmap][Qt] Upstream texture-mapper changes from Qt's WebKit2 branch
https://bugs.webkit.org/show_bug.cgi?id=60439
Patch 6/12: Allow the Qt media player implementation to paint into a TextureMapper,
to allow videos to be composited.
No new tests. Tests in LayoutTests/compositing cover this.
* platform/graphics/qt/MediaPlayerPrivateQt.cpp:
(WebCore::MediaPlayerPrivateQt::repaint):
(WebCore::MediaPlayerPrivateQt::paintToTextureMapper):
* platform/graphics/qt/MediaPlayerPrivateQt.h:
(WebCore::MediaPlayerPrivateQt::acceleratedRenderingStateChanged):
(WebCore::MediaPlayerPrivateQt::platformLayer):
2011-05-11 John Bauman <jbauman@chromium.org>
Reviewed by Kenneth Russell.
Don't send zeros in TexImage if GL implementation handles that
https://bugs.webkit.org/show_bug.cgi?id=60581
Chromium already handles zeroing textures upon creation, so don't
bother zeroing them in WebKit, as that causes some unnecessary memcpys
of zeros.
No new tests as functionality is the same.
* html/canvas/WebGLRenderingContext.cpp:
(WebCore::WebGLRenderingContext::texImage2DBase):
* platform/graphics/GraphicsContext3D.cpp:
(WebCore::GraphicsContext3D::texImage2DResourceSafe):
* platform/graphics/GraphicsContext3D.h:
* platform/graphics/gtk/GraphicsContext3DGtk.cpp:
(WebCore::GraphicsContext3D::GraphicsContext3D):
* platform/graphics/mac/GraphicsContext3DMac.mm:
(WebCore::GraphicsContext3D::GraphicsContext3D):
* platform/graphics/qt/GraphicsContext3DQt.cpp:
(WebCore::GraphicsContext3D::GraphicsContext3D):
2011-05-11 Simon Fraser <simon.fraser@apple.com>
Attempt to fix Chromium Mac build.
* rendering/RenderThemeMac.mm:
(WebCore::RenderThemeMac::paintSliderThumb):
2011-05-11 Daniel Bates <dbates@rim.com>
Reviewed by Antonio Gomes.
[Qt] Extract code to set mouse event modifiers into common function
https://bugs.webkit.org/show_bug.cgi?id=60649
Consolidate code to set the keyboard modifiers for a mouse event into a common
function that can be used by both PlatformMouseEvent(QGraphicsSceneMouseEvent*, int clickCount)
and PlatformMouseEvent(QInputEvent*, int clickCount) so as to remove duplicate code.
No functionality was changed. So, no new tests.
* platform/qt/PlatformMouseEventQt.cpp:
(WebCore::mouseEventModifiersFromQtKeyboardModifiers): Added.
(WebCore::PlatformMouseEvent::PlatformMouseEvent): Modified to call mouseEventModifiersFromQtKeyboardModifiers().
2011-05-11 Levi Weintraub <leviw@chromium.org>
Reviewed by Eric Seidel.
Switch RenderBoxModelObject::paintBorder to use IntRect instead of four ints
https://bugs.webkit.org/show_bug.cgi?id=60591
Switching RenderBoxModelObject::paintBorder to use IntRect instead of four ints representing a rect.
No new tests since there is no functionality change.
* rendering/InlineFlowBox.cpp:
(WebCore::InlineFlowBox::paintBoxDecorations):
* rendering/RenderBox.cpp:
(WebCore::RenderBox::paintBoxDecorationsWithSize):
* rendering/RenderBoxModelObject.cpp:
(WebCore::RenderBoxModelObject::paintBorder):
* rendering/RenderBoxModelObject.h:
* rendering/RenderFieldset.cpp:
(WebCore::RenderFieldset::paintBoxDecorations):
* rendering/RenderTable.cpp:
(WebCore::RenderTable::paintBoxDecorations):
* rendering/RenderTableCell.cpp:
(WebCore::RenderTableCell::paintBoxDecorations):
2011-05-11 Sheriff Bot <webkit.review.bot@gmail.com>
Unreviewed, rolling out r86255.
http://trac.webkit.org/changeset/86255
https://bugs.webkit.org/show_bug.cgi?id=60660
REGRESSION (r86255): Lots of tests crashing in
CFWriteStreamCreateWithAllocatedBuffers on Windows 7 Release
(WebKit2 Tests) (Requested by aroben on #webkit).
* platform/network/ResourceHandle.h:
* platform/network/cf/CookieStorageCFNet.cpp:
(WebCore::currentCookieStorage):
(WebCore::defaultCookieStorage):
* platform/network/cf/ResourceHandleCFNet.cpp:
(WebCore::willSendRequest):
(WebCore::makeFinalRequest):
(WebCore::ResourceHandle::willSendRequest):
* platform/network/cf/ResourceRequestCFNet.cpp:
(WebCore::ResourceRequest::doUpdatePlatformRequest):
2011-05-11 Sam Weinig <sam@webkit.org>
Reviewed by Eric Seidel.
Frequent crashes beneath WebCore::ScriptElement::prepareScript
https://bugs.webkit.org/show_bug.cgi?id=60559
* html/parser/HTMLScriptRunner.cpp:
(WebCore::HTMLScriptRunner::runScript):
Add null check and explanation that we are keeping the ASSERT to help
track down the cause and produce a test.
2011-05-11 Noam Rosenthal <noam.rosenthal@nokia.com>
Reviewed by Kenneth Rohde Christiansen.
[Texmap][Qt] Upstream texture-mapper changes from Qt's WebKit2 branch
https://bugs.webkit.org/show_bug.cgi?id=60439
Patch 5/12: Implement the new TextureMapper functions for the Qt backend.
This allow non-rectangular clipping, some stub functions, and getting a unique
id for an image.
No new tests. Tests in LayoutTests/compositing cover this.
* platform/graphics/qt/TextureMapperQt.cpp:
(WebCore::TextureMapperQt::beginClip):
(WebCore::TextureMapperQt::endClip):
(WebCore::TextureMapperQt::viewportSize):
(WebCore::TextureMapperQt::setGraphicsContext):
(WebCore::TextureMapperQt::graphicsContext):
(WebCore::TextureMapperQt::drawTexture):
(WebCore::TextureMapperQt::beginPainting):
(WebCore::TextureMapperQt::endPainting):
(WebCore::RGBA32PremultimpliedBufferQt::beginPaint):
(WebCore::uidForImage):
* platform/graphics/qt/TextureMapperQt.h:
2011-05-11 Noam Rosenthal <noam.rosenthal@nokia.com>
Reviewed by Kenneth Rohde Christiansen.
[Texmap] Upstream texture-mapper changes from Qt's WebKit2 branch
https://bugs.webkit.org/show_bug.cgi?id=60439
Patch 3/12: TextureMapper shouldn't depend on OpenGL, but rather only allow the GL backend when
OpenGL is present.
No new tests. This is a build fix.
* WebCore.pri:
* WebCore.pro:
2011-05-11 Noam Rosenthal <noam.rosenthal@nokia.com>
Reviewed by Kenneth Rohde Christiansen.
[Texmap][Qt] Upstream texture-mapper changes from Qt's WebKit2 branch
https://bugs.webkit.org/show_bug.cgi?id=60439
Patch 2/12: Add a few functions to the TextureMapper API, allowing:
1. an entry/exit point for painting (beginPaint/endPaint)
2. Clipping with a matrix, since we use stencil instead of scissors
3. Draw a texture directly with an ID
4. Remove offset, since we're using real tiling
5. numberOfBytes calculation for textures, for memory management
No new tests. Tests in LayoutTests/compositing test this.
* platform/graphics/texmap/TextureMapper.h:
(WebCore::BitmapTexture::destroy):
(WebCore::BitmapTexture::allowOfflineTextureUpload):
(WebCore::BitmapTexture::bpp):
(WebCore::BitmapTexture::numberOfBytes):
(WebCore::TextureMapper::viewportSize):
(WebCore::TextureMapper::setViewportSize):
(WebCore::TextureMapper::allowPartialUpdates):
(WebCore::TextureMapper::isOpenGLBacked):
(WebCore::TextureMapper::setTransform):
(WebCore::TextureMapper::transform):
(WebCore::TextureMapper::beginPainting):
(WebCore::TextureMapper::endPainting):
2011-05-11 Noam Rosenthal <noam.rosenthal@nokia.com>
Reviewed by Kenneth Rohde Christiansen.
[Texmap][Qt] Upstream texture-mapper changes from Qt's WebKit2 branch
https://bugs.webkit.org/show_bug.cgi?id=60439
Patch 1/12: Change the TextureMapperPlatformLayer API to allow a 3D-context or a
media player to decide how to paint into the TextureMapper, rather than mandate specific
types of platform layers.
No new tests. Tests in LayoutTests/compositing test this.
* platform/graphics/GraphicsLayer.h:
* platform/graphics/texmap/TextureMapperPlatformLayer.h:
2011-05-11 Simon Fraser <simon.fraser@apple.com>
Reviewed by Darin Adler.
Flesh out RenderLayer's ScrollableArea implementation a little more
https://bugs.webkit.org/show_bug.cgi?id=60593
Override a few more ScrollableArea methods on RenderLayer
as a baby-step towards animating overflow div scrolling.
* platform/ScrollableArea.h:
(WebCore::ScrollableArea::visibleContentRect):
* rendering/RenderLayer.cpp:
(WebCore::RenderLayer::scrollPosition):
(WebCore::RenderLayer::minimumScrollPosition):
(WebCore::RenderLayer::maximumScrollPosition):
(WebCore::RenderLayer::visibleContentRect):
(WebCore::RenderLayer::overhangAmount):
(WebCore::RenderLayer::didCompleteRubberBand):
* rendering/RenderLayer.h:
(WebCore::RenderLayer::shouldSuspendScrollAnimations):
2011-05-11 Simon Fraser <simon.fraser@apple.com>
Reviewed by Dave Hyatt.
<rdar://problem/9421781> Slider thumb draws upside-down in WebKit2
<rdar://problem/9418025> Slider thumb has odd appearance
Fix two issues drawing the slider thumb.
To fix <rdar://problem/9421781>, if we detect that we're in WebKit2
by virtual of the FrameView not having a documentView, then flip
the graphics context.
To fix <rdar://problem/9418025>, we call -drawInteriorWithFrame:inView:
rather than -drawWithFrame:inView: so that AppKit doesn't draw a section
of track behind the thumb.
* rendering/RenderThemeMac.mm:
(WebCore::RenderThemeMac::paintSliderThumb):
2011-05-11 Jessie Berlin <jberlin@apple.com>
Reviewed by Steve Falkenburg.
[Windows WebKit2] Use cookies set in WebKit1
https://bugs.webkit.org/show_bug.cgi?id=60274
Share the default storage session between the UI and Web Processes.
* platform/network/cf/CookieStorageCFNet.cpp:
(WebCore::defaultSessionCookieStorage):
Keep track of the default storage session cookie storage.
(WebCore::currentCookieStorage):
Call defaultCookieStorage to get the default cookie storage.
(WebCore::defaultCookieStorage):
If there is a default storage session cookie storage, prefer that over getting the default
cookie storage. In the Web Process, asking CFNetwork for the default cookie storage directly
without specifying a storage session will not get the cookie storage being shared by the UI
and Web Processes.
* platform/network/ResourceHandle.h:
* platform/network/cf/ResourceHandleCFNet.cpp:
(WebCore::willSendRequest):
Make sure to set the current storage session on any requests used by the Web
Process before CFNetwork has to do anything with them, in order for CFNetwork to avoid
doing anything with the Web Process's default storage session (which is not the one shared
with the UI Process).
(WebCore::makeFinalRequest):
Ditto.
(WebCore::ResourceHandle::willSendRequest):
Ditto.
(WebCore::ResourceHandle::currentStorageSession):
If there is a Private Browsing storage session, return that.
If not, on Windows return the default storage session that is being shared with the UI
Process and on Mac return 0.
(WebCore::defaultCFURLStorageSession):
(WebCore::ResourceHandle::setDefaultStorageSession):
(WebCore::ResourceHandle::defaultStorageSession):
* platform/network/cf/ResourceRequestCFNet.cpp:
(WebCore::ResourceRequest::doUpdatePlatformRequest):
Make sure to set the current storage session on any requests used by the Web
Process before CFNetwork has to do anything with them, in order for CFNetwork to avoid
doing anything with the Web Process's default storage session (which is not the one shared
with the UI Process).
2011-05-11 Martin Robinson <mrobinson@igalia.com>
Try once more to fix the WinCairo build.
* platform/graphics/cairo/CairoUtilities.h: Include GraphicsTypes.h with a relative
include rather than a system include.
2011-05-11 Sam Weinig <sam@webkit.org>
Reviewed by Eric Seidel.
Stop including Console.h just to get Console enum types
https://bugs.webkit.org/show_bug.cgi?id=60607
Move MessageSource, MessageType and MessageLevel into its own
header and cleanup surrounding classes.
* GNUmakefile.list.am:
* WebCore.gypi:
* WebCore.pro:
* WebCore.vcproj/WebCore.vcproj:
* WebCore.xcodeproj/project.pbxproj:
* bindings/js/JSCustomXPathNSResolver.cpp:
* bindings/scripts/CodeGeneratorJS.pm:
* bindings/v8/V8Proxy.cpp:
* dom/ScriptExecutionContext.h:
* html/HTMLFormElement.cpp:
* html/parser/XSSFilter.cpp:
* inspector/ConsoleMessage.h:
* inspector/InjectedScriptHost.h:
* inspector/InspectorAgent.h:
* inspector/InspectorConsoleAgent.h:
* inspector/InspectorFrontendHost.h:
* inspector/InspectorInstrumentation.cpp:
* inspector/InspectorInstrumentation.h:
* loader/EmptyClients.h:
* loader/FrameLoader.cpp:
* loader/MainResourceLoader.cpp:
* loader/appcache/ApplicationCacheGroup.cpp:
* page/ChromeClient.h:
* page/Console.cpp:
(WebCore::Console::~Console):
* page/Console.h:
* page/ConsoleTypes.h: Added.
* page/ContentSecurityPolicy.cpp:
* page/Geolocation.h:
* workers/WorkerReportingProxy.h:
* xml/XMLHttpRequest.cpp:
2011-05-11 Dimitri Glazkov <dglazkov@chromium.org>
Unreviewed, rolling out r85650.
http://trac.webkit.org/changeset/85650
https://bugs.webkit.org/show_bug.cgi?id=59983
Triggers m_numNodeListCaches > 0 assert in gc-heavy sites.
* dom/ContainerNode.cpp:
(WebCore::ContainerNode::childrenChanged):
* dom/Node.cpp:
(WebCore::Node::~Node):
(WebCore::Node::setDocument):
(WebCore::Node::setTreeScopeRecursively):
(WebCore::Node::childNodes):
(WebCore::Node::registerDynamicNodeList):
(WebCore::Node::unregisterDynamicNodeList):
(WebCore::Node::notifyLocalNodeListsAttributeChanged):
(WebCore::Node::notifyLocalNodeListsChildrenChanged):
(WebCore::Node::getElementsByTagName):
(WebCore::Node::getElementsByTagNameNS):
(WebCore::Node::getElementsByName):
(WebCore::Node::getElementsByClassName):
* dom/Node.h:
* html/HTMLFormControlElement.cpp:
(WebCore::HTMLFormControlElement::labels):
2011-05-11 Eric Carlson <eric.carlson@apple.com>
Reviewed by Darin Adler.
Video track sometimes fails to draw.
https://bugs.webkit.org/show_bug.cgi?id=60635
<rdar://problem/9281951>
No new tests, covered by existing pixel tests.
* html/HTMLMediaElement.cpp:
(WebCore::HTMLMediaElement::loadResource): Set display mode to "Unknown" to force a
recalculation, and media engine notification, the next time the state machine runs.
2011-05-11 Adam Roben <aroben@apple.com>
WinCE build fixes for strict PassOwnPtr
* platform/graphics/wince/SharedBitmap.cpp:
(WebCore::SharedBitmap::createHandle):
(WebCore::SharedBitmap::clipBitmap):
Use nullptr instead of 0.
* platform/graphics/wince/SimpleFontDataWinCE.cpp: Keep LOOSE_PASS_OWN_PTR turned on for
this file until SimpleFontData::scaledFontData is dealt with on all platforms.
* platform/text/wince/TextCodecWinCE.cpp:
(WebCore::newTextCodecWinCE): Use adoptPtr.
2011-05-11 Chang Shu <cshu@webkit.org>
Reviewed by Antonio Gomes.
[Qt] Tab not working in editing/inserting/typing-tab-designmode-forms.html
https://bugs.webkit.org/show_bug.cgi?id=60477
PlatformKeyboardEvent.m_text should be set to "\t" instead of leaving as null.
The value is checked at EventHandler.cpp:2527 (r86166).
Function keyTextForKeyEvent is partially implemented and can be enhanced in
a need-base.
* platform/qt/PlatformKeyboardEventQt.cpp:
(WebCore::keyTextForKeyEvent):
(WebCore::PlatformKeyboardEvent::PlatformKeyboardEvent):
2011-05-11 Adam Roben <aroben@apple.com>
Use case-insensitive comparisons when checking plugin filenames on Windows
Windows paths are nearly always case-insensitive.
I couldn't think of a good way to test this.
Fixes <http://webkit.org/b/60633> WebKit1 loads Windows Presentation Foundation plugin, but
should not
Reviewed by Steve Falkenburg.
* plugins/win/PluginPackageWin.cpp:
(WebCore::PluginPackage::isPluginBlacklisted): Use equalIgnoringCase instead of == when
checking plugin filenames.
2011-05-11 Adam Roben <aroben@apple.com>
Turn on strict PassOwnPtr on Windows
Fixes <http://webkit.org/b/60632> Windows should build with strict PassOwnPtr enabled
Reviewed by Adam Barth.
* platform/graphics/win/SimpleFontDataWin.cpp: Keep LOOSE_PASS_OWN_PTR turned on for this
file until SimpleFontData::scaledFontData is dealt with on all platforms.
2011-05-11 Julien Chaffraix <jchaffraix@webkit.org>
Reviewed by Geoffrey Garen.
XPathResult should keep its node set's JS wrappers alive
https://bugs.webkit.org/show_bug.cgi?id=34231
The change added a custom mark function for JSC. V8 was already properly
marking the nodes so no change were done on the V8 side.
Tests: fast/xpath/xpath-iterator-result-should-mark-its-nodeset.html
fast/xpath/xpath-other-nodeset-result-should-mark-its-nodeset.html
fast/xpath/xpath-result-eventlistener-crash.html
fast/xpath/xpath-snapshot-result-should-mark-its-nodeset.html
* Android.jscbindings.mk:
* GNUmakefile.list.am:
* UseJSC.cmake:
* WebCore.gypi:
* WebCore.pro:
* WebCore.vcproj/WebCore.vcproj:
* WebCore.xcodeproj/project.pbxproj:
* bindings/js/JSBindingsAllInOne.cpp:
Added the new file to our build systems.
* bindings/js/JSXPathResultCustom.cpp: Added.
(WebCore::JSXPathResult::markChildren): Added code to mark the
XPathResult snapshot's nodes.
* xml/XPathResult.h:
(WebCore::XPathResult::value): Exposed this getter so that we can
mark our XPathValue.
* xml/XPathResult.idl: Told the IDL parser that we now need
a custom mark function.
2011-05-04 Philippe Normand <pnormand@igalia.com>
Reviewed by Martin Robinson.
[Gtk+] deadlock in gstreamer video player when exiting fullscreen
https://bugs.webkit.org/show_bug.cgi?id=58548
Block data flow towards the pipeline branch to remove to avoid
potential deadlocks during the PAUSED->READY transitions of the
elements to remove.
* platform/graphics/gstreamer/GStreamerGWorld.cpp:
(WebCore::GStreamerGWorld::exitFullscreen):
2011-05-11 Kent Tamura <tkent@chromium.org>
Reviewed by Hajime Morita.
The position of validation message bubble is wrong for non text fields.
https://bugs.webkit.org/show_bug.cgi?id=60341
Tests: fast/forms/validation-message-on-checkbox.html
fast/forms/validation-message-on-listbox.html
fast/forms/validation-message-on-menulist.html
fast/forms/validation-message-on-radio.html
fast/forms/validation-message-on-textarea.html
* css/html.css:
(::-webkit-validation-bubble-message):
Add white-space:normal in order not to inherit white-space:pre for <select>.
* html/ValidationMessage.cpp:
(WebCore::adjustBubblePosition):
Adjust the bubble position.
- The top of the bubble should be same as the bottom of the target control.
- The left of the bubble should be same as the left of the target control.
But If the left+32 is larger than the center of the target control,
left+32 should be at the center of the target control.
But the left position should not be less than 0.
(WebCore::ValidationMessage::buildBubbleTree): Call adjustBubblePosition().
2011-05-11 Emil A Eklund <eae@chromium.org>
Reviewed by Eric Seidel.
Convert RenderFlexibleBox to use IntPoint/IntSize instead of x,y/w,h pairs
https://bugs.webkit.org/show_bug.cgi?id=60592
Refactoring, covered by existing tests.
* rendering/RenderFlexibleBox.cpp:
(WebCore::RenderFlexibleBox::layoutBlock):
(WebCore::RenderFlexibleBox::layoutHorizontalBox):
(WebCore::RenderFlexibleBox::layoutVerticalBox):
(WebCore::RenderFlexibleBox::placeChild):
* rendering/RenderFlexibleBox.h:
2011-05-10 Ilya Tikhonovsky <loislo@chromium.org>
Unreviewed buildfix for strict OwnPtr.
* platform/audio/AudioBus.cpp:
(WebCore::AudioBus::createBufferFromRange):
(WebCore::AudioBus::createBySampleRateConverting):
(WebCore::AudioBus::createByMixingToMono):
* platform/audio/HRTFElevation.cpp:
(WebCore::HRTFElevation::createForSubject):
(WebCore::HRTFElevation::createByInterpolatingSlices):
* platform/audio/Panner.cpp:
(WebCore::Panner::create):
* platform/audio/Reverb.cpp:
(WebCore::Reverb::initialize):
* platform/audio/chromium/AudioBusChromium.cpp:
(WebCore::AudioBus::loadPlatformResource):
(WebCore::createBusFromInMemoryAudioFile):
2011-05-10 Adam Barth <abarth@webkit.org>
Build fix for font data madness. I've had to whitelist this on several
ports. They need to all be fixed at once.
* platform/graphics/chromium/SimpleFontDataChromiumWin.cpp:
2011-05-10 David Kilzer <ddkilzer@apple.com>
BUILD FIX for !ENABLE(TEXT_CARET) after r86039
* editing/FrameSelection.cpp:
(WebCore::DragCaretController::paintDragCaret): Added
UNUSED_PARAM(frame) for !ENABLE(TEXT_CARET).
2011-05-10 James Robinson <jamesr@chromium.org>
Reviewed by Kenneth Russell.
[chromium] Clean up setLayerRenderer() calls in LayerRendererChromium
https://bugs.webkit.org/show_bug.cgi?id=60524
This refactors the way LayerRendererChromium calls setLayerRenderer on its layers in a few ways to clean things
up:
*) Move the pre-paint call to setLayerRenderer from updatePropertiesAndRenderSurfaces() to paintLayerContents().
updatePropertiesAndRenderSurfaces() does too much and the layer renderer pointer only has to be up to date to do
the actual paint. Longer term we won't need to call this at all in order to call paint and this call will just
go away.
*) Tweaks updateCompositorResourcesRecursive() to be slightly shorter and less error-prone.
*) Explicitly set the LayerRendererChromium for each layer in the tree when transfering the root layer (used
during lost context). LayerChromium::setLayerRenderer checks if the new LayerRendererChromium is different
by comparing the pointer value to the old one. This check will be incorrect if there are multiple lost
contexts between a setLayerRenderer() call and a new LayerRendererChromium happens to be allocated at the
same address as the old one. An explicit call to setLayerRenderer() for every layer in the tree fixes this
since when this function is called the new and old LayerRendererChromium are still live and so they cannot
live at the same address.
The first two changes are purely refactors and do not change behavior. The third issue can't be tested via a
layout test directly as we don't have a way to induce a lost context on the compositor in a layout test.
* platform/graphics/chromium/LayerRendererChromium.cpp:
(WebCore::LayerRendererChromium::paintLayerContents):
(WebCore::LayerRendererChromium::clearLayerRendererRecursive):
(WebCore::LayerRendererChromium::transferRootLayer):
(WebCore::LayerRendererChromium::updatePropertiesAndRenderSurfaces):
(WebCore::LayerRendererChromium::updateCompositorResourcesRecursive):
* platform/graphics/chromium/LayerRendererChromium.h:
2011-05-10 Anton D'Auria <adauria@apple.com>
Reviewed by David Levin.
StorageTracker should report actual local storage usage on disk
https://bugs.webkit.org/show_bug.cgi?id=60558
Tests: storage/domstorage/localstorage/storagetracker/storage-tracker-6-create.html
storage/domstorage/localstorage/storagetracker/storage-tracker-7-usage.html
Use SQLiteFileSystem::getDatabaseFileSize to get actual usage by
an origin's local storage db. Factored out code that retrieves
path of local storage db.
* WebCore.exp.in: Sorted alphabetically StorageTracker's mangled
function names.
* storage/StorageTracker.cpp:
(WebCore::StorageTracker::syncDeleteOrigin): Uses helper function
to get path of origin's db
(WebCore::StorageTracker::databasePathForOrigin): New helper function.
that gets the path of an origin's local storage db from StorageTracker.
(WebCore::StorageTracker::diskUsageForOrigin): New API.
* storage/StorageTracker.h:
2011-05-10 Anton D'Auria <adauria@apple.com>
Reviewed by Alexey Proskuryakov.
Add ApplicationCache API to get disk usage per origin
https://bugs.webkit.org/show_bug.cgi?id=57127
ApplicationCacheStorage already provides an API to get per-origin
disk usage. This should be exposed through WebCore::ApplicationCache
to not be dependent on storage implementation.
Test: http/tests/appcache/origin-usage.html
* WebCore.exp.in:
* loader/appcache/ApplicationCache.cpp:
(WebCore::ApplicationCache::diskUsageForOrigin):
* loader/appcache/ApplicationCache.h:
2011-05-10 Pratik Solanki <psolanki@apple.com>
Reviewed by Alexey Proskuryakov.
Protect self in [WebCoreResourceHandleAsDelegate connection:didReceiveDataArray:]
https://bugs.webkit.org/show_bug.cgi?id=60594
<rdar://problem/9203259>
No tests since we don't have any bots testing CFNETWORK_DATA_ARRAY_CALLBACK.
* platform/network/mac/ResourceHandleMac.mm:
(-[WebCoreResourceHandleAsDelegate connection:didReceiveDataArray:]): The didReceiveData()
callback on client can result in the load being cancelled. This results in the delegate
(self) being freed. Protect self during the loop so we can check for m_handle and safely
return without crashing.
2011-05-10 Chris Guillory <chris.guillory@google.com>
Reviewed by James Robinson.
[ChromiumWin] Font::drawComplexText calls EndPlatformPaint without calling BeginPlatformPaint.
https://bugs.webkit.org/show_bug.cgi?id=59848
To test this I plan to make the non-printing device (BitmapPlatformDevice) fail
when EndPlatformPaint doesn't matchup with BeginPlatformPaint.
http://codereview.chromium.org/6949012/
* platform/graphics/chromium/FontChromiumWin.cpp:
(WebCore::Font::drawComplexText):
2011-05-10 Sheriff Bot <webkit.review.bot@gmail.com>
Unreviewed, rolling out r86195.
http://trac.webkit.org/changeset/86195
https://bugs.webkit.org/show_bug.cgi?id=60597
LayerOffset is a really bad name (Requested by smfr on
#webkit).
* GNUmakefile.list.am:
* WebCore.gypi:
* WebCore.pro:
* WebCore.vcproj/WebCore.vcproj:
* WebCore.xcodeproj/project.pbxproj:
* page/FrameView.cpp:
(WebCore::FrameView::paintScrollCorner):
* platform/graphics/LayerOffset.h: Removed.
* rendering/InlineTextBox.cpp:
(WebCore::InlineTextBox::paint):
(WebCore::InlineTextBox::paintCustomHighlight):
* rendering/InlineTextBox.h:
* rendering/RenderBox.cpp:
(WebCore::RenderBox::paintCustomHighlight):
* rendering/RenderBox.h:
* rendering/RenderImage.cpp:
(WebCore::RenderImage::paintReplaced):
* rendering/RenderLayer.cpp:
(WebCore::RenderLayer::paintScrollCorner):
(WebCore::RenderLayer::paintResizer):
* rendering/RenderListMarker.cpp:
(WebCore::RenderListMarker::paint):
* rendering/RenderObject.h:
* rendering/RenderScrollbar.cpp:
(WebCore::RenderScrollbar::paintPart):
* rendering/RenderScrollbarPart.cpp:
(WebCore::RenderScrollbarPart::paintIntoRect):
* rendering/RenderScrollbarPart.h:
* rendering/RenderTable.cpp:
(WebCore::RenderTable::paintObject):
(WebCore::RenderTable::paintMask):
* rendering/RenderTable.h:
* rendering/RenderWidget.cpp:
(WebCore::RenderWidget::paint):
* rendering/RootInlineBox.cpp:
(WebCore::RootInlineBox::paintCustomHighlight):
(WebCore::RootInlineBox::paint):
* rendering/RootInlineBox.h:
2011-05-10 Emil A Eklund <eae@chromium.org>
Reviewed by Eric Seidel.
Convert x,y and width,height pairs to IntPoint and IntSize for RenderLayer
https://bugs.webkit.org/show_bug.cgi?id=60409
Convert RenderLayer to use IntPoint for x,y pairs and IntSize for offsets and sizes.
Refactoring, covered by existing tests.
* rendering/RenderLayer.cpp:
(WebCore::RenderLayer::RenderLayer):
(WebCore::RenderLayer::updateLayerPositions):
(WebCore::RenderLayer::updateLayerPosition):
(WebCore::RenderLayer::scrollTo):
(WebCore::RenderLayer::visibleHeight):
(WebCore::RenderLayer::visibleWidth):
(WebCore::RenderLayer::scrollWidth):
(WebCore::RenderLayer::scrollHeight):
(WebCore::RenderLayer::computeScrollDimensions):
(WebCore::RenderLayer::updateScrollInfoAfterLayout):
* rendering/RenderLayer.h:
(WebCore::RenderLayer::x):
(WebCore::RenderLayer::y):
(WebCore::RenderLayer::setLocation):
(WebCore::RenderLayer::width):
(WebCore::RenderLayer::height):
(WebCore::RenderLayer::size):
(WebCore::RenderLayer::setWidth):
(WebCore::RenderLayer::setHeight):
(WebCore::RenderLayer::scrolledContentOffset):
(WebCore::RenderLayer::scrollXOffset):
(WebCore::RenderLayer::scrollYOffset):
(WebCore::RenderLayer::scrollOffset):
(WebCore::RenderLayer::scrollToXOffset):
(WebCore::RenderLayer::scrollToYOffset):
(WebCore::RenderLayer::relativePositionOffset):
2011-05-10 Levi Weintraub <leviw@chromium.org>
Reviewed by Eric Seidel.
Create LayerOffset class
https://bugs.webkit.org/show_bug.cgi?id=60490
Adding a LayerOffset class that will replace existing usage of tx/ty.
LayerOffset is necessary since these values are commonly used as both
a size and a point. Updating paintIntoRect to use this new class.
No new tests since this doesn't change any behavior.
* GNUmakefile.list.am:
* WebCore.gypi:
* WebCore.pro:
* WebCore.vcproj/WebCore.vcproj:
* WebCore.xcodeproj/project.pbxproj:
* page/FrameView.cpp:
(WebCore::FrameView::paintScrollCorner):
* platform/graphics/LayerOffset.h: Added.
(WebCore::LayerOffset::LayerOffset):
(WebCore::LayerOffset::x):
(WebCore::LayerOffset::y):
(WebCore::LayerOffset::setX):
(WebCore::LayerOffset::setY):
(WebCore::LayerOffset::toSize):
(WebCore::LayerOffset::toPoint):
(WebCore::operator+=):
(WebCore::operator-=):
(WebCore::operator+):
(WebCore::operator-):
(WebCore::operator==):
(WebCore::operator!=):
* rendering/RenderLayer.cpp:
(WebCore::RenderLayer::paintScrollCorner):
(WebCore::RenderLayer::paintResizer):
* rendering/RenderScrollbar.cpp:
(WebCore::RenderScrollbar::paintPart):
* rendering/RenderScrollbarPart.cpp:
(WebCore::RenderScrollbarPart::paintIntoRect):
* rendering/RenderScrollbarPart.h:
2011-05-10 Ryosuke Niwa <rniwa@webkit.org>
Reviewed by Darin Adler.
Make member variables of CaretBase private
https://bugs.webkit.org/show_bug.cgi?id=60454
Moved m_absCaretBounds, m_absoluteCaretRepaintBounds, m_absCaretBoundsDirty, and m_caretPaint back
from CaretBase to FrameSelection because they are only used in FrameSelection, and made the rest
of member variables in CaretBase private.
* editing/FrameSelection.cpp:
(WebCore::CaretBase::CaretBase): Takes CaretVisibility as an argument.
(WebCore::DragCaretController::DragCaretController):
(WebCore::FrameSelection::FrameSelection): Initializes m_absCaretBoundsDirty and m_caretPaint
now that they are part of FrameSelection again.
(WebCore::DragCaretController::setCaretPosition):
(WebCore::FrameSelection::setSelection):
(WebCore::CaretBase::clearCaretRect): Extracted from updateCaretRect.
(WebCore::CaretBase::updateCaretRect): No longer clears caret; all call sites (namely setCaretPosition
and localCaretRect) that used to call updateCaretRect now need to call clearCaretRect or updateCaretRect
based on some conditions.
(WebCore::FrameSelection::localCaretRect):
(WebCore::CaretBase::caretRepaintRect):
(WebCore::FrameSelection::recomputeCaretRect):
(WebCore::FrameSelection::paintCaret): Only calls CaretBase::paintCaret if m_caretPaint is true.
(WebCore::CaretBase::paintCaret): Removed an early exit for when m_caretPaint is false since m_caretPaint
has been moved from CaretBase to FrameSelection.
(WebCore::FrameSelection::focusedOrActiveStateChanged):
(WebCore::FrameSelection::updateAppearance):
(WebCore::FrameSelection::setCaretVisibility): Takes CaretVisibility instead of bool.
(WebCore::FrameSelection::caretBlinkTimerFired):
* editing/FrameSelection.h:
(WebCore::CaretBase::fastLocalCaretRect): Added; replaces localCaretRectForPainting.
(WebCore::CaretBase::shouldUpdateCaretRect): Added.
(WebCore::CaretBase::setCaretRectNeedsUpdate): Added.
(WebCore::CaretBase::setCaretVisibility): Added.
(WebCore::CaretBase::caretIsVisible): Added.
(WebCore::FrameSelection::setCaretRectNeedsUpdate): Added.
2011-05-10 James Robinson <jamesr@chromium.org>
Reviewed by Nate Chapin.
[chromium] Use parent/child terms for compositor tree structures consistently instead of superlayer/sublayer
https://bugs.webkit.org/show_bug.cgi?id=60588
GraphicsLayer uses parent/child terminology for tree structure, as does CCLayerImpl. LayerChromium was using
superlayer/sublayer terms, inherited from this code's branching from the platform/graphics/win/CACF code. The
mixed terminology is confusing and parent/child is more common, so this unifies everything to use parent/child.
No new tests, refactor only.
* platform/graphics/chromium/GraphicsLayerChromium.cpp:
(WebCore::GraphicsLayerChromium::setChildren):
(WebCore::GraphicsLayerChromium::addChild):
(WebCore::GraphicsLayerChromium::addChildAtIndex):
(WebCore::GraphicsLayerChromium::addChildBelow):
(WebCore::GraphicsLayerChromium::addChildAbove):
(WebCore::GraphicsLayerChromium::replaceChild):
(WebCore::GraphicsLayerChromium::removeFromParent):
(WebCore::GraphicsLayerChromium::setContentsToImage):
(WebCore::GraphicsLayerChromium::setContentsToCanvas):
(WebCore::GraphicsLayerChromium::setContentsToMedia):
(WebCore::GraphicsLayerChromium::hostLayerForChildren):
(WebCore::GraphicsLayerChromium::layerForParent):
(WebCore::GraphicsLayerChromium::updateChildList):
(WebCore::GraphicsLayerChromium::updateLayerPreserves3D):
(WebCore::GraphicsLayerChromium::setupContentsLayer):
* platform/graphics/chromium/GraphicsLayerChromium.h:
* platform/graphics/chromium/LayerChromium.cpp:
(WebCore::LayerChromium::LayerChromium):
(WebCore::LayerChromium::~LayerChromium):
(WebCore::LayerChromium::addChild):
(WebCore::LayerChromium::insertChild):
(WebCore::LayerChromium::removeFromParent):
(WebCore::LayerChromium::removeChild):
(WebCore::LayerChromium::replaceChild):
(WebCore::LayerChromium::indexOfChild):
(WebCore::LayerChromium::rootLayer):
(WebCore::LayerChromium::removeAllChildren):
(WebCore::LayerChromium::setChildren):
(WebCore::LayerChromium::parent):
(WebCore::LayerChromium::dumpLayer):
* platform/graphics/chromium/LayerChromium.h:
(WebCore::LayerChromium::children):
(WebCore::LayerChromium::setParent):
(WebCore::LayerChromium::numChildren):
* platform/graphics/chromium/LayerRendererChromium.cpp:
(WebCore::LayerRendererChromium::updatePropertiesAndRenderSurfaces):
(WebCore::LayerRendererChromium::updateCompositorResourcesRecursive):
(WebCore::LayerRendererChromium::dumpRenderSurfaces):
* platform/graphics/chromium/cc/CCLayerImpl.cpp:
(WebCore::CCLayerImpl::parent):
(WebCore::CCLayerImpl::descendantsDrawsContent):
* platform/graphics/chromium/cc/CCLayerImpl.h:
2011-05-10 Levi Weintraub <leviw@chromium.org>
Reviewed by Darin Adler.
Switch RenderBoxModelObject::paintNinePieceImage to use IntRect instead of four ints
https://bugs.webkit.org/show_bug.cgi?id=60586
Switch paintNinePieceImage to take an IntRect instead of four ints representing an IntRect!
No new tests as this is simply refactoring.
* rendering/InlineFlowBox.cpp:
(WebCore::InlineFlowBox::paintMask):
* rendering/RenderBox.cpp:
(WebCore::RenderBox::paintMaskImages):
* rendering/RenderBoxModelObject.cpp:
(WebCore::RenderBoxModelObject::paintNinePieceImage):
(WebCore::RenderBoxModelObject::paintBorder):
* rendering/RenderBoxModelObject.h:
2011-05-05 Jer Noble <jer.noble@apple.com>
Reviewed by Maciej Stachowiak.
Removing the full screen element via parent.innerHTML="" does not result in a webkitfullscreenchange event.
https://bugs.webkit.org/show_bug.cgi?id=60278
Handle the removal of a full screen element from within Node::willRemove() instead
of Document::nodeWillBeRemoved(). The new function Document::fullScreenElementWillBeRemoved() will
be called by Node::willRemove() to handle those changes which used to occur in nodeWillBeRemoved().
Test: fullscreen/full-screen-remove-children.html
* dom/Document.cpp:
(WebCore::Document::nodeWillBeRemoved): Removed the code checking for the full screen element.
(WebCore::Document::fullScreenElementWillBeRemoved): Added, moved from nodeWillBeRemoved.
* dom/Document.h:
* dom/Node.cpp:
(WebCore::Node::willRemove): Check to see if this is the current full screen element.
2011-05-10 Beth Dakin <bdakin@apple.com>
Reviewed by Darin Adler.
https://bugs.webkit.org/show_bug.cgi?id=60582
Crash switching overlay/non-overlay scrollbar preference still possible
-and corresponding-
<rdar://problem/9323983>
This patch prevents any work from being done on pages that are in the page cache
when the preference is switched.
When the Document is going into or coming out of the page cache, have the
FrameView inactivate or activate the Page's ScrollAnimators as appropriate.
* dom/Document.cpp:
(WebCore::Document::setInPageCache):
Iterate through the Page's ScrollableAreas setting the active state of the
ScrollAnimators.
* page/FrameView.cpp:
(WebCore::FrameView::setAnimatorsAreActive):
* page/FrameView.h:
ScrollAnimator has a new bit -- m_isActive. Right now m_isActive is always true
unless the ScrollAnimator belongs to a ScrollableArea that is in the page cache.
* platform/ScrollAnimator.cpp:
(WebCore::ScrollAnimator::ScrollAnimator):
* platform/ScrollAnimator.h:
(WebCore::ScrollAnimator::setIsActive):
(WebCore::ScrollAnimator::isActive):
ScrollAnimatorMac has a new bit -- m_needsScrollerStyleUpdate. This is set to true
when a ScrollAnimator is inactive and has received the
updateScrollerStyleForNewRecommendedScrollerStyle delegate notification. It
prevents any work from being done for this delegate until the ScrollAnimator
becomes active again.
* platform/mac/ScrollAnimatorMac.h:
(WebCore::ScrollAnimatorMac::setNeedsScrollerStyleUpdate):
(WebCore::ScrollAnimatorMac::needsScrollerStyleUpdate):
This delegate method has been re-factored into ScrollAnimatorMac::
updateScrollerStyle(). This way the meat of the function can be called by both the
delegate and ScrollAnimatorMac::setIsActive()
* platform/mac/ScrollAnimatorMac.mm:
(-[ScrollbarPainterControllerDelegate scrollerImpPair:updateScrollerStyleForNewRecommendedScrollerStyle:]):
(WebCore::ScrollAnimatorMac::ScrollAnimatorMac):
This override of ScrollAnimator::setIsActive() calls the base class, and then calls updateScrollerStyle() if needsScrollerStyleUpdate() is set to true.
(WebCore::ScrollAnimatorMac::setIsActive):
This is mostly the same as the old delegate method. Key differences are that if
the ScrollAnimator is inactive, we now setNeedsScrollerStyleUpdate(true) and
return early. We also only call scrollableArea()->scrollbarStyleChanged() if
needsScrollerStyleUpdate() is false since in the true case when we are restoring
from the page cache, this would be duplicated work.
(WebCore::ScrollAnimatorMac::updateScrollerStyle):
New WKSystemInterface function is needed to retrieve the scrollbar style.
* WebCore.exp.in:
* platform/mac/WebCoreSystemInterface.h:
* platform/mac/WebCoreSystemInterface.mm:
2011-05-10 Adam Barth <abarth@webkit.org>
Reviewed by David Levin.
Enable strict PassOwnPtr on Chromium
https://bugs.webkit.org/show_bug.cgi?id=60502
Technically there are a few bits in here that weren't reviewed by Dave,
but close enough for government work. This patch all fixes the
remaining strict PassOwnPtr violations on Chromium Linux.
* platform/graphics/chromium/PlatformCanvas.cpp:
(WebCore::PlatformCanvas::resize):
* platform/graphics/chromium/SimpleFontDataLinux.cpp:
* platform/graphics/skia/ImageBufferSkia.cpp:
(WebCore::ImageBuffer::ImageBuffer):
* platform/graphics/skia/PlatformContextSkia.cpp:
(WebCore::PlatformContextSkia::setSharedGraphicsContext3D):
2011-05-10 Brady Eidson <beidson@apple.com>
Reviewed by Alice Liu.
<rdar://problem/9343191> and https://bugs.webkit.org/show_bug.cgi?id=60572
REGRESSION - Canon On-screen Manual.app crashes after a search
No new tests - There's no way to reproduce the truly bizarre things Canon does in their app
that would reasonably fit in to our testing infrastructure.
In r66577 a new behavior was added where changing the "setLoadsImagesAutomatically" setting to "true" would immediately
start loading those images that had been disabled.
If this happens while a WebView is being dealloc'ed, and we don't know the WebView is being dealloc'ed, these new loads
can cause crashes downstream when the WebView memory has actually been free'd.
One example where this can happen is in Mac apps that subclass WebView then do work in their overridden dealloc methods.
And the Canon Onscreen Manual is one such app.
Starting these loads synchronously is not important. By putting it on a 0-delay, properly closing the Page cancels them
before they have a chance to really start.
See http://webkit.org/b/60572 for more discussion.
Add a timer to Settings and instead of calling setLoadsImagesAutomaticallyInAllFrames right
away when this pref changes, call it on a 0-delay:
* page/Settings.cpp:
(WebCore::Settings::Settings):
(WebCore::Settings::setLoadsImagesAutomatically):
(WebCore::Settings::loadsImagesAutomaticallyTimerFired):
* page/Settings.h:
2011-05-10 Martin Robinson <mrobinson@igalia.com>
Reviewed by Xan Lopez.
[GTK][WebKit2] GTK+ 2.x widget rendering fails after r85480
https://bugs.webkit.org/show_bug.cgi?id=59990
No new tests. This is covered by existing pixel tests.
* platform/gtk/GtkVersioning.c:
(getGdkDrawableSize): Added this helper method.
* platform/gtk/GtkVersioning.h: Added helper method declaration.
* platform/gtk/WidgetRenderingContext.cpp:
(WebCore::WidgetRenderingContext::WidgetRenderingContext): Call into the helper if
there is actually a GdkDrawable. If not, disable the sanity check.
2011-05-10 Martin Robinson <mrobinson@igalia.com>
Fix the GTK+ WebKit2 build. Add a CredentialsStorage stub for libsoup.
* GNUmakefile.list.am: Add stub to source list.
* platform/network/soup/CredentialStorageSoup.cpp: Added.
(WebCore::CredentialStorage::getFromPersistentStorage): Added stub.
(WebCore::CredentialStorage::get):
2011-05-09 David Hyatt <hyatt@apple.com>
Reviewed by Dan Bernstein.
<rdar://problem/9354979> REGRESSION (r83070-r83126): This conversation takes 10 seconds to load and makes mail unresponsive
Second attempts at a fix for this bug. Instead of removing the dirtying (which turned out to be needed in a few cases),
make dirtyLinesFromChangedChild mark a child as needing layout when it has to recur to the parent. Because the method already
aborts the recursion if selfNeedsLayout() is set on the parent, this has the effect of stopping the O(n^2) pathological
behavior, since you can use the selfNeedsLayout() bit to understand that you've dirtied the lines already.
* rendering/RenderLineBoxList.cpp:
(WebCore::RenderLineBoxList::dirtyLinesFromChangedChild):
2011-05-05 Brent Fulgham <bfulgham@webkit.org> and Martin Robinson <mrobinson@igalia.com>
Reviewed by Anders Carlsson.
[Cairo][WebKit2] Add an implementation of ShareableBitmap for Cairo
https://bugs.webkit.org/show_bug.cgi?id=60293
No new tests. This is covered by current pixel tests.
* platform/graphics/cairo/CairoUtilities.cpp:
(WebCore::copyCairoImageSurface): Abstract the code from WebCore::ImageBuffer::copyImage
into this helper which creates a deep copy of a Cairo image surface.
* platform/graphics/cairo/CairoUtilities.h: Added declaration.
* platform/graphics/cairo/ImageBufferCairo.cpp:
(WebCore::ImageBuffer::copyImage): Use the new helper.
* platform/graphics/cairo/ImageCairo.cpp: Abstract some of this logic
into the new drawSurfaceToContext method on PlatformContextCairo.
(WebCore::BitmapImage::draw):
* platform/graphics/cairo/PlatformContextCairo.cpp:
(WebCore::drawPatternToCairoContext): Added.
(WebCore::PlatformContextCairo::drawSurfaceToContext): Added.
* platform/graphics/cairo/PlatformContextCairo.h: Added declarations.
2011-05-10 Anders Carlsson <andersca@apple.com>
Attempt to fix Qt build.
* platform/network/qt/CredentialStorageQt.cpp:
(WebCore::CredentialStorage::get):
Add stub.
2011-05-10 Kenichi Ishibashi <bashi@chromium.org>
Reviewed by Tony Chang.
REGRESSION(r85013): platform/chromium-linux/fast/text/international/complex-joining-using-gpos.html is failing
https://bugs.webkit.org/show_bug.cgi?id=60079
Set resultingNumPoints = 0 so that harfbuzz uses the design coordinate
value pair.
* platform/graphics/chromium/HarfbuzzSkia.cpp:
(WebCore::getOutlinePoint): Just return HB_Err_Ok with resultingNumPoints = 0.
2011-05-10 Anders Carlsson <andersca@apple.com>
Reviewed by Sam Weinig.
Extra sign in required to view video on MobileMe Gallery album
https://bugs.webkit.org/show_bug.cgi?id=60560
<rdar://problem/9338693>
Add symbols required by WebKit2.
* WebCore.exp.in:
2011-05-10 Alexander Pavlov <apavlov@chromium.org>
Reviewed by Pavel Feldman.
Web Inspector: Styles sidebar is not updated upon changes in the Resources panel.
https://bugs.webkit.org/show_bug.cgi?id=60320
* inspector/front-end/ElementsPanel.js:
(WebInspector.ElementsPanel):
2011-05-06 Brett Wilson <brettw@chromium.org>
Reviewed by Adam Barth.
Use a File object to store the downloaded file reference rather than
just the path. This keeps the file and permissions in scope (using the
already-existing blob system) so the browser won't delete the file
when the load is complete. Instead, the file will be cleaned up when
the request objects are deleted.
https://bugs.webkit.org/show_bug.cgi?id=60281
* platform/network/chromium/ResourceResponse.cpp:
(WebCore::ResourceResponse::doPlatformCopyData):
(WebCore::ResourceResponse::doPlatformAdopt):
* platform/network/chromium/ResourceResponse.h:
(WebCore::ResourceResponse::downloadedFile):
(WebCore::ResourceResponse::setDownloadedFile):
2011-05-10 Eric Carlson <eric.carlson@apple.com>
Reviewed by Darin Adler.
Files that load quickly sometimes won't play.
https://bugs.webkit.org/show_bug.cgi?id=60556
<rdar://problem/9330567>
No new tests, this failure is very difficult to reproduce on some machines. The fix was
verified manually.
* platform/graphics/avfoundation/MediaPlayerPrivateAVFoundation.cpp:
(WebCore::MediaPlayerPrivateAVFoundation::playabilityKnown): Move the call to updateStates
to dispatchNotification so it is more obvious which state changes call it.
(WebCore::MediaPlayerPrivateAVFoundation::setNaturalSize): Correct logging typo.
(WebCore::MediaPlayerPrivateAVFoundation::metadataLoaded): Move updateStates call to
dispatchNotification.
(WebCore::MediaPlayerPrivateAVFoundation::rateChanged): Ditto.
(WebCore::MediaPlayerPrivateAVFoundation::loadedTimeRangesChanged): Ditto.
(WebCore::MediaPlayerPrivateAVFoundation::dispatchNotification): Call updateStates after
processing "size changed" notification so we detect all state changes. Consolidate
calls to updateStates here.
* platform/graphics/avfoundation/MediaPlayerPrivateAVFoundationObjC.mm:
(WebCore::MediaPlayerPrivateAVFoundationObjC::createVideoLayer): Name the video layer in
a debug build.
2011-05-10 Abhishek Arya <inferno@chromium.org>
Reviewed by Simon Fraser.
Add containsFloats call to hasOverhangingFloats.
https://bugs.webkit.org/show_bug.cgi?id=60537
Test: fast/block/float/no-overhanging-float-crash.html
* rendering/RenderBlock.cpp:
(WebCore::RenderBlock::repaintOverhangingFloats):
* rendering/RenderBlock.h:
(WebCore::RenderBlock::hasOverhangingFloats):
2011-05-10 Alexis Menard <alexis.menard@openbossa.org>
Reviewed by Antonio Gomes.
Warning fix on PluginPackage.cpp.
https://bugs.webkit.org/show_bug.cgi?id=60371
Warning fix on conversion from time_t to unsigned on Linux with GCC 4.6.0.
Let's use a struct rather than an array so we can pass everything to StringHasher.
* plugins/PluginPackage.cpp:
(WebCore::PluginPackage::hash):
2011-05-10 Andreas Kling <andreas.kling@nokia.com>
Rubber-stamped by Csaba Osztrogonác.
[Qt] Disable HAVE_QRAWFONT until Qt API stabilizes.
https://bugs.webkit.org/show_bug.cgi?id=60551
* WebCore.pro: Disable the line that enables HAVE_QRAWFONT
if the feature is found. Added a comment about why.
2011-05-10 Andrey Kosyakov <caseq@chromium.org>
Reviewed by Sam Weinig.
Web Inspector: inspector/console/console-shadow-dom-access.html crashes on mac debug
https://bugs.webkit.org/show_bug.cgi?id=60266
* bindings/objc/DOM.mm:
(kitClass): return DOMNode class for shadow root node
2011-05-10 Ben Murdoch <benm@google.com>
Reviewed by Steve Block.
Fix build in WebCore/xml/XSLTProcessorLibxslt.cpp
https://bugs.webkit.org/show_bug.cgi?id=60478
No new tests), build fix only.
* xml/XSLTProcessorLibxslt.cpp: Add CString.h include.
2011-05-10 Keith Kyzivat <keith.kyzivat@nokia.com>
Reviewed by Kenneth Rohde Christiansen.
[Qt] QtRawFont support should check based on feature, not version
https://bugs.webkit.org/show_bug.cgi?id=60513
Build fix - no tests added.
* WebCore.pro:
2011-05-10 Tony Gentilcore <tonyg@chromium.org>
Build fix: include ExceptionCode
https://bugs.webkit.org/show_bug.cgi?id=60538
* bindings/js/JSDOMBinding.cpp:
2011-05-06 Tony Gentilcore <tonyg@chromium.org>
Reviewed by Darin Adler.
Fix some unnecessary includes in headers
https://bugs.webkit.org/show_bug.cgi?id=60388
These were all found using the include-what-you-use clang plugin.
* css/CSSFontFaceSrcValue.h:
* css/CSSImageGeneratorValue.h:
* css/CSSParser.h:
* css/CSSPrimitiveValueCache.cpp:
* css/CSSPrimitiveValueCache.h:
* css/CSSStyleSelector.cpp:
* css/CSSStyleSelector.h:
* css/RGBColor.cpp:
* css/RGBColor.h:
* dom/EventTarget.h:
* dom/ExceptionBase.cpp:
* dom/ExceptionBase.h:
* dom/MessagePort.cpp:
* dom/Range.cpp:
* dom/Range.h:
* dom/SelectElement.cpp:
* dom/SelectElement.h:
* dom/TextEvent.cpp:
* dom/TextEvent.h:
* dom/Touch.cpp:
* dom/Touch.h:
* dom/TouchEvent.cpp:
* dom/TouchEvent.h:
* dom/XMLDocumentParser.h:
* dom/XMLDocumentParserScope.h:
* editing/AppendNodeCommand.cpp:
* editing/ApplyBlockElementCommand.h:
* editing/DeleteFromTextNodeCommand.cpp:
* editing/EditCommand.h:
* editing/Editor.h:
* editing/FormatBlockCommand.h:
* editing/IndentOutdentCommand.h:
* editing/InsertIntoTextNodeCommand.cpp:
* editing/InsertNodeBeforeCommand.cpp:
* editing/ReplaceSelectionCommand.h:
* editing/SetNodeAttributeCommand.h:
* html/HTMLSelectElement.h:
* html/canvas/CanvasRenderingContext2D.cpp:
* loader/appcache/DOMApplicationCache.cpp:
* page/EventSource.cpp:
* rendering/RenderListBox.cpp:
* rendering/RenderMenuList.cpp:
* rendering/RenderTextControlSingleLine.cpp:
* rendering/svg/RenderSVGInlineText.cpp:
* svg/SVGMatrix.h:
* websockets/WebSocket.cpp:
* workers/AbstractWorker.cpp:
* xml/XMLHttpRequest.cpp:
* xml/XPathExpression.cpp:
2011-05-10 MORITA Hajime <morrita@google.com>
Reviewed by Ryosuke Niwa.
REGRESSION(r73886): Frequent crashes in replaceSelectionWithFragment
https://bugs.webkit.org/show_bug.cgi?id=60090
SpellChecker uses TextCheckerClient, which belongs Page object,
which is possibly destroyed during SpellChecker's lifetime.
This change added to a guard before using TextCheckerClient to
ensure it being live.
No new tests, this is a speculative fix for a real crash.
* editing/Editor.cpp:
(WebCore::Editor::Editor):
* editing/SpellChecker.cpp:
(WebCore::SpellChecker::SpellChecker):
(WebCore::SpellChecker::client):
(WebCore::SpellChecker::canCheckAsynchronously):
(WebCore::SpellChecker::requestCheckingFor):
* editing/SpellChecker.h:
2011-05-09 Dan Bernstein <mitz@apple.com>
Try to fix the LLVM Compiler build.
* page/EventHandler.h:
2011-05-09 Daniel Cheng <dcheng@chromium.org>
Fix the build.
Really add the file this time.
* page/DragState.h: Added.
(WebCore::DragState::DragState):
2011-05-09 Daniel Cheng <dcheng@chromium.org>
Reviewed by Tony Chang.
Refactor RenderObject::draggableNode.
https://bugs.webkit.org/show_bug.cgi?id=60503
This patch lays the ground for refactoring the drag start logic. It moves draggableNode to
DragController to avoid the awkward plumbing of calling DragController from RenderObject and
also moves EventHandlerDragState out from EventHandler so it can be shared between
EventHandler and DragController where appropriate.
No new tests since there should be no behavior change.
* GNUmakefile.list.am:
* WebCore.gypi:
* WebCore.pro:
* WebCore.vcproj/WebCore.vcproj:
* WebCore.xcodeproj/project.pbxproj:
* page/DragController.cpp:
(WebCore::DragController::draggableNode):
(WebCore::DragController::mayStartDragAtEventLocation):
* page/DragController.h:
* page/DragState.h: Added.
(WebCore::DragState::DragState):
* page/EventHandler.cpp:
(WebCore::EventHandler::dragState):
(WebCore::EventHandler::eventMayStartDrag):
(WebCore::EventHandler::handleDrag):
* page/EventHandler.h:
* rendering/RenderObject.cpp:
* rendering/RenderObject.h:
2011-05-09 Luke Macpherson <macpherson@chromium.org>
Reviewed by Darin Adler.
Enable casting between CSSPrimitiveValue and FontWeight enum
https://bugs.webkit.org/show_bug.cgi?id=60516
No new tests added as no functionality changed.
* css/CSSPrimitiveValueMappings.h:
(WebCore::CSSPrimitiveValue::CSSPrimitiveValue):
Implement cast from FontWeight to CSSPrimitiveValue.
(WebCore::CSSPrimitiveValue::operator FontWeight):
Implement cast from CSSPrimitiveValue to FontWeight
* css/CSSStyleSelector.cpp:
(WebCore::CSSStyleSelector::applyProperty):
Use new cast to reduce code size.
Flatten switch inside if.
2011-05-09 Simon Fraser <simon.fraser@apple.com>
Move IconURL.* into the dom grouping.
* WebCore.xcodeproj/project.pbxproj:
2011-05-08 Jeremy Noble <jer.noble@apple.com>
Reviewed by Dan Bernstein.
Full-screen video disappears behind black screen with scrollbar, followed by crash at jerryseinfeld.com
https://bugs.webkit.org/show_bug.cgi?id=60449
Make RenderFullScreen a non-anonymous block, so that it does not get deleted when a parent attempts to
coalesce anonymous children.
Test: fullscreen/full-screen-remove-sibling.html
* rendering/RenderObject.h:
(WebCore::RenderObject::isAnonymousBlock):
2011-05-09 Jeremy Noble <jer.noble@apple.com>
Reviewed by Simon Fraser.
REGRESSION (r84706): Crazy rendering of vimeo.com after exiting fullscreen video
https://bugs.webkit.org/show_bug.cgi?id=60512
Initialize m_containsFullScreenElement.
* html/HTMLFrameElementBase.cpp:
(WebCore::HTMLFrameElementBase::HTMLFrameElementBase):
2011-05-09 Ryosuke Niwa <rniwa@webkit.org>
Reviewed by Darin Adler.
REGRESSION(r86039): DragCaretController doesn't draw caret
https://bugs.webkit.org/show_bug.cgi?id=60505
Removed an early exit in setCaretPosition introduced by r86039.
Also replaced calls to containerNode by deprecatedNode since rendering code doesn't
support container node for rendering caret.
* editing/FrameSelection.cpp:
(WebCore::DragCaretController::setCaretPosition):
2011-04-29 Martin Robinson <mrobinson@igalia.com>
Reviewed by Gustavo Noronha Silva.
[GTK] Untangle GtkAdjustments from WebCore
https://bugs.webkit.org/show_bug.cgi?id=59821
Completely remove the ability for WebKit to set GtkAdjustments on ScrollViews
and, consequently, Scrollbars. Handling adjustment updates can now be managed
in WebKit.
No new tests. This is covered by existing Scrollbar tests.
* platform/ScrollView.cpp: platformInit and platformDestroy can now be shared
between ScrollView.cpp and ScrollViewGtk.cpp.
* platform/ScrollView.h: Remove unused methods.
* platform/gtk/MainFrameScrollbarGtk.cpp:
(MainFrameScrollbarGtk::create): No longer need to pass in the adjustment.
(MainFrameScrollbarGtk::MainFrameScrollbarGtk): Update the comments here.
* platform/gtk/MainFrameScrollbarGtk.h: Lots of code removal.
* platform/gtk/ScrollViewGtk.cpp: Ditto.
(WebCore::ScrollView::createScrollbar): Ditto.
(WebCore::ScrollView::setScrollbarModes): Ditto.
* plugins/gtk/PluginViewGtk.cpp: This file needs the GRefPtrGtk.h include now
that it doesn't receive it transitively.
2011-05-09 Adam Barth <abarth@webkit.org>
Reviewed by Eric Seidel.
CSP should block Function constructor
https://bugs.webkit.org/show_bug.cgi?id=60240
Tests: http/tests/security/contentSecurityPolicy/function-constructor-allowed.html
http/tests/security/contentSecurityPolicy/function-constructor-blocked.html
* bindings/js/JSLazyEventListener.cpp:
(WebCore::JSLazyEventListener::initializeJSFunction):
- Update call site to the new entrypoint.
* bindings/v8/V8LazyEventListener.cpp:
(WebCore::V8LazyEventListener::prepareListenerObject):
- Add some comments about the rediculousness of this implementation.
2011-05-09 Chris Rogers <crogers@google.com>
Reviewed by Kenneth Russell.
Add RAII-style DenormalDisabler class to disable denormals which hurt audio performance
https://bugs.webkit.org/show_bug.cgi?id=60396
No new tests since audio API is not yet implemented.
* WebCore.gypi:
* WebCore.xcodeproj/project.pbxproj:
* platform/audio/DenormalDisabler.h: Added.
(WebCore::DenormalDisabler::DenormalDisabler):
(WebCore::DenormalDisabler::~DenormalDisabler):
(WebCore::DenormalDisabler::getCSR):
(WebCore::DenormalDisabler::setCSR):
* webaudio/AudioDestinationNode.cpp:
(WebCore::AudioDestinationNode::provideInput):
2011-05-09 Tony Chang <tony@chromium.org>
Reviewed by Eric Seidel.
Style cleanups in RenderFlexibleBox.cpp
https://bugs.webkit.org/show_bug.cgi?id=60504
No new tests, just refactoring.
* rendering/RenderFlexibleBox.cpp:
(WebCore::FlexBoxIterator::FlexBoxIterator): Use m_ for member variables, and
use class initializer list.
(WebCore::FlexBoxIterator::reset):
(WebCore::FlexBoxIterator::next):
(WebCore::RenderFlexibleBox::RenderFlexibleBox):
(WebCore::marginWidthForChild): Pull out common code used in calc*PrefWidths
(WebCore::RenderFlexibleBox::calcHorizontalPrefWidths):
(WebCore::RenderFlexibleBox::calcVerticalPrefWidths):
(WebCore::RenderFlexibleBox::computePreferredLogicalWidths):
(WebCore::RenderFlexibleBox::layoutBlock):
(WebCore::gatherFlexChildrenInfo): Rewrite uses of FlexBoxIterator into for statements
rather than while loops.
(WebCore::RenderFlexibleBox::layoutHorizontalBox): ditto
(WebCore::RenderFlexibleBox::layoutVerticalBox): ditto
(WebCore::RenderFlexibleBox::applyLineClamp):
(WebCore::RenderFlexibleBox::allowedChildFlex): Rename variables w/h to width/height.
2011-05-09 Eric Seidel <eric@webkit.org>
Reviewed by Ryosuke Niwa.
Abstract line deletion code into a function
https://bugs.webkit.org/show_bug.cgi?id=60501
No change in behavior, thus no testing.
* rendering/RenderBlockLineLayout.cpp:
(WebCore::deleteLineRange):
(WebCore::RenderBlock::layoutRunsAndFloats):
(WebCore::RenderBlock::determineStartPosition):
(WebCore::RenderBlock::matchedEndLine):
2011-05-09 Darin Adler <darin@apple.com>
Cleared some stray executable bits on source files.
* bindings/js/WorkerScriptDebugServer.cpp: Removed property svn:executable.
* bindings/js/WorkerScriptDebugServer.h: Removed property svn:executable.
2011-05-09 Erik Arvidsson <arv@chromium.org>
Reviewed by Darin Adler.
radiogroup: onchange not detected when triggered by keyboard
https://bugs.webkit.org/show_bug.cgi?id=32013
Test: fast/forms/radio-group-keyboard-change-event.html
* html/RadioInputType.cpp:
(WebCore::RadioInputType::handleKeydownEvent): Ensure that we do not check the radio input before we simulate the click
event. The simulated click event will check it for us but more importantly it will fire the "change" event as
expected.
2011-05-09 Adam Barth <abarth@webkit.org>
Reviewed by Daniel Bates.
XSSAuditor should be more selective about the <meta http-equivs> that it blocks
https://bugs.webkit.org/show_bug.cgi?id=60489
We don't need to filter most http-equiv attributes. This patch
introduces a blacklist for two that we probably do want to filter.
It's possible a whitelist would be more appropriate, but I'm inclined
to start with a blacklist and see how it works.
This patch will hopefully fix a false positive that is causing errors
with copy-and-pasted text in Gmail in some configurations (due to using
the <meta> tag to request UTF-8 encoding both in the pasted text and in
the page itself).
* html/parser/XSSFilter.cpp:
(WebCore::isNonCanonicalCharacter):
(WebCore::canonicalize):
(WebCore::isRequiredForInjection):
(WebCore::hasName):
(WebCore::findAttributeWithName):
(WebCore::isNameOfInlineEventHandler):
(WebCore::isDangerousHTTPEquiv):
- This function is new in the patch and includes a blacklist of
dangerous http-equivs. Many of the other functions listed here
are just being moved from an anonymous namespace to use static
for internal linkage.
(WebCore::containsJavaScriptURL):
(WebCore::decodeURL):
(WebCore::XSSFilter::eraseAttributeIfInjected):
2011-05-05 Matthew Delaney <mdelaney@apple.com>
Reviewed by Simon Fraser.
Remove canvas usage of roundToDevicePixels
https://bugs.webkit.org/show_bug.cgi?id=60331
No new tests. This could only affect canvases at non-integral scale factors. Our tests only run in 1.0x.
* html/canvas/CanvasRenderingContext2D.cpp:
(WebCore::CanvasRenderingContext2D::drawImage):
2011-05-09 Alexis Menard <alexis.menard@openbossa.org>
Reviewed by Andreas Kling.
[Qt] Fix the build on Embedded Linux.
https://bugs.webkit.org/show_bug.cgi?id=60347
qpa is the name for lighthouse but the old name for Qt for Embedded Linux should
still be used in order to build properly.
* WebCore.pri:
2011-05-09 Andreas Kling <kling@webkit.org>
Reviewed by Kenneth Rohde Christiansen.
[Qt] Simple small-caps text is displayed in uniform size.
https://bugs.webkit.org/show_bug.cgi?id=60492
Covered by existing tests.
* platform/graphics/qt/FontPlatformDataQt.cpp:
(WebCore::FontPlatformData::FontPlatformData): In the FontPlatformData constructor
used by SimpleFontData::scaledFontData(), pass the pixel size to both QFont and QRawFont
to make small caps and emphasis marks have the correct size when rendered through
the fast font path.
2011-05-09 Andreas Kling <kling@webkit.org>
Reviewed by Tor Arne Vestbø.
[Qt] Remove unused FontPlatformData functions.
https://bugs.webkit.org/show_bug.cgi?id=60485
* platform/graphics/qt/FontPlatformData.h:
(WebCore::FontPlatformData::bold): Removed.
(WebCore::FontPlatformData::family): Removed.
(WebCore::FontPlatformData::italic): Removed.
(WebCore::FontPlatformData::smallCaps): Removed.
2011-05-09 Robin Dunn <robin@alldunn.com>
Reviewed by Kevin Ollivier.
[wx] Add invalid file handle check.
https://bugs.webkit.org/show_bug.cgi?id=60483
* platform/wx/FileSystemWx.cpp:
(WebCore::closeFile):
2011-05-09 Robin Dunn <robin@alldunn.com>
Reviewed by Kevin Ollivier.
[wx] Update the popup menu code to grab the native control and initialize the
event handler properly.
https://bugs.webkit.org/show_bug.cgi?id=60482
* platform/wx/PopupMenuWx.cpp:
(WebCore::PopupMenuWx::PopupMenuWx):
(WebCore::PopupMenuWx::~PopupMenuWx):
(WebCore::PopupMenuWx::show):
2011-05-09 Robin Dunn <robin@alldunn.com>
Reviewed by Kevin Ollivier.
[wx] Make sure other controls adjust the rect to handle transforms, and turn off the
adjustment in 2.9.2+ where it is handled internally by wx.
Also add a couple drawing and focus handling fixes for text fields and menulist controls.
https://bugs.webkit.org/show_bug.cgi?id=60481
* platform/wx/RenderThemeWx.cpp:
(WebCore::getAdjustedRect):
(WebCore::RenderThemeWx::supportsFocus):
(WebCore::RenderThemeWx::paintButton):
(WebCore::RenderThemeWx::adjustTextFieldStyle):
(WebCore::RenderThemeWx::paintTextField):
(WebCore::RenderThemeWx::adjustMenuListStyle):
(WebCore::RenderThemeWx::paintMenuList):
(WebCore::RenderThemeWx::paintMenuListButton):
2011-05-09 Tony Gentilcore <tonyg@chromium.org>
Reviewed by Darin Adler.
Style fix: Function names must begin with lowercase letter and should not use "get".
https://bugs.webkit.org/show_bug.cgi?id=60475
* dom/Document.cpp:
(WebCore::Document::webkitVisibilityState):
* page/PageVisibilityState.cpp:
(WebCore::pageVisibilityStateString): Renamed.
* page/PageVisibilityState.h:
2011-05-09 Adam Barth <abarth@webkit.org>
Reviewed by Tony Gentilcore.
Make Chromium build with strict PassOwnPtr
https://bugs.webkit.org/show_bug.cgi?id=60461
Fix many, many PassOwnPtr nits.
* bindings/v8/V8Proxy.cpp:
(WebCore::V8Proxy::precompileScript):
* bindings/v8/custom/V8DOMWindowCustom.cpp:
(WebCore::WindowSetTimeoutImpl):
* bindings/v8/custom/V8MessageEventCustom.cpp:
(WebCore::V8MessageEvent::initMessageEventCallback):
* bindings/v8/custom/V8WorkerContextCustom.cpp:
(WebCore::SetTimeoutOrInterval):
* dom/Document.cpp:
(WebCore::Document::removedLastRef):
(WebCore::Document::detach):
* fileapi/DOMFileSystem.h:
(WebCore::DOMFileSystem::scheduleCallback):
* fileapi/FileSystemCallbacks.cpp:
(WebCore::FileSystemCallbacks::didOpenFileSystem):
(WebCore::ResolveURICallbacks::didOpenFileSystem):
* platform/graphics/chromium/GraphicsLayerChromium.cpp:
(WebCore::GraphicsLayer::create):
* platform/graphics/chromium/cc/CCLayerImpl.cpp:
(WebCore::CCLayerImpl::createRenderSurface):
* platform/graphics/gpu/BicubicShader.cpp:
(WebCore::BicubicShader::create):
* platform/graphics/gpu/ConvolutionShader.cpp:
(WebCore::ConvolutionShader::create):
* platform/graphics/gpu/LoopBlinnSolidFillShader.cpp:
(WebCore::LoopBlinnSolidFillShader::create):
* platform/graphics/gpu/SolidFillShader.cpp:
(WebCore::SolidFillShader::create):
* platform/graphics/gpu/TexShader.cpp:
(WebCore::TexShader::create):
* platform/graphics/gpu/Texture.cpp:
(WebCore::Texture::create):
* storage/chromium/DatabaseTrackerChromium.cpp:
(WebCore::TrackerRemoveOpenDatabaseTask::create):
* storage/chromium/SQLTransactionClientChromium.cpp:
(WebCore::NotifyDatabaseChangedTask::create):
2011-05-07 Martin Robinson <mrobinson@igalia.com>
Reviewed by Daniel Bates.
[Soup] Clean up error handling in ResourceHandleSoup
https://bugs.webkit.org/show_bug.cgi?id=60436
Instead of repeating the ResourceError creation twice, abstract
it into a helper method.
No new tests. This is a code cleanup.
* platform/network/soup/ResourceHandleSoup.cpp:
(WebCore::soupErrorShouldCauseLoadFailure): Added.
(WebCore::convertSoupErrorToResourceError): Added.
(WebCore::sendRequestCallback): Use the new helpers.
(WebCore::readCallback): Ditto.
2011-05-09 Abhishek Arya <inferno@chromium.org>
Reviewed by Dave Hyatt.
Regression(r85869): Restore dirty line logic in RenderInline::destroy.
https://bugs.webkit.org/show_bug.cgi?id=60448
Test: fast/inline/inline-destroy-dirty-lines-crash.html
* rendering/RenderInline.cpp:
(WebCore::RenderInline::destroy):
2011-05-09 Alejandro G. Castro <alex@igalia.com>
Reviewed by Martin Robinson.
[GTK] WidgetGtk setFocus can not access directly the widget in WK2
https://bugs.webkit.org/show_bug.cgi?id=60016
Added code to check the situation where we do not have direct
access to the widget. We use the page to grab the focus which
would send a request to the UIProcess in WK2.
* platform/gtk/WidgetGtk.cpp:
(WebCore::Widget::setFocus):
2011-05-09 Leandro Gracia Gil <leandrogracia@chromium.org>
Reviewed by Tony Gentilcore.
Media Stream API: add exception raising to the getUserMedia method.
https://bugs.webkit.org/show_bug.cgi?id=60387
Perform the required changes to support rising exceptions in the
navigator.getUserMedia method. This is required by the latest changes in the spec:
http://www.whatwg.org/specs/web-apps/current-work/multipage/dnd.html#dom-navigator-getusermedia
Test: fast/dom/MediaStream/argument-types.html
* bindings/js/JSNavigatorCustom.cpp:
(WebCore::JSNavigator::webkitGetUserMedia):
* bindings/v8/custom/V8NavigatorCustom.cpp:
(WebCore::V8Navigator::webkitGetUserMediaCallback):
* page/Navigator.cpp:
(WebCore::Navigator::webkitGetUserMedia):
* page/Navigator.h:
* page/Navigator.idl:
2011-05-09 Csaba Osztrogonác <ossy@webkit.org>
Unreviewed Qt 4.8 fix.
* WebCore.pro: 4.8 bots are updated with the full QRawFont APIs, so we can set HAVE_QRAWFONT now.
2011-05-09 Adam Roben <aroben@apple.com>
Windows project file fix after r86047
* WebCore.vcproj/WebCore.vcproj: Added missing closing tags.
2011-05-06 Chris Marrin <cmarrin@apple.com>
Reviewed by Darin Adler.
Fix layer names to say "tiled" and show CALayer addresses, not PlatformCALayer addresses
https://bugs.webkit.org/show_bug.cgi?id=60417
Layer name now has "Tiled" prepended if it is a TiledLayer. This is true on Mac where
the layer is a CATiledLayer and on Win where the layer is actually still a CACFLayer
but implements a tiled layer. I also now print the address of the CALayer or CACFLayer
instead of the PlatformCALayer everywhere.
* platform/graphics/ca/GraphicsLayerCA.cpp:
(WebCore::GraphicsLayerCA::swapFromOrToTiledLayer):
2011-05-09 Rob Buis <rbuis@rim.com>
Reviewed by Dirk Schulze.
Elements should assert that the QualifiedName given to their constructor corresponds to the Element constructed
https://bugs.webkit.org/show_bug.cgi?id=22576
Add tag name ASSERTs in SVG Element constructors.
No new tests, since no change in behaviour.
* svg/SVGAElement.cpp:
(WebCore::SVGAElement::SVGAElement):
* svg/SVGAltGlyphElement.cpp:
(WebCore::SVGAltGlyphElement::SVGAltGlyphElement):
* svg/SVGAnimateColorElement.cpp:
(WebCore::SVGAnimateColorElement::SVGAnimateColorElement):
* svg/SVGAnimateElement.cpp:
(WebCore::SVGAnimateElement::SVGAnimateElement):
* svg/SVGAnimateMotionElement.cpp:
(WebCore::SVGAnimateMotionElement::SVGAnimateMotionElement):
* svg/SVGAnimateTransformElement.cpp:
(WebCore::SVGAnimateTransformElement::SVGAnimateTransformElement):
* svg/SVGCircleElement.cpp:
(WebCore::SVGCircleElement::SVGCircleElement):
* svg/SVGClipPathElement.cpp:
(WebCore::SVGClipPathElement::SVGClipPathElement):
* svg/SVGCursorElement.cpp:
(WebCore::SVGCursorElement::SVGCursorElement):
* svg/SVGDefsElement.cpp:
(WebCore::SVGDefsElement::SVGDefsElement):
* svg/SVGDescElement.cpp:
(WebCore::SVGDescElement::SVGDescElement):
* svg/SVGEllipseElement.cpp:
(WebCore::SVGEllipseElement::SVGEllipseElement):
* svg/SVGFEBlendElement.cpp:
(WebCore::SVGFEBlendElement::SVGFEBlendElement):
* svg/SVGFEColorMatrixElement.cpp:
(WebCore::SVGFEColorMatrixElement::SVGFEColorMatrixElement):
* svg/SVGFEComponentTransferElement.cpp:
(WebCore::SVGFEComponentTransferElement::SVGFEComponentTransferElement):
* svg/SVGFECompositeElement.cpp:
(WebCore::SVGFECompositeElement::SVGFECompositeElement):
* svg/SVGFEConvolveMatrixElement.cpp:
(WebCore::SVGFEConvolveMatrixElement::SVGFEConvolveMatrixElement):
* svg/SVGFEDiffuseLightingElement.cpp:
(WebCore::SVGFEDiffuseLightingElement::SVGFEDiffuseLightingElement):
* svg/SVGFEDisplacementMapElement.cpp:
(WebCore::SVGFEDisplacementMapElement::SVGFEDisplacementMapElement):
* svg/SVGFEDistantLightElement.cpp:
(WebCore::SVGFEDistantLightElement::SVGFEDistantLightElement):
* svg/SVGFEDropShadowElement.cpp:
(WebCore::SVGFEDropShadowElement::SVGFEDropShadowElement):
* svg/SVGFEFloodElement.cpp:
(WebCore::SVGFEFloodElement::SVGFEFloodElement):
* svg/SVGFEFuncAElement.cpp:
(WebCore::SVGFEFuncAElement::SVGFEFuncAElement):
* svg/SVGFEFuncBElement.cpp:
(WebCore::SVGFEFuncBElement::SVGFEFuncBElement):
* svg/SVGFEFuncGElement.cpp:
(WebCore::SVGFEFuncGElement::SVGFEFuncGElement):
* svg/SVGFEFuncRElement.cpp:
(WebCore::SVGFEFuncRElement::SVGFEFuncRElement):
* svg/SVGFEGaussianBlurElement.cpp:
(WebCore::SVGFEGaussianBlurElement::SVGFEGaussianBlurElement):
* svg/SVGFEImageElement.cpp:
(WebCore::SVGFEImageElement::SVGFEImageElement):
* svg/SVGFEMergeElement.cpp:
(WebCore::SVGFEMergeElement::SVGFEMergeElement):
* svg/SVGFEMergeNodeElement.cpp:
(WebCore::SVGFEMergeNodeElement::SVGFEMergeNodeElement):
* svg/SVGFEMorphologyElement.cpp:
(WebCore::SVGFEMorphologyElement::SVGFEMorphologyElement):
* svg/SVGFEOffsetElement.cpp:
(WebCore::SVGFEOffsetElement::SVGFEOffsetElement):
* svg/SVGFEPointLightElement.cpp:
(WebCore::SVGFEPointLightElement::SVGFEPointLightElement):
* svg/SVGFESpecularLightingElement.cpp:
(WebCore::SVGFESpecularLightingElement::SVGFESpecularLightingElement):
* svg/SVGFESpotLightElement.cpp:
(WebCore::SVGFESpotLightElement::SVGFESpotLightElement):
* svg/SVGFETileElement.cpp:
(WebCore::SVGFETileElement::SVGFETileElement):
* svg/SVGFETurbulenceElement.cpp:
(WebCore::SVGFETurbulenceElement::SVGFETurbulenceElement):
* svg/SVGFilterElement.cpp:
(WebCore::SVGFilterElement::SVGFilterElement):
* svg/SVGFontElement.cpp:
(WebCore::SVGFontElement::SVGFontElement):
* svg/SVGFontFaceElement.cpp:
(WebCore::SVGFontFaceElement::SVGFontFaceElement):
* svg/SVGFontFaceFormatElement.cpp:
(WebCore::SVGFontFaceFormatElement::SVGFontFaceFormatElement):
* svg/SVGFontFaceNameElement.cpp:
(WebCore::SVGFontFaceNameElement::SVGFontFaceNameElement):
* svg/SVGFontFaceSrcElement.cpp:
(WebCore::SVGFontFaceSrcElement::SVGFontFaceSrcElement):
* svg/SVGFontFaceUriElement.cpp:
(WebCore::SVGFontFaceUriElement::SVGFontFaceUriElement):
* svg/SVGForeignObjectElement.cpp:
(WebCore::SVGForeignObjectElement::SVGForeignObjectElement):
* svg/SVGGElement.cpp:
(WebCore::SVGGElement::SVGGElement):
* svg/SVGGlyphElement.cpp:
(WebCore::SVGGlyphElement::SVGGlyphElement):
* svg/SVGHKernElement.cpp:
(WebCore::SVGHKernElement::SVGHKernElement):
* svg/SVGImageElement.cpp:
(WebCore::SVGImageElement::SVGImageElement):
* svg/SVGLineElement.cpp:
(WebCore::SVGLineElement::SVGLineElement):
* svg/SVGLinearGradientElement.cpp:
(WebCore::SVGLinearGradientElement::SVGLinearGradientElement):
* svg/SVGMPathElement.cpp:
(WebCore::SVGMPathElement::SVGMPathElement):
* svg/SVGMarkerElement.cpp:
(WebCore::SVGMarkerElement::SVGMarkerElement):
* svg/SVGMaskElement.cpp:
(WebCore::SVGMaskElement::SVGMaskElement):
* svg/SVGMetadataElement.cpp:
(WebCore::SVGMetadataElement::SVGMetadataElement):
* svg/SVGMissingGlyphElement.cpp:
(WebCore::SVGMissingGlyphElement::SVGMissingGlyphElement):
* svg/SVGPathElement.cpp:
(WebCore::SVGPathElement::SVGPathElement):
* svg/SVGPatternElement.cpp:
(WebCore::SVGPatternElement::SVGPatternElement):
* svg/SVGPolygonElement.cpp:
(WebCore::SVGPolygonElement::SVGPolygonElement):
* svg/SVGPolylineElement.cpp:
(WebCore::SVGPolylineElement::SVGPolylineElement):
* svg/SVGRadialGradientElement.cpp:
(WebCore::SVGRadialGradientElement::SVGRadialGradientElement):
* svg/SVGRectElement.cpp:
(WebCore::SVGRectElement::SVGRectElement):
* svg/SVGSVGElement.cpp:
(WebCore::SVGSVGElement::SVGSVGElement):
* svg/SVGScriptElement.cpp:
(WebCore::SVGScriptElement::SVGScriptElement):
* svg/SVGSetElement.cpp:
(WebCore::SVGSetElement::SVGSetElement):
* svg/SVGStopElement.cpp:
(WebCore::SVGStopElement::SVGStopElement):
* svg/SVGStyleElement.cpp:
(WebCore::SVGStyleElement::SVGStyleElement):
* svg/SVGSwitchElement.cpp:
(WebCore::SVGSwitchElement::SVGSwitchElement):
* svg/SVGSymbolElement.cpp:
(WebCore::SVGSymbolElement::SVGSymbolElement):
* svg/SVGTRefElement.cpp:
(WebCore::SVGTRefElement::SVGTRefElement):
* svg/SVGTSpanElement.cpp:
(WebCore::SVGTSpanElement::SVGTSpanElement):
* svg/SVGTextElement.cpp:
(WebCore::SVGTextElement::SVGTextElement):
* svg/SVGTextPathElement.cpp:
(WebCore::SVGTextPathElement::SVGTextPathElement):
* svg/SVGTitleElement.cpp:
(WebCore::SVGTitleElement::SVGTitleElement):
* svg/SVGUseElement.cpp:
(WebCore::SVGUseElement::SVGUseElement):
* svg/SVGVKernElement.cpp:
(WebCore::SVGVKernElement::SVGVKernElement):
* svg/SVGViewElement.cpp:
(WebCore::SVGViewElement::SVGViewElement):
2011-05-09 Shishir Agrawal <shishir@chromium.org>
Reviewed by Tony Gentilcore.
Implement Page Visibility API.
https://bugs.webkit.org/show_bug.cgi?id=54181
Tests: fast/events/page-visibility-iframe-delete-test.html
fast/events/page-visibility-iframe-move-test.html
fast/events/page-visibility-iframe-propagation-test.html
fast/events/page-visibility-transition-test.html
* CMakeLists.txt:
* GNUmakefile.list.am:
* WebCore.gypi:
* WebCore.pro:
* WebCore.vcproj/WebCore.vcproj:
* WebCore.xcodeproj/project.pbxproj:
* dom/Document.cpp:
(WebCore::Document::visibilityState):
(WebCore::Document::webkitVisibilityState):
(WebCore::Document::webkitIsVisible):
(WebCore::Document::dispatchVisibilityStateChangeEvent):
* dom/Document.h:
* dom/Document.idl:
* dom/EventNames.h:
* page/Frame.cpp:
(WebCore::Frame::dispatchVisibilityStateChangeEvent):
* page/Frame.h:
* page/Page.cpp:
(WebCore::Page::Page):
(WebCore::Page::setVisibilityState):
(WebCore::Page::visibilityState):
* page/Page.h:
* page/PageVisibilityState.cpp: Added.
(WebCore::GetPageVisibilityStateString):
* page/PageVisibilityState.h: Added.
2011-05-09 Luke Macpherson <macpherson@chromium.org>
Reviewed by Eric Seidel.
Implement expanding CSS border properties in CSSStyleApplyProperty.
https://bugs.webkit.org/show_bug.cgi?id=60456
No new tests added as no functionality changed.
* css/CSSStyleApplyProperty.cpp:
(WebCore::CSSStyleApplyProperty::CSSStyleApplyProperty):
Create CSS border expanding property handlers.
* css/CSSStyleSelector.cpp:
(WebCore::CSSStyleSelector::applyProperty):
Remove property handlers that are no longer needed.
2011-05-08 Ryosuke Niwa <rniwa@webkit.org>
Reviewed by Kent Tamura.
selectstart event does not fire when selection is made via select all
https://bugs.webkit.org/show_bug.cgi?id=60376
Fire selectstart event when a user selects all contents (i.e. document.execCommand('SelectAll')) in
document, editable region, or text control.
Tests: editing/selection/selectstart-on-selectall.html
editing/selection/selectstart-prevent-selectall.html
* dom/Node.h: Removed canSelectAll and selectAll as they are left over from WMLSelectElement.
* editing/FrameSelection.cpp:
(WebCore::FrameSelection::selectAll): Dispatch selectstart event on selectStartTarget, which is
input element or textarea element when the current selection is inside a shadow DOM, and the root
editable element if it's inside a non-shadow editable region, and the body element otherwise.
* html/HTMLSelectElement.h: Made canSelectAll and selectAll public since they are no longer
declared in Node.
2011-05-08 Luke Macpherson <macpherson@chromium.org>
Reviewed by Eric Seidel.
Make RenderStyle::setColumnBreakInside() reject unsupported enum values.
https://bugs.webkit.org/show_bug.cgi?id=60249
No new tests added as no functionality changed.
* css/CSSStyleSelector.cpp:
(WebCore::CSSStyleSelector::applyProperty):
Remove special-case code and use appropriate macro.
* rendering/style/RenderStyle.h:
(WebCore::InheritedFlags::setColumnBreakInside):
Assert that supported values are used.
2011-05-08 Ryosuke Niwa <rniwa@webkit.org>
Reviewed by Darin Adler.
Extract a DragCaretController from FrameSelection
https://bugs.webkit.org/show_bug.cgi?id=60273
Extracted CaretBase and DragCaretController from FrameSelection. CaretBase is a base class for
DragCaretController and FrameSelection and provides functions to paint caret.
Since DragCaretController doesn't need to store selection, it only holds one VisiblePosition.
* WebCore.exp.in:
* editing/FrameSelection.cpp:
(WebCore::CaretBase::CaretBase): Added.
(WebCore::DragCaretController::DragCaretController): Added; Set m_caretVisible true.
(WebCore::DragCaretController::isContentRichlyEditable): Added.
(WebCore::FrameSelection::FrameSelection): Several member variables are move to CaretBase.
(WebCore::DragCaretController::setCaretPosition): Extracted from FrameSelection::setSelection.
(WebCore::FrameSelection::setSelection): Removed an early exit for DragCaretController.
(WebCore::clearRenderViewSelection): Extracted from FrameSelection::respondToNodeModification.
(WebCore::DragCaretController::nodeWillBeRemoved): Extracted from FrameSelection::nodeWillBeRemoved
and respondToNodeModification. Note that the position DragCaretController holds is equivalent to
FrameSelection's base or start so when removingNodeRemovesPosition returns true for m_position,
we used to execute the first if clause and cleared render tree selection and DOM tree selection.
This is exactly what new DragCaretController::nodeWillBeRemoved does.
(WebCore::FrameSelection::nodeWillBeRemoved): Simplified early exist conditions.
(WebCore::FrameSelection::respondToNodeModification): Calls clearRenderViewSelection.
(WebCore::CaretBase::updateCaretRect): Takes document, caretPosition, selection type, and boolean isOrphaned.
Note that we can't obtain the document from caretPosition because VisiblePosition can be null even if
FrameSelection's start was not null.
(WebCore::caretRendersInsideNode): Moved; Made static local.
(WebCore::CaretBase::caretRenderer): Extracted from FrameSelection::caretRenderer.
(WebCore::FrameSelection::caretRenderer): Calls CaretBase::caretRenderer.
(WebCore::DragCaretController::caretRenderer): Ditto.
(WebCore::FrameSelection::localCaretRect): Calls updateCaretRect with extra arguments.
(WebCore::CaretBase::absoluteBoundsForLocalRect): Moved from FrameSelection; Takes Node*.
(WebCore::CaretBase::caretRepaintRect): Ditto.
(WebCore::FrameSelection::recomputeCaretRect): Calls absoluteBoundsForLocalRect, caretRepaintRect,
and shouldRepaintCaret with extra arguments.
(WebCore::CaretBase::shouldRepaintCaret): Takes a boolean isContentEditable.
(WebCore::FrameSelection::invalidateCaretRect): Calls CaretBase::invalidateCaretRect.
(WebCore::CaretBase::invalidateCaretRect): Extracted from FrameSelection::invalidateCaretRect.
(WebCore::FrameSelection::paintCaret): Calls CaretBase::paintCaret.
(WebCore::CaretBase::paintCaret): Extracted from FrameSelection::paintCaret.
(WebCore::FrameSelection::updateAppearance): Removed an assertion that this function is never called for
DragCaretController.
(WebCore::DragCaretController::paintDragCaret): Moved from FrameSelection::paintDragCaret.
* editing/FrameSelection.h:
(WebCore::CaretBase::localCaretRectForPainting): Added.
(WebCore::DragCaretController::isContentEditable): Added.
(WebCore::DragCaretController::hasCaret): Added.
(WebCore::DragCaretController::caretPosition): Added.
(WebCore::DragCaretController::clear): Added.
* page/DragController.cpp:
(WebCore::DragController::tryDocumentDrag): Uses DragCaretController.
(WebCore::DragController::dispatchTextInputEventFor): Ditto.
(WebCore::DragController::concludeEditDrag): Ditto.
(WebCore::DragController::placeDragCaret): Ditto.
* page/Page.cpp:
(WebCore::Page::Page): Instantiates DragCaretController instead of FrameSelection.
* page/Page.h:
(WebCore::Page::dragCaretController): Returns DragCaretController* instead of FrameSelection*.
* rendering/RenderBlock.cpp:
(WebCore::RenderBlock::paintCaret): Uses FrameSelection and DragCaretController.
2011-05-08 Dan Bernstein <mitz@apple.com>
Reviewed by Darin Adler.
<rdar://problem/9401853> REGRESSION (r78846): Insufficient expansion for justification when there are multiple inline boxes
https://bugs.webkit.org/show_bug.cgi?id=60432
* rendering/InlineTextBox.h:
(WebCore::InlineTextBox::setExpansion): Changed back to take a int, since the m_expansion member
variable is a (truncated) int anyway.
* rendering/RenderBlockLineLayout.cpp:
(WebCore::computeExpansionForJustifiedText): Changed the expansion local variable into an int
so that the right amount is added to the total width. Also changed to use an early return.
2011-05-08 Pavel Feldman <pfeldman@chromium.org>
Not reviewed: ignore 0 responses in the inspector network instrumentation.
* inspector/front-end/NetworkManager.js:
2011-05-08 Jarkko Sakkinen <jarkko.j.sakkinen@gmail.com>
Reviewed by Kenneth Rohde Christiansen.
[Qt] GraphicsContext3D::getImageData() does not retrieve image data correctly
https://bugs.webkit.org/show_bug.cgi?id=58556
Tests: fast/canvas/webgl/gl-teximage.html
* platform/graphics/qt/GraphicsContext3DQt.cpp:
(WebCore::GraphicsContext3D::getImageData):
2011-05-07 Dan Bernstein <mitz@apple.com>
Reviewed by Maciej Stachowiak.
<rdar://problem/9403055> REGRESSION (r85499): Inline images in iChat overflow their chat bubbles
https://bugs.webkit.org/show_bug.cgi?id=60443
Test: fast/replaced/table-percent-height-positioned.html
* rendering/RenderBox.cpp:
(WebCore::RenderBox::computeReplacedLogicalHeightUsing): Do not apply the logic to prevent precent-height
replaced elements from being squeezed by table cells when the replaced element is positioned (and thus
doesn’t affect the table cell’s height).
2011-05-07 Sheriff Bot <webkit.review.bot@gmail.com>
Unreviewed, rolling out r86016.
http://trac.webkit.org/changeset/86016
https://bugs.webkit.org/show_bug.cgi?id=60445
caused crashes on the WK2 Windows bots (Requested by
jessieberlin on #webkit).
* platform/network/ResourceHandle.h:
* platform/network/cf/CookieStorageCFNet.cpp:
(WebCore::currentCookieStorage):
(WebCore::defaultCookieStorage):
* platform/network/cf/ResourceHandleCFNet.cpp:
(WebCore::willSendRequest):
(WebCore::makeFinalRequest):
(WebCore::ResourceHandle::willSendRequest):
* platform/network/cf/ResourceRequestCFNet.cpp:
(WebCore::ResourceRequest::doUpdatePlatformRequest):
2011-05-07 Sheriff Bot <webkit.review.bot@gmail.com>
Unreviewed, rolling out r85974.
http://trac.webkit.org/changeset/85974
https://bugs.webkit.org/show_bug.cgi?id=60444
broke browser tests (Requested by inferno-sec on #webkit).
* platform/network/chromium/ResourceResponse.cpp:
(WebCore::ResourceResponse::doPlatformCopyData):
(WebCore::ResourceResponse::doPlatformAdopt):
* platform/network/chromium/ResourceResponse.h:
(WebCore::ResourceResponse::downloadFilePath):
(WebCore::ResourceResponse::setDownloadFilePath):
2011-05-07 Jessie Berlin <jberlin@apple.com>
Reviewed by Steve Falkenburg.
[Windows WebKit2] Use cookies set in WebKit1
https://bugs.webkit.org/show_bug.cgi?id=60274
Share the default storage session between the UI and Web Processes.
* platform/network/cf/CookieStorageCFNet.cpp:
(WebCore::defaultSessionCookieStorage):
Keep track of the default storage session cookie storage.
(WebCore::currentCookieStorage):
Call defaultCookieStorage to get the default cookie storage.
(WebCore::defaultCookieStorage):
If there is a default storage session cookie storage, prefer that over getting the default
cookie storage. In the Web Process, asking CFNetwork for the default cookie storage directly
without specifying a storage session will not get the cookie storage being shared by the UI
and Web Processes.
* platform/network/ResourceHandle.h:
* platform/network/cf/ResourceHandleCFNet.cpp:
(WebCore::willSendRequest):
Make sure to set the current storage session on any requests used by the Web
Process before CFNetwork has to do anything with them, in order for CFNetwork to avoid
doing anything with the Web Process's default storage session (which is not the one shared
with the UI Process).
(WebCore::makeFinalRequest):
Ditto.
(WebCore::ResourceHandle::willSendRequest):
Ditto.
(WebCore::ResourceHandle::currentStorageSession):
If there is a Private Browsing storage session, return that.
If not, on Windows return the default storage session that is being shared with the UI
Process and on Mac return 0.
(WebCore::defaultCFURLStorageSession):
(WebCore::ResourceHandle::setDefaultStorageSession):
(WebCore::ResourceHandle::defaultStorageSession):
* platform/network/cf/ResourceRequestCFNet.cpp:
(WebCore::ResourceRequest::doUpdatePlatformRequest):
Make sure to set the current storage session on any requests used by the Web
Process before CFNetwork has to do anything with them, in order for CFNetwork to avoid
doing anything with the Web Process's default storage session (which is not the one shared
with the UI Process).
2011-05-07 Joe Mason <jmason@rim.com>
Reviewed by Daniel Bates.
FrameLoader::isProcessingUserGesture is wrong in dispatchWillPerformClientRedirect
https://bugs.webkit.org/show_bug.cgi?id=52211
Create a UserGestureIndicator when calling the clientRedirected callback.
* loader/NavigationScheduler.cpp:
(WebCore::ScheduledURLNavigation::didStartTimer):
(WebCore::ScheduledURLNavigation::didStopTimer):
(WebCore::ScheduledFormSubmission::didStartTimer):
(WebCore::ScheduledFormSubmission::didStopTimer):
2011-05-06 Jon Lee <jonlee@apple.com>
Reviewed by Alice Liu.
Crash when sending a wheel event to a node with no shadow ancestor node
https://bugs.webkit.org/show_bug.cgi?id=60429
<rdar://problem/9389619>
* page/EventHandler.cpp:
(WebCore::EventHandler::handleWheelEvent):add check to see if the shadow ancestor node of the node that was under the mouse exists before trying to dispatch the wheel event to it.
2011-05-06 Kent Tamura <tkent@chromium.org>
Reviewed by Ryosuke Niwa.
Eliminate WebCore/dom/InputElement.{cpp,h}
https://bugs.webkit.org/show_bug.cgi?id=60262
- Fold in all of the code of InputElement.{cpp,h} into HTMLInputElement
and TextFieldInputType.
- Change the return type of Node::toInputElement():
InputElement* -> HTMLInputElement*
No new tests. This change should not change the existing behaviour.
* CMakeLists.txt: Remove InpuntElement.cpp and/or InputElement.h.
* GNUmakefile.list.am: ditto.
* WebCore.exp.in: Add symbols of functions exposed to WebKit.
* WebCore.gypi: Remove InpuntElement.cpp and/or InputElement.h.
* WebCore.pro: ditto.
* WebCore.vcproj/WebCore.vcproj: ditto.
* WebCore.xcodeproj/project.pbxproj: ditto.
* accessibility/AXObjectCache.cpp:
(WebCore::AXObjectCache::textMarkerDataForVisiblePosition):
Follow the return type change of Node::toInputElement().
* accessibility/AccessibilityRenderObject.cpp:
(WebCore::AccessibilityRenderObject::isPasswordField): ditto.
(WebCore::AccessibilityRenderObject::isIndeterminate): ditto.
(WebCore::AccessibilityRenderObject::isNativeCheckboxOrRadio): ditto.
(WebCore::AccessibilityRenderObject::isChecked): ditto.
* css/CSSStyleSelector.cpp:
(WebCore::CSSStyleSelector::canShareStyleWithElement): ditto.
(WebCore::CSSStyleSelector::SelectorChecker::checkOneSelector): ditto.
* dom/CheckedRadioButtons.cpp:
(WebCore::CheckedRadioButtons::removeButton): ditto.
* dom/DOMAllInOne.cpp: Remove InputElement.h.
* dom/InputElement.cpp: Removed.
* dom/InputElement.h: Removed.
* dom/Node.cpp:
(WebCore::Node::toInputElement):
Change the return type from InputElement* to HTMLInputElement*.
* dom/Node.h: ditto.
* html/HTMLInputElement.cpp:
(WebCore::HTMLInputElement::HTMLInputElement):
(WebCore::HTMLInputElement::formControlName):
(WebCore::HTMLInputElement::tooLong):
(WebCore::HTMLInputElement::updateFocusAppearance):
(WebCore::HTMLInputElement::aboutToUnload):
(WebCore::HTMLInputElement::handleFocusEvent):
(WebCore::HTMLInputElement::handleBlurEvent):
(WebCore::HTMLInputElement::updateType):
(WebCore::HTMLInputElement::parseMappedAttribute):
(WebCore::HTMLInputElement::size):
(WebCore::HTMLInputElement::copyNonAttributeProperties):
(WebCore::HTMLInputElement::value):
(WebCore::HTMLInputElement::suggestedValue):
(WebCore::HTMLInputElement::setSuggestedValue):
(WebCore::HTMLInputElement::setValue):
(WebCore::HTMLInputElement::setValueFromRenderer):
(WebCore::HTMLInputElement::setFileListFromRenderer):
(WebCore::HTMLInputElement::setDefaultName):
(WebCore::HTMLInputElement::maxLength):
(WebCore::HTMLInputElement::cacheSelection):
(WebCore::formatCodes): Moved from InputElement.
(WebCore::cursorPositionToMaskIndex): ditto.
(WebCore::HTMLInputElement::isConformToInputMask): ditto.
(WebCore::HTMLInputElement::validateInputMask): ditto.
(WebCore::HTMLInputElement::setWapInputFormat): ditto.
(WebCore::HTMLInputElement::notifyFormStateChanged): ditto.
(WebCore::HTMLInputElement::parseMaxLengthAttribute): ditto.
(WebCore::HTMLInputElement::updateValueIfNeeded):ditto.
* html/HTMLInputElement.h:
- Add data members which were defined in InputElementData.
- Make some functions public because the public interface InputElement is removed.
- Make some functions non-virtual because they don't override
corresponding virtual functions of InputElement anymore.
(WebCore::HTMLInputElement::toInputElement):
Follow the return type change of Node::toInputElement().
(WebCore::HTMLInputElement::isIndeterminate):
(WebCore::HTMLInputElement::isAutofilled):
(WebCore::HTMLInputElement::supportsMaxLength):
(WebCore::HTMLInputElement::cachedSelectionStart):
(WebCore::HTMLInputElement::cachedSelectionEnd):
* html/HTMLTextAreaElement.cpp: Remove unused InputElement.h.
* html/InputType.cpp:
(WebCore::InputType::handleBeforeTextInsertedEvent): Remove the code.
* html/InputType.h: Update for the above.
* html/TextFieldInputType.cpp:
(WebCore::replaceEOLAndLimitLength): Moved from InputElement.cpp.
(WebCore::TextFieldInputType::sanitizeValue): Implement with replaceEOLAndLimitLength().
(WebCore::TextFieldInputType::handleBeforeTextInsertedEvent):
Move the code from InputElement::handleBeforeTextInsertedEvent().
* html/TextFieldInputType.h: Update declarations.
* rendering/RenderTextControlSingleLine.cpp:
- Remove ASSERT(node()->isHTMLElement()) because it is checked in the constructor.
- Follow the return type change of inputElement().
(WebCore::RenderTextControlSingleLine::RenderTextControlSingleLine):
Make sure node() is an HTMLInputElement instance.
(WebCore::RenderTextControlSingleLine::addSearchResult):
(WebCore::RenderTextControlSingleLine::stopSearchEventTimer):
(WebCore::RenderTextControlSingleLine::showPopup):
(WebCore::RenderTextControlSingleLine::hidePopup):
(WebCore::RenderTextControlSingleLine::subtreeHasChanged):
(WebCore::RenderTextControlSingleLine::updateFromElement):
(WebCore::RenderTextControlSingleLine::createInnerBlockStyle):
(WebCore::RenderTextControlSingleLine::createResultsButtonStyle):
(WebCore::RenderTextControlSingleLine::createCancelButtonStyle):
(WebCore::RenderTextControlSingleLine::createInnerSpinButtonStyle):
(WebCore::RenderTextControlSingleLine::createOuterSpinButtonStyle):
(WebCore::RenderTextControlSingleLine::createSpeechButtonStyle):
(WebCore::RenderTextControlSingleLine::visibilityForCancelButton):
(WebCore::RenderTextControlSingleLine::startSearchEventTimer):
(WebCore::RenderTextControlSingleLine::searchEventTimerFired):
(WebCore::RenderTextControlSingleLine::valueChanged):
(WebCore::RenderTextControlSingleLine::setTextFromItem):
(WebCore::RenderTextControlSingleLine::inputElement):
* rendering/RenderTextControlSingleLine.h:
Change the return type of inputElement(): InputElement* -> HTMLInputElement*.
* rendering/RenderTheme.cpp:
(WebCore::RenderTheme::isChecked):
Follow the return type change of Node::toInputElement().
(WebCore::RenderTheme::isIndeterminate): ditto.
(WebCore::RenderTheme::shouldHaveSpinButton):
Change the parameter type: InputElement* -> HTMLInputElement*.
* rendering/RenderTheme.h: ditto.
2011-05-06 Adam Barth <abarth@webkit.org>
Reviewed by Eric Seidel.
Implement "Report-Only" mode for CSP
https://bugs.webkit.org/show_bug.cgi?id=60402
This mode lets web sites try out CSP by getting violation reports (and
console spam) without actually changing the behavior of their web sites.
Test: http/tests/security/contentSecurityPolicy/report-only.html
* dom/Document.cpp:
(WebCore::Document::processHttpEquiv):
* loader/FrameLoader.cpp:
(WebCore::FrameLoader::didBeginDocument):
* page/ContentSecurityPolicy.cpp:
(WebCore::ContentSecurityPolicy::ContentSecurityPolicy):
(WebCore::ContentSecurityPolicy::didReceiveHeader):
(WebCore::ContentSecurityPolicy::reportViolation):
(WebCore::ContentSecurityPolicy::checkInlineAndReportViolation):
(WebCore::ContentSecurityPolicy::checkEvalAndReportViolation):
(WebCore::ContentSecurityPolicy::checkSourceAndReportViolation):
(WebCore::ContentSecurityPolicy::allowJavaScriptURLs):
* page/ContentSecurityPolicy.h:
2011-05-06 Beth Dakin <bdakin@apple.com>
Reviewed by Darin Adler.
https://bugs.webkit.org/show_bug.cgi?id=60421
Custom scrollbars nested inside an overlay scrollbar overflow region end up
painting twice
-and corresponding-
<rdar://problem/9389072>
Be sure not to paint custom css scrollbars during the special overlay-scrollbar
painting pass.
* rendering/RenderLayer.cpp:
(WebCore::RenderLayer::paintOverflowControls):
2011-05-06 Cary Clark <caryclark@google.com>
Reviewed by Eric Seidel.
Add utility for converting SkCanvas to CGContext
https://bugs.webkit.org/show_bug.cgi?id=59808
Skia on Mac uses Skia to render WebKit, and CG
to render UI elements. The CG elements need a
transcribed graphics context that preserves the
canvas matrix, and the canvas clip.
The BitLockerSkia utility class sets up a CGContext
from the SkCanvas, locks the bitmap's bits, and
releases the lock when the class goes out of scope.
Each time the CGContext is retrieved, it is rebuilt.
This permits the caller to modify the same canvas
between calls.
This change adds utilities but does not modify any
existing code. For now, there are no callers to these
utilities, so there is no functional change.
No new tests.
* platform/graphics/skia/BitLockerSkia.cpp: Added.
(WebCore::SkMatrixToCGAffineTransform): Conversion utility.
(WebCore::BitLockerSkia::BitLockerSkia): Takes SkCanvas.
(WebCore::BitLockerSkia::~BitLockerSkia): Unlocks, cleans up.
(WebCore::BitLockerSkia::release): Internal private helper.
(WebCore::BitLockerSkia::cgContext): Returns CGContextRef.
* platform/graphics/skia/BitLockerSkia.h: Added.
2011-05-06 Martin Robinson <mrobinson@igalia.com>
Reviewed by Xan Lopez.
[GTK] [WebKit2] WebView::windowToScreen needs an implementation
https://bugs.webkit.org/show_bug.cgi?id=55960
Abstract coordinate system translation code from WebKit into WebCore.
This will allow the code to be shared between WebKit and WebKit2. The code
now lives in a new GtkUtilities.cpp helper file.
* GNUmakefile.list.am: Added GtkUtilities to the source list.
* platform/gtk/GtkUtilities.cpp: Added.
(WebCore::convertWidgetRectToScreenRect):
* platform/gtk/GtkUtilities.h: Added.
2011-05-06 Martin Robinson <mrobinson@igalia.com>
Reviewed by Xan Lopez.
Remove some unnecessary static methods in ResourceHandleSoup.
No new tests. This is only a small cleanup.
* platform/network/soup/ResourceHandleSoup.cpp:
(WebCore::restartedCallback): Call ResourceResponse::updateFromSoupMessage directly.
(WebCore::gotHeadersCallback):Ditto.
(WebCore::contentSniffedCallback):Ditto.
(WebCore::sendRequestCallback):Ditto.
(WebCore::ResourceHandle::defaultSession): Create the soup session directly.
2011-05-06 Martin Robinson <mrobinson@igalia.com>
Reviewed by Xan Lopez.
[Soup] ResourceHandles are leaked on 304 responses
https://bugs.webkit.org/show_bug.cgi?id=60413
Always call cleanupSoupRequestOperation, even when the request was not
canceled. Before the code would call didFinishLoading and then never clean up
the request.
No new tests. This simply fixes a memory leak.
* platform/network/soup/ResourceHandleSoup.cpp:
(WebCore::sendRequestCallback):
2011-05-06 Adam Barth <abarth@webkit.org>
Reviewed by Eric Seidel.
Add disable-javascript-urls CSP directive
https://bugs.webkit.org/show_bug.cgi?id=60301
This CSP directive is not in the CSP spec. This patch is somewhat of
an experiment to see whether this feature is useful. Based on our
implementation experience, we will coordinate with folks via the W3C to
see if this makes sense to add to the spec.
Test: http/tests/security/contentSecurityPolicy/javascript-urls-blocked.html
* page/ContentSecurityPolicy.cpp:
(WebCore::ContentSecurityPolicy::ContentSecurityPolicy):
(WebCore::ContentSecurityPolicy::allowJavaScriptURLs):
(WebCore::ContentSecurityPolicy::addDirective):
* page/ContentSecurityPolicy.h:
2011-05-06 Brett Wilson <brettw@chromium.org>
Reviewed by Adam Barth.
Use a File object to store the downloaded file reference rather than
just the path. This keeps the file and permissions in scope (using the
already-existing blob system) so the browser won't delete the file
when the load is complete. Instead, the file will be cleaned up when
the request objects are deleted.
https://bugs.webkit.org/show_bug.cgi?id=60281
* platform/network/chromium/ResourceResponse.cpp:
(WebCore::ResourceResponse::doPlatformCopyData):
(WebCore::ResourceResponse::doPlatformAdopt):
* platform/network/chromium/ResourceResponse.h:
(WebCore::ResourceResponse::downloadedFile):
(WebCore::ResourceRespon