Build fix, not reviewed.
[WebKit.git] / WebCore / ChangeLog
1 2010-05-06  Maciej Stachowiak  <mjs@apple.com>
2
3         Build fix, not reviewed.
4         
5         Speculative Windows and Debug build fixes for the last change.
6
7         * dom/Node.h:
8         (WebCore::Node::inDocument):
9         (WebCore::Node::setFlag):
10
11 2010-05-06  James Robinson  <jamesr@chromium.org>
12
13         Reviewed by Eric Seidel.
14
15         Fix warnings emitted by gcc 4.4.1 on linux in chromium-specific platform graphics files.
16         https://bugs.webkit.org/show_bug.cgi?id=38158
17
18         Fixes:
19         - replace NULL with 0
20         - remove unusued locals
21         - add parens around ambiguous looking compound predicates like (a || b && c)
22
23         This also adds a check for x >= 0 to FontLinux.cpp's in this statement:
24           if (x < walker.width())
25         This is more documentation than anything else since walker.width() returns
26         an unsigned the current behavior is that x is promoted to unsigned and as
27         long as x + walker.width() is less than 2^31 all negative values of x
28         end up wrapping around and not being < walker.width().  This behavior is
29         tested by fast/text/international/khmer-selection.html
30
31         * platform/graphics/chromium/FontLinux.cpp:
32         (WebCore::adjustTextRenderMode):
33         (WebCore::TextRunWalker::TextRunWalker):
34         (WebCore::TextRunWalker::length):
35         (WebCore::TextRunWalker::width):
36         (WebCore::TextRunWalker::getTextRun):
37         (WebCore::TextRunWalker::getNormalizedTextRun):
38         (WebCore::Font::offsetForPositionForComplexText):
39         * platform/graphics/chromium/FontPlatformDataLinux.cpp:
40         (WebCore::FontPlatformData::setupPaint):
41         * platform/graphics/chromium/HarfbuzzSkia.cpp:
42         (WebCore::getOutlinePoint):
43         * platform/graphics/skia/GraphicsContext3DSkia.cpp:
44         (WebCore::GraphicsContext3D::getImageData):
45         * platform/graphics/skia/GraphicsContextSkia.cpp:
46         (WebCore::isCoordinateSkiaSafe):
47         (WebCore::GraphicsContext::fillRect):
48         (WebCore::GraphicsContext::strokePath):
49         (WebCore::GraphicsContext::strokeRect):
50
51 2010-05-06  Ada Chan  <adachan@apple.com>
52
53         Reviewed by David Kilzer.
54
55         https://bugs.webkit.org/show_bug.cgi?id=38695
56         
57         Check the result from widget() for NULL before accessing it.
58
59         * rendering/RenderIFrame.cpp:
60         (WebCore::RenderIFrame::calcHeight):
61         (WebCore::RenderIFrame::calcWidth):
62
63 2010-05-06  Maciej Stachowiak  <mjs@apple.com>
64
65         Reviewed by Darin Adler.
66
67         further fixes towards REGRESSION (r57292): 1% PLT regression from visited link information leak fix
68         https://bugs.webkit.org/show_bug.cgi?id=38682
69         <rdar://problem/7859794>
70
71         Looks like a 1-2% speedup on PLT.
72
73         - Reorder CSS properties.
74         - Remove short circuit tag check in matchRulesForList which costs more than it saves.
75         - Inline initForStyleResolve.
76         - Optimize applyDeclarations to avoid switch and take fewer branches in the inner loop.
77         
78         - Change the way Node handles flags - replace bitfield with a uint32_t and explicit masking, 
79         to make it cheaper to initialize the bits and give faster access.
80         - Added new Node flags to check for isStyledElement, isHTMLElement, isSVGElement, isComment, 
81         and devirtualize those methods.
82         - Inline constructors for Node, Element, Text, CharacterData, StyledElement, etc since
83         they are very simple and lots of nodes get constructed.
84         
85         * css/CSSPropertyNames.in: Move a few of the properties up front so we can check for them
86         with < instead of switch statements
87         * css/CSSStyleSelector.cpp:
88         (WebCore::CSSStyleSelector::matchRulesForList): Remove unnecessary preflight check
89         for tag match before checking selector. This check very rarely short circuits anything,
90         since most rules with a tag end up in the appropriate tag bucket. So doing the check
91         cost more time than the time saved.
92         (WebCore::CSSStyleSelector::initForStyleResolve): Inline. Create RenderStyle in a better way.
93         (WebCore::CSSStyleSelector::applyDeclarations): Get rid of switch statement and use <= to
94         check for the high priority properties. Convert to template to avoid checking "applyFirst"
95         each time through the loop.
96         (WebCore::CSSStyleSelector::styleForElement): Adjust for new applyDeclarations() signature.
97         (WebCore::CSSStyleSelector::keyframeStylesForAnimation): ditto
98         (WebCore::CSSStyleSelector::pseudoStyleForElement): ditto
99         * css/CSSStyleSelector.h: Adjust for new applyDeclarations() signature.
100         * rendering/style/RenderStyle.cpp:
101         (WebCore::RenderStyle::RenderStyle): Inline constructor.
102         * rendering/style/RenderStyle.h: Make constructor private so it can be inline.
103         * dom/Node.h:
104         (WebCore::): See high-level description of changes above. Redid the
105         way boolean flags work.
106         (WebCore::Node::isElementNode):
107         (WebCore::Node::isContainerNode):
108         (WebCore::Node::isTextNode):
109         (WebCore::Node::isHTMLElement):
110         (WebCore::Node::isSVGElement):
111         (WebCore::Node::isStyledElement):
112         (WebCore::Node::isCommentNode):
113         (WebCore::Node::hasID):
114         (WebCore::Node::hasClass):
115         (WebCore::Node::active):
116         (WebCore::Node::inActiveChain):
117         (WebCore::Node::inDetach):
118         (WebCore::Node::hovered):
119         (WebCore::Node::attached):
120         (WebCore::Node::setAttached):
121         (WebCore::Node::needsStyleRecalc):
122         (WebCore::Node::styleChangeType):
123         (WebCore::Node::childNeedsStyleRecalc):
124         (WebCore::Node::isLink):
125         (WebCore::Node::setHasID):
126         (WebCore::Node::setHasClass):
127         (WebCore::Node::setChildNeedsStyleRecalc):
128         (WebCore::Node::clearChildNeedsStyleRecalc):
129         (WebCore::Node::setInDocument):
130         (WebCore::Node::clearInDocument):
131         (WebCore::Node::setInActiveChain):
132         (WebCore::Node::clearInActiveChain):
133         (WebCore::Node::setIsLink):
134         (WebCore::Node::clearIsLink):
135         (WebCore::Node::setActive):
136         (WebCore::Node::setHovered):
137         (WebCore::Node::inDocument):
138         (WebCore::Node::):
139         (WebCore::Node::getFlag):
140         (WebCore::Node::setFlag):
141         (WebCore::Node::clearFlag):
142         (WebCore::Node::hasRareData):
143         (WebCore::Node::isParsingChildrenFinished):
144         (WebCore::Node::setIsParsingChildrenFinished):
145         (WebCore::Node::clearIsParsingChildrenFinished):
146         (WebCore::Node::isStyleAttributeValid):
147         (WebCore::Node::setIsStyleAttributeValid):
148         (WebCore::Node::clearIsStyleAttributeValid):
149         (WebCore::Node::isSynchronizingStyleAttribute):
150         (WebCore::Node::setIsSynchronizingStyleAttribute):
151         (WebCore::Node::clearIsSynchronizingStyleAttribute):
152         (WebCore::Node::areSVGAttributesValid):
153         (WebCore::Node::setAreSVGAttributesValid):
154         (WebCore::Node::clearAreSVGAttributesValid):
155         (WebCore::Node::isSynchronizingSVGAttributes):
156         (WebCore::Node::setIsSynchronizingSVGAttributes):
157         (WebCore::Node::clearIsSynchronizingSVGAttributes):
158         (WebCore::Node::hasRareSVGData):
159         (WebCore::Node::setHasRareSVGData):
160         (WebCore::Node::clearHasRareSVGData):
161         (WebCore::Node::initialRefCount):
162         * dom/Node.cpp:
163         (WebCore::Node::trackForDebugging): Adjusted for changes in
164         flag handling.
165         (WebCore::Node::ensureRareData): ditto
166         (WebCore::Node::setStyleChange): ditto
167         (WebCore::Node::setNeedsStyleRecalc): ditto
168         (WebCore::Node::lazyAttach): ditto
169         (WebCore::Node::attach): ditto
170         (WebCore::Node::detach): ditto
171         (WebCore::Node::insertedIntoDocument): ditto
172         (WebCore::Node::removedFromDocument): ditto
173         * dom/CharacterData.cpp:
174         * dom/CharacterData.h:
175         (WebCore::CharacterData::CharacterData): Inline the constructor (moved from .cpp)
176         * dom/Comment.cpp:
177         (WebCore::Comment::Comment): Tell the base class that we're a comment.
178         * dom/Comment.h: Remove isCommentNode override.
179         * dom/ContainerNode.cpp:
180         (WebCore::ContainerNode::detach): Adjusted for changes in flag
181         handling.
182         (WebCore::ContainerNode::removedFromDocument): ditto
183         * dom/Document.cpp:
184         (WebCore::Document::Document): Adjusted for changes in flag handling.
185         (WebCore::Document::recalcStyle): ditto
186         (WebCore::Document::setFocusedNode): ditto
187         * dom/Document.h:
188         (WebCore::Node::Node): Inline the Node constructor - goes here
189         because it uses Document.
190         * dom/DocumentFragment.cpp: include Document.h due to above change
191         * dom/EditingText.cpp: ditto
192         * dom/EntityReference.cpp: ditto
193         * dom/Element.cpp:
194         (WebCore::Element::getAttribute): Adjusted for changes in flag
195         handling.
196         (WebCore::Element::setAttribute): ditto
197         (WebCore::Element::hasAttributes): ditto
198         (WebCore::Element::recalcStyle): ditto
199         (WebCore::Element::finishParsingChildren): ditto
200         * dom/Element.h:
201         (WebCore::Element::Element): Inline (moved from .cpp)
202         (WebCore::Element::isFinishedParsingChildren):
203         (WebCore::Element::beginParsingChildren):
204         (WebCore::Element::attributes): Adjusted for changes in flag
205         handling.
206         * dom/StyledElement.cpp:
207         (WebCore::StyledElement::updateStyleAttribute): Adjust for
208         changes to flag handling.
209         (WebCore::StyledElement::mapToEntry): ditto
210         (WebCore::StyledElement::parseMappedAttribute): ditto
211         (WebCore::StyledElement::copyNonAttributeProperties): ditto
212         * dom/StyledElement.h:
213         (WebCore::StyledElement::StyledElement): Inline (moved from.cpp)
214         (WebCore::StyledElement::invalidateStyleAttribute): Adjust for
215         changes in flag handling.
216         * dom/Text.h:
217         (WebCore::Text::Text): Inline (moved from .cpp)
218         * dom/Text.cpp:
219         * html/HTMLAnchorElement.cpp:
220         (WebCore::HTMLAnchorElement::HTMLAnchorElement): Adjust for changes in
221         flag handling.
222         (WebCore::HTMLAnchorElement::parseMappedAttribute): ditto
223         * html/HTMLElement.cpp:
224         (WebCore::HTMLElement::create): Tell base class we're an HTML element.
225         * html/HTMLElement.h: ditto above; remove isHTMLElement override.
226         * html/HTMLFormControlElement.h: Tell base class we're an HTML element.
227         * html/HTMLFrameOwnerElement.cpp:
228         (WebCore::HTMLFrameOwnerElement::HTMLFrameOwnerElement): ditto
229         * html/HTMLProgressElement.cpp:
230         (WebCore::HTMLProgressElement::HTMLProgressElement): ditto
231         * mathml/MathMLElement.cpp:
232         (WebCore::MathMLElement::MathMLElement): Tell base class we're a styled
233         element.
234         * rendering/MediaControlElements.cpp:
235         (WebCore::MediaControlShadowRootElement::MediaControlShadowRootElement):
236         Adjust for changes in flag handling.
237         (WebCore::MediaControlElement::MediaControlElement): ditto
238         (WebCore::MediaControlInputElement::MediaControlInputElement): ditto
239         * rendering/RenderFileUploadControl.cpp:
240         (WebCore::RenderFileUploadControl::updateFromElement): ditto
241         * rendering/RenderLayer.cpp:
242         (WebCore::RenderLayer::updateHoverActiveState): ditto
243         * rendering/RenderProgress.cpp:
244         (WebCore::RenderProgress::updateValuePartState): ditto
245         * rendering/RenderSlider.cpp:
246         (WebCore::RenderSlider::updateFromElement): ditto
247         * rendering/SVGShadowTreeElements.cpp:
248         (WebCore::SVGShadowTreeRootElement::SVGShadowTreeRootElement): ditto
249         * rendering/TextControlInnerElements.cpp:
250         (WebCore::TextControlInnerElement::attachInnerElement): ditto
251         * svg/SVGAnimatedProperty.h:
252         (WebCore::SVGAnimatedPropertyTearOff::setBaseVal): ditto
253         (WebCore::SVGAnimatedPropertyTearOff::setAnimVal): ditto
254         * svg/SVGElement.cpp:
255         (WebCore::SVGElement::SVGElement): Tell base class we're
256         an svg element.
257         (WebCore::SVGElement::ensureRareSVGData): Adjust for flag handling
258         changes.
259         (WebCore::SVGElement::updateAnimatedSVGAttribute): ditto
260         * svg/SVGElement.h:
261         (WebCore::SVGElement::invalidateSVGAttributes): ditto
262         * svg/SVGPolyElement.cpp:
263         (WebCore::SVGPolyElement::svgAttributeChanged): ditto
264         * wml/WMLAnchorElement.cpp:
265         (WebCore::WMLAnchorElement::WMLAnchorElement): ditto
266         * wml/WMLElement.cpp:
267         (WebCore::WMLElement::WMLElement): Tell base class we're a styled
268         element.
269
270 2010-05-06  Adam Barth  <abarth@webkit.org>
271
272         Unreviewed.  Fix indent.  Sorry, my OCD was acting up.
273
274         * page/EventHandler.cpp:
275         (WebCore::EventHandler::handleMouseReleaseEvent):
276
277 2010-05-06  Pavel Feldman  <pfeldman@chromium.org>
278
279         Reviewed by Joseph Pecoraro.
280
281         Web Inspector: store selected Headers / Content tab on explicit switch and/or explicit navigate only.
282
283         https://bugs.webkit.org/show_bug.cgi?id=38660
284
285         * inspector/front-end/ResourceView.js:
286         (WebInspector.ResourceView):
287         (WebInspector.ResourceView.prototype._selectHeadersTab):
288         (WebInspector.ResourceView.prototype.selectContentTab):
289         * inspector/front-end/ResourcesPanel.js:
290         (WebInspector.ResourcesPanel.prototype.showResource):
291
292 2010-05-06  Luiz Agostini  <luiz.agostini@openbossa.org>
293
294         Rubber-stamped by Simon Hausmann.
295
296         [Qt] use QT_MOBILE_THEME in Symbian
297         https://bugs.webkit.org/show_bug.cgi?id=38440
298
299         Putting QT_MOBILE_THEME into use for Symbian.
300
301         * WebCore.pro:
302
303 2010-05-06  Laszlo Gombos  <laszlo.1.gombos@nokia.com>
304
305         Unreviewed, build fix WinCE for QtWebKit.
306
307         [Qt] Compilation with Plugins disabled is broken
308         https://bugs.webkit.org/show_bug.cgi?id=31407
309
310         Rename platform/qt/TemporaryLinkStubs.cpp to avoid name collition on
311         Windows.
312
313         Thanks for Ismail "cartman" Donmez for help.
314
315         No new tests, as there is no new functionality.
316
317         * WebCore.gypi:
318         * WebCore.pro:
319         * platform/qt/TemporaryLinkStubs.cpp: Removed.
320         * platform/qt/TemporaryLinkStubsQt.cpp: Copied from WebCore/platform/qt/TemporaryLinkStubs.cpp.
321
322 2010-05-06  Simon Hausmann  <simon.hausmann@nokia.com>
323
324         Reviewed by Kenneth Rohde Christiansen.
325
326         [Qt] REGRESSION: Loading of external CSS and JS files over network fails in some cases
327         https://bugs.webkit.org/show_bug.cgi?id=36755
328
329         Enable the direct connection between QtNetwork and QtWebKit only for Qt versions
330         greater than 4.6.2, due to a bug in Qt that's been fixed after 4.6.2.
331
332         * platform/network/qt/QNetworkReplyHandler.cpp:
333
334 2010-05-06  Gustavo Noronha Silva  <gustavo.noronha@collabora.co.uk>
335
336         Reviewed by Xan Lopez.
337
338         Rework where we get page step and line step from, so we do not
339         depend on scrollbars existing. Caught by API test I forgot to run.
340
341         * platform/gtk/ScrollViewGtk.cpp:
342         (WebCore::ScrollView::setGtkAdjustments):
343
344 2010-05-06  Gustavo Noronha Silva  <gustavo.noronha@collabora.co.uk>
345
346         Reviewed by Xan Lopez.
347
348         [GTK] Adjustment resetting uses wrong values, and misses page_size and steps
349         https://bugs.webkit.org/show_bug.cgi?id=38657
350
351         Fix resetting adjustment values. In the page cache case, we were
352         confusing page_size and upper, leading to stray scrollbars
353         sometimes.
354
355         * platform/gtk/ScrollViewGtk.cpp:
356         (WebCore::ScrollView::setGtkAdjustments):
357
358 2010-05-06  Darin Adler  <darin@apple.com>
359
360         Reviewed by Beth Dakin.
361
362         Page::setCanStartMedia does not properly handle the case where a media listener is removed
363         https://bugs.webkit.org/show_bug.cgi?id=38602
364
365         We can't find any real case where this causes a crash at this time, but
366         we want to harden the code anyway. Thus there are no new regression tests.
367
368         * page/Page.cpp:
369         (WebCore::Page::removeMediaCanStartListener): Removed incorrect assertion.
370         (WebCore::Page::setCanStartMedia): Change algorithm so we notify listeners
371         one at a time and don't notify any listener that has already been removed
372         from the set.
373
374 2010-05-05  Ojan Vafai  <ojan@chromium.org>
375
376         Reviewed by Darin Adler.
377
378         shift+click on an existing selection doesn't work right
379         https://bugs.webkit.org/show_bug.cgi?id=36542
380
381         NSTextView behavior is to move the end of the selection
382         closest to the shift-click. Win/Linux behavior is to always
383         move the focus end of the selection.
384
385         Test: editing/selection/shift-click.html
386
387         * page/EventHandler.cpp:
388         (WebCore::textDistance):
389         (WebCore::EventHandler::handleMousePressEventSingleClick):
390
391 2010-05-06  Pavel Feldman  <pfeldman@chromium.org>
392
393         Reviewed by Timothy Hatcher.
394
395         Web Inspector: implement panels history traversal on Cmd+Left/Right.
396
397         https://bugs.webkit.org/show_bug.cgi?id=38649
398
399         * inspector/front-end/inspector.js:
400         (WebInspector.set currentPanel):
401         (WebInspector.loaded):
402         (WebInspector.documentKeyDown):
403         (WebInspector.PanelHistory):
404         (WebInspector.PanelHistory.prototype.canGoBack):
405         (WebInspector.PanelHistory.prototype.goBack):
406         (WebInspector.PanelHistory.prototype.canGoForward):
407         (WebInspector.PanelHistory.prototype.goForward):
408         (WebInspector.PanelHistory.prototype.setPanel):
409
410 2010-05-03  Evan Martin  <evan@chromium.org>
411
412         Reviewed by Eric Seidel.
413
414         [chromium] use glyphDataForCharacter so we hit the glyphdata cache
415         https://bugs.webkit.org/show_bug.cgi?id=38500
416
417         Calling fontDataForCharacters() while rendering text is expensive.
418         Examining the relevant Mac code in WebKit revealed that calling the
419         similarly-named glyphDataForCharacters() results in caching the font
420         data on a per-glyph basis.
421
422         Since we now choose a font based on the first character in a run, we
423         need to be careful that all the glyphs within the run use the same font.
424         This is also similar to the WebKit Mac code.  We need to remove all of
425         the script run bits eventually and this is a step in that direction.
426
427         Tests: fast/text/international/danda-space.html spacing changes slightly
428         (now matches Firefox better) and fast/text/international/thai-baht-space.html
429         now picks the correct (serif) font for the digits.
430
431         * platform/graphics/chromium/FontLinux.cpp:
432         (WebCore::TextRunWalker::nextScriptRun):
433         (WebCore::TextRunWalker::setupFontForScriptRun):
434
435 2010-05-06  Martin Robinson  <mrobinson@webkit.org>
436
437         Reviewed by Gustavo Noronha Silva.
438
439         [GTK] Enable DOM clipboard and drag-and-drop access
440         https://bugs.webkit.org/show_bug.cgi?id=30623
441
442         Convert dragging portion of drag-and-drop to use DataObjectGtk.
443
444         No new tests, because functionality has not changed.
445
446         * page/gtk/EventHandlerGtk.cpp:
447         (WebCore::EventHandler::createDraggingClipboard): Pass the DataObjectGtk as a parameter here.
448         * platform/gtk/ClipboardGtk.h:
449         (WebCore::ClipboardGtk::create): Take the DataObject as a parameter instead of creating it here.
450         (WebCore::ClipboardGtk::helper): Added.
451         (WebCore::ClipboardGtk::dataObject): Added.
452         * platform/gtk/PasteboardHelper.h: Make targetListForDataObject a public method.
453
454 2010-05-06  Pavel Feldman  <pfeldman@chromium.org>
455
456         Reviewed by Timothy Hatcher.
457
458         Web Inspector: Do not show content tab for resources
459         not supporting content preview.
460
461         https://bugs.webkit.org/show_bug.cgi?id=38635
462
463         * English.lproj/localizedStrings.js:
464         * inspector/front-end/FontView.js:
465         (WebInspector.FontView.prototype.hasContentTab):
466         * inspector/front-end/ImageView.js:
467         (WebInspector.ImageView.prototype.hasContentTab):
468         * inspector/front-end/ResourceView.js:
469         (WebInspector.ResourceView):
470         (WebInspector.ResourceView.prototype._selectTab):
471         (WebInspector.ResourceView.prototype.hasContentTab):
472         * inspector/front-end/SourceView.js:
473         (WebInspector.SourceView.prototype.hasContentTab):
474
475 2010-05-06  Antonio Gomes  <tonikitoo@webkit.org>
476
477         Reviewed by Kenneth Christiansen.
478
479         Spatial Navigation: adapt the logic of {deep}findFocusableNodeInDirection to do traversal starting from Node* not Document*
480         https://bugs.webkit.org/show_bug.cgi?id=37803
481
482         Instead of receiving a Document pointer as incoming parameter, patch modifies
483         findFocusableNodeInDirection and deepFindFocusableNodeInDirection methods to
484         receive a Node pointer as start for content traversal.
485         This way we can make good use of deepFindFocusableNodeInDirection to traverse
486         other scrollable container like scrollable div's, and not only frames or iframes.
487
488         Patch also makes use of 'while' instead of 'for' to loop control, that gives move
489         flexibility to the incremental step: e.g. if a scrollable div was processed, the incremental
490         step in the loop does not have to do node->traverseNextNode() but node->traverseNextSibling().
491
492         No behavior change. It is a preparation for supporting scrollable containers in Spatial
493         Navigation.
494
495         * page/FocusController.cpp:
496         (WebCore::FocusController::advanceFocusDirectionally):
497         (WebCore::FocusController::findFocusableNodeInDirection):
498         (WebCore::FocusController::deepFindFocusableNodeInDirection):
499         * page/FocusController.h:
500
501 2010-05-06  Csaba Osztrogonác  <ossy@webkit.org>
502
503         Unreviewed WinCE buildfix after r58842.
504         Preprocessor doesn't understand "true", changed to "1"
505
506         * platform/graphics/MediaPlayer.cpp:
507
508 2010-05-06  Mikhail Naganov  <mnaganov@chromium.org>
509
510         Reviewed by Pavel Feldman.
511
512         Temporarily disable 'console.profiles' until we can distinguish
513         functions from different frames
514
515         https://bugs.webkit.org/show_bug.cgi?id=38638
516
517         * bindings/v8/custom/V8ConsoleCustom.cpp:
518         (WebCore::V8Console::profilesAccessorGetter):
519
520 2010-05-06  Steve Block  <steveblock@google.com>
521
522         Reviewed by Eric Seidel.
523
524         MAC_JAVA_BRIDGE should be renamed JAVA_BRIDGE
525         https://bugs.webkit.org/show_bug.cgi?id=38544
526
527         No new tests, build fix only.
528
529         * DerivedSources.make:
530         * bindings/js/ScriptController.cpp:
531         (WebCore::ScriptController::ScriptController):
532         * bindings/js/ScriptController.h:
533         * bindings/js/ScriptControllerMac.mm:
534         (WebCore::ScriptController::createScriptInstanceForWidget):
535         * bridge/jni/JNIBridge.cpp:
536         * bridge/jni/JNIBridge.h:
537         * bridge/jni/JNIUtility.cpp:
538         * bridge/jni/JNIUtility.h:
539         * bridge/jni/jni_jsobject.h:
540         * bridge/jni/jni_jsobject.mm:
541         * bridge/jni/jni_objc.mm:
542         * bridge/jni/jsc/JNIBridgeJSC.cpp:
543         * bridge/jni/jsc/JNIBridgeJSC.h:
544         * bridge/jni/jsc/JNIUtilityPrivate.cpp:
545         * bridge/jni/jsc/JNIUtilityPrivate.h:
546         * bridge/jni/jsc/JavaClassJSC.cpp:
547         * bridge/jni/jsc/JavaClassJSC.h:
548         * bridge/jni/jsc/JavaInstanceJSC.cpp:
549         * bridge/jni/jsc/JavaInstanceJSC.h:
550         * loader/FrameLoaderClient.h:
551
552 2010-05-05  Alejandro G. Castro  <alex@igalia.com>
553
554         Reviewed by Xan Lopez.
555
556         Fixed the gobject introspection compilation with the new DOM
557         bindings, we needed to add DOM objects.
558
559         * GNUmakefile.am:
560
561 2010-05-06  Adam Barth  <abarth@webkit.org>
562
563         Reviewed by Eric Seidel.
564
565         drop support for sessionStorage in sandbox iframes
566         https://bugs.webkit.org/show_bug.cgi?id=38151
567
568         This patch causes us to throw a security exception when a sandboxed
569         iframe attempts to access sessionStorage, matching our behavior for
570         localStorage.  The letter of the spec asks us to create a separate
571         storage area for each unique origin.  We might want to do that in a
572         future patch, but throwing a security error seems like a safe move now.
573
574         * page/DOMWindow.cpp:
575         (WebCore::DOMWindow::sessionStorage):
576         (WebCore::DOMWindow::localStorage):
577         * page/DOMWindow.h:
578         * page/DOMWindow.idl:
579         * page/SecurityOrigin.h:
580         (WebCore::SecurityOrigin::canAccessSessionStorage):
581         * storage/StorageEventDispatcher.cpp:
582         (WebCore::StorageEventDispatcher::dispatch):
583
584 2010-05-06  Andy Estes  <aestes@apple.com>
585
586         Reviewed by Maciej Stachowiak.
587
588         Allow forms submitting to target="_blank" to open popups if the submission
589         originated from a user gesture.
590
591         https://bugs.webkit.org/show_bug.cgi?id=37335
592         <rdar://problem/7884980>
593
594         Test: fast/events/popup-allowed-from-gesture-initiated-form-submit.html
595
596         * bindings/js/ScriptController.cpp:
597         (WebCore::ScriptController::processingUserGesture): If no DOM event is
598         being processed, consult UserGestureIndicator to determine return value.
599         * bindings/js/ScriptController.h: Moved the logic of processingUserGestureEvent()
600         into processingUserGesture().
601
602 2010-05-06  Xan Lopez  <xlopez@igalia.com>
603
604         Rubber-stamped by Eric Seidel.
605
606         [GTK] Refactor GenerateProperties in CodeGenerationGObject.pm
607         https://bugs.webkit.org/show_bug.cgi?id=38577
608
609         Thinko caught while refactoring, $custom variable was not
610         initialized.
611
612         * bindings/scripts/CodeGeneratorGObject.pm:
613         * bindings/scripts/test/GObject/WebKitDOMTestObj.cpp:
614         (webkit_dom_test_obj_set_property):
615         (webkit_dom_test_obj_get_property):
616         (webkit_dom_test_obj_class_init):
617
618 2010-05-06  Xan Lopez  <xlopez@igalia.com>
619
620         Rubber-stamped by Eric Seidel.
621
622         [GTK] Refactor GenerateProperties in CodeGenerationGObject.pm
623         https://bugs.webkit.org/show_bug.cgi?id=38577
624
625         Refactor GenerateProperty out of GenerateProperties. This is in
626         preparation for EventListeren attributes, which won't generate
627         normal GObject properties.
628
629         * bindings/scripts/CodeGeneratorGObject.pm:
630
631 2010-05-06  Pavel Feldman  <pfeldman@chromium.org>
632
633         Reviewed by Joseph Pecoraro.
634
635         Web Inspector: follow up to linkify event listeners.
636
637         https://bugs.webkit.org/show_bug.cgi?id=38257
638
639         * bindings/js/ScriptEventListener.cpp:
640         (WebCore::eventListenerHandlerLocation):
641         * bindings/v8/ScriptEventListener.cpp:
642         (WebCore::eventListenerHandlerLocation):
643         * inspector/front-end/ElementsPanel.js:
644         (WebInspector.ElementsPanel.prototype.linkifyNodeReference):
645         * inspector/front-end/EventListenersSidebarPane.js:
646
647 2010-05-05  Charles Wei  <charles.wei@torchmobile.com.cn>
648
649         Reviewed by George Staikos
650
651         https://bugs.webkit.org/show_bug.cgi?id=37848
652         This patch adds WCSS -wap-input-format and -wap-input-required support to WebKit
653
654         Tests: fast/wcss/wap-input-format.xhtml
655                fast/wcss/wap-input-required.xhtml
656
657         * css/CSSParser.cpp:
658         (WebCore::CSSParser::parseValue):
659         (WebCore::CSSParser::parseWCSSInputProperty):
660         * css/CSSParser.h:
661         * css/CSSStyleSelector.cpp:
662         (WebCore::CSSStyleSelector::applyProperty):
663         * css/WCSSPropertyNames.in:
664         * dom/InputElement.cpp:
665         (WebCore::InputElement::sanitizeValue):
666         (WebCore::InputElement::handleBeforeTextInsertedEvent):
667         (WebCore::InputElementData::InputElementData):
668         (WebCore::formatCodes):
669         (WebCore::cursorPositionToMaskIndex):
670         (WebCore::InputElement::isConformToInputMask):
671         (WebCore::InputElement::validateInputMask):
672         * dom/InputElement.h:
673         (WebCore::InputElementData::inputFormatMask):
674         (WebCore::InputElementData::setInputFormatMask):
675         (WebCore::InputElementData::maxInputCharsAllowed):
676         (WebCore::InputElementData::setMaxInputCharsAllowed):
677         * html/HTMLInputElement.cpp:
678         (WebCore::HTMLInputElement::setWapInputFormat):
679         * html/HTMLInputElement.h:
680         (WebCore::HTMLInputElement::data):
681         * wml/WMLInputElement.h:
682         (WebCore::WMLInputElement::data):
683
684 2010-05-05  MORITA Hajime  <morrita@google.com>
685
686         Reviewed by Darin Adler.
687
688         https://bugs.webkit.org/show_bug.cgi?id=38150
689         Refactoring: webkitEditableContentChangedEvent should be handled by the owner of appropriate the renderer.
690
691         Moved a part of code chunk in HTMLFormControlElementWithState::defaultEventHandler()
692         which accesses the renderer from foreign node, 
693         to TextControlInnerTextElement::defaultEventHandler() which owns the renderer.
694         
695         No new tests. No behavioral change.
696
697         * html/HTMLFormControlElement.cpp:
698         (WebCore::HTMLFormControlElementWithState::defaultEventHandler):
699         * html/HTMLFormControlElement.h:
700         * html/HTMLInputElement.h:
701         * html/HTMLTextAreaElement.h:
702         * rendering/TextControlInnerElements.cpp:
703         (WebCore::TextControlInnerTextElement::defaultEventHandler):
704
705 2010-05-05  Joseph Pecoraro  <joepeck@webkit.org>
706
707         Reviewed by Timothy Hatcher.
708
709         Web Inspector: Line Numbers should be Aligned with the Source Code Line
710         https://bugs.webkit.org/show_bug.cgi?id=38593
711
712         If there is a message bubble, such as an error message, in a source view
713         the line number should be in line with the source code line, not centered
714         between the source and bubble.
715
716         * inspector/front-end/textViewer.css:
717         (.webkit-line-number): added vertical-align: top
718
719 2010-05-05  Dan Bernstein  <mitz@apple.com>
720
721         Fix the decelerated compositing build.
722
723         * page/FrameView.cpp:
724         (WebCore::FrameView::isEnclosedInCompositingLayer):
725         * page/FrameView.h:
726
727 2010-05-05  Gavin Barraclough  <barraclough@apple.com>
728
729         Reviewed by Darin Adler.
730
731         Bug 38604 - workers-gc2 crashing on Qt
732
733         This appears to be due to a couple of issues.
734         (1) When the atomic string table is deleted it does not clear the 'inTable' bit
735         on AtomicStrings - it implicitly assumes that all AtomicStrings have already
736         been deleted at this point (otherwise they will crash in their destructor when
737         they try to remove themselves from the atomic string table).
738         (2) We don't fix the ordering in which WTF::WTFThreadData and
739         WebCore::ThreadGlobalData are destructed.
740
741         We should make sure that ThreadGlobalData is cleaned up before worker threads
742         terminate and WTF::WTFThreadData is destroyed, and we should clear the inTable
743         bit of members on atomic string table destruction.
744
745         WTF changes (fix issue 2, above) - clean up the thread data on worker termination.
746
747         * platform/ThreadGlobalData.cpp:
748         (WebCore::ThreadGlobalData::~ThreadGlobalData):
749         (WebCore::ThreadGlobalData::destroy):
750         * platform/ThreadGlobalData.h:
751         * workers/WorkerThread.cpp:
752         (WebCore::WorkerThread::workerThread):
753
754 2010-05-05  Dan Bernstein  <mitz@apple.com>
755
756         Reviewed by Simon Fraser.
757
758         <rdar://problem/7932072> Iframes in composited layers don’t repaint correctly (affects Yahoo! Mail with Flash Player 10.1)
759         https://bugs.webkit.org/show_bug.cgi?id=38427
760
761         Test: compositing/iframes/iframe-in-composited-layer.html
762
763         * WebCore.base.exp: Export FrameView::isEnclosedInCompositingLayer().
764         * page/FrameView.cpp:
765         (WebCore::FrameView::isEnclosedInCompositingLayer): Added this predicate.
766         * page/FrameView.h:
767
768 2010-05-05  Chris Marrin  <cmarrin@apple.com>
769
770         Reviewed by Simon Fraser.
771
772         Got composited iframes showing up on Mac again
773         https://bugs.webkit.org/show_bug.cgi?id=38565
774
775         This was broken by http://trac.webkit.org/changeset/58798. That
776         change connected iframes through the parent document to the root
777         of the layer tree. That is correct for Windows, but not for Mac.
778         So the places where the linkage is made were wrapped in 
779         shouldPropagateCompositingToIFrameParent() calls, which is 
780         always false for Mac.
781
782         Test: compositing/iframes/composited-iframe-alignment.html
783
784         * rendering/RenderLayerCompositor.cpp:Avoid doing composited iframe linkage on Mac
785         (WebCore::RenderLayerCompositor::rebuildCompositingLayerTree):
786         (WebCore::RenderLayerCompositor::didMoveOnscreen):
787         (WebCore::RenderLayerCompositor::willMoveOffscreen):
788         (WebCore::RenderLayerCompositor::ensureRootPlatformLayer):
789
790 2010-05-05  Alexey Proskuryakov  <ap@apple.com>
791
792         Reviewed by Darin Adler.
793
794         https://bugs.webkit.org/show_bug.cgi?id=38260
795         <rdar://problem/7917548> Fix whitespace removing in deprecatedParseURL().
796
797         Broken all the way since r4 (yes, that's a revision number).
798
799         Test: http/tests/security/xss-DENIED-javascript-with-spaces.html
800
801         * css/CSSHelper.cpp: (WebCore::deprecatedParseURL): Fixed loop conditions for remaining length.
802
803 2010-05-05  Chris Fleizach  <cfleizach@apple.com>
804
805         Reviewed by Beth Dakin.
806
807         Many AXUnknown showing up in the hierarchy
808         https://bugs.webkit.org/show_bug.cgi?id=38607
809
810         The RenderTableSection should not be an accessible element.
811
812         Test: platform/mac/accessibility/parent-of-table-row-is-table.html
813
814         * accessibility/AccessibilityRenderObject.cpp:
815         (WebCore::AccessibilityRenderObject::determineAccessibilityRole):
816
817 2010-05-05  Csaba Osztrogonác  <ossy@webkit.org>
818
819         Reviewed by Simon Hausmann.
820
821         [Qt]Disable Qt Multimedia backend for HTML 5 Audio and Video elements
822         Fall back to the Phonon backend until the release situation has been cleared up.
823
824         https://bugs.webkit.org/show_bug.cgi?id=38612
825
826         Buildfix for QT_VERSION >= 0x040700 after r58810.
827
828         * platform/graphics/MediaPlayer.cpp:
829
830 2010-05-05  Jian Li  <jianli@chromium.org>
831
832         Reviewed by David Levin.
833
834         XMLHttpRequestUpload events do not fire when sending a raw file or FormData object.
835         https://bugs.webkit.org/show_bug.cgi?id=37771
836
837         Test: http/tests/local/formdata/upload-events.html
838
839         * xml/XMLHttpRequest.cpp:
840         (WebCore::XMLHttpRequest::createRequest):
841
842 2010-05-05  Csaba Osztrogonác  <ossy@webkit.org>
843
844         Reviewed by Simon Hausmann.
845
846         [Qt] Qt port should use its own QUuid class to create UUID string.
847         https://bugs.webkit.org/show_bug.cgi?id=38581
848
849         * platform/UUID.cpp:
850         (WebCore::createCanonicalUUIDString): Added PLATFORM(QT) case.
851
852 2010-05-05  Alexey Proskuryakov  <ap@apple.com>
853
854         Roll out r58830 for breaking tests.
855
856         Was: https://bugs.webkit.org/show_bug.cgi?id=38546
857         Node.focus() fails to move focus from subframe properly
858
859         * html/HTMLFrameElementBase.cpp:
860         (WebCore::HTMLFrameElementBase::setFocus):
861
862 2010-05-05  Jian Li  <jianli@chromium.org>
863
864         Reviewed by Adam Barth.
865
866         Implement FileReader class.
867         https://bugs.webkit.org/show_bug.cgi?id=38157
868
869         This patch only contains the implementation of FileReader class as defined
870         in the File API spec: http://www.w3.org/TR/file-upload/#dfn-filereader.
871
872         New test will be added when a IDL is exposed and the FILE_READER is turned
873         on.
874
875         * GNUmakefile.am:
876         * WebCore.gypi:
877         * WebCore.pro:
878         * WebCore.vcproj/WebCore.vcproj:
879         * WebCore.xcodeproj/project.pbxproj:
880         * dom/EventNames.h:
881         * dom/EventTarget.cpp:
882         (WebCore::EventTarget::toFileReader):
883         * dom/EventTarget.h:
884         * html/FileError.h:
885         (WebCore::FileError::FileError):
886         * html/FileReader.cpp: Added.
887         * html/FileReader.h: Added.
888         * html/FileStream.cpp:
889         (WebCore::FileStream::FileStream):
890         (WebCore::FileStream::openForRead):
891         (WebCore::FileStream::close):
892         (WebCore::FileStream::read):
893         * html/FileStream.h:
894
895 2010-05-05  Steve Falkenburg  <sfalken@apple.com>
896
897         Reviewed by Maciej Stachowiak.
898
899         REGRESSION(r57969) Image decoder is repeatedly destroyed/created in CoreGraphics-based Windows WebKit
900         https://bugs.webkit.org/show_bug.cgi?id=38595
901
902         * platform/graphics/cg/ImageSourceCG.cpp:
903         (WebCore::ImageSource::setData):
904
905 2010-05-05  Alexey Proskuryakov  <ap@apple.com>
906
907         Reviewed by Adele Peterson.
908
909         https://bugs.webkit.org/show_bug.cgi?id=38546
910         Node.focus() fails to move focus from subframe properly
911
912         Test: fast/frames/take-focus-from-iframe.html
913
914         * html/HTMLFrameElementBase.cpp: (WebCore::HTMLFrameElementBase::setFocus): Don't clear
915         focus if this frame doesn't have it. This can happen if page's and HTMLFrameElement's ideas
916         of focused frame get out of sync temporarily.
917
918 2010-05-05  Alexey Proskuryakov  <ap@apple.com>
919
920         Reviewed by Adele Peterson.
921
922         https://bugs.webkit.org/show_bug.cgi?id=26824
923         <rdar://problem/7018610> EventHandler can operate on a wrong frame if focus changes during
924         keyboard event dispatch.
925
926         EventHandler object is tied to a frame, so it's wrong for it to continue processing a keyboard
927         event if focused frame changes between keydown and keypress.
928
929         * manual-tests/focus-change-between-key-events.html: Added.
930
931         * page/EventHandler.cpp: (WebCore::EventHandler::keyEvent): Bail out early if focused frame
932         changes while dispatching keydown. Also made similar changes for Windows to maintain matching
933         behavior, even though EventHandler was re-entered anyway due to WM_KEYDOWN and WM_CHAR being
934         separate events.
935
936 2010-05-05  Steve Block  <steveblock@google.com>
937
938         Reviewed by Adam Barth.
939
940         MediaError.h is missing PassRefPtr.h include
941         https://bugs.webkit.org/show_bug.cgi?id=38575
942
943         No new tests, build fix only.
944
945         * html/MediaError.h:
946
947 2010-05-05  Alexander Pavlov  <apavlov@chromium.org>
948
949         Reviewed by Pavel Feldman.
950
951         Web Inspector: Audits panel: Resource counters get reset when switching panels while reloading page
952         https://bugs.webkit.org/show_bug.cgi?id=38579
953
954         * inspector/front-end/AuditLauncherView.js:
955         (WebInspector.AuditLauncherView.prototype.updateResourceTrackingState):
956         (WebInspector.AuditLauncherView.prototype._updateResourceProgress):
957
958 2010-05-05  Pavel Feldman  <pfeldman@chromium.org>
959
960         Reviewed by Joseph Pecoraro.
961
962         Web Inspector: Doubleclick on line number should not trigger source editing.
963
964         https://bugs.webkit.org/show_bug.cgi?id=38588
965
966         * inspector/front-end/TextViewer.js:
967         (WebInspector.TextViewer.prototype._handleDoubleClick):
968
969 2010-05-05  Martin Robinson  <mrobinson@webkit.org>
970
971         Reviewed by Gustavo Noronha.
972
973         [GTK] Enable DOM clipboard and drag-and-drop access
974         https://bugs.webkit.org/show_bug.cgi?id=30623
975
976         Add support in the PasteboardHelper for images, in preparation for drag-and-drop data.
977
978         No new tests as functionality has not changed.
979
980         * platform/gtk/PasteboardHelper.cpp:
981         (WebCore::PasteboardHelper::fillSelectionData): Add support for images here.
982         (WebCore::PasteboardHelper::targetListForDataObject): Add support for images here.
983
984 2010-05-05  Stuart Morgan  <stuartmorgan@chromium.org>
985
986         Reviewed by Darin Fisher.
987
988         Add a "focused" parameter to Widget::setFocus, and updates Document
989         so that Widget is informed of focus loss as well as focus gain.
990         Changes all existing setFocus implementations so that they ignore
991         the 'false' case, so no behavior is changed until individual
992         platforms are updated to handle the new case (if they want to).
993
994         https://bugs.webkit.org/show_bug.cgi?id=37961
995
996         * dom/Document.cpp:
997         (WebCore::Document::setFocusedNode):
998         * platform/Widget.h:
999         * platform/android/WidgetAndroid.cpp:
1000         (WebCore::Widget::setFocus):
1001         * platform/chromium/WidgetChromium.cpp:
1002         (WebCore::Widget::setFocus):
1003         * platform/efl/WidgetEfl.cpp:
1004         (WebCore::Widget::setFocus):
1005         * platform/gtk/WidgetGtk.cpp:
1006         (WebCore::Widget::setFocus):
1007         * platform/haiku/WidgetHaiku.cpp:
1008         (WebCore::Widget::setFocus):
1009         * platform/mac/WidgetMac.mm:
1010         (WebCore::Widget::setFocus):
1011         * platform/qt/WidgetQt.cpp:
1012         (WebCore::Widget::setFocus):
1013         * platform/win/WidgetWin.cpp:
1014         (WebCore::Widget::setFocus):
1015         * platform/wx/WidgetWx.cpp:
1016         (WebCore::Widget::setFocus):
1017         * plugins/PluginView.h:
1018         * plugins/PluginViewNone.cpp:
1019         (WebCore::PluginView::setFocus):
1020         * plugins/gtk/PluginViewGtk.cpp:
1021         (WebCore::PluginView::setFocus):
1022         * plugins/mac/PluginViewMac.cpp:
1023         (WebCore::PluginView::setFocus):
1024         * plugins/qt/PluginViewQt.cpp:
1025         (WebCore::PluginView::setFocus):
1026         * plugins/symbian/PluginViewSymbian.cpp:
1027         (WebCore::PluginView::setFocus):
1028         * plugins/win/PluginViewWin.cpp:
1029         (WebCore::PluginView::setFocus):
1030
1031 2010-05-05  Steve Block  <steveblock@google.com>
1032
1033         Reviewed by Pavel Feldman.
1034
1035         Move V8 ScriptDebugServer::topStackFrame() to ScriptCallStack
1036         https://bugs.webkit.org/show_bug.cgi?id=38531
1037
1038         ScriptCallStack::create() uses ScriptDebugServer::topStackFrame(), but ScriptDebugServer
1039         is guarded with ENABLE(JAVASCRIPT_DEBUGGER). This prevents ScriptCallStack from being
1040         built on platforms that do not define ENABLE(JAVASCRIPT_DEBUGGER).
1041
1042         No new tests, build fix only.
1043
1044         * bindings/v8/ScriptCallStack.cpp:
1045         (WebCore::ScriptCallStack::callLocation):
1046         (WebCore::ScriptCallStack::createUtilityContext): Helper for topStackFrame, moved from ScriptDebugServer
1047         (WebCore::ScriptCallStack::topStackFrame): Moved from ScriptDebugServer
1048         * bindings/v8/ScriptCallStack.h:
1049         (WebCore::ScriptCallStack::utilityContext): Helper for topStackFrame, moved from ScriptDebugServer
1050         * bindings/v8/ScriptDebugServer.cpp:
1051         * bindings/v8/ScriptDebugServer.h:
1052
1053 2010-05-05  Csaba Osztrogonác  <ossy@webkit.org>
1054
1055         Rubber-stamped by Simon Hausmann.
1056
1057         [Qt] REGRESSION(r56869): WinCE build is broken
1058         https://bugs.webkit.org/show_bug.cgi?id=36929
1059
1060         * WebCore.pro: LIBS += -lOle32 added.
1061
1062 2010-05-05  Simon Hausmann  <simon.hausmann@nokia.com>
1063
1064         Reviewed by Tor Arne Vestbø.
1065
1066         [Qt] Disable Qt Multimedia backend for HTML 5 Audio and Video elements
1067
1068         Fall back to the Phonon backend until the release situation has been cleared up.
1069
1070         * WebCore.pro:
1071
1072 2010-05-05  Ilya Tikhonovsky  <loislo@chromium.org>
1073
1074         Reviewed by Pavel Feldman.
1075
1076         WebInspector: Clickable links to resources should be used as 'details' part for the all suitable kinds of records.
1077         https://bugs.webkit.org/show_bug.cgi?id=38542
1078
1079         * inspector/front-end/TimelinePanel.js:
1080         (WebInspector.TimelinePanel.prototype._innerAddRecordToTimeline):
1081         (WebInspector.TimelineRecordListRow):
1082         (WebInspector.TimelineRecordListRow.prototype.update):
1083         (WebInspector.TimelinePanel.FormattedRecord):
1084         (WebInspector.TimelinePanel.FormattedRecord.prototype._generatePopupContent):
1085         (WebInspector.TimelinePanel.FormattedRecord.prototype._getRecordDetails):
1086         (WebInspector.TimelinePanel.PopupContentHelper):
1087         (WebInspector.TimelinePanel.PopupContentHelper.prototype._createCell):
1088         (WebInspector.TimelinePanel.PopupContentHelper.prototype._appendTextRow):
1089         (WebInspector.TimelinePanel.PopupContentHelper.prototype._appendElementRow):
1090         (WebInspector.TimelinePanel.PopupContentHelper.prototype._appendLinkRow):
1091
1092 2010-05-05  Nikolas Zimmermann  <nzimmermann@rim.com>
1093
1094         Not reviewed. Add missing files generated by "run-bindings-test", after the DOMTestCallback.idl addition.
1095
1096         * bindings/scripts/test/GObject/WebKitDOMTestCallback.cpp: Added.
1097         (WebKit::kit):
1098         (webkit_dom_test_callback_callback_with_class1param):
1099         (webkit_dom_test_callback_callback_with_class2param):
1100         (webkit_dom_test_callback_callback_with_non_bool_return_type):
1101         (WebKit::wrapTestCallback):
1102         (WebKit::core):
1103         (webkit_dom_test_callback_finalize):
1104         (webkit_dom_test_callback_set_property):
1105         (webkit_dom_test_callback_get_property):
1106         (webkit_dom_test_callback_class_init):
1107         (webkit_dom_test_callback_init):
1108         * bindings/scripts/test/GObject/WebKitDOMTestCallback.h: Added.
1109         * bindings/scripts/test/GObject/WebKitDOMTestCallbackPrivate.h: Added.
1110         * bindings/scripts/test/ObjC/DOMTestCallback.h: Added.
1111         * bindings/scripts/test/ObjC/DOMTestCallback.mm: Added.
1112         (-[DOMTestCallback dealloc]):
1113         (-[DOMTestCallback finalize]):
1114         (-[DOMTestCallback callbackWithClass1Param:]):
1115         (-[DOMTestCallback callbackWithClass2Param:strArg:]):
1116         (-[DOMTestCallback callbackWithNonBoolReturnType:]):
1117         (-[DOMTestCallback customCallback:class6Param:]):
1118         (core):
1119         (kit):
1120         * bindings/scripts/test/ObjC/DOMTestCallbackInternal.h: Added.
1121
1122 2010-05-05  Joseph Pecoraro  <joepeck@webkit.org>
1123
1124         Reviewed by Pavel Feldman.
1125
1126         Web Inspector: FontView needs Cleanup
1127         https://bugs.webkit.org/show_bug.cgi?id=38567
1128
1129         FontView was missing some of the newer practices for initialization
1130         that other Resource Views had. Also its width calculations could
1131         result in a single character wrapping. This is general cleanup.
1132
1133         * inspector/front-end/FontView.js:
1134         (WebInspector.FontView): move initialization into contentTabSelected
1135         (WebInspector.FontView.prototype.contentTabSelected): handle initialization like other Resource Views
1136         (WebInspector.FontView.prototype.updateFontPreviewSize): use a narrower width to prevent text from widowing
1137
1138 2010-05-05  Dirk Schulze  <krit@webkit.org>
1139
1140         Reviewed by Nikolas Zimmermann.
1141
1142         SVG hit testing is *way* too slow
1143         https://bugs.webkit.org/show_bug.cgi?id=19312
1144
1145         Use the cached stroke and fill boundaries in RenderPath as a heuristik to
1146         speed up SVG's hit testing.
1147
1148         No new tests added.
1149
1150         * rendering/RenderPath.cpp:
1151         (WebCore::RenderPath::fillContains):
1152         (WebCore::RenderPath::strokeContains):
1153
1154 2010-05-04  Dumitru Daniliuc  <dumi@chromium.org>
1155
1156         Reviewed by Adam Barth.
1157
1158         Auto-generate all Database callbacks.
1159         https://bugs.webkit.org/show_bug.cgi?id=38503
1160
1161         * DerivedSources.cpp:
1162         * DerivedSources.make:
1163         * GNUmakefile.am:
1164         * WebCore.gypi:
1165         * WebCore.pri:
1166         * WebCore.pro:
1167         * WebCore.vcproj/WebCore.vcproj:
1168         * WebCore.xcodeproj/project.pbxproj:
1169         * bindings/js/JSBindingsAllInOne.cpp:
1170         * bindings/js/JSCustomSQLStatementCallback.cpp: Removed.
1171         * bindings/js/JSCustomSQLStatementCallback.h: Removed.
1172         * bindings/js/JSCustomSQLStatementErrorCallback.cpp:
1173         (WebCore::JSSQLStatementErrorCallback::handleEvent):
1174         * bindings/js/JSCustomSQLStatementErrorCallback.h: Removed.
1175         * bindings/js/JSCustomSQLTransactionCallback.cpp: Removed.
1176         * bindings/js/JSCustomSQLTransactionCallback.h: Removed.
1177         * bindings/js/JSCustomSQLTransactionErrorCallback.cpp: Removed.
1178         * bindings/js/JSCustomSQLTransactionErrorCallback.h: Removed.
1179         * bindings/js/JSDatabaseCallback.cpp: Removed.
1180         * bindings/js/JSDatabaseCallback.h: Removed.
1181         * bindings/js/JSDatabaseCustom.cpp:
1182         (WebCore::JSDatabase::changeVersion):
1183         (WebCore::createTransaction):
1184         * bindings/js/JSSQLTransactionCustom.cpp:
1185         (WebCore::JSSQLTransaction::executeSql):
1186         * bindings/scripts/CodeGeneratorJS.pm:
1187         * bindings/scripts/test/JS/JSTestCallback.cpp:
1188         * bindings/v8/custom/V8CustomSQLStatementCallback.cpp: Removed.
1189         * bindings/v8/custom/V8CustomSQLStatementCallback.h: Removed.
1190         * bindings/v8/custom/V8CustomSQLStatementErrorCallback.cpp:
1191         (WebCore::V8SQLStatementErrorCallback::handleEvent):
1192         * bindings/v8/custom/V8CustomSQLStatementErrorCallback.h: Removed.
1193         * bindings/v8/custom/V8CustomSQLTransactionCallback.cpp: Removed.
1194         * bindings/v8/custom/V8CustomSQLTransactionCallback.h: Removed.
1195         * bindings/v8/custom/V8CustomSQLTransactionErrorCallback.cpp: Removed.
1196         * bindings/v8/custom/V8CustomSQLTransactionErrorCallback.h: Removed.
1197         * bindings/v8/custom/V8DatabaseCallback.cpp: Removed.
1198         * bindings/v8/custom/V8DatabaseCallback.h: Removed.
1199         * bindings/v8/custom/V8DatabaseCustom.cpp:
1200         (WebCore::V8Database::changeVersionCallback):
1201         (WebCore::createTransaction):
1202         * bindings/v8/custom/V8SQLTransactionCustom.cpp:
1203         (WebCore::V8SQLTransaction::executeSqlCallback):
1204         * storage/DatabaseCallback.h:
1205         * storage/DatabaseCallback.idl: Added.
1206         * storage/SQLStatement.cpp:
1207         (WebCore::SQLStatement::performCallback):
1208         * storage/SQLStatementCallback.h:
1209         * storage/SQLStatementCallback.idl: Added.
1210         * storage/SQLStatementErrorCallback.idl: Added.
1211         * storage/SQLTransaction.cpp:
1212         (WebCore::SQLTransaction::deliverTransactionCallback):
1213         * storage/SQLTransactionCallback.h:
1214         * storage/SQLTransactionCallback.idl: Added.
1215         * storage/SQLTransactionErrorCallback.h:
1216         * storage/SQLTransactionErrorCallback.idl: Added.
1217
1218 2010-05-04  Chris Marrin  <cmarrin@apple.com>
1219
1220         Reviewed by Simon Fraser.
1221
1222         Made composited iframes work on Windows
1223         https://bugs.webkit.org/show_bug.cgi?id=32446
1224         
1225         This completes the work in http://trac.webkit.org/changeset/57919
1226         to create compositing layers in the parent document when an iframe has 
1227         a compositing layer. The parent document has a layer for the iframe 
1228         element and builds a layer tree to the page root. The layer tree for the
1229         iframe document is then parented to the iframe element's GraphicsLayer.
1230         
1231         The RenderLayerCompositor for the iframe document (which owns the
1232         root of the layer tree) now has a clippingLayer which is the 
1233         parent of the layer tree root so it can be clipped to the parent
1234         iframe's bounds, taking into account borders, padding, etc. in
1235         the parent iframe element.
1236         
1237         I also got rid of a no longer used function: RenderLayerCompositor::parentInRootLayer
1238
1239         Test: compositing/iframes/composited-parent-iframe.html
1240
1241         * rendering/RenderLayerBacking.cpp:Make calls to RenderLayerCompositor to set the clipping bounds for iframe content
1242         * rendering/RenderLayerCompositor.cpp:Hook the iframe content to the parent iframe element
1243         * rendering/RenderLayerCompositor.h:
1244
1245 2010-05-03  Alexey Proskuryakov  <ap@apple.com>
1246
1247         Reviewed by Adam Barth.
1248
1249         https://bugs.webkit.org/show_bug.cgi?id=38497
1250         <rdar://problem/7759438> Make sure that http URLs always have a host in SecurityOrigin
1251
1252         This is a hardening fix, and behavior really depends on what an underlying networking layer
1253         does. So, no test.
1254
1255         * page/SecurityOrigin.cpp:
1256         (WebCore::schemeRequiresAuthority): List schemes that need an authority for successful loading.
1257         (WebCore::SecurityOrigin::SecurityOrigin): Never let e.g. http origins with empty authorities
1258         have the same security origin.
1259
1260 2010-05-04  Zhenyao Mo  <zmo@google.com>
1261
1262         Reviewed by Dimitri Glazkov.
1263
1264         getFramebufferAttachmentParameter should return the original WebGLTexture/WebGLRenderbuffer instead of creating new ones sharing names.
1265         https://bugs.webkit.org/show_bug.cgi?id=38236
1266
1267         * html/canvas/CanvasObject.h: Add type check functions.
1268         (WebCore::CanvasObject::isBuffer):
1269         (WebCore::CanvasObject::isFramebuffer):
1270         (WebCore::CanvasObject::isProgram):
1271         (WebCore::CanvasObject::isRenderbuffer):
1272         (WebCore::CanvasObject::isShader):
1273         (WebCore::CanvasObject::isTexture):
1274         * html/canvas/WebGLBuffer.h: Add type check functions.
1275         (WebCore::WebGLBuffer::isBuffer):
1276         * html/canvas/WebGLFramebuffer.h: Add type check functions.
1277         (WebCore::WebGLFramebuffer::isFramebuffer):
1278         * html/canvas/WebGLProgram.h: Add type check functions.
1279         (WebCore::WebGLProgram::isProgram):
1280         * html/canvas/WebGLRenderbuffer.cpp: remove constructor using existing name.
1281         * html/canvas/WebGLRenderbuffer.h: Add type check functions; remove constructor using existing name.
1282         (WebCore::WebGLRenderbuffer::isRenderbuffer):
1283         * html/canvas/WebGLRenderingContext.cpp:
1284         (WebCore::WebGLRenderingContext::getFramebufferAttachmentParameter): Return original Texture/Renderbuffer instead of creating new ones.
1285         (WebCore::WebGLRenderingContext::findTexture): Find a WebGLTexture using a name.
1286         (WebCore::WebGLRenderingContext::findRenderbuffer): Find a WebGLRenderbuffer using a name.
1287         * html/canvas/WebGLRenderingContext.h: Add find* functions.
1288         * html/canvas/WebGLShader.h: Add type check functions.
1289         (WebCore::WebGLShader::isShader):
1290         * html/canvas/WebGLTexture.cpp: remove constructor using existing name.
1291         * html/canvas/WebGLTexture.h: Add type check functions; remove constructor using existing name.
1292         (WebCore::WebGLTexture::isTexture):
1293
1294 2010-05-04  Luiz Agostini  <luiz.agostini@openbossa.org>
1295
1296         Reviewed by Simon Hausmann.
1297
1298         [Qt] QT_MOBILE_THEME compile time flag
1299         https://bugs.webkit.org/show_bug.cgi?id=38439
1300
1301         Replacing preprocessor conditional used in RenderThemeQt from Q_WS_MAEMO_5 to
1302         USE(QT_MOBILE_THEME).
1303
1304         * WebCore.pro:
1305         * platform/qt/RenderThemeQt.cpp:
1306         (WebCore::RenderThemeQt::RenderThemeQt):
1307         (WebCore::RenderThemeQt::qStyle):
1308         (WebCore::RenderThemeQt::extraDefaultStyleSheet):
1309         (WebCore::RenderThemeQt::adjustMenuListButtonStyle):
1310         (WebCore::RenderThemeQt::setPaletteFromPageClientIfExists):
1311         * platform/qt/RenderThemeQt.h:
1312
1313 2010-05-04  Joseph Pecoraro  <joepeck@webkit.org>
1314
1315         Reviewed by Dan Bernstein.
1316
1317         SVG fonts trigger GlyphPage::fill with null font
1318         https://bugs.webkit.org/show_bug.cgi?id=38530
1319
1320         SVG fonts do not use the glyph page cache. This change detects when
1321         attempting to fill a GlyphPage with an SVG font and indicates that
1322         the glyphs were not available.
1323
1324         * platform/graphics/GlyphPageTreeNode.cpp:
1325         (WebCore::fill): helper method which handles attempts to fill a GlyphPage with SVG or non-SVG fonts
1326         (WebCore::GlyphPageTreeNode::initializePage): use the helper where appropriate
1327
1328 2010-05-04  Kent Tamura  <tkent@chromium.org>
1329
1330         Reviewed by David Levin (and unofficially by Enrica Casucci).
1331
1332         REGRESSION(r54368): Text drag-and-drop from input/textarea doesn't work
1333         if the text is like a URL
1334         https://bugs.webkit.org/show_bug.cgi?id=38374
1335
1336         Since r54368, documentFragmentFromDragData() creates an <a> element
1337         with no anchor text for URL-like text dragged from input/textarea
1338         element. If such text is dropped to input/textarea element, the text
1339         is not inserted.
1340         To fix this problem, use the original text or the URL as an anchor
1341         text.
1342
1343         Test: editing/pasteboard/drag-drop-url-text.html
1344
1345         * page/DragController.cpp:
1346         (WebCore::documentFragmentFromDragData):
1347
1348 2010-05-04  Steve Block  <steveblock@google.com>
1349
1350         Reviewed by Darin Adler.
1351
1352         JavaInstanceJSC.cpp and JNIUtilityPrivate.cpp need to include jni_jsobject.h for jlong_to_pt() and ptr_to_jlong()
1353         https://bugs.webkit.org/show_bug.cgi?id=38525
1354
1355         No new tests, build fix only.
1356
1357         * bridge/jni/jni_jsobject.h: Guard Mac-specific code with PLATFORM(MAC)
1358         * bridge/jni/jsc/JNIUtilityPrivate.cpp: Include jni_jsobject.h
1359         * bridge/jni/jsc/JavaInstanceJSC.cpp: Include jni_jsobject.h
1360
1361 2010-05-04  Steve Block  <steveblock@google.com>
1362
1363         Reviewed by Darin Adler.
1364
1365         New FileSystemPOSIX functions cause linker errors on Android
1366         https://bugs.webkit.org/show_bug.cgi?id=38521
1367
1368         No new tests, build fix only.
1369
1370         * platform/android/FileSystemAndroid.cpp: Remove closeFile, which is provided in FileSystemPOSIX.cpp
1371         * platform/posix/FileSystemPOSIX.cpp: Guard writeToFile with !PLATFORM(ANDROID)
1372
1373 2010-05-04  Pavel Feldman  <pfeldman@chromium.org>
1374
1375         Reviewed by Timothy Hatcher.
1376
1377         Web Inspector: restore main and sidebar scroller positions
1378         when switching between panels.
1379
1380         https://bugs.webkit.org/show_bug.cgi?id=38522
1381
1382         * inspector/front-end/ElementsPanel.js:
1383         (WebInspector.ElementsPanel.prototype.elementsToRestoreScrollPositionsFor):
1384         * inspector/front-end/Panel.js:
1385         (WebInspector.Panel.prototype.show):
1386         (WebInspector.Panel.prototype.hide):
1387         (WebInspector.Panel.prototype.elementsToRestoreScrollPositionsFor):
1388         (WebInspector.Panel.prototype._storeScrollPositions):
1389         (WebInspector.Panel.prototype._restoreScrollPositions):
1390         * inspector/front-end/ResourcesPanel.js:
1391         (WebInspector.ResourcesPanel.prototype.elementsToRestoreScrollPositionsFor):
1392         * inspector/front-end/ScriptsPanel.js:
1393         (WebInspector.ScriptsPanel.prototype.elementsToRestoreScrollPositionsFor):
1394
1395 2010-05-04  Steven Lai  <steven_lai@asia.apple.com>
1396
1397         Reviewed by Darin Adler.
1398
1399         https://bugs.webkit.org/show_bug.cgi?id=37900
1400         <rdar://problem/7806164> cloneNode() does not preserve z-index with more than six digits 
1401
1402         Tests: fast/dom/HTMLInputElement/clone-input-checked.html
1403                fast/dom/clone-node-z-index.html
1404
1405         * dom/Element.cpp: undid the order change of calling copyNonAttributeProperties() before setAttributes()
1406         (WebCore::Element::cloneElementWithoutChildren): uncheck the previous radio button in the same radio button group only when the checked radio box is appended to the dom tree
1407         * html/HTMLInputElement.cpp:
1408         (WebCore::HTMLInputElement::updateCheckedRadioButtons):
1409         (WebCore::HTMLInputElement::attach):
1410         (WebCore::HTMLInputElement::setChecked):
1411         * html/HTMLInputElement.h:
1412
1413 2010-04-29  John Gregg  <johnnyg@google.com>
1414
1415         Reviewed by Dmitry Titov.
1416
1417         notifications should have dir and replaceId attributes.
1418         Note that tests are only enabled in Chromium, skipped elsewhere
1419         since notifications aren't implemented.
1420         https://bugs.webkit.org/show_bug.cgi?id=38336
1421
1422         Tests: fast/notifications/notifications-replace.html
1423                fast/notifications/notifications-rtl.html
1424
1425         * notifications/Notification.h:
1426         (WebCore::Notification::dir):
1427         (WebCore::Notification::setDir):
1428         (WebCore::Notification::replaceId):
1429         (WebCore::Notification::setReplaceId):
1430         * notifications/Notification.idl:
1431
1432 2010-05-04  Alejandro G. Castro  <alex@igalia.com>
1433
1434         Reviewed by Xan Lopez.
1435
1436         Fixed error defining the float/double minimum in the object
1437         properties, the smallest value of a float/double is
1438         -G_MAXDOUBLE/-G_MAXFLOAT.
1439
1440         * bindings/scripts/CodeGeneratorGObject.pm:
1441
1442 2010-05-03  Joseph Pecoraro  <joepeck@webkit.org>
1443
1444         Reviewed by Dan Bernstein.
1445
1446         REGRESSION: Text clipped in absolutely positioned search inputs
1447         https://bugs.webkit.org/show_bug.cgi?id=38468
1448
1449         Previously I incorrectly added x() and y() to the tx and ty positioning.
1450         This clips a search input like a text input, respecting the vertically
1451         centered text.
1452
1453         * rendering/RenderTextControlSingleLine.cpp:
1454         (WebCore::RenderTextControlSingleLine::layout): only the Y changes, so change setLocation to setY
1455         (WebCore::RenderTextControlSingleLine::controlClipRect):
1456
1457 2010-05-04  Alexander Pavlov  <apavlov@chromium.org>
1458
1459         Reviewed by Timothy Hatcher.
1460
1461         Web Inspector: REGRESSION: Up/Down, PgUp/PgDown keys do not change numeric style properties
1462         https://bugs.webkit.org/show_bug.cgi?id=38516
1463
1464         * inspector/front-end/StylesSidebarPane.js:
1465         (WebInspector.StylePropertyTreeElement.prototype):
1466
1467 2010-05-04  Ben Murdoch  <benm@google.com>
1468
1469         Reviewed by Simon Hausmann.
1470
1471         Crash in handleTouchEvent: using dangling node ptrs in hashmap
1472         https://bugs.webkit.org/show_bug.cgi?id=38514
1473
1474         When navigating away from a page, if you have your finger still
1475         pressed and then lift it on the new page we see a crash if the
1476         node got deleted as we still have a dangling pointer in the
1477         m_originatingTouchPointTargets hashmap and try to use it as the
1478         receiver to dispatch a touchend event.
1479
1480         Test: fast/events/touch/touch-stale-node-crash.html
1481
1482         * page/EventHandler.cpp:
1483         (WebCore::EventHandler::clear): Clear the hashmap of touch targets.
1484
1485 2010-05-04  Joseph Pecoraro  <joepeck@webkit.org>
1486
1487         Reviewed by Pavel Feldman.
1488
1489         Web Inspector: Drawer Misbehaving when Docking / Undocking in Console Panel
1490         https://bugs.webkit.org/show_bug.cgi?id=38510
1491
1492         * inspector/front-end/inspector.js:
1493         (WebInspector.set attached): resize the drawer after docking/undocking
1494
1495 2010-05-04  Laszlo Gombos  <laszlo.1.gombos@nokia.com>
1496
1497         Unreviewed, build fix for Symbian.
1498
1499         [Symbian] Build fix after r58598. 
1500
1501         Use C99 integer types for the Symbian plugin
1502         implementation.
1503
1504         No new tests, as there is no new functionality.
1505
1506         * plugins/symbian/PluginPackageSymbian.cpp:
1507         (WebCore::PluginPackage::NPVersion):
1508         * plugins/symbian/PluginViewSymbian.cpp:
1509         (WebCore::PluginView::handlePostReadFile):
1510
1511 2010-05-04  Nikolas Zimmermann  <nzimmermann@rim.com>
1512
1513         Reviewed by Dirk Schulze.
1514
1515         Split SVGCharacterLayoutInfo in smaller pieces
1516         https://bugs.webkit.org/show_bug.cgi?id=38513
1517
1518         Split SVGCharacterLayoutInfo into SVGCharacterLayoutInfo/SVGCharacterData and SVGTextChunkLayoutInfo.
1519         This is a preparation for more work in the text area.
1520
1521         * Android.mk: Add SVGCharacterData.(cpp|h) and SVGTextChunkLayoutInfo.h to build.
1522         * GNUmakefile.am: Ditto.
1523         * WebCore.gypi: Ditto.
1524         * WebCore.pro: Ditto
1525         * WebCore.vcproj/WebCore.vcproj: Ditto.
1526         * WebCore.xcodeproj/project.pbxproj: Ditto.
1527         * rendering/SVGCharacterData.cpp: Copied from rendering/SVGCharacterLayoutInfo.cpp.
1528         * rendering/SVGCharacterData.h: Copied from rendering/SVGCharacterLayoutInfo.h.
1529         (WebCore::SVGChar::SVGChar):
1530         * rendering/SVGCharacterLayoutInfo.cpp:
1531         (WebCore::SVGCharacterLayoutInfo::isInitialLayout): Introduced new helper function to share code between addLayoutInformation/addStackContent.
1532         (WebCore::SVGCharacterLayoutInfo::addLayoutInformation): Use new helper function.
1533         (WebCore::SVGCharacterLayoutInfo::addStackContent): Ditto
1534         * rendering/SVGCharacterLayoutInfo.h:
1535         * rendering/SVGRootInlineBox.h: Include new files.
1536         * rendering/SVGTextChunkLayoutInfo.h: Copied from rendering/SVGCharacterLayoutInfo.h.
1537
1538 2010-05-04  Xan Lopez  <xlopez@igalia.com>
1539
1540         Reviewed by Holger Freyther.
1541
1542         [GTK] GObject DOM bindings
1543         https://bugs.webkit.org/show_bug.cgi?id=33590
1544
1545         Use helper functions from CodeGenerator.pm to figure out whether a
1546         type is "fundamental" or not (basically whether it's anything
1547         other than a string or a non-pointer type).
1548
1549         * bindings/scripts/CodeGeneratorGObject.pm:
1550
1551 2010-04-30  Alexander Pavlov  <apavlov@chromium.org>
1552
1553         Reviewed by Yury Semikhatsky.
1554
1555         Web Inspector: REGRESSION: Disabled style properties are absent in Styles sidebar after WebInspector is re-opened
1556         https://bugs.webkit.org/show_bug.cgi?id=38255
1557
1558         Moved stylesheet-related mappings into a separate object stored
1559         in InspectorController rather than InspectorDOMAgent (which gets reset
1560         on every frontend [dis]connect).
1561
1562         * GNUmakefile.am:
1563         * WebCore.gypi:
1564         * WebCore.pro:
1565         * WebCore.vcproj/WebCore.vcproj:
1566         * WebCore.xcodeproj/project.pbxproj:
1567         * inspector/InspectorCSSStore.cpp: Added.
1568         (WebCore::InspectorCSSStore::InspectorCSSStore):
1569         (WebCore::InspectorCSSStore::~InspectorCSSStore):
1570         (WebCore::InspectorCSSStore::reset):
1571         * inspector/InspectorCSSStore.h: Added.
1572         * inspector/InspectorController.cpp:
1573         (WebCore::InspectorController::InspectorController):
1574         (WebCore::InspectorController::setFrontend):
1575         (WebCore::InspectorController::didCommitLoad):
1576         * inspector/InspectorController.h:
1577         * inspector/InspectorDOMAgent.cpp:
1578         (WebCore::InspectorDOMAgent::InspectorDOMAgent):
1579         (WebCore::InspectorDOMAgent::discardBindings):
1580         (WebCore::InspectorDOMAgent::applyStyleText):
1581         (WebCore::InspectorDOMAgent::setStyleText):
1582         (WebCore::InspectorDOMAgent::setStyleProperty):
1583         (WebCore::InspectorDOMAgent::toggleStyleEnabled):
1584         (WebCore::InspectorDOMAgent::setRuleSelector):
1585         (WebCore::InspectorDOMAgent::addRule):
1586         (WebCore::InspectorDOMAgent::bindStyle):
1587         (WebCore::InspectorDOMAgent::bindRule):
1588         (WebCore::InspectorDOMAgent::buildObjectForStyle):
1589         (WebCore::InspectorDOMAgent::buildObjectForRule):
1590         * inspector/InspectorDOMAgent.h:
1591         (WebCore::InspectorDOMAgent::create):
1592         (WebCore::InspectorDOMAgent::cssStore):
1593
1594 2010-05-04  Mikhail Naganov  <mnaganov@chromium.org>
1595
1596         Reviewed by Pavel Feldman.
1597
1598         Display "Recording..." item when recording an user-initiated CPU profile.
1599
1600         https://bugs.webkit.org/show_bug.cgi?id=38043
1601
1602         * English.lproj/localizedStrings.js:
1603         * inspector/front-end/ProfilesPanel.js:
1604         (WebInspector.ProfilesPanel.prototype.addProfileHeader):
1605         (WebInspector.ProfilesPanel.prototype.removeProfileHeader):
1606         (WebInspector.ProfilesPanel.prototype.showProfile):
1607         * inspector/front-end/inspector.js:
1608         (WebInspector.setRecordingProfile):
1609
1610 2010-05-04  Tucker Jay  <jay.tucker@nokia.com>
1611
1612         Reviewed by Holger Freyther.
1613
1614         Animated GIF images does not animate 10x as expected by default.
1615         https://bugs.webkit.org/show_bug.cgi?id=36818
1616
1617         Added test case to existing manual test to test the
1618         fixed functionality.
1619
1620         * manual-tests/qt/qt-10loop-anim.gif: Added.
1621         * manual-tests/qt/qt-gif-test.html:
1622         * platform/graphics/qt/ImageDecoderQt.cpp:
1623         (WebCore::ImageDecoderQt::repetitionCount):
1624
1625 2010-05-04  Dirk Schulze  <krit@webkit.org>
1626
1627         Unreviewed sort of XCodes project file.
1628
1629         * WebCore.xcodeproj/project.pbxproj:
1630
1631 2010-05-03  Steven Lai  <steven_lai@asia.apple.com>
1632
1633         Reviewed by Brady Eidson.
1634
1635         Reverted hashchange() event back to async.
1636         (This change does not update HashChangeEvent to its new proposed interface)
1637         https://bugs.webkit.org/show_bug.cgi?id=36201
1638         rdar://problem/7780794
1639         rdar://problem/7761278 (partial fix)
1640
1641         Tests: fast/loader/hashchange-event-async.html
1642
1643         * dom/Document.cpp: reverted hashchange() event back to async
1644         (WebCore::Document::enqueueHashchangeEvent):
1645
1646 2010-05-03  Holger Hans Peter Freyther  <zecke@selfish.org>
1647
1648         Rubber-stamped by Xan Lopez.
1649
1650         [Cairo,WX] Stop leaking a FontPlatformData.
1651         https://bugs.webkit.org/show_bug.cgi?id=37500
1652
1653         Stephan Aßmus pointed out that the pango font backend
1654         is leaking memory and fixed it. The WX font backend
1655         and the Cairo/Fontconfig backend have the same snippet
1656         of code and are leaking memory as well. This commit is
1657         fixing that.
1658
1659         * platform/graphics/cairo/SimpleFontDataCairo.cpp:
1660         (WebCore::SimpleFontData::smallCapsFontData):
1661         * platform/graphics/wx/SimpleFontDataWx.cpp:
1662         (WebCore::SimpleFontData::smallCapsFontData):
1663
1664 2010-05-03  James Robinson  <jamesr@chromium.org>
1665
1666         Reviewed by Eric Seidel.
1667
1668         Clean up a few compiler warnings
1669         https://bugs.webkit.org/show_bug.cgi?id=38073
1670
1671         * html/TextMetrics.h:
1672         (WebCore::TextMetrics::width):
1673         * rendering/style/StyleRareInheritedData.h:
1674         * rendering/style/StyleRareNonInheritedData.h:
1675
1676 2010-05-02  Dumitru Daniliuc  <dumi@chromium.org>
1677
1678         Reviewed by Adam Barth.
1679
1680         Add the ability to auto-generate callbacks to all code generators.
1681         https://bugs.webkit.org/show_bug.cgi?id=38414
1682
1683         * bindings/scripts/CodeGeneratorJS.pm:
1684         * bindings/scripts/CodeGeneratorV8.pm:
1685         * bindings/scripts/test/JS/JSTestCallback.cpp: Added.
1686         (WebCore::JSTestCallback::JSTestCallback):
1687         (WebCore::JSTestCallback::~JSTestCallback):
1688         (WebCore::JSTestCallback::callbackWithClass1Param):
1689         (WebCore::JSTestCallback::callbackWithClass2Param):
1690         * bindings/scripts/test/JS/JSTestCallback.h: Added.
1691         (WebCore::JSTestCallback::create):
1692         * bindings/scripts/test/V8/JSTestCallback.cpp: Added.
1693         (WebCore::V8TestCallback::V8TestCallback):
1694         (WebCore::V8TestCallback::~V8TestCallback):
1695         (WebCore::V8TestCallback::callbackWithClass1Param):
1696         (WebCore::V8TestCallback::callbackWithClass2Param):
1697         * bindings/scripts/test/V8/V8TestCallback.h: Added.
1698         (WebCore::V8TestCallback::create):
1699         * bindings/scripts/test/TestCallback.idl: Added.
1700
1701 2010-05-03  Kevin Watters  <kevinwatters@gmail.com>
1702
1703         Reviewed by Kevin Ollivier.
1704
1705         [wx] Build and use Mac's ComplexTextController to support complex text in wx.
1706         https://bugs.webkit.org/show_bug.cgi?id=38482
1707
1708         * platform/graphics/FloatSize.h:
1709         * platform/graphics/GlyphBuffer.h:
1710         (WebCore::GlyphBuffer::advanceAt):
1711         (WebCore::GlyphBuffer::add):
1712         * platform/graphics/SimpleFontData.h:
1713         (WebCore::SimpleFontData::getNSFont):
1714         * platform/graphics/mac/ComplexTextController.cpp:
1715         * platform/graphics/mac/ComplexTextController.h:
1716         * platform/graphics/wx/FontCacheWx.cpp:
1717         (WebCore::FontCache::getFontDataForCharacters):
1718         (WebCore::FontCache::getLastResortFallbackFont):
1719         * platform/graphics/wx/FontPlatformData.h:
1720         (toCTFontRef):
1721         (WebCore::FontPlatformData::FontPlatformData):
1722         (WebCore::FontPlatformData::allowsLigatures):
1723         * platform/graphics/wx/FontPlatformDataWx.cpp:
1724         (WebCore::FontPlatformData::FontPlatformData):
1725         (WebCore::FontPlatformData::cgFont):
1726         * platform/graphics/wx/FontPlatformDataWxMac.mm: Added.
1727         (WebCore::FontPlatformData::nsFont):
1728         (WebCore::FontPlatformData::cacheNSFont):
1729         * platform/graphics/wx/FontWx.cpp:
1730         (WebCore::Font::canReturnFallbackFontsForComplexText):
1731         (WebCore::Font::selectionRectForComplexText):
1732         (WebCore::Font::drawComplexText):
1733         (WebCore::Font::floatWidthForComplexText):
1734         (WebCore::Font::offsetForPositionForComplexText):
1735         * platform/graphics/wx/SimpleFontDataWx.cpp:
1736         (WebCore::SimpleFontData::platformInit):
1737         (WebCore::SimpleFontData::containsCharacters):
1738         (WebCore::SimpleFontData::platformWidthForGlyph):
1739         * platform/wx/wxcode/fontprops.h:
1740         * platform/wx/wxcode/mac/carbon/fontprops.mm:
1741         (wxFontContainsCharacters):
1742         (GetTextExtent):
1743         * platform/wx/wxcode/mac/carbon/non-kerned-drawing.cpp:
1744         (WebCore::drawTextWithSpacing):
1745         * platform/wx/wxcode/win/fontprops.cpp:
1746         (wxFontContainsCharacters):
1747         * wscript:
1748
1749 2010-05-03  Abhishek Arya  <inferno@chromium.org>
1750
1751         Reviewed by Adam Barth.
1752
1753         Add support for controlling clipboard access from javascript.
1754         Clipboard access from javascript is disabled by default.
1755         https://bugs.webkit.org/show_bug.cgi?id=27751
1756
1757         Test: editing/execCommand/clipboard-access.html
1758
1759         * WebCore.base.exp:
1760         * editing/EditorCommand.cpp:
1761         (WebCore::supportedCopyCut):
1762         (WebCore::supportedPaste):
1763         (WebCore::createCommandMap):
1764         * page/Settings.cpp:
1765         (WebCore::Settings::Settings):
1766         (WebCore::Settings::setJavaScriptCanAccessClipboard):
1767         * page/Settings.h:
1768         (WebCore::Settings::javaScriptCanAccessClipboard):
1769
1770 2010-05-03  Alexey Proskuryakov  <ap@apple.com>
1771
1772         Reviewed by Adam Barth.
1773
1774         https://bugs.webkit.org/show_bug.cgi?id=38285
1775         <rdar://problem/7903453> REGRESSION: Javascript command window.open does not work in empty tab
1776
1777         Cannot be tested, because new windows created in DRT always have an opener, and thus inherit
1778         its security origin. Only new windows and tabs created by browser chrome had this problem.
1779
1780         * loader/FrameLoader.cpp: (WebCore::FrameLoader::init): Moved updateSandboxFlags() call to
1781         the beginning, so that an initial document would get correct flags.
1782
1783 2010-05-03  Noam Rosenthal  <noam.rosenthal@nokia.com>
1784
1785         Reviewed by Darin Adler.
1786
1787         WebGL compile issue.
1788         Added ExceptionCode.h to JSWebGLArrayBufferConstructor.cpp, for some reason it was missing.
1789         https://bugs.webkit.org/show_bug.cgi?id=38453
1790
1791         No new tests: compile fix.
1792
1793         * bindings/js/JSWebGLArrayBufferConstructor.cpp:
1794
1795 2010-05-03  Eric Seidel  <eric@webkit.org>
1796
1797         Unreviewed, rolling out r58685.
1798         http://trac.webkit.org/changeset/58685
1799         https://bugs.webkit.org/show_bug.cgi?id=38461
1800
1801         Broke a test on Gtk
1802
1803         * platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:
1804         (WebCore::MediaPlayerPrivateGStreamer::updateStates):
1805
1806 2010-05-03  Yael Aharon  <yael.aharon@nokia.com>
1807
1808         Reviewed by Darin Adler.
1809
1810         Use HTML5 number parsing in HTMLProgressElement
1811         https://bugs.webkit.org/show_bug.cgi?id=38434
1812
1813         Use parseToDoubleForNumberType instead of toDouble.
1814         Throw an exception when the number is NaN or Infinity.
1815
1816         * html/HTMLProgressElement.cpp:
1817         (WebCore::HTMLProgressElement::value):
1818         (WebCore::HTMLProgressElement::setValue):
1819         (WebCore::HTMLProgressElement::max):
1820         (WebCore::HTMLProgressElement::setMax):
1821         * html/HTMLProgressElement.h:
1822         * html/HTMLProgressElement.idl:
1823
1824 2010-05-03  Jens Alfke  <snej@chromium.org>
1825
1826         Reviewed by Darin Fisher.
1827
1828         [chromium] Add "willSendSubmitEvent" hook to WebFrameClient and FrameLoaderClient
1829         https://bugs.webkit.org/show_bug.cgi?id=38397
1830
1831         No tests (functionality is exposed only through native WebKit API.)
1832
1833         * html/HTMLFormElement.cpp:
1834         (WebCore::HTMLFormElement::prepareSubmit):  Call frame loader's dispatchWillSendSubmitEvent
1835         * loader/EmptyClients.h:
1836         * loader/FrameLoaderClient.h:
1837         (WebCore::FrameLoaderClient::dispatchWillSendSubmitEvent):  New empty method
1838
1839 2010-05-03  Philippe Normand  <pnormand@igalia.com>
1840
1841         Reviewed by Eric Carlson.
1842
1843         [GStreamer] forgotten call to durationChanged in updateStates()
1844         https://bugs.webkit.org/show_bug.cgi?id=38461
1845
1846         Notify MediaPlayer if duration is known after playback started.
1847
1848         * platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:
1849         (WebCore::MediaPlayerPrivateGStreamer::updateStates):
1850
1851 2010-05-03  Ryuan Choi  <ryuan.choi@gmail.com>
1852
1853         Reviewed by Darin Adler.
1854
1855         fixing build break due to clearWatch() when Geolocation feature is
1856         disabled.
1857
1858         https://bugs.webkit.org/show_bug.cgi?id=38091
1859
1860         no test because this is a build fix only
1861
1862         * page/Geolocation.cpp:
1863         (WebCore::Geolocation::clearWatch):
1864
1865 2010-05-03  Stephan Aßmus  <superstippi@gmx.de>
1866
1867         Reviewed by Holger Freyther.
1868
1869         [Gtk] Fix leaking the FontPlatformData instance used to create the the
1870         small caps font data.
1871         https://bugs.webkit.org/show_bug.cgi?id=37500
1872
1873         No new tests needed.
1874
1875         * platform/graphics/gtk/SimpleFontDataPango.cpp:
1876         (WebCore::SimpleFontData::smallCapsFontData):
1877             - Use a stack allocated FontPlatformData instead of a heap allocated
1878               one that is never freed.
1879
1880 2010-05-03  Jarkko Sakkinen  <jarkko.j.sakkinen@gmail.com>
1881
1882         Reviewed by Simon Hausmann.
1883
1884         [Qt] GraphicsLayer: support webGL
1885         https://bugs.webkit.org/show_bug.cgi?id=35388
1886
1887         Added support GraphicsContext3D to GraphicsLayer.
1888         Added paint method to GraphicsContext3D for Qt platform that
1889         uses drawTexture() when QGLWidget is used as viewport of
1890         QGraphicsWebView.
1891         Fine-tuned texture and handling and image to texture conversion to
1892         work also when drawTexture() blitting is used.
1893
1894         * platform/graphics/GraphicsContext3D.h:
1895         * platform/graphics/qt/GraphicsContext3DQt.cpp:
1896         (WebCore::GraphicsContext3DInternal::GraphicsContext3DInternal):
1897         (WebCore::GraphicsContext3D::beginPaint):
1898         (WebCore::GraphicsContext3D::paint):
1899         (WebCore::GraphicsContext3D::texImage2D):
1900         (WebCore::GraphicsContext3D::texSubImage2D):
1901         (WebCore::GraphicsContext3D::getImageData):
1902         * platform/graphics/qt/GraphicsLayerQt.cpp:
1903         (WebCore::GraphicsLayerQtImpl::):
1904         (WebCore::GraphicsLayerQtImpl::GraphicsLayerQtImpl):
1905         (WebCore::GraphicsLayerQtImpl::paint):
1906         (WebCore::GraphicsLayerQtImpl::flushChanges):
1907         (WebCore::GraphicsLayerQt::setContentsToGraphicsContext3D):
1908         (WebCore::GraphicsLayerQt::setGraphicsContext3DNeedsDisplay):
1909         * platform/graphics/qt/GraphicsLayerQt.h:
1910
1911 2010-05-03  Janne Koskinen  <janne.p.koskinen@digia.com>
1912
1913         Reviewed by Simon Hausmann.
1914
1915         [Qt] Fix qtlibraryinfix not to contain space
1916
1917         List catenation with += adds whitespace cutting the infix
1918         from the final target.
1919
1920         * WebCore.pro:
1921
1922 2010-05-03  Tor Arne Vestbø  <tor.arne.vestbo@nokia.com>
1923
1924         Reviewed by Simon Hausmann.
1925
1926         [Qt] Fix rendering of <button> elements on Mac OS X
1927
1928         The <button> element has ButtonPart appearance, not PushButton part,
1929         so we have to include ButtonPart when we decide if we should draw the
1930         button as raised on Mac OS X.
1931
1932         https://bugs.webkit.org/show_bug.cgi?id=38458
1933
1934         * platform/qt/RenderThemeQt.cpp:
1935         (WebCore::RenderThemeQt::initializeCommonQStyleOptions):
1936
1937 2010-04-30  Philippe Normand  <pnormand@igalia.com>
1938
1939         Reviewed by Eric Seidel.
1940
1941         [GStreamer] endless loop after playback ended
1942         https://bugs.webkit.org/show_bug.cgi?id=38384
1943
1944         At playback end ensure duration() will return a valid duration if
1945         we managed to calculate it based on current position.
1946
1947         Test: media/video-duration-known-after-eos.html
1948
1949         * platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:
1950         (WebCore::MediaPlayerPrivateGStreamer::didEnd):
1951
1952 2010-05-03  Tor Arne Vestbø  <tor.arne.vestbo@nokia.com>
1953
1954         [Qt] Fix build break on Mac OS X
1955
1956         * plugins/mac/PluginPackageMac.cpp: Use correct type
1957         * WebCore.pro: Remove duplicate symbol, we now have a Qt implementation
1958
1959 2010-05-03  Thomas Zander <t.zander@nokia.com>
1960
1961         Reviewed by Simon Hausmann.
1962
1963         [Qt] Fix library infix usage when compiling inside of Qt
1964
1965         Don't apply the infix when building inside Qt, as that's done through the
1966         inclusion of qbase.pri.
1967
1968         * WebCore.pro:
1969
1970 2010-05-02  Dan Bernstein  <mitz@apple.com>
1971
1972         Reviewed by Simon Fraser.
1973
1974         Another case of <rdar://problem/7552959> REGRESSION: Infinite recursion in Position::getInlineBoxAndOffset()
1975         https://bugs.webkit.org/show_bug.cgi?id=38445
1976
1977         Test: editing/selection/mixed-editability-11.html
1978
1979         * dom/Position.cpp:
1980         (WebCore::downstreamIgnoringEditingBoundaries): Added. Returns the furthest visually equivalent
1981         position downstream, crossing any editability boundaries.
1982         (WebCore::upstreamIgnoringEditingBoundaries): Similarly for upstream.
1983         (WebCore::Position::getInlineBoxAndOffset): Changed the logic for finding an inline box for positions
1984         whose node is a block flow. Instead of traversing the DOM, advance downstream or upstream as far as
1985         possible, crossing any editability boudaries. Infinite recursion is avoided by advancing all the way
1986         and checking that the new position is different from the starting position. Also replaced the specific
1987         test for buttons with the generic and more comprehensive canHaveChildrenForEditing().
1988
1989 2010-05-02  Tasuku Suzuki  <tasuku.suzuki@nokia.com>
1990
1991         Reviewed by Simon Hausmann.
1992
1993         [Qt] Fix compilation with QT_NO_BEARERMANAGEMENT
1994         https://bugs.webkit.org/show_bug.cgi?id=38324
1995
1996         * platform/network/NetworkStateNotifier.h:
1997         * platform/network/qt/NetworkStateNotifierQt.cpp:
1998
1999 2010-04-29  Janne Koskinen  <janne.p.koskinen@digia.com>
2000
2001         Reviewed by Simon Hausmann.
2002
2003         [Qt] QtWebKit versioning added
2004         https://bugs.webkit.org/show_bug.cgi?id=37207
2005
2006         QtWebkit releases separated from Qt release cycle.
2007
2008         * WebCore.pro:
2009
2010 2010-05-02  Joseph Pecoraro  <joepeck@webkit.org>
2011
2012         Reviewed by Timothy Hatcher.
2013
2014         Web Inspector: Old Style trimWhitespace() should be trim()
2015         https://bugs.webkit.org/show_bug.cgi?id=38441
2016
2017         * inspector/front-end/SourceFrame.js:
2018         (WebInspector.SourceFrame.prototype._evalSelectionInCallFrame):
2019
2020 2010-05-02  Tasuku Suzuki  <tasuku.suzuki@nokia.com>
2021
2022         Reviewed by Simon Hausmann.
2023
2024         [Qt] Fix compilation with QT_NO_LINEEDIT
2025         https://bugs.webkit.org/show_bug.cgi?id=38324
2026
2027         * platform/qt/RenderThemeQt.cpp:
2028         (WebCore::RenderThemeQt::~RenderThemeQt):
2029         (WebCore::RenderThemeQt::findFrameLineWidth):
2030
2031 2010-05-02  Pavel Feldman  <pfeldman@chromium.org>
2032
2033         Not reviewed: Touch inspector controller to kick windows tests.
2034
2035         * inspector/InspectorController.cpp:
2036
2037 2010-05-02  Pavel Feldman  <pfeldman@chromium.org>
2038
2039         Reviewed by Timothy Hatcher.
2040
2041         Web Inspector: IMG nodes are being added to the DOM tree late, sometimes hiding the revealed element.
2042
2043         https://bugs.webkit.org/show_bug.cgi?id=38432
2044
2045         * inspector/front-end/ElementsTreeOutline.js:
2046         (WebInspector.ElementsTreeOutline.prototype._onmousemove):
2047         (WebInspector.ElementsTreeElement.prototype._createTooltipForNode.setTooltip):
2048         (WebInspector.ElementsTreeElement.prototype._createTooltipForNode):
2049         (WebInspector.ElementsTreeElement.prototype.updateTitle):
2050         (WebInspector.ElementsTreeElement.prototype._attributeHTML):
2051         ():
2052
2053 2010-05-02  Dirk Schulze  <krit@webkit.org>
2054
2055         Reviewed by Nikolas Zimmermann.
2056
2057         SVG hkern implementation incomplete
2058         https://bugs.webkit.org/show_bug.cgi?id=38407
2059
2060         Test: svg/text/text-hkern.svg
2061
2062         The current SVG hkern implementation is incomplete and partly wrong. We pass the ACID3 test
2063         by accident.
2064         The new implementation supports all glyph and unicode combinations that are allowed by the Spec
2065         and fixes various of bugs. The parser moved from SVGFontElement to the general parsing code in
2066         SVGParserUtilities.
2067         Some clean-up makes the code more readable and reuseable for the upcoming vkern implementation.
2068         hkern support for text on path is missing and will be added by a following patch.
2069         Unicode strings of hkern elements are just parsed once and not on every glyph again anymore.
2070
2071         * rendering/SVGRootInlineBox.cpp:
2072         (WebCore::calculateCSSKerning):
2073         (WebCore::applySVGKerning):
2074         (WebCore::SVGRootInlineBox::buildLayoutInformationForTextBox):
2075         * svg/SVGFontElement.cpp:
2076         (WebCore::stringMatchesUnicodeRange):
2077         (WebCore::stringMatchesGlyphName):
2078         (WebCore::matches):
2079         (WebCore::SVGFontElement::getHorizontalKerningPairForStringsAndGlyphs):
2080         * svg/SVGFontElement.h:
2081         * svg/SVGHKernElement.cpp:
2082         (WebCore::SVGHKernElement::buildHorizontalKerningPair):
2083         * svg/SVGHKernElement.h:
2084         * svg/SVGParserUtilities.cpp:
2085         (WebCore::parseGlyphName):
2086         (WebCore::parseUnicodeRange):
2087         (WebCore::parseKerningUnicodeString):
2088         * svg/SVGParserUtilities.h:
2089
2090 2010-05-02  Pavel Feldman  <pfeldman@chromium.org>
2091
2092         Reviewed by Timothy Hatcher.
2093
2094         Web Inspector: debugger shortcuts are processed twice if source frame has focus.
2095
2096         https://bugs.webkit.org/show_bug.cgi?id=38431
2097
2098         * inspector/front-end/SourceFrame.js:
2099         (WebInspector.SourceFrame):
2100         (WebInspector.SourceFrame.prototype._createViewerIfNeeded):
2101
2102 2010-05-02  Jarkko Sakkinen  <jarkko.j.sakkinen@gmail.com>
2103
2104         Reviewed by Eric Seidel.
2105
2106         [Qt] Build error in GraphicsContext3DQt.cpp
2107         https://bugs.webkit.org/show_bug.cgi?id=38382
2108
2109         Removed duplicate implementation of isGLES2Compliant from
2110         GraphicsContext3DQt.cpp. Removed deprecated API stuff for
2111         texImage2D/texSubImage2D.
2112         * platform/graphics/qt/GraphicsContext3DQt.cpp:
2113
2114 2010-05-02  Garret Kelly  <gdk@chromium.org>
2115
2116         Reviewed by David Levin.
2117
2118         Make the Touch RuntimeEnabledFeature disabled by default.
2119         https://bugs.webkit.org/show_bug.cgi?id=38392
2120
2121         * bindings/generic/RuntimeEnabledFeatures.cpp: Disable the Touch feature by default.
2122
2123 2010-05-02  Michael Nordman  <michaeln@google.com>
2124
2125         Reviewed by Dmitry Titov.
2126
2127         Define two new ResourceRequestBase TargetTypes for worker and shared worker
2128         main resources. Use the new target types where appropiate. Add logic to marshal
2129         the target type specified by requests initiated on a background worker thread.
2130
2131         https://bugs.webkit.org/show_bug.cgi?id=38295
2132
2133         No new tests. This doesn't have script visible artifacts.
2134
2135         * platform/network/ResourceRequestBase.cpp: marshal the values
2136         (WebCore::ResourceRequestBase::adopt):
2137         (WebCore::ResourceRequestBase::copyData):
2138         * platform/network/ResourceRequestBase.h:  define the types
2139         (WebCore::ResourceRequestBase::):
2140         * workers/DefaultSharedWorkerRepository.cpp: use TargetIsSharedWorker
2141         (WebCore::SharedWorkerScriptLoader::load):
2142         * workers/Worker.cpp: use TargetIsWorker
2143         (WebCore::Worker::Worker):
2144         * workers/WorkerContext.cpp: use TargetIsScript for importScripts
2145         (WebCore::WorkerContext::importScripts):
2146         * workers/WorkerScriptLoader.cpp: add a data member for the target type
2147         (WebCore::WorkerScriptLoader::WorkerScriptLoader):
2148         (WebCore::WorkerScriptLoader::createResourceRequest):
2149         * workers/WorkerScriptLoader.h:
2150
2151 2010-05-02  Noam Rosenthal  <noam.rosenthal@nokia.com>
2152
2153         Reviewed by Adele Peterson.
2154
2155         Webkit doesn't compile with 3D-canvas enabled and video disabled
2156         https://bugs.webkit.org/show_bug.cgi?id=38297
2157
2158         Added a #ifdef ENABLE(VIDEO) to WebGL code
2159
2160         No new tests: compile fix.
2161
2162         * bindings/js/JSWebGLRenderingContextCustom.cpp:
2163         (WebCore::JSWebGLRenderingContext::texImage2D):
2164         (WebCore::JSWebGLRenderingContext::texSubImage2D):
2165
2166 2010-05-01  Evan Stade  <estade@chromium.org>
2167
2168         Reviewed by David Levin.
2169
2170         [chromium] Skia needs to fade DragImages
2171         https://bugs.webkit.org/show_bug.cgi?id=38008
2172
2173         tested by DragImageTest
2174
2175         * platform/chromium/DragImageChromiumSkia.cpp:
2176         (WebCore::dissolveDragImageToFraction):implement
2177         (WebCore::createDragImageFromImage):deep copy instead of shallow
2178
2179 2010-05-01  Maciej Stachowiak  <mjs@apple.com>
2180
2181         Reviewed by Sam Weinig.
2182
2183         REGRESSION (r58273): Visited links do not change color immediately when Cmd-clicked
2184         https://bugs.webkit.org/show_bug.cgi?id=38422
2185         <rdar://problem/7921778>
2186
2187         Tests:
2188             manual-tests/visited-link-new-window.html
2189
2190         * css/CSSStyleSelector.cpp:
2191         (WebCore::CSSStyleSelector::initElement): Only cache the visited link state
2192         when invoked as part of a helper call to styleForElement or pseudoStyleForElement,
2193         to avoid caching the visited link state beyond the scope of a single style lookup.
2194         (WebCore::CSSStyleSelector::styleForElement): Adjust for above change.
2195         (WebCore::CSSStyleSelector::pseudoStyleForElement): Adjust for above change.
2196         * css/CSSStyleSelector.h:
2197         (WebCore::CSSStyleSelector::styleForElement): Change so "visited link helper mode"
2198         can't accidentally be called from outside CSSStyleSelector itself.
2199         (WebCore::CSSStyleSelector::pseudoStyleForElement): ditto
2200         * manual-tests/visited-link-new-window.html: Added. I could not figure out any way
2201         to make an automated test that supports visited link coloring.
2202
2203 2010-05-01  Yael Aharon  <yael.aharon@nokia.com>
2204
2205         Reviewed by Darin Adler.
2206
2207         Move number parsing code out of HTMLInputElement.
2208         https://bugs.webkit.org/show_bug.cgi?id=38203
2209
2210         The numebr parsing code follows HTML5 parsing rules and should be available outside of HTMLInputElement.
2211         No new tests as no new functionality was introduced.
2212
2213         * html/HTMLInputElement.cpp:
2214         * html/HTMLInputElement.h:
2215         * html/HTMLParser.cpp:
2216         (WebCore::serializeForNumberType):
2217         (WebCore::parseToDoubleForNumberType):
2218         * html/HTMLParser.h:
2219         * html/StepRange.cpp:
2220         (WebCore::StepRange::clampValue):
2221         (WebCore::StepRange::valueFromElement):
2222         * html/ValidityState.cpp:
2223         (WebCore::ValidityState::typeMismatch):
2224         * rendering/RenderSlider.cpp:
2225         (WebCore::RenderSlider::setValueForPosition):
2226
2227 2010-05-01  Xan Lopez  <xlopez@igalia.com>
2228
2229         Reviewed by Oliver Hunt.
2230
2231         [GTK] GObject DOM bindings
2232         https://bugs.webkit.org/show_bug.cgi?id=33590
2233
2234         Unify more logic to skip functions into SkipFunction, and
2235         whitelist the two [Custom] methods in HTMLCollection.idl.
2236
2237         * bindings/scripts/CodeGeneratorGObject.pm:
2238
2239 2010-05-01  Robert Hogan  <robert@webkit.org>
2240
2241         Reviewed by Simon Hausmann.
2242
2243         [Qt] Add smart paste support
2244
2245         https://bugs.webkit.org/show_bug.cgi?id=38136
2246
2247         * WebCore.pro:
2248         * editing/qt/SmartReplaceQt.cpp: Added.
2249         (WebCore::isCharacterSmartReplaceExempt):
2250         * platform/qt/PasteboardQt.cpp:
2251         (WebCore::Pasteboard::writeSelection):
2252         (WebCore::Pasteboard::canSmartReplace):
2253
2254 2010-04-30  Yoshiki Hayashi  <yhayashi@google.com>
2255
2256         Reviewed by Shinichiro Hamaji.
2257
2258         https://bugs.webkit.org/show_bug.cgi?id=38249
2259         
2260         Fixes an issue where border height and padding height are ignored when computing vertically shrinking flexbox's height.
2261
2262         Test: fast/flexbox/child-flexing.html
2263
2264         * rendering/RenderFlexibleBox.cpp:
2265         (WebCore::RenderFlexibleBox::allowedChildFlex):
2266
2267 2010-04-30  Shinichiro Hamaji  <hamaji@chromium.org>
2268
2269         Reviewed by Darin Adler.
2270
2271         Add layoutTestController.setPrinting()
2272         https://bugs.webkit.org/show_bug.cgi?id=37203
2273
2274         Use the renderer's width insteead of screen's width as the width of
2275         a screen depends on machines.
2276
2277         * rendering/RenderTreeAsText.cpp:
2278         (WebCore::externalRepresentation):
2279
2280 2010-04-30  Joseph Pecoraro  <joepeck@webkit.org>
2281
2282         Reviewed by Timothy Hatcher.
2283
2284         Web Inspector: Missing INSPECTOR Guard in Console::lastWMLErrorMessage
2285         https://bugs.webkit.org/show_bug.cgi?id=38366
2286
2287         Console::lastWMLErrorMessage is only available if WML is enabled, however
2288         its implementation only makes sense as long as INSPECTOR is enabled
2289         as well. So this adds the ENABLE(INSPECTOR) guard in the function. A
2290         browser without ENABLE(INSPECTOR) will always get an empty result.
2291
2292         * page/Console.cpp:
2293
2294 2010-04-28  Joseph Pecoraro  <joepeck@webkit.org>
2295
2296         Reviewed by Oliver Hunt.
2297
2298         REGRESSION(r58313): Regression evident in pixel tests: the search icon is always clipped at the bottom.
2299         https://bugs.webkit.org/show_bug.cgi?id=38253
2300
2301         Test: fast/css/input-search-padding.html
2302
2303         An <input type="search"> contains an inner block, which is explicitly
2304         centered in RenderTextControlSingleLine based on the height of the element.
2305         However, the clipping rect was not using the set location, and instead
2306         calculated off of the top border and padding alone. This also vertically
2307         centers the Caps Lock indicator.
2308
2309         * rendering/RenderTextControl.cpp: moved controlClipRect implementation to RenderTextControlSingleLine
2310         * rendering/RenderTextControl.h: allow a subclass implementation of controlClipRect, removed redundant hasControlClip implementation, and moved controlClipRect
2311         * rendering/RenderTextControlSingleLine.cpp:
2312         (WebCore::RenderTextControlSingleLine::paint): vertically center the Caps Lock indicator
2313         (WebCore::RenderTextControlSingleLine::controlClipRect): use the set location of the anonymous inner block instead
2314         * rendering/RenderTextControlSingleLine.h: allow for an implementation of controlClipRect for <input type="search">
2315
2316 2010-04-30  Jon Honeycutt  <jhoneycutt@apple.com>
2317
2318         Caret may fail to blink if a focus handler brings up a modal dialog 
2319         https://bugs.webkit.org/show_bug.cgi?id=38372
2320
2321         Reviewed by Darin Adler.
2322
2323         * manual-tests/onfocus-alert-blinking-caret.html: Added.
2324
2325         * page/EventHandler.cpp:
2326         (WebCore::EventHandler::handleMousePressEvent):
2327         Moved the call to setCaretBlinkingSuspended() from here...
2328         (WebCore::EventHandler::handleMousePressEvent):
2329         ... to here. This makes us suspend caret blinking before dispatching the
2330         mouse down event. If dispatching the mouse down event allows the message
2331         loop to run, we want mouse up events received in that message loop to be
2332         able to resume caret blinking.
2333         (WebCore::EventHandler::lostMouseCapture):
2334         We've lost mouse capture and won't be notified of mouse up events;
2335         resume caret blinking.
2336
2337         * page/EventHandler.h:
2338         Declare lostMouseCapture().
2339
2340 2010-04-30  Dimitri Glazkov  <dglazkov@chromium.org>
2341
2342         Unreviewed, build fix.
2343
2344         [Chromium] Added a simple IdentifierRep struct and removed dependency on
2345         IdentifierRep.h.
2346
2347         * bindings/v8/V8NPObject.cpp: Added simple IdentifierRep struct.
2348
2349 2010-04-30  Dimitri Glazkov  <dglazkov@chromium.org>
2350
2351         Unreviewed, build fix.
2352
2353         [Chromium] Remove bridge/ from include paths.
2354
2355         * WebCore.gyp/WebCore.gyp: Removed bridge/ from include path.
2356
2357 2010-04-30  Abhishek Arya  <inferno@chromium.org>
2358
2359         Reviewed by David Kilzer.
2360
2361         Convert m_documentUnderMouse, m_dragInitiator to RefPtr.
2362         Eliminated unused m_dragInitiator accessor to prevent dereferencing.
2363         https://bugs.webkit.org/show_bug.cgi?id=37618
2364
2365         Test: editing/pasteboard/drag-drop-iframe-refresh-crash.html
2366
2367         * page/DragController.cpp:
2368         (WebCore::DragController::tryDocumentDrag):
2369         (WebCore::DragController::concludeEditDrag):
2370         * page/DragController.h:
2371         (WebCore::DragController::draggingImageURL):
2372         (WebCore::DragController::documentUnderMouse):
2373
2374 2010-04-29  James Robinson  <jamesr@chromium.org>
2375
2376         Reviewed by Simon Fraser.
2377
2378         Calls FrameView::scrollPositionChanged whenever a ScrollView is scrolled
2379         https://bugs.webkit.org/show_bug.cgi?id=38286
2380
2381         When a ScrollView's  scroll position is changed, we have to call
2382         FrameView::scrollPositionChanged to generate repaint invalidation for
2383         fixed position elements.  This ends up getting called indirectly when
2384         the ScrollView has a platformWidget through the port layer
2385         (see WebHTMLView.mm's _frameOrBoundsChanged method for how the mac
2386         port does it) but not when there is no platformWidget.
2387
2388         This is tested by the fast/repaint/fixed-* tests when run in pixel
2389         mode.
2390
2391         Test: fast/repaint/fixed-move-after-keyboard-scroll.html
2392
2393         * page/FrameView.h:
2394         * platform/ScrollView.cpp:
2395         (WebCore::ScrollView::valueChanged):
2396         * platform/ScrollView.h:
2397         (WebCore::ScrollView::scrollPositionChanged):
2398
2399 2010-04-30  Anders Carlsson  <andersca@apple.com>
2400
2401         Reviewed by Darin Adler.
2402
2403         Use C99 integer types in more places.
2404
2405         * manual-tests/NPN_Invoke/main.c:
2406         (NPP_New):
2407         (NPP_NewStream):
2408         (NPP_WriteReady):
2409         (NPP_Write):
2410         (NPP_HandleEvent):
2411         (functionPointerForTVector):
2412         * plugins/mac/PluginViewMac.cpp:
2413         (WebCore::PluginView::platformGetValueStatic):
2414         (WebCore::PluginView::handlePostReadFile):
2415
2416 2010-04-30  Darin Adler  <darin@apple.com>
2417
2418         Reviewed by Oliver Hunt.
2419
2420         Remove unused scrollRectIntoViewRecursively function
2421         https://bugs.webkit.org/show_bug.cgi?id=38403
2422
2423         * page/Chrome.cpp:
2424         (WebCore::Chrome::scrollRectIntoView): Moved comment here that was previously
2425         in the scrollRectIntoViewRecursively function.
2426
2427         * platform/ScrollView.cpp: Get rid scrollRectIntoViewRecursively.
2428         * platform/ScrollView.h: Ditto. Fix comment that refers to the two functions.
2429         Also correct all uses of the term "method" to use the C++ term "function" and
2430         got rid of double spaces after periods.
2431
2432 2010-04-30  Anders Carlsson  <andersca@apple.com>
2433
2434         Another Qt build fix.
2435
2436         * plugins/qt/PluginViewQt.cpp:
2437         (WebCore::PluginView::platformGetValueStatic):
2438
2439 2010-04-30  Anders Carlsson  <andersca@apple.com>
2440
2441         Add back TRUE, FALSE and NULL macros. They were not meant to be removed!
2442
2443         * bridge/npapi.h:
2444
2445 2010-04-30  Anders Carlsson  <andersca@apple.com>
2446
2447         Try to fix the Qt build this time.
2448
2449         * plugins/qt/PluginPackageQt.cpp:
2450         (WebCore::staticPluginQuirkRequiresGtkToolKit_NPN_GetValue):
2451         (WebCore::PluginPackage::NPVersion):
2452
2453 2010-04-30  Anders Carlsson  <andersca@apple.com>
2454
2455         Yet another build fix.
2456
2457         * plugins/gtk/PluginPackageGtk.cpp:
2458         (WebCore::PluginPackage::NPVersion):
2459
2460 2010-04-30  Anders Carlsson  <andersca@apple.com>
2461
2462         Fix build.
2463
2464         * bridge/npapi.h:
2465
2466 2010-04-30  Jian Li  <jianli@chromium.org>
2467
2468         Reviewed by Darin Fisher.
2469
2470         [chromium] Add WebFileSystem interface and hook up with all FileSystem methods.
2471         https://bugs.webkit.org/show_bug.cgi?id=38228
2472
2473         * platform/chromium/ChromiumBridge.h:
2474         * platform/chromium/FileSystemChromium.cpp:
2475         (WebCore::openFile):
2476         (WebCore::closeFile):
2477         (WebCore::seekFile):
2478         (WebCore::truncateFile):
2479         (WebCore::readFromFile):
2480         (WebCore::writeToFile):
2481
2482 2010-04-30  Anders Carlsson  <andersca@apple.com>
2483
2484         Reviewed by Dan Bernstein.
2485
2486         Final part of 
2487         
2488         https://bugs.webkit.org/show_bug.cgi?id=20784
2489         move npapi.h to C99 integer types
2490
2491         * bridge/npapi.h:
2492         Remove the old types.
2493
2494 2010-04-30  Sheriff Bot  <webkit.review.bot@gmail.com>
2495
2496         Unreviewed, rolling out r58569.
2497         http://trac.webkit.org/changeset/58569
2498         https://bugs.webkit.org/show_bug.cgi?id=38399
2499
2500         This broke the GTK bots due to bad GC behavior (Requested by
2501         ericu on #webkit).
2502
2503         * bindings/js/JSWorkerContextCustom.cpp:
2504         * bindings/v8/custom/V8WorkerContextCustom.cpp:
2505         * storage/Database.idl:
2506         * storage/SQLError.idl:
2507         * storage/SQLResultSet.idl:
2508         * storage/SQLResultSetRowList.idl:
2509         * storage/SQLTransaction.idl:
2510         * workers/WorkerContext.cpp:
2511         (WebCore::WorkerContext::openDatabase):
2512         * workers/WorkerContext.h:
2513         (WebCore::WorkerContext::databaseExceededQuota):
2514         * workers/WorkerContext.idl:
2515
2516 2010-04-30  Anders Carlsson  <andersca@apple.com>
2517
2518         Fix GTK+ build.
2519
2520         * plugins/gtk/PluginViewGtk.cpp:
2521         (WebCore::PluginView::handlePostReadFile):
2522         (WebCore::PluginView::platformGetValueStatic):
2523
2524 2010-04-30  Anders Carlsson  <andersca@apple.com>
2525
2526         Fix Qt build.
2527
2528         * plugins/qt/PluginViewQt.cpp:
2529         (WebCore::PluginView::handlePostReadFile):
2530         (WebCore::PluginView::platformGetValue):
2531
2532 2010-04-30  Anders Carlsson  <andersca@apple.com>
2533
2534         Reviewed by Timothy Hatcher.
2535
2536         Next step towards fixing
2537         
2538         https://bugs.webkit.org/show_bug.cgi?id=20784
2539         move npapi.h to C99 integer types
2540
2541         Use the C99 types everywhere. The "old" types are still around but will be removed
2542         in a subsequent commit.
2543
2544         * bridge/npapi.h:
2545         (_NPCocoaEvent::):
2546         * plugins/PluginPackage.h:
2547         * plugins/PluginStream.cpp:
2548         (WebCore::PluginStream::deliverData):
2549         * plugins/PluginStream.h:
2550         * plugins/PluginView.cpp:
2551         (WebCore::PluginView::postURLNotify):
2552         (WebCore::PluginView::postURL):
2553         (WebCore::PluginView::write):
2554         (WebCore::PluginView::handlePost):
2555         * plugins/PluginView.h:
2556         * plugins/PluginViewNone.cpp:
2557         (WebCore::PluginView::handlePostReadFile):
2558         * plugins/npapi.cpp:
2559         (NPN_MemAlloc):
2560         (NPN_MemFlush):
2561         (NPN_PostURLNotify):
2562         (NPN_PostURL):
2563         (NPN_Write):
2564         * plugins/npfunctions.h:
2565         * plugins/win/PluginPackageWin.cpp:
2566         (WebCore::PluginPackage::NPVersion):
2567         * plugins/win/PluginViewWin.cpp:
2568         (WebCore::PluginView::handlePostReadFile):
2569
2570 2010-04-30  Peter Kasting  <pkasting@google.com>
2571
2572         Reviewed by David Levin.
2573
2574         Make all image decoders set the "failed" bit if an image could not be
2575         completely decoded, but no more data is coming.  The ICO and BMP
2576         decoders already did this.
2577         https://bugs.webkit.org/show_bug.cgi?id=35411
2578
2579         "Failed" does not cause the image to not be displayed, it simply causes
2580         us to not bother to try to decode again if future requests are made, and
2581         for some decoders, lets the decoder clean up some of its temporary
2582         objects.
2583
2584         No layout tests because this does not change the visible output of decoding in any way.
2585
2586         * platform/image-decoders/gif/GIFImageDecoder.cpp:
2587         (WebCore::GIFImageDecoder::frameComplete): Return whether the frame could be marked as complete.
2588         (WebCore::GIFImageDecoder::decode): Fail if read() needs more data (and thus returns false) and no more is coming.
2589         * platform/image-decoders/gif/GIFImageDecoder.h:
2590         * platform/image-decoders/gif/GIFImageReader.cpp:
2591         (GIFImageReader::do_lzw): Instead of returning true for buffer underrun and false for failure, return false for both and set the failure flag on failure.
2592         (GIFImageReader::read): Ditto.
2593         * platform/image-decoders/gif/GIFImageReader.h:
2594         * platform/image-decoders/jpeg/JPEGImageDecoder.cpp:
2595         (WebCore::):
2596         (WebCore::JPEGImageReader::decode): See do_lzw() comment above.
2597         (WebCore::JPEGImageDecoder::decode): Fail if decode() needs more data (and thus returns false) and no more is coming.
2598         * platform/image-decoders/jpeg/JPEGImageDecoder.h:
2599         * platform/image-decoders/png/PNGImageDecoder.cpp:
2600         (WebCore::PNGImageReader::decode): Return true for decode success, false for buffer underrun or decode failure, and set the failure flag on decode failure.
2601         (WebCore::PNGImageDecoder::decode): See JPEGImageDecoder::decode() comment above.
2602         * platform/image-decoders/png/PNGImageDecoder.h:
2603
2604 2010-04-30  Brady Eidson  <beidson@apple.com>
2605
2606         Reviewed by Eric Carlson.
2607
2608         <rdar://problem/7902467> - Audio plays upon loading of npr.org but shouldn't
2609
2610         No new tests. (Currently no way to test such site specific hack behavior)
2611
2612         * html/HTMLMediaElement.cpp:
2613         (WebCore::HTMLMediaElement::HTMLMediaElement):
2614         (WebCore::HTMLMediaElement::asyncEventTimerFired): If the event to be dispatched is the canplay
2615           event, wrap the dispatch with m_dispatchingCanPlayEvent set.
2616         (WebCore::HTMLMediaElement::play): If m_dispatchingCanPlayEvent is true and the site is npr.org, 
2617           don't perform the play().
2618         * html/HTMLMediaElement.h: Add m_dispatchingCanPlayEvent member.
2619
2620 2010-04-30  Dan Bernstein  <mitz@apple.com>
2621
2622         Reviewed by Adele Peterson.
2623
2624         Part of <rdar://problem/6649734> Text repainting does not account for glyphs which draw outside the typographic bounds of the font
2625         https://bugs.webkit.org/show_bug.cgi?id=6274
2626
2627         Account for glyph overflow of characters in the range U+1E00..U+2000, but without sending them
2628         through the complex text code path. Instead, introduce a variant of the fast path that tracks
2629         glyph overflow.
2630
2631         * platform/graphics/Font.cpp:
2632         (WebCore::Font::drawText): Use codePath().
2633         (WebCore::Font::floatWidth): Use codePath(). Pass the GlyphOverflow pointer through to
2634         floatWidthForSimpleText() if the code path is SimpleWithGlyphOverflow.
2635         (WebCore::Font::selectionRectForText): Use codePath().
2636         (WebCore::Font::offsetForPosition): Ditto.
2637         * platform/graphics/Font.h: Replaced canUseGlyphCache() with codePath(). Added a GlyphOverflow
2638         parameter to floatWidthForSimpleText().
2639         * platform/graphics/FontFastPath.cpp:
2640         Removed ROMAN_AND_GREEK_DIACRITICS_CAN_USE_GLYPH_CACHE.
2641         (WebCore::Font::codePath): Renamed canUseGlyphCache() to this. Where it used to return false,
2642         it now returns Complex. Where it used to return true, it now returns Simple, except for
2643         the range U+1E00..U+2000, where it now returns SimpleWithGlyphOverflow.
2644         (WebCore::Font::floatWidthForSimpleText): Added a GlyphOverflow parameter. If not 0, have the
2645         width iterator account for glyph bounds, then update the GlyphOverflow accordingly.
2646         * platform/graphics/WidthIterator.cpp:
2647         (WebCore::WidthIterator::WidthIterator): Added boolean parameter telling the width iterator
2648         whether to account for glyph bounds. Initialize m_accountForGlyphBounds accordingly. Initialize
2649         m_maxGlyphBoundingBoxY, m_minGlyphBoundingBoxY, m_firstGlyphOverflow and m_lastGlyphOverflow.
2650         (WebCore::WidthIterator::advance): If accounting for glyph bounds, update the above member variables.
2651         * platform/graphics/WidthIterator.h:
2652         (WebCore::WidthIterator::maxGlyphBoundingBoxY): Added this accessor.
2653         (WebCore::WidthIterator::minGlyphBoundingBoxY): Ditto.
2654         (WebCore::WidthIterator::firstGlyphOverflow): Ditto.
2655         (WebCore::WidthIterator::lastGlyphOverflow): Ditto.
2656
2657 2010-04-30  Chris Marrin  <cmarrin@apple.com>
2658
2659         Reviewed by Simon Fraser.
2660
2661         Reversed the order of the CSSMatrix.multiply method
2662         https://bugs.webkit.org/show_bug.cgi?id=38337
2663
2664         Test: transforms/svg-vs-css.xhtml
2665
2666         * css/WebKitCSSMatrix.cpp:
2667         (WebCore::WebKitCSSMatrix::multiply):
2668         * platform/graphics/transforms/TransformationMatrix.cpp:
2669
2670 2010-04-30  Kevin Ollivier  <kevino@theolliviers.com>
2671
2672         Unreviewed. Attempt to fix the Chromium Mac build after the last commit.
2673
2674         * WebCore.gypi:
2675
2676 2010-04-30  Kevin Ollivier  <kevino@theolliviers.com>
2677
2678         Reviewed by Dan Bernstein.
2679
2680         Allow other ports to compile ATSUI and CoreText functions in SimpleFontData for Mac.
2681         https://bugs.webkit.org/show_bug.cgi?id=38334
2682
2683         * WebCore.xcodeproj/project.pbxproj:
2684         * platform/graphics/mac/SimpleFontDataATSUI.mm: Copied from WebCore/platform/graphics/mac/SimpleFontDataMac.mm.
2685         * platform/graphics/mac/SimpleFontDataCoreText.cpp: Copied from WebCore/platform/graphics/mac/SimpleFontDataMac.mm.
2686         * platform/graphics/mac/SimpleFontDataMac.mm:
2687
2688 2010-04-30  Shinichiro Hamaji  <hamaji@chromium.org>
2689
2690         Reviewed by Simon Fraser.
2691
2692         SHOULD NEVER BE REACHED assertion loading forbes.com
2693         https://bugs.webkit.org/show_bug.cgi?id=38272
2694
2695         Ignore page media related pseudo classes.
2696
2697         Test: printing/pseudo-class-outside-page.html
2698
2699         * css/CSSStyleSelector.cpp:
2700         (WebCore::CSSStyleSelector::SelectorChecker::checkOneSelector):
2701
2702 2010-04-30  Laszlo Gombos  <laszlo.1.gombos@nokia.com>
2703
2704         Unreviewed, build fix.
2705
2706         Fix compiler warning "suggest parentheses around"
2707
2708         No new tests as there is no new functionality.
2709
2710         * svg/SVGAnimateElement.cpp:
2711         (WebCore::SVGAnimateElement::calculateFromAndToValues):
2712
2713 2010-04-30  Kent Tamura  <tkent@chromium.org>
2714
2715         Unreviewed. Regression fix.
2716
2717         Revert a part of r58564 to be compatible with prior behavior
2718         https://bugs.webkit.org/show_bug.cgi?id=38383
2719
2720         * rendering/RenderTextControlSingleLine.cpp:
2721         (WebCore::RenderTextControlSingleLine::forwardEvent):
2722          r58564 made a region check for the cancel button stricter, but it
2723          made some tests failing on Chromium. So, relax the check again.
2724
2725 2010-04-29  Jeremy Orlow  <jorlow@chromium.org>
2726
2727         Reviewed by Darin Fisher.
2728
2729         Change StorageEvent.uri to StorageEvent.url to match the spec
2730         https://bugs.webkit.org/show_bug.cgi?id=38331
2731
2732         As I mentioned in http://www.mail-archive.com/public-webapps@w3.org/msg08495.html
2733         WebKit is the only one who places the document's URL in a 'uri' property
2734         rather than a 'url' property.  Even though we've shipped several versions of
2735         browsers with the old name, we probably should change this to comply with the
2736         spec.
2737
2738         This stuff is covered by existing tests.
2739
2740         * storage/StorageEvent.cpp:
2741         (WebCore::StorageEvent::create):
2742         (WebCore::StorageEvent::StorageEvent):
2743         (WebCore::StorageEvent::initStorageEvent):
2744         * storage/StorageEvent.h:
2745         (WebCore::StorageEvent::url):
2746         * storage/StorageEvent.idl:
2747
2748 2010-04-30  Nikolas Zimmermann  <nzimmermann@rim.com>
2749
2750         Reviewed by Dirk Schulze.
2751
2752         REGRESSION: RenderPath does not handle repaints correctly anymore if bounds changed
2753         https://bugs.webkit.org/show_bug.cgi?id=38385
2754
2755         The last SVG performance patch broke repainting if bounds of a RenderPath get smaller.
2756         It would only repaint the smaller part, not the original larger bounds.
2757
2758         Remove all lazy calculation of the repaint rects, instead calculate object/strokeBoundingBox and repaintRectInLocalCoordinates
2759         once in layout - after LayoutRepainter grabbed the initial bounds, before calling repaintAfterLayout(). We can now inline
2760         all these functions, and save a lot of m_path.isEmpty() checks, which are expensive. No need to store a seperated markerBoundingBox(),
2761         combine with strokeBoundingBox() -> save one FloatRect per RenderPath. Move strokeBoundingBox() from SVGRenderBase to RenderObject,
2762         right next to objectBoundingBox() - to save unnecessary toSVGRenderBase() calls. Completly remove this method.
2763
2764         Overall this is a regression fix, a performance improvement and saves memory. Something for everyone.
2765
2766         Tests: svg/custom/repaint-stroke-width-changes.svg
2767
2768         * rendering/RenderObject.cpp: Added strokeBoundingBox() here, to avoid the toSVGRenderBase() dance.
2769         (WebCore::RenderObject::strokeBoundingBox):
2770         * rendering/RenderObject.h: Ditto.
2771         * rendering/RenderPath.cpp:
2772         (WebCore::RenderPath::RenderPath):
2773         (WebCore::RenderPath::layout): Fix regression, do repainting correctly, by recalculating the boundaries, if needed, instead of nulling them.
2774         (WebCore::RenderPath::paint): Cache SVGRenderStyle in local variable, remove no longer valid FIXME.
2775         (WebCore::RenderPath::calculateMarkerBoundsIfNeeded): Return a FloatRect, to avoid having to store the marker bounding box seperated.
2776         (WebCore::RenderPath::styleWillChange): Mark boundaries as dirty.
2777         (WebCore::RenderPath::updateCachedBoundaries): New function to (re-)calculate all cached boundaries, only called from layout().
2778         * rendering/RenderPath.h: Rename cached rect variables to have more sensible names.
2779         (WebCore::RenderPath::objectBoundingBox): Inlined, just returns the cached value - no more lazy creation. Huge speedup as this is hot code.
2780         (WebCore::RenderPath::strokeBoundingBox): Ditto.
2781         (WebCore::RenderPath::repaintRectInLocalCoordinates): Ditto.
2782         * rendering/RenderSVGBlock.h: Remove toSVGRenderBase() method.
2783         * rendering/RenderSVGImage.h: Ditto.
2784         * rendering/RenderSVGInline.cpp: No need to call toSVGRenderBase() just to get the strokeBoundingBox(). Unifies code to retrieve bounding boxes.
2785         (WebCore::RenderSVGInline::strokeBoundingBox):
2786         * rendering/RenderSVGInline.h: Remove toSVGRenderBase() method.
2787         * rendering/RenderSVGModelObject.h: Ditto.
2788         * rendering/RenderSVGResourceFilter.cpp: No need to call toSVGRenderBase() anymore, just grab the strokeBoundingBox() from the RenderObject.
2789         (WebCore::RenderSVGResourceFilter::applyResource):
2790         * rendering/RenderSVGText.h: Remove toSVGRenderBase() method.
2791         * rendering/SVGRenderSupport.h: Ditto. Remove markerBoundingBox() method, now combined with strokeBoundingBox().
2792         (WebCore::SVGRenderBase::strokeBoundingBox):
2793         * rendering/SVGRootInlineBox.h: Remove toSVGRenderBase() method.
2794         * rendering/style/SVGRenderStyle.h: Add hasMarkers() helper method, to avoid doing unnecessary work in RenderPath.
2795         (WebCore::SVGRenderStyle::hasMarkers):
2796
2797 2010-04-30  Eric Uhrhane  <ericu@chromium.org>
2798
2799         Reviewed by Dmitry Titov.
2800
2801         Add bindings for async DB API in Workers.
2802         https://bugs.webkit.org/show_bug.cgi?id=34992
2803
2804         Tests: storage/change-version-handle-reuse-worker.html
2805                storage/execute-sql-args-worker.html
2806
2807         * bindings/js/JSWorkerContextCustom.cpp: Add openDatabase binding.
2808         (WebCore::JSWorkerContext::openDatabase):
2809
2810         * bindings/v8/custom/V8WorkerContextCustom.cpp: Add openDatabase stub; Chromium will need work both in V8 and in the browser process before we can turn this on there.
2811         (WebCore::V8WorkerContext::openDatabaseCallback):
2812
2813         Add NoStaticTables flags to all objects now shared with workers.
2814         * storage/Database.idl:
2815         * storage/SQLError.idl:
2816         * storage/SQLResultSet.idl:
2817         * storage/SQLResultSetRowList.idl:
2818         * storage/SQLTransaction.idl:
2819         
2820         * workers/WorkerContext.h: Add databaseExceededQuota.
2821         * workers/WorkerContext.cpp:
2822         (WebCore::WorkerContext::databaseExceededQuota): Add stub implementation for testing; you just get 5MB for now.
2823         (WebCore::WorkerContext::openDatabase): Remove invalid assertion.
2824
2825         Add the IDL for the call to openDatabase.
2826         * workers/WorkerContext.idl:
2827
2828 2010-04-30  Shinichiro Hamaji  <hamaji@chromium.org>
2829
2830         Reviewed by Darin Adler.
2831
2832         Unnecessary PrintContext::end() calls
2833         https://bugs.webkit.org/show_bug.cgi?id=38247
2834
2835         Refactoring only, so no new tests.
2836
2837         * page/PrintContext.cpp:
2838         (WebCore::PrintContext::pageNumberForElement):
2839         (WebCore::PrintContext::numberOfPages):
2840
2841 2010-04-30  Kent Tamura  <tkent@chromium.org>
2842
2843         Reviewed by Adele Peterson.
2844
2845         Implement interactive behavior of spin buttons.
2846         https://bugs.webkit.org/show_bug.cgi?id=35686
2847
2848         Introduce SpinButtonElement. It is a shadow element class for
2849         spin buttons. If the upper side of the element is clicked, calls
2850         HTMLInputElement::stepUpFromRenderer(1). If the lower button is
2851         clicked, calls HTMLInputElement::stepUpFromRenderer(-1).
2852
2853         SpinButtonElement tracks the mouse pointer position, and
2854         RenderTheme sets ControlStates::SpinUpState if the pointer is on
2855         the upper side.
2856
2857         Test: platform/mac/fast/forms/input-number-click.html
2858
2859         * dom/Element.h:
2860         (WebCore::Element::isSpinButtonElement):
2861         * editing/VisibleSelection.cpp:
2862         (WebCore::VisibleSelection::adjustSelectionToAvoidCrossingEditingBoundaries):
2863          Remove an assertion. lastEditablePositionBeforePositionInRoot() can
2864          return null in a case that m_end is at a shadow element (a spin button)
2865          and baseRoot is another shadow element (inner text block) in the same
2866          node (an INPUT element).
2867         * html/HTMLInputElement.cpp:
2868         (WebCore::HTMLInputElement::stepUpFromRenderer):
2869         * html/HTMLInputElement.h:
2870         (WebCore::HTMLInputElement::hasSpinButton):
2871          Add types supporting step attribute except RANGE.
2872         * rendering/RenderTextControlSingleLine.cpp:
2873         (WebCore::RenderTextControlSingleLine::nodeAtPoint):
2874         (WebCore::RenderTextControlSingleLine::forwardEvent):
2875         (WebCore::RenderTextControlSingleLine::preferredContentWidth):
2876         (WebCore::RenderTextControlSingleLine::createSubtreeIfNeeded):
2877         * rendering/RenderTextControlSingleLine.h:
2878         * rendering/RenderTheme.cpp:
2879         (WebCore::RenderTheme::controlStatesForRenderer):
2880         (WebCore::RenderTheme::isSpinUpButtonPartPressed):
2881         (WebCore::RenderTheme::isSpinUpButtonPartHovered):
2882         * rendering/RenderTheme.h:
2883         * rendering/TextControlInnerElements.cpp:
2884         (WebCore::SpinButtonElement::SpinButtonElement):
2885         (WebCore::SpinButtonElement::defaultEventHandler):
2886         * rendering/TextControlInnerElements.h:
2887         (WebCore::SpinButtonElement::isSpinButtonElement):
2888         (WebCore::SpinButtonElement::isEnabledFormControl):
2889         (WebCore::SpinButtonElement::onUpButton):
2890
2891 2010-04-30  Yael Aharon  <yael.aharon@nokia.com>
2892
2893         Reviewed by Kenneth Rohde Christiansen.
2894
2895         [Qt] Enable DOMWindow constructor for HTMLProgressElement
2896         https://bugs.webkit.org/show_bug.cgi?id=38333
2897
2898         Add ENABLE_PROGRESS_TAG to FEATURES_DEFINES_JAVASCRIPT.
2899
2900         * WebCore.pri:
2901
2902 2010-04-30  Kent Tamura  <tkent@chromium.org>
2903
2904         Reviewed by Adele Peterson.
2905
2906         Mac implementation of outer-spin-button appearance, and anonymous
2907         element generation for <input type=number>.
2908         https://bugs.webkit.org/show_bug.cgi?id=32813
2909
2910         The implementation uses NSStepperCell. Like the other Mac
2911         controls, it has only three candidates for sizes.
2912
2913         The editable block of an input element is shrunk, and the
2914         anonymous block for a spin button is put on the right of the
2915         editable block.
2916
2917         Tests: platform/mac/fast/forms/input-appearance-spinbutton-size.html
2918                platform/mac/fast/forms/input-appearance-spinbutton.html
2919
2920         * dom/Element.cpp:
2921         (WebCore::Element::pseudoStyleCacheIsInvalid):
2922         * dom/InputElement.h:
2923         (WebCore::InputElement::hasSpinButton):
2924         * html/HTMLInputElement.h:
2925         (WebCore::HTMLInputElement::hasSpinButton): Return true for NUMBER type.
2926         * platform/mac/ThemeMac.mm:
2927         (WebCore::sizeFromNSControlSize): Split the main part of sizeFromFont()
2928           to this in order to use stepperControlSizeForFont() instead of
2929           controlSizeForFont().
2930         (WebCore::sizeFromFont): Just calls sizeFromNSControlSize() with
2931           sizeFromFont(). No behavior changes.
2932         (WebCore::stepperSizes): Returns sizes for mini, small, and regular.
2933         (WebCore::stepperControlSizeForFont):
2934           Dedicated version of controlSizeForFont().
2935         (WebCore::stepper): Returns NSStepperCell object with specified settings.
2936         (WebCore::paintStepper):
2937         (WebCore::ThemeMac::controlSize): Support for OuterSpinButton.
2938         (WebCore::ThemeMac::minimumControlSize): ditto.
2939         (WebCore::ThemeMac::inflateControlPaintRect): ditto.
2940         (WebCore::ThemeMac::paint): ditto.
2941         * rendering/RenderBox.cpp:
2942         (WebCore::RenderBox::paintBoxDecorations):
2943           Move the content to paintBoxDecorationsWithSize().
2944         (WebCore::RenderBox::paintBoxDecorationsWithSize):
2945         * rendering/RenderBox.h: Declare paintBoxDecorationsWithSize().
2946         * rendering/RenderTextControlSingleLine.cpp:
2947         (WebCore::RenderTextControlSingleLine::~RenderTextControlSingleLine):
2948         (WebCore::RenderTextControlSingleLine::paintBoxDecorations):
2949           Call paintBoxDecorationsWithSize() with smaller width by decorationWidthRight().
2950         (WebCore::RenderTextControlSingleLine::addFocusRingRects):
2951           Add a rectangle of which width is smaller by decorationWidthRight().
2952         (WebCore::RenderTextControlSingleLine::layout):
2953           Adjust m_outerSpinButton position.
2954         (WebCore::RenderTextControlSingleLine::styleDidChange):
2955         (WebCore::RenderTextControlSingleLine::textBlockWidth):
2956         (WebCore::RenderTextControlSingleLine::decorationWidthRight):
2957         (WebCore::RenderTextControlSingleLine::preferredDecorationWidthRight):
2958         (WebCore::RenderTextControlSingleLine::createSubtreeIfNeeded):
2959           Creates an element for m_outerSpinButton if it is needed.
2960         (WebCore::RenderTextControlSingleLine::createInnerTextStyle):
2961         (WebCore::RenderTextControlSingleLine::createOuterSpinButtonStyle):
2962         * rendering/RenderTextControlSingleLine.h: Declare new methods and m_outerSpinButton.
2963         * rendering/RenderThemeMac.mm:
2964         (WebCore::RenderThemeMac::adjustRepaintRect): Support for OuterSpinButton.
2965
2966 2010-04-29  Adam Barth  <abarth@webkit.org>
2967
2968         Unreviewed.  Update JSC CodeGenerator baseline.  Not sure how I missed
2969         this one earlier.
2970
2971         * bindings/scripts/test/JS/JSTestObj.cpp:
2972         (WebCore::jsTestObjPrototypeFunctionSerializedValue):
2973
2974 2010-04-29  Justin Garcia  <justin.garcia@apple.com>
2975
2976         Reviewed by Adele Peterson.
2977
2978         Need to updateLayout after typing commands too
2979         https://bugs.webkit.org/show_bug.cgi?id=38352
2980
2981         Replaced !m_parent checks in EditCommand.cpp by the more descriptive isTopLevelCommand().
2982         Move the post editing operation updateLayout() call to {un,re}appliedEditing so that text insertions,
2983         which don't go through EditCommand::{un,re}apply() can benefit from it too.  No test case possible
2984         since most platforms have a layout performed as a side effect of post operation selection code.
2985
2986         * editing/EditCommand.cpp:
2987         (WebCore::EditCommand::apply):
2988         (WebCore::EditCommand::unapply):
2989         (WebCore::EditCommand::reapply):
2990         * editing/EditCommand.h:
2991         (WebCore::EditCommand::isTopLevelCommand):
2992         * editing/Editor.cpp:
2993         (WebCore::Editor::appliedEditing):
2994         (WebCore::Editor::unappliedEditing):
2995         (WebCore::Editor::reappliedEditing):
2996
2997 2010-04-29  Dan Bernstein  <mitz@apple.com>
2998
2999         Reviewed by Simon Fraser.
3000
3001         <rdar://problem/7918086> REGRESSION (r57820): Controller is not displayed in window when opening a MP3 file in browser window
3002         https://bugs.webkit.org/show_bug.cgi?id=38350
3003
3004         Tests: media/audio-only-video-intrinsic-size.html
3005                media/media-document-audio-size.html
3006
3007         * rendering/RenderVideo.cpp:
3008         (WebCore::RenderVideo::RenderVideo): Until metadata is available, ignore the natural size
3009         reported by the player.
3010         (WebCore::RenderVideo::videoSizeChanged): Respect a natural size of zero if reported by the
3011         player, except in standalone media documents.
3012
3013 2010-04-29  Anders Carlsson  <andersca@apple.com>
3014
3015         Reviewed by Dan Bernstein.
3016
3017         First part of
3018         https://bugs.webkit.org/show_bug.cgi?id=20784
3019         move npapi.h to C99 integer types.
3020
3021         Add nptypes.h to the build.
3022
3023         * WebCore.xcodeproj/project.pbxproj:
3024         * bridge/npapi.h:
3025         * bridge/npruntime.h:
3026         * bridge/nptypes.h: Added.
3027
3028 2010-04-29  Xan Lopez  <xlopez@igalia.com>
3029
3030         Rubber-stamped by Adam Barth.
3031
3032         Update GObject bindings test results. We are actually moving
3033         backwards here, but we'll update them again when we figure out
3034         what broke.
3035
3036         * bindings/scripts/test/GObject/WebKitDOMTestObj.cpp:
3037         (webkit_dom_test_obj_set_property):
3038         (webkit_dom_test_obj_get_property):
3039
3040 2010-04-29  Sam Weinig  <sam@webkit.org>
3041
3042         Reviewed by Anders Carlsson.
3043
3044         Fix for https://bugs.webkit.org/show_bug.cgi?id=38277
3045         MiniBrowser: -[WebCoreFlippedView currentEditor]: unrecognized selector
3046
3047         * platform/mac/ThemeMac.mm:
3048         (-[WebCoreFlippedView currentEditor]): Added currentEditor nil implementation.
3049
3050 2010-04-29  Adam Barth  <abarth@webkit.org>
3051
3052         Reviewed by Eric Seidel.
3053
3054         CodeGeneratorJS.pm should be consistent about castedThis versus castedThisObj
3055         https://bugs.webkit.org/show_bug.cgi?id=38338
3056
3057         Currently CodeGeneratorJS.pm uses castThis for methods and
3058         castedThisObj for attributes.  This inconsistency makes it difficult to
3059         factor common code genereration code into methods shared by both kinds
3060         of bindings.  This match aligns the names so that a future patch (e.g.,
3061         in https://bugs.webkit.org/show_bug.cgi?id=38313) can reduce copy/paste
3062         code.
3063
3064         * bindings/scripts/CodeGeneratorJS.pm:
3065         * bindings/scripts/test/JS/JSTestObj.cpp:
3066         (WebCore::setJSTestObjIntAttr):
3067         (WebCore::setJSTestObjLongLongAttr):
3068         (WebCore::setJSTestObjUnsignedLongLongAttr):
3069         (WebCore::setJSTestObjStringAttr):
3070         (WebCore::setJSTestObjTestObjAttr):
3071         (WebCore::setJSTestObjAttrWithException):
3072         (WebCore::setJSTestObjAttrWithSetterException):
3073         (WebCore::setJSTestObjAttrWithGetterException):
3074         (WebCore::jsTestObjPrototypeFunctionVoidMethod):
3075         (WebCore::jsTestObjPrototypeFunctionVoidMethodWithArgs):
3076         (WebCore::jsTestObjPrototypeFunctionIntMethod):
3077         (WebCore::jsTestObjPrototypeFunctionIntMethodWithArgs):
3078         (WebCore::jsTestObjPrototypeFunctionObjMethod):
3079         (WebCore::jsTestObjPrototypeFunctionObjMethodWithArgs):
3080         (WebCore::jsTestObjPrototypeFunctionMethodWithException):
3081         (WebCore::jsTestObjPrototypeFunctionCustomMethod):
3082         (WebCore::jsTestObjPrototypeFunctionCustomMethodWithArgs):
3083         (WebCore::jsTestObjPrototypeFunctionCustomArgsAndException):
3084         (WebCore::jsTestObjPrototypeFunctionAddEventListener):
3085         (WebCore::jsTestObjPrototypeFunctionRemoveEventListener):
3086         (WebCore::jsTestObjPrototypeFunctionWithDynamicFrame):
3087         (WebCore::jsTestObjPrototypeFunctionWithDynamicFrameAndArg):
3088         (WebCore::jsTestObjPrototypeFunctionWithDynamicFrameAndOptionalArg):
3089         (WebCore::jsTestObjPrototypeFunctionWithDynamicFrameAndUserGesture):
3090         (WebCore::jsTestObjPrototypeFunctionWithDynamicFrameAndUserGestureASAD):
3091         (WebCore::jsTestObjPrototypeFunctionWithScriptStateVoid):
3092         (WebCore::jsTestObjPrototypeFunctionWithScriptStateObj):
3093         (WebCore::jsTestObjPrototypeFunctionWithScriptStateVoidException):
3094         (WebCore::jsTestObjPrototypeFunctionWithScriptStateObjException):
3095         (WebCore::jsTestObjPrototypeFunctionMethodWithOptionalArg):
3096         (WebCore::jsTestObjPrototypeFunctionMethodWithNonOptionalArgAndOptionalArg):
3097         (WebCore::jsTestObjPrototypeFunctionMethodWithNonOptionalArgAndTwoOptionalArgs):
3098
3099 2010-04-29  Gustavo Noronha Silva  <gustavo.noronhaollabora.co.uk>
3100
3101         Reviewed by Xan Lopez.
3102
3103         [GTK] pointerCursor should use the default cursor set for the window, not GDK_LEFT_PTR
3104         https://bugs.webkit.org/show_bug.cgi?id=36963
3105
3106         Use the default cursor instead of hard-coding left pointer.
3107
3108         * platform/gtk/CursorGtk.cpp:
3109         (WebCore::Cursor::Cursor):
3110         (WebCore::pointerCursor):
3111
3112 2010-04-29  Ilya Tikhonovsky  <loislo@chromium.org>
3113
3114         Reviewed by Yury Semikhatsky.
3115
3116         WebInspector: If Timeline panel is in recording mode and is not visible and has received
3117         new events then these events do not appear in the panel when the panel becomes visible.
3118         Timeline popup may appear in the upper left window corner when you switch to another panel.
3119         https://bugs.webkit.org/show_bug.cgi?id=38322
3120
3121         * inspector/front-end/Popover.js:
3122         (WebInspector.PopoverHelper.prototype._mouseMove.doHide):
3123         (WebInspector.PopoverHelper.prototype._mouseMove):
3124         (WebInspector.PopoverHelper.prototype.hidePopup):
3125         (WebInspector.PopoverHelper.prototype._hidePopup):
3126         * inspector/front-end/TimelinePanel.js:
3127         (WebInspector.TimelinePanel.prototype.show):
3128         (WebInspector.TimelinePanel.prototype._scheduleRefresh):
3129         (WebInspector.TimelinePanel.prototype._refresh):
3130
3131 2010-04-29  Anton Muhin  <antonm@chromium.org>
3132
3133         Reviewed by Darin Adler.
3134
3135         Let's cache nodelists instead of DynamicNodeList::Caches
3136         https://bugs.webkit.org/show_bug.cgi?id=33696
3137
3138         Test: fast/dom/Element/node-list-identity.html
3139
3140         * bindings/js/JSNodeCustom.cpp:
3141         (WebCore::JSNode::markChildren): Mark all cached node lists as well
3142         * dom/ClassNodeList.cpp:
3143         (WebCore::ClassNodeList::ClassNodeList): Don't need DynamicNodeList::Caches argument any more
3144         (WebCore::ClassNodeList::~ClassNodeList): Remove from the cache
3145         * dom/ClassNodeList.h: Added a field with original class names to be used as a key for removal from the cache
3146         (WebCore::ClassNodeList::create): Don't need DynamicNodeList::Caches argument any more
3147         * dom/NameNodeList.cpp:
3148         (WebCore::NameNodeList::NameNodeList): Don't need DynamicNodeList::Caches argument any more
3149         (WebCore::NameNodeList::~NameNodeList): Remove from the cache
3150         * dom/NameNodeList.h:
3151         (WebCore::NameNodeList::create): Don't need DynamicNodeList::Caches argument any more
3152         * dom/Node.cpp:
3153         (WebCore::Node::removeCachedClassNodeList): Remove ClassNodeList from the cache
3154         (WebCore::Node::removeCachedNameNodeList): Remove NameNodeList from the cache
3155         (WebCore::Node::removeCachedTagNodeList): Remove TagNodeList from the cache
3156         (WebCore::Node::getElementsByTagNameNS): Switch to caching node lists themselves, not the data
3157         (WebCore::Node::getElementsByName): Switch to caching node lists themselves, not the data
3158         (WebCore::Node::getElementsByClassName): Switch to caching node lists themselves, not the data
3159         (WebCore::NodeListsNodeData::invalidateCaches): Switch to caching node lists themselves, not the data
3160         (WebCore::NodeListsNodeData::invalidateCachesThatDependOnAttributes): Switch to caching node lists themselves, not the data
3161         (WebCore::NodeListsNodeData::isEmpty): Switch to caching node lists themselves, not the data
3162         (WebCore::markNodeLists): Helper to mark all the node lists in the cache
3163         (WebCore::Node::markCachedNodeListsSlow): Mark all the cached node lists if any could be present
3164         * dom/Node.h:
3165         (WebCore::Node::markCachedNodeLists): Fast-path marking of cached node lists---bails out if there is no rare data
3166         * dom/NodeRareData.h: Changed type of caches to hold raw pointers to node lists, not RefPtr's to data
3167         * dom/TagNodeList.cpp:
3168         (WebCore::TagNodeList::TagNodeList): Don't need DynamicNodeList::Caches argument any more
3169         (WebCore::TagNodeList::~TagNodeList): Remove from the cache
3170         * dom/TagNodeList.h:
3171         (WebCore::TagNodeList::create): Don't need DynamicNodeList::Caches argument any more
3172
3173 2010-04-29  Mikhail Naganov  <mnaganov@chromium.org>
3174
3175         Reviewed by Yury Semikhatsky.
3176
3177         [Chromium] Update ScriptProfileNode to retrieve execution time in milliseconds.
3178
3179         https://bugs.webkit.org/show_bug.cgi?id=38330
3180
3181         * bindings/v8/ScriptProfileNode.cpp:
3182         (WebCore::ScriptProfileNode::totalTime):
3183         (WebCore::ScriptProfileNode::selfTime):
3184
3185 2010-04-28  Dimitri Glazkov  <dglazkov@chromium.org>
3186
3187         Reviewed by Darin Adler.
3188
3189         A form without a submit button unexpectedly performs its action when Return is pressed
3190         https://bugs.webkit.org/show_bug.cgi?id=9756
3191
3192         Implemented implicit form submission algorithm as defined in HTML5 spec:
3193         http://www.whatwg.org/specs/web-apps/current-work/multipage/association-of-controls-and-forms.html#implicit-submission,
3194         falling back to match IE's behavior in the edge cases.
3195
3196         The underlying rules are:
3197
3198         * If the form has no enabled submit buttons, submit if Enter/Return is pressed on the only single-line text field.
3199
3200         * Otherwise, submit form using first enabled submit button if Enter/Return is pressed on a field
3201           that's not a textarea or a select.
3202
3203         Test: fast/forms/implicit-submission.html
3204
3205         * dom/SelectElement.cpp:
3206         (WebCore::SelectElement::menuListDefaultEventHandler): Ripped out implicit submission for select elements.
3207         (WebCore::SelectElement::listBoxDefaultEventHandler): Ditto.
3208         (WebCore::SelectElement::defaultEventHandler): Ditto.
3209         * dom/SelectElement.h: Ditto.
3210         (WebCore::HTMLFormElement::submitImplicitly): Renamed submitClick to submitImplicitly to better match HTML5 spec
3211             language, changed the logic to match the rules above.
3212         * html/HTMLInputElement.cpp:
3213         (WebCore::HTMLInputElement::defaultEventHandler): Reamed clickDefaultButton to implicitSubmission to better match
3214             HTML5 spec language, made radio element to trigger implicit submission.
3215         * html/HTMLSelectElement.cpp:
3216         (WebCore::HTMLSelectElement::defaultEventHandler): Removed passing of form() as parameter, because it's no longer
3217             necessary.
3218
3219 2010-04-29  Paweł Hajdan, Jr.  <phajdan.jr@chromium.org>
3220
3221         Reviewed by Jeremy Orlow.
3222
3223         Fix building with libpng-1.4.
3224         https://bugs.webkit.org/show_bug.cgi?id=33287
3225
3226         No new tests (no behavior change).
3227
3228         Original patch by John Bowler <jbowler@acm.org>
3229
3230         * platform/image-encoders/skia/PNGImageEncoder.cpp:
3231         (WebCore::PNGImageEncoder::encode):
3232
3233 2010-04-29  Adam Langley  <agl@chromium.org>
3234
3235         Reviewed by David Levin.
3236
3237         This patch adds support for WOFF in Chromium. Since Chromium
3238         already transcodes all OpenType files for security reasons we
3239         are adding WOFF support into the transcoder.
3240
3241         https://bugs.webkit.org/show_bug.cgi?id=38217
3242
3243         * css/CSSFontFaceSrcValue.cpp:
3244         (WebCore::CSSFontFaceSrcValue::isSupportedFormat):
3245           Recognise "woff" as a font-face format value (guarded by
3246           ENABLE(OPENTYPE_SANITIZER) at this point)
3247         * platform/graphics/opentype/OpenTypeSanitizer.cpp:
3248         (WebCore::OpenTypeSanitizer::sanitize):
3249           Change so that the transcoded font can be larger than the original.
3250           (WOFF files are compressed, so the transcoded TTF is typically
3251           larger.)
3252
3253 2010-04-29  Alex Milowski  <alex@milowski.com>
3254
3255         Reviewed by Kenneth Rohde Christiansen.
3256
3257         Updates to the Qt build to enable building MathML support.
3258
3259         * WebCore.pri:
3260         * WebCore.pro:
3261
3262 2010-04-29  Xan Lopez  <xlopez@igalia.com>
3263
3264         Reviewed by Gustavo Noronha.
3265
3266         [GTK] GObject DOM bindings
3267         https://bugs.webkit.org/show_bug.cgi?id=33590
3268
3269         Do not generate unneeded boilerplate in {get,set}_property methods
3270         when there are no properties to generate code for. This gets rid
3271         of lots of compiler warnings.
3272
3273         * bindings/scripts/CodeGeneratorGObject.pm:
3274
3275 2010-04-29  Simon Hausmann  <simon.hausmann@nokia.com>
3276
3277         Reviewed by Kenneth Rohde Christiansen.
3278
3279         [Qt] Speed up text layouting
3280         https://bugs.webkit.org/show_bug.cgi?id=31719
3281
3282         Use QFontMetrics::width() for the text width calculation instead
3283         of QTextLayout. This avoids expensive bearing calculations and the
3284         line breaking code.
3285
3286         * platform/graphics/qt/FontQt.cpp:
3287         (WebCore::Font::floatWidthForComplexText):
3288
3289 2010-04-29  Kwang Yul Seo  <skyul@company100.net>
3290
3291         Reviewed by Simon Hausmann.
3292
3293         [WINCE] Export g_stackBase with JS_EXPORTDATA
3294         https://bugs.webkit.org/show_bug.cgi?id=37437
3295
3296         Declare g_stackBase with JS_EXPORTDATA as it is imported from JavaScriptCore.
3297
3298         * platform/wince/SharedTimerWince.cpp:
3299
3300 2010-04-29  Adam Barth  <abarth@webkit.org>
3301
3302         Reviewed by Maciej Stachowiak.
3303
3304         Remove custom bindings for PopStateEvent.initPopStateEvent
3305         https://bugs.webkit.org/show_bug.cgi?id=38311
3306
3307         Our code generation of SerializedScriptValue was slightly buggy, but
3308         it's easy to fix.  Notice that the conversion to an atomic string is
3309         handled by the C++ type system and doesn't require logic in the code
3310         generator.
3311
3312         * bindings/js/JSPopStateEventCustom.cpp:
3313         * bindings/scripts/CodeGeneratorJS.pm:
3314         * bindings/scripts/CodeGeneratorV8.pm:
3315         * bindings/scripts/test/GObject/WebKitDOMTestObj.cpp:
3316         (webkit_dom_test_obj_serialized_value):
3317         * bindings/scripts/test/GObject/WebKitDOMTestObj.h:
3318         * bindings/scripts/test/JS/JSTestObj.cpp:
3319         (WebCore::):
3320         (WebCore::jsTestObjPrototypeFunctionSerializedValue):
3321         * bindings/scripts/test/JS/JSTestObj.h:
3322         * bindings/scripts/test/ObjC/DOMTestObj.h:
3323         * bindings/scripts/test/ObjC/DOMTestObj.mm:
3324         (-[DOMTestObj serializedValue:]):
3325         * bindings/scripts/test/TestObj.idl:
3326         * bindings/scripts/test/V8/V8TestObj.cpp:
3327         (WebCore::TestObjInternal::serializedValueCallback):
3328         (WebCore::ConfigureV8TestObjTemplate):
3329         * bindings/v8/custom/V8PopStateEventCustom.cpp:
3330         * dom/PopStateEvent.idl:
3331
3332 2010-04-29  Kent Tamura  <tkent@chromium.org>
3333
3334         Reviewed by Darin Adler.
3335
3336         Fix a bug that selection drag-and-drop doesn't work for input/textarea.
3337         https://bugs.webkit.org/show_bug.cgi?id=38175
3338
3339         The code supposed the selected region was in the destination text
3340         field. It is not true in a case of drag-and-drop.
3341
3342         Test: editing/pasteboard/drag-drop-input-textarea.html
3343
3344         * dom/InputElement.cpp:
3345         (WebCore::InputElement::handleBeforeTextInsertedEvent):
3346         * html/HTMLTextAreaElement.cpp:
3347         (WebCore::HTMLTextAreaElement::handleBeforeTextInsertedEvent):
3348
3349 2010-04-29  Adam Barth  <abarth@webkit.org>
3350
3351         Reviewed by Maciej Stachowiak.
3352
3353         Remove custom bindings for NodeFilter.acceptNode
3354         https://bugs.webkit.org/show_bug.cgi?id=38309
3355
3356         This "custom" code was just an instance of the CallWith=ScriptState
3357         pattern.  Also, it looks like V8 just had a garbage implemenation that
3358         did nothing.
3359
3360         * WebCore.gypi:
3361         * bindings/js/JSNodeFilterCustom.cpp:
3362         * bindings/v8/custom/V8NodeFilterCustom.cpp: Removed.
3363         * dom/NodeFilter.idl:
3364
3365 2010-04-29  Noam Rosenthal  <noam.rosenthal@nokia.com>
3366
3367         Reviewed by Laszlo Gombos.
3368
3369         [Qt] QtWebkit doesn't link with 3D canvas
3370         https://bugs.webkit.org/show_bug.cgi?id=38299
3371
3372         Added implementation for GraphicsContext3D::isGLES2Compliant, which returns the correct value based on a Qt #define.
3373
3374         No new tests: build fix
3375
3376         * platform/graphics/qt/GraphicsContext3DQt.cpp:
3377         (WebCore::GraphicsContext3D::isGLES2Compliant):
3378
3379 2010-04-29  Simon Hausmann  <simon.hausmann@nokia.com>
3380
3381         Reviewed by Tor Arne Vestbø.
3382
3383         [Qt] REGRESSION(r57638): tst_qwebframe::objectDeleted() fails
3384         https://bugs.webkit.org/show_bug.cgi?id=38316
3385
3386         Accessing properties of a deleted objects doesn't throw an exception
3387         anymore.
3388
3389         Continue to expose the QObject class wrapper for objects that
3390         previously existed but don't exist anymore. QtClass is safe to
3391         use with a deleted QObject.
3392
3393         * bridge/qt/qt_instance.cpp:
3394         (JSC::Bindings::QtInstance::getClass): Return null only if m_class
3395         doesn't exist yet and there's no m_object.
3396
3397 2010-04-29  Noam Rosenthal  <noam.rosenthal@nokia.com>
3398
3399         Reviewed by Simon Hausmann.
3400
3401         Reverse animations don't work in some use cases        
3402         https://bugs.webkit.org/show_bug.cgi?id=38075
3403
3404         This was due to a code path special-casing reverse animations, that became obselete when we aligned our animation code
3405         with the CA implementation. That special case code path is now a bug - and this patch removes it.
3406
3407         http://staff.washington.edu/fmf/2009/03/25/iphone-3d-css-transformations/ now runs the reverse
3408         animation correctly.
3409
3410         * platform/graphics/qt/GraphicsLayerQt.cpp:
3411         (WebCore::TransformAnimationQt::applyFrame):
3412
3413 2010-04-29  Jan Hanssen  <jhanssen@codeaurora.org>
3414
3415         Reviewed by Adam Barth.
3416
3417         HTMLOptionElement::ownerSelectElement() needs to consider keygen elements
3418         https://bugs.webkit.org/show_bug.cgi?id=26016
3419
3420         Patch written by Grace Kloba <klobag@gmail.com>, test fixed by me.
3421
3422         Test: fast/dom/HTMLKeygenElement/keygen-option-select.html
3423
3424         * html/HTMLOptionElement.cpp:
3425         (WebCore::HTMLOptionElement::ownerSelectElement):
3426         Make HTMLOptionElement::ownerSelectElement() consider the keygen element in addition to the current select element.
3427
3428 2010-04-29  Gustavo Sverzut Barbieri  <barbieri@profusion.mobi>
3429
3430         Reviewed by Eric Seidel.
3431
3432         Add EFL-specific code to Widget.h and move the empty
3433         frameRectsChanged() definition to Widget.cpp, since the EFL port
3434         needs to override that.
3435         http://webkit.org/b/36317
3436
3437         No new tests required.
3438
3439         * WebCore.base.exp:
3440         * platform/Widget.cpp:
3441         (WebCore::Widget::frameRectsChanged):
3442         * platform/Widget.h:
3443
3444 2010-04-29  Jarkko Sakkinen  <jarkko.j.sakkinen@gmail.com>
3445
3446         Reviewed by Simon Hausmann.
3447
3448         [Qt] GraphicsContext3DQt.cpp does not implement isGLES2Compliant() 
3449         https://bugs.webkit.org/show_bug.cgi?id=38216
3450
3451         * platform/graphics/qt/GraphicsContext3DQt.cpp:
3452         (WebCore::GraphicsContext3D::isGLES2Compliant):
3453
3454 2010-04-29  Zhenyao Mo  <zmo@google.com>
3455
3456         Reviewed by Dimitri Glazkov.
3457
3458         Remove the unnecessary texImage2D function with Image as input in GraphicsContext3D
3459         https://bugs.webkit.org/show_bug.cgi?id=38235
3460
3461         * html/canvas/WebGLRenderingContext.cpp:
3462         (WebCore::WebGLRenderingContext::texImage2D): Add extractImageData; add a common entry point for texImage2D with image input.
3463         (WebCore::WebGLRenderingContext::texImage2DBase): Add this function as the common entry point for texImage2D.
3464         (WebCore::WebGLRenderingContext::texSubImage2D): Add extractImageData; add a common entry point for texSubImage2D with image input.
3465         (WebCore::WebGLRenderingContext::texSubImage2DBase): Add this function as the common entry point for texSubImage2D.
3466         * html/canvas/WebGLRenderingContext.h: Add tex*Image{Base/Image} function declaration.
3467         * platform/graphics/GraphicsContext3D.h: Remove tex*Image declaration with Image input.
3468         * platform/graphics/mac/GraphicsContext3DMac.cpp: Remove tex*Image implementation with Image input.
3469         (WebCore::GraphicsContext3D::texImage2D):
3470         (WebCore::GraphicsContext3D::texSubImage2D):
3471
3472 2010-04-29  Noam Rosenthal  <noam.rosenthal@nokia.com>
3473
3474         Reviewed by Simon Hausmann.
3475
3476         [Qt] GraphicsLayer: flicker when starting an animation before the previous one ended.
3477         https://bugs.webkit.org/show_bug.cgi?id=38076
3478
3479         This was due to the cude in the removeAnimations functions, which called deleteLater() without stopping the
3480         animation synchronously. The delay between the call to that function and the actual call to the animation's destructor
3481         is when the flicker occured. We fix this by calling stop() synchronously, and making sure that the value is reverted
3482         upon stop (updateState) and not upon the object's destruction.
3483
3484         http://staff.washington.edu/fmf/2009/03/25/iphone-3d-css-transformations/ now doesn't flicker when
3485         the animation is toggled frequently.
3486
3487         * platform/graphics/qt/GraphicsLayerQt.cpp:
3488         (WebCore::TransformAnimationQt::~TransformAnimationQt):
3489         (WebCore::TransformAnimationQt::applyFrame):
3490         (WebCore::TransformAnimationQt::updateState):
3491         (WebCore::OpacityAnimationQt::~OpacityAnimationQt):
3492         (WebCore::OpacityAnimationQt::updateState):
3493         (WebCore::GraphicsLayerQt::removeAnimationsForProperty):
3494         (WebCore::GraphicsLayerQt::removeAnimationsForKeyframes):
3495
3496 2010-04-28  Luiz Agostini  <luiz.agostini@openbossa.org>
3497
3498         Reviewed by Simon Fraser.
3499
3500         Media queries empty values
3501         https://bugs.webkit.org/show_bug.cgi?id=38116
3502
3503         Adding isValid() method to MediaQueryExp to make it possible to differentiate
3504         between queries with empty values and queries with invalid values.
3505
3506         Test: fast/media/media-query-invalid-value.html
3507
3508         * css/MediaQueryEvaluator.cpp:
3509         (WebCore::MediaQueryEvaluator::eval):
3510         * css/MediaQueryExp.cpp:
3511         (WebCore::MediaQueryExp::MediaQueryExp):
3512         * css/MediaQueryExp.h:
3513         (WebCore::MediaQueryExp::isValid):
3514
3515 2010-04-28  Pavel Feldman  <pfeldman@chromium.org>
3516
3517         Reviewed by Yury Semikhatsky.
3518
3519         Web Inspector: Allow editing script resources when resource tracking is enabled.
3520
3521         https://bugs.webkit.org/show_bug.cgi?id=38269
3522
3523         * inspector/front-end/ScriptView.js:
3524         * inspector/front-end/ScriptsPanel.js:
3525         (WebInspector.ScriptsPanel.prototype.canEditScripts):
3526         (WebInspector.ScriptsPanel.prototype.editScriptSource):
3527         * inspector/front-end/SourceFrame.js:
3528         (WebInspector.SourceFrame.prototype.get textModel):
3529         * inspector/front-end/SourceView.js:
3530         (WebInspector.SourceView):
3531         (WebInspector.SourceView.prototype._addBreakpoint):
3532         (WebInspector.SourceView.prototype._editLine):
3533         (WebInspector.SourceView.prototype._editLineComplete):
3534         (WebInspector.SourceView.prototype._sourceIDForLine):
3535
3536 2010-04-25  Antonio Gomes  <tonikitoo@webkit.org>
3537
3538         Reviewed by Darin Adler.
3539
3540         Clicking a scrollbar blurs the currently focused element
3541         https://bugs.webkit.org/show_bug.cgi?id=16809
3542
3543         WebKit ports that do not use native (platform) widgets for rendering the scrollbars
3544         are currently mismatching a common behaviour of other browser vendors (including
3545         Firefox and Opera): clicking on a frame scrollbar *should not* steal focus from content.
3546         WebKit browsers based ports that do use WebCore for handling scrollbars, like QtWebKit for
3547         instance, can observe the opposite behaviour.
3548
3549         Patch fixes this behaviour by checking if current MouseDown event targets a frame scrollbar.
3550         If that is the case, it bails out and do not change focus behavior at all.
3551
3552         It is important to note that the given way this is implemented by this patch, non-frame
3553         scrollbars (e.g. a vertical scrollbar of an overflowed textareas or divs) will keep working
3554         in the same way as it works currently.
3555
3556         Tests: scrollbars/scrollbar-click-does-not-blur-content.html
3557                scrollbars/scrollbar-iframe-click-does-not-blur-content.html
3558
3559         * page/EventHandler.cpp:
3560         (WebCore::EventHandler::dispatchMouseEvent):
3561
3562 2010-04-28  Dan Bernstein  <mitz@apple.com>
3563
3564         Rubber-stamped by Maciej Stachowiak.
3565
3566         Try to fix test failures seen on the Leopard build bot after r58467
3567
3568         * platform/graphics/SimpleFontData.cpp:
3569         (WebCore::SimpleFontData::platformGlyphInit): Initialize m_zeroWidthSpaceGlyph before
3570         calling widthForGlyph(), as the latter uses the former.
3571
3572 2010-04-28  Martin Robinson  <mrobinson@webkit.org>
3573
3574         Reviewed by Gustavo Noronha.
3575
3576         [GTK] Enable DOM clipboard and drag-and-drop access
3577         https://bugs.webkit.org/show_bug.cgi?id=30623
3578
3579         Make ClipboardGtk a "live" DataTransfer object, able to modify
3580         the clipboard when setData(...) is called.
3581
3582         * platform/gtk/ClipboardGtk.cpp:
3583         (WebCore::Editor::newGeneralClipboard): Pass the GtkClipboard into the factory method.
3584         (WebCore::ClipboardGtk::ClipboardGtk): Create two separate constructors, one for DnD data and one for clipboard data.
3585         (WebCore::dataObjectTypeFromHTMLClipboardType): Added.
3586         (WebCore::ClipboardGtk::clearData): Clear the member DataObject, optionally write the clipboard.
3587         (WebCore::ClipboardGtk::clearAllData): Ditto.
3588         (WebCore::joinURIList): Added.
3589         (WebCore::ClipboardGtk::getData): Get the data from the clipboard, if possible.
3590         (WebCore::ClipboardGtk::setData): Write data to the DataObject and maybe the clipboard.
3591         (WebCore::ClipboardGtk::types): Read the clipboard/DataObject to find applicable types.
3592         (WebCore::ClipboardGtk::files): Read the clipboard/DataObject to find the files.
3593         (WebCore::ClipboardGtk::writeURL): Write to the DataObject and maybe the clipboard.
3594         (WebCore::ClipboardGtk::writeRange): Ditto.
3595         (WebCore::ClipboardGtk::writePlainText): Ditto.
3596         (WebCore::ClipboardGtk::hasData): Query the clipboard/DataObject.
3597         * platform/gtk/ClipboardGtk.h: 
3598         (WebCore::ClipboardGtk::create): Added one factory for pasteboard-backed DataObjects and one for DnD-backed objects.
3599         * platform/gtk/DataObjectGtk.cpp:
3600         (WebCore::replaceNonBreakingSpaceWithSpace): Added this helper function to clean &nbsp; from plain text.
3601         (WebCore::DataObjectGtk::markup): Actually return the range if it's set.
3602         (WebCore::DataObjectGtk::setText): Clean &nbsp; from plain text.
3603         (WebCore::DataObjectGtk::clearText): Added.
3604         (WebCore::DataObjectGtk::clearMarkup): Added.
3605         * platform/gtk/DataObjectGtk.h:
3606         (WebCore::DataObjectGtk::clearURIList): Added.
3607         (WebCore::DataObjectGtk::clearImage): Added.
3608         * platform/gtk/PasteboardHelper.cpp:
3609         (WebCore::PasteboardHelper::initializeTargetList): Added target ID's for URI list and Netscape URL targets.
3610         (WebCore::urisToKURLVector): Added.
3611         (WebCore::PasteboardHelper::getClipboardContents): Added.
3612         (WebCore::PasteboardHelper::fillSelectionData): Added logic for URI lists and Netscape URLs.
3613         (WebCore::PasteboardHelper::targetListForDataObject): Ditto.
3614         * platform/gtk/PasteboardHelper.h: Added default argument to writeClipboardContents and new method.
3615
3616 2010-04-28  Martin Robinson  <mrobinson@webkit.org>
3617
3618         Reviewed by Gustavo Noronha.
3619
3620         [GTK] Enable DOM clipboard and drag-and-drop access
3621         https://bugs.webkit.org/show_bug.cgi?id=30623
3622
3623         Use the length of the UTF-8 markup data in bytes when filling GtkSelectionData.
3624
3625         No new tests, because pasteboard DataTransfer tests will be enabled
3626         with the completion of the GTK+ DataTransfer object.
3627
3628         * platform/gtk/PasteboardGtk.cpp:
3629         (WebCore::clipboard_get_contents_cb): Use strlen here instead of g_utf8_strlen.
3630
3631 2010-04-28  Dan Bernstein  <mitz@apple.com>
3632
3633         Reviewed by Adele Peterson.
3634
3635         More of <rdar://problem/7855777> REGRESSION: Memory usage increase caused by storing glyph bounds in GlyphMetricsMap
3636         https://bugs.webkit.org/show_bug.cgi?id=37936
3637
3638         Assigning zero width and empty bounds to the ZERO WIDTH SPACE glyph often allocates a width map
3639         page and a bounds map page for the glyph, each of which pages contains 255 unused entries. Save
3640         this space by not storing the zero width and empty bounds in the metrics maps.
3641
3642         * platform/graphics/SimpleFontData.cpp:
3643         (WebCore::SimpleFontData::SimpleFontData): Initialize m_zeroWidthSpaceGlyph.
3644         (WebCore::SimpleFontData::platformGlyphInit): Set m_zeroWidthSpaceGlyph. Don’t create entries
3645         for the ZERO WIDTH SPACE glyph in the width map and in the bounds map.
3646         * platform/graphics/SimpleFontData.h:
3647         (WebCore::SimpleFontData::boundsForGlyph): Return empty bounds for the ZERO WIDTH SPACE glyph
3648         without consulting the bounds map.
3649         (WebCore::SimpleFontData::widthForGlyph): Return zero for the ZERO WIDTH SPACE glyph without
3650         consulting the width map.
3651
3652 2010-04-28  Mark Rowe  <mrowe@apple.com>
3653
3654         Reviewed by Adele Peterson.
3655
3656         <rdar://problem/7847573> Safari welcome page logs JavaScript exception during page load
3657
3658         The Safari welcome page runs afoul of the same-origin restriction on access to stylesheet rules
3659         that was added to address <https://bugs.webkit.org/show_bug.cgi?id=20527>. To work around this we're
3660         adding a temporary site-specific quirk that relaxes this restriction for the particular cross-origin
3661         access that occurs on the Safari welcome page.
3662
3663         * css/CSSStyleSheet.cpp:
3664         (WebCore::CSSStyleSheet::cssRules):