https://bugs.webkit.org/show_bug.cgi?id=39516, back end support for column-span property.
[WebKit-https.git] / WebCore / ChangeLog
1 2010-05-21  David Hyatt  <hyatt@apple.com>
2
3         Reviewed by Dan Bernstein.
4
5         https://bugs.webkit.org/show_bug.cgi?id=39516, back end support for column-span property.
6
7         * css/CSSComputedStyleDeclaration.cpp:
8         (WebCore::):
9         (WebCore::CSSComputedStyleDeclaration::getPropertyCSSValue):
10         * css/CSSParser.cpp:
11         (WebCore::CSSParser::parseValue):
12         * css/CSSPropertyNames.in:
13         * css/CSSStyleSelector.cpp:
14         (WebCore::CSSStyleSelector::applyProperty):
15         * rendering/style/RenderStyle.h:
16         (WebCore::InheritedFlags::columnSpan):
17         (WebCore::InheritedFlags::setColumnSpan):
18         (WebCore::InheritedFlags::initialColumnSpan):
19         * rendering/style/StyleMultiColData.cpp:
20         (WebCore::StyleMultiColData::StyleMultiColData):
21         (WebCore::StyleMultiColData::operator==):
22         * rendering/style/StyleMultiColData.h:
23
24 2010-05-21  Jer Noble  <jer.noble@apple.com>
25
26         Reviewed by Anders Carlsson.
27
28         Disable full-screen video on Windows
29         https://bugs.webkit.org/show_bug.cgi?id=39506
30         rdar://problem/8012516
31         
32         Disable full-screen video through MediaPlayerPrivateVisualContext since
33         we no longer use GWorlds and QuickTime's built in full-screen support.
34         
35         Media layout tests updated with new expected results.        
36         
37         * platform/graphics/win/MediaPlayerPrivateQuickTimeVisualContext.cpp:
38         (WebCore::MediaPlayerPrivateQuickTimeVisualContext::supportsFullscreen):
39
40 2010-05-21  Simon Fraser  <simon.fraser@apple.com>
41
42         Reviewed by Dan Bernstein.
43
44         Avoid creating huge tiled layers with accelerated compositing
45         https://bugs.webkit.org/show_bug.cgi?id=39515
46         
47         Constrain the size of huge composited layers, to avoid bad behavior. We only
48         need to do this if we detect that we need a tiled layer, since we'll make tiled
49         layers for elements over a certain size that need to draw already.
50         
51         Constrain the size by attempting to shrink the longer dimension first.
52
53         Test: compositing/geometry/huge-layer.html
54
55         * platform/graphics/mac/GraphicsLayerCA.h:
56         * platform/graphics/mac/GraphicsLayerCA.mm:
57         (WebCore::GraphicsLayerCA::updateLayerPosition):
58         (WebCore::GraphicsLayerCA::updateLayerSize):
59         (WebCore::GraphicsLayerCA::constrainedSize):
60
61 2010-05-21  David Hyatt  <hyatt@apple.com>
62
63         Reviewed by Dan Bernstein.
64
65         https://bugs.webkit.org/show_bug.cgi?id=39420, :visited not working with background-color.
66
67         Make the RenderStyle color accessors private.  This forces callers to use visitedDependentColor
68         instead (or to make the decision to become friends of the RenderStyle class in order to get access
69         to the real style information).
70
71         Modified history/self-is-visited.html to also test background colors.
72
73         * WebCore.base.exp:
74         * accessibility/AccessibilityTable.cpp:
75         (WebCore::AccessibilityTable::isTableExposableThroughAccessibility):
76         * accessibility/mac/AccessibilityObjectWrapper.mm:
77         (AXAttributeStringSetStyle):
78         * css/CSSComputedStyleDeclaration.cpp:
79         (WebCore::CSSComputedStyleDeclaration::currentColorOrValidColor):
80         * css/CSSComputedStyleDeclaration.h:
81         * css/SVGCSSStyleSelector.cpp:
82         (WebCore::colorFromSVGColorCSSValue):
83         * editing/ApplyStyleCommand.cpp:
84         (WebCore::ApplyStyleCommand::editingStyleAtPosition):
85         (WebCore::prepareEditingStyleToApplyAt):
86         (WebCore::removeStylesAddedByNode):
87         (WebCore::fontColorChangesComputedStyle):
88         (WebCore::ApplyStyleCommand::addInlineStyleIfNeeded):
89         * editing/ApplyStyleCommand.h:
90         (WebCore::):
91         * editing/CompositeEditCommand.cpp:
92         (WebCore::CompositeEditCommand::moveParagraphs):
93         (WebCore::CompositeEditCommand::breakOutOfEmptyListItem):
94         * editing/DeleteButtonController.cpp:
95         (WebCore::isDeletableElement):
96         * editing/DeleteSelectionCommand.cpp:
97         (WebCore::DeleteSelectionCommand::saveTypingStyleState):
98         * editing/InsertParagraphSeparatorCommand.cpp:
99         (WebCore::InsertParagraphSeparatorCommand::calculateStyleBeforeInsertion):
100         * editing/RemoveFormatCommand.cpp:
101         (WebCore::RemoveFormatCommand::doApply):
102         * editing/ReplaceSelectionCommand.cpp:
103         (WebCore::handleStyleSpansBeforeInsertion):
104         (WebCore::ReplaceSelectionCommand::handleStyleSpans):
105         (WebCore::ReplaceSelectionCommand::doApply):
106         * editing/SelectionController.cpp:
107         (WebCore::SelectionController::paintCaret):
108         * editing/markup.cpp:
109         (WebCore::createMarkup):
110         * page/animation/AnimationBase.cpp:
111         (WebCore::AnimationBase::ensurePropertyMap):
112         * page/animation/AnimationBase.h:
113         * page/mac/FrameMac.mm:
114         (WebCore::Frame::fontAttributesForSelectionStart):
115         * rendering/EllipsisBox.cpp:
116         (WebCore::EllipsisBox::paint):
117         (WebCore::EllipsisBox::paintSelection):
118         * rendering/InlineTextBox.cpp:
119         (WebCore::InlineTextBox::paint):
120         * rendering/RenderBox.cpp:
121         (WebCore::RenderBox::styleDidChange):
122         (WebCore::RenderBox::paintRootBoxDecorations):
123         (WebCore::RenderBox::paintBoxDecorationsWithSize):
124         * rendering/RenderBoxModelObject.cpp:
125         (WebCore::RenderBoxModelObject::paintBoxShadow):
126         * rendering/RenderFieldset.cpp:
127         (WebCore::RenderFieldset::paintBoxDecorations):
128         * rendering/RenderFileUploadControl.cpp:
129         (WebCore::RenderFileUploadControl::paintObject):
130         * rendering/RenderFrameSet.cpp:
131         (WebCore::RenderFrameSet::paintColumnBorder):
132         (WebCore::RenderFrameSet::paintRowBorder):
133         * rendering/RenderImage.cpp:
134         (WebCore::RenderImage::paintReplaced):
135         * rendering/RenderLayerBacking.cpp:
136         (WebCore::RenderLayerBacking::rendererBackgroundColor):
137         * rendering/RenderLayerBacking.h:
138         * rendering/RenderListBox.cpp:
139         (WebCore::RenderListBox::paintItemForeground):
140         (WebCore::RenderListBox::paintItemBackground):
141         * rendering/RenderListMarker.cpp:
142         (WebCore::RenderListMarker::paint):
143         * rendering/RenderMenuList.cpp:
144         (WebCore::RenderMenuList::itemStyle):
145         (WebCore::RenderMenuList::itemBackgroundColor):
146         (WebCore::RenderMenuList::menuStyle):
147         * rendering/RenderObject.cpp:
148         (WebCore::RenderObject::selectionBackgroundColor):
149         (WebCore::RenderObject::selectionForegroundColor):
150         * rendering/RenderSVGResource.cpp:
151         (WebCore::RenderSVGResource::adjustColorForPseudoRules):
152         (WebCore::RenderSVGResource::fillPaintingResource):
153         (WebCore::RenderSVGResource::strokePaintingResource):
154         * rendering/RenderSVGResource.h:
155         * rendering/RenderTable.cpp:
156         (WebCore::RenderTable::paintBoxDecorations):
157         * rendering/RenderTable.h:
158         (WebCore::RenderTable::bgColor):
159         * rendering/RenderTableCell.cpp:
160         (WebCore::RenderTableCell::paintBackgroundsBehindCell):
161         * rendering/RenderTextControl.cpp:
162         (WebCore::RenderTextControl::adjustInnerTextStyle):
163         * rendering/RenderTextControlSingleLine.cpp:
164         (WebCore::RenderTextControlSingleLine::menuStyle):
165         * rendering/RenderTheme.cpp:
166         (WebCore::RenderTheme::isControlStyled):
167         * rendering/RenderThemeMac.mm:
168         (WebCore::RenderThemeMac::paintMenuListButton):
169         * rendering/RenderTreeAsText.cpp:
170         (WebCore::RenderTreeAsText::writeRenderObject):
171         (WebCore::write):
172         * rendering/RenderTreeAsText.h:
173         * rendering/SVGInlineTextBox.cpp:
174         (WebCore::SVGInlineTextBox::paintSelection):
175         * rendering/SVGRenderTreeAsText.cpp:
176         (WebCore::writeRenderSVGTextBox):
177         * rendering/style/RenderStyle.cpp:
178         (WebCore::RenderStyle::colorIncludingFallback):
179         (WebCore::RenderStyle::visitedDependentColor):
180         * rendering/style/RenderStyle.h:
181         (WebCore::):
182         (WebCore::InheritedFlags::hasBackground):
183         (WebCore::InheritedFlags::borderLeftStyle):
184         (WebCore::InheritedFlags::borderRightStyle):
185         (WebCore::InheritedFlags::borderTopStyle):
186         (WebCore::InheritedFlags::borderBottomStyle):
187         (WebCore::InheritedFlags::textShadow):
188         (WebCore::InheritedFlags::textStrokeWidth):
189         (WebCore::InheritedFlags::hasNormalColumnGap):
190         (WebCore::InheritedFlags::borderLeftColor):
191         (WebCore::InheritedFlags::borderRightColor):
192         (WebCore::InheritedFlags::borderTopColor):
193         (WebCore::InheritedFlags::borderBottomColor):
194         (WebCore::InheritedFlags::backgroundColor):
195         (WebCore::InheritedFlags::color):
196         (WebCore::InheritedFlags::columnRuleColor):
197         (WebCore::InheritedFlags::outlineColor):
198         (WebCore::InheritedFlags::textFillColor):
199         (WebCore::InheritedFlags::textStrokeColor):
200         * svg/SVGAnimationElement.cpp:
201         (WebCore::adjustForCurrentColor):
202
203 2010-05-21  Beth Dakin  <bdakin@apple.com>
204
205         Reviewed by Darin Adler.
206
207         Fix for <rdar://problem/8009118> Crash in WebCore::toAlphabetic() 
208         while running MangleMe
209         -and corresponding-
210         https://bugs.webkit.org/show_bug.cgi?id=39508
211
212         The math was slightly off here, and we wound up trying to access an 
213         array at index -1 in some cases. We need to decrement numberShadow 
214         rather than subtracting one from the result of the modulo 
215         operation.
216
217         * rendering/RenderListMarker.cpp:
218         (WebCore::toAlphabeticOrNumeric):
219
220 2010-05-21  Oliver Hunt  <oliver@apple.com>
221
222         Qt buildfix #2
223
224         * bridge/qt/qt_runtime.cpp:
225         (JSC::Bindings::convertQVariantToValue):
226         (JSC::Bindings::QtRuntimeMethod::QtRuntimeMethod):
227
228 2010-05-21  Oliver Hunt  <oliver@apple.com>
229
230         Qt buildfix #1
231
232         * bridge/qt/qt_instance.cpp:
233         (JSC::Bindings::QtRuntimeObject::QtRuntimeObject):
234         (JSC::Bindings::QtInstance::newRuntimeObject):
235         (JSC::Bindings::QtInstance::getMethod):
236         * bridge/qt/qt_pixmapruntime.cpp:
237         (JSC::Bindings::QtPixmapRuntimeObject::QtPixmapRuntimeObject):
238         (JSC::Bindings::QtPixmapInstance::getMethod):
239         (JSC::Bindings::QtPixmapInstance::createRuntimeObject):
240
241 2010-05-21  Geoffrey Garen  <ggaren@apple.com>
242
243         Reviewed by Oliver Hunt.
244
245         Fixed failure seen on buildbot (due to flaky test).
246         
247         Don't report an exception in a nested script evaluation -- just pass the
248         exception on to our caller. Our caller can decide to report the exception,
249         if it fully propagates -- but we don't want to report an exception that's
250         going to get caught.
251
252         * bindings/js/ScriptController.cpp:
253         (WebCore::ScriptController::ScriptController):
254         (WebCore::ScriptController::evaluateInWorld):
255         * bindings/js/ScriptController.h:
256
257 2010-05-21  Oliver Hunt  <oliver@apple.com>
258
259         Reviewed by Geoffrey Garen.
260
261         All callable objects should have a global object reference
262         https://bugs.webkit.org/show_bug.cgi?id=39495
263
264         Update the bindings generator to give prototype objects a
265         global object.  Update all the manually written JSObject
266         subclasses to pass a global object.
267
268         * ForwardingHeaders/runtime/JSObjectWithGlobalObject.h: Added.
269         * WebCore.PluginHostProcess.exp:
270         * bindings/js/JSDOMBinding.cpp:
271         (WebCore::objectToStringFunctionGetter):
272         * bindings/js/JSDOMWindowCustom.cpp:
273         (WebCore::nonCachingStaticFunctionGetter):
274         * bindings/js/JSDOMWindowShell.cpp:
275         (WebCore::JSDOMWindowShell::setWindow):
276         * bindings/js/JSHistoryCustom.cpp:
277         (WebCore::nonCachingStaticBackFunctionGetter):
278         (WebCore::nonCachingStaticForwardFunctionGetter):
279         (WebCore::nonCachingStaticGoFunctionGetter):
280         * bindings/js/JSLocationCustom.cpp:
281         (WebCore::nonCachingStaticReplaceFunctionGetter):
282         (WebCore::nonCachingStaticReloadFunctionGetter):
283         (WebCore::nonCachingStaticAssignFunctionGetter):
284         * bindings/js/WorkerScriptController.cpp:
285         (WebCore::WorkerScriptController::initScript):
286         * bindings/scripts/CodeGeneratorJS.pm:
287         * bridge/c/CRuntimeObject.cpp:
288         (JSC::Bindings::CRuntimeObject::CRuntimeObject):
289         * bridge/c/CRuntimeObject.h:
290         * bridge/c/c_instance.cpp:
291         (JSC::Bindings::CInstance::newRuntimeObject):
292         (JSC::Bindings::CRuntimeMethod::CRuntimeMethod):
293         (JSC::Bindings::CInstance::getMethod):
294         * bridge/jni/jsc/JavaInstanceJSC.cpp:
295         (JavaInstance::newRuntimeObject):
296         (JavaRuntimeMethod::JavaRuntimeMethod):
297         (JavaInstance::getMethod):
298         * bridge/jni/jsc/JavaRuntimeObject.cpp:
299         (JSC::Bindings::JavaRuntimeObject::JavaRuntimeObject):
300         * bridge/jni/jsc/JavaRuntimeObject.h:
301         * bridge/jsc/BridgeJSC.cpp:
302         (JSC::Bindings::Instance::newRuntimeObject):
303         * bridge/objc/ObjCRuntimeObject.h:
304         * bridge/objc/ObjCRuntimeObject.mm:
305         (JSC::Bindings::ObjCRuntimeObject::ObjCRuntimeObject):
306         * bridge/objc/objc_class.mm:
307         (JSC::Bindings::ObjcClass::fallbackObject):
308         * bridge/objc/objc_instance.mm:
309         (ObjcInstance::newRuntimeObject):
310         (ObjCRuntimeMethod::ObjCRuntimeMethod):
311         (ObjcInstance::getMethod):
312         * bridge/objc/objc_runtime.h:
313         * bridge/objc/objc_runtime.mm:
314         (JSC::Bindings::ObjcFallbackObjectImp::ObjcFallbackObjectImp):
315         * bridge/runtime_method.cpp:
316         (JSC::RuntimeMethod::RuntimeMethod):
317         * bridge/runtime_method.h:
318         * bridge/runtime_object.cpp:
319         (JSC::Bindings::RuntimeObject::RuntimeObject):
320         * bridge/runtime_object.h:
321
322 2010-05-21  Steve Block  <steveblock@google.com>
323
324         Reviewed by Jeremy Orlow.
325
326         Add DeviceOrientation and DeviceOrientationClient
327         https://bugs.webkit.org/show_bug.cgi?id=39479
328
329         The page owns a DeviceOrientation object, which has a pointer to a
330         DeviceOrientationClient object provided by the embedder. The
331         DeviceOrientation object forwards requests to start listening to
332         orientation to the client, and when updates are available, fires a
333         DeviceOrientationEvent on the window object.
334
335         No new tests are possible at this time as the implementation is
336         incomplete. Future patches will add LayoutTestController methods
337         to provide mock orientation events to test this.
338
339         * Android.mk:
340         * CMakeLists.txt:
341         * GNUmakefile.am:
342         * WebCore.base.exp:
343         * WebCore.gypi:
344         * WebCore.pro:
345         * WebCore.vcproj/WebCore.vcproj
346         * WebCore.xcodeproj/project.pbxproj:
347         * dom/DeviceOrientation.cpp: Added.
348         (WebCore::DeviceOrientation::DeviceOrientation):
349         (WebCore::DeviceOrientation::onDeviceOrientationChange):
350         * dom/DeviceOrientation.h: Added.
351         * dom/DeviceOrientationClient.h: Added.
352         (WebCore::DeviceOrientationClient::~DeviceOrientationClient):
353         * page/Page.cpp:
354         (WebCore::Page::Page):
355         * page/Page.h:
356         (WebCore::Page::deviceOrientation):
357         * svg/graphics/SVGImage.cpp:
358         (WebCore::SVGImage::dataChanged):
359
360 2010-05-21  Tasuku Suzuki  <tasuku.suzuki@nokia.com>
361
362         Reviewed by Simon Hausmann.
363
364         [Qt] Fix compilation with QT_NO_GRAPHICSEFFECT
365         https://bugs.webkit.org/show_bug.cgi?id=38324
366
367         * platform/graphics/qt/GraphicsLayerQt.cpp:
368         (WebCore::GraphicsLayerQtImpl::flushChanges):
369
370 2010-05-21  Jedrzej Nowacki  <jedrzej.nowacki@nokia.com>
371
372         Reviewed by Darin Fisher.
373
374         Fix the HistoryController::pushState.
375
376         It should be possible to call the pushState method from
377         the first page in a window.
378
379         history.pushState doesn't work for the first page in a window.
380         https://bugs.webkit.org/show_bug.cgi?id=39418
381
382         * loader/HistoryController.cpp:
383         (WebCore::HistoryController::pushState):
384
385 2010-05-21  Victoria Kirst  <vrk@google.com>
386
387         Reviewed by David Levin.
388
389         [chromium] Fix slider status when buffering
390         https://bugs.webkit.org/show_bug.cgi?id=39370
391         Adjusts the buffering bar to be aligned with the slider thumb.
392
393         No new tests. (Covered by existing layout tests.)
394
395         * rendering/RenderMediaControlsChromium.cpp:
396         (WebCore::paintMediaSlider):
397         Added logic to align the buffering bar with the thumb. Half of the
398         thumb image is transparent, so the buffer bar is adjusted to fill in
399         this gap.
400
401 2010-05-21  Jesus Sanchez-Palencia  <jesus@webkit.org>
402
403         Reviewed by Eric Seidel.
404
405         Extra processesArguments() calls in Document::processViewport
406         https://bugs.webkit.org/show_bug.cgi?id=39358
407
408         The viewport arguments are only needed when there is a frame->page(),
409         therefore we don't need to always call processArguments().
410
411         * dom/Document.cpp:
412         (WebCore::Document::processViewport):
413
414 2010-05-17  Philippe Normand  <pnormand@igalia.com>
415
416         Reviewed by Eric Carlson.
417
418         [GStreamer] video painting support on mac port
419         https://bugs.webkit.org/show_bug.cgi?id=39206
420
421         ImageGStreamer support for mac port. A CG Image is created using
422         the GstBuffer data. It can then be painted by the gstreamer player.
423
424         * platform/graphics/gstreamer/ImageGStreamer.h:
425         * platform/graphics/gstreamer/ImageGStreamerCG.mm: Added.
426         (ImageGStreamer::createImage):
427         (ImageGStreamer::ImageGStreamer):
428         (ImageGStreamer::~ImageGStreamer):
429
430 2010-05-21  Robin Cao  <robin.cao@torchmobile.com.cn>
431
432         Reviewed by Eric Seidel.
433
434         animateTransform does not work on gradientTransform
435         https://bugs.webkit.org/show_bug.cgi?id=38115
436
437         Tests: svg/animations/animate-gradient-transform.html
438
439         * svg/SVGAnimateTransformElement.cpp:
440         (WebCore::SVGAnimateTransformElement::hasValidTarget): Check if the target element is gradient.
441         (WebCore::transformListFor): Ditto.
442         (WebCore::SVGAnimateTransformElement::resetToBaseValue): Ditto.
443         (WebCore::SVGAnimateTransformElement::applyResultsToTarget): Ditto.
444
445 2010-05-21  Young Han Lee  <joybro@company100.net>
446
447         Reviewed by Eric Seidel.
448
449         Fix guard around DatabaseSync
450         https://bugs.webkit.org/show_bug.cgi?id=38897
451
452         * storage/DatabaseSync.cpp:
453
454 2010-05-21  Simon Hausmann  <simon.hausmann@nokia.com>
455
456         [Qt] Prospective Qt/Mac build fix
457
458         My cpp is paranoid and doesn't like #if Q_WS_MAC:
459         error: #if with no expression
460
461         * page/qt/EventHandlerQt.cpp:
462
463 2010-05-21  Lucas De Marchi  <lucas.demarchi@profusion.mobi>
464
465         Reviewed by Eric Seidel.
466
467         [EFL] Update Localized Strings. Remove markers from strings
468         since we are not using them and they are only polluting output.
469         https://bugs.webkit.org/show_bug.cgi?id=39371
470
471         No new tests required.
472
473         * platform/efl/LocalizedStringsEfl.cpp:
474         (WebCore::contextMenuItemTagOpenLinkInNewWindow):
475         (WebCore::contextMenuItemTagDownloadLinkToDisk):
476         (WebCore::contextMenuItemTagCopyLinkToClipboard):
477         (WebCore::contextMenuItemTagOpenImageInNewWindow):
478         (WebCore::contextMenuItemTagDownloadImageToDisk):
479         (WebCore::contextMenuItemTagCopyImageToClipboard):
480         (WebCore::contextMenuItemTagOpenFrameInNewWindow):
481         (WebCore::contextMenuItemTagSelectAll):
482         (WebCore::contextMenuItemTagUnicode):
483         (WebCore::contextMenuItemTagInputMethods):
484         (WebCore::contextMenuItemTagGoBack):
485         (WebCore::contextMenuItemTagGoForward):
486         (WebCore::contextMenuItemTagReload):
487         (WebCore::contextMenuItemTagIgnoreSpelling):
488         (WebCore::contextMenuItemTagLearnSpelling):
489         (WebCore::contextMenuItemTagSearchWeb):
490         (WebCore::contextMenuItemTagLookUpInDictionary):
491         (WebCore::contextMenuItemTagOpenLink):
492         (WebCore::contextMenuItemTagIgnoreGrammar):
493         (WebCore::contextMenuItemTagSpellingMenu):
494         (WebCore::contextMenuItemTagCheckSpelling):
495         (WebCore::contextMenuItemTagCheckGrammarWithSpelling):
496         (WebCore::contextMenuItemTagFontMenu):
497         (WebCore::contextMenuItemTagOutline):
498         (WebCore::contextMenuItemTagInspectElement):
499         (WebCore::searchMenuClearRecentSearchesText):
500         (WebCore::missingPluginText): Add missing message.
501         (WebCore::multipleFileUploadText):
502         (WebCore::crashedPluginText):
503
504 2010-05-21  Lucas De Marchi  <lucas.demarchi@profusion.mobi>
505
506         Reviewed by Eric Seidel.
507
508         [EF] Fix support for focus ring.
509         https://bugs.webkit.org/show_bug.cgi?id=39387
510
511         No new tests required.
512
513         * html/HTMLAnchorElement.cpp: Add EFL to #ifdef
514         (WebCore::HTMLAnchorElement::isMouseFocusable):
515
516 2010-05-21  Kwang Yul Seo  <skyul@company100.net>
517
518         Reviewed by Eric Seidel.
519
520         [BREWMP] Add missing localized string symbols.
521         https://bugs.webkit.org/show_bug.cgi?id=39394
522
523         Add missingPluginText and crashedPluginText.
524
525         * platform/brew/LocalizedStringsBrew.cpp:
526         (WebCore::missingPluginText):
527         (WebCore::crashedPluginText):
528
529 2010-05-21  Steve Block  <steveblock@google.com>
530
531         Reviewed by Alexey Proskuryakov.
532
533         Calls to CallJNIMethodIDA() in JavaInstance::invokeMethod() are required on Android
534         https://bugs.webkit.org/show_bug.cgi?id=39426
535
536         This code path has always been used by Android, but was guarded with
537         BUILDING_ON_TIGER in http://trac.webkit.org/changeset/55054, thus
538         breaking the Android build.
539
540         No new tests, build fix only.
541
542         * bridge/jni/jsc/JavaInstanceJSC.cpp:
543         (JavaInstance::invokeMethod):
544
545 2010-05-20  Tony Chang  <tony@chromium.org>
546
547         Reviewed by Kent Tamura.
548
549         escape link text when copying or dragging links on win or chromium
550         https://bugs.webkit.org/show_bug.cgi?id=39413
551
552         * editing/markup.cpp:
553         (WebCore::urlToMarkup):
554         * editing/markup.h:
555         * platform/chromium/ClipboardUtilitiesChromium.cpp:
556         * platform/chromium/ClipboardUtilitiesChromium.h:
557         * platform/win/ClipboardUtilitiesWin.cpp:
558         * platform/win/ClipboardUtilitiesWin.h:
559
560 2010-05-18  Philippe Normand  <pnormand@igalia.com>
561
562         Reviewed by Eric Carlson.
563
564         [GStreamer] PlatformMedia support
565         https://bugs.webkit.org/show_bug.cgi?id=39300
566
567         Basic support for PlatformMedia in the gst player. The
568         PlatformMedia object contains a GStreamerGWorld object. That
569         object is empty for now. XOverlay features will be added later
570         on for easy review sake.
571
572         * GNUmakefile.am:
573         * platform/graphics/MediaPlayer.h:
574         (WebCore::PlatformMedia::):
575         * platform/graphics/gstreamer/GStreamerGWorld.cpp: Added.
576         (WebCore::GStreamerGWorld::createGWorld):
577         (WebCore::GStreamerGWorld::GStreamerGWorld):
578         (WebCore::GStreamerGWorld::~GStreamerGWorld):
579         * platform/graphics/gstreamer/GStreamerGWorld.h: Added.
580         * platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:
581         (WebCore::MediaPlayerPrivateGStreamer::platformMedia):
582         (WebCore::MediaPlayerPrivateGStreamer::createGSTPlayBin):
583         * platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.h:
584
585 2010-05-20  Kwang Yul Seo  <skyul@company100.net>
586
587         Reviewed by Eric Seidel.
588
589         [BREWMP] Add dummy SSLKeyGenerator
590         https://bugs.webkit.org/show_bug.cgi?id=39403
591
592         Add dummy implementation of SSLKeyGenerator.
593
594         * platform/brew/SSLKeyGeneratorBrew.cpp: Added.
595         (WebCore::WebCore::getSupportedKeySizes):
596         (WebCore::WebCore::signedPublicKeyAndChallengeString):
597
598 2010-05-20  Mark Rowe  <mrowe@apple.com>
599
600         Rubber-stamped by Dan Bernstein.
601
602         <rdar://problem/7848154> Remove the dependency on Foundation's private __COCOA_FORMAL_PROTOCOLS_2__ define.
603
604         * platform/mac/EmptyProtocolDefinitions.h:
605
606 2010-05-20  Kwang Yul Seo  <skyul@company100.net>
607
608         Reviewed by Eric Seidel.
609
610         [BREWMP] Add Editor
611         https://bugs.webkit.org/show_bug.cgi?id=39404
612
613         Implement Editor::newGeneralClipboard.
614
615         * editing/brew/EditorBrew.cpp: Added.
616         (WebCore::Editor::newGeneralClipboard):
617
618 2010-05-20  Simon Fraser  <simon.fraser@apple.com>
619
620         Reviewed by Adam Roben.
621
622         Avoid flushing CA layers when a layout is pending
623         https://bugs.webkit.org/show_bug.cgi?id=39463
624         <rdar://problem/7999463>
625
626         Avoid rendering the compositing layers to the screen if there's a layout pending,
627         since the layer tree not in a state that should be presented to the user.
628         
629         This fixes flashes in some types of content that dynamically add and remove layers.
630
631         Do this by adding a WKCACFLayerRendererClient for WKCACFLayerRenderer, which it can
632         call through to ask whether now is a good time to render. If not, it schedules
633         another render soon.
634         
635         * platform/graphics/win/WKCACFLayerRenderer.h:
636         (WebCore::WKCACFLayerRendererClient::~WKCACFLayerRendererClient):
637         * platform/graphics/win/WKCACFLayerRenderer.cpp:
638         (WebCore::WKCACFLayerRenderer::acceleratedCompositingAvailable):
639         (WebCore::WKCACFLayerRenderer::create):
640         (WebCore::WKCACFLayerRenderer::WKCACFLayerRenderer):
641         (WebCore::WKCACFLayerRenderer::render):
642
643 2010-05-20  Kwang Yul Seo  <skyul@company100.net>
644
645         Reviewed by Eric Seidel.
646
647         [BREWMP] Don't include CoreFoundation.h when building for BREW MP
648         https://bugs.webkit.org/show_bug.cgi?id=39405
649
650         Add !defined(BUILDING_BREWMP__) guard for CoreFoundation.h.
651
652         * WebCorePrefix.h:
653
654 2010-05-20  Kwang Yul Seo  <skyul@company100.net>
655
656         Reviewed by Eric Seidel.
657
658         [BREWMP] Add ScrollTheme
659         https://bugs.webkit.org/show_bug.cgi?id=39406
660
661         As BREW MP always uses frame flattening, there is no need to render scorllbars.
662         Use the default scrollbar theme with thickness 0.
663
664         * platform/brew/ScrollbarThemeBrew.cpp: Added.
665         (WebCore::ScrollbarTheme::nativeTheme):
666         (WebCore::ScrollbarThemeBrew::~ScrollbarThemeBrew):
667         * platform/brew/ScrollbarThemeBrew.h: Added.
668
669 2010-05-20  Jon Honeycutt  <jhoneycutt@apple.com>
670
671         REGRESSION(r53637): DivX plug-in fails to start until window is resized
672         https://bugs.webkit.org/show_bug.cgi?id=39457
673         <rdar://problem/8006102>
674
675         Before r53637, we called Widget::move() (which caused us to call
676         NPP_SetWindow) before painting a plug-in. r53637 removed the call to
677         Widget::move(), and we end up never calling NPP_SetWindow for plug-ins
678         with the "DeferFirstSetWindowCall" quirk, including the DivX plug-in.
679
680         Reviewed by Simon Fraser.
681
682         * manual-tests/divx-plugin-fails-to-draw.html: Added.
683
684         * plugins/PluginView.cpp:
685         (WebCore::PluginView::PluginView):
686         Initialize new member to false.
687
688         * plugins/PluginView.h:
689         Added new member.
690
691         * plugins/win/PluginViewWin.cpp:
692         (WebCore::PluginView::paint):
693         Call setNPWindowRect() before painting to ensure that NPP_SetWindow gets
694         called.
695         (WebCore::PluginView::setNPWindowRect):
696         Set m_haveCalledSetWindow.
697
698 2010-05-20  Fumitoshi Ukai  <ukai@chromium.org>
699
700         Reviewed by Alexey Proskuryakov.
701
702         WebSocket handshake incompatible change in draft-hixie-thewebsocketprotocol-76
703         https://bugs.webkit.org/show_bug.cgi?id=35572
704
705         WebSocket opening handshake is changed.  New protocol draft could be found at http://www.whatwg.org/specs/web-socket-protocol/
706         It requires https://bugs.webkit.org/show_bug.cgi?id=38034 to pass websocket tests.
707
708         * websockets/WebSocketHandshake.cpp:
709         (WebCore::extractResponseCode):
710         add lineLength parameter to return length of status line.
711         (WebCore::hostName): Added.
712         (WebCore::generateSecWebSocketKey): Added.
713         (WebCore::generateKey3): Added.
714         (WebCore::setChallengeNumber): Added.
715         (WebCore::generateChallengeResponseExpected): Added.
716         (WebCore::WebSocketHandshake::WebSocketHandshake):
717          generate challenge response key and expected data.
718         (WebCore::WebSocketHandshake::clientLocation):
719          use hostName.
720         (WebCore::WebSocketHandshake::clientHandshakeMessage):
721          changed for draft 76 spec.
722         (WebCore::WebSocketHandshake::clientHandshakeRequest):
723         (WebCore::WebSocketHandshake::readServerHandshake):
724          changed for draft 76 spec.
725          m_mode is managed in this method.
726         (WebCore::WebSocketHandshake::readHTTPHeaders):
727          change error log messages.
728         (WebCore::WebSocketHandshake::processHeaders):
729          chagned for draft 76 spec.
730         (WebCore::WebSocketHandshake::checkResponseHeaders):
731          return boolean whether response header is ok or not and not change m_mode in it.
732         * websockets/WebSocketHandshake.h:
733
734 2010-05-20  Adam Roben  <aroben@apple.com>
735
736         Stop leaking all CACFContexts
737
738         Fixes <http://webkit.org/b/39466> <rdar://problem/8007141>.
739
740         Reviewed by Simon Fraser.
741
742         * platform/graphics/win/WKCACFContextFlusher.cpp:
743         (WebCore::WKCACFContextFlusher::addContext): Only retain the context
744         when we first add it to the m_contexts set. Otherwise we'll retain the
745         same context multiple times, causing it to leak.
746
747 2010-05-20  Young Han Lee  <joybro@company100.net>
748
749         Reviewed by Darin Adler.
750
751         Create filenameFromString for all ports except GTK and EFL.
752         https://bugs.webkit.org/show_bug.cgi?id=39348
753
754         * platform/FileSystem.cpp: Added.
755         (WebCore::filenameFromString):
756         * platform/FileSystem.h:
757
758 2010-05-20  Young Han Lee  <joybro@company100.net>
759
760         Reviewed by Darin Adler.
761
762         Port SharedBuffer to POSIX.
763         https://bugs.webkit.org/show_bug.cgi?id=39283
764
765         * platform/posix/SharedBufferPOSIX.cpp: Added.
766         (WebCore::SharedBuffer::createWithContentsOfFile):
767
768 2010-05-20  Zhenyao Mo  <zmo@google.com>
769
770         Reviewed by Dimitri Glazkov.
771
772         Map RGBA4/RGB5_A1 to RGBA and RGB565 to RGB in RenderbufferStorage
773         https://bugs.webkit.org/show_bug.cgi?id=39077
774
775         * platform/graphics/mac/GraphicsContext3DMac.cpp:
776         (WebCore::GraphicsContext3D::renderbufferStorage): Mapping the enums.
777
778 2010-05-20  Dan Bernstein  <mitz@apple.com>
779
780         Reviewed by Dave Hyatt.
781
782         <rdar://problem/8007953> Textarea using custom font appears blank
783
784         Test: fast/css/font-face-in-shadow-DOM.html
785
786         When a remote font is loaded, CSSFontSelector forces a style recalc, which replaces all
787         RenderSyles that have FontFallbackLists referencing the placeholder font with fresh
788         RenderStyles. However, it does not descend into shadow DOM trees, so those may end up with
789         styles that still reference the placeholder font.
790
791         The fix is to add RenderObject::requiresForcedStyleRecalcPropagation() and have it return
792         true from renderers that maintain shadow DOM trees or otherwise keep their own RenderStyles.
793
794         * dom/Element.cpp:
795         (WebCore::Element::recalcStyle): Check if forced style recalc needs to propagated.
796         * rendering/RenderButton.h:
797         (WebCore::RenderButton::requiresForcedStyleRecalcPropagation):
798         * rendering/RenderDataGrid.h:
799         (WebCore::RenderDataGrid::requiresForcedStyleRecalcPropagation):
800         * rendering/RenderFileUploadControl.h:
801         (WebCore::RenderFileUploadControl::requiresForcedStyleRecalcPropagation):
802         * rendering/RenderListItem.h:
803         (WebCore::RenderListItem::requiresForcedStyleRecalcPropagation):
804         * rendering/RenderMedia.h:
805         (WebCore::RenderMedia::requiresForcedStyleRecalcPropagation):
806         * rendering/RenderMenuList.h:
807         (WebCore::RenderMenuList::RenderMenuList::requiresForcedStyleRecalcPropagation):
808         * rendering/RenderObject.h:
809         (WebCore::RenderObject::requiresForcedStyleRecalcPropagation):
810         * rendering/RenderProgress.h:
811         (WebCore::RenderProgress::requiresForcedStyleRecalcPropagation):
812         * rendering/RenderSlider.h:
813         (WebCore::RenderSlider::requiresForcedStyleRecalcPropagation):
814         * rendering/RenderTextControl.h:
815         (WebCore::RenderTextControl::requiresForcedStyleRecalcPropagation):
816
817 2010-05-20  Jer Noble  <jer.noble@apple.com>
818
819         No review; build fix only.
820
821         When WTF_USE_ACCELERATED_COMPOSITING is turned off, MediaPlayerPrivateQuickTimeVisualContext.cpp
822         must include CoreGraphics/CGContext.h.
823
824         * platform/graphics/win/MediaPlayerPrivateQuickTimeVisualContext.cpp:
825
826 2010-05-20  Jer Noble  <jer.noble@apple.com>
827
828         Reviewed by Sam Weinig.
829
830         Video elements show no video on Windows machines that do not support accelerated compositing
831         https://bugs.webkit.org/show_bug.cgi?id=39446
832         rdar://problem/7999794
833
834         Implement the paint() method in MediaPlayerPrivateQuickTimeVisualContext.  The visual context should
835         be set up in load() and torn down in the destructor (as opposed to setUpVideoRendering and 
836         tearDownVideoRendering, which won't get called in a non-accelerated compositing case).
837         
838         * platform/graphics/win/MediaPlayerPrivateQuickTimeVisualContext.cpp:
839         (WebCore::MediaPlayerPrivateQuickTimeVisualContext::~MediaPlayerPrivateQuickTimeVisualContext):
840         (WebCore::MediaPlayerPrivateQuickTimeVisualContext::load):
841         (WebCore::MediaPlayerPrivateQuickTimeVisualContext::paint):
842         (WebCore::MediaPlayerPrivateQuickTimeVisualContext::visualContextTimerFired):
843         (WebCore::MediaPlayerPrivateQuickTimeVisualContext::retrieveCurrentImage):
844         (WebCore::MediaPlayerPrivateQuickTimeVisualContext::setUpVideoRendering):
845         (WebCore::MediaPlayerPrivateQuickTimeVisualContext::tearDownVideoRendering):
846
847 2010-05-20  Abhishek Arya  <inferno@chromium.org>
848
849         Reviewed by Adam Barth.
850
851         Added a method to check if the security origin can access
852         password manager.
853         https://bugs.webkit.org/show_bug.cgi?id=38916
854
855         * page/SecurityOrigin.h:
856         (WebCore::SecurityOrigin::canAccessPasswordManager):
857
858 2010-05-20  Darin Adler  <darin@apple.com>
859
860         Reviewed by Eric Seidel.
861
862         Fix warnings seen on the buildbots today
863         https://bugs.webkit.org/show_bug.cgi?id=39368
864
865         * loader/icon/IconDatabase.cpp:
866         (WebCore::IconDatabase::pruneUnretainedIcons): Use the type "long long" for
867         things being printed with "%lli". There is no guaranteed that int64_t is the
868         same thing as long long.
869
870         * page/EventHandler.cpp:
871         (WebCore::EventHandler::handleMousePressEvent): Added parentheses as suggested
872         by warnings in newer versions of GCC.
873
874         * platform/ContextMenu.cpp: Fix #if around the functions to match the #if
875         around the call sites to avoid unused function warning.
876
877         * platform/graphics/gtk/ImageGtk.cpp:
878         (WebCore::Image::loadPlatformResource): Use NULL to end a variable argument list
879         rather than 0. This is a case where the WebKit "use 0 instead of NULL" guideline
880         is incorrect and won't work properly.
881
882         * platform/win/SystemTimeWin.cpp:
883         (WebCore::userIdleTime): Removed unnecessary initialization of LASTINPUTINFO.
884
885         * platform/win/WebCoreInstanceHandle.h: Added property svn:eol-style.
886         Made functions inline instead of static. It's not correct to have functions with
887         internal linkage in a header file. Marking them inline makes more sense.
888
889         * plugins/win/PluginMessageThrottlerWin.cpp:
890         (WebCore::PluginMessageThrottlerWin::PluginMessageThrottlerWin): Reordered the
891         initializers to match the order of the data members from the class definition.
892
893         * plugins/win/PluginViewWin.cpp:
894         (WebCore::PluginView::paintIntoTransformedContext): Initialized all the fields
895         of WINDOWPOS. I know this goes against the traditions of Windows programming,
896         but it's correct and silences the warning. Also removed the unneeded separate
897         code path for non-WinCE platforms that translates only the corner of the window
898         rectangle; the WinCE version is correct for normal Windows as well. Not sure
899         why this wasn't caught when the code was originally checked in.
900
901 2010-05-20  Justin Schuh  <jschuh@chromium.org>
902
903         Reviewed by Adam Barth.
904
905         Moving frame.src checks out of the bindings
906         https://bugs.webkit.org/show_bug.cgi?id=37815
907
908         Moved JavaScript frame.src checks out of bindings and into
909         HTMLFrameElementBase. Added main thread state stack to JavaScriptCore
910         so ExecState is available inside core DOM. Updated affected bindings
911         (except for GObject, which will need to be updated to avoid origin
912         failures inside native code).
913
914         * Android.jscbindings.mk:
915         * CMakeLists.txt:
916         * GNUmakefile.am:
917         * WebCore.gypi:
918         * WebCore.pro:
919         * WebCore.vcproj/WebCore.vcproj:
920         * WebCore.xcodeproj/project.pbxproj:
921         * bindings/js/JSBindingsAllInOne.cpp:
922         * bindings/js/JSCallbackData.cpp:
923         (WebCore::JSCallbackData::invokeCallback):
924         * bindings/js/JSEventListener.cpp:
925         (WebCore::JSEventListener::handleEvent):
926         * bindings/js/JSInjectedScriptHostCustom.cpp:
927         (WebCore::InjectedScriptHost::createInjectedScript):
928         * bindings/js/JSMainThreadExecState.cpp: Added.
929         * bindings/js/JSMainThreadExecState.h: Added.
930         (WebCore::JSMainThreadExecState::currentState):
931         (WebCore::JSMainThreadExecState::call):
932         (WebCore::JSMainThreadExecState::evaluate):
933         (WebCore::JSMainThreadExecState::JSMainThreadExecState):
934         (WebCore::JSMainThreadExecState::~JSMainThreadExecState):
935         (WebCore::JSMainThreadNullState::JSMainThreadNullState):
936         * bindings/js/ScheduledAction.cpp:
937         (WebCore::ScheduledAction::executeFunctionInContext):
938         (WebCore::ScheduledAction::execute):
939         * bindings/js/ScheduledAction.h:
940         * bindings/js/ScriptController.cpp:
941         (WebCore::ScriptController::evaluateInWorld):
942         (WebCore::ScriptController::canAccessFromCurrentOrigin):
943         * bindings/js/ScriptController.h:
944         * bindings/js/ScriptFunctionCall.cpp:
945         (WebCore::ScriptFunctionCall::call):
946         * bindings/objc/ObjCEventListener.mm:
947         * bindings/objc/WebScriptObject.mm:
948         (-[WebScriptObject callWebScriptMethod:withArguments:]):
949         (-[WebScriptObject evaluateWebScript:]):
950         * bindings/scripts/CodeGeneratorObjC.pm:
951         * bindings/scripts/test/ObjC/DOMTestCallback.mm:
952         (-[DOMTestCallback callbackWithClass1Param:]):
953         (-[DOMTestCallback callbackWithClass2Param:strArg:]):
954         (-[DOMTestCallback callbackWithNonBoolReturnType:]):
955         (-[DOMTestCallback customCallback:class6Param:]):
956         * bindings/scripts/test/ObjC/DOMTestInterface.mm:
957         * bindings/scripts/test/ObjC/DOMTestObj.mm:
958         (-[DOMTestObj readOnlyIntAttr]):
959         (-[DOMTestObj readOnlyStringAttr]):
960         (-[DOMTestObj readOnlyTestObjAttr]):
961         (-[DOMTestObj intAttr]):
962         (-[DOMTestObj setIntAttr:]):
963         (-[DOMTestObj longLongAttr]):
964         (-[DOMTestObj setLongLongAttr:]):
965         (-[DOMTestObj unsignedLongLongAttr]):
966         (-[DOMTestObj setUnsignedLongLongAttr:]):
967         (-[DOMTestObj stringAttr]):
968         (-[DOMTestObj setStringAttr:]):
969         (-[DOMTestObj testObjAttr]):
970         (-[DOMTestObj setTestObjAttr:]):
971         (-[DOMTestObj attrWithException]):
972         (-[DOMTestObj setAttrWithException:]):
973         (-[DOMTestObj attrWithSetterException]):
974         (-[DOMTestObj setAttrWithSetterException:]):
975         (-[DOMTestObj attrWithGetterException]):
976         (-[DOMTestObj setAttrWithGetterException:]):
977         (-[DOMTestObj customAttr]):
978         (-[DOMTestObj setCustomAttr:]):
979         (-[DOMTestObj scriptStringAttr]):
980         (-[DOMTestObj voidMethod]):
981         (-[DOMTestObj voidMethodWithArgs:strArg:objArg:]):
982         (-[DOMTestObj intMethod]):
983         (-[DOMTestObj intMethodWithArgs:strArg:objArg:]):
984         (-[DOMTestObj objMethod]):
985         (-[DOMTestObj objMethodWithArgs:strArg:objArg:]):
986         (-[DOMTestObj methodThatRequiresAllArgs:objArg:]):
987         (-[DOMTestObj methodThatRequiresAllArgsAndThrows:objArg:]):
988         (-[DOMTestObj serializedValue:]):
989         (-[DOMTestObj methodWithException]):
990         (-[DOMTestObj customMethod]):
991         (-[DOMTestObj customMethodWithArgs:strArg:objArg:]):
992         (-[DOMTestObj customArgsAndException:]):
993         (-[DOMTestObj addEventListener:listener:useCapture:]):
994         (-[DOMTestObj removeEventListener:listener:useCapture:]):
995         (-[DOMTestObj withDynamicFrame]):
996         (-[DOMTestObj withDynamicFrameAndArg:]):
997         (-[DOMTestObj withDynamicFrameAndOptionalArg:optionalArg:]):
998         (-[DOMTestObj withDynamicFrameAndUserGesture:]):
999         (-[DOMTestObj withDynamicFrameAndUserGestureASAD:optionalArg:]):
1000         (-[DOMTestObj withScriptStateVoid]):
1001         (-[DOMTestObj withScriptStateObj]):
1002         (-[DOMTestObj withScriptStateVoidException]):
1003         (-[DOMTestObj withScriptStateObjException]):
1004         (-[DOMTestObj methodWithOptionalArg:]):
1005         (-[DOMTestObj methodWithNonOptionalArgAndOptionalArg:opt:]):
1006         (-[DOMTestObj methodWithNonOptionalArgAndTwoOptionalArgs:opt1:opt2:]):
1007         * bindings/v8/ScriptController.cpp:
1008         (WebCore::ScriptController::canAccessFromCurrentOrigin):
1009         * bindings/v8/ScriptController.h:
1010         * html/HTMLFrameElementBase.cpp:
1011         (WebCore::HTMLFrameElementBase::isURLAllowed):
1012
1013 2010-05-20  Adam Roben  <aroben@apple.com>
1014
1015         Fix an HRGN leak in WKCACFLayerRenderer
1016
1017         Fixes <http://webkit.org/b/39312> <rdar://problem/7998728> REGRESSION
1018         (r53686-r55990): Graphics corruption when watching video (affects
1019         youtube.com)
1020
1021         Reviewed by Darin Adler.
1022
1023         * platform/graphics/win/WKCACFLayerRenderer.cpp:
1024         (WebCore::getDirtyRects): Use an OwnPtr to hold the HRGN we allocate.
1025         That way we don't have to remember to destroy it (as we were
1026         forgetting to do) when we bail out of this function early.
1027
1028 2010-05-20  Darin Fisher  <darin@chromium.org>
1029
1030         Reviewed by Nate Chapin.
1031
1032         [chromium] Provide a way to catch exceptions thrown while interacting
1033         with a NPObject via WebBindings methods.
1034         https://bugs.webkit.org/show_bug.cgi?id=39378
1035
1036         This change also includes a small bit of cleanup in V8NPObject and
1037         friends.  I moved code into the WebCore namespace where appropriate.
1038         
1039         In _NPN_Invoke, I also moved the call to _NPN_Evaluate outside of the
1040         context scope.  I did this to avoid having nested ExceptionCatcher
1041         objects, which is not strictly necessary, but it seemed cleaner.
1042         _NPN_Evaluate already takes care of creating a context scope.
1043
1044         * bindings/v8/NPV8Object.cpp:
1045         (WebCore::v8ObjectToNPObject):
1046         (WebCore::npCreateV8ScriptObject):
1047         (_NPN_Invoke):
1048         (_NPN_InvokeDefault):
1049         (_NPN_Evaluate):
1050         (_NPN_EvaluateHelper):
1051         (_NPN_GetProperty):
1052         (_NPN_SetProperty):
1053         (_NPN_RemoveProperty):
1054         (_NPN_HasProperty):
1055         (_NPN_HasMethod):
1056         (_NPN_SetException):
1057         (_NPN_Enumerate):
1058         (_NPN_Construct):
1059         * bindings/v8/NPV8Object.h:
1060         * bindings/v8/V8NPObject.cpp:
1061         * bindings/v8/V8NPObject.h:
1062         * bindings/v8/V8NPUtils.cpp:
1063         (WebCore::convertV8ObjectToNPVariant):
1064         (WebCore::pushExceptionHandler):
1065         (WebCore::popExceptionHandler):
1066         (WebCore::ExceptionCatcher::ExceptionCatcher):
1067         (WebCore::ExceptionCatcher::~ExceptionCatcher):
1068         * bindings/v8/V8NPUtils.h:
1069         * bindings/v8/npruntime.cpp:
1070
1071 2010-05-20  Marcus Bulach  <bulach@chromium.org>
1072
1073         Reviewed by Steve Block.
1074
1075         Ensure timers are stopped on Geolocation::disconnectFrame()
1076         https://bugs.webkit.org/show_bug.cgi?id=39388
1077
1078         fast/dom/Geolocation/notimer-after-unload.html, plus it should be possible to re-enable Gtk LayoutTests.
1079
1080         * page/Geolocation.cpp:
1081         (WebCore::Geolocation::disconnectFrame):
1082
1083 2010-05-20  James Robinson  <jamesr@chromium.org>
1084
1085         Reviewed by Eric Seidel.
1086
1087         Ensures styles are up-to-date before determining selection
1088         https://bugs.webkit.org/show_bug.cgi?id=39389
1089
1090         This adds a call to document::updateStyleIfNeeded() to
1091         Frame::notifyRendererOfSelectionChange(). Without this call, if there
1092         is a pending style update that will detach part of the DOM and the
1093         the selection is within that part of the DOM when
1094         notifyRendererOfSeletionChange is called, the rootEditableElement
1095         algorithm ends up walking through detached parts of the render tree.
1096
1097         Test: editing/selection/focus-and-display-none.html
1098
1099         * page/Frame.cpp:
1100         (WebCore::Frame::notifyRendererOfSelectionChange):
1101
1102 2010-05-20  Adam Roben  <aroben@apple.com>
1103
1104         Remove code that fetched, but did nothing useful with, a CFDictionary
1105         in MediaPlayerPrivateQuickTimeVisualContext
1106
1107         I also removed the code in QTPixelBuffer that vended the dictionary.
1108
1109         Fixes <http://webkit.org/b/39435> <rdar://problem/8009278>
1110         QTPixelBuffer passes CFDictionaries across the DLL boundary, which can
1111         lead to crashes
1112
1113         Reviewed by Darin Adler.
1114
1115         * platform/graphics/win/MediaPlayerPrivateQuickTimeVisualContext.cpp:
1116         (WebCore::MediaPlayerPrivateQuickTimeVisualContext::retrieveCurrentImage):
1117         Deleted code that fetched the attachments dictionary, which was never
1118         used other than to pass it to CFRetain/CFRelease, which could be
1119         enough to cause a crash due to incompatible copies of
1120         CoreFoundation.dll.
1121
1122         * platform/graphics/win/QTMovieVisualContext.h: Added a now-needed
1123         forward declaration.
1124
1125         * platform/graphics/win/QTPixelBuffer.cpp:
1126         * platform/graphics/win/QTPixelBuffer.h:
1127         Removed the now-unused attachments function.
1128
1129 2010-05-20  Adam Roben  <aroben@apple.com>
1130
1131         Fix a CFData leak in MediaPlayerPrivateQuickTimeVisualContext
1132
1133         Fixes <http://webkit.org/b/39432> <rdar://problem/8008992>
1134
1135         Reviewed by Ada Chan
1136
1137         * platform/graphics/win/MediaPlayerPrivateQuickTimeVisualContext.cpp:
1138         (WebCore::QTCFDictionaryCreateWithDataCallback): Use a RetainPtr to
1139         hold the CFData we allocate so it will get released when this function
1140         is exited. Also pass kCFAllocatorNull as the bytes deallocator to
1141         CFDataCreateWithBytesNoCopy so that CF doesn't try to deallocate the
1142         bytes we pass to it.
1143
1144 2010-05-20  Jian Li  <jianli@chromium.org>
1145
1146         Reviewed by David Levin.
1147
1148         Rename GenericTask* to CrossThreadTask* in CrossThreadTask.h.
1149         https://bugs.webkit.org/show_bug.cgi?id=39437
1150
1151         * dom/CrossThreadTask.h:
1152         (WebCore::):
1153         (WebCore::CrossThreadTask1::create):
1154         (WebCore::CrossThreadTask1::CrossThreadTask1):
1155         (WebCore::CrossThreadTask2::create):
1156         (WebCore::CrossThreadTask2::CrossThreadTask2):
1157         (WebCore::CrossThreadTask3::create):
1158         (WebCore::CrossThreadTask3::CrossThreadTask3):
1159         (WebCore::CrossThreadTask4::create):
1160         (WebCore::CrossThreadTask4::CrossThreadTask4):
1161         (WebCore::CrossThreadTask5::create):
1162         (WebCore::CrossThreadTask5::CrossThreadTask5):
1163         (WebCore::CrossThreadTask6::create):
1164         (WebCore::CrossThreadTask6::CrossThreadTask6):
1165         (WebCore::CrossThreadTask7::create):
1166         (WebCore::CrossThreadTask7::CrossThreadTask7):
1167         (WebCore::CrossThreadTask8::create):
1168         (WebCore::CrossThreadTask8::CrossThreadTask8):
1169         (WebCore::createCallbackTask):
1170
1171 2010-05-20  Jian Li  <jianli@chromium.org>
1172
1173         Reviewed by David Levin.
1174
1175         Rename GenericWorkerTask.h to CrossThreadTask.h and move it to dom directory.
1176         https://bugs.webkit.org/show_bug.cgi?id=39135
1177
1178         * GNUmakefile.am:
1179         * WebCore.gypi:
1180         * WebCore.vcproj/WebCore.vcproj:
1181         * WebCore.xcodeproj/project.pbxproj:
1182         * dom/CrossThreadTask.h: Renamed from WebCore/workers/GenericWorkerTask.h.
1183         * html/FileStreamProxy.cpp:
1184         * loader/WorkerThreadableLoader.cpp:
1185         * websockets/WorkerThreadableWebSocketChannel.cpp:
1186         * workers/DefaultSharedWorkerRepository.cpp:
1187         * workers/WorkerMessagingProxy.cpp:
1188         * workers/WorkerScriptLoader.cpp:
1189
1190 2010-05-20  Adele Peterson  <adele@apple.com>
1191
1192         Reviewed by Mark Rowe.
1193
1194         Remove the Safari welcome page site-specific quirk, since its no longer needed.
1195
1196         * css/CSSStyleSheet.cpp: (WebCore::CSSStyleSheet::cssRules):
1197
1198 2010-05-20  Steve Block  <steveblock@google.com>
1199
1200         Reviewed by Jeremy Orlow.
1201
1202         Provide bindings for DeviceOrientation
1203         https://bugs.webkit.org/show_bug.cgi?id=39210
1204
1205         Tests: fast/dom/DeviceOrientation/window-property.html
1206                fast/dom/Window/window-properties-on-device-orientation.html
1207
1208         Adds bindings for DeviceOrientation as defined in
1209         http://dev.w3.org/geo/api/spec-source-orientation.html
1210         This is guarded by ENABLE(DEVICE_ORIENTATION) which is currently disabled on
1211         all platforms but Android.
1212
1213         * Android.derived.jscbindings.mk:
1214         * Android.derived.v8bindings.mk:
1215         * Android.mk:
1216         * Configurations/FeatureDefines.xcconfig:
1217         * DerivedSources.cpp:
1218         * DerivedSources.make:
1219         * GNUmakefile.am:
1220         * WebCore.gypi:
1221         * WebCore.pri:
1222         * WebCore.pro:
1223         * WebCore.xcodeproj/project.pbxproj:
1224         * bindings/js/JSEventCustom.cpp:
1225         (WebCore::toJS):
1226         * bindings/v8/custom/V8EventCustom.cpp:
1227         (WebCore::toV8):
1228         * dom/DeviceOrientationEvent.cpp: Added.
1229         (WebCore::DeviceOrientationEvent::DeviceOrientationEvent):
1230         (WebCore::DeviceOrientationEvent::initDeviceOrientationEvent):
1231         * dom/DeviceOrientationEvent.h: Added.
1232         (WebCore::DeviceOrientationEvent::create):
1233         (WebCore::DeviceOrientationEvent::alpha):
1234         (WebCore::DeviceOrientationEvent::beta):
1235         (WebCore::DeviceOrientationEvent::gamma):
1236         (WebCore::DeviceOrientationEvent::isDeviceOrientationEvent):
1237         * dom/DeviceOrientationEvent.idl: Added.
1238         * dom/Event.cpp:
1239         (WebCore::Event::isDeviceOrientationEvent):
1240         * dom/Event.h:
1241         * dom/EventNames.h:
1242         * page/DOMWindow.h:
1243         * page/DOMWindow.idl:
1244
1245 2010-05-20  Kenneth Rohde Christiansen  <kenneth.christiansen@openbossa.org>
1246
1247         Rubberstamped by Antti Koivisto.
1248
1249         Use 0.15 as text drag delay when Q_WS_MAC is defined, which is
1250         consistent with the Mac OS X platform.
1251
1252         * page/qt/EventHandlerQt.cpp:
1253
1254 2010-05-19  Kenneth Rohde Christiansen  <kenneth@webkit.org>
1255
1256         Reviewed by Simon Hausmann.
1257
1258         Fix painting when using clipToImageBuffer()
1259
1260         When we apply the transform of the parent painter to the painter of
1261         the transparency layer, we adopt its coordinate system, thus offset
1262         should not be in page coordinates, but in the coordinate system of
1263         the parent painter.
1264
1265         * platform/graphics/qt/GraphicsContextQt.cpp:
1266         (WebCore::TransparencyLayer::TransparencyLayer):
1267
1268 2010-05-20  Adam Langley  <agl@chromium.org>
1269
1270         Reviewed by David Levin.
1271
1272         [chromium] Avoid crash when msttcorefonts aren't provided
1273
1274         https://bugs.webkit.org/show_bug.cgi?id=39015
1275         http://code.google.com/p/chromium/issues/detail?id=43831
1276
1277         * platform/graphics/chromium/FontCacheLinux.cpp:
1278         (WebCore::FontCache::createFontPlatformData):
1279
1280 2010-05-20  Zoltan Herczeg  <zherczeg@webkit.org>
1281
1282         Reviewed by Dirk Schulze.
1283
1284         Fix a crash caused by feLigthing::apply()
1285         https://bugs.webkit.org/show_bug.cgi?id=39004
1286
1287         Make FELighting::apply() similar to other filters' applies
1288         to avoid an assertion fail in putUnmultipliedImageData(),
1289         when effectDrawingRect has negative location (x or y is less than 0).
1290
1291         Test: svg/filters/feLighting-crash.svg
1292
1293         * svg/graphics/filters/SVGFELighting.cpp:
1294         (WebCore::FELighting::apply):
1295
1296 2010-05-20  Chris Jerdonek  <cjerdonek@webkit.org>
1297
1298         Reviewed by Eric Seidel.
1299
1300         Modified FrameLoader::urlSelected() to accept a KURL instead of a
1301         ResourceRequest.
1302
1303         https://bugs.webkit.org/show_bug.cgi?id=39320
1304
1305         Since ResourceRequest has non-explicit single-parameter constructors for
1306         String and KURL, urlSelected() previously accepted any of String, KURL,
1307         and ResourceRequest.  This revision changes urlSelected() to accept only
1308         a KURL to make the API tighter and easier to refactor.
1309
1310         No new functionality, so no new tests.
1311
1312         * loader/FrameLoader.cpp:
1313         (WebCore::FrameLoader::urlSelected):
1314           - Changed the public overload to accept a KURL instead of a ResourceRequest.
1315         * loader/FrameLoader.h:
1316           - Changed the public overload to accept a KURL instead of a ResourceRequest.
1317         * wml/WMLAElement.cpp:
1318         (WebCore::WMLAElement::defaultEventHandler):
1319           - Updated the call to urlSelected().
1320
1321 2010-05-20  MORITA Hajime  <morrita@google.com>
1322
1323         Reviewed by Kent Tamura.
1324
1325         2x execCommand ReadAV@NULL
1326         https://bugs.webkit.org/show_bug.cgi?id=35791
1327
1328         In applyBlockStyle(), a node which is referred from
1329         nextParagraphStart sometimes removed from the document and goes
1330         orphan, and that causes an assertion failed. This is because
1331         moveParagraphs() replaces the node with a new one with some new
1332         styles applied. So we re-compute nextParagraphStart in that case.
1333
1334         Test: editing/execCommand/35791.html
1335
1336         * dom/Position.h:
1337         (WebCore::Position::isOrphan):
1338         * editing/ApplyStyleCommand.cpp:
1339         (WebCore::ApplyStyleCommand::applyBlockStyle):
1340         * editing/VisiblePosition.h:
1341         (WebCore::VisiblePosition::isOrphan):
1342
1343 2010-05-20  Steve Block  <steveblock@google.com>
1344
1345         Reviewed by Eric Seidel.
1346
1347         PluginView contains JSC-specific code
1348         https://bugs.webkit.org/show_bug.cgi?id=38907
1349
1350         Build fix only, no new tests.
1351
1352         * plugins/PluginView.cpp:
1353         (WebCore::PluginView::start):
1354         (WebCore::PluginView::stop):
1355         (WebCore::PluginView::performRequest):
1356         * plugins/PluginView.h:
1357
1358 2010-05-17  Philippe Normand  <pnormand@igalia.com>
1359
1360         Reviewed by Eric Seidel.
1361
1362         [GStreamer] enable gst support if USE_GSTREAMER macro is defined
1363         https://bugs.webkit.org/show_bug.cgi?id=39205
1364
1365         Include gstreamer private player in the build when the
1366         USE_GSTREAMER macro is enabled.
1367
1368         * platform/graphics/MediaPlayer.cpp:
1369         (WebCore::installedMediaEngines):
1370
1371 2010-05-19  Vangelis Kokkevis  <vangelis@chromium.org>
1372
1373         Reviewed by Darin Fisher.
1374
1375         Implementing hardware accelerated compositing of layers for Chromium.
1376         Completely removed the existing software compositing path to replace
1377         it with code implemented using OpenGL.
1378         https://bugs.webkit.org/show_bug.cgi?id=38783
1379
1380         Tests: Covered by existing compositing tests.
1381
1382         * WebCore.gyp/WebCore.gyp:
1383         * platform/graphics/chromium/GraphicsLayerChromium.cpp:
1384         (WebCore::GraphicsLayerChromium::~GraphicsLayerChromium):
1385         (WebCore::GraphicsLayerChromium::updateLayerDrawsContent):
1386         (WebCore::GraphicsLayerChromium::updateContentsRect):
1387         * platform/graphics/chromium/LayerChromium.cpp:
1388         (WebCore::LayerChromium::LayerChromium):
1389         (WebCore::LayerChromium::~LayerChromium):
1390         (WebCore::LayerChromium::updateGraphicsContext):
1391         (WebCore::LayerChromium::drawsContentUpdated):
1392         (WebCore::LayerChromium::updateContents):
1393         (WebCore::LayerChromium::setContents):
1394         (WebCore::LayerChromium::setBackingStoreSize):
1395         (WebCore::LayerChromium::setBounds):
1396         (WebCore::LayerChromium::setNeedsDisplay):
1397         * platform/graphics/chromium/LayerChromium.h:
1398         (WebCore::LayerChromium::contentsDirty):
1399         (WebCore::LayerChromium::drawsContent):
1400         * platform/graphics/chromium/LayerRendererChromium.cpp:
1401         (WebCore::):
1402         (WebCore::checkGLError):
1403         (WebCore::loadShader):
1404         (WebCore::loadShaderProgram):
1405         (WebCore::toGLMatrix):
1406         (WebCore::orthoMatrix):
1407         (WebCore::createLayerTexture):
1408         (WebCore::LayerRendererChromium::create):
1409         (WebCore::LayerRendererChromium::LayerRendererChromium):
1410         (WebCore::LayerRendererChromium::~LayerRendererChromium):
1411         (WebCore::LayerRendererChromium::drawTexturedQuad):
1412         (WebCore::LayerRendererChromium::drawLayers):
1413         (WebCore::LayerRendererChromium::getTextureId):
1414         (WebCore::LayerRendererChromium::assignTextureForLayer):
1415         (WebCore::LayerRendererChromium::freeLayerTexture):
1416         (WebCore::LayerRendererChromium::drawDebugBorder):
1417         (WebCore::LayerRendererChromium::isLayerVisible):
1418         (WebCore::LayerRendererChromium::compositeLayersRecursive):
1419         (WebCore::LayerRendererChromium::makeContextCurrent):
1420         (WebCore::LayerRendererChromium::initGL):
1421         (WebCore::LayerRendererChromium::bindCommonAttribLocation):
1422         (WebCore::LayerRendererChromium::initializeSharedGLObjects):
1423         * platform/graphics/chromium/LayerRendererChromium.h:
1424         (WebCore::LayerRendererChromium::):
1425
1426 2010-05-19  Andrey Kosyakov  <caseq@chromium.org>
1427
1428         Reviewed by Timothy Hatcher.
1429
1430         Maintain focus on help screen while it's active.
1431         https://bugs.webkit.org/show_bug.cgi?id=39237
1432
1433         * inspector/front-end/HelpScreen.js:
1434         (WebInspector.HelpScreen):
1435         (WebInspector.HelpScreen.prototype.show):
1436         (WebInspector.HelpScreen.prototype._hide):
1437         (WebInspector.HelpScreen.prototype._onBlur):
1438
1439 2010-05-19  Jedrzej Nowacki  <jedrzej.nowacki@nokia.com>
1440
1441         Reviewed by Kenneth Rohde Christiansen.
1442
1443         Crash fix in the HistoryController.
1444
1445         The problem was casued by a documented feature of the QWebFrame::setHtml().
1446         The method doesn't affect a browsing history (doesn't create a HistoryItem instance), so
1447         m_currentItem and m_previousItem are not set.
1448
1449         A null check was added.
1450
1451         [Qt] The QWebPage crashes on history.pushState().
1452         https://bugs.webkit.org/show_bug.cgi?id=38840
1453
1454         * loader/HistoryController.cpp:
1455         (WebCore::HistoryController::pushState):
1456         (WebCore::HistoryController::replaceState):
1457
1458 2010-05-19  Darin Fisher  <darin@chromium.org>
1459
1460         Revert r59790 due to failing Chromium npruntime tests.
1461
1462         * bindings/v8/NPV8Object.cpp:
1463         (v8ObjectToNPObject):
1464         (npCreateV8ScriptObject):
1465         (_NPN_Invoke):
1466         (_NPN_InvokeDefault):
1467         (_NPN_Evaluate):
1468         (_NPN_EvaluateHelper):
1469         (_NPN_GetProperty):
1470         (_NPN_SetProperty):
1471         (_NPN_RemoveProperty):
1472         (_NPN_HasProperty):
1473         (_NPN_HasMethod):
1474         (_NPN_SetException):
1475         (_NPN_Enumerate):
1476         (_NPN_Construct):
1477         * bindings/v8/NPV8Object.h:
1478         * bindings/v8/V8NPObject.cpp:
1479         (forgetV8ObjectForNPObject):
1480         * bindings/v8/V8NPObject.h:
1481         * bindings/v8/V8NPUtils.cpp:
1482         (convertV8ObjectToNPVariant):
1483         (getStringIdentifier):
1484         * bindings/v8/V8NPUtils.h:
1485         * bindings/v8/npruntime.cpp:
1486
1487 2010-05-19  Gavin Barraclough  <barraclough@apple.com>
1488
1489         Rubber Stamped by Sam Weinig.
1490
1491         JSFunctions are no longer a subclass of InternalFunction.
1492
1493         * bindings/js/ScriptCallStack.cpp:
1494         (WebCore::ScriptCallStack::ScriptCallStack):
1495         (WebCore::ScriptCallStack::initialize):
1496         * bindings/js/ScriptCallStack.h:
1497
1498 2010-05-19  Jian Li  <jianli@chromium.org>
1499
1500         Reviewed by Alexey Proskuryakov.
1501
1502         Refactor text encoding detection logic in FileReader.
1503         https://bugs.webkit.org/show_bug.cgi?id=39131
1504
1505         Changed FileReader::convertToText to call TextResourceDecoder::decode to
1506         detect the encoding from BOM and decode the text. Though the File API
1507         spec says that the supplied encoding should be used if it is valid, we
1508         choose to ignore this requirement in order to be consistent with how
1509         WebKit decodes the web content: always has the BOM override the provided
1510         encoding.
1511
1512         * html/FileReader.cpp:
1513         (WebCore::FileReader::convertToText):
1514         * html/FileReader.h:
1515
1516 2010-05-19  Abhishek Arya  <inferno@chromium.org>
1517
1518         Reviewed by David Hyatt.
1519
1520         Check that the node is a text node before doing a static cast
1521         to a Text class pointer.
1522         https://bugs.webkit.org/show_bug.cgi?id=38626    
1523
1524         Test: fast/text/text-transform-nontext-node-crash.xhtml
1525
1526         * rendering/RenderText.cpp:
1527         (WebCore::RenderText::originalText):
1528         * rendering/RenderTextFragment.cpp:
1529         (WebCore::RenderTextFragment::originalText):
1530         (WebCore::RenderTextFragment::previousCharacter):
1531
1532 2010-05-19  Yaar Schnitman  <yaar@chromium.org>
1533
1534         Reviewed by Eric Seidel.
1535
1536         Fixed warnings by JSC overloads changes. Also updated the binding reference files for JSC.
1537         https://bugs.webkit.org/show_bug.cgi?id=39390
1538
1539         * bindings/scripts/CodeGeneratorJS.pm:
1540         * bindings/scripts/test/JS/JSTestInterface.cpp:
1541         (WebCore::):
1542         * bindings/scripts/test/JS/JSTestObj.cpp:
1543         (WebCore::):
1544
1545 2010-05-19  Darin Fisher  <darin@chromium.org>
1546
1547         Reviewed by Nate Chapin.
1548
1549         [chromium] Provide a way to catch exceptions thrown while interacting
1550         with a NPObject via WebBindings methods.
1551         https://bugs.webkit.org/show_bug.cgi?id=39378
1552
1553         This change also includes a small bit of cleanup in V8NPObject and
1554         friends.  I moved code into the WebCore namespace where appropriate.
1555         
1556         In _NPN_Invoke, I also moved the call to _NPN_Evaluate outside of the
1557         context scope.  I did this to avoid having nested ExceptionCatcher
1558         objects, which is not strictly necessary, but it seemed cleaner.
1559         _NPN_Evaluate already takes care of creating a context scope.
1560
1561         * bindings/v8/NPV8Object.cpp:
1562         (WebCore::v8ObjectToNPObject):
1563         (WebCore::npCreateV8ScriptObject):
1564         (_NPN_Invoke):
1565         (_NPN_InvokeDefault):
1566         (_NPN_Evaluate):
1567         (_NPN_EvaluateHelper):
1568         (_NPN_GetProperty):
1569         (_NPN_SetProperty):
1570         (_NPN_RemoveProperty):
1571         (_NPN_HasProperty):
1572         (_NPN_HasMethod):
1573         (_NPN_SetException):
1574         (_NPN_Enumerate):
1575         (_NPN_Construct):
1576         * bindings/v8/NPV8Object.h:
1577         * bindings/v8/V8NPObject.cpp:
1578         * bindings/v8/V8NPObject.h:
1579         * bindings/v8/V8NPUtils.cpp:
1580         (WebCore::convertV8ObjectToNPVariant):
1581         (WebCore::pushExceptionHandler):
1582         (WebCore::popExceptionHandler):
1583         (WebCore::ExceptionCatcher::~ExceptionCatcher):
1584         * bindings/v8/V8NPUtils.h:
1585         * bindings/v8/npruntime.cpp:
1586
1587 2010-05-19  Yaar Schnitman  <yaar@chromium.org>
1588
1589         Unreviewed, rolling out r59769.
1590         http://trac.webkit.org/changeset/59769
1591         https://bugs.webkit.org/show_bug.cgi?id=37815
1592
1593         Broke GTK again
1594
1595         * Android.jscbindings.mk:
1596         * CMakeLists.txt:
1597         * GNUmakefile.am:
1598         * WebCore.gypi:
1599         * WebCore.pro:
1600         * WebCore.vcproj/WebCore.vcproj:
1601         * WebCore.xcodeproj/project.pbxproj:
1602         * bindings/js/JSBindingsAllInOne.cpp:
1603         * bindings/js/JSCallbackData.cpp:
1604         (WebCore::JSCallbackData::invokeCallback):
1605         * bindings/js/JSEventListener.cpp:
1606         (WebCore::JSEventListener::handleEvent):
1607         * bindings/js/JSInjectedScriptHostCustom.cpp:
1608         (WebCore::InjectedScriptHost::createInjectedScript):
1609         * bindings/js/JSMainThreadExecState.cpp: Removed.
1610         * bindings/js/JSMainThreadExecState.h: Removed.
1611         * bindings/js/ScheduledAction.cpp:
1612         (WebCore::ScheduledAction::executeFunctionInContext):
1613         (WebCore::ScheduledAction::execute):
1614         * bindings/js/ScheduledAction.h:
1615         * bindings/js/ScriptController.cpp:
1616         (WebCore::ScriptController::evaluateInWorld):
1617         * bindings/js/ScriptController.h:
1618         * bindings/js/ScriptFunctionCall.cpp:
1619         (WebCore::ScriptFunctionCall::call):
1620         * bindings/objc/ObjCEventListener.mm:
1621         * bindings/objc/WebScriptObject.mm:
1622         (-[WebScriptObject callWebScriptMethod:withArguments:]):
1623         (-[WebScriptObject evaluateWebScript:]):
1624         * bindings/scripts/CodeGeneratorObjC.pm:
1625         * bindings/scripts/test/ObjC/DOMTestCallback.mm:
1626         (-[DOMTestCallback callbackWithClass1Param:]):
1627         (-[DOMTestCallback callbackWithClass2Param:strArg:]):
1628         (-[DOMTestCallback callbackWithNonBoolReturnType:]):
1629         (-[DOMTestCallback customCallback:class6Param:]):
1630         * bindings/scripts/test/ObjC/DOMTestInterface.mm:
1631         * bindings/scripts/test/ObjC/DOMTestObj.mm:
1632         (-[DOMTestObj readOnlyIntAttr]):
1633         (-[DOMTestObj readOnlyStringAttr]):
1634         (-[DOMTestObj readOnlyTestObjAttr]):
1635         (-[DOMTestObj intAttr]):
1636         (-[DOMTestObj setIntAttr:]):
1637         (-[DOMTestObj longLongAttr]):
1638         (-[DOMTestObj setLongLongAttr:]):
1639         (-[DOMTestObj unsignedLongLongAttr]):
1640         (-[DOMTestObj setUnsignedLongLongAttr:]):
1641         (-[DOMTestObj stringAttr]):
1642         (-[DOMTestObj setStringAttr:]):
1643         (-[DOMTestObj testObjAttr]):
1644         (-[DOMTestObj setTestObjAttr:]):
1645         (-[DOMTestObj attrWithException]):
1646         (-[DOMTestObj setAttrWithException:]):
1647         (-[DOMTestObj attrWithSetterException]):
1648         (-[DOMTestObj setAttrWithSetterException:]):
1649         (-[DOMTestObj attrWithGetterException]):
1650         (-[DOMTestObj setAttrWithGetterException:]):
1651         (-[DOMTestObj customAttr]):
1652         (-[DOMTestObj setCustomAttr:]):
1653         (-[DOMTestObj scriptStringAttr]):
1654         (-[DOMTestObj voidMethod]):
1655         (-[DOMTestObj voidMethodWithArgs:strArg:objArg:]):
1656         (-[DOMTestObj intMethod]):
1657         (-[DOMTestObj intMethodWithArgs:strArg:objArg:]):
1658         (-[DOMTestObj objMethod]):
1659         (-[DOMTestObj objMethodWithArgs:strArg:objArg:]):
1660         (-[DOMTestObj methodThatRequiresAllArgs:objArg:]):
1661         (-[DOMTestObj methodThatRequiresAllArgsAndThrows:objArg:]):
1662         (-[DOMTestObj serializedValue:]):
1663         (-[DOMTestObj methodWithException]):
1664         (-[DOMTestObj customMethod]):
1665         (-[DOMTestObj customMethodWithArgs:strArg:objArg:]):
1666         (-[DOMTestObj customArgsAndException:]):
1667         (-[DOMTestObj addEventListener:listener:useCapture:]):
1668         (-[DOMTestObj removeEventListener:listener:useCapture:]):
1669         (-[DOMTestObj withDynamicFrame]):
1670         (-[DOMTestObj withDynamicFrameAndArg:]):
1671         (-[DOMTestObj withDynamicFrameAndOptionalArg:optionalArg:]):
1672         (-[DOMTestObj withDynamicFrameAndUserGesture:]):
1673         (-[DOMTestObj withDynamicFrameAndUserGestureASAD:optionalArg:]):
1674         (-[DOMTestObj withScriptStateVoid]):
1675         (-[DOMTestObj withScriptStateObj]):
1676         (-[DOMTestObj withScriptStateVoidException]):
1677         (-[DOMTestObj withScriptStateObjException]):
1678         (-[DOMTestObj methodWithOptionalArg:]):
1679         (-[DOMTestObj methodWithNonOptionalArgAndOptionalArg:opt:]):
1680         (-[DOMTestObj methodWithNonOptionalArgAndTwoOptionalArgs:opt1:opt2:]):
1681         * bindings/v8/ScriptController.cpp:
1682         * bindings/v8/ScriptController.h:
1683         * html/HTMLFrameElementBase.cpp:
1684         (WebCore::HTMLFrameElementBase::isURLAllowed):
1685
1686 2010-05-19  Dirk Pranke  <dpranke@chromium.org>
1687
1688         Try again to roll out r58675.
1689
1690         * notifications/Notification.h:
1691         * notifications/Notification.idl:
1692
1693 2010-05-19  Enrica Casucci  <enrica@apple.com>
1694
1695         Reviewed by Dave Hyatt.
1696
1697         REGRESSION (r59385) crash destroying inline renderers
1698         https://bugs.webkit.org/show_bug.cgi?id=39143
1699         <rdar://problem/8003662>
1700         
1701         The goal of r59385 was to make sure that the layout of block after all its children had been removed produced the identical result
1702         as the one of a newly created empty block. In order to do so, we had to make sure that the m_inlineChildren flag was reset to true when
1703         the block had no children (as it is upon creation).
1704         I discovered that, by doing that for anonymous blocks it leads removeChild to conclude that the anonymous children can be removed,
1705         without considering that the anonymous block could be part of a continuation chain. For this reason, when RenderInline::destroy()
1706         tries to remove the continuations we are effectively deleting a renderer that had been deleted already.
1707         
1708         Test: fast/inline-block/anonymous-block-crash.html
1709
1710         * rendering/RenderBlock.cpp:
1711         (WebCore::RenderBlock::layoutBlock): resetting the flag m_inlineChildren only for non anonymous blocks otherwise we incurr in
1712         a double deletion of the renderer that causes the crash.
1713
1714 2010-05-19  Sheriff Bot  <webkit.review.bot@gmail.com>
1715
1716         Unreviewed, rolling out r59782.
1717         http://trac.webkit.org/changeset/59782
1718         https://bugs.webkit.org/show_bug.cgi?id=39379
1719
1720         broke DRT build (Requested by dpranke on #webkit).
1721
1722         * notifications/Notification.h:
1723         (WebCore::Notification::dir):
1724         (WebCore::Notification::setDir):
1725         (WebCore::Notification::replaceId):
1726         (WebCore::Notification::setReplaceId):
1727         * notifications/Notification.idl:
1728
1729 2010-05-18  David Hyatt  <hyatt@apple.com>
1730
1731         Reviewed by Oliver Hunt.
1732
1733         https://bugs.webkit.org/show_bug.cgi?id=21049, opacity and position:relative fail in multi-column layouts.
1734         
1735         Make layers split painting across columns just as normal flow content does.  This is actually very
1736         challenging, since intermediate multicol layers can exist between a child that has to be split and
1737         its enclosing stacking context.
1738         
1739         In order to properly paginate layers, a bit is set on all pagination roots, i.e., layers that will get
1740         split and thus split any descendant layers that they are also responsible for painting.  For a paginated
1741         root, we walk up the layer hierarchy and collect all intermediate multicol blocks between the child
1742         and the enclosing stacking context.
1743         
1744         We then recur from the outside in, applying clipping and translation as we break up the layer into strips.
1745         
1746         Composited layers remain unsplittable and have a hacked offset still in order to be placed in the right
1747         column.
1748         
1749         Painting and hit testing of columns has been simplified in all of the functions to use the x position of
1750         the column rect instead of trying to increment an x offset by adding in widths and column gaps.  This
1751         makes those functions directionality-independent (and the LTR/RTL code paths are now the same).
1752         
1753         Fix repainting of columns as well to make sure rects are split across columns only after relative position
1754         and transforms have been applied.
1755         
1756         Added fast/multicol/layers-split-across-columns.html
1757
1758         * rendering/RenderBlock.cpp:
1759         (WebCore::RenderBlock::paintColumnContents):
1760         (WebCore::RenderBlock::adjustRectForColumns):
1761         (WebCore::RenderBlock::adjustForColumns):
1762         * rendering/RenderBlock.h:
1763         * rendering/RenderBox.cpp:
1764         (WebCore::RenderBox::computeRectForRepaint):
1765         * rendering/RenderLayer.cpp:
1766         (WebCore::RenderLayer::RenderLayer):
1767         (WebCore::RenderLayer::updateLayerPositions):
1768         (WebCore::RenderLayer::updatePagination):
1769         (WebCore::RenderLayer::updateLayerPosition):
1770         (WebCore::RenderLayer::paintLayer):
1771         (WebCore::RenderLayer::paintList):
1772         (WebCore::RenderLayer::paintPaginatedChildLayer):
1773         (WebCore::RenderLayer::paintChildLayerIntoColumns):
1774         (WebCore::RenderLayer::hitTestLayer):
1775         (WebCore::RenderLayer::hitTestList):
1776         (WebCore::RenderLayer::hitTestPaginatedChildLayer):
1777         (WebCore::RenderLayer::hitTestChildLayerColumns):
1778         * rendering/RenderLayer.h:
1779         (WebCore::RenderLayer::):
1780         (WebCore::RenderLayer::isPaginated):
1781
1782 2010-05-18  Dirk Pranke  <dpranke@chromium.org>
1783
1784         Reviewed by Dimitri Glazkov.
1785
1786         Attempt to revert r58765 to see if it was causing a performance
1787         regression.
1788
1789         https://bugs.webkit.org/show_bug.cgi?id=39328
1790
1791         * notifications/Notification.h:
1792         * notifications/Notification.idl:
1793
1794 2010-05-19  Kevin Watters  <kevinwatters@gmail.com>
1795
1796         Reviewed by Kevin Ollivier.
1797
1798         [wx] Ensure m_nsFont is initialized properly, and tweak fallback font handling
1799         to handle more cases.
1800         https://bugs.webkit.org/show_bug.cgi?id=39365
1801         
1802         * platform/graphics/wx/FontCacheWx.cpp:
1803         (WebCore::FontCache::getFontDataForCharacters):
1804         (WebCore::FontCache::getSimilarFontPlatformData):
1805         (WebCore::FontCache::getLastResortFallbackFont):
1806         * platform/graphics/wx/FontPlatformDataWx.cpp:
1807         (WebCore::FontPlatformData::FontPlatformData):
1808
1809 2010-05-19  Marcus Bulach  <bulach@chromium.org>
1810
1811         Reviewed by Eric Seidel.
1812
1813         Fixes Windows Qt Release post r59772.
1814         https://bugs.webkit.org/show_bug.cgi?id=39369
1815
1816         * platform/GeolocationService.cpp:
1817
1818 2010-05-19  Eric Seidel  <eric@webkit.org>
1819
1820         Reviewed by Adam Barth.
1821
1822         Add support for handling basic <script> tags in the HTML5 Parser
1823         https://bugs.webkit.org/show_bug.cgi?id=39350
1824
1825         WebKit currently executes scripts from HTMLTokenizer in one giagantic
1826         hack.  HTML 5 requires that we execute scripts from the tree-builders/parser.
1827
1828         It will take me a while to re-factor enough of HTMLTokenizer to be able to
1829         move the script execution logic without breaking things.  In the interest
1830         of allowing Adam to continue improving the HTML 5 lexer I've added this
1831         very basic (and very incomplete) <script> support to the HTML 5 parser code
1832         path so the he can run the HTML5 parser test suite.
1833
1834         <script> support is tested by most of the layout tests.
1835
1836         * dom/ScriptElement.cpp:
1837         (WebCore::useHTML5Parser):
1838         (WebCore::ScriptElement::finishParsingChildren):
1839
1840 2010-05-19  Anders Carlsson  <andersca@apple.com>
1841
1842         Reviewed by Sam Weinig.
1843
1844         Move member variables from NamedMappedAttrMap to its base class NamedNodeMap
1845         https://bugs.webkit.org/show_bug.cgi?id=39367
1846         <rdar://problem/8003304>
1847
1848         This lets us get rid of the vtable pointer in NamedNodeMap which saves 8 bytes, and also allows us to
1849         fit the m_mappedAttributeCount unsigned int in the RefCounted padding (in 64-bit).
1850         
1851         The net result is that we shrink the NamedMappedAttrMap size by 16 bytes, while keeping the size of NamedNodeMap the same.
1852
1853         * dom/Element.cpp:
1854         (WebCore::Element::createAttributeMap):
1855         * dom/Element.h:
1856         * dom/NamedMappedAttrMap.cpp:
1857         * dom/NamedMappedAttrMap.h:
1858         (WebCore::NamedMappedAttrMap::NamedMappedAttrMap):
1859         * dom/NamedNodeMap.cpp:
1860         (WebCore::NamedNodeMap::clearAttributes):
1861         * dom/NamedNodeMap.h:
1862         (WebCore::NamedNodeMap::NamedNodeMap):
1863         * dom/Node.cpp:
1864         (WebCore::Node::dumpStatistics):
1865         * dom/StyledElement.cpp:
1866         * dom/StyledElement.h:
1867
1868 2010-05-19  Sam Weinig  <sam@webkit.org>
1869
1870         Reviewed by Anders Carlsson.
1871
1872         Use ASSERT_UNUSED instead of UNUSED_PARAM.
1873
1874         * dom/Attribute.cpp:
1875         (WebCore::Attribute::unbindAttr):
1876
1877 2010-05-19  Sam Weinig  <sam@webkit.org>
1878
1879         Rubber-stamped by Anders Carlsson.
1880
1881         Complete the merge of MappedAttribute and Attribute.
1882
1883         Files elided for brevity.
1884
1885 2010-05-19  Marcus Bulach  <bulach@chromium.org>
1886
1887         Reviewed by Steve Block.
1888
1889         [chromium] Adds supports for layout tests using GeolocationServiceMock.
1890         https://bugs.webkit.org/show_bug.cgi?id=39081
1891
1892         Allows injection of GeolocationServiceMock factory.
1893
1894         Tests: existing fast/dom/Geolocation/*
1895
1896         * platform/GeolocationService.cpp:
1897         (WebCore::GeolocationService::useMock):
1898         (WebCore::GeolocationService::useMockFactory):
1899         * platform/GeolocationService.h:
1900         * platform/chromium/GeolocationServiceChromium.cpp:
1901         (WebCore::GeolocationServiceChromium::GeolocationServiceChromium):
1902
1903 2010-05-19  Justin Schuh  <jschuh@chromium.org>
1904
1905         Reviewed by Adam Barth.
1906
1907         Moving frame.src checks out of the bindings
1908         https://bugs.webkit.org/show_bug.cgi?id=37815
1909
1910         Moved JavaScript frame.src checks out of bindings and into
1911         HTMLFrameElementBase. Added main thread state stack to JavaScriptCore
1912         so ExecState is available inside core DOM. Updated affected bindings
1913         (except for GObject, which will need to be updated to avoid origin
1914         failures inside native code).
1915
1916         * Android.jscbindings.mk:
1917         * CMakeLists.txt:
1918         * GNUmakefile.am:
1919         * WebCore.gypi:
1920         * WebCore.pro:
1921         * WebCore.vcproj/WebCore.vcproj:
1922         * WebCore.xcodeproj/project.pbxproj:
1923         * bindings/js/JSBindingsAllInOne.cpp:
1924         * bindings/js/JSCallbackData.cpp:
1925         (WebCore::JSCallbackData::invokeCallback):
1926         * bindings/js/JSEventListener.cpp:
1927         (WebCore::JSEventListener::handleEvent):
1928         * bindings/js/JSInjectedScriptHostCustom.cpp:
1929         (WebCore::InjectedScriptHost::createInjectedScript):
1930         * bindings/js/JSMainThreadExecState.cpp: Added.
1931         * bindings/js/JSMainThreadExecState.h: Added.
1932         (WebCore::JSMainThreadExecState::currentState):
1933         (WebCore::JSMainThreadExecState::call):
1934         (WebCore::JSMainThreadExecState::evaluate):
1935         (WebCore::JSMainThreadExecState::JSMainThreadExecState):
1936         (WebCore::JSMainThreadExecState::~JSMainThreadExecState):
1937         (WebCore::JSMainThreadNullState::JSMainThreadNullState):
1938         * bindings/js/ScheduledAction.cpp:
1939         (WebCore::ScheduledAction::executeFunctionInContext):
1940         (WebCore::ScheduledAction::execute):
1941         * bindings/js/ScheduledAction.h:
1942         * bindings/js/ScriptController.cpp:
1943         (WebCore::ScriptController::evaluateInWorld):
1944         (WebCore::ScriptController::canAccessFromCurrentOrigin):
1945         * bindings/js/ScriptController.h:
1946         * bindings/js/ScriptFunctionCall.cpp:
1947         (WebCore::ScriptFunctionCall::call):
1948         * bindings/objc/ObjCEventListener.mm:
1949         * bindings/objc/WebScriptObject.mm:
1950         (-[WebScriptObject callWebScriptMethod:withArguments:]):
1951         (-[WebScriptObject evaluateWebScript:]):
1952         * bindings/scripts/CodeGeneratorObjC.pm:
1953         * bindings/scripts/test/ObjC/DOMTestCallback.mm:
1954         (-[DOMTestCallback callbackWithClass1Param:]):
1955         (-[DOMTestCallback callbackWithClass2Param:strArg:]):
1956         (-[DOMTestCallback callbackWithNonBoolReturnType:]):
1957         (-[DOMTestCallback customCallback:class6Param:]):
1958         * bindings/scripts/test/ObjC/DOMTestInterface.mm:
1959         * bindings/scripts/test/ObjC/DOMTestObj.mm:
1960         (-[DOMTestObj readOnlyIntAttr]):
1961         (-[DOMTestObj readOnlyStringAttr]):
1962         (-[DOMTestObj readOnlyTestObjAttr]):
1963         (-[DOMTestObj intAttr]):
1964         (-[DOMTestObj setIntAttr:]):
1965         (-[DOMTestObj longLongAttr]):
1966         (-[DOMTestObj setLongLongAttr:]):
1967         (-[DOMTestObj unsignedLongLongAttr]):
1968         (-[DOMTestObj setUnsignedLongLongAttr:]):
1969         (-[DOMTestObj stringAttr]):
1970         (-[DOMTestObj setStringAttr:]):
1971         (-[DOMTestObj testObjAttr]):
1972         (-[DOMTestObj setTestObjAttr:]):
1973         (-[DOMTestObj attrWithException]):
1974         (-[DOMTestObj setAttrWithException:]):
1975         (-[DOMTestObj attrWithSetterException]):
1976         (-[DOMTestObj setAttrWithSetterException:]):
1977         (-[DOMTestObj attrWithGetterException]):
1978         (-[DOMTestObj setAttrWithGetterException:]):
1979         (-[DOMTestObj customAttr]):
1980         (-[DOMTestObj setCustomAttr:]):
1981         (-[DOMTestObj scriptStringAttr]):
1982         (-[DOMTestObj voidMethod]):
1983         (-[DOMTestObj voidMethodWithArgs:strArg:objArg:]):
1984         (-[DOMTestObj intMethod]):
1985         (-[DOMTestObj intMethodWithArgs:strArg:objArg:]):
1986         (-[DOMTestObj objMethod]):
1987         (-[DOMTestObj objMethodWithArgs:strArg:objArg:]):
1988         (-[DOMTestObj methodThatRequiresAllArgs:objArg:]):
1989         (-[DOMTestObj methodThatRequiresAllArgsAndThrows:objArg:]):
1990         (-[DOMTestObj serializedValue:]):
1991         (-[DOMTestObj methodWithException]):
1992         (-[DOMTestObj customMethod]):
1993         (-[DOMTestObj customMethodWithArgs:strArg:objArg:]):
1994         (-[DOMTestObj customArgsAndException:]):
1995         (-[DOMTestObj addEventListener:listener:useCapture:]):
1996         (-[DOMTestObj removeEventListener:listener:useCapture:]):
1997         (-[DOMTestObj withDynamicFrame]):
1998         (-[DOMTestObj withDynamicFrameAndArg:]):
1999         (-[DOMTestObj withDynamicFrameAndOptionalArg:optionalArg:]):
2000         (-[DOMTestObj withDynamicFrameAndUserGesture:]):
2001         (-[DOMTestObj withDynamicFrameAndUserGestureASAD:optionalArg:]):
2002         (-[DOMTestObj withScriptStateVoid]):
2003         (-[DOMTestObj withScriptStateObj]):
2004         (-[DOMTestObj withScriptStateVoidException]):
2005         (-[DOMTestObj withScriptStateObjException]):
2006         (-[DOMTestObj methodWithOptionalArg:]):
2007         (-[DOMTestObj methodWithNonOptionalArgAndOptionalArg:opt:]):
2008         (-[DOMTestObj methodWithNonOptionalArgAndTwoOptionalArgs:opt1:opt2:]):
2009         * bindings/v8/ScriptController.cpp:
2010         (WebCore::ScriptController::canAccessFromCurrentOrigin):
2011         * bindings/v8/ScriptController.h:
2012         * html/HTMLFrameElementBase.cpp:
2013         (WebCore::HTMLFrameElementBase::isURLAllowed):
2014
2015 2010-05-19  Andreas Kling  <andreas.kling@nokia.com>
2016
2017         Reviewed by Darin Adler.
2018
2019         CanvasRenderingContext2D's property getters that return colors should
2020         serialize them in accordance with the HTML5 spec (4.8.11.1.4)
2021         Setters should ignore invalid colors.
2022
2023         Also, shadowColor should initially be transparent black (4.8.11.1.6)
2024
2025         https://bugs.webkit.org/show_bug.cgi?id=38845
2026
2027         Refactored CanvasStyle to store an RGBA32 instead of RGBA components and/or the color string.
2028
2029         Spec links:
2030         http://www.whatwg.org/specs/web-apps/current-work/#serialization-of-a-color
2031         http://www.whatwg.org/specs/web-apps/current-work/#dom-context-2d-shadowcolor
2032
2033         * html/canvas/CanvasRenderingContext2D.cpp:
2034         (WebCore::CanvasRenderingContext2D::State::State):
2035         (WebCore::CanvasRenderingContext2D::shadowColor):
2036         (WebCore::CanvasRenderingContext2D::setShadowColor):
2037         (WebCore::CanvasRenderingContext2D::setShadow):
2038         (WebCore::CanvasRenderingContext2D::clearShadow):
2039         (WebCore::CanvasRenderingContext2D::applyShadow):
2040         * html/canvas/CanvasRenderingContext2D.h:
2041         * html/canvas/CanvasStyle.cpp:
2042         (WebCore::CanvasStyle::CanvasStyle):
2043         (WebCore::CanvasStyle::create):
2044         (WebCore::CanvasStyle::applyStrokeColor):
2045         (WebCore::CanvasStyle::applyFillColor):
2046         * html/canvas/CanvasStyle.h:
2047         (WebCore::CanvasStyle::create):
2048         (WebCore::CanvasStyle::color):
2049         (WebCore::CanvasStyle::):
2050         (WebCore::CanvasStyle::CMYKAValues::CMYKAValues):
2051         * platform/graphics/Color.cpp:
2052         (WebCore::Color::serialized):
2053         * platform/graphics/Color.h:
2054
2055 2010-05-19  Andreas Kling  <andreas.kling@nokia.com>
2056
2057         Reviewed by Simon Hausmann.
2058
2059         [Qt] REGRESSION: CoolClock isn't rendered properly
2060
2061         https://bugs.webkit.org/show_bug.cgi?id=38526
2062
2063         CanvasRenderingContext2D's arc() should connect to the previous point
2064         with a straight line (HTML5 spec 4.8.11.1.8), but if the path is empty
2065         to begin with, we don't want a line back to (0,0)
2066         This also fixes the rendering artifact discussed in bug 36226.
2067
2068         Spec link:
2069         http://www.whatwg.org/specs/web-apps/current-work/#dom-context-2d-arc
2070
2071         Test: fast/canvas/canvas-arc-connecting-line.html
2072
2073         * platform/graphics/qt/PathQt.cpp:
2074         (WebCore::Path::addArc):
2075
2076 2010-05-19  Alexander Pavlov  <apavlov@chromium.org>
2077
2078         Reviewed by Jeremy Orlow.
2079
2080         Fix whitespace for the bug 38906
2081         https://bugs.webkit.org/show_bug.cgi?id=39351
2082
2083         No new tests required (no code change).
2084
2085         * css/CSSParser.cpp:
2086         (WebCore::CSSParser::~CSSParser):
2087         (WebCore::CSSParser::setupParser):
2088         (WebCore::CSSParser::parseSheet):
2089         (WebCore::CSSParser::parseValue):
2090         (WebCore::CSSParser::parseSelector):
2091         (WebCore::unitFromString):
2092         (WebCore::CSSParser::checkForOrphanedUnits):
2093         (WebCore::CSSParser::parseWCSSInputProperty):
2094         (WebCore::CSSParser::parseFillShorthand):
2095         (WebCore::CSSParser::parseAnimationShorthand):
2096         (WebCore::CSSParser::parseTransitionShorthand):
2097         (WebCore::CSSParser::parseShorthand):
2098         (WebCore::CSSParser::parse4Values):
2099         (WebCore::CSSParser::parseAttr):
2100         (WebCore::CSSParser::parseFillPositionXY):
2101         (WebCore::CSSParser::parseFillPosition):
2102         (WebCore::CSSParser::parseFillRepeat):
2103         (WebCore::CSSParser::parseFillProperty):
2104         (WebCore::CSSParser::parseAnimationTimingFunction):
2105         (WebCore::CSSParser::parseAnimationProperty):
2106         (WebCore::CSSParser::parseDashboardRegions):
2107         (WebCore::CSSParser::parseCounterContent):
2108         (WebCore::CSSParser::parseShape):
2109         (WebCore::CSSParser::parseFont):
2110         (WebCore::CSSParser::parseFontFamily):
2111         (WebCore::CSSParser::parseFontFaceSrc):
2112         (WebCore::parseInt):
2113         (WebCore::CSSParser::parseColor):
2114         (WebCore::CSSParser::parseShadow):
2115         (WebCore::CSSParser::parseReflect):
2116         (WebCore::BorderImageParseContext::commitNumber):
2117         (WebCore::BorderImageParseContext::commitBorderImage):
2118         (WebCore::CSSParser::parseBorderImage):
2119         (WebCore::CSSParser::parseCounter):
2120         (WebCore::parseGradientPoint):
2121         (WebCore::parseGradientColorStop):
2122         (WebCore::CSSParser::parseGradient):
2123         (WebCore::CSSParser::parseCanvas):
2124         (WebCore::CSSParser::parseTransform):
2125         (WebCore::CSSParser::parseTransformOrigin):
2126         (WebCore::CSSParser::parsePerspectiveOrigin):
2127         (WebCore::CSSParser::text):
2128         (WebCore::CSSParser::createRuleList):
2129         (WebCore::CSSParser::createVariablesRule):
2130         (WebCore::CSSParser::parseVariable):
2131         (WebCore::CSSParser::parsePropertyWithResolvedVariables):
2132         (WebCore::CSSParser::checkForVariables):
2133         (WebCore::CSSParser::createKeyframeRule):
2134         * css/CSSParser.h:
2135         * inspector/InspectorController.cpp:
2136         (WebCore::InspectorController::setFrontend):
2137         (WebCore::InspectorController::show):
2138         (WebCore::InspectorController::unbindAllResources):
2139         (WebCore::InspectorController::didCommitLoad):
2140         (WebCore::InspectorController::scriptImported):
2141         (WebCore::InspectorController::getCurrentUserInitiatedProfileName):
2142         (WebCore::InspectorController::removeBreakpoint):
2143         (WebCore::drawOutlinedQuad):
2144         (WebCore::InspectorController::stopTiming):
2145         * inspector/InspectorDOMAgent.cpp:
2146         (WebCore::InspectorDOMAgent::didRemoveDOMNode):
2147         (WebCore::InspectorDOMAgent::getStyles):
2148         (WebCore::InspectorDOMAgent::applyStyleText):
2149
2150 2010-05-19  Steve Block  <steveblock@google.com>
2151
2152         Reviewed by Nate Chapin.
2153
2154         V8 code generator does not add ENABLE guards around attribute getters and setters
2155         https://bugs.webkit.org/show_bug.cgi?id=39222
2156
2157         No new tests, build fix only.
2158
2159         * bindings/scripts/CodeGeneratorV8.pm:
2160
2161 2010-05-19  Jeremy Orlow  <jorlow@chromium.org>
2162
2163         Unreviewed build fix for Chromium.
2164
2165         * storage/IndexedDatabaseImpl.cpp:
2166
2167 2010-05-17  Jeremy Orlow  <jorlow@chromium.org>
2168
2169         Reviewed by Darin Fisher.
2170
2171         Hook Chromium's WebIndexedDatabaseImpl up to IndexedDatabaseImpl
2172         https://bugs.webkit.org/show_bug.cgi?id=39216
2173
2174         All of these functions are supposed to be passing around the origin since
2175         the caller of IndexedDatabaseImpl might not be able to pass in a Frame*
2176         object.  I tried to fix this in an ealier patch, but obviously messed up.
2177
2178         Also change passing security origin strings to passing SecurityOrigin
2179         objects.
2180
2181         No behavior change because Chromium was emulating the old behavior before
2182         even though the code wasn't properly hooked up.
2183
2184         * storage/IndexedDatabase.h:
2185         * storage/IndexedDatabaseImpl.cpp:
2186         (WebCore::IndexedDatabaseImpl::open):
2187         * storage/IndexedDatabaseImpl.h:
2188         * storage/IndexedDatabaseRequest.cpp:
2189         (WebCore::IndexedDatabaseRequest::open):
2190
2191 2010-05-19  Ben Murdoch  <benm@google.com>
2192
2193         Reviewed by Darin Adler.
2194
2195         Touch events are marked DontEnum in DOMWindow.idl
2196         https://bugs.webkit.org/show_bug.cgi?id=39118
2197
2198         Touch events are the only attribute event listeners on the
2199         window object that are marked DontEnum. For consistency allow
2200         them to be enumerated.
2201
2202         * page/DOMWindow.idl: Remove DontEnum from touchcancel, touchend,
2203             touchstart and touchmove attributes.
2204
2205 2010-05-19  Simon Hausmann  <simon.hausmann@nokia.com>
2206
2207         [Qt] Fix build warning
2208
2209         NamedAttrMap.h has been renamed to NamedNodeMap.h
2210
2211         * WebCore.pro:
2212
2213 2010-05-19  Eric Seidel  <eric@webkit.org>
2214
2215         Reviewed by Adam Barth.
2216
2217         Add an HTML parsing benchmark
2218         https://bugs.webkit.org/show_bug.cgi?id=39338
2219
2220         This benchmark parses the HTML5 specification 10 times and
2221         reports how long it takes.  It does this 21 times, discarding
2222         the first warm-up run, and then prints the average time and
2223         standard deviation.
2224
2225         Sharking the benchmark correctly shows over 60% of the time spent under HTMLTokenizer::write().
2226         The numbers from the benchmark are rather consistent.  On my
2227         Mac Book Pro, I consistently see standard deviations < 2% of total time.
2228
2229         * benchmarks/parser/html-parser.html: Added.
2230         * benchmarks/parser/resources/html5.html: Added.
2231
2232 2010-05-18  Yuzo Fujishima  <yuzo@google.com>
2233
2234         Reviewed by Shinichiro Hamaji.
2235
2236         Make CSS Parser properly handle only-for-pages pseudo-classes.
2237
2238         A new Match category, PagePseudoClass, is introduced to distinguish
2239         only-for-pages pseudo-classes from others. A new symbol, pseudo_page,
2240         is introduced to handle them separately.
2241
2242         https://bugs.webkit.org/show_bug.cgi?id=38731
2243
2244         * css/CSSGrammar.y:
2245         * css/CSSParser.cpp:
2246         (WebCore::CSSParser::createMarginAtRule):
2247         * css/CSSParser.h:
2248         * css/CSSSelector.cpp:
2249         (WebCore::CSSSelector::extractPseudoType):
2250         (WebCore::CSSSelector::selectorText):
2251         * css/CSSSelector.h:
2252         (WebCore::CSSSelector::):
2253         * css/CSSStyleSelector.cpp:
2254         (WebCore::CSSStyleSelector::SelectorChecker::checkOneSelector):
2255
2256 2010-05-19  Adam Barth  <abarth@webkit.org>
2257
2258         Reviewed by David Hyatt.
2259
2260         Change the API of nextToken to distinguish between emitting a token and just running out of input
2261         https://bugs.webkit.org/show_bug.cgi?id=39349
2262
2263         I'm not sure there's a functional difference with this patch yet, but
2264         as discussed with Eric, we need this to handle attributes.
2265
2266         * html/HTML5Lexer.cpp:
2267         (WebCore::HTML5Lexer::reset):
2268         (WebCore::HTML5Lexer::nextToken):
2269         * html/HTML5Lexer.h:
2270         * html/HTML5Token.h:
2271         (WebCore::HTML5Token::HTML5Token):
2272         (WebCore::HTML5Token::clear):
2273         (WebCore::HTML5Token::beginStartTag):
2274         (WebCore::HTML5Token::beginEndTag):
2275         (WebCore::HTML5Token::beginCharacter):
2276         * html/HTML5Tokenizer.cpp:
2277         (WebCore::HTML5Tokenizer::write):
2278
2279 2010-05-18  Eric Seidel  <eric@webkit.org>
2280
2281         Reviewed by Maciej Stachowiak.
2282
2283         Refactor HTMLTokenizer::write to make it more readable and split out the lexer bits from flow control bits
2284         https://bugs.webkit.org/show_bug.cgi?id=39318
2285
2286         No functional changes, only moving code into smaller functions.
2287
2288         This code is already covered by numerous layout tests.
2289
2290         HTML parsing benchmark shows this to be a wash.
2291
2292         * dom/Tokenizer.h:
2293         * html/HTMLTokenizer.cpp:
2294         (WebCore::HTMLTokenizer::advance):
2295          - New funtion to encapulate code which will move into HTMLLexer eventually.
2296          - Use ALWAYS_INLINE to make sure compilers inline this large
2297            function (otherwise this patch is a regression).
2298         (WebCore::HTMLTokenizer::willWriteHTML):
2299          - New function to handle calling any pre-write delegates.
2300         (WebCore::HTMLTokenizer::didWriteHTML):
2301          - New function to handle calling any post-write delegates.
2302         (WebCore::HTMLTokenizer::write):
2303          - Call the new functions.
2304         * html/HTMLTokenizer.h:
2305
2306 2010-05-18  Adam Barth  <abarth@webkit.org>
2307
2308         Reviewed by Eric Seidel.
2309
2310         Make the HTML5 parser correctly parse <div>Hello</div>
2311         https://bugs.webkit.org/show_bug.cgi?id=39345
2312
2313         Again, this patch is covered by a large number of LayoutTests.
2314
2315         * html/HTML5Lexer.cpp:
2316         (WebCore::HTML5Lexer::HTML5Lexer):
2317         (WebCore::HTML5Lexer::reset):
2318         (WebCore::HTML5Lexer::nextToken):
2319         (WebCore::HTML5Lexer::emitCommentToken):
2320         (WebCore::HTML5Lexer::emitCharacter):
2321         (WebCore::HTML5Lexer::emitCurrentTagToken):
2322         * html/HTML5Lexer.h:
2323         * html/HTML5Token.h:
2324         (WebCore::HTML5Token::beginCharacter):
2325         (WebCore::HTML5Token::appendToCharacter):
2326         (WebCore::HTML5Token::characters):
2327         * html/HTML5Tokenizer.cpp:
2328         (WebCore::convertToOldStyle):
2329
2330 2010-05-18  Adam Barth  <abarth@webkit.org>
2331
2332         Reviewed by Eric Seidel.
2333
2334         Make the HTML5 parser actually parse <div></div>
2335         https://bugs.webkit.org/show_bug.cgi?id=39342
2336
2337         This patch is covered by every LayoutTest.  Yes.  All of them.  :)
2338
2339         * html/HTML5Lexer.cpp:
2340         (WebCore::toLowerCase):
2341         (WebCore::HTML5Lexer::HTML5Lexer):
2342         (WebCore::HTML5Lexer::nextToken):
2343         (WebCore::HTML5Lexer::emitCharacter):
2344         * html/HTML5Lexer.h:
2345         * html/HTML5Token.h:
2346         (WebCore::HTML5Token::HTML5Token):
2347         (WebCore::HTML5Token::beginStartTag):
2348         (WebCore::HTML5Token::beginEndTag):
2349         (WebCore::HTML5Token::appendToName):
2350         (WebCore::HTML5Token::type):
2351         (WebCore::HTML5Token::name):
2352         (WebCore::HTML5Token::selfClosing):
2353         (WebCore::HTML5Token::attrs):
2354         * html/HTML5Tokenizer.cpp:
2355         (WebCore::convertToOldStyle):
2356         (WebCore::HTML5Tokenizer::write):
2357
2358 2010-05-18  Tony Chang  <tony@chromium.org>
2359
2360         Reviewed by Ojan Vafai.
2361
2362         REGRESSION: crash in WebCore::CompositeEditCommand::splitTreeToNode when indenting in an empty li
2363         https://bugs.webkit.org/show_bug.cgi?id=38232
2364
2365         Test: editing/execCommand/crash-indenting-list-item.html
2366
2367         * editing/IndentOutdentCommand.cpp:
2368         (WebCore::IndentOutdentCommand::tryIndentingAsListItem):
2369         (WebCore::IndentOutdentCommand::indentIntoBlockquote):
2370
2371 2010-05-18  Kent Tamura  <tkent@chromium.org>
2372
2373         Reviewed by Darin Adler.
2374
2375         ':optional' pseudo selector should not be applied to <keygen> and <progress>
2376         https://bugs.webkit.org/show_bug.cgi?id=39292
2377
2378         Test: fast/css/pseudo-required-optional-unapplied.html
2379
2380         * html/HTMLKeygenElement.h:
2381         (WebCore::HTMLKeygenElement::isOptionalFormControl):
2382           Add isOptionalFormControl() returning false.
2383           HTMLKeygenElement inherits HTMLSelectElement, which should return true
2384           for isOptionalFormControl(). However, <keygen> is not :optional
2385           according to the standard.
2386         * html/HTMLProgressElement.h:
2387           Remove isOptionalFormControl().
2388
2389 2010-05-18  Adam Barth  <abarth@webkit.org>
2390
2391         Reviewed by Eric Seidel.
2392
2393         Implement the DOCTYPE states for the HTML5 lexer
2394         https://bugs.webkit.org/show_bug.cgi?id=39335
2395
2396         * html/HTML5Lexer.cpp:
2397         (WebCore::HTML5Lexer::nextToken):
2398         (WebCore::emitCurrentDoctypeToken):
2399         * html/HTML5Lexer.h:
2400
2401 2010-05-18  Tony Chang  <tony@chromium.org>
2402
2403         Reviewed by Ojan Vafai.
2404
2405         [chromium] ignore IME events if the keydown event was prevented
2406         https://bugs.webkit.org/show_bug.cgi?id=37692
2407
2408         A manual test to verify the IME behavior since the existing methods of
2409         textInputController test at a lower level than the fix.
2410
2411         * manual-tests/ime-keydown-preventdefault.html: Added.
2412
2413 2010-05-18  Sam Weinig  <sam@webkit.org>
2414
2415         Fix the build for platforms that don't always include UnusedParam.h
2416
2417         * dom/Attribute.cpp:
2418
2419 2010-05-18  MORITA Hajime  <morrita@google.com>
2420
2421         Reviewed by Kent Tamura.
2422
2423         [Chromium] Windows: Determinate progress bar should have glossy overlay
2424         https://bugs.webkit.org/show_bug.cgi?id=39269
2425         
2426         - Moved animation code from RenderThemeChromiumWin to chromium tree
2427           because it should be behind the theme implementation, which lives
2428           in chromium tree.
2429         - Passed current time to the bridge, which will be used to compute
2430           the state of the theme animation.
2431         
2432         No new tests, animation effect can be confirmed only manually.
2433         
2434         * platform/chromium/ChromiumBridge.h:
2435         * rendering/RenderProgress.h:
2436         (WebCore::RenderProgress::animationStartTime): Added.
2437         * rendering/RenderThemeChromiumWin.cpp:
2438         (WebCore::RenderThemeChromiumWin::animationDurationForProgressBar):
2439         (WebCore::RenderThemeChromiumWin::paintProgressBar):
2440
2441 2010-05-18  Sam Weinig  <sam@webkit.org>
2442
2443         Fix release build.
2444
2445         * dom/Attribute.cpp:
2446         (WebCore::Attribute::unbindAttr):
2447
2448 2010-05-18  Sam Weinig  <sam@webkit.org>
2449
2450         Reviewed by Maciej Stachowiak.
2451
2452         Move Attr pointer from Attribute to a global HashMap.
2453         https://bugs.webkit.org/show_bug.cgi?id=39337
2454         <rdar://problem/8001168>
2455
2456         Shaves another word off of Attribute.
2457
2458         * dom/Attr.cpp:
2459         (WebCore::Attr::Attr):
2460         (WebCore::Attr::~Attr):
2461         * dom/Attribute.cpp:
2462         (WebCore::attributeAttrMap):
2463         (WebCore::Attribute::attr):
2464         (WebCore::Attribute::createAttrIfNeeded):
2465         (WebCore::Attribute::bindAttr):
2466         (WebCore::Attribute::unbindAttr):
2467         * dom/Attribute.h:
2468         (WebCore::Attribute::Attribute):
2469
2470 2010-05-18  Jakob Petsovits  <jpetsovits@rim.com>
2471
2472         Unreviewed, forgot to svn add source file in r59619.
2473         http://trac.webkit.org/changeset/59619
2474
2475         * platform/image-decoders/openvg: Added.
2476         * platform/image-decoders/openvg/ImageDecoderOpenVG.cpp: Added.
2477         (WebCore::RGBA32Buffer::asNewNativeImage):
2478
2479 2010-05-18  Yaar Schnitman  <yaar@chromium.org>
2480
2481         Unreviewed, rolling out r59693.
2482         http://trac.webkit.org/changeset/59693
2483         https://bugs.webkit.org/show_bug.cgi?id=37815
2484
2485         Broke GTK Release
2486
2487         * Android.jscbindings.mk:
2488         * CMakeLists.txt:
2489         * GNUmakefile.am:
2490         * WebCore.gypi:
2491         * WebCore.pro:
2492         * WebCore.vcproj/WebCore.vcproj:
2493         * WebCore.xcodeproj/project.pbxproj:
2494         * bindings/js/JSBindingsAllInOne.cpp:
2495         * bindings/js/JSCallbackData.cpp:
2496         (WebCore::JSCallbackData::invokeCallback):
2497         * bindings/js/JSEventListener.cpp:
2498         (WebCore::JSEventListener::handleEvent):
2499         * bindings/js/JSInjectedScriptHostCustom.cpp:
2500         (WebCore::InjectedScriptHost::createInjectedScript):
2501         * bindings/js/JSMainThreadExecState.cpp: Removed.
2502         * bindings/js/JSMainThreadExecState.h: Removed.
2503         * bindings/js/ScheduledAction.cpp:
2504         (WebCore::ScheduledAction::executeFunctionInContext):
2505         (WebCore::ScheduledAction::execute):
2506         * bindings/js/ScheduledAction.h:
2507         * bindings/js/ScriptController.cpp:
2508         (WebCore::ScriptController::evaluateInWorld):
2509         * bindings/js/ScriptController.h:
2510         * bindings/js/ScriptFunctionCall.cpp:
2511         (WebCore::ScriptFunctionCall::call):
2512         * bindings/objc/ObjCEventListener.mm:
2513         * bindings/objc/WebScriptObject.mm:
2514         (-[WebScriptObject callWebScriptMethod:withArguments:]):
2515         (-[WebScriptObject evaluateWebScript:]):
2516         * bindings/scripts/CodeGeneratorObjC.pm:
2517         * bindings/scripts/test/ObjC/DOMTestCallback.mm:
2518         (-[DOMTestCallback callbackWithClass1Param:]):
2519         (-[DOMTestCallback callbackWithClass2Param:strArg:]):
2520         (-[DOMTestCallback callbackWithNonBoolReturnType:]):
2521         (-[DOMTestCallback customCallback:class6Param:]):
2522         * bindings/scripts/test/ObjC/DOMTestInterface.mm:
2523         * bindings/scripts/test/ObjC/DOMTestObj.mm:
2524         (-[DOMTestObj readOnlyIntAttr]):
2525         (-[DOMTestObj readOnlyStringAttr]):
2526         (-[DOMTestObj readOnlyTestObjAttr]):
2527         (-[DOMTestObj intAttr]):
2528         (-[DOMTestObj setIntAttr:]):
2529         (-[DOMTestObj longLongAttr]):
2530         (-[DOMTestObj setLongLongAttr:]):
2531         (-[DOMTestObj unsignedLongLongAttr]):
2532         (-[DOMTestObj setUnsignedLongLongAttr:]):
2533         (-[DOMTestObj stringAttr]):
2534         (-[DOMTestObj setStringAttr:]):
2535         (-[DOMTestObj testObjAttr]):
2536         (-[DOMTestObj setTestObjAttr:]):
2537         (-[DOMTestObj attrWithException]):
2538         (-[DOMTestObj setAttrWithException:]):
2539         (-[DOMTestObj attrWithSetterException]):
2540         (-[DOMTestObj setAttrWithSetterException:]):
2541         (-[DOMTestObj attrWithGetterException]):
2542         (-[DOMTestObj setAttrWithGetterException:]):
2543         (-[DOMTestObj customAttr]):
2544         (-[DOMTestObj setCustomAttr:]):
2545         (-[DOMTestObj scriptStringAttr]):
2546         (-[DOMTestObj voidMethod]):
2547         (-[DOMTestObj voidMethodWithArgs:strArg:objArg:]):
2548         (-[DOMTestObj intMethod]):
2549         (-[DOMTestObj intMethodWithArgs:strArg:objArg:]):
2550         (-[DOMTestObj objMethod]):
2551         (-[DOMTestObj objMethodWithArgs:strArg:objArg:]):
2552         (-[DOMTestObj methodThatRequiresAllArgs:objArg:]):
2553         (-[DOMTestObj methodThatRequiresAllArgsAndThrows:objArg:]):
2554         (-[DOMTestObj serializedValue:]):
2555         (-[DOMTestObj methodWithException]):
2556         (-[DOMTestObj customMethod]):
2557         (-[DOMTestObj customMethodWithArgs:strArg:objArg:]):
2558         (-[DOMTestObj customArgsAndException:]):
2559         (-[DOMTestObj addEventListener:listener:useCapture:]):
2560         (-[DOMTestObj removeEventListener:listener:useCapture:]):
2561         (-[DOMTestObj withDynamicFrame]):
2562         (-[DOMTestObj withDynamicFrameAndArg:]):
2563         (-[DOMTestObj withDynamicFrameAndOptionalArg:optionalArg:]):
2564         (-[DOMTestObj withDynamicFrameAndUserGesture:]):
2565         (-[DOMTestObj withDynamicFrameAndUserGestureASAD:optionalArg:]):
2566         (-[DOMTestObj withScriptStateVoid]):
2567         (-[DOMTestObj withScriptStateObj]):
2568         (-[DOMTestObj withScriptStateVoidException]):
2569         (-[DOMTestObj withScriptStateObjException]):
2570         (-[DOMTestObj methodWithOptionalArg:]):
2571         (-[DOMTestObj methodWithNonOptionalArgAndOptionalArg:opt:]):
2572         (-[DOMTestObj methodWithNonOptionalArgAndTwoOptionalArgs:opt1:opt2:]):
2573         * bindings/v8/ScriptController.cpp:
2574         * bindings/v8/ScriptController.h:
2575         * html/HTMLFrameElementBase.cpp:
2576         (WebCore::HTMLFrameElementBase::isURLAllowed):
2577
2578 2010-05-18  Adam Barth  <abarth@webkit.org>
2579
2580         Reviewed by Eric Seidel.
2581
2582         Implement comment states for HTML5 lexer
2583         https://bugs.webkit.org/show_bug.cgi?id=39334
2584
2585         * html/HTML5Lexer.cpp:
2586         (WebCore::HTML5Lexer::nextToken):
2587
2588 2010-05-18  Anders Carlsson  <andersca@apple.com>
2589
2590         Reviewed by Sam Weinig.
2591
2592         Move all member variables from MappedAttribute to Attribute.
2593         https://bugs.webkit.org/show_bug.cgi?id=39336
2594         <rdar://problem/8000853>
2595
2596         This saves one word because we no longer have any virtual member functions in Attribute, and
2597         thus no vtable pointer.
2598         
2599         I plan to remove MappedAttribute altogether in a subsequent commit.
2600
2601         * Android.mk:
2602         * GNUmakefile.am:
2603         * WebCore.gypi:
2604         * WebCore.pro:
2605         * WebCore.vcproj/WebCore.vcproj:
2606         * WebCore.xcodeproj/project.pbxproj:
2607         * css/CSSStyleSelector.cpp:
2608         (WebCore::CSSStyleSelector::styleForElement):
2609         * dom/Attribute.cpp:
2610         (WebCore::Attribute::clone):
2611         * dom/Attribute.h:
2612         (WebCore::Attribute::create):
2613         (WebCore::Attribute::style):
2614         (WebCore::Attribute::decl):
2615         (WebCore::Attribute::setDecl):
2616         (WebCore::Attribute::isMappedAttribute):
2617         (WebCore::Attribute::Attribute):
2618         * dom/MappedAttribute.cpp: Removed.
2619         * dom/MappedAttribute.h:
2620         (WebCore::MappedAttribute::create):
2621         (WebCore::MappedAttribute::MappedAttribute):
2622         (WebCore::toMappedAttribute):
2623         * dom/NamedMappedAttrMap.cpp:
2624         (WebCore::NamedMappedAttrMap::declCount):
2625         (WebCore::NamedMappedAttrMap::mapsEquivalent):
2626         * dom/StyledElement.cpp:
2627         (WebCore::StyledElement::attributeChanged):
2628         * svg/SVGSVGElement.cpp:
2629         (WebCore::updateCSSForAttribute):
2630         * svg/SVGStyledElement.cpp:
2631         (WebCore::SVGStyledElement::getPresentationAttribute):
2632
2633 2010-05-18  Tony Chang  <tony@chromium.org>
2634
2635         Reviewed by Darin Adler.
2636
2637         https://bugs.webkit.org/show_bug.cgi?id=24943
2638         Command-B and Command-I do not generate keydown events in contentEditable regions.
2639
2640         * manual-tests/style-keypress-events.html: Added.
2641
2642 2010-05-18  Adam Barth  <abarth@webkit.org>
2643
2644         Reviewed by Eric Seidel.
2645
2646         Add more state to the HTML5 lexer
2647         https://bugs.webkit.org/show_bug.cgi?id=39333
2648
2649         This code is just transliteration from the spec.
2650
2651         * html/HTML5Lexer.cpp:
2652         (WebCore::HTML5Lexer::HTML5Lexer):
2653         (WebCore::HTML5Lexer::nextToken):
2654         * html/HTML5Lexer.h:
2655
2656 2010-05-18  Adam Barth  <abarth@webkit.org>
2657
2658         Reviewed by Eric Seidel.
2659
2660         Implement two more lexer states
2661         https://bugs.webkit.org/show_bug.cgi?id=39298
2662
2663         No tests because Eric is still working on wiring up the lexer to the
2664         test harness.
2665
2666         * html/HTML5Lexer.cpp:
2667         (WebCore::HTML5Lexer::nextToken):
2668         (WebCore::HTML5Lexer::emitParseError):
2669         (WebCore::HTML5Lexer::emitCurrentTagToken):
2670         * html/HTML5Lexer.h:
2671
2672 2010-05-18  Brady Eidson  <beidson@apple.com>
2673
2674         Reviewed by Maciej Stachowiak.
2675
2676         Repro crash with many Google image search results
2677         <rdar://problem/7685669> and https://bugs.webkit.org/show_bug.cgi?id=39323
2678
2679         When an iframe has a plugin resource as its src, that case bypassed the plugin sandboxing checks and continued to load
2680         the data for the plugin resource. It handed that data off to a nonexistent Widget, causing a null deref and the crash.
2681
2682         By replacing PluginDocuments in sandboxes iframes with a new "SinkDocument" that just acts as a data sink, we prevent the
2683         crash and also prevent actually loading the plugin binaries.
2684
2685         I filed https://bugs.webkit.org/show_bug.cgi?id=39330 to follow up and let us cancel the load as soon as we know we should.
2686
2687         Test: fast/loader/sandboxed-plugin-crash.html
2688
2689         * CMakeLists.txt:
2690         * GNUmakefile.am:
2691         * WebCore.gypi:
2692         * WebCore.pro:
2693         * WebCore.vcproj/WebCore.vcproj:
2694         * WebCore.xcodeproj/project.pbxproj:
2695
2696         * loader/DocumentWriter.cpp:
2697         (WebCore::DocumentWriter::begin): If the created document is a PluginDocument and the plugin sandbox flag is set,
2698           replace it with a SinkDocument.
2699
2700         * loader/PluginDocument.h:
2701         (WebCore::PluginDocument::isPluginDocument): Make public (it was already public at the Document.h level).
2702
2703         Add a simple document/tokenizer pair that simply presents a blank HTML document and acts as a data sink for whatever
2704         data is handed to it:
2705         * loader/SinkDocument.cpp: Added.
2706         (WebCore::SinkTokenizer::SinkTokenizer):
2707         (WebCore::SinkTokenizer::write):
2708         (WebCore::SinkTokenizer::isWaitingForScripts):
2709         (WebCore::SinkTokenizer::wantsRawData):
2710         (WebCore::SinkTokenizer::writeRawData):
2711         (WebCore::SinkTokenizer::stopParsing):
2712         (WebCore::SinkTokenizer::finish):
2713         (WebCore::SinkDocument::SinkDocument):
2714         (WebCore::SinkDocument::createTokenizer):
2715         * loader/SinkDocument.h: Added.
2716         (WebCore::SinkDocument::create):
2717
2718 2010-05-18  Sam Weinig  <sam@webkit.org>
2719
2720         Reviewed by Anders Carlsson.
2721
2722         https://bugs.webkit.org/show_bug.cgi?id=39321
2723         Reduce the size of ListHashSets used by Document
2724         <rdar://problem/7999388>
2725
2726         Reduce Membuster peak memory usage by ~450K by reducing the pool sizes
2727         of the ListHashSets used by Document.
2728
2729         * dom/Document.cpp:
2730         (WebCore::Document::addStyleSheetCandidateNode):
2731         (WebCore::Document::recalcStyleSelector):
2732         * dom/Document.h:
2733
2734 2010-05-18  Kenneth Rohde Christiansen  <kenneth@webkit.org>
2735
2736         Rubberstamped by Simon Hausmann.
2737
2738         Return null when creating an ImageBuffer failed, due to for
2739         instance a nulled pixmap.
2740
2741         * platform/graphics/qt/ImageBufferQt.cpp:
2742         (WebCore::ImageBufferData::ImageBufferData):
2743         (WebCore::ImageBuffer::ImageBuffer):
2744
2745 2010-05-18  Jian Li  <jianli@chromium.org>
2746
2747         Reviewed by Dmitry Titov.
2748
2749         Fix bug 39285: fast/files/file-reader.html is timing out on all mac bots.
2750         https://bugs.webkit.org/show_bug.cgi?id=39285
2751
2752         The timeout is caused by 59659 that changed the GC timer to 0 and thus
2753         triggered a bug in FileReader code. The fix is to add more states so
2754         that hasPendingActivity() can do the check correctly.
2755
2756         * html/FileReader.cpp:
2757         (WebCore::FileReader::FileReader):
2758         (WebCore::FileReader::hasPendingActivity):
2759         (WebCore::FileReader::readInternal):
2760         (WebCore::FileReader::terminate):
2761         (WebCore::FileReader::didStart):
2762         (WebCore::FileReader::didGetSize):
2763         (WebCore::FileReader::didRead):
2764         (WebCore::FileReader::didFinish):
2765         (WebCore::FileReader::didFail):
2766         (WebCore::FileReader::readyState):
2767         (WebCore::FileReader::result):
2768         * html/FileReader.h:
2769         (WebCore::FileReader::):
2770
2771 2010-05-18  Simon Fraser  <simon.fraser@apple.com>
2772
2773         Reviewed by Darin Adler.
2774
2775         Clean up GraphicsLayer naming code
2776         https://bugs.webkit.org/show_bug.cgi?id=39316
2777
2778         Move code that generates a name for the GraphicsLayer (used in debug builds only) into
2779         a new nameForLayer() method. Use it when naming the foreground layer.
2780
2781         * rendering/RenderLayerBacking.cpp:
2782         (WebCore::RenderLayerBacking::createGraphicsLayer):
2783         (WebCore::RenderLayerBacking::updateForegroundLayer):
2784         (WebCore::RenderLayerBacking::nameForLayer):
2785         * rendering/RenderLayerBacking.h:
2786
2787 2010-05-18  Justin Schuh  <jschuh@chromium.org>
2788
2789         Reviewed by Adam Barth.
2790
2791         Moving frame.src checks out of the bindings
2792         https://bugs.webkit.org/show_bug.cgi?id=37815
2793
2794         Moved JavaScript frame.src checks out of bindings and into
2795         HTMLFrameElementBase. Added main thread state stack to JavaScriptCore
2796         so ExecState is available inside core DOM. Updated affected bindings
2797         (except for GObject, which will need to be updated to avoid origin
2798         failures inside native code).
2799
2800         * Android.jscbindings.mk:
2801         * CMakeLists.txt:
2802         * GNUmakefile.am:
2803         * WebCore.gypi:
2804         * WebCore.pro:
2805         * WebCore.vcproj/WebCore.vcproj:
2806         * WebCore.xcodeproj/project.pbxproj:
2807         * bindings/js/JSBindingsAllInOne.cpp:
2808         * bindings/js/JSCallbackData.cpp:
2809         (WebCore::JSCallbackData::invokeCallback):
2810         * bindings/js/JSEventListener.cpp:
2811         (WebCore::JSEventListener::handleEvent):
2812         * bindings/js/JSInjectedScriptHostCustom.cpp:
2813         (WebCore::InjectedScriptHost::createInjectedScript):
2814         * bindings/js/JSMainThreadExecState.cpp: Added.
2815         * bindings/js/JSMainThreadExecState.h: Added.
2816         (WebCore::JSMainThreadExecState::currentState):
2817         (WebCore::JSMainThreadExecState::call):
2818         (WebCore::JSMainThreadExecState::evaluate):
2819         (WebCore::JSMainThreadExecState::JSMainThreadExecState):
2820         (WebCore::JSMainThreadExecState::~JSMainThreadExecState):
2821         (WebCore::JSMainThreadNullState::JSMainThreadNullState):
2822         * bindings/js/ScheduledAction.cpp:
2823         (WebCore::ScheduledAction::executeFunctionInContext):
2824         (WebCore::ScheduledAction::execute):
2825         * bindings/js/ScheduledAction.h:
2826         * bindings/js/ScriptController.cpp:
2827         (WebCore::ScriptController::evaluateInWorld):
2828         (WebCore::ScriptController::canAccessFromCurrentOrigin):
2829         * bindings/js/ScriptController.h:
2830         * bindings/js/ScriptFunctionCall.cpp:
2831         (WebCore::ScriptFunctionCall::call):
2832         * bindings/objc/ObjCEventListener.mm:
2833         * bindings/objc/WebScriptObject.mm:
2834         (-[WebScriptObject callWebScriptMethod:withArguments:]):
2835         (-[WebScriptObject evaluateWebScript:]):
2836         * bindings/scripts/CodeGeneratorObjC.pm:
2837         * bindings/scripts/test/ObjC/DOMTestCallback.mm:
2838         (-[DOMTestCallback callbackWithClass1Param:]):
2839         (-[DOMTestCallback callbackWithClass2Param:strArg:]):
2840         (-[DOMTestCallback callbackWithNonBoolReturnType:]):
2841         (-[DOMTestCallback customCallback:class6Param:]):
2842         * bindings/scripts/test/ObjC/DOMTestInterface.mm:
2843         * bindings/scripts/test/ObjC/DOMTestObj.mm:
2844         (-[DOMTestObj readOnlyIntAttr]):
2845         (-[DOMTestObj readOnlyStringAttr]):
2846         (-[DOMTestObj readOnlyTestObjAttr]):
2847         (-[DOMTestObj intAttr]):
2848         (-[DOMTestObj setIntAttr:]):
2849         (-[DOMTestObj longLongAttr]):
2850         (-[DOMTestObj setLongLongAttr:]):
2851         (-[DOMTestObj unsignedLongLongAttr]):
2852         (-[DOMTestObj setUnsignedLongLongAttr:]):
2853         (-[DOMTestObj stringAttr]):
2854         (-[DOMTestObj setStringAttr:]):
2855         (-[DOMTestObj testObjAttr]):
2856         (-[DOMTestObj setTestObjAttr:]):
2857         (-[DOMTestObj attrWithException]):
2858         (-[DOMTestObj setAttrWithException:]):
2859         (-[DOMTestObj attrWithSetterException]):
2860         (-[DOMTestObj setAttrWithSetterException:]):
2861         (-[DOMTestObj attrWithGetterException]):
2862         (-[DOMTestObj setAttrWithGetterException:]):
2863         (-[DOMTestObj customAttr]):
2864         (-[DOMTestObj setCustomAttr:]):
2865         (-[DOMTestObj scriptStringAttr]):
2866         (-[DOMTestObj voidMethod]):
2867         (-[DOMTestObj voidMethodWithArgs:strArg:objArg:]):
2868         (-[DOMTestObj intMethod]):
2869         (-[DOMTestObj intMethodWithArgs:strArg:objArg:]):
2870         (-[DOMTestObj objMethod]):
2871         (-[DOMTestObj objMethodWithArgs:strArg:objArg:]):
2872         (-[DOMTestObj methodThatRequiresAllArgs:objArg:]):
2873         (-[DOMTestObj methodThatRequiresAllArgsAndThrows:objArg:]):
2874         (-[DOMTestObj serializedValue:]):
2875         (-[DOMTestObj methodWithException]):
2876         (-[DOMTestObj customMethod]):
2877         (-[DOMTestObj customMethodWithArgs:strArg:objArg:]):
2878         (-[DOMTestObj customArgsAndException:]):
2879         (-[DOMTestObj addEventListener:listener:useCapture:]):
2880         (-[DOMTestObj removeEventListener:listener:useCapture:]):
2881         (-[DOMTestObj withDynamicFrame]):
2882         (-[DOMTestObj withDynamicFrameAndArg:]):
2883         (-[DOMTestObj withDynamicFrameAndOptionalArg:optionalArg:]):
2884         (-[DOMTestObj withDynamicFrameAndUserGesture:]):
2885         (-[DOMTestObj withDynamicFrameAndUserGestureASAD:optionalArg:]):
2886         (-[DOMTestObj withScriptStateVoid]):
2887         (-[DOMTestObj withScriptStateObj]):
2888         (-[DOMTestObj withScriptStateVoidException]):
2889         (-[DOMTestObj withScriptStateObjException]):
2890         (-[DOMTestObj methodWithOptionalArg:]):
2891         (-[DOMTestObj methodWithNonOptionalArgAndOptionalArg:opt:]):
2892         (-[DOMTestObj methodWithNonOptionalArgAndTwoOptionalArgs:opt1:opt2:]):
2893         * bindings/v8/ScriptController.cpp:
2894         (WebCore::ScriptController::canAccessFromCurrentOrigin):
2895         * bindings/v8/ScriptController.h:
2896         * html/HTMLFrameElementBase.cpp:
2897         (WebCore::HTMLFrameElementBase::isURLAllowed):
2898
2899 2010-05-18  Drew Wilson  <atwilson@chromium.org>
2900
2901         Unreviewed: Speculative build fix for Chromium win.
2902
2903         * platform/graphics/skia/SkiaFontWin.cpp: Properly set inlineCapacity.
2904
2905 2010-05-18  Drew Wilson  <atwilson@chromium.org>
2906
2907         Unreviewed fix for Chromium build break.
2908
2909         * platform/graphics/skia/SkiaFontWin.cpp: Now set inlineCapacity param.
2910
2911 2010-05-18  Daniel Cheng  <dcheng@chromium.org>
2912
2913         Reviewed by Darin Adler, Jian Li.
2914
2915         DragData::asURL() shouldn't do file validity checks
2916         https://bugs.webkit.org/show_bug.cgi?id=38711
2917
2918         There's no point to trying to make sure the file is valid in
2919         DragData::asURL(). It's better to ask for forgiveness than to ask for
2920         permission, since asking for permission is prone to race conditions
2921         and results in unnecessary I/O.  Consumers of this function either:
2922         - need to verify the file exists themselves (e.g. the loader)
2923         - don't care about file validity (rich text drag-and-drop)
2924
2925         * platform/chromium/DragDataChromium.cpp:
2926         (WebCore::DragData::asURL):
2927
2928 2010-05-18  Timothy Hatcher  <timothy@apple.com>
2929
2930         Fix a handful of various localization issues in the Web Inspector.
2931
2932         * Localize strings that where not localized.
2933         * Make WebInspector.UIString work without bind.
2934         * Always pass WebInspector.UIString to Number.secondsToString and Number.bytesToString.
2935         * Never pass a variable to WebInspector.UIString, since that prevents auto-generation.
2936         * Use an ellipsis instead of three periods.
2937
2938         https://webkit.org/b/39303
2939         rdar://problem/7997101
2940
2941         Reviewed by Adam Roben.
2942
2943         * English.lproj/localizedStrings.js:
2944         * inspector/front-end/AuditRules.js:
2945         (WebInspector.AuditRules.GzipRule.prototype.doRun):
2946         (WebInspector.AuditRules.CookieSizeRule.prototype.processCookies):
2947         (WebInspector.AuditRules.StaticCookielessRule.prototype.processCookies):
2948         * inspector/front-end/ConsoleView.js:
2949         (WebInspector.ConsoleView):
2950         * inspector/front-end/ImageView.js:
2951         (WebInspector.ImageView.prototype.contentTabSelected):
2952         * inspector/front-end/ProfileDataGridTree.js:
2953         (WebInspector.ProfileDataGridNode.prototype.get data.formatMilliseconds):
2954         (WebInspector.ProfileDataGridNode.prototype.get data):
2955         * inspector/front-end/ResourcesPanel.js:
2956         (WebInspector.ResourceTimeCalculator.prototype.formatValue):
2957         (WebInspector.ResourceTransferTimeCalculator.prototype.formatValue):
2958         (WebInspector.ResourceTransferDurationCalculator.prototype.formatValue):
2959         (WebInspector.ResourceTransferSizeCalculator.prototype.formatValue):
2960         * inspector/front-end/ScriptsPanel.js:
2961         (WebInspector.ScriptsPanel.prototype._registerShortcuts):
2962         * inspector/front-end/SourceFrame.js:
2963         (WebInspector.SourceFrame.prototype._contextMenu):
2964         * inspector/front-end/TimelineOverviewPane.js:
2965         (WebInspector.TimelineOverviewCalculator):
2966         (WebInspector.TimelineOverviewCalculator.prototype.formatValue):
2967         * inspector/front-end/TimelinePanel.js:
2968         (WebInspector.TimelinePanel):
2969         (WebInspector.TimelineCalculator):
2970         (WebInspector.TimelineCalculator.prototype.formatValue):
2971         (WebInspector.TimelinePanel.FormattedRecord.prototype._generateAggregatedInfo):
2972         (WebInspector.TimelinePanel.FormattedRecord.prototype._generatePopupContent):
2973         (WebInspector.TimelinePanel.FormattedRecord.prototype._getRecordDetails):
2974         (WebInspector.TimelinePanel.PopupContentHelper.prototype._appendTextRow):
2975         (WebInspector.TimelinePanel.PopupContentHelper.prototype._appendElementRow):
2976         * inspector/front-end/inspector.js:
2977         (WebInspector.loaded):
2978         (WebInspector.setRecordingProfile):
2979         (WebInspector.UIString):
2980
2981 2010-05-18  Sam Weinig  <sam@webkit.org>
2982
2983         Another attempt to fix the build.
2984
2985         * css/CSSCursorImageValue.cpp:
2986
2987 2010-05-18  Adam Roben  <aroben@apple.com>
2988
2989         Make accelerated compositing work on machines that don't support
2990         hardware vertex processing
2991
2992         Fixes <http://webkit.org/b/39299> <rdar://problem/7997692> Accelerated
2993         compositing on Windows doesn't work on machines that don't support
2994         hardware vertex processing, but should
2995
2996         Reviewed by Eric Carlson.
2997
2998         * platform/graphics/win/WKCACFLayerRenderer.cpp:
2999         (WebCore::WKCACFLayerRenderer::createRenderer): Query the device
3000         capabilities to decide whether to request hardware or software vertex
3001         processing.
3002
3003 2010-05-18  Adam Roben  <aroben@apple.com>
3004
3005         Make WKCACFLayerRenderer robust against temporary failure of
3006         Direct3DCreate9 and IDirect3D9::CreateDevice
3007
3008         For a short time after waking from sleep, Direct3DCreate9() will
3009         return an IDirect3D9 for which IDirect3D9::CreateDevice will always
3010         fail. Also during this time period, IDirect3D9::CreateDevice
3011         will fail even for non-bad IDirect3D9s. (It will later start
3012         succeeding.) WKCACFLayerRenderer now works around this behavior by
3013         detecting when it might be in this situation and calling these
3014         functions again later.
3015
3016         Fixes <http://webkit.org/b/39297> <rdar://problem/7997431> WebView
3017         doesn't repaint until page reloads when page using hardware
3018         acceleration loads just after waking from sleep
3019
3020         Reviewed by John Sullivan.
3021
3022         * manual-tests/crash-and-no-repaint-after-wake-from-sleep.html:
3023         Renamed from WebCore/manual-tests/crash-after-wake-from-sleep.html.
3024         Modified to also include instructions for reproducing this bug.
3025
3026         * platform/graphics/win/WKCACFLayerRenderer.cpp:
3027         (WebCore::WKCACFLayerRenderer::WKCACFLayerRenderer): Replaced
3028         m_triedToCreateD3DRenderer with m_mightBeAbleToCreateDeviceLater. The
3029         new member is initialized to true, since we haven't even tried to
3030         create a device once yet.
3031         (WebCore::WKCACFLayerRenderer::createRenderer): If we already have a
3032         D3D device, or we don't have one and are sure that we won't be able to
3033         create one later, just return the previously-created device, if any.
3034         We assume that we won't be able to create a device later if this
3035         function fails, unless the function fails due to CreateDevice failing.
3036         As noted above, CreateDevice will sometimes temporarily fail and then
3037         later start working again. When CreateDevice fails, we also assume
3038         that we might have a bad IDirect3D9, so we get rid of the one we have
3039         so a new (and hopefully non-bad) one will be allocated later.
3040         (WebCore::WKCACFLayerRenderer::destroyRenderer): Reset
3041         m_mightBeAbleToCreateDeviceLater to true, since we no longer have a
3042         device.
3043         (WebCore::WKCACFLayerRenderer::paint): Before trying to paint, try to
3044         create our D3D device and renderer. If this fails, we bail out, but if
3045         we think we might be able to create a device later we schedule another
3046         paint (via renderSoon()) so that we'll try again soon.
3047
3048         * platform/graphics/win/WKCACFLayerRenderer.h: Replaced
3049         m_triedToCreateD3DRenderer with m_mightBeAbleToCreateDeviceLater.
3050
3051 2010-05-18  Adam Roben  <aroben@apple.com>
3052
3053         Fix a crash when a page that uses accelerated compositing loads soon
3054         after the computer wakes from sleep
3055
3056         The set-up:
3057
3058         For a short time after waking from sleep, IDirect3D9::CreateDevice
3059         will fail. This caused WKCACFLayerRenderer::createRenderer to fail,
3060         and meant that WKCACFLayerRenderer never allocated a root layer.
3061         WebView wouldn't notice that createRenderer failed, and would go ahead
3062         and try to use the root layer anyway, resulting in a crash.
3063
3064         The fix:
3065
3066         We now allocate the root layer (and all the other members of
3067         WKCACFLayerRenderer that aren't dependent on having an
3068         IDirect3DDevice9) in WKCACFLayerRenderer's constructor. This way the
3069         layers will always be present, even when creating the D3D device
3070         fails.
3071
3072         There are two remaining problems:
3073           1) This results in slightly more memory usage in the case where
3074              CreateDevice fails.
3075           2) Once we get into this bad state, the WebView doesn't repaint
3076              until we navigate somewhere else.
3077
3078         (2) is covered by
3079         <http://webkit.org/b/39297>/<rdar://problem/7997431>. We'll fix it by
3080         retrying CreateDevice later in hopes that it will succeed after more
3081         time has passed. This will in turn fix (1). (We should never end up in
3082         a case where CreateDevice fails forever because we already did some
3083         preliminary checks in acceleratedCompositingAvailable().)
3084
3085         Fixes <http://webkit.org/b/39295> <rdar://problem/7971319> Crash
3086         (preceded by assertion) in WKCACFLayerRenderer::setNeedsDisplay when
3087         computer wakes from sleep on particular page
3088
3089         Reviewed by John Sullivan.
3090
3091         * manual-tests/crash-after-wake-from-sleep.html: Added. This
3092         is the Poster Circle demo from webkit.org/blog, but modified to
3093         automatically reload every 5 seconds and with instructions to put the
3094         computer to sleep and wake it up again.
3095
3096         * platform/graphics/win/WKCACFLayerRenderer.cpp:
3097         (WebCore::WKCACFLayerRenderer::WKCACFLayerRenderer): Moved code to
3098         initialize m_context, m_renderContext, and m_*Layer here...
3099         (WebCore::WKCACFLayerRenderer::createRenderer): ...from here.
3100
3101 2010-05-18  Adam Roben  <aroben@apple.com>
3102
3103         Remove an unused member variable from WKCACFLayerRenderer
3104
3105         Rubber-stamped by Ada Chan.
3106
3107         * platform/graphics/win/WKCACFLayerRenderer.h: Removed m_viewLayer,
3108         which is unused.
3109
3110 2010-05-18  Anders Carlsson  <andersca@apple.com>
3111
3112         Reviewed by Sam Weinig.
3113
3114         Allocate the m_preloads list hash set dynamically and free it when done.
3115         https://bugs.webkit.org/show_bug.cgi?id=39309
3116         <rdar://problem/7998495>
3117
3118         This saves about 6000 bytes on a fully loaded document.
3119
3120         * loader/DocLoader.cpp:
3121         (WebCore::DocLoader::requestPreload):
3122         (WebCore::DocLoader::clearPreloads):
3123         * loader/DocLoader.h:
3124
3125 2010-05-18  Anders Carlsson  <andersca@apple.com>
3126
3127         Revert unintended indentation and unnecessary nested name specifier.
3128
3129         * rendering/RenderBlock.cpp:
3130         (WebCore::clipOutPositionedObjects):
3131         (WebCore::RenderBlock::insertPositionedObject):
3132
3133 2010-05-18  Anders Carlsson  <andersca@apple.com>
3134
3135         Reviewed by Sam Weinig.
3136
3137         Add an inlineCapacity template parameter to ListHashSet and use it to shrink the positioned object list hash set.
3138         https://bugs.webkit.org/show_bug.cgi?id=39304
3139         <rdar://problem/7998366>
3140
3141         Set the inlineCapacity for the positionedObjects ListHashSet to 4 instead of 256. Since a RenderBlock usually has 
3142         few positioned objects, this saves memory.
3143
3144         * WebCore.base.exp:
3145         * rendering/RenderBlock.cpp:
3146         (WebCore::clipOutPositionedObjects):
3147         (WebCore::RenderBlock::insertPositionedObject):
3148         * rendering/RenderBlock.h:
3149         (WebCore::RenderBlock::positionedObjects):
3150
3151 2010-05-17  Sam Weinig  <sam@webkit.org>
3152
3153         Reviewed by Darin Adler.
3154
3155         https://bugs.webkit.org/show_bug.cgi?id=39258
3156         Remove NamedAttrMap residual gunk
3157
3158         Replace NamedAttrMap.h/cpp with NamedNodeMap.h/cpp which was the class
3159         it contained.
3160
3161         * CMakeLists.txt:
3162         * GNUmakefile.am:
3163         * WebCore.gypi:
3164         * WebCore.pro:
3165         * WebCore.vcproj/WebCore.vcproj:
3166         * WebCore.xcodeproj/project.pbxproj:
3167         * bindings/v8/custom/V8NamedNodesCollection.cpp:
3168         * dom/NamedAttrMap.cpp: Removed.
3169         * dom/NamedAttrMap.h: Removed.
3170         * dom/NamedNodeMap.cpp: Copied from dom/NamedAttrMap.cpp.
3171         * dom/NamedNodeMap.h: Replaced with dom/NamedAttrMap.h.
3172         * editing/ReplaceNodeWithSpanCommand.cpp:
3173         * platform/chromium/ClipboardChromium.cpp:
3174
3175 2010-05-18  Brady Eidson  <beidson@apple.com>
3176
3177         Reviewed by Eric Carlson.
3178
3179         <rdar://problem/7993468> REGRESSION (r58586): Audio doesn't play on first click of play button at NPR.org
3180
3181         NPR swallows the first mouse click on the play button, calls load() on the element, then waits for the
3182         canplay event to come in before calling play itself.
3183
3184         After the site specific hack added in r58586, we disallowed play() from within the canplay event handler.
3185         By tracking whether a load() was triggered by a user gesture, we can differentiate between the original
3186         canplay event that we meant to ignore and the one resulting from the first mouse click which we want to honor.
3187         
3188         No new tests. (Currently no way to test such site specific hack behavior)
3189
3190         * html/HTMLMediaElement.cpp:
3191         (WebCore::HTMLMediaElement::HTMLMediaElement):
3192         (WebCore::HTMLMediaElement::load): Set the m_loadInitiatedByUserGesture flag
3193         (WebCore::HTMLMediaElement::play): Only apply the site specific hack if the load wasn't initiated by a user gesture.
3194         * html/HTMLMediaElement.h:
3195
3196 2010-05-18  Jakob Petsovits  <jpetsovits@rim.com>
3197
3198         Reviewed by Dirk Schulze.
3199
3200         [OpenVG] Fix stupid build errors from the OpenVG Path commit
3201         https://bugs.webkit.org/show_bug.cgi?id=39228
3202
3203         * platform/graphics/openvg/PainterOpenVG.cpp:
3204         (WebCore::PainterOpenVG::clipPath):
3205         * platform/graphics/openvg/PathOpenVG.cpp:
3206         (WebCore::Path::transform):
3207
3208 2010-05-18  Chris Jerdonek  <cjerdonek@webkit.org>
3209
3210         Reviewed by Darin Adler.
3211
3212         Refactored FrameLoader::isDocumentSandboxed() from a private member function
3213         to a static, non-member, non-friend function.
3214
3215         https://bugs.webkit.org/show_bug.cgi?id=39157
3216
3217         Making this function non-private lets us make FrameLoader::createWindow()
3218         a non-member function in a subsequent patch.  We also made it non-member
3219         rather than member to increase encapsulation and limit the number of
3220         public functions with access to private FrameLoader data.
3221
3222         No new functionality, so no new tests.
3223
3224         * loader/FrameLoader.cpp:
3225         (WebCore::isDocumentSandboxed):
3226           - Moved this function from a private member function of FrameLoader
3227             to a static, non-member, non-friend function.
3228         (WebCore::FrameLoader::createWindow):
3229           - Updated the call to isDocumentSandboxed().
3230         (WebCore::FrameLoader::submitForm):
3231           - Updated the call to isDocumentSandboxed().
3232         (WebCore::FrameLoader::requestObject):
3233           - Updated the call to isDocumentSandboxed().
3234         (WebCore::FrameLoader::shouldAllowNavigation):
3235           - Updated the call to isDocumentSandboxed().
3236         * loader/FrameLoader.h:
3237           - Removed isDocumentSandboxed() and added a FIXME to move
3238             createWindow() out of the FrameLoader class.
3239
3240 2010-05-08  Robert Hogan  <robert@roberthogan.net>
3241
3242         Reviewed by Simon Hausmann.
3243
3244         [Qt] Fix http/tests/xmlhttprequest/cross-origin-no-authorization.html
3245              and http/tests/xmlhttprequest/cross-origin-authorization.html
3246
3247         QHttpNetworkRequest adds Authorization and Cookie headers to XHRs
3248         without knowing if this is valid behaviour or not. In order to allow
3249         Qt to decide whether Cookie/Authorization headers should be added
3250         to an XHR QtWebKit needs to use an attribute added to QNetworkRequest.
3251         These new attributes are: QNetworkRequest::CookieLoadControlAttribute,
3252         QNetworkRequest::CookieSaveControlAttribute,and
3253         QNetworkRequest::AuthenticationReuseControlAttribute.
3254
3255         QtWebKit will set QNetworkRequest::AuthenticationReuseControlAttribute to false
3256         unless withCredentials is set to true in the XHR.
3257
3258         QtWebkit will set CookieLoad/SaveControlAttribute to false unless withCredentials
3259         is set to true in the XHR.
3260
3261         Qt will pass the values onto QHttpNetworkRequest and this will permit
3262         the Qt network access processing to decide whether or not to add either
3263         or both of the Cookie/Authorisation headers, and whether to save cookies
3264         returned from such requests. By default the attribute
3265         will always be true so unless QtWebKit sets it to false normal
3266         header processing is unaffected.
3267
3268         The Qt part of these changes was merged at: http://gitorious.org/qt/qt/merge_requests/592
3269
3270         https://bugs.webkit.org/show_bug.cgi?id=32967
3271
3272         * platform/network/qt/ResourceRequestQt.cpp:
3273         (WebCore::ResourceRequest::toNetworkRequest):
3274
3275 2010-05-18  Zoltan Herczeg  <zherczeg@webkit.org>
3276
3277         Reviewed by Kenneth Rohde Christiansen.
3278
3279         [Qt] Implementing clipToImageBuffer for Qt port.
3280         https://bugs.webkit.org/show_bug.cgi?id=24289
3281
3282         The implementation combines pixmap layers and destinationIn
3283         composition mode.
3284
3285         * platform/graphics/qt/GraphicsContextQt.cpp:
3286         (WebCore::TransparencyLayer::TransparencyLayer):
3287         (WebCore::GraphicsContextPlatformPrivate::GraphicsContextPlatformPrivate):
3288         (WebCore::GraphicsContext::savePlatformState):
3289         (WebCore::GraphicsContext::restorePlatformState):
3290         (WebCore::GraphicsContext::inTransparencyLayer):
3291         (WebCore::GraphicsContext::beginTransparencyLayer):
3292         (WebCore::GraphicsContext::endTransparencyLayer):
3293         (WebCore::GraphicsContext::clipToImageBuffer):
3294
3295 2010-05-18  Eric Seidel  <eric@webkit.org>
3296
3297         Unreviewed build fix.
3298
3299         Make it possible to enable the new HTML5Tokenizer for testing
3300         https://bugs.webkit.org/show_bug.cgi?id=39275
3301
3302         * WebCore.gypi:
3303          - Fix HTMLLexer.* -> HTML5Lexer.*
3304         * WebCore.vcproj/WebCore.vcproj:
3305          - Add HTML5Lexer and HTML5Tokenizer to project.
3306
3307 2010-05-18  Eric Seidel  <eric@webkit.org>
3308
3309         Unreviewed build fix.
3310
3311         Make it possible to enable the new HTML5Tokenizer for testing
3312         https://bugs.webkit.org/show_bug.cgi?id=39275
3313
3314         * dom/NamedAttrMap.cpp:
3315         (WebCore::NamedNodeMap::setNamedItemNS):
3316          - Move this to the .cpp file so as to avoid needing to include "Node.h" in the header.
3317         * dom/NamedAttrMap.h:
3318         * html/HTML5Token.h:
3319          - Remove #include "String.h" which was wrong.  Adam meant "PlatformString.h"
3320          - Remove unneeded #include "Node.h", it was only needed because
3321            NamedAttrMap.h was incorrectly depending on Node.h but not
3322            including it.  It didn't actually need Node.h except for one
3323            inlined method setNamedItemNS, so I moved setNamedItemNS into
3324            the .cpp to get rid of the Node.h requirement.
3325
3326 2010-05-18  Eric Seidel  <eric@webkit.org>
3327
3328         Reviewed by Adam Barth.
3329
3330         Make it possible to enable the new HTML5Tokenizer for testing
3331         https://bugs.webkit.org/show_bug.cgi?id=39275
3332
3333         I added html5ParserEnabled to Settings so that we can enable/disable
3334         the HTML5 parser for testing.
3335
3336         I also ripped out a bunch of dead code from HTML5Lexer.
3337
3338         I had to add HTML5Lexer/HTML5Tokenizer to all build systems so that
3339         the build wouldn't fail now that we reference these classes from HTMLDocument.
3340
3341         * Android.mk:
3342         * CMakeLists.txt:
3343         * GNUmakefile.am:
3344         * WebCore.gypi:
3345         * WebCore.pro:
3346         * WebCore.xcodeproj/project.pbxproj:
3347         * html/HTML5Lexer.cpp:
3348         (WebCore::HTML5Lexer::reset):
3349         (WebCore::isWhitespace):
3350         (WebCore::HTML5Lexer::nextToken):
3351         * html/HTML5Lexer.h:
3352         * html/HTML5Tokenizer.cpp: Added.
3353         (WebCore::HTML5Tokenizer::HTML5Tokenizer):
3354         (WebCore::HTML5Tokenizer::~HTML5Tokenizer):
3355         (WebCore::HTML5Tokenizer::begin):
3356         (WebCore::HTML5Tokenizer::write):
3357         (WebCore::HTML5Tokenizer::end):
3358         (WebCore::HTML5Tokenizer::finish):
3359         (WebCore::HTML5Tokenizer::isWaitingForScripts):
3360         * html/HTML5Tokenizer.h: Added.
3361         * html/HTMLDocument.cpp:
3362         (WebCore::HTMLDocument::createTokenizer):
3363         * html/HTMLTokenizer.h:
3364         * html/HTMLViewSourceDocument.cpp:
3365         (WebCore::HTMLViewSourceDocument::createTokenizer):
3366         * page/Settings.cpp:
3367         (WebCore::Settings::Settings):
3368         * page/Settings.h:
3369         (WebCore::Settings::setHTML5ParserEnabled):
3370         (WebCore::Settings::html5ParserEnabled):
3371
3372 2010-05-18  Maciej Stachowiak  <mjs@apple.com>
3373
3374         Not reviewed, build fix.
3375
3376         Attempt to fix build for v8 bindings (untested).
3377
3378         * bindings/v8/ScriptController.cpp:
3379         (WebCore::ScriptController::clearWindowShell):
3380         * bindings/v8/ScriptController.h:
3381
3382 2010-05-17  Maciej Stachowiak  <mjs@apple.com>
3383
3384         Reviewed by Oliver Hunt.
3385
3386         GC more promptly when navigating to a new inner window, but not at all when it went in the page cache
3387         https://bugs.webkit.org/show_bug.cgi?id=39254
3388         <rdar://problem/7996370>
3389
3390         ~1% PLT speedup
3391         ~4% iBench HTML speedup
3392
3393         * bindings/js/GCController.cpp:
3394         (WebCore::GCController::garbageCollectSoon): Change back to a 0 delay timer instead of
3395         0.5 second.
3396         * bindings/js/ScriptController.cpp:
3397         (WebCore::ScriptController::clearWindowShell): Add a new boolean parameter. Don't
3398         garbageColectSoon if the page is going into the page cache.
3399         * bindings/js/ScriptController.h: Prototype change for above.
3400         * loader/FrameLoader.cpp:
3401         (WebCore::FrameLoader::clear): Indicate when the page is going into the page cache.
3402
3403 2010-05-18  Adam Barth  <abarth@webkit.org>
3404
3405         Reviewed by Eric Seidel.
3406
3407         Add an HTML5Token
3408         https://bugs.webkit.org/show_bug.cgi?id=39274
3409
3410         The token object is an ugly fake union, but I'm sure sure there's a
3411         better way...  Eric needs this to provide output for the test harness.
3412
3413         * WebCore.xcodeproj/project.pbxproj:
3414         * html/HTML5Lexer.cpp:
3415         (WebCore::HTML5Lexer::HTML5Lexer):
3416         (WebCore::HTML5Lexer::write):
3417         (WebCore::HTML5Lexer::emitCharacter):
3418         * html/HTML5Lexer.h:
3419         * html/HTML5Token.h: Added.
3420         (WebCore::HTML5Token::):
3421         (WebCore::HTML5Token::HTML5Token):
3422         (WebCore::HTML5Token::setToCharacter):
3423
3424 2010-05-18  Adam Barth  <abarth@webkit.org>
3425
3426         Reviewed by Eric Seidel.
3427
3428         Implement ScriptData states for HTML5Lexer
3429         https://bugs.webkit.org/show_bug.cgi?id=39273
3430
3431         This patch implements more of the lexer states according to the HTML5
3432         specification.  Currently, this code is compiled by not tested.  We're
3433         working on bringing up a test harness in parallel with transliterating
3434         the spec into code.
3435
3436         * html/HTML5Lexer.cpp:
3437         (WebCore::HTML5Lexer::tokenize):
3438         (WebCore::HTML5Lexer::temporaryBufferIs):
3439         * html/HTML5Lexer.h:
3440         (WebCore::HTML5Lexer::):
3441
3442 2010-05-17  Eric Seidel  <eric@webkit.org>
3443
3444         Reviewed by Adam Barth.
3445
3446         Rename HTML5Tokenzier to HTML5Lexer so that we can add a new HTML5Tokenizer which implements Tokenizer
3447         https://bugs.webkit.org/show_bug.cgi?id=39272
3448
3449         Strictly a rename, no functionality change.
3450
3451         * WebCore.xcodeproj/project.pbxproj:
3452         * html/HTML5Lexer.cpp: Added.
3453         * html/HTML5Lexer.h: Added.
3454         * html/HTML5Tokenizer.cpp: Removed.
3455         * html/HTML5Tokenizer.h: Removed.
3456
3457 2010-05-17  Sheriff Bot  <webkit.review.bot@gmail.com>
3458
3459         Unreviewed, rolling out r59652.
3460         http://trac.webkit.org/changeset/59652
3461         https://bugs.webkit.org/show_bug.cgi?id=39268
3462
3463         file-input-files-access test is broken on Mac (Requested by
3464         dcheng on #webkit).
3465
3466         * platform/chromium/DragDataChromium.cpp:
3467         (WebCore::DragData::asURL):
3468
3469 2010-05-17  Adam Barth  <abarth@webkit.org>
3470
3471         Reviewed by Eric Seidel.
3472
3473         Implement RAWTEXT tokenizer states
3474         https://bugs.webkit.org/show_bug.cgi?id=39267
3475
3476         More tokenizer states.  There's a bunch of functionality notImplemented
3477         that we'll come back to.
3478
3479         * html/HTML5Tokenizer.cpp:
3480         (WebCore::HTML5Tokenizer::tokenize):
3481         * html/HTML5Tokenizer.h:
3482
3483 2010-05-17  Adam Barth  <abarth@webkit.org>
3484
3485         Reviewed by Eric Seidel.
3486
3487         Implement more parser states in HTML5Tokenizer
3488         https://bugs.webkit.org/show_bug.cgi?id=39265
3489
3490         This patch implements some easy states.  I'll come back and do the
3491         harder states later.
3492
3493         * html/HTML5Tokenizer.cpp:
3494         (WebCore::HTML5Tokenizer::tokenize):
3495         (WebCore::HTML5Tokenizer::emitParseError):
3496         * html/HTML5Tokenizer.h:
3497
3498 2010-05-17  Daniel Cheng  <dcheng@chromium.org>
3499
3500         Reviewed by Darin Adler.
3501
3502         DragData::asURL() shouldn't do file validity checks
3503         https://bugs.webkit.org/show_bug.cgi?id=38711
3504
3505         There's no point to trying to make sure the file is valid in
3506         DragData::asURL(). It's better to ask for forgiveness than to ask for
3507         permission, since asking for permission is prone to race conditions
3508         and results in unnecessary I/O.  Consumers of this function either:
3509         - need to verify the file exists themselves (e.g. the loader)
3510         - don't care about file validity (rich text drag-and-drop)
3511
3512         * platform/chromium/DragDataChromium.cpp:
3513         (WebCore::DragData::asURL):
3514
3515 2010-05-17  Adam Barth  <abarth@webkit.org>
3516
3517         Reviewed by Eric Seidel.
3518
3519         Update states in HTML5Tokenizer to match HTML5 spec
3520         https://bugs.webkit.org/show_bug.cgi?id=39264
3521
3522         I've also implemented the DataState.  More states to follow.
3523
3524         * html/HTML5Tokenizer.cpp:
3525         (WebCore::HTML5Tokenizer::reset):
3526         (WebCore::HTML5Tokenizer::tokenize):
3527         * html/HTML5Tokenizer.h:
3528         (WebCore::HTML5Tokenizer::):
3529
3530 2010-05-17  Kent Tamura  <tkent@chromium.org>
3531
3532         Reviewed by Darin Adler.
3533
3534         ':valid' CSS selector should not be applied to some form controls
3535         https://bugs.webkit.org/show_bug.cgi?id=39162
3536
3537         * html/HTMLElement.cpp:
3538         (WebCore::inlineTagList): Always includes progressTag. This change is
3539         needed in a case of no ENABLE_PROGRESS_TAG. Without this change and
3540         ENABLE_PROGRESS_TAG, <progress> tags disappear.
3541         * html/HTMLInputElement.cpp:
3542         (WebCore::HTMLInputElement::recalcWillValidate):
3543           Return false for SUBMIT and IMAGE.
3544         * html/HTMLProgressElement.h:
3545         (WebCore::HTMLProgressElement::recalcWillValidate):
3546           Return false. This change is needed in a case of ENABLE_PROGRESS_TAG.
3547
3548 2010-05-17  Adam Barth  <abarth@webkit.org>
3549
3550         Reviewed by Eric Seidel.
3551
3552         Remove load-related code from HTML5Tokenizer
3553         https://bugs.webkit.org/show_bug.cgi?id=39263
3554
3555         This code is related to reloading resources and not to tokenizing.  In
3556         the PreloadScanner, these concerns are coupled, but we want to decouple
3557         them.
3558
3559         * html/HTML5Tokenizer.cpp:
3560         (WebCore::HTML5Tokenizer::HTML5Tokenizer):
3561         (WebCore::HTML5Tokenizer::~HTML5Tokenizer):
3562         (WebCore::HTML5Tokenizer::begin):
3563         (WebCore::HTML5Tokenizer::end):
3564         (WebCore::HTML5Tokenizer::reset):
3565         (WebCore::HTML5Tokenizer::write):
3566         (WebCore::HTML5Tokenizer::consumeEntity):
3567         (WebCore::HTML5Tokenizer::tokenize):
3568         (WebCore::HTML5Tokenizer::processAttribute):
3569         (WebCore::HTML5Tokenizer::emitCharacter):
3570         (WebCore::HTML5Tokenizer::emitTag):
3571         * html/HTML5Tokenizer.h:
3572
3573 2010-05-17  Adam Barth  <abarth@webkit.org>
3574
3575         Reviewed by Eric Seidel.
3576
3577         Add HTML5Tokenizer to the build system on Mac
3578         https://bugs.webkit.org/show_bug.cgi?id=39262
3579
3580         This file will be easier to work with if we're actually compiling it.
3581         Hopefully we'll get this wired into the PreloadScanner soon.  Once we
3582         start actually calling the code, we'll add it to the build system on
3583         other platforms.
3584
3585         * WebCore.xcodeproj/project.pbxproj:
3586
3587 2010-05-17  Eric Seidel  <eric@webkit.org>
3588
3589         Reviewed by Adam Barth.
3590
3591         Copy PreloadScanner.* to HTML5Tokenizer.* to start work on the new HTML5 Tokenizer
3592         https://bugs.webkit.org/show_bug.cgi?id=39261
3593
3594         * html/HTML5Tokenizer.cpp: Rename PreloadScanner to HTML5Tokenizer.
3595         * html/HTML5Tokenizer.h: ditto.
3596
3597 2010-05-17  Eric Seidel  <eric@webkit.org>
3598
3599         Reviewed by Adam Barth.
3600
3601         Copy PreloadScanner.* to HTML5Tokenizer.* to start work on the new HTML5 Tokenizer
3602         https://bugs.webkit.org/show_bug.cgi?id=39261