2010-04-30 Shinichiro Hamaji <hamaji@chromium.org>
[WebKit.git] / WebCore / ChangeLog
1 2010-04-30  Shinichiro Hamaji  <hamaji@chromium.org>
2
3         Reviewed by Darin Adler.
4
5         Unnecessary PrintContext::end() calls
6         https://bugs.webkit.org/show_bug.cgi?id=38247
7
8         Refactoring only, so no new tests.
9
10         * page/PrintContext.cpp:
11         (WebCore::PrintContext::pageNumberForElement):
12         (WebCore::PrintContext::numberOfPages):
13
14 2010-04-30  Kent Tamura  <tkent@chromium.org>
15
16         Reviewed by Adele Peterson.
17
18         Implement interactive behavior of spin buttons.
19         https://bugs.webkit.org/show_bug.cgi?id=27968
20
21         Introduce SpinButtonElement. It is a shadow element class for
22         spin buttons. If the upper side of the element is clicked, calls
23         HTMLInputElement::stepUpFromRenderer(1). If the lower button is
24         clicked, calls HTMLInputElement::stepUpFromRenderer(-1).
25
26         SpinButtonElement tracks the mouse pointer position, and
27         RenderTheme sets ControlStates::SpinUpState if the pointer is on
28         the upper side.
29
30         Test: platform/mac/fast/forms/input-number-click.html
31
32         * dom/Element.h:
33         (WebCore::Element::isSpinButtonElement):
34         * editing/VisibleSelection.cpp:
35         (WebCore::VisibleSelection::adjustSelectionToAvoidCrossingEditingBoundaries):
36          Remove an assertion. lastEditablePositionBeforePositionInRoot() can
37          return null in a case that m_end is at a shadow element (a spin button)
38          and baseRoot is another shadow element (inner text block) in the same
39          node (an INPUT element).
40         * html/HTMLInputElement.cpp:
41         (WebCore::HTMLInputElement::stepUpFromRenderer):
42         * html/HTMLInputElement.h:
43         (WebCore::HTMLInputElement::hasSpinButton):
44          Add types supporting step attribute except RANGE.
45         * rendering/RenderTextControlSingleLine.cpp:
46         (WebCore::RenderTextControlSingleLine::nodeAtPoint):
47         (WebCore::RenderTextControlSingleLine::forwardEvent):
48         (WebCore::RenderTextControlSingleLine::preferredContentWidth):
49         (WebCore::RenderTextControlSingleLine::createSubtreeIfNeeded):
50         * rendering/RenderTextControlSingleLine.h:
51         * rendering/RenderTheme.cpp:
52         (WebCore::RenderTheme::controlStatesForRenderer):
53         (WebCore::RenderTheme::isSpinUpButtonPartPressed):
54         (WebCore::RenderTheme::isSpinUpButtonPartHovered):
55         * rendering/RenderTheme.h:
56         * rendering/TextControlInnerElements.cpp:
57         (WebCore::SpinButtonElement::SpinButtonElement):
58         (WebCore::SpinButtonElement::defaultEventHandler):
59         * rendering/TextControlInnerElements.h:
60         (WebCore::SpinButtonElement::isSpinButtonElement):
61         (WebCore::SpinButtonElement::isEnabledFormControl):
62         (WebCore::SpinButtonElement::onUpButton):
63
64 2010-04-30  Yael Aharon  <yael.aharon@nokia.com>
65
66         Reviewed by Kenneth Rohde Christiansen.
67
68         [Qt] Enable DOMWindow constructor for HTMLProgressElement
69         https://bugs.webkit.org/show_bug.cgi?id=38333
70
71         Add ENABLE_PROGRESS_TAG to FEATURES_DEFINES_JAVASCRIPT.
72
73         * WebCore.pri:
74
75 2010-04-30  Kent Tamura  <tkent@chromium.org>
76
77         Reviewed by Adele Peterson.
78
79         Mac implementation of outer-spin-button appearance, and anonymous
80         element generation for <input type=number>.
81         https://bugs.webkit.org/show_bug.cgi?id=32813
82
83         The implementation uses NSStepperCell. Like the other Mac
84         controls, it has only three candidates for sizes.
85
86         The editable block of an input element is shrunk, and the
87         anonymous block for a spin button is put on the right of the
88         editable block.
89
90         Tests: platform/mac/fast/forms/input-appearance-spinbutton-size.html
91                platform/mac/fast/forms/input-appearance-spinbutton.html
92
93         * dom/Element.cpp:
94         (WebCore::Element::pseudoStyleCacheIsInvalid):
95         * dom/InputElement.h:
96         (WebCore::InputElement::hasSpinButton):
97         * html/HTMLInputElement.h:
98         (WebCore::HTMLInputElement::hasSpinButton): Return true for NUMBER type.
99         * platform/mac/ThemeMac.mm:
100         (WebCore::sizeFromNSControlSize): Split the main part of sizeFromFont()
101           to this in order to use stepperControlSizeForFont() instead of
102           controlSizeForFont().
103         (WebCore::sizeFromFont): Just calls sizeFromNSControlSize() with
104           sizeFromFont(). No behavior changes.
105         (WebCore::stepperSizes): Returns sizes for mini, small, and regular.
106         (WebCore::stepperControlSizeForFont):
107           Dedicated version of controlSizeForFont().
108         (WebCore::stepper): Returns NSStepperCell object with specified settings.
109         (WebCore::paintStepper):
110         (WebCore::ThemeMac::controlSize): Support for OuterSpinButton.
111         (WebCore::ThemeMac::minimumControlSize): ditto.
112         (WebCore::ThemeMac::inflateControlPaintRect): ditto.
113         (WebCore::ThemeMac::paint): ditto.
114         * rendering/RenderBox.cpp:
115         (WebCore::RenderBox::paintBoxDecorations):
116           Move the content to paintBoxDecorationsWithSize().
117         (WebCore::RenderBox::paintBoxDecorationsWithSize):
118         * rendering/RenderBox.h: Declare paintBoxDecorationsWithSize().
119         * rendering/RenderTextControlSingleLine.cpp:
120         (WebCore::RenderTextControlSingleLine::~RenderTextControlSingleLine):
121         (WebCore::RenderTextControlSingleLine::paintBoxDecorations):
122           Call paintBoxDecorationsWithSize() with smaller width by decorationWidthRight().
123         (WebCore::RenderTextControlSingleLine::addFocusRingRects):
124           Add a rectangle of which width is smaller by decorationWidthRight().
125         (WebCore::RenderTextControlSingleLine::layout):
126           Adjust m_outerSpinButton position.
127         (WebCore::RenderTextControlSingleLine::styleDidChange):
128         (WebCore::RenderTextControlSingleLine::textBlockWidth):
129         (WebCore::RenderTextControlSingleLine::decorationWidthRight):
130         (WebCore::RenderTextControlSingleLine::preferredDecorationWidthRight):
131         (WebCore::RenderTextControlSingleLine::createSubtreeIfNeeded):
132           Creates an element for m_outerSpinButton if it is needed.
133         (WebCore::RenderTextControlSingleLine::createInnerTextStyle):
134         (WebCore::RenderTextControlSingleLine::createOuterSpinButtonStyle):
135         * rendering/RenderTextControlSingleLine.h: Declare new methods and m_outerSpinButton.
136         * rendering/RenderThemeMac.mm:
137         (WebCore::RenderThemeMac::adjustRepaintRect): Support for OuterSpinButton.
138
139 2010-04-29  Adam Barth  <abarth@webkit.org>
140
141         Unreviewed.  Update JSC CodeGenerator baseline.  Not sure how I missed
142         this one earlier.
143
144         * bindings/scripts/test/JS/JSTestObj.cpp:
145         (WebCore::jsTestObjPrototypeFunctionSerializedValue):
146
147 2010-04-29  Justin Garcia  <justin.garcia@apple.com>
148
149         Reviewed by Adele Peterson.
150
151         Need to updateLayout after typing commands too
152         https://bugs.webkit.org/show_bug.cgi?id=38352
153
154         Replaced !m_parent checks in EditCommand.cpp by the more descriptive isTopLevelCommand().
155         Move the post editing operation updateLayout() call to {un,re}appliedEditing so that text insertions,
156         which don't go through EditCommand::{un,re}apply() can benefit from it too.  No test case possible
157         since most platforms have a layout performed as a side effect of post operation selection code.
158
159         * editing/EditCommand.cpp:
160         (WebCore::EditCommand::apply):
161         (WebCore::EditCommand::unapply):
162         (WebCore::EditCommand::reapply):
163         * editing/EditCommand.h:
164         (WebCore::EditCommand::isTopLevelCommand):
165         * editing/Editor.cpp:
166         (WebCore::Editor::appliedEditing):
167         (WebCore::Editor::unappliedEditing):
168         (WebCore::Editor::reappliedEditing):
169
170 2010-04-29  Dan Bernstein  <mitz@apple.com>
171
172         Reviewed by Simon Fraser.
173
174         <rdar://problem/7918086> REGRESSION (r57820): Controller is not displayed in window when opening a MP3 file in browser window
175         https://bugs.webkit.org/show_bug.cgi?id=38350
176
177         Tests: media/audio-only-video-intrinsic-size.html
178                media/media-document-audio-size.html
179
180         * rendering/RenderVideo.cpp:
181         (WebCore::RenderVideo::RenderVideo): Until metadata is available, ignore the natural size
182         reported by the player.
183         (WebCore::RenderVideo::videoSizeChanged): Respect a natural size of zero if reported by the
184         player, except in standalone media documents.
185
186 2010-04-29  Anders Carlsson  <andersca@apple.com>
187
188         Reviewed by Dan Bernstein.
189
190         First part of
191         https://bugs.webkit.org/show_bug.cgi?id=20784
192         move npapi.h to C99 integer types.
193
194         Add nptypes.h to the build.
195
196         * WebCore.xcodeproj/project.pbxproj:
197         * bridge/npapi.h:
198         * bridge/npruntime.h:
199         * bridge/nptypes.h: Added.
200
201 2010-04-29  Xan Lopez  <xlopez@igalia.com>
202
203         Rubber-stamped by Adam Barth.
204
205         Update GObject bindings test results. We are actually moving
206         backwards here, but we'll update them again when we figure out
207         what broke.
208
209         * bindings/scripts/test/GObject/WebKitDOMTestObj.cpp:
210         (webkit_dom_test_obj_set_property):
211         (webkit_dom_test_obj_get_property):
212
213 2010-04-29  Sam Weinig  <sam@webkit.org>
214
215         Reviewed by Anders Carlsson.
216
217         Fix for https://bugs.webkit.org/show_bug.cgi?id=38277
218         MiniBrowser: -[WebCoreFlippedView currentEditor]: unrecognized selector
219
220         * platform/mac/ThemeMac.mm:
221         (-[WebCoreFlippedView currentEditor]): Added currentEditor nil implementation.
222
223 2010-04-29  Adam Barth  <abarth@webkit.org>
224
225         Reviewed by Eric Seidel.
226
227         CodeGeneratorJS.pm should be consistent about castedThis versus castedThisObj
228         https://bugs.webkit.org/show_bug.cgi?id=38338
229
230         Currently CodeGeneratorJS.pm uses castThis for methods and
231         castedThisObj for attributes.  This inconsistency makes it difficult to
232         factor common code genereration code into methods shared by both kinds
233         of bindings.  This match aligns the names so that a future patch (e.g.,
234         in https://bugs.webkit.org/show_bug.cgi?id=38313) can reduce copy/paste
235         code.
236
237         * bindings/scripts/CodeGeneratorJS.pm:
238         * bindings/scripts/test/JS/JSTestObj.cpp:
239         (WebCore::setJSTestObjIntAttr):
240         (WebCore::setJSTestObjLongLongAttr):
241         (WebCore::setJSTestObjUnsignedLongLongAttr):
242         (WebCore::setJSTestObjStringAttr):
243         (WebCore::setJSTestObjTestObjAttr):
244         (WebCore::setJSTestObjAttrWithException):
245         (WebCore::setJSTestObjAttrWithSetterException):
246         (WebCore::setJSTestObjAttrWithGetterException):
247         (WebCore::jsTestObjPrototypeFunctionVoidMethod):
248         (WebCore::jsTestObjPrototypeFunctionVoidMethodWithArgs):
249         (WebCore::jsTestObjPrototypeFunctionIntMethod):
250         (WebCore::jsTestObjPrototypeFunctionIntMethodWithArgs):
251         (WebCore::jsTestObjPrototypeFunctionObjMethod):
252         (WebCore::jsTestObjPrototypeFunctionObjMethodWithArgs):
253         (WebCore::jsTestObjPrototypeFunctionMethodWithException):
254         (WebCore::jsTestObjPrototypeFunctionCustomMethod):
255         (WebCore::jsTestObjPrototypeFunctionCustomMethodWithArgs):
256         (WebCore::jsTestObjPrototypeFunctionCustomArgsAndException):
257         (WebCore::jsTestObjPrototypeFunctionAddEventListener):
258         (WebCore::jsTestObjPrototypeFunctionRemoveEventListener):
259         (WebCore::jsTestObjPrototypeFunctionWithDynamicFrame):
260         (WebCore::jsTestObjPrototypeFunctionWithDynamicFrameAndArg):
261         (WebCore::jsTestObjPrototypeFunctionWithDynamicFrameAndOptionalArg):
262         (WebCore::jsTestObjPrototypeFunctionWithDynamicFrameAndUserGesture):
263         (WebCore::jsTestObjPrototypeFunctionWithDynamicFrameAndUserGestureASAD):
264         (WebCore::jsTestObjPrototypeFunctionWithScriptStateVoid):
265         (WebCore::jsTestObjPrototypeFunctionWithScriptStateObj):
266         (WebCore::jsTestObjPrototypeFunctionWithScriptStateVoidException):
267         (WebCore::jsTestObjPrototypeFunctionWithScriptStateObjException):
268         (WebCore::jsTestObjPrototypeFunctionMethodWithOptionalArg):
269         (WebCore::jsTestObjPrototypeFunctionMethodWithNonOptionalArgAndOptionalArg):
270         (WebCore::jsTestObjPrototypeFunctionMethodWithNonOptionalArgAndTwoOptionalArgs):
271
272 2010-04-29  Gustavo Noronha Silva  <gustavo.noronhaollabora.co.uk>
273
274         Reviewed by Xan Lopez.
275
276         [GTK] pointerCursor should use the default cursor set for the window, not GDK_LEFT_PTR
277         https://bugs.webkit.org/show_bug.cgi?id=36963
278
279         Use the default cursor instead of hard-coding left pointer.
280
281         * platform/gtk/CursorGtk.cpp:
282         (WebCore::Cursor::Cursor):
283         (WebCore::pointerCursor):
284
285 2010-04-29  Ilya Tikhonovsky  <loislo@chromium.org>
286
287         Reviewed by Yury Semikhatsky.
288
289         WebInspector: If Timeline panel is in recording mode and is not visible and has received
290         new events then these events do not appear in the panel when the panel becomes visible.
291         Timeline popup may appear in the upper left window corner when you switch to another panel.
292         https://bugs.webkit.org/show_bug.cgi?id=38322
293
294         * inspector/front-end/Popover.js:
295         (WebInspector.PopoverHelper.prototype._mouseMove.doHide):
296         (WebInspector.PopoverHelper.prototype._mouseMove):
297         (WebInspector.PopoverHelper.prototype.hidePopup):
298         (WebInspector.PopoverHelper.prototype._hidePopup):
299         * inspector/front-end/TimelinePanel.js:
300         (WebInspector.TimelinePanel.prototype.show):
301         (WebInspector.TimelinePanel.prototype._scheduleRefresh):
302         (WebInspector.TimelinePanel.prototype._refresh):
303
304 2010-04-29  Anton Muhin  <antonm@chromium.org>
305
306         Reviewed by Darin Adler.
307
308         Let's cache nodelists instead of DynamicNodeList::Caches
309         https://bugs.webkit.org/show_bug.cgi?id=33696
310
311         Test: fast/dom/Element/node-list-identity.html
312
313         * bindings/js/JSNodeCustom.cpp:
314         (WebCore::JSNode::markChildren): Mark all cached node lists as well
315         * dom/ClassNodeList.cpp:
316         (WebCore::ClassNodeList::ClassNodeList): Don't need DynamicNodeList::Caches argument any more
317         (WebCore::ClassNodeList::~ClassNodeList): Remove from the cache
318         * dom/ClassNodeList.h: Added a field with original class names to be used as a key for removal from the cache
319         (WebCore::ClassNodeList::create): Don't need DynamicNodeList::Caches argument any more
320         * dom/NameNodeList.cpp:
321         (WebCore::NameNodeList::NameNodeList): Don't need DynamicNodeList::Caches argument any more
322         (WebCore::NameNodeList::~NameNodeList): Remove from the cache
323         * dom/NameNodeList.h:
324         (WebCore::NameNodeList::create): Don't need DynamicNodeList::Caches argument any more
325         * dom/Node.cpp:
326         (WebCore::Node::removeCachedClassNodeList): Remove ClassNodeList from the cache
327         (WebCore::Node::removeCachedNameNodeList): Remove NameNodeList from the cache
328         (WebCore::Node::removeCachedTagNodeList): Remove TagNodeList from the cache
329         (WebCore::Node::getElementsByTagNameNS): Switch to caching node lists themselves, not the data
330         (WebCore::Node::getElementsByName): Switch to caching node lists themselves, not the data
331         (WebCore::Node::getElementsByClassName): Switch to caching node lists themselves, not the data
332         (WebCore::NodeListsNodeData::invalidateCaches): Switch to caching node lists themselves, not the data
333         (WebCore::NodeListsNodeData::invalidateCachesThatDependOnAttributes): Switch to caching node lists themselves, not the data
334         (WebCore::NodeListsNodeData::isEmpty): Switch to caching node lists themselves, not the data
335         (WebCore::markNodeLists): Helper to mark all the node lists in the cache
336         (WebCore::Node::markCachedNodeListsSlow): Mark all the cached node lists if any could be present
337         * dom/Node.h:
338         (WebCore::Node::markCachedNodeLists): Fast-path marking of cached node lists---bails out if there is no rare data
339         * dom/NodeRareData.h: Changed type of caches to hold raw pointers to node lists, not RefPtr's to data
340         * dom/TagNodeList.cpp:
341         (WebCore::TagNodeList::TagNodeList): Don't need DynamicNodeList::Caches argument any more
342         (WebCore::TagNodeList::~TagNodeList): Remove from the cache
343         * dom/TagNodeList.h:
344         (WebCore::TagNodeList::create): Don't need DynamicNodeList::Caches argument any more
345
346 2010-04-29  Mikhail Naganov  <mnaganov@chromium.org>
347
348         Reviewed by Yury Semikhatsky.
349
350         [Chromium] Update ScriptProfileNode to retrieve execution time in milliseconds.
351
352         https://bugs.webkit.org/show_bug.cgi?id=38330
353
354         * bindings/v8/ScriptProfileNode.cpp:
355         (WebCore::ScriptProfileNode::totalTime):
356         (WebCore::ScriptProfileNode::selfTime):
357
358 2010-04-28  Dimitri Glazkov  <dglazkov@chromium.org>
359
360         Reviewed by Darin Adler.
361
362         A form without a submit button unexpectedly performs its action when Return is pressed
363         https://bugs.webkit.org/show_bug.cgi?id=9756
364
365         Implemented implicit form submission algorithm as defined in HTML5 spec:
366         http://www.whatwg.org/specs/web-apps/current-work/multipage/association-of-controls-and-forms.html#implicit-submission,
367         falling back to match IE's behavior in the edge cases.
368
369         The underlying rules are:
370
371         * If the form has no enabled submit buttons, submit if Enter/Return is pressed on the only single-line text field.
372
373         * Otherwise, submit form using first enabled submit button if Enter/Return is pressed on a field
374           that's not a textarea or a select.
375
376         Test: fast/forms/implicit-submission.html
377
378         * dom/SelectElement.cpp:
379         (WebCore::SelectElement::menuListDefaultEventHandler): Ripped out implicit submission for select elements.
380         (WebCore::SelectElement::listBoxDefaultEventHandler): Ditto.
381         (WebCore::SelectElement::defaultEventHandler): Ditto.
382         * dom/SelectElement.h: Ditto.
383         (WebCore::HTMLFormElement::submitImplicitly): Renamed submitClick to submitImplicitly to better match HTML5 spec
384             language, changed the logic to match the rules above.
385         * html/HTMLInputElement.cpp:
386         (WebCore::HTMLInputElement::defaultEventHandler): Reamed clickDefaultButton to implicitSubmission to better match
387             HTML5 spec language, made radio element to trigger implicit submission.
388         * html/HTMLSelectElement.cpp:
389         (WebCore::HTMLSelectElement::defaultEventHandler): Removed passing of form() as parameter, because it's no longer
390             necessary.
391
392 2010-04-29  Paweł Hajdan, Jr.  <phajdan.jr@chromium.org>
393
394         Reviewed by Jeremy Orlow.
395
396         Fix building with libpng-1.4.
397         https://bugs.webkit.org/show_bug.cgi?id=33287
398
399         No new tests (no behavior change).
400
401         Original patch by John Bowler <jbowler@acm.org>
402
403         * platform/image-encoders/skia/PNGImageEncoder.cpp:
404         (WebCore::PNGImageEncoder::encode):
405
406 2010-04-29  Adam Langley  <agl@chromium.org>
407
408         Reviewed by David Levin.
409
410         This patch adds support for WOFF in Chromium. Since Chromium
411         already transcodes all OpenType files for security reasons we
412         are adding WOFF support into the transcoder.
413
414         https://bugs.webkit.org/show_bug.cgi?id=38217
415
416         * css/CSSFontFaceSrcValue.cpp:
417         (WebCore::CSSFontFaceSrcValue::isSupportedFormat):
418           Recognise "woff" as a font-face format value (guarded by
419           ENABLE(OPENTYPE_SANITIZER) at this point)
420         * platform/graphics/opentype/OpenTypeSanitizer.cpp:
421         (WebCore::OpenTypeSanitizer::sanitize):
422           Change so that the transcoded font can be larger than the original.
423           (WOFF files are compressed, so the transcoded TTF is typically
424           larger.)
425
426 2010-04-29  Alex Milowski  <alex@milowski.com>
427
428         Reviewed by Kenneth Rohde Christiansen.
429
430         Updates to the Qt build to enable building MathML support.
431
432         * WebCore.pri:
433         * WebCore.pro:
434
435 2010-04-29  Xan Lopez  <xlopez@igalia.com>
436
437         Reviewed by Gustavo Noronha.
438
439         [GTK] GObject DOM bindings
440         https://bugs.webkit.org/show_bug.cgi?id=33590
441
442         Do not generate unneeded boilerplate in {get,set}_property methods
443         when there are no properties to generate code for. This gets rid
444         of lots of compiler warnings.
445
446         * bindings/scripts/CodeGeneratorGObject.pm:
447
448 2010-04-29  Simon Hausmann  <simon.hausmann@nokia.com>
449
450         Reviewed by Kenneth Rohde Christiansen.
451
452         [Qt] Speed up text layouting
453         https://bugs.webkit.org/show_bug.cgi?id=31719
454
455         Use QFontMetrics::width() for the text width calculation instead
456         of QTextLayout. This avoids expensive bearing calculations and the
457         line breaking code.
458
459         * platform/graphics/qt/FontQt.cpp:
460         (WebCore::Font::floatWidthForComplexText):
461
462 2010-04-29  Kwang Yul Seo  <skyul@company100.net>
463
464         Reviewed by Simon Hausmann.
465
466         [WINCE] Export g_stackBase with JS_EXPORTDATA
467         https://bugs.webkit.org/show_bug.cgi?id=37437
468
469         Declare g_stackBase with JS_EXPORTDATA as it is imported from JavaScriptCore.
470
471         * platform/wince/SharedTimerWince.cpp:
472
473 2010-04-29  Adam Barth  <abarth@webkit.org>
474
475         Reviewed by Maciej Stachowiak.
476
477         Remove custom bindings for PopStateEvent.initPopStateEvent
478         https://bugs.webkit.org/show_bug.cgi?id=38311
479
480         Our code generation of SerializedScriptValue was slightly buggy, but
481         it's easy to fix.  Notice that the conversion to an atomic string is
482         handled by the C++ type system and doesn't require logic in the code
483         generator.
484
485         * bindings/js/JSPopStateEventCustom.cpp:
486         * bindings/scripts/CodeGeneratorJS.pm:
487         * bindings/scripts/CodeGeneratorV8.pm:
488         * bindings/scripts/test/GObject/WebKitDOMTestObj.cpp:
489         (webkit_dom_test_obj_serialized_value):
490         * bindings/scripts/test/GObject/WebKitDOMTestObj.h:
491         * bindings/scripts/test/JS/JSTestObj.cpp:
492         (WebCore::):
493         (WebCore::jsTestObjPrototypeFunctionSerializedValue):
494         * bindings/scripts/test/JS/JSTestObj.h:
495         * bindings/scripts/test/ObjC/DOMTestObj.h:
496         * bindings/scripts/test/ObjC/DOMTestObj.mm:
497         (-[DOMTestObj serializedValue:]):
498         * bindings/scripts/test/TestObj.idl:
499         * bindings/scripts/test/V8/V8TestObj.cpp:
500         (WebCore::TestObjInternal::serializedValueCallback):
501         (WebCore::ConfigureV8TestObjTemplate):
502         * bindings/v8/custom/V8PopStateEventCustom.cpp:
503         * dom/PopStateEvent.idl:
504
505 2010-04-29  Kent Tamura  <tkent@chromium.org>
506
507         Reviewed by Darin Adler.
508
509         Fix a bug that selection drag-and-drop doesn't work for input/textarea.
510         https://bugs.webkit.org/show_bug.cgi?id=38175
511
512         The code supposed the selected region was in the destination text
513         field. It is not true in a case of drag-and-drop.
514
515         Test: editing/pasteboard/drag-drop-input-textarea.html
516
517         * dom/InputElement.cpp:
518         (WebCore::InputElement::handleBeforeTextInsertedEvent):
519         * html/HTMLTextAreaElement.cpp:
520         (WebCore::HTMLTextAreaElement::handleBeforeTextInsertedEvent):
521
522 2010-04-29  Adam Barth  <abarth@webkit.org>
523
524         Reviewed by Maciej Stachowiak.
525
526         Remove custom bindings for NodeFilter.acceptNode
527         https://bugs.webkit.org/show_bug.cgi?id=38309
528
529         This "custom" code was just an instance of the CallWith=ScriptState
530         pattern.  Also, it looks like V8 just had a garbage implemenation that
531         did nothing.
532
533         * WebCore.gypi:
534         * bindings/js/JSNodeFilterCustom.cpp:
535         * bindings/v8/custom/V8NodeFilterCustom.cpp: Removed.
536         * dom/NodeFilter.idl:
537
538 2010-04-29  Noam Rosenthal  <noam.rosenthal@nokia.com>
539
540         Reviewed by Laszlo Gombos.
541
542         [Qt] QtWebkit doesn't link with 3D canvas
543         https://bugs.webkit.org/show_bug.cgi?id=38299
544
545         Added implementation for GraphicsContext3D::isGLES2Compliant, which returns the correct value based on a Qt #define.
546
547         No new tests: build fix
548
549         * platform/graphics/qt/GraphicsContext3DQt.cpp:
550         (WebCore::GraphicsContext3D::isGLES2Compliant):
551
552 2010-04-29  Simon Hausmann  <simon.hausmann@nokia.com>
553
554         Reviewed by Tor Arne Vestbø.
555
556         [Qt] REGRESSION(r57638): tst_qwebframe::objectDeleted() fails
557         https://bugs.webkit.org/show_bug.cgi?id=38316
558
559         Accessing properties of a deleted objects doesn't throw an exception
560         anymore.
561
562         Continue to expose the QObject class wrapper for objects that
563         previously existed but don't exist anymore. QtClass is safe to
564         use with a deleted QObject.
565
566         * bridge/qt/qt_instance.cpp:
567         (JSC::Bindings::QtInstance::getClass): Return null only if m_class
568         doesn't exist yet and there's no m_object.
569
570 2010-04-29  Noam Rosenthal  <noam.rosenthal@nokia.com>
571
572         Reviewed by Simon Hausmann.
573
574         Reverse animations don't work in some use cases        
575         https://bugs.webkit.org/show_bug.cgi?id=38075
576
577         This was due to a code path special-casing reverse animations, that became obselete when we aligned our animation code
578         with the CA implementation. That special case code path is now a bug - and this patch removes it.
579
580         http://staff.washington.edu/fmf/2009/03/25/iphone-3d-css-transformations/ now runs the reverse
581         animation correctly.
582
583         * platform/graphics/qt/GraphicsLayerQt.cpp:
584         (WebCore::TransformAnimationQt::applyFrame):
585
586 2010-04-29  Jan Hanssen  <jhanssen@codeaurora.org>
587
588         Reviewed by Adam Barth.
589
590         HTMLOptionElement::ownerSelectElement() needs to consider keygen elements
591         https://bugs.webkit.org/show_bug.cgi?id=26016
592
593         Patch written by Grace Kloba <klobag@gmail.com>, test fixed by me.
594
595         Test: fast/dom/HTMLKeygenElement/keygen-option-select.html
596
597         * html/HTMLOptionElement.cpp:
598         (WebCore::HTMLOptionElement::ownerSelectElement):
599         Make HTMLOptionElement::ownerSelectElement() consider the keygen element in addition to the current select element.
600
601 2010-04-29  Gustavo Sverzut Barbieri  <barbieri@profusion.mobi>
602
603         Reviewed by Eric Seidel.
604
605         Add EFL-specific code to Widget.h and move the empty
606         frameRectsChanged() definition to Widget.cpp, since the EFL port
607         needs to override that.
608         http://webkit.org/b/36317
609
610         No new tests required.
611
612         * WebCore.base.exp:
613         * platform/Widget.cpp:
614         (WebCore::Widget::frameRectsChanged):
615         * platform/Widget.h:
616
617 2010-04-29  Jarkko Sakkinen  <jarkko.j.sakkinen@gmail.com>
618
619         Reviewed by Simon Hausmann.
620
621         [Qt] GraphicsContext3DQt.cpp does not implement isGLES2Compliant() 
622         https://bugs.webkit.org/show_bug.cgi?id=38216
623
624         * platform/graphics/qt/GraphicsContext3DQt.cpp:
625         (WebCore::GraphicsContext3D::isGLES2Compliant):
626
627 2010-04-29  Zhenyao Mo  <zmo@google.com>
628
629         Reviewed by Dimitri Glazkov.
630
631         Remove the unnecessary texImage2D function with Image as input in GraphicsContext3D
632         https://bugs.webkit.org/show_bug.cgi?id=38235
633
634         * html/canvas/WebGLRenderingContext.cpp:
635         (WebCore::WebGLRenderingContext::texImage2D): Add extractImageData; add a common entry point for texImage2D with image input.
636         (WebCore::WebGLRenderingContext::texImage2DBase): Add this function as the common entry point for texImage2D.
637         (WebCore::WebGLRenderingContext::texSubImage2D): Add extractImageData; add a common entry point for texSubImage2D with image input.
638         (WebCore::WebGLRenderingContext::texSubImage2DBase): Add this function as the common entry point for texSubImage2D.
639         * html/canvas/WebGLRenderingContext.h: Add tex*Image{Base/Image} function declaration.
640         * platform/graphics/GraphicsContext3D.h: Remove tex*Image declaration with Image input.
641         * platform/graphics/mac/GraphicsContext3DMac.cpp: Remove tex*Image implementation with Image input.
642         (WebCore::GraphicsContext3D::texImage2D):
643         (WebCore::GraphicsContext3D::texSubImage2D):
644
645 2010-04-29  Noam Rosenthal  <noam.rosenthal@nokia.com>
646
647         Reviewed by Simon Hausmann.
648
649         [Qt] GraphicsLayer: flicker when starting an animation before the previous one ended.
650         https://bugs.webkit.org/show_bug.cgi?id=38076
651
652         This was due to the cude in the removeAnimations functions, which called deleteLater() without stopping the
653         animation synchronously. The delay between the call to that function and the actual call to the animation's destructor
654         is when the flicker occured. We fix this by calling stop() synchronously, and making sure that the value is reverted
655         upon stop (updateState) and not upon the object's destruction.
656
657         http://staff.washington.edu/fmf/2009/03/25/iphone-3d-css-transformations/ now doesn't flicker when
658         the animation is toggled frequently.
659
660         * platform/graphics/qt/GraphicsLayerQt.cpp:
661         (WebCore::TransformAnimationQt::~TransformAnimationQt):
662         (WebCore::TransformAnimationQt::applyFrame):
663         (WebCore::TransformAnimationQt::updateState):
664         (WebCore::OpacityAnimationQt::~OpacityAnimationQt):
665         (WebCore::OpacityAnimationQt::updateState):
666         (WebCore::GraphicsLayerQt::removeAnimationsForProperty):
667         (WebCore::GraphicsLayerQt::removeAnimationsForKeyframes):
668
669 2010-04-28  Luiz Agostini  <luiz.agostini@openbossa.org>
670
671         Reviewed by Simon Fraser.
672
673         Media queries empty values
674         https://bugs.webkit.org/show_bug.cgi?id=38116
675
676         Adding isValid() method to MediaQueryExp to make it possible to differentiate
677         between queries with empty values and queries with invalid values.
678
679         Test: fast/media/media-query-invalid-value.html
680
681         * css/MediaQueryEvaluator.cpp:
682         (WebCore::MediaQueryEvaluator::eval):
683         * css/MediaQueryExp.cpp:
684         (WebCore::MediaQueryExp::MediaQueryExp):
685         * css/MediaQueryExp.h:
686         (WebCore::MediaQueryExp::isValid):
687
688 2010-04-28  Pavel Feldman  <pfeldman@chromium.org>
689
690         Reviewed by Yury Semikhatsky.
691
692         Web Inspector: Allow editing script resources when resource tracking is enabled.
693
694         https://bugs.webkit.org/show_bug.cgi?id=38269
695
696         * inspector/front-end/ScriptView.js:
697         * inspector/front-end/ScriptsPanel.js:
698         (WebInspector.ScriptsPanel.prototype.canEditScripts):
699         (WebInspector.ScriptsPanel.prototype.editScriptSource):
700         * inspector/front-end/SourceFrame.js:
701         (WebInspector.SourceFrame.prototype.get textModel):
702         * inspector/front-end/SourceView.js:
703         (WebInspector.SourceView):
704         (WebInspector.SourceView.prototype._addBreakpoint):
705         (WebInspector.SourceView.prototype._editLine):
706         (WebInspector.SourceView.prototype._editLineComplete):
707         (WebInspector.SourceView.prototype._sourceIDForLine):
708
709 2010-04-25  Antonio Gomes  <tonikitoo@webkit.org>
710
711         Reviewed by Darin Adler.
712
713         Clicking a scrollbar blurs the currently focused element
714         https://bugs.webkit.org/show_bug.cgi?id=16809
715
716         WebKit ports that do not use native (platform) widgets for rendering the scrollbars
717         are currently mismatching a common behaviour of other browser vendors (including
718         Firefox and Opera): clicking on a frame scrollbar *should not* steal focus from content.
719         WebKit browsers based ports that do use WebCore for handling scrollbars, like QtWebKit for
720         instance, can observe the opposite behaviour.
721
722         Patch fixes this behaviour by checking if current MouseDown event targets a frame scrollbar.
723         If that is the case, it bails out and do not change focus behavior at all.
724
725         It is important to note that the given way this is implemented by this patch, non-frame
726         scrollbars (e.g. a vertical scrollbar of an overflowed textareas or divs) will keep working
727         in the same way as it works currently.
728
729         Tests: scrollbars/scrollbar-click-does-not-blur-content.html
730                scrollbars/scrollbar-iframe-click-does-not-blur-content.html
731
732         * page/EventHandler.cpp:
733         (WebCore::EventHandler::dispatchMouseEvent):
734
735 2010-04-28  Dan Bernstein  <mitz@apple.com>
736
737         Rubber-stamped by Maciej Stachowiak.
738
739         Try to fix test failures seen on the Leopard build bot after r58467
740
741         * platform/graphics/SimpleFontData.cpp:
742         (WebCore::SimpleFontData::platformGlyphInit): Initialize m_zeroWidthSpaceGlyph before
743         calling widthForGlyph(), as the latter uses the former.
744
745 2010-04-28  Martin Robinson  <mrobinson@webkit.org>
746
747         Reviewed by Gustavo Noronha.
748
749         [GTK] Enable DOM clipboard and drag-and-drop access
750         https://bugs.webkit.org/show_bug.cgi?id=30623
751
752         Make ClipboardGtk a "live" DataTransfer object, able to modify
753         the clipboard when setData(...) is called.
754
755         * platform/gtk/ClipboardGtk.cpp:
756         (WebCore::Editor::newGeneralClipboard): Pass the GtkClipboard into the factory method.
757         (WebCore::ClipboardGtk::ClipboardGtk): Create two separate constructors, one for DnD data and one for clipboard data.
758         (WebCore::dataObjectTypeFromHTMLClipboardType): Added.
759         (WebCore::ClipboardGtk::clearData): Clear the member DataObject, optionally write the clipboard.
760         (WebCore::ClipboardGtk::clearAllData): Ditto.
761         (WebCore::joinURIList): Added.
762         (WebCore::ClipboardGtk::getData): Get the data from the clipboard, if possible.
763         (WebCore::ClipboardGtk::setData): Write data to the DataObject and maybe the clipboard.
764         (WebCore::ClipboardGtk::types): Read the clipboard/DataObject to find applicable types.
765         (WebCore::ClipboardGtk::files): Read the clipboard/DataObject to find the files.
766         (WebCore::ClipboardGtk::writeURL): Write to the DataObject and maybe the clipboard.
767         (WebCore::ClipboardGtk::writeRange): Ditto.
768         (WebCore::ClipboardGtk::writePlainText): Ditto.
769         (WebCore::ClipboardGtk::hasData): Query the clipboard/DataObject.
770         * platform/gtk/ClipboardGtk.h: 
771         (WebCore::ClipboardGtk::create): Added one factory for pasteboard-backed DataObjects and one for DnD-backed objects.
772         * platform/gtk/DataObjectGtk.cpp:
773         (WebCore::replaceNonBreakingSpaceWithSpace): Added this helper function to clean &nbsp; from plain text.
774         (WebCore::DataObjectGtk::markup): Actually return the range if it's set.
775         (WebCore::DataObjectGtk::setText): Clean &nbsp; from plain text.
776         (WebCore::DataObjectGtk::clearText): Added.
777         (WebCore::DataObjectGtk::clearMarkup): Added.
778         * platform/gtk/DataObjectGtk.h:
779         (WebCore::DataObjectGtk::clearURIList): Added.
780         (WebCore::DataObjectGtk::clearImage): Added.
781         * platform/gtk/PasteboardHelper.cpp:
782         (WebCore::PasteboardHelper::initializeTargetList): Added target ID's for URI list and Netscape URL targets.
783         (WebCore::urisToKURLVector): Added.
784         (WebCore::PasteboardHelper::getClipboardContents): Added.
785         (WebCore::PasteboardHelper::fillSelectionData): Added logic for URI lists and Netscape URLs.
786         (WebCore::PasteboardHelper::targetListForDataObject): Ditto.
787         * platform/gtk/PasteboardHelper.h: Added default argument to writeClipboardContents and new method.
788
789 2010-04-28  Martin Robinson  <mrobinson@webkit.org>
790
791         Reviewed by Gustavo Noronha.
792
793         [GTK] Enable DOM clipboard and drag-and-drop access
794         https://bugs.webkit.org/show_bug.cgi?id=30623
795
796         Use the length of the UTF-8 markup data in bytes when filling GtkSelectionData.
797
798         No new tests, because pasteboard DataTransfer tests will be enabled
799         with the completion of the GTK+ DataTransfer object.
800
801         * platform/gtk/PasteboardGtk.cpp:
802         (WebCore::clipboard_get_contents_cb): Use strlen here instead of g_utf8_strlen.
803
804 2010-04-28  Dan Bernstein  <mitz@apple.com>
805
806         Reviewed by Adele Peterson.
807
808         More of <rdar://problem/7855777> REGRESSION: Memory usage increase caused by storing glyph bounds in GlyphMetricsMap
809         https://bugs.webkit.org/show_bug.cgi?id=37936
810
811         Assigning zero width and empty bounds to the ZERO WIDTH SPACE glyph often allocates a width map
812         page and a bounds map page for the glyph, each of which pages contains 255 unused entries. Save
813         this space by not storing the zero width and empty bounds in the metrics maps.
814
815         * platform/graphics/SimpleFontData.cpp:
816         (WebCore::SimpleFontData::SimpleFontData): Initialize m_zeroWidthSpaceGlyph.
817         (WebCore::SimpleFontData::platformGlyphInit): Set m_zeroWidthSpaceGlyph. Don’t create entries
818         for the ZERO WIDTH SPACE glyph in the width map and in the bounds map.
819         * platform/graphics/SimpleFontData.h:
820         (WebCore::SimpleFontData::boundsForGlyph): Return empty bounds for the ZERO WIDTH SPACE glyph
821         without consulting the bounds map.
822         (WebCore::SimpleFontData::widthForGlyph): Return zero for the ZERO WIDTH SPACE glyph without
823         consulting the width map.
824
825 2010-04-28  Mark Rowe  <mrowe@apple.com>
826
827         Reviewed by Adele Peterson.
828
829         <rdar://problem/7847573> Safari welcome page logs JavaScript exception during page load
830
831         The Safari welcome page runs afoul of the same-origin restriction on access to stylesheet rules
832         that was added to address <https://bugs.webkit.org/show_bug.cgi?id=20527>. To work around this we're
833         adding a temporary site-specific quirk that relaxes this restriction for the particular cross-origin
834         access that occurs on the Safari welcome page.
835
836         * css/CSSStyleSheet.cpp:
837         (WebCore::CSSStyleSheet::cssRules):
838
839 2010-04-28  Mike Thole  <mthole@apple.com>
840
841         Reviewed by Mark Rowe.
842
843         Add separate exports file for symbols dependent on WTF_USE_PROTECTION_SPACE_AUTH_CALLBACK.
844
845         * DerivedSources.make: Updated for WebCore.ProtectionSpaceAuthCallback.exp.
846         * WebCore.ProtectionSpaceAuthCallback.exp: Added.
847         * WebCore.xcodeproj/project.pbxproj:
848
849 2010-04-28  Evan Martin  <evan@chromium.org>
850
851         Reviewed by David Levin.
852
853         [chromium] revert getFontDataForCharacters change in r58341
854         https://bugs.webkit.org/show_bug.cgi?id=38288
855
856         It caused a performance regression.
857
858         * platform/chromium/ChromiumBridge.h:
859         * platform/graphics/chromium/FontCacheLinux.cpp:
860         (WebCore::FontCache::getFontDataForCharacters):
861
862 2010-04-28  Eric Seidel  <eric@webkit.org>
863
864         Unreviewed, rolling out r58441.
865         http://trac.webkit.org/changeset/58441
866         https://bugs.webkit.org/show_bug.cgi?id=37618
867
868         Broke 3 test on Qt.
869
870         * page/DragController.cpp:
871         (WebCore::DragController::tryDocumentDrag):
872         (WebCore::DragController::concludeEditDrag):
873         * page/DragController.h:
874         (WebCore::DragController::setDragInitiator):
875         (WebCore::DragController::dragInitiator):
876         (WebCore::DragController::documentUnderMouse):
877
878 2010-04-28  Darin Adler  <darin@apple.com>
879
880         Reviewed by Dan Bernstein.
881
882         Remove some obsolete scrolling code
883         https://bugs.webkit.org/show_bug.cgi?id=38293
884
885         * page/Chrome.cpp:
886         (WebCore::Chrome::scrollRectIntoView): Removed ScrollView* argument.
887         * page/Chrome.h: Made scrollRectIntoView non-virtual, and removed ScrollView* argument.
888
889         * page/FrameView.cpp: Removed scrollRectIntoViewRecursively.
890         * page/FrameView.h: Removed scrollRectIntoViewRecursively and made
891         setScrollPosition non-virtual, since there is no class derived from
892         this class, and ScrollView's setScrollPosition is non-virtual.
893
894         * platform/HostWindow.h: Removed scrollRectIntoView.
895
896         * platform/ScrollView.cpp:
897         (WebCore::ScrollView::scrollRectIntoViewRecursively): Updated comment
898         since I was able to do most of the tasks listed here.
899
900         * rendering/RenderLayer.cpp:
901         (WebCore::RenderLayer::scrollRectToVisible): Removed 0 passed for
902         ScrollView* argument to Chrome::scrollRectIntoView.
903
904 2010-04-28  Mike Thole  <mthole@apple.com>
905
906         Reviewed by David Kilzer.
907
908         Add canAuthenticateAgainstProtectionSpace() to frame loader so that a protection space 
909         can be inspected before attempting to authenticate against it
910         https://bugs.webkit.org/show_bug.cgi?id=38271
911
912         * loader/EmptyClients.h:
913         (WebCore::EmptyFrameLoaderClient::canAuthenticateAgainstProtectionSpace): Added.
914         * loader/FrameLoader.cpp:
915         (WebCore::FrameLoader::canAuthenticateAgainstProtectionSpace): Added.
916         * loader/FrameLoader.h:
917         * loader/FrameLoaderClient.h:
918         * loader/ResourceLoader.cpp:
919         (WebCore::ResourceLoader::canAuthenticateAgainstProtectionSpace): Added.
920         * loader/ResourceLoader.h:
921         (WebCore::ResourceLoader::canAuthenticateAgainstProtectionSpace): Added.
922         * platform/network/ProtectionSpace.h:
923         (WebCore::):
924         * platform/network/ResourceHandle.h:
925         * platform/network/ResourceHandleClient.h:
926         (WebCore::ResourceHandleClient::canAuthenticateAgainstProtectionSpace): Added.
927         * platform/network/mac/AuthenticationMac.mm:
928         (WebCore::mac):
929         Add cases for case ProtectionSpaceAuthenticationSchemeServerTrustEvaluationRequested and
930         ProtectionSpaceAuthenticationSchemeClientCertificateRequested.  Guarded with the
931         #if USE(PROTECTION_SPACE_AUTH_CALLBACK) as the new NSURLProtectionSpace constants don't
932         exist prior to Mac OS X 10.6.
933         (WebCore::core): Ditto.
934         * platform/network/mac/ResourceHandleMac.mm:
935         (WebCore::ResourceHandle::canAuthenticateAgainstProtectionSpace): Added.
936         (-[WebCoreResourceHandleAsDelegate connection:canAuthenticateAgainstProtectionSpace:]): Added.
937
938 2010-04-28  Abhishek Arya  <inferno@chromium.org>
939
940         Reviewed by Eric Seidel.
941
942         Convert m_documentUnderMouse, m_dragInitiator to RefPtr.
943         Eliminated unused m_dragInitiator accessor to prevent dereferencing.
944         https://bugs.webkit.org/show_bug.cgi?id=37618
945
946         Test: editing/pasteboard/drag-drop-iframe-refresh-crash.html
947
948         * page/DragController.cpp:
949         (WebCore::DragController::tryDocumentDrag):
950         (WebCore::DragController::concludeEditDrag):
951         * page/DragController.h:
952         (WebCore::DragController::draggingImageURL):
953         (WebCore::DragController::documentUnderMouse):
954
955 2010-04-28  Dumitru Daniliuc  <dumi@chromium.org>
956
957         Unreviewed, fixing a build problem introduced by the previous patch.
958
959         * storage/DatabaseSync.cpp:
960         (WebCore::DatabaseSync::openDatabaseSync):
961
962 2010-04-23  Dumitru Daniliuc  <dumi@chromium.org>
963
964         Reviewed by Jeremy Orlow.
965
966         Adding some required classes for the sync WebSQLDatabases API.
967         https://bugs.webkit.org/show_bug.cgi?id=34994
968
969         * GNUmakefile.am:
970         * WebCore.gypi:
971         * WebCore.pro:
972         * WebCore.vcproj/WebCore.vcproj:
973         * WebCore.xcodeproj/project.pbxproj:
974         * storage/DatabaseSync.cpp: Added.
975         (WebCore::DatabaseSync::databaseInfoTableName):
976         (WebCore::DatabaseSync::setIsAvailable):
977         (WebCore::DatabaseSync::isAvailable):
978         (WebCore::DatabaseSync::openDatabaseSync):
979         (WebCore::DatabaseSync::DatabaseSync):
980         (WebCore::DatabaseSync::~DatabaseSync):
981         (WebCore::DatabaseSync::version):
982         (WebCore::DatabaseSync::changeVersion):
983         (WebCore::DatabaseSync::transaction):
984         * storage/DatabaseSync.h: Added.
985         (WebCore::DatabaseSync::databaseDebugName):
986         * storage/SQLTransactionSync.cpp: Added.
987         (WebCore::SQLTransactionSync::create):
988         (WebCore::SQLTransactionSync::SQLTransactionSync):
989         (WebCore::SQLTransactionSync::~SQLTransactionSync):
990         (WebCore::SQLTransactionSync::executeSQL):
991         * storage/SQLTransactionSync.h: Added.
992         (WebCore::SQLTransactionSync::database):
993         (WebCore::SQLTransactionSync::isReadOnly):
994         * storage/SQLTransactionSyncCallback.h: Added.
995         (WebCore::SQLTransactionSyncCallback::~SQLTransactionSyncCallback):
996
997 2010-04-28  İsmail Dönmez  <ismail@namtrac.org>
998
999         Reviewed by Simon Hausmann.
1000
1001         Fix compilation with QT_NO_CURSOR defined.
1002
1003         * platform/qt/QWebPageClient.h:
1004         (QWebPageClient::resetCursor):
1005         (QWebPageClient::setCursor):
1006
1007 2010-04-28  Abhishek Arya  <inferno@chromium.org>
1008
1009         Reviewed by Alexey Proskuryakov.
1010
1011         Added a check to make sure that resources from a different https origin are not cached.
1012         https://bugs.webkit.org/show_bug.cgi?id=33456
1013
1014         Test: http/tests/appcache/different-https-origin-resource-main.html
1015
1016         * loader/appcache/ManifestParser.cpp:
1017         (WebCore::parseManifest):
1018
1019 2010-04-28  Sam Weinig  <sam@webkit.org>
1020
1021         Reviewed by Mark Rowe.
1022
1023         Only set -allowable_client WebKit2 for engineering builds on SnowLeopard
1024         and later.
1025
1026         * Configurations/WebCore.xcconfig:
1027
1028 2010-04-28  Darin Adler  <darin@apple.com>
1029
1030         Reviewed by Adele Peterson.
1031
1032         REGRESSION: Autoscroll does not work in Mail messages
1033         https://bugs.webkit.org/show_bug.cgi?id=38267
1034         rdar://problem/7559799
1035
1036         Still haven't figured out a good way to test this with DumpRenderTree
1037         or with Safari. Testing has to be done with Mail for now.
1038
1039         The machinery to make autoscrolling work on Mac OS X when a WebView is embedded in another
1040         view had gotten broken in multiple ways. For some reason, a combination of bugs made it
1041         partly work until around r48064. This brings it back.
1042
1043         There were three problems:
1044
1045             1) Code in EventHandler decided there was nothing to scroll, so didn't start
1046                the autoscroll timer.
1047             2) The wrong rectangle was passed to Chrome::scrollRectIntoView.
1048             3) The Mac WebKit implementation of ChromeClient::scrollRectIntoView did incorrect
1049                coordinate conversion.
1050
1051         I verified that none of these have any effect on regression tests, or behavior in
1052         web browsers, or behavior on platforms other than Mac.
1053
1054         * page/EventHandler.cpp:
1055         (WebCore::canAutoscroll): Added. Returns true for boxes that can scroll directly
1056         and for the top level box of the top frame.
1057         (WebCore::EventHandler::handleMouseDraggedEvent): Use canAutoscroll.
1058         (WebCore::EventHandler::updateAutoscrollRenderer): Ditto.
1059
1060         * page/FrameView.cpp:
1061         (WebCore::FrameView::scrollToAnchor): Fixed comment.
1062
1063         * platform/ScrollView.cpp:
1064         (WebCore::ScrollView::scrollRectIntoViewRecursively): Put ASSERT_NOT_REACHED into this
1065         now-unused function along with some comments about removing some obsolete code.
1066
1067         * rendering/RenderLayer.cpp:
1068         (WebCore::RenderLayer::scrollRectToVisible): Removed call to scrollRectIntoViewRecursively
1069         since from the WebKit point of view this is the topmost scroll view anyway. Instead call
1070         setScrollPosition. Moved the code to call Chrome::scrollRectIntoView here since it needs
1071         to use a different rectangle anyway.
1072
1073 2010-04-21  Ojan Vafai  <ojan@chromium.org>
1074
1075         Reviewed by Adele Peterson.
1076
1077         http://trac.webkit.org/changeset/57215 caused perf/memory regressions
1078         https://bugs.webkit.org/show_bug.cgi?id=37292
1079
1080         #if out the canUseGlyphCache Changes from r57215 as they caused a 
1081         8% perf regression on Chromium's international page load tests so that
1082         the perf regression can be fixed properly without being left in the tree.
1083
1084         * platform/graphics/FontFastPath.cpp:
1085         (WebCore::Font::canUseGlyphCache):
1086
1087 2010-04-28  Beth Dakin  <bdakin@apple.com>
1088
1089         Reviewed by Darin Adler.
1090
1091         Fix for <rdar://problem/7474349>
1092
1093         Add a synchronous display mechanism for WKCACFLayerRenderer. 
1094
1095         * platform/graphics/win/WKCACFLayerRenderer.cpp:
1096         (WebCore::WKCACFLayerRenderer::setRootContentsAndDisplay): This is 
1097         just like setRootContents(), but it calls paint() instead of 
1098         renderSoon().
1099         * platform/graphics/win/WKCACFLayerRenderer.h:
1100
1101 2010-04-28  Dmitry Titov  <dimich@chromium.org>
1102
1103         Reviewed by Geoffrey Garen.
1104
1105         REGRESSION: fast/workers/wrapper-map-gc.html crashes on Snow Leopard Release Bot
1106         https://bugs.webkit.org/show_bug.cgi?id=37554
1107
1108         The flaky fast/workers/wrapper-map-gc.html will stop being flaky.
1109
1110         * bindings/js/JSEventListener.cpp:
1111         (WebCore::JSEventListener::handleEvent):
1112         check if JS execution was terminated, as in cases of Worker.terminate() or WorkerGlobalScope.close().
1113         * bindings/js/JSWorkerContextBase.cpp:
1114         (WebCore::toJS): ASSERT the value of workerContextWrapper, it should never be 0.
1115         * bindings/js/WorkerScriptController.h:
1116         (WebCore::WorkerScriptController::workerContextWrapper): remove returning 0 if JS execution was forbidden.
1117         (WebCore::WorkerScriptController::isExecutionForbidden):
1118         * bindings/v8/WorkerScriptController.h:
1119         (WebCore::WorkerScriptController::isExecutionForbidden):
1120
1121         Add ScriptExecutionContext::isJSExecutionTerminated(), it is always 'false' for Document
1122         and 'true' for WorkerContext when script is terminated.
1123         * dom/ScriptExecutionContext.h:
1124         * dom/Document.h:
1125         (WebCore::Document::isJSExecutionTerminated):
1126         * workers/WorkerContext.cpp:
1127         (WebCore::WorkerContext::isJSExecutionTerminated):
1128         * workers/WorkerContext.h:
1129
1130 2010-04-28  Ilya Tikhonovsky  <loislo@chromium.org>
1131
1132         Reviewed by Yury Semikhatsky.
1133
1134         WebInspector: Multiple Main Resource Content Loaded marks appear in Resource panel.
1135         https://bugs.webkit.org/show_bug.cgi?id=38270
1136
1137         * inspector/front-end/ResourcesPanel.js:
1138         (WebInspector.ResourcesPanel.prototype.updateGraphDividersIfNeeded):
1139
1140 2010-04-28  Ilya Tikhonovsky  <loislo@chromium.org>
1141
1142         Reviewed by Yury Semikhatsky.
1143
1144         WebInspector: Timeline: We can have precise urls in the EvaluateScript records.
1145         https://bugs.webkit.org/show_bug.cgi?id=38264
1146
1147         * inspector/front-end/TimelinePanel.js:
1148         (WebInspector.TimelinePanel.FormattedRecord.prototype._generatePopupContent):
1149         (WebInspector.TimelinePanel.FormattedRecord.prototype._getRecordDetails):
1150
1151 2010-04-28  Pavel Feldman  <pfeldman@chromium.org>
1152
1153         Reviewed by Timothy Hatcher.
1154
1155         Web Inspector: Linkify node and function in the event listeners panel.
1156
1157         https://bugs.webkit.org/show_bug.cgi?id=38251
1158
1159         * bindings/js/ScriptEventListener.cpp:
1160         (WebCore::eventListenerHandlerBody):
1161         (WebCore::eventListenerHandlerLocation):
1162         * bindings/js/ScriptEventListener.h:
1163         * bindings/v8/ScriptEventListener.cpp:
1164         (WebCore::eventListenerHandlerBody):
1165         (WebCore::eventListenerHandlerLocation):
1166         * bindings/v8/ScriptEventListener.h:
1167         * inspector/InspectorDOMAgent.cpp:
1168         (WebCore::InspectorDOMAgent::buildObjectForEventListener):
1169         * inspector/front-end/ElementsPanel.js:
1170         (WebInspector.ElementsPanel.prototype.linkifyNodeReference):
1171         (WebInspector.ElementsPanel.prototype.linkifyNodeReference.preventDefault):
1172         * inspector/front-end/EventListenersSidebarPane.js:
1173         (WebInspector.EventListenersSidebarPane.prototype.update.callback):
1174         (WebInspector.EventListenersSidebarPane.prototype.update):
1175         ():
1176         * inspector/front-end/StylesSidebarPane.js:
1177         (WebInspector.StylesSidebarPane.prototype._rebuildSectionsForStyleRules):
1178         * inspector/front-end/inspector.css:
1179         (.node-link):
1180
1181 2010-04-28  Julien Chaffraix  <jchaffraix@webkit.org>
1182
1183         Reviewed by Alexey Proskuryakov.
1184
1185         [XHR] Cross-Origin synchronous request with credential raises NETWORK_ERR
1186         https://bugs.webkit.org/show_bug.cgi?id=37781
1187         <rdar://problem/7905150>
1188
1189         Tests: http/tests/xmlhttprequest/access-control-preflight-credential-async.html
1190                http/tests/xmlhttprequest/access-control-preflight-credential-sync.html
1191
1192         Rolling the patch in as I could not reproduce Qt results locally.
1193
1194         * loader/DocumentThreadableLoader.cpp:
1195         (WebCore::DocumentThreadableLoader::DocumentThreadableLoader): Now we remove the
1196         credential from the request here to avoid forgetting to do so in the different code path.
1197         (WebCore::DocumentThreadableLoader::makeSimpleCrossOriginAccessRequest): Just add the
1198         "Origin" header.
1199         (WebCore::DocumentThreadableLoader::loadRequest): Check here the the credential have
1200         been removed so that we don't leak them. Also tweaked a comment to make it clear that
1201         the URL check has issue when credential is involved.
1202
1203 2010-04-28  Noam Rosenthal  <noam.rosenthal@nokia.com>
1204
1205         Reviewed by Kenneth Rohde Christiansen.
1206
1207         [Qt] GraphicsLayer: preserves-3d and backface visibility
1208         https://bugs.webkit.org/show_bug.cgi?id=35312
1209
1210         Implement preserves-3d by maintaining the 3D transformation heirarchy inside GraphicsLayerQt, and extrapolating
1211         the relative QTransform. When the extrapolation fails (un-invertible matrix) we ignore the transformation change.
1212
1213         WebKitSite/blog-files/3d-transforms test now work with Qt.
1214
1215         * platform/graphics/qt/GraphicsLayerQt.cpp:
1216         (WebCore::GraphicsLayerQtImpl::updateTransform):
1217         (WebCore::GraphicsLayerQtImpl::opaqueArea):
1218         (WebCore::GraphicsLayerQtImpl::boundingRect):
1219         (WebCore::GraphicsLayerQtImpl::paint):
1220         (WebCore::GraphicsLayerQtImpl::flushChanges):
1221
1222 2010-04-28  Ilya Tikhonovsky  <loislo@chromium.org>
1223
1224         Reviewed by Yury Semikhatsky.
1225
1226         Web Inspector: View frame selector for Timeline overview panel is redesigned a bit.
1227         Now it is possible to adjust view frame by resizer bars and by click-n-drag in overview pane.
1228         https://bugs.webkit.org/show_bug.cgi?id=38251
1229
1230         * inspector/front-end/TimelineOverviewPane.js:
1231         (WebInspector.TimelineOverviewPane):
1232         (WebInspector.TimelineOverviewPane.prototype.reset):
1233         (WebInspector.TimelineOverviewPane.prototype._dragWindow):
1234         (WebInspector.TimelineOverviewPane.prototype._windowSelectorDragging):
1235         (WebInspector.TimelineOverviewPane.prototype._endWindowSelectorDragging):
1236         (WebInspector.TimelineOverviewPane.prototype._resizeWindowLeft):
1237         (WebInspector.TimelineOverviewPane.prototype._resizeWindowRight):
1238         (WebInspector.TimelineOverviewPane.prototype._setWindowPosition):
1239         (WebInspector.TimelinePanel.WindowSelector):
1240         (WebInspector.TimelinePanel.WindowSelector.prototype._createSelectorElement):
1241         (WebInspector.TimelinePanel.WindowSelector.prototype._close):
1242         (WebInspector.TimelinePanel.WindowSelector.prototype._updatePosition):
1243         * inspector/front-end/inspector.css:
1244         (#timeline-overview-grid):
1245         (.timeline-window-selector):
1246         (#timeline-overview-window):
1247         (.timeline-overview-dividers-background):
1248         (.timeline-overview-window-rulers):
1249         (.timeline-window-resizer):
1250
1251 2010-04-28  Marcus Bulach  <bulach@chromium.org>
1252
1253         Reviewed by Jeremy Orlow.
1254
1255         Reverts 58340 (https://bugs.webkit.org/show_bug.cgi?id=38158) due to regression on fast/text/international/khmer-selection.html
1256         https://bugs.webkit.org/show_bug.cgi?id=38254
1257
1258         * platform/graphics/chromium/FontLinux.cpp:
1259         (WebCore::adjustTextRenderMode):
1260         (WebCore::TextRunWalker::getTextRun):
1261         (WebCore::TextRunWalker::getNormalizedTextRun):
1262         (WebCore::TextRunWalker::setGlyphXPositions):
1263         (WebCore::glyphIndexForXPositionInScriptRun):
1264         (WebCore::Font::offsetForPositionForComplexText):
1265         (WebCore::Font::selectionRectForComplexText):
1266         * platform/graphics/chromium/FontPlatformDataLinux.cpp:
1267         (WebCore::FontPlatformData::setupPaint):
1268         * platform/graphics/chromium/HarfbuzzSkia.cpp:
1269         (WebCore::getOutlinePoint):
1270         * platform/graphics/skia/GraphicsContext3DSkia.cpp:
1271         (WebCore::GraphicsContext3D::getImageData):
1272         * platform/graphics/skia/GraphicsContextSkia.cpp:
1273         (WebCore::isCoordinateSkiaSafe):
1274         (WebCore::GraphicsContext::fillRect):
1275         (WebCore::GraphicsContext::strokePath):
1276         (WebCore::GraphicsContext::strokeRect):
1277
1278 2010-04-28  Andrey Kosyakov  <caseq@chromium.org>
1279
1280         Reviewed by Yury Semikhatsky.
1281
1282         Log error message to inspector console if a resource fails to load.
1283         Disable checking of mime-type consistency for failed resources.
1284         https://bugs.webkit.org/show_bug.cgi?id=37215
1285
1286         Test: http/tests/inspector/console-resource-errors.html
1287
1288         * inspector/InspectorController.cpp:
1289         (WebCore::InspectorController::didReceiveResponse):
1290         (WebCore::InspectorController::didFailLoading):
1291         * inspector/front-end/Resource.js:
1292         (WebInspector.Resource.prototype._mimeTypeIsConsistentWithType):
1293         * inspector/front-end/ResourcesPanel.js:
1294         (WebInspector.ResourcesPanel.prototype.recreateViewForResourceIfNeeded):
1295
1296 2010-04-28  Yury Semikhatsky  <yurys@chromium.org>
1297
1298         Reviewed by Pavel Feldman.
1299
1300         Support pause on exceptions in v8 implementation of ScriptDebugServer.
1301
1302         https://bugs.webkit.org/show_bug.cgi?id=38205        
1303
1304         * bindings/v8/ScriptDebugServer.cpp:
1305         (WebCore::ScriptDebugServer::addListener):
1306         (WebCore::ScriptDebugServer::pauseOnExceptionsState):
1307         (WebCore::ScriptDebugServer::setPauseOnExceptionsState):
1308         (WebCore::ScriptDebugServer::currentCallFrame):
1309         (WebCore::ScriptDebugServer::handleV8DebugMessage):
1310         (WebCore::ScriptDebugServer::dispatchDidParseSource):
1311         * bindings/v8/ScriptDebugServer.h:
1312
1313 2010-04-28  Sheriff Bot  <webkit.review.bot@gmail.com>
1314
1315         Unreviewed, rolling out r58313.
1316         http://trac.webkit.org/changeset/58313
1317         https://bugs.webkit.org/show_bug.cgi?id=38253
1318
1319         Regression evident in pixel tests: the search icon is always
1320         clipped at the bottom. (Requested by jorlow on #webkit).
1321
1322         * rendering/RenderTextControl.cpp:
1323         (WebCore::RenderTextControl::controlClipRect):
1324         * rendering/RenderTextControl.h:
1325         (WebCore::RenderTextControl::hasControlClip):
1326         * rendering/RenderTextControlSingleLine.cpp:
1327         (WebCore::RenderTextControlSingleLine::paint):
1328         * rendering/RenderTextControlSingleLine.h:
1329
1330 2010-04-28  Justin McPherson <justin.mcpherson@nokia.com>
1331
1332         Reviewed by Simon Hausmann.
1333
1334         [Qt] Fix detection of Qt 4.7's multimedia libraries
1335
1336         QtMultimedia has been split into an additional media services library, which
1337         we're using. mediaservices depends on multimedia.
1338
1339         * WebCore.pro:
1340
1341 2010-04-28  Shinichiro Hamaji  <hamaji@chromium.org>
1342
1343         Unreviewed attempt to fix the chromium build.
1344
1345         Add layoutTestController.setPrinting()
1346         https://bugs.webkit.org/show_bug.cgi?id=37203
1347
1348         * rendering/RenderTreeAsText.cpp:
1349
1350 2010-04-27  Shinichiro Hamaji  <hamaji@chromium.org>
1351
1352         Reviewed by Darin Adler and Eric Seidel.
1353
1354         Add layoutTestController.setPrinting()
1355         https://bugs.webkit.org/show_bug.cgi?id=37203
1356
1357         Added RenderAsTextPrintingMode as a behavior of externalRepresentation.
1358
1359         Now ~PrintContext() calls end() automatically.
1360
1361         * page/PrintContext.cpp:
1362         (WebCore::PrintContext::~PrintContext):
1363         * rendering/RenderTreeAsText.cpp:
1364         (WebCore::externalRepresentation):
1365         * rendering/RenderTreeAsText.h:
1366         (WebCore::):
1367
1368 2010-04-27  Yuzo Fujishima  <yuzo@google.com>
1369
1370         Reviewed by Eric Seidel.
1371
1372         Enhance CSS parser for Paged Media (Iteration 4)
1373         Implement page property parsing as specified at http://dev.w3.org/csswg/css3-page/#using-named-pages.
1374         https://bugs.webkit.org/show_bug.cgi?id=35853
1375
1376         * css/CSSParser.cpp:
1377         (WebCore::CSSParser::parseValue):
1378         (WebCore::CSSParser::parsePage):
1379         * css/CSSParser.h:
1380
1381 2010-04-27  Yuzo Fujishima  <yuzo@google.com>
1382
1383         Reviewed by Dimitri Glazkov.
1384
1385         Enhance CSS parser for Paged Media (Iteration 3)
1386         Implement size parameter parsing for Paged Media.
1387         https://bugs.webkit.org/show_bug.cgi?id=35851
1388
1389         I believe size property hasn't been used so far because (1) it hasn't been properly parsed and
1390         (2) a comment in CSSComputedStyleDeclaration::getPropertyCSSValue says so.
1391         Changing the way of parsing it should not cause any regressions -- no existing tests fail because of this change.
1392
1393         * css/CSSParser.cpp:
1394         (WebCore::CSSParser::parseValue):
1395         (WebCore::CSSParser::parseSize):
1396         (WebCore::CSSParser::parseSizeParameter):
1397         * css/CSSParser.h:
1398         (WebCore::CSSParser::):
1399         * css/CSSValueKeywords.in:
1400
1401 2010-04-27  Yuzo Fujishima  <yuzo@google.com>
1402
1403         Reviewed by Eric Seidel.
1404
1405         Enhance CSS parser for Paged Media (Iteration 2)
1406         Parse and hold paged media rules in CSSStyleSelector.
1407
1408         https://bugs.webkit.org/show_bug.cgi?id=35782
1409
1410         Test: printing/page-rule-css-text.html
1411
1412         * css/CSSGrammar.y:
1413         * css/CSSPageRule.cpp:
1414         (WebCore::CSSPageRule::CSSPageRule):
1415         (WebCore::CSSPageRule::selectorText):
1416         * css/CSSPageRule.h:
1417         (WebCore::CSSPageRule::create):
1418         (WebCore::CSSPageRule::isPageRule):
1419         * css/CSSParser.cpp:
1420         (WebCore::CSSParser::createPageRule):
1421         * css/CSSStyleRule.h:
1422         * css/CSSStyleSelector.cpp:
1423         (WebCore::CSSRuleSet::getPageRules):
1424         (WebCore::CSSRuleSet::CSSRuleSet):
1425         (WebCore::CSSRuleSet::~CSSRuleSet):
1426         (WebCore::CSSRuleSet::addPageRule):
1427         (WebCore::CSSRuleSet::addRulesFromSheet):
1428         * css/CSSStyleSelector.h:
1429         * css/StyleBase.h:
1430         (WebCore::StyleBase::isPageRule):
1431
1432 2010-04-27  Daniel Bates  <dbates@rim.com>
1433
1434         Reviewed by Oliver Hunt.
1435
1436         https://bugs.webkit.org/show_bug.cgi?id=37686
1437
1438         Fixes an issue where the canvas method strokeRect will stroke a
1439         rectangle whose dimensions are 0 when lineWidth > 1.
1440
1441         As per the definition of strokeRect in the HTML Canvas 2D Context
1442         spec. <http://www.w3.org/TR/2dcontext/#dom-context-2d-strokerect>,
1443         this method should have no effect when both the height and width
1444         are zero.
1445
1446         Tests: fast/canvas/canvas-clearRect.html
1447                fast/canvas/canvas-fillRect.html
1448
1449         * html/canvas/CanvasRenderingContext2D.cpp:
1450         (WebCore::validateRectForCanvas): Return false if height, width == 0.
1451
1452 2010-04-27  Adam Barth  <abarth@webkit.org>
1453
1454         Reviewed by Eric Seidel.
1455
1456         Remove obsolete custom bindings file
1457         https://bugs.webkit.org/show_bug.cgi?id=38223
1458
1459         We don't need these files anymore because they are empty.
1460
1461         * Android.jscbindings.mk:
1462         * GNUmakefile.am:
1463         * WebCore.pro:
1464         * WebCore.vcproj/WebCore.vcproj:
1465         * WebCore.xcodeproj/project.pbxproj:
1466         * bindings/js/JSAbstractWorkerCustom.cpp: Removed.
1467         * bindings/js/JSBindingsAllInOne.cpp:
1468         * bindings/js/JSDocumentFragmentCustom.cpp: Removed.
1469         * bindings/js/JSEventSourceCustom.cpp: Removed.
1470
1471 2010-04-27  Daniel Cheng  <dcheng@chromium.org>
1472
1473         Reviewed by Jian Li.
1474
1475         [Chromium] Filter out URLs with a file scheme from text/uri-list when dragging.
1476         https://bugs.webkit.org/show_bug.cgi?id=38227
1477
1478         Unfortunately, the simple fix of not populating the drag data with file URLs doesn't work
1479         since the default drop handling uses the drag data URL to navigate to dropped files/URLs.
1480         For now, we hack around the problem in the Chromium platform, but the proper long term
1481         solution is to change DragController::performDrag to check dragData::asFilenames().
1482
1483         No new tests.
1484
1485         * platform/chromium/ClipboardChromium.cpp:
1486         (WebCore::ClipboardChromium::getData):
1487         (WebCore::ClipboardChromium::types):
1488
1489 2010-04-27  Simon Fraser  <simon.fraser@apple.com>
1490
1491         Reviewed by the inimitable Dan Bernstein.
1492
1493         SVG as background image renders incorrectly after zooming
1494         https://bugs.webkit.org/show_bug.cgi?id=38215
1495         
1496         When doing a partial redraw of an SVGImage used as a CSS background
1497         image, we're limited to drawing the entire Frame, clipped to the dirty rect.
1498         Because of this, we need to fix up the CTM so that the origin is at the
1499         top left of the unclipped image, rather than the top left of the
1500         portion being redrawn.
1501
1502         Test: fast/images/svg-background-partial-redraw.html
1503
1504         * svg/graphics/SVGImage.cpp:
1505         (WebCore::SVGImage::draw):
1506
1507 2010-04-27  Yuzo Fujishima  <yuzo@google.com>
1508
1509         Reviewed by David Hyatt.
1510
1511         Retry of: Enhance CSS parser for Paged Media (Iteration 1)
1512
1513         In this change, the grammar is extended and skeletal methods for creating page rules and margin at-rules are defined.
1514         The contents of the methods should be implemented by other changes.
1515
1516         https://bugs.webkit.org/show_bug.cgi?id=35329
1517
1518         Test: fast/css/parsing-page-rule.html
1519
1520         * css/CSSGrammar.y:
1521         * css/CSSParser.cpp:
1522         (WebCore::CSSParser::CSSParser):
1523         (WebCore::CSSParser::clearProperties):
1524         (WebCore::CSSParser::createPageRule):
1525         (WebCore::CSSParser::createMarginAtRule):
1526         (WebCore::CSSParser::startDeclarationsForMarginBox):
1527         (WebCore::CSSParser::endDeclarationsForMarginBox):
1528         * css/CSSParser.h:
1529         * css/CSSSelector.cpp:
1530         (WebCore::CSSSelector::pseudoId):
1531         (WebCore::nameToPseudoTypeMap):
1532         (WebCore::CSSSelector::extractPseudoType):
1533         * css/CSSSelector.h:
1534         (WebCore::CSSSelector::):
1535         * css/tokenizer.flex:
1536
1537 2010-04-27  Julien Chaffraix  <jchaffraix@webkit.org>
1538
1539         Unreviewed, rolling out my changes as it rendered the Qt bot unreliable.
1540
1541         * loader/DocumentThreadableLoader.cpp:
1542         (WebCore::DocumentThreadableLoader::DocumentThreadableLoader):
1543         (WebCore::DocumentThreadableLoader::makeSimpleCrossOriginAccessRequest):
1544         (WebCore::DocumentThreadableLoader::loadRequest):
1545
1546 2010-04-27  Julien Chaffraix  <jchaffraix@webkit.org>
1547
1548         Reviewed by Alexey Proskuryakov.
1549
1550         [XHR] Cross-Origin synchronous request with credential raises NETWORK_ERR
1551         https://bugs.webkit.org/show_bug.cgi?id=37781
1552         <rdar://problem/7905150>
1553
1554         Tests: http/tests/xmlhttprequest/access-control-preflight-credential-async.html
1555                http/tests/xmlhttprequest/access-control-preflight-credential-sync.html
1556
1557         * loader/DocumentThreadableLoader.cpp:
1558         (WebCore::DocumentThreadableLoader::DocumentThreadableLoader): Now we remove the
1559         credential from the request here to avoid forgetting to do so in the different code path.
1560         (WebCore::DocumentThreadableLoader::makeSimpleCrossOriginAccessRequest): Just add the
1561         "Origin" header.
1562         (WebCore::DocumentThreadableLoader::loadRequest): Check here the the credential have
1563         been removed so that we don't leak them. Also tweaked a comment to make it clear that
1564         the URL check has issue when credential is involved.
1565
1566 2010-04-27  Sam Weinig  <sam@webkit.org>
1567
1568         Reviewed by Maciej Stachowiak.
1569
1570         Fix for https://bugs.webkit.org/show_bug.cgi?id=38238
1571         Allow both WebKit and WebKit2 to link to the same WebCore.framework
1572
1573         * Configurations/WebCore.xcconfig: Use -allowable_client WebKit2 to add
1574         WebKit2 to the list of frameworks that can link directly to WebCore. It
1575         is not necessary for it to be an umbrella since we don't need to reexport
1576         any symbols.
1577
1578 2010-04-27  Dumitru Daniliuc  <dumi@chromium.org>
1579
1580         Reviewed by David Levin.
1581
1582         Turn on AUTO_VACUUM = INCREMENTAL for all HTML5 databases.
1583         https://bugs.webkit.org/show_bug.cgi?id=38191
1584
1585         Vacuum all databases when the number of free pages is at least 10%
1586         of the number of total pages. Also, add a guard against a bug that
1587         was fixed in SQLite only starting with version 3.6.16.
1588
1589         * platform/sql/SQLiteDatabase.cpp:
1590         (WebCore::SQLiteDatabase::maximumSize):
1591         (WebCore::SQLiteDatabase::freeSpaceSize):
1592         (WebCore::SQLiteDatabase::totalSize):
1593         (WebCore::SQLiteDatabase::runIncrementalVacuumCommand):
1594         (WebCore::SQLiteDatabase::turnOnIncrementalAutoVacuum):
1595         * platform/sql/SQLiteDatabase.h:
1596         (WebCore::SQLiteDatabase::):
1597         * platform/sql/SQLiteStatement.cpp:
1598         (WebCore::SQLiteStatement::prepare):
1599         (WebCore::SQLiteStatement::step):
1600         * storage/Database.cpp:
1601         (WebCore::Database::performOpenAndVerify):
1602         (WebCore::Database::incrementalVacuumIfNeeded):
1603         * storage/Database.h:
1604         * storage/SQLTransaction.cpp:
1605         (WebCore::SQLTransaction::postflightAndCommit):
1606
1607 2010-04-27  Garret Kelly  <gdk@chromium.org>
1608
1609         Reviewed by Darin Fisher.
1610
1611         Turn all of the touch event handlers into RuntimeEnabledFeatures, and
1612         modify the createEvent methond on Document so that it won't create a
1613         TouchEvent if the feature is disabled.
1614         https://bugs.webkit.org/show_bug.cgi?id=37485
1615
1616         * bindings/generic/RuntimeEnabledFeatures.cpp:
1617         * bindings/generic/RuntimeEnabledFeatures.h:
1618         (WebCore::RuntimeEnabledFeatures::touchEnabled):
1619         (WebCore::RuntimeEnabledFeatures::setTouchEnabled):
1620         (WebCore::RuntimeEnabledFeatures::ontouchstartEnabled):
1621         (WebCore::RuntimeEnabledFeatures::ontouchmoveEnabled):
1622         (WebCore::RuntimeEnabledFeatures::ontouchendEnabled):
1623         (WebCore::RuntimeEnabledFeatures::ontouchcancelEnabled):
1624         * dom/Document.cpp:
1625         (WebCore::Document::createEvent):
1626         * dom/Document.idl:
1627         * dom/Element.idl:
1628         * page/DOMWindow.idl:
1629
1630 2010-04-27  Jens Alfke  <snej@chromium.org>
1631
1632         Reviewed by Darin Fisher.
1633
1634         [Chromium] Add some notifications and an accessor to WebKit API
1635         https://bugs.webkit.org/show_bug.cgi?id=37625
1636
1637         * dom/Node.cpp:
1638         (WebCore::Node::hasNonEmptyBoundingBox): New method.
1639         * dom/Node.h:
1640         * html/HTMLAnchorElement.cpp:
1641         (WebCore::HTMLAnchorElement::isKeyboardFocusable): Moved part of method into new Node method
1642
1643 2010-04-27  Jochen Eisinger  <jochen@chromium.org>
1644
1645         Reviewed by Shinichiro Hamaji.
1646
1647         Fix gyp build on Mac OS X with enable_svg=0.
1648         https://bugs.webkit.org/show_bug.cgi?id=38192
1649
1650         * WebCore.gyp/WebCore.gyp: Only generate SVG symbols if enable_svg!=0.
1651         * css/CSSComputedStyleDeclaration.cpp:
1652         (WebCore::CSSComputedStyleDeclaration::getPropertyCSSValue): Add missing unimplemented CSS properties to switch statement.
1653
1654 2010-04-27  Kinuko Yasuda  <kinuko@chromium.org>
1655
1656         Reviewed by Jian Li.
1657
1658         [V8] Handle OR ('|') conditional in action_derivedsourcesallinone.py
1659         https://bugs.webkit.org/show_bug.cgi?id=38207
1660
1661         No new tests.
1662
1663         * WebCore.gyp/scripts/action_derivedsourcesallinone.py:
1664
1665 2010-04-27  François Sausset  <sausset@gmail.com>
1666
1667         Reviewed by Kenneth Rohde Christiansen.
1668
1669         Implementation of the MathML mroot & msqrt elements.
1670         https://bugs.webkit.org/show_bug.cgi?id=37044
1671
1672         Test: mathml/presentation/roots.xhtml
1673
1674         * WebCore.xcodeproj/project.pbxproj:
1675         * css/mathml.css:
1676         (mroot):
1677         (mroot > * + *):
1678         (mroot > * + mrow, mroot > * + mfenced):
1679         * mathml/MathMLInlineContainerElement.cpp:
1680         (WebCore::MathMLInlineContainerElement::createRenderer):
1681         * mathml/RenderMathMLRoot.cpp: Added.
1682         (WebCore::RenderMathMLRoot::RenderMathMLRoot):
1683         (WebCore::RenderMathMLRoot::addChild):
1684         (WebCore::RenderMathMLRoot::paint):
1685         (WebCore::RenderMathMLRoot::layout):
1686         * mathml/RenderMathMLRoot.h: Added.
1687         * mathml/RenderMathMLSquareRoot.cpp: Added.
1688         (WebCore::RenderMathMLSquareRoot::RenderMathMLSquareRoot):
1689         (WebCore::RenderMathMLSquareRoot::paint):
1690         (WebCore::RenderMathMLSquareRoot::layout):
1691         * mathml/RenderMathMLSquareRoot.h: Added.
1692
1693 2010-04-27  Darin Adler  <darin@apple.com>
1694
1695         Reviewed by Maciej Stachowiak.
1696
1697         I noticed an unused forwarding header.
1698
1699         * ForwardingHeaders/runtime/PropertyMap.h: Removed.
1700
1701 2010-04-27  James Robinson  <jamesr@chromium.org>
1702
1703         Reviewed by Adam Barth.
1704
1705         Fix gcc 4.4.1 warnings on Linux in the chromium V8 bindings code.
1706         https://bugs.webkit.org/show_bug.cgi?id=38153
1707
1708         * bindings/scripts/CodeGeneratorV8.pm:
1709         * bindings/v8/V8Proxy.cpp:
1710         (WebCore::V8Proxy::callFunction):
1711
1712 2010-04-27  Eric Seidel  <eric@webkit.org>
1713
1714         Unreviewed, rolling out r58318.
1715         http://trac.webkit.org/changeset/58318
1716         https://bugs.webkit.org/show_bug.cgi?id=37215
1717
1718         Broke test on Tiger.  Might just need updated results,
1719         unclear.
1720
1721         * inspector/InspectorController.cpp:
1722         (WebCore::InspectorController::didReceiveResponse):
1723         (WebCore::InspectorController::didFailLoading):
1724         * inspector/front-end/Resource.js:
1725         (WebInspector.Resource.prototype._mimeTypeIsConsistentWithType):
1726         * inspector/front-end/ResourcesPanel.js:
1727         (WebInspector.ResourcesPanel.prototype.recreateViewForResourceIfNeeded):
1728
1729 2010-04-27  Evan Martin  <evan@chromium.org>
1730
1731         Reviewed by David Levin.
1732
1733         [chromium] bold bengali text not rendered properly on Linux
1734         https://bugs.webkit.org/show_bug.cgi?id=37904
1735
1736         We must let Skia do font fallback, rather than picking a font name
1737         then handing that to Skia.  For example, if we have Bengali text and
1738         choose FreeSans + fake bold, and then later reuse the name, Skia will
1739         helpfully use FreeSansBold (which doesn't cover Bengali).
1740
1741         Test: fast/text/international/bold-bengali.html
1742
1743         * platform/graphics/chromium/FontCacheLinux.cpp:
1744         (WebCore::FontCache::getFontDataForCharacters):
1745
1746 2010-04-27  James Robinson  <jamesr@chromium.org>
1747
1748         Reviewed by Darin Adler.
1749
1750         Fix warnings emitted by gcc 4.4.1 on linux in chromium-specific platform graphics files.
1751         https://bugs.webkit.org/show_bug.cgi?id=38158
1752
1753         Most of the issues are signed/unsigned mismatches, but there are a few unusued variables
1754         and functions mixed in.
1755
1756         * platform/graphics/chromium/FontLinux.cpp:
1757         (WebCore::adjustTextRenderMode):
1758         (WebCore::TextRunWalker::getTextRun):
1759         (WebCore::TextRunWalker::getNormalizedTextRun):
1760         (WebCore::TextRunWalker::setGlyphXPositions):
1761         (WebCore::glyphIndexForXPositionInScriptRun):
1762         (WebCore::Font::offsetForPositionForComplexText):
1763         (WebCore::Font::selectionRectForComplexText):
1764         * platform/graphics/chromium/FontPlatformDataLinux.cpp:
1765         (WebCore::FontPlatformData::setupPaint):
1766         * platform/graphics/chromium/HarfbuzzSkia.cpp:
1767         (WebCore::getOutlinePoint):
1768         * platform/graphics/skia/GraphicsContext3DSkia.cpp:
1769         (WebCore::GraphicsContext3D::getImageData):
1770         * platform/graphics/skia/GraphicsContextSkia.cpp:
1771         (WebCore::isCoordinateSkiaSafe):
1772         (WebCore::GraphicsContext::fillRect):
1773         (WebCore::GraphicsContext::strokePath):
1774         (WebCore::GraphicsContext::strokeRect):
1775
1776 2010-04-27  Jian Li  <jianli@chromium.org>
1777
1778         Reviewed by Darin Adler.
1779
1780         Sending a package file using FormData crashes WebKit on Mac.
1781         https://bugs.webkit.org/show_bug.cgi?id=37882
1782
1783         Can't add a layout test because DRT does not support generating the file name.
1784
1785         * loader/FrameLoader.cpp:
1786         (WebCore::FrameLoader::submitForm):
1787         (WebCore::FrameLoader::navigateToDifferentDocument):
1788         * platform/network/FormData.cpp:
1789         (WebCore::FormData::appendDOMFormData):
1790         * platform/network/FormData.h:
1791         * xml/XMLHttpRequest.cpp:
1792         (WebCore::XMLHttpRequest::send):
1793
1794 2010-04-27  Adam Barth  <abarth@webkit.org>
1795
1796         Reviewed by Eric Seidel.
1797
1798         Remove custom NodeIterator bindings
1799         https://bugs.webkit.org/show_bug.cgi?id=38188
1800
1801         Another example of CallWith=ScriptState.  This case shows us the right
1802         way to handle the interaction with exception codes.
1803
1804         In my previous patch, I put the exception code handling after the
1805         ScriptState exception handling.  It turns out this was a mistake
1806         (although a harmless one at the time because no IDL caused us to
1807         generate that code).  Now that we're generating both kinds of exception
1808         handling, we need to generate them in the right order.
1809
1810         * WebCore.gypi:
1811         * bindings/js/JSNodeIteratorCustom.cpp:
1812         * bindings/scripts/CodeGeneratorJS.pm:
1813         * bindings/scripts/CodeGeneratorV8.pm:
1814         * bindings/scripts/test/GObject/WebKitDOMTestObj.cpp:
1815         (webkit_dom_test_obj_with_script_state_void_exception):
1816         (webkit_dom_test_obj_with_script_state_obj_exception):
1817         * bindings/scripts/test/GObject/WebKitDOMTestObj.h:
1818         * bindings/scripts/test/JS/JSTestObj.cpp:
1819         (WebCore::):
1820         (WebCore::jsTestObjPrototypeFunctionWithScriptStateVoidException):
1821         (WebCore::jsTestObjPrototypeFunctionWithScriptStateObjException):
1822         * bindings/scripts/test/JS/JSTestObj.h:
1823         * bindings/scripts/test/ObjC/DOMTestObj.h:
1824         * bindings/scripts/test/ObjC/DOMTestObj.mm:
1825         (-[DOMTestObj withScriptStateVoidException]):
1826         (-[DOMTestObj withScriptStateObjException]):
1827         * bindings/scripts/test/TestObj.idl:
1828         * bindings/scripts/test/V8/V8TestObj.cpp:
1829         (WebCore::TestObjInternal::withScriptStateVoidCallback):
1830         (WebCore::TestObjInternal::withScriptStateObjCallback):
1831         (WebCore::TestObjInternal::withScriptStateVoidExceptionCallback):
1832         (WebCore::TestObjInternal::withScriptStateObjExceptionCallback):
1833         (WebCore::):
1834         * bindings/v8/custom/V8NodeIteratorCustom.cpp: Removed.
1835         * dom/NodeIterator.idl:
1836
1837 2010-04-27  Adam Barth  <abarth@webkit.org>
1838
1839         Reviewed by Darin Adler.
1840
1841         Remove copy/paste addEventListener "custom" bindings via code generation
1842         https://bugs.webkit.org/show_bug.cgi?id=38210
1843
1844         It's somewhat lame to special case addEventListener and
1845         removeEventListener in the code generator, but it saves a large amount
1846         of boilerplate "custom" bindings code.
1847
1848         Idea shamelessly stolen from the V8 code generator.
1849
1850         This patch points to some good refactoring opportunities in
1851         CodeGeneratorJS.pm, but I'm going to hold off on those for a future
1852         patch.  By generating test coverage for the code generator, we make
1853         these future refactorings easier.
1854
1855         * bindings/js/JSAbstractWorkerCustom.cpp:
1856         * bindings/js/JSDOMApplicationCacheCustom.cpp:
1857         * bindings/js/JSDesktopNotificationsCustom.cpp:
1858         * bindings/js/JSEventSourceCustom.cpp:
1859         * bindings/js/JSMessagePortCustom.cpp:
1860         * bindings/js/JSNodeCustom.cpp:
1861         * bindings/js/JSSVGElementInstanceCustom.cpp:
1862         * bindings/js/JSWebSocketCustom.cpp:
1863         * bindings/js/JSWorkerContextCustom.cpp:
1864         * bindings/js/JSXMLHttpRequestCustom.cpp:
1865         * bindings/js/JSXMLHttpRequestUploadCustom.cpp:
1866         * bindings/scripts/CodeGeneratorJS.pm:
1867         * bindings/scripts/test/GObject/WebKitDOMTestObj.cpp:
1868         * bindings/scripts/test/GObject/WebKitDOMTestObj.h:
1869         * bindings/scripts/test/JS/JSTestObj.cpp:
1870         (WebCore::):
1871         (WebCore::jsTestObjPrototypeFunctionAddEventListener):
1872         (WebCore::jsTestObjPrototypeFunctionRemoveEventListener):
1873         * bindings/scripts/test/JS/JSTestObj.h:
1874         * bindings/scripts/test/ObjC/DOMTestObj.h:
1875         * bindings/scripts/test/ObjC/DOMTestObj.mm:
1876         (-[DOMTestObj addEventListener:listener:useCapture:]):
1877         (-[DOMTestObj removeEventListener:listener:useCapture:]):
1878         * bindings/scripts/test/TestObj.idl:
1879         * bindings/scripts/test/V8/V8TestObj.cpp:
1880         (WebCore::TestObjInternal::addEventListenerCallback):
1881         (WebCore::TestObjInternal::removeEventListenerCallback):
1882         (WebCore::):
1883         * dom/MessagePort.idl:
1884         * dom/Node.idl:
1885         * loader/appcache/DOMApplicationCache.idl:
1886         * notifications/Notification.idl:
1887         * page/EventSource.idl:
1888         * svg/SVGElementInstance.idl:
1889         * websockets/WebSocket.idl:
1890         * workers/AbstractWorker.idl:
1891         * workers/WorkerContext.idl:
1892         * xml/XMLHttpRequest.idl:
1893         * xml/XMLHttpRequestUpload.idl:
1894
1895 2010-04-27  Sam Weinig  <sam@webkit.org>
1896
1897         Rubber-stamped by Beth Dakin.
1898
1899         Remove now unnecessary EXPERIMENTAL_SINGLE_VIEW_MODE #define.
1900
1901         * page/EventHandler.cpp:
1902         (WebCore::EventHandler::EventHandler):
1903         (WebCore::EventHandler::clearDragState):
1904         * page/EventHandler.h:
1905         * page/mac/DragControllerMac.mm:
1906         * page/mac/EventHandlerMac.mm:
1907         * platform/mac/PopupMenuMac.mm:
1908
1909 2010-04-27  Ben Murdoch  <benm@google.com>
1910
1911         Reviewed by Simon Hausmann.
1912
1913         The TouchStationary state of WebCore::PlatformTouchPoint is not handled inside the touch event handler.
1914         https://bugs.webkit.org/show_bug.cgi?id=37609
1915
1916         No new tests required, only updating documentation.
1917
1918         * page/EventHandler.cpp:
1919         (WebCore::EventHandler::handleTouchEvent): Improve the documentation for handling
1920             the TouchStationary state as a result of discussions in bug 37609.
1921
1922 2010-04-27  Simon Fraser  <simon.fraser@apple.com>
1923
1924         Reviewed by Darin Adler, Maciej Stachowiak.
1925
1926         REGRESSION (r57919): Some pages opened in background tabs don't render the first time you activate their tab
1927         https://bugs.webkit.org/show_bug.cgi?id=38183
1928
1929         Rather than sprinkle PLATFORM #ifdefs around, add a new method,
1930         RenderLayerCompositor::shouldPropagateCompositingToIFrameParent(), that indicates whether
1931         an iframe with composited content should trigger compositing mode in the enclosing document
1932         (a behavior that differs between platforms).
1933         
1934         Use this new method to determine whether to trigger a style recalc in the parent document
1935         when an iframe becomes composited.
1936         
1937         Move the code formerly in RenderView::compositingStateChanged() into RenderLayerCompositor().
1938
1939         * manual-tests/compositing/accel-comp-iframe-tab-repaint.html: Added.
1940         * manual-tests/compositing/resources/flash-frame.html: Added.
1941         * manual-tests/compositing/resources/tab-repaint-part-2.html: Added.
1942         * rendering/RenderLayerCompositor.cpp:
1943         (WebCore::RenderLayerCompositor::enableCompositingMode):
1944         (WebCore::RenderLayerCompositor::shouldPropagateCompositingToIFrameParent):
1945         (WebCore::RenderLayerCompositor::requiresCompositingForIFrame):
1946         * rendering/RenderLayerCompositor.h:
1947         * rendering/RenderView.cpp:
1948         * rendering/RenderView.h:
1949
1950 2010-04-27  Andrey Kosyakov  <caseq@chromium.org>
1951
1952         Reviewed by Yury Semikhatsky.
1953
1954         Log error message to inspector console if a resource fails to load.
1955         Disable checking of mime-type consistency for failed resources.
1956         https://bugs.webkit.org/show_bug.cgi?id=37215
1957
1958         Test: http/tests/inspector/console-resource-errors.html
1959
1960         * inspector/InspectorController.cpp:
1961         (WebCore::InspectorController::didReceiveResponse):
1962         (WebCore::InspectorController::didFailLoading):
1963         * inspector/front-end/Resource.js:
1964         (WebInspector.Resource.prototype._mimeTypeIsConsistentWithType):
1965         * inspector/front-end/ResourcesPanel.js:
1966         (WebInspector.ResourcesPanel.prototype.recreateViewForResourceIfNeeded):
1967
1968 2010-04-27  Vitaly Repeshko  <vitalyr@chromium.org>
1969
1970         Reviewed by Nate Chapin.
1971
1972         [V8] Fix XHR memory leak in GC controller.
1973         https://bugs.webkit.org/show_bug.cgi?id=38202
1974
1975         http://trac.webkit.org/changeset/55798 simplified processing of
1976         active DOM objects but introduced a subtle bug in garbage
1977         collection of XHRs. ActiveDOMObject is not a direct base class of
1978         XHR and so upcasting changes pointer identity and breaks DOM
1979         maps. This leads to forever live persistent handles to XHR that
1980         had pending activity while V8 GC happened.
1981
1982         * bindings/v8/V8GCController.cpp:
1983         (WebCore::GCEpilogueVisitor::visitDOMWrapper):
1984
1985 2010-04-27  Adam Barth  <abarth@webkit.org>
1986
1987         Unreviewed.  Regenerate reference bindings code generator output.
1988
1989         * bindings/scripts/test/V8/V8TestObj.cpp:
1990         (WebCore::TestObjInternal::withScriptStateVoidCallback):
1991         (WebCore::TestObjInternal::withScriptStateObjCallback):
1992
1993 2010-04-27  Joseph Pecoraro  <joepeck@webkit.org>
1994
1995         Reviewed by Dan Bernstein.
1996
1997         <input type="search"> with uneven padding causes text clipping
1998         https://bugs.webkit.org/show_bug.cgi?id=38160
1999
2000         Test: fast/css/input-search-padding.html
2001
2002         An <input type="search"> contains an inner block, which is explicitly
2003         centered in RenderTextControlSingleLine based on the height of the element.
2004         However, the clipping rect was not using the set location, and instead
2005         calculated off of the top border and padding alone. This also vertically
2006         centers the Caps Lock indicator.
2007
2008         * rendering/RenderTextControl.cpp: moved controlClipRect implementation to RenderTextControlSingleLine
2009         * rendering/RenderTextControl.h: allow a subclass implementation of controlClipRect, removed redundant hasControlClip implementation, and moved controlClipRect
2010         * rendering/RenderTextControlSingleLine.cpp:
2011         (WebCore::RenderTextControlSingleLine::paint): vertically center the Caps Lock indicator
2012         (WebCore::RenderTextControlSingleLine::controlClipRect): use the set location of the anonymous inner block instead
2013         * rendering/RenderTextControlSingleLine.h: allow for an implementation of controlClipRect for <input type="search">
2014
2015 2010-04-27  Thomas Zander <t.zander@nokia.com>
2016
2017         Reviewed by Simon Hausmann.
2018
2019         [Qt] Fix linking on Symbian on Linux using the Makefile based mkspec.
2020
2021         Disable thumb mode due to library size limitations, just like it's done
2022         for the sbs/sbsv2 based build system.
2023
2024         * WebCore.pro:
2025
2026 2010-04-21  Jocelyn Turcotte  <jocelyn.turcotte@nokia.com>
2027
2028         Reviewed by Kenneth Rohde Christiansen.
2029
2030         [Qt] Make sure WebKit is not compiled using C++0x.
2031         https://bugs.webkit.org/show_bug.cgi?id=37867
2032
2033         As the rest of Qt compiles in the C++0x mode, people might start
2034         compiling it in this mode. WebKit don't support this yet.
2035
2036         Patch by Thiago Macieira <thiago.macieira@nokia.com>
2037
2038         * WebCore.pro:
2039
2040 2010-04-27  Jeremy Orlow  <jorlow@chromium.org>
2041
2042         Unreviewed build fix.
2043
2044         Revert 58274 and 58269 (WebSQLDatabase changes)
2045         https://bugs.webkit.org/show_bug.cgi?id=38191
2046
2047         Chromium bots are hitting ASSERTS when running layout tests.
2048
2049         * platform/sql/SQLiteDatabase.cpp:
2050         (WebCore::SQLiteDatabase::maximumSize):
2051         (WebCore::SQLiteDatabase::freeSpaceSize):
2052         * platform/sql/SQLiteDatabase.h:
2053         * platform/sql/SQLiteStatement.cpp:
2054         (WebCore::SQLiteStatement::prepare):
2055         * storage/Database.cpp:
2056         (WebCore::Database::performOpenAndVerify):
2057         * storage/Database.h:
2058         * storage/SQLTransaction.cpp:
2059         (WebCore::SQLTransaction::postflightAndCommit):
2060
2061 2010-04-27  Yuzo Fujishima  <yuzo@google.com>
2062
2063         Unreviewed, fix build breakage by reverting r58299.
2064
2065         * css/CSSGrammar.y:
2066         * css/CSSParser.cpp:
2067         (WebCore::CSSParser::CSSParser):
2068         (WebCore::CSSParser::clearProperties):
2069         * css/CSSParser.h:
2070         * css/CSSSelector.cpp:
2071         (WebCore::CSSSelector::pseudoId):
2072         (WebCore::nameToPseudoTypeMap):
2073         (WebCore::CSSSelector::extractPseudoType):
2074         * css/CSSSelector.h:
2075         (WebCore::CSSSelector::):
2076         * css/tokenizer.flex:
2077
2078 2010-04-27  Yuzo Fujishima  <yuzo@google.com>
2079
2080         Reviewed by Shinichiro Hamaji.
2081
2082         WebCore::CSSSelector::RareData::parseNth doesn't check whether the search for '-' in the argument was successful.
2083         This results in incorrect parsing.
2084         For example, '3n' is parsed as if it were '3n-3'. The code has been working OK just accidentally.
2085
2086         https://bugs.webkit.org/show_bug.cgi?id=37787
2087
2088         No new tests are added because the original behavior is accidentally OK.
2089
2090         * css/CSSSelector.cpp:
2091         (WebCore::CSSSelector::RareData::parseNth):
2092
2093 2010-04-27  Yuzo Fujishima  <yuzo@google.com>
2094
2095         Reviewed by David Hyatt.
2096
2097         Enhance CSS parser for Paged Media (Iteration 1)
2098
2099         In this change, the grammar is extended and skeletal methods for creating page rules and margin at-rules are defined.
2100         The contents of the methods should be implemented by other changes.
2101
2102         https://bugs.webkit.org/show_bug.cgi?id=35329
2103
2104         Test: fast/css/parsing-page-rule.html
2105
2106         * css/CSSGrammar.y:
2107         * css/CSSParser.cpp:
2108         (WebCore::CSSParser::CSSParser):
2109         (WebCore::CSSParser::clearProperties):
2110         (WebCore::CSSParser::lex):
2111         (WebCore::CSSParser::text):
2112         (WebCore::CSSParser::createPageRule):
2113         (WebCore::CSSParser::createMarginAtRule):
2114         (WebCore::CSSParser::startDeclarationsForMarginBox):
2115         (WebCore::CSSParser::endDeclarationsForMarginBox):
2116         * css/CSSParser.h:
2117         * css/CSSSelector.cpp:
2118         (WebCore::CSSSelector::extractPseudoType):
2119         * css/CSSSelector.h:
2120         (WebCore::CSSSelector::):
2121         * css/tokenizer.flex:
2122
2123 2010-04-27  Adam Barth  <abarth@webkit.org>
2124
2125         Reviewed by Eric Seidel.
2126
2127         Remove custom bindings for TreeWalker
2128         https://bugs.webkit.org/show_bug.cgi?id=38182
2129
2130         This custom code is just CallWith=ScriptState.
2131
2132         * WebCore.gypi:
2133         * bindings/js/JSTreeWalkerCustom.cpp:
2134         (WebCore::JSTreeWalker::markChildren):
2135         * bindings/scripts/CodeGeneratorJS.pm:
2136         * bindings/scripts/CodeGeneratorV8.pm:
2137         * bindings/scripts/test/TestObj.idl:
2138         * bindings/v8/custom/V8TreeWalkerCustom.cpp: Removed.
2139         * dom/TreeWalker.idl:
2140
2141 2010-04-27  Eric Seidel  <eric@webkit.org>
2142
2143         Reviewed by Adam Barth.
2144
2145         Move code out of GenerateImplementation to make it more smaller
2146         https://bugs.webkit.org/show_bug.cgi?id=38176
2147
2148         * bindings/scripts/CodeGeneratorJS.pm:
2149          - Move some code into a new GenerateAttributesHashTable method.
2150
2151 2010-04-26  Adam Barth  <abarth@webkit.org>
2152
2153         Reviewed by Eric Seidel.
2154
2155         Add CallWith=DynamicFrame to CodeGenerator
2156         https://bugs.webkit.org/show_bug.cgi?id=38174
2157
2158         I've only used this in one instance, but this is infrastructure that I
2159         think will help remove a bunch of custom bindings code.  Also, added a
2160         few tests of tricky argument cases.
2161
2162         * bindings/js/JSHTMLFormElementCustom.cpp:
2163         * bindings/scripts/CodeGeneratorJS.pm:
2164         * bindings/scripts/CodeGeneratorV8.pm:
2165         * bindings/scripts/test/GObject/WebKitDOMTestObj.cpp:
2166         (webkit_dom_test_obj_with_dynamic_frame):
2167         (webkit_dom_test_obj_with_dynamic_frame_and_arg):
2168         (webkit_dom_test_obj_with_dynamic_frame_and_optional_arg):
2169         (webkit_dom_test_obj_with_dynamic_frame_and_user_gesture):
2170         (webkit_dom_test_obj_with_dynamic_frame_and_user_gesture_asad):
2171         * bindings/scripts/test/GObject/WebKitDOMTestObj.h:
2172         * bindings/scripts/test/JS/JSTestObj.cpp:
2173         (WebCore::):
2174         (WebCore::jsTestObjPrototypeFunctionWithDynamicFrame):
2175         (WebCore::jsTestObjPrototypeFunctionWithDynamicFrameAndArg):
2176         (WebCore::jsTestObjPrototypeFunctionWithDynamicFrameAndOptionalArg):
2177         (WebCore::jsTestObjPrototypeFunctionWithDynamicFrameAndUserGesture):
2178         (WebCore::jsTestObjPrototypeFunctionWithDynamicFrameAndUserGestureASAD):
2179         * bindings/scripts/test/JS/JSTestObj.h:
2180         * bindings/scripts/test/ObjC/DOMTestObj.h:
2181         * bindings/scripts/test/ObjC/DOMTestObj.mm:
2182         (-[DOMTestObj withDynamicFrame]):
2183         (-[DOMTestObj withDynamicFrameAndArg:]):
2184         (-[DOMTestObj withDynamicFrameAndOptionalArg:optionalArg:]):
2185         (-[DOMTestObj withDynamicFrameAndUserGesture:]):
2186         (-[DOMTestObj withDynamicFrameAndUserGestureASAD:optionalArg:]):
2187         * bindings/scripts/test/TestObj.idl:
2188         * bindings/scripts/test/V8/V8TestObj.cpp:
2189         (WebCore::TestObjInternal::withDynamicFrameCallback):
2190         (WebCore::TestObjInternal::withDynamicFrameAndArgCallback):
2191         (WebCore::TestObjInternal::withDynamicFrameAndOptionalArgCallback):
2192         (WebCore::TestObjInternal::withDynamicFrameAndUserGestureCallback):
2193         (WebCore::TestObjInternal::withDynamicFrameAndUserGestureASADCallback):
2194         (WebCore::):
2195         * bindings/v8/custom/V8HTMLFormElementCustom.cpp:
2196         * html/HTMLFormElement.idl:
2197
2198 2010-04-26  Adam Barth  <abarth@webkit.org>
2199
2200         Unreviewed.  Update comment to better reflect reality.
2201
2202         * bindings/scripts/test/TestObj.idl:
2203
2204 2010-04-26  Adam Barth  <abarth@webkit.org>
2205
2206         Reviewed by Eric Seidel.
2207
2208         Add ObjC and GObject to run-bindings-test
2209         https://bugs.webkit.org/show_bug.cgi?id=38168
2210
2211         Added expected results.
2212
2213         * bindings/scripts/test/GObject/WebKitDOMTestObj.cpp: Added.
2214         (WebKit::kit):
2215         (webkit_dom_test_obj_void_method):
2216         (webkit_dom_test_obj_void_method_with_args):
2217         (webkit_dom_test_obj_int_method):
2218         (webkit_dom_test_obj_int_method_with_args):
2219         (webkit_dom_test_obj_obj_method):
2220         (webkit_dom_test_obj_obj_method_with_args):
2221         (webkit_dom_test_obj_method_with_exception):
2222         (webkit_dom_test_obj_method_with_optional_arg):
2223         (webkit_dom_test_obj_method_with_non_optional_arg_and_optional_arg):
2224         (webkit_dom_test_obj_method_with_non_optional_arg_and_two_optional_args):
2225         (webkit_dom_test_obj_get_read_only_int_attr):
2226         (webkit_dom_test_obj_get_read_only_string_attr):
2227         (webkit_dom_test_obj_get_read_only_test_obj_attr):
2228         (webkit_dom_test_obj_get_int_attr):
2229         (webkit_dom_test_obj_set_int_attr):
2230         (webkit_dom_test_obj_get_string_attr):
2231         (webkit_dom_test_obj_set_string_attr):
2232         (webkit_dom_test_obj_get_test_obj_attr):
2233         (webkit_dom_test_obj_set_test_obj_attr):
2234         (webkit_dom_test_obj_get_attr_with_exception):
2235         (webkit_dom_test_obj_set_attr_with_exception):
2236         (webkit_dom_test_obj_get_attr_with_setter_exception):
2237         (webkit_dom_test_obj_set_attr_with_setter_exception):
2238         (webkit_dom_test_obj_get_attr_with_getter_exception):
2239         (webkit_dom_test_obj_set_attr_with_getter_exception):
2240         (WebKit::wrapTestObj):
2241         (WebKit::core):
2242         (webkit_dom_test_obj_finalize):
2243         (webkit_dom_test_obj_set_property):
2244         (webkit_dom_test_obj_get_property):
2245         (webkit_dom_test_obj_class_init):
2246         (webkit_dom_test_obj_init):
2247         * bindings/scripts/test/GObject/WebKitDOMTestObj.h: Added.
2248         * bindings/scripts/test/GObject/WebKitDOMTestObjPrivate.h: Added.
2249         * bindings/scripts/test/ObjC/DOMTestObj.h: Added.
2250         * bindings/scripts/test/ObjC/DOMTestObj.mm: Added.
2251         (-[DOMTestObj dealloc]):
2252         (-[DOMTestObj finalize]):
2253         (-[DOMTestObj readOnlyIntAttr]):
2254         (-[DOMTestObj readOnlyStringAttr]):
2255         (-[DOMTestObj readOnlyTestObjAttr]):
2256         (-[DOMTestObj intAttr]):
2257         (-[DOMTestObj setIntAttr:]):
2258         (-[DOMTestObj stringAttr]):
2259         (-[DOMTestObj setStringAttr:]):
2260         (-[DOMTestObj testObjAttr]):
2261         (-[DOMTestObj setTestObjAttr:]):
2262         (-[DOMTestObj attrWithException]):
2263         (-[DOMTestObj setAttrWithException:]):
2264         (-[DOMTestObj attrWithSetterException]):
2265         (-[DOMTestObj setAttrWithSetterException:]):
2266         (-[DOMTestObj attrWithGetterException]):
2267         (-[DOMTestObj setAttrWithGetterException:]):
2268         (-[DOMTestObj customAttr]):
2269         (-[DOMTestObj setCustomAttr:]):
2270         (-[DOMTestObj voidMethod]):
2271         (-[DOMTestObj voidMethodWithArgs:strArg:objArg:]):
2272         (-[DOMTestObj intMethod]):
2273         (-[DOMTestObj intMethodWithArgs:strArg:objArg:]):
2274         (-[DOMTestObj objMethod]):
2275         (-[DOMTestObj objMethodWithArgs:strArg:objArg:]):
2276         (-[DOMTestObj methodWithException]):
2277         (-[DOMTestObj customMethod]):
2278         (-[DOMTestObj customMethodWithArgs:strArg:objArg:]):
2279         (-[DOMTestObj methodWithOptionalArg:]):
2280         (-[DOMTestObj methodWithNonOptionalArgAndOptionalArg:opt:]):
2281         (-[DOMTestObj methodWithNonOptionalArgAndTwoOptionalArgs:opt1:opt2:]):
2282         (core):
2283         (kit):
2284         * bindings/scripts/test/ObjC/DOMTestObjInternal.h: Added.
2285
2286 2010-04-26  Adam Barth  <abarth@webkit.org>
2287
2288         Reviewed by Eric Seidel.
2289
2290         Add testing infrastructure for JSC bindings generator
2291         https://bugs.webkit.org/show_bug.cgi?id=38167
2292
2293         This required moving the test files around a bit more.
2294
2295         * bindings/scripts/test/JS/JSTestObj.cpp: Added.
2296         (WebCore::):
2297         (WebCore::JSTestObjConstructor::JSTestObjConstructor):
2298         (WebCore::JSTestObjConstructor::classInfo):
2299         (WebCore::JSTestObjConstructor::createStructure):
2300         (WebCore::JSTestObjConstructor::getOwnPropertySlot):
2301         (WebCore::JSTestObjConstructor::getOwnPropertyDescriptor):
2302         (WebCore::JSTestObjPrototype::self):
2303         (WebCore::JSTestObjPrototype::getOwnPropertySlot):
2304         (WebCore::JSTestObjPrototype::getOwnPropertyDescriptor):
2305         (WebCore::JSTestObj::JSTestObj):
2306         (WebCore::JSTestObj::~JSTestObj):
2307         (WebCore::JSTestObj::createPrototype):
2308         (WebCore::JSTestObj::getOwnPropertySlot):
2309         (WebCore::JSTestObj::getOwnPropertyDescriptor):
2310         (WebCore::jsTestObjReadOnlyIntAttr):
2311         (WebCore::jsTestObjReadOnlyStringAttr):
2312         (WebCore::jsTestObjReadOnlyTestObjAttr):
2313         (WebCore::jsTestObjIntAttr):
2314         (WebCore::jsTestObjStringAttr):
2315         (WebCore::jsTestObjTestObjAttr):
2316         (WebCore::jsTestObjAttrWithException):
2317         (WebCore::jsTestObjAttrWithSetterException):
2318         (WebCore::jsTestObjAttrWithGetterException):
2319         (WebCore::jsTestObjCustomAttr):
2320         (WebCore::jsTestObjConstructor):
2321         (WebCore::JSTestObj::put):
2322         (WebCore::setJSTestObjIntAttr):
2323         (WebCore::setJSTestObjStringAttr):
2324         (WebCore::setJSTestObjTestObjAttr):
2325         (WebCore::setJSTestObjAttrWithException):
2326         (WebCore::setJSTestObjAttrWithSetterException):
2327         (WebCore::setJSTestObjAttrWithGetterException):
2328         (WebCore::setJSTestObjCustomAttr):
2329         (WebCore::JSTestObj::getConstructor):
2330         (WebCore::jsTestObjPrototypeFunctionVoidMethod):
2331         (WebCore::jsTestObjPrototypeFunctionVoidMethodWithArgs):
2332         (WebCore::jsTestObjPrototypeFunctionIntMethod):
2333         (WebCore::jsTestObjPrototypeFunctionIntMethodWithArgs):
2334         (WebCore::jsTestObjPrototypeFunctionObjMethod):
2335         (WebCore::jsTestObjPrototypeFunctionObjMethodWithArgs):
2336         (WebCore::jsTestObjPrototypeFunctionMethodWithException):
2337         (WebCore::jsTestObjPrototypeFunctionCustomMethod):
2338         (WebCore::jsTestObjPrototypeFunctionCustomMethodWithArgs):
2339         (WebCore::jsTestObjPrototypeFunctionMethodWithOptionalArg):
2340         (WebCore::jsTestObjPrototypeFunctionMethodWithNonOptionalArgAndOptionalArg):
2341         (WebCore::jsTestObjPrototypeFunctionMethodWithNonOptionalArgAndTwoOptionalArgs):
2342         (WebCore::toJS):
2343         (WebCore::toTestObj):
2344         * bindings/scripts/test/JS/JSTestObj.h: Added.
2345         (WebCore::JSTestObj::classInfo):
2346         (WebCore::JSTestObj::createStructure):
2347         (WebCore::JSTestObj::impl):
2348         (WebCore::JSTestObjPrototype::classInfo):
2349         (WebCore::JSTestObjPrototype::createStructure):
2350         (WebCore::JSTestObjPrototype::JSTestObjPrototype):
2351         * bindings/scripts/test/TestObj.idl:
2352         * bindings/scripts/test/V8/V8TestObj.cpp: Renamed from WebCore/bindings/scripts/test/V8TestObj.cpp.
2353         (WebCore::):
2354         (WebCore::TestObjInternal::V8_USE):
2355         (WebCore::TestObjInternal::readOnlyIntAttrAttrGetter):
2356         (WebCore::TestObjInternal::readOnlyStringAttrAttrGetter):
2357         (WebCore::TestObjInternal::readOnlyTestObjAttrAttrGetter):
2358         (WebCore::TestObjInternal::intAttrAttrGetter):
2359         (WebCore::TestObjInternal::intAttrAttrSetter):
2360         (WebCore::TestObjInternal::stringAttrAttrGetter):
2361         (WebCore::TestObjInternal::stringAttrAttrSetter):
2362         (WebCore::TestObjInternal::testObjAttrAttrGetter):
2363         (WebCore::TestObjInternal::testObjAttrAttrSetter):
2364         (WebCore::TestObjInternal::attrWithExceptionAttrGetter):
2365         (WebCore::TestObjInternal::attrWithExceptionAttrSetter):
2366         (WebCore::TestObjInternal::attrWithSetterExceptionAttrGetter):
2367         (WebCore::TestObjInternal::attrWithSetterExceptionAttrSetter):
2368         (WebCore::TestObjInternal::attrWithGetterExceptionAttrGetter):
2369         (WebCore::TestObjInternal::attrWithGetterExceptionAttrSetter):
2370         (WebCore::TestObjInternal::voidMethodCallback):
2371         (WebCore::TestObjInternal::voidMethodWithArgsCallback):
2372         (WebCore::TestObjInternal::intMethodCallback):
2373         (WebCore::TestObjInternal::intMethodWithArgsCallback):
2374         (WebCore::TestObjInternal::objMethodCallback):
2375         (WebCore::TestObjInternal::objMethodWithArgsCallback):
2376         (WebCore::TestObjInternal::methodWithExceptionCallback):
2377         (WebCore::TestObjInternal::methodWithOptionalArgCallback):
2378         (WebCore::TestObjInternal::methodWithNonOptionalArgAndOptionalArgCallback):
2379         (WebCore::TestObjInternal::methodWithNonOptionalArgAndTwoOptionalArgsCallback):
2380         (WebCore::TestObjInternal::overloadedMethod1Callback):
2381         (WebCore::TestObjInternal::overloadedMethod2Callback):
2382         (WebCore::TestObjInternal::overloadedMethod3Callback):
2383         (WebCore::TestObjInternal::overloadedMethod4Callback):
2384         (WebCore::TestObjInternal::overloadedMethodCallback):
2385         (WebCore::ConfigureV8TestObjTemplate):
2386         (WebCore::V8TestObj::GetRawTemplate):
2387         (WebCore::V8TestObj::GetTemplate):
2388         (WebCore::V8TestObj::toNative):
2389         (WebCore::V8TestObj::HasInstance):
2390         (WebCore::V8TestObj::wrap):
2391         (WebCore::toV8):
2392         (WebCore::V8TestObj::derefObject):
2393         * bindings/scripts/test/V8/V8TestObj.h: Renamed from WebCore/bindings/scripts/test/V8TestObj.h.
2394
2395 2010-04-26  Oliver Hunt  <oliver@apple.com>
2396
2397         Reviewed by Gavin Barraclough.
2398
2399         Need to support more efficient dispatch of lightweight builtins
2400         https://bugs.webkit.org/show_bug.cgi?id=38155
2401
2402         Update bindings generation to include new thunk generator field
2403         in the property map hash tables.
2404
2405         * bindings/scripts/CodeGeneratorJS.pm:
2406
2407 2010-04-26  Adam Barth  <abarth@webkit.org>
2408
2409         Reviewed by Eric Seidel.
2410
2411         Move bindings test directory into the scripts directory
2412         https://bugs.webkit.org/show_bug.cgi?id=38161
2413
2414         This test is really of the bindings scripts not of the bindings
2415         themselves.  By moving the files into the scripts directory, we'll be
2416         able to test JSC as well.
2417
2418         * bindings/scripts/test/TestObj.idl: Renamed from WebCore/bindings/v8/test/TestObj.idl.
2419         * bindings/scripts/test/V8TestObj.cpp: Renamed from WebCore/bindings/v8/test/V8TestObj.cpp.
2420         (WebCore::):
2421         (WebCore::TestObjInternal::V8_USE):
2422         (WebCore::TestObjInternal::readOnlyIntAttrAttrGetter):
2423         (WebCore::TestObjInternal::readOnlyStringAttrAttrGetter):
2424         (WebCore::TestObjInternal::readOnlyTestObjAttrAttrGetter):
2425         (WebCore::TestObjInternal::intAttrAttrGetter):
2426         (WebCore::TestObjInternal::intAttrAttrSetter):
2427         (WebCore::TestObjInternal::stringAttrAttrGetter):
2428         (WebCore::TestObjInternal::stringAttrAttrSetter):
2429         (WebCore::TestObjInternal::testObjAttrAttrGetter):
2430         (WebCore::TestObjInternal::testObjAttrAttrSetter):
2431         (WebCore::TestObjInternal::attrWithExceptionAttrGetter):
2432         (WebCore::TestObjInternal::attrWithExceptionAttrSetter):
2433         (WebCore::TestObjInternal::attrWithSetterExceptionAttrGetter):
2434         (WebCore::TestObjInternal::attrWithSetterExceptionAttrSetter):
2435         (WebCore::TestObjInternal::attrWithGetterExceptionAttrGetter):
2436         (WebCore::TestObjInternal::attrWithGetterExceptionAttrSetter):
2437         (WebCore::TestObjInternal::voidMethodCallback):
2438         (WebCore::TestObjInternal::voidMethodWithArgsCallback):
2439         (WebCore::TestObjInternal::intMethodCallback):
2440         (WebCore::TestObjInternal::intMethodWithArgsCallback):
2441         (WebCore::TestObjInternal::objMethodCallback):
2442         (WebCore::TestObjInternal::objMethodWithArgsCallback):
2443         (WebCore::TestObjInternal::methodWithExceptionCallback):
2444         (WebCore::TestObjInternal::methodWithOptionalArgCallback):
2445         (WebCore::TestObjInternal::methodWithNonOptionalArgAndOptionalArgCallback):
2446         (WebCore::TestObjInternal::methodWithNonOptionalArgAndTwoOptionalArgsCallback):
2447         (WebCore::TestObjInternal::overloadedMethod1Callback):
2448         (WebCore::TestObjInternal::overloadedMethod2Callback):
2449         (WebCore::TestObjInternal::overloadedMethod3Callback):
2450         (WebCore::TestObjInternal::overloadedMethod4Callback):
2451         (WebCore::TestObjInternal::overloadedMethodCallback):
2452         (WebCore::ConfigureV8TestObjTemplate):
2453         (WebCore::V8TestObj::GetRawTemplate):
2454         (WebCore::V8TestObj::GetTemplate):
2455         (WebCore::V8TestObj::toNative):
2456         (WebCore::V8TestObj::HasInstance):
2457         (WebCore::V8TestObj::wrap):
2458         (WebCore::toV8):
2459         (WebCore::V8TestObj::derefObject):
2460         * bindings/scripts/test/V8TestObj.h: Renamed from WebCore/bindings/v8/test/V8TestObj.h.
2461
2462 2010-04-26  Daniel Cheng  <dcheng@chromium.org>
2463
2464         Reviewed by Jian Li.
2465
2466         [chromium] Fix ChromiumDataObject::setURL to not populate its internal URL list with empty URLs.
2467         https://bugs.webkit.org/show_bug.cgi?id=38159
2468
2469         No new tests.
2470
2471         * platform/chromium/ChromiumDataObject.h:
2472         (WebCore::ChromiumDataObject::setURL):
2473
2474 2010-04-26  Daniel Cheng  <dcheng@chromium.org>
2475
2476         Reviewed by Jian Li.
2477
2478         [Chromium] Don't make file paths available in text/uri-list when dragging files.
2479         https://bugs.webkit.org/show_bug.cgi?id=25882
2480
2481         Test will be checked in with WebCore/platform/mac fix.
2482
2483         * platform/chromium/ClipboardChromium.cpp:
2484         (WebCore::ClipboardChromium::getData):
2485         (WebCore::ClipboardChromium::types):
2486
2487 2010-04-26  Maciej Stachowiak  <mjs@apple.com>
2488
2489         Reviewed by Darin Adler.
2490
2491         REGRESSION (r57292): 1.5% page load speed regression from visited link information leak fix
2492         https://bugs.webkit.org/show_bug.cgi?id=38131
2493
2494         I did a number of separate optimizations which speed up style
2495         resolution enough to more than make up for the regression. This
2496         measures as a total PLT speedup of somewhere between 1.5% and
2497         3.7%.
2498        
2499         Optimizations done:
2500         - Cache determineLinkState results, to avoid the need to repeatedly compute
2501         the visited link hash for the same element. This directly addresses much
2502         of the slowdown, since all elements get their style computed twice now.
2503         - Added a fast way to get the length of a CSSMutableStyleDeclaration, and use
2504         in CSSStyleSelector::matchRulesForList, since it was hot there.
2505         - Hoist some loop invariant code that's not detected by the compiler out of the
2506         main loop in matchRulesForList
2507         - inline CSSStyleSelector::initElement and locateSharedStyle,
2508         since there is only one call site in each case
2509         - Inline the common non-line fast case of determineLinkState, and split the rest into
2510         out-of-line determineLinkStateSlowCase.
2511         - Added inline versions of the functions called by
2512         visitedLinkHash (the version called by determineLinkState).
2513
2514         * css/CSSMutableStyleDeclaration.cpp:
2515         (WebCore::CSSMutableStyleDeclaration::length): Implemented in terms of new
2516         inline nonvirtual mutableLength().
2517         * css/CSSMutableStyleDeclaration.h:
2518         (WebCore::CSSMutableStyleDeclaration::mutableLength): Added new nonvirtual
2519         inline way to get the length if you know you have a mutable style decl.
2520         * css/CSSStyleSelector.cpp:
2521         (WebCore::CSSStyleSelector::init): Clear cached link state.
2522         (WebCore::CSSStyleSelector::matchRulesForList): hoist some code out of the main
2523         loop and get style decl length more efficiently.
2524         (WebCore::CSSStyleSelector::initElement): inline (only one call site)
2525         (WebCore::CSSStyleSelector::SelectorChecker::determineLinkState): Inline fast
2526         case, call slow case.
2527         (WebCore::CSSStyleSelector::SelectorChecker::determineLinkStateSlowCase): Split
2528         most of the above function into this slow case helper.
2529         (WebCore::CSSStyleSelector::canShareStyleWithElement): Use the cache-enabled
2530         way to get the current link state.
2531         (WebCore::CSSStyleSelector::locateSharedStyle): inline
2532         (WebCore::CSSStyleSelector::styleForElement): Use the cache-enabled way
2533         to get the current link state.
2534         * css/CSSStyleSelector.h:
2535         (WebCore::CSSStyleSelector::currentElementLinkState): inline way to
2536         get link state for the current element; manages the cache
2537         * platform/LinkHash.cpp:
2538         (WebCore::visitedLinkHashInline): inline version of below function
2539         (WebCore::visitedLinkHash): call the inline version
2540         (WebCore::visitedURLInline): inline version of below function
2541         (WebCore::visitedURL): call the inline version
2542         (WebCore::visitedURL): call inline versions of above two functions
2543
2544 2010-04-26  Sam Weinig  <sam@webkit.org>
2545
2546         Reviewed by Alexey Proskuryakov.
2547
2548         Remove last use of WEB_THREAD.
2549
2550         * platform/mac/WebCoreObjCExtras.mm:
2551         (WebCoreObjCScheduleDeallocateOnMainThread): This can always use
2552         isMainThread().
2553
2554 2010-04-26  Dumitru Daniliuc  <dumi@chromium.org>
2555
2556         Reviewed by Dimitri Glazkov.
2557
2558         Turn on AUTO_VACUUM = INCREMENTAL for all HTML5 databases, and
2559         vacuum all databases when the number of free pages is at least 10%
2560         of the number of total pages. Also, adding a guard against a bug
2561         that was fixed in SQLite only starting with version 3.6.16.
2562
2563         https://bugs.webkit.org/show_bug.cgi?id=36251
2564
2565         * platform/sql/SQLiteDatabase.cpp:
2566         (WebCore::SQLiteDatabase::totalSize):
2567         (WebCore::SQLiteDatabase::runIncrementalVacuumCommand):
2568         (WebCore::SQLiteDatabase::turnOnIncrementalAutoVacuum):
2569         * platform/sql/SQLiteDatabase.h:
2570         * platform/sql/SQLiteStatement.cpp:
2571         (WebCore::SQLiteStatement::prepare):
2572         * storage/Database.cpp:
2573         (WebCore::Database::performOpenAndVerify):
2574         (WebCore::Database::incrementalVacuumIfNeeded):
2575         * storage/Database.h:
2576         * storage/SQLTransaction.cpp:
2577         (WebCore::SQLTransaction::postflightAndCommit):
2578
2579 2010-04-26  Geoffrey Garen  <ggaren@apple.com>
2580
2581         Reviewed by Sam Weinig.
2582
2583         <rdar://problem/7766413>
2584         
2585         Fixed a crash seen when using the JavaScriptCore API with WebKit.
2586         
2587         No layout test because DumpRenderTree doesn't use the JavaScriptCore API
2588         in this way.
2589
2590         * bindings/js/JSEventListener.cpp:
2591         (WebCore::JSEventListener::JSEventListener): Don't assign 0 to a WeakGCPtr.
2592         JavaScriptCore no longer allows this.
2593
2594         * bindings/js/ScriptWrappable.h:
2595         (WebCore::ScriptWrappable::setWrapper): No need to initialize a WeakGCPtr
2596         to 0, or ASSERT a non-0 value before assigning to a WeakGCPtr -- both are
2597         default behaviors.
2598
2599 2010-04-25  Sam Weinig  <sam@webkit.org>
2600
2601         Reviewed by Maciej Stachowiak.
2602
2603         Fix for https://bugs.webkit.org/show_bug.cgi?id=38097
2604         Disentangle initializing the main thread from initializing threading
2605
2606         * WebCore.xcodeproj/project.pbxproj: Sort files.
2607
2608         * accessibility/mac/AccessibilityObjectWrapper.mm: Remove unnessary
2609         +initialize method. The AccessibilityObjectWrapper has no data members
2610         that need to be derefed, so it does not need to be finalized on the main
2611         thread.
2612
2613         * bindings/js/ScriptController.cpp:
2614         (WebCore::ScriptController::initializeThreading): Add call to initializeMainThread.
2615         * bindings/objc/WebScriptObject.mm:
2616         (+[WebScriptObject initialize]): Add call to initializeMainThreadToProcessMainThread.
2617         * bindings/v8/ScriptController.cpp:
2618         (WebCore::ScriptController::initializeThreading): Add call to initializeMainThread.
2619         * platform/mac/SharedBufferMac.mm:
2620         (+[WebCoreSharedBufferData initialize]): Add call to initializeMainThreadToProcessMainThread.
2621
2622 2010-04-26  Yongjun Zhang  <yongjun_zhang@apple.com>
2623
2624         Reviewed by Alexey Proskuryakov.
2625         
2626         https://bugs.webkit.org/show_bug.cgi?id=38128
2627         Don't add empty credential to CredentialStorage.
2628         
2629         An empty credential is currently regarded as a invalid login because it means a missing value in 
2630         protectionSpaceToCredentialMap.  This change makes it consistent with current WebCore's behavior
2631         by ignoring empty credentials.
2632         
2633         No new tests added since this only affects credential entered by user from credential dialog,
2634         which is not testable in DRT.
2635
2636         * platform/network/mac/ResourceHandleMac.mm:
2637         (WebCore::ResourceHandle::receivedCredential):
2638
2639 2010-04-26  Laszlo Gombos  <laszlo.1.gombos@nokia.com>
2640
2641         Reviewed by Simon Hausmann.
2642
2643         [Qt] Clean-up WebCore.pro after now that JavaScriptCore is built separately
2644         https://bugs.webkit.org/show_bug.cgi?id=38123
2645
2646         HAVE_STDINT_H, and HAVE_PTHREAD_NP_H no longer needs to be defined
2647         for QtWebKit  as JavaScriptCore is built separately. These defines are only 
2648         used  by JavaScriptCore and for JavaScriptCore these are already
2649         properly defined in JavaScriptCore/config.h.
2650
2651         No new tests, no new functionality.
2652
2653         * WebCore.pro:
2654
2655 2010-04-26  Roman Gershman  <romange@google.com>
2656
2657         Reviewed by Adam Barth.
2658
2659         [Chromium] Font size in suggestions popup menu should be correlated with the font size of its text field.
2660         The following manual test checks for desired behavior.
2661
2662         https://bugs.webkit.org/show_bug.cgi?id=37977
2663
2664         * manual-tests/chromium/suggestions-popup-font-change.html: Added.
2665
2666 2010-04-26  Luiz Agostini  <luiz.agostini@openbossa.org>
2667
2668         Reviewed by Kenneth Rohde Christiansen.
2669
2670         View modes names in CSSValueKeywords.in
2671         https://bugs.webkit.org/show_bug.cgi?id=38125
2672
2673         View mode names has changed in previous patch but CSSValueKeywords.in file was
2674         not updated.
2675
2676         * css/CSSValueKeywords.in:
2677
2678 2010-04-26  Simon Hausmann  <simon.hausmann@nokia.com>
2679
2680         Reviewed by Kenneth Rohde Christiansen.
2681
2682         [Qt] Fix compilation with RVCT 4
2683         https://bugs.webkit.org/show_bug.cgi?id=37727
2684
2685         Swap extern and declspec to fix visibility of symbol imported from QtGui.
2686
2687         * page/qt/EventHandlerQt.cpp:
2688
2689 2010-04-26  Ruben Van Boxem  <vanboxem.ruben@gmail.com>
2690
2691         Reviewed by Adam Roben.
2692
2693         Fixes for Win64 compilation under gcc (mingw-w64)
2694
2695         *  WebCore/bridge/npapi.h: for win64 compatibility, mirroring mozilla-central, see Mozilla bug 560298
2696         *  WebCore/platform/Arena.h: uword is used to cast from pointers here. unsigned long is 32-bit on Windows (but 64-bit on mac), and too small to hold a pointer. uintptr_t is 32-bit on 32-bit systems (mac, linux and windows) and 64-bit on all 64-bit systems
2697         *  WebCore/platform/graphics/transforms/TransformationMatrix.h: let mingw-w64/w32 use MSVC codepath
2698         *  WebCore/platform/text/TextStream.cpp: let mingw-w64 use MSVC codepath
2699         *  WebCore/platform/text/TextStream.h: let mingw-w64 use MSVC codepath
2700         *  WebCore/plugins/PluginView.cpp: fix pointer casts on WIN64 and let mingw-w64 use MSVC codepath
2701         *  WebCore/plugins/win/PluginViewWin.cpp: fix pointer casts on WIN64
2702
2703 2010-04-26  Markus Goetz  <Markus.Goetz@nokia.com>
2704
2705         Reviewed by Simon Hausmann.
2706
2707         [Qt] HTTP pipelining efficiency increase
2708         https://bugs.webkit.org/show_bug.cgi?id=38062
2709
2710         Increase number of network requests that are fed into
2711         QNetworkAccessManager.
2712
2713         * platform/network/qt/ResourceRequestQt.cpp:
2714         (WebCore::initializeMaximumHTTPConnectionCountPerHost):
2715
2716 2010-04-26  Ilya Tikhonovsky  <loislo@chromium.org>
2717
2718         Reviewed by Yury Semikhatsky.
2719
2720         Web Inspector: undefined shows up on inspector.
2721         https://bugs.webkit.org/show_bug.cgi?id=38120
2722
2723         * inspector/front-end/ScriptsPanel.js:
2724         (WebInspector.ScriptsPanel.prototype.hide):
2725         * inspector/front-end/SourceFrame.js:
2726         (WebInspector.SourceFrame.prototype.set visible):
2727
2728 2010-04-26  Bruno Schmidt  <bruno.schmidt@gmail.com>
2729
2730         Reviewed by Kenneth Rohde Christiansen.
2731
2732         [Qt] Exposing an QVariantMap containing QObjectStar to Javascript
2733         causes Segmentation Fault
2734         https://bugs.webkit.org/show_bug.cgi?id=34729
2735
2736         If an QVariantMap containing QObjectStar is added to the to QtWebkit
2737         Javascript, it's use causes Segmentation Fault.
2738         It happens because, in the case QMetaType::QVariantMap, the "root"
2739         object that is inside of a PassRefPtr is passed recursively inside a
2740         loop to recover the content of the map, but the PassRefPtr semantics
2741         prohibit its use inside a loop, so the "root" object mus be passed
2742         using the method "PassRefPtr::get" in order to keep the current
2743         reference.
2744
2745         * bridge/qt/qt_runtime.cpp:
2746         (JSC::Bindings::convertValueToQVariant):
2747         (JSC::Bindings::convertQVariantToValue): change to root.get()
2748
2749 2010-04-26  Pavel Feldman  <pfeldman@chromium.org>
2750
2751         Reviewed by Yury Semikhatsky.
2752
2753         Web Inspector: Render clip in summary bar using "arc", not "quadraticCurveTo".
2754
2755         https://bugs.webkit.org/show_bug.cgi?id=38107
2756
2757         * inspector/front-end/SummaryBar.js:
2758         (WebInspector.SummaryBar.prototype._drawSummaryGraph.drawPill):
2759         (WebInspector.SummaryBar.prototype._drawSummaryGraph):
2760
2761 2010-04-26  Andreas Kling  <andreas.kling@nokia.com>
2762
2763         Reviewed by Tor Arne Vestbø.
2764
2765         [Qt] Fix compilation against Qt 4.7
2766
2767         Some QtMultimedia things have been moved into QtMediaServices
2768         https://bugs.webkit.org/show_bug.cgi?id=38111
2769
2770         * WebCore.pro:
2771         * platform/graphics/qt/MediaPlayerPrivateQt.cpp:
2772         (WebCore::MediaPlayerPrivate::supportsType):
2773         (WebCore::MediaPlayerPrivate::totalBytes):
2774
2775 2010-04-26  Zoltan Herczeg  <zherczeg@webkit.org>
2776
2777         Reviewed by Dirk Schulze.
2778
2779         Call setStrokeStyle in applyStrokeStyleToContext
2780         https://bugs.webkit.org/show_bug.cgi?id=37849
2781
2782         Not all platforms set the stroke style to solid if they
2783         get an empty line dash array. Some just ignore the operation.
2784
2785         * rendering/SVGRenderSupport.cpp:
2786         (WebCore::applyStrokeStyleToContext):
2787
2788 2010-04-23  Ilya Tikhonovsky  <loislo@chromium.org>
2789
2790         Reviewed by Pavel Feldman.
2791
2792         WebInspector: Aggregated stats of time spent in children records should be visible
2793         in the popup panel of parent record. Crash in pushGCEventRecord also was fixed.
2794         https://bugs.webkit.org/show_bug.cgi?id=37820
2795
2796         * English.lproj/localizedStrings.js:
2797         * inspector/InspectorTimelineAgent.cpp:
2798         (WebCore::InspectorTimelineAgent::pushGCEventRecords):
2799         * inspector/front-end/TimelinePanel.js:
2800         (WebInspector.TimelinePanel.prototype._innerAddRecordToTimeline):
2801         (WebInspector.TimelinePanel.prototype._createRootRecord):
2802         (WebInspector.TimelinePanel.prototype._showPopover):
2803         (WebInspector.TimelineCalculator.prototype.computeBarGraphPercentages):
2804         (WebInspector.TimelineCalculator.prototype.computeBarGraphWindowPosition):
2805         (WebInspector.TimelineRecordGraphRow):
2806         (WebInspector.TimelineRecordGraphRow.prototype.update):
2807         (WebInspector.TimelinePanel.FormattedRecord):
2808         (WebInspector.TimelinePanel.FormattedRecord.prototype._generateAggregatedInfo):
2809         (WebInspector.TimelinePanel.FormattedRecord.prototype._generatePopupContent):
2810         (WebInspector.TimelinePanel.FormattedRecord.prototype._getRecordDetails):
2811         (WebInspector.TimelinePanel.FormattedRecord.prototype._calculateAggregatedStats):
2812         * inspector/front-end/inspector.css:
2813         (.timeline-graph-bar.with-children):
2814         (.timeline-graph-bar.cpu):
2815         (.timeline-aggregated-category):
2816         (.timeline-loading):
2817         (.timeline-scripting):
2818         (.timeline-rendering):
2819         (.popover .timeline-aggregated-category.timeline-loading):
2820         (.timeline-details-title):
2821
2822 2010-04-25  Kent Tamura  <tkent@chromium.org>
2823
2824         Reviewed by Darin Adler.
2825
2826         WebKit crashes with deeply nested divs
2827         https://bugs.webkit.org/show_bug.cgi?id=18282
2828
2829         The HTML parser caps a tree depth by MAX_DOM_TREE_DEPTH defined in
2830         TreeDepthLimit.h. This is performance-efficient, but does not work for
2831         DOM operations such as Node.appendChild().
2832
2833         Test: fast/parser/element-nesting-cap.html
2834
2835         * dom/Node.h:
2836         * dom/XMLTokenizer.cpp:
2837         (WebCore::XMLTokenizer::pushCurrentNode):
2838         * html/HTMLParser.cpp:
2839
2840         * GNUmakefile.am:
2841         * WebCore.gypi:
2842         * WebCore.pro:
2843         * WebCore.vcproj/WebCore.vcproj:
2844         * WebCore.xcodeproj/project.pbxproj:
2845         * dom/TreeDepthLimit.h:
2846           Added. Define MAX_DOM_TREE_DEPTH. The default value is 5000.
2847         * dom/XMLTokenizer.cpp: Use maxDOMTreeDepth.
2848         (WebCore::XMLTokenizer::pushCurrentNode):
2849         * html/HTMLParser.cpp:
2850           Introduce m_treeDepth, which counts the depth of the tree.
2851           Unlike m_blocksInStack, it contains the number of non-block nodes.
2852         (WebCore::HTMLParser::HTMLParser):
2853         (WebCore::HTMLParser::reset):
2854         (WebCore::HTMLParser::limitDepth):
2855           Renamed from limitBlockDepth. Add check for m_nodeDepth.
2856         (WebCore::HTMLParser::insertNodeAfterLimitDepth):
2857           Renamed from insertNodeAfterLimitBlockDepth.
2858         (WebCore::HTMLParser::parseToken):
2859         (WebCore::HTMLParser::handleResidualStyleCloseTagAcrossBlocks):
2860         (WebCore::HTMLParser::pushBlock):
2861         (WebCore::HTMLParser::popOneBlockCommon):
2862         (WebCore::HTMLParser::freeBlock):
2863         * html/HTMLParser.h:
2864
2865 2010-04-25  Andrey Kosyakov  <caseq@chromium.org>
2866
2867         Reviewed by Adam Barth.
2868
2869         Get context properly when event handler was created on
2870         the main world.
2871         https://bugs.webkit.org/show_bug.cgi?id=37947
2872
2873         Test: http/tests/security/isolatedWorld/dispatchEvent.html
2874
2875         * bindings/v8/WorldContextHandle.cpp:
2876         (WebCore::WorldContextHandle::adjustedContext):
2877
2878 2010-04-25  yael aharon  <yael.aharon@nokia.com>
2879
2880         Reviewed by Adele Peterson.
2881
2882         Allow styling of HTMLProgressElement.
2883         https://bugs.webkit.org/show_bug.cgi?id=37901
2884
2885         Added a new pseudo element to represent the value portion of the progress element.
2886         Web developers can style this pseudo element separate from the rest of the progress element.
2887
2888         Test: fast/dom/HTMLProgressElement/progress-bar-value-pseudo-element.html
2889
2890         * css/CSSPrimitiveValueMappings.h:
2891         (WebCore::CSSPrimitiveValue::CSSPrimitiveValue):
2892         * css/CSSSelector.cpp:
2893         (WebCore::CSSSelector::pseudoId):
2894         (WebCore::nameToPseudoTypeMap):
2895         (WebCore::CSSSelector::extractPseudoType):
2896         * css/CSSSelector.h:
2897         * css/CSSValueKeywords.in:
2898         * platform/ThemeTypes.h:
2899         * rendering/RenderProgress.cpp:
2900         (WebCore::ProgressValueElement::isShadowNode):
2901         (WebCore::ProgressValueElement::shadowParentNode):
2902         (WebCore::ProgressValueElement::ProgressValueElement):
2903         (WebCore::RenderProgress::RenderProgress):
2904         (WebCore::RenderProgress::~RenderProgress):
2905         (WebCore::RenderProgress::layout):
2906         (WebCore::RenderProgress::styleDidChange):
2907         (WebCore::RenderProgress::updateFromElement):
2908         (WebCore::RenderProgress::updateValuePartState):
2909         (WebCore::RenderProgress::createStyleForValuePart):
2910         (WebCore::RenderProgress::updateAnimationState):
2911         * rendering/RenderTheme.cpp:
2912         (WebCore::RenderTheme::isControlStyled):
2913         * rendering/RenderProgress.h:
2914         * rendering/style/RenderStyleConstants.h:
2915
2916 2010-04-24  Simon Fraser  <simon.fraser@apple.com>
2917
2918         Reviewed by Dan Bernstein.
2919
2920         Don't propagate compositing out of iframes on Mac
2921         https://bugs.webkit.org/show_bug.cgi?id=38072
2922
2923         Propagating compositing out of iframes caused too many regressions on Mac,
2924         so only do it for other platforms that may need to hook compositing layers
2925         together across iframe boundaries.
2926
2927         * rendering/RenderLayerCompositor.cpp:
2928         (WebCore::RenderLayerCompositor::requiresCompositingForIFrame):
2929
2930 2010-04-24  Anton Muhin  <antonm@chromium.org>
2931
2932         Reviewed by Darin Adler.
2933
2934         Allow to construct HashTraits<WebCore::QualifiedName>::constructDeletedValue
2935
2936         Former implementation attempted to use AtomicString(HashTableDeletedValue)
2937         however those values cannot be used that way: one cannot construct
2938         QualifiedNameImpl out of such AtomicString as we'll try to lookup this string
2939         in the table, for example.
2940         https://bugs.webkit.org/show_bug.cgi?id=37722
2941
2942         * dom/QualifiedName.cpp:
2943         (WebCore::QualifiedName::deref): check that hash table deleted values never derefed
2944         * dom/QualifiedName.h:
2945         (WebCore::QualifiedName::QualifiedName): add a constructor to create hash table deleted values
2946         (WebCore::QualifiedName::isHashTableDeletedValue): add a check if given instance is hash table deleted value
2947         (WTF::):
2948
2949 2010-04-24  Julien Chaffraix  <jchaffraix@webkit.org>
2950
2951         Reviewed by Alexey Proskuryakov.
2952
2953         protocolHostAndPortEquals host check makes a wrong assumption
2954         https://bugs.webkit.org/show_bug.cgi?id=37777
2955
2956         The host check assumed that both host started at the same position. This is true
2957         if both URL are the same but sometimes one has credential and the other does not.
2958         In this case, the method would compare invalid positions.
2959
2960         Test: http/tests/appcache/credential-url.html
2961
2962         * platform/KURL.cpp:
2963         (WebCore::protocolHostAndPortAreEqual):
2964         * platform/KURLGoogle.cpp:
2965         (WebCore::protocolHostAndPortAreEqual):
2966         Fix the host check to take both URL's credential into account.
2967
2968 2010-04-24  Nikolas Zimmermann  <nzimmermann@rim.com>
2969
2970         Not reviewed. Fix linkage on several bots (no idea, why it worked in a from-scratch rebuild on Leopard on my machine!) -> include NodeRenderStyle.h
2971         Having to include NodeRenderStyle.h just to pull in the renderStyle() is a crazy concept, but I see what it tries to avoid (including RenderObject.h in Node.h)
2972
2973         * rendering/SVGRenderSupport.cpp:
2974
2975 2010-04-24  Nikolas Zimmermann  <nzimmermann@rim.com>
2976
2977         Not reviewed. Fix release builds, wrap resourceMode assertion in NDEBUG blocks, use UNUSED_PARAM() otherwhise.
2978
2979         * rendering/RenderSVGResourceClipper.cpp:
2980         (WebCore::RenderSVGResourceClipper::applyResource):
2981         * rendering/RenderSVGResourceFilter.cpp:
2982         (WebCore::RenderSVGResourceFilter::applyResource):
2983         (WebCore::RenderSVGResourceFilter::postApplyResource):
2984         * rendering/RenderSVGResourceMasker.cpp:
2985         (WebCore::RenderSVGResourceMasker::applyResource):
2986
2987 2010-04-24  Nikolas Zimmermann  <nzimmermann@rim.com>
2988
2989         Reviewed by Dirk Schulze.
2990
2991         SVGPaintServer needs to be converted to the new RenderSVGResource* system
2992         https://bugs.webkit.org/show_bug.cgi?id=37986
2993
2994         Huge speedup for SVG painting using paint servers (gradient/patterns). Cache underlying
2995         WebCore::Gradient/Pattern datastructures, do not rebuild them on every painting. This marks
2996         the finish of the SVGResource -> RenderSVGResource transition.
2997
2998         Outline of same key changes:
2999         - RenderSVGResource is an abstract base class now, and the previous class is now named RenderSVGResourceContainer
3000           All resources except RenderSVGResourceSolidColor now inherit from RenderSVGResourceContainer, as they are all
3001           associated with a SVG*Element class. RenderSVGResourceSolidColor inherits from RenderSVGResource, and is not
3002           associated with any SVG*Element class. RenderSVGResourceSolidColor is not a render tree object, despite its name.
3003           The reason for that is consistency with all other painting resources.
3004         - RenderSVGResourceSolidColor does not live in the render tree, and exists only as static object, which is shared
3005           and always used when filling/stroking with solid colors - just like the old SVGPaintServerSolid.
3006         - RenderSVGResourceGradient/RenderSVGResourcePattern now store the underlying WebCore::Gradient/Pattern object
3007           instead of rebuilding it everytime we're asked to paint -> this is the main difference with the old concept, leading
3008           to much faster speed.
3009         - SVGResource has vanished. All resources (clipper/filter/marker/masker/gradient/pattern) now share the same codepaths
3010           to handle updates and client invalidation - which is a huge benefit, and makes the code easier to understand.
3011
3012         * Android.mk: Remove svg/graphics/SVGResource*, svg/graphics/SVGPaintServer.h from build.
3013         * GNUmakefile.am: Ditto.
3014         * WebCore.gypi: Ditto.
3015         * WebCore.pro: Ditto.
3016         * WebCore.vcproj/WebCore.vcproj: Ditto.
3017         * WebCore.xcodeproj/project.pbxproj: Ditto.
3018         * platform/graphics/Gradient.cpp: Add addColorStop() method taking a ColorStop const-reference.
3019         (WebCore::Gradient::addColorStop):
3020         * platform/graphics/Gradient.h: Ditto.
3021         * platform/graphics/TextRun.h: Rename SVGPaintServer to RenderSVGResource
3022         (WebCore::TextRun::TextRun):
3023         (WebCore::TextRun::activePaintingResource): Renamed from activePaintServer.
3024         (WebCore::TextRun::setActivePaintingResource): Renamed from setActivePaintServer.
3025         * platform/graphics/win/GraphicsContextWin.cpp: Remove references to SVGResourceImage, which was removed a long time ago.
3026         * rendering/RenderObject.cpp:
3027         (WebCore::RenderObject::toRenderSVGResourceContainer): Renamed from toRenderSVGResource().
3028         * rendering/RenderObject.h:
3029         (WebCore::RenderObject::isSVGGradientStop): Added.
3030         (WebCore::RenderObject::isSVGResourceContainer): Renamed from isSVGResource().
3031         * rendering/RenderPath.cpp: Utilize RenderSVGResource::fill/strokePaintingResource to request paint servers, instead of SVGPaintServer.
3032         (WebCore::RenderPath::fillContains): Adapt to new concept.
3033         (WebCore::RenderPath::strokeContains): Ditto.
3034         (WebCore::fillAndStrokePath): Ditto.
3035         (WebCore::RenderPath::paint): Ditto.
3036         * rendering/RenderSVGGradientStop.cpp:
3037         (WebCore::RenderSVGGradientStop::styleDidChange): Ditto.
3038         * rendering/RenderSVGGradientStop.h: Fixed indention.
3039         * rendering/RenderSVGResource.cpp: Refactored old SVGPaintServer code to request fill/stroke painting resources, splitted up in several methods to aid readability. 
3040         (WebCore::registerPendingResource):
3041         (WebCore::adjustColorForPseudoRules):
3042         (WebCore::RenderSVGResource::fillPaintingResource):
3043         (WebCore::RenderSVGResource::strokePaintingResource):
3044         (WebCore::RenderSVGResource::sharedSolidPaintingResource):
3045         (WebCore::RenderSVGResource::markForLayoutAndResourceInvalidation):
3046         * rendering/RenderSVGResource.h: Make RenderSVGResource an abstract base class, see above for the reasoning.
3047         (WebCore::RenderSVGResource::RenderSVGResource):
3048         (WebCore::RenderSVGResource::~RenderSVGResource):
3049         (WebCore::RenderSVGResource::postApplyResource):
3050         * rendering/RenderSVGResourceClipper.cpp: Inherit from RenderSVGResourceContainer instead of RenderSVGResource.
3051         (WebCore::RenderSVGResourceClipper::RenderSVGResourceClipper):
3052         (WebCore::RenderSVGResourceClipper::invalidateClient):
3053         (WebCore::RenderSVGResourceClipper::applyResource): Adapt to signature changes (add RenderStyle* and resource mode parameters)
3054         (WebCore::RenderSVGResourceClipper::applyClippingToContext):
3055         * rendering/RenderSVGResourceClipper.h:
3056         * rendering/RenderSVGResourceContainer.h: Added. Renamed from RenderSVGResource. Now inherits from RenderSVGHiddenContainer and RenderSVGResource.
3057         (WebCore::RenderSVGResourceContainer::RenderSVGResourceContainer):
3058         (WebCore::RenderSVGResourceContainer::~RenderSVGResourceContainer):
3059         (WebCore::RenderSVGResourceContainer::idChanged):
3060         (WebCore::RenderSVGResourceContainer::isSVGResourceContainer):
3061         (WebCore::RenderSVGResourceContainer::drawsContents):
3062         (WebCore::RenderSVGResourceContainer::toRenderSVGResourceContainer):
3063         (WebCore::getRenderSVGResourceContainerById):
3064         (WebCore::getRenderSVGResourceById):
3065         * rendering/RenderSVGResourceFilter.cpp: Inherit from RenderSVGResourceContainer instead of RenderSVGResource.
3066         (WebCore::RenderSVGResourceFilter::RenderSVGResourceFilter):
3067         (WebCore::RenderSVGResourceFilter::invalidateClient):
3068         (WebCore::RenderSVGResourceFilter::applyResource): Adapt to signature changes (add RenderStyle* and resource mode parameters)
3069         (WebCore::RenderSVGResourceFilter::postApplyResource):
3070         * rendering/RenderSVGResourceFilter.h:
3071         * rendering/RenderSVGResourceGradient.cpp: Moved from SVGPaintServerGradient, cleaned up and refactored.
3072         (WebCore::RenderSVGResourceGradient::RenderSVGResourceGradient):
3073         (WebCore::RenderSVGResourceGradient::~RenderSVGResourceGradient):
3074         (WebCore::RenderSVGResourceGradient::invalidateClients):
3075         (WebCore::RenderSVGResourceGradient::invalidateClient):
3076         (WebCore::createMaskAndSwapContextForTextGradient):
3077         (WebCore::clipToTextMask):
3078         (WebCore::RenderSVGResourceGradient::applyResource):
3079         * rendering/RenderSVGResourceGradient.h:
3080         (WebCore::RenderSVGResourceGradient::resourceBoundingBox):
3081         * rendering/RenderSVGResourceLinearGradient.cpp: Moved from SVGPaintServerLinearGradient, cleaned up and refactored.
3082         (WebCore::RenderSVGResourceLinearGradient::RenderSVGResourceLinearGradient):
3083         (WebCore::RenderSVGResourceLinearGradient::~RenderSVGResourceLinearGradient):
3084         (WebCore::RenderSVGResourceLinearGradient::buildGradient):
3085         * rendering/RenderSVGResourceLinearGradient.h:
3086         (WebCore::RenderSVGResourceLinearGradient::renderName):
3087         (WebCore::RenderSVGResourceLinearGradient::resourceType):
3088         * rendering/RenderSVGResourceMarker.cpp: Inherit from RenderSVGResourceContainer instead of RenderSVGResource.
3089         (WebCore::RenderSVGResourceMarker::RenderSVGResourceMarker):
3090         (WebCore::RenderSVGResourceMarker::invalidateClient):
3091         * rendering/RenderSVGResourceMarker.h:
3092         (WebCore::RenderSVGResourceMarker::applyResource):
3093         * rendering/RenderSVGResourceMasker.cpp: Inherit from RenderSVGResourceContainer instead of RenderSVGResource.
3094         (WebCore::RenderSVGResourceMasker::RenderSVGResourceMasker):
3095         (WebCore::RenderSVGResourceMasker::invalidateClient):
3096         (WebCore::RenderSVGResourceMasker::applyResource):
3097         * rendering/RenderSVGResourceMasker.h:
3098         (WebCore::MaskerData::MaskerData):
3099         * rendering/RenderSVGResourcePattern.cpp: Moved from SVGPaintServerPattern, cleaned up and refactored.
3100         (WebCore::RenderSVGResourcePattern::RenderSVGResourcePattern):
3101         (WebCore::RenderSVGResourcePattern::~RenderSVGResourcePattern):
3102         (WebCore::RenderSVGResourcePattern::invalidateClients):
3103         (WebCore::RenderSVGResourcePattern::invalidateClient):
3104         (WebCore::RenderSVGResourcePattern::applyResource):
3105         (WebCore::RenderSVGResourcePattern::postApplyResource):
3106         (WebCore::calculatePatternBoundaries):
3107         (WebCore::RenderSVGResourcePattern::calculatePatternBoundariesIncludingOverflow):
3108         (WebCore::RenderSVGResourcePattern::createTileImage):
3109         (WebCore::RenderSVGResourcePattern::buildPattern):
3110         * rendering/RenderSVGResourcePattern.h:
3111         (WebCore::RenderSVGResourcePattern::renderName):
3112         (WebCore::RenderSVGResourcePattern::resourceBoundingBox):
3113         (WebCore::RenderSVGResourcePattern::resourceType):
3114         * rendering/RenderSVGResourceRadialGradient.cpp: Moved from SVGPaintServerRadialGradient, cleaned up and refactored.
3115         (WebCore::RenderSVGResourceRadialGradient::RenderSVGResourceRadialGradient):
3116         (WebCore::RenderSVGResourceRadialGradient::~RenderSVGResourceRadialGradient):
3117         (WebCore::RenderSVGResourceRadialGradient::buildGradient):
3118         * rendering/RenderSVGResourceRadialGradient.h:
3119         (WebCore::RenderSVGResourceRadialGradient::renderName):
3120         (WebCore::RenderSVGResourceRadialGradient::resourceType):
3121         * rendering/RenderSVGResourceSolidColor.cpp: Moved from SVGPaintServerSolid, cleaned up and refactored.
3122         (WebCore::RenderSVGResourceSolidColor::RenderSVGResourceSolidColor):
3123         (WebCore::RenderSVGResourceSolidColor::~RenderSVGResourceSolidColor):
3124         (WebCore::RenderSVGResourceSolidColor::applyResource):
3125         (WebCore::RenderSVGResourceSolidColor::postApplyResource):
3126         * rendering/RenderSVGResourceSolidColor.h:
3127         (WebCore::RenderSVGResourceSolidColor::invalidateClients):
3128         (WebCore::RenderSVGResourceSolidColor::invalidateClient):
3129         (WebCore::RenderSVGResourceSolidColor::resourceBoundingBox):
3130         (WebCore::RenderSVGResourceSolidColor::resourceType):
3131         (WebCore::RenderSVGResourceSolidColor::color):
3132         (WebCore::RenderSVGResourceSolidColor::setColor):
3133         * rendering/RenderSVGText.cpp:
3134         (WebCore::RenderSVGText::paint): Early exit if painting is disabled.
3135         * rendering/RenderTreeAsText.cpp:
3136         (WebCore::write): Add RenderSVGGradientStop dumping.
3137         (WebCore::externalRepresentation): Remove SVGResource dumping.
3138         * rendering/SVGInlineTextBox.cpp: Adapt to SVGPaintServer changes (paint server request).
3139         (WebCore::SVGInlineTextBox::paintCharacters):
3140         (WebCore::SVGInlineTextBox::paintDecoration):
3141         * rendering/SVGInlineTextBox.h: Ditto.
3142         (WebCore::SVGTextPaintInfo::SVGTextPaintInfo):
3143         * rendering/SVGRenderSupport.cpp: Ditto.
3144         (WebCore::SVGRenderBase::prepareToRenderSVGContent):
3145         (WebCore::SVGRenderBase::finishRenderSVGContent):
3146         (WebCore::invalidatePaintingResource):
3147         (WebCore::deregisterFromResources):
3148         (WebCore::dashArrayFromRenderingStyle): Moved here from SVGPaintServer.
3149         (WebCore::applyStrokeStyleToContext): Ditto.
3150         * rendering/SVGRenderSupport.h:
3151         * rendering/SVGRenderTreeAsText.cpp: Add new gradient/pattern dumping code. Stops are now properly dumped as well!
3152         (WebCore::operator<<):
3153         (WebCore::writeSVGPaintingResource):
3154         (WebCore::writeStyle):
3155         (WebCore::boundingBoxModeString):
3156         (WebCore::writeCommonGradientProperties):
3157         (WebCore::writeSVGResourceContainer):
3158         (WebCore::writeSVGGradientStop):
3159         * rendering/SVGRenderTreeAsText.h:
3160         * rendering/SVGRootInlineBox.cpp: Adapt to SVGPaintServer changes (paint server request).
3161         (WebCore::SVGRootInlineBoxPaintWalker::SVGRootInlineBoxPaintWalker):
3162         (WebCore::SVGRootInlineBoxPaintWalker::~SVGRootInlineBoxPaintWalker):
3163         (WebCore::SVGRootInlineBoxPaintWalker::teardownFillPaintServer):
3164         (WebCore::SVGRootInlineBoxPaintWalker::teardownStrokePaintServer):
3165         (WebCore::SVGRootInlineBoxPaintWalker::setupBackground):
3166         (WebCore::SVGRootInlineBoxPaintWalker::setupFill):
3167         (WebCore::SVGRootInlineBoxPaintWalker::setupFillSelection):
3168         (WebCore::SVGRootInlineBoxPaintWalker::setupStroke):
3169         (WebCore::SVGRootInlineBoxPaintWalker::setupStrokeSelection):
3170         (WebCore::SVGRootInlineBoxPaintWalker::setupForeground):
3171         (WebCore::SVGRootInlineBoxPaintWalker::activePaintingResource):
3172         (WebCore::SVGRootInlineBoxPaintWalker::paintChunk):
3173         * svg/GradientAttributes.h: Remove SVGGradientStop, use Gradient::ColorStop vector. Cleanup.
3174         (WebCore::GradientAttributes::stops):
3175         (WebCore::GradientAttributes::setStops):
3176         * svg/LinearGradientAttributes.h: Move ENABLE(SVG) guard to correct location.
3177         * svg/PatternAttributes.h: Add missing includes and class forwards.
3178         * svg/RadialGradientAttributes.h: Move ENABLE(SVG) guard to correct location.
3179         * svg/SVGClipPathElement.cpp: Rename invalidateCanvasResources() to invalidateResourceClients().
3180         (WebCore::SVGClipPathElement::svgAttributeChanged):
3181         (WebCore::SVGClipPathElement::childrenChanged): Only call invalidateResourceClients() when !changedByParser is set.
3182         * svg/SVGClipPathElement.h:
3183         * svg/SVGDocumentExtensions.cpp: Change HashMaps to hash AtomicStrings instead of Strings. Rename RenderSVGResource to RenderSVGResourceContainer.
3184         (WebCore::SVGDocumentExtensions::addResource):
3185         (WebCore::SVGDocumentExtensions::removeResource):
3186         (WebCore::SVGDocumentExtensions::resourceById):
3187         (WebCore::SVGDocumentExtensions::addPendingResource):
3188         * svg/SVGDocumentExtensions.h:
3189         * svg/SVGElement.cpp:
3190         (WebCore::SVGElement::insertedIntoDocument): Remove reference to SVGResource::invalidateClients(), handled differently now.
3191         (WebCore::SVGElement::updateAnimatedSVGAttribute): Change assertion, that is incorrect now.
3192         * svg/SVGElement.h: Make updateAnimatedSVGAttribute() public.
3193         * svg/SVGFont.cpp: Adapt to SVGPaintServer changes (paint server request).
3194         (WebCore::Font::drawTextUsingSVGFont):
3195         * svg/SVGGElement.cpp: If style()->display() is NONE, create a RenderSVGHiddenContainer, removing hacks in SVGStopElement for pservers-grad-19-b.svg (yes, SVG is crazy.)
3196         (WebCore::SVGGElement::createRenderer):
3197         * svg/SVGGElement.h: Remove childrenChanged() method which _always_ called renderer->setNeedsLayout(true), which is completly wrong and unnecessary.
3198         (WebCore::SVGGElement::rendererIsNeeded): Always return true.
3199         * svg/SVGGradientElement.cpp: Adapt to new RenderSVGResourceGradient code.
3200         (WebCore::SVGGradientElement::svgAttributeChanged):
3201         (WebCore::SVGGradientElement::childrenChanged): Only call invalidateResourceClients() when !changedByParser is set.
3202         (WebCore::SVGGradientElement::buildStops):
3203         * svg/SVGGradientElement.h:
3204         * svg/SVGLinearGradientElement.cpp: Adapt to new RenderSVGResourceLinearGradient code.
3205         (WebCore::SVGLinearGradientElement::svgAttributeChanged):
3206         (WebCore::SVGLinearGradientElement::createRenderer):
3207         (WebCore::SVGLinearGradientElement::collectGradientProperties):
3208         (WebCore::SVGLinearGradientElement::calculateStartEndPoints):
3209         * svg/SVGLinearGradientElement.h:
3210         * svg/SVGMarkerElement.cpp: Rename invalidateCanvasResources() to invalidateResourceClients().
3211         (WebCore::SVGMarkerElement::svgAttributeChanged):
3212         (WebCore::SVGMarkerElement::childrenChanged): Only call invalidateResourceClients() when !changedByParser is set.
3213         (WebCore::SVGMarkerElement::setOrientToAuto):
3214         (WebCore::SVGMarkerElement::setOrientToAngle):
3215         * svg/SVGMaskElement.cpp: Rename invalidateCanvasResources() to invalidateResourceClients().
3216         (WebCore::SVGMaskElement::svgAttributeChanged):
3217         (WebCore::SVGMaskElement::childrenChanged): Only call invalidateResourceClients() when !changedByParser is set.
3218         * svg/SVGPatternElement.cpp: Rename invalidateCanvasResources() to invalidateResourceClients().
3219         (WebCore::SVGPatternElement::svgAttributeChanged):
3220         (WebCore::SVGPatternElement::childrenChanged): Only call invalidateResourceClients() when !changedByParser is set.
3221         (WebCore::SVGPatternElement::createRenderer):
3222         * svg/SVGPatternElement.h:
3223         * svg/SVGPolyElement.h: Remove unneded rendererIsNeeded() override.
3224         * svg/SVGRadialGradientElement.cpp: Adapt to new RenderSVGResourceRadialGradient code.
3225         (WebCore::SVGRadialGradientElement::svgAttributeChanged):
3226         (WebCore::SVGRadialGradientElement::createRenderer):
3227         (WebCore::SVGRadialGradientElement::collectGradientProperties):
3228         (WebCore::SVGRadialGradientElement::calculateFocalCenterPointsAndRadius):
3229         * svg/SVGRadialGradientElement.h:
3230         * svg/SVGStopElement.cpp: Clean up code, moved stop color calculation from SVGGradientElement to here, where it belongs.
3231         (WebCore::SVGStopElement::parseMappedAttribute):
3232         (WebCore::SVGStopElement::stopColorIncludingOpacity):
3233         * svg/SVGStopElement.h:
3234         * svg/SVGStyledElement.cpp:
3235         (WebCore::SVGStyledElement::~SVGStyledElement):
3236         (WebCore::SVGStyledElement::svgAttributeChanged): Only invalidateResourcesInAncestorChain()/deregisterFromResources() when we're not parsing.
3237         (WebCore::SVGStyledElement::invalidateResourcesInAncestorChain): Early exit if we find a parent resources, there is no resource nesting.
3238         (WebCore::SVGStyledElement::invalidateResourceClients): Renamed from invalidateCanvasResources()
3239         (WebCore::SVGStyledElement::childrenChanged): Only invalidate SVGElementInstances when !changedByParser is set.
3240         * svg/SVGStyledElement.h: Remove canvasResource() logic, remove detach() method.
3241         * svg/SVGTextPathElement.h:
3242         * svg/graphics/SVGPaintServer.h: Removed.
3243         * svg/graphics/SVGResource.cpp: Removed.
3244         * svg/graphics/SVGResource.h: Removed.
3245
3246 2010-04-23  Zhenyao Mo  <zmo@google.com>
3247
3248         Reviewed by Darin Fisher.
3249
3250         Add isGLES2Compliant to GraphicsContext3D: make the method const.
3251         https://bugs.webkit.org/show_bug.cgi?id=37872
3252
3253         * platform/graphics/GraphicsContext3D.h: Make isGLES2Compliant() const.
3254         * platform/graphics/mac/GraphicsContext3DMac.cpp: Ditto.
3255         (WebCore::GraphicsContext3D::isGLES2Compliant):
3256
3257 2010-04-23  Qi Zhang  <qi.2.zhang@nokia.com>
3258
3259         Reviewed by Laszlo Gombos.
3260
3261         [Qt] LayoutTests/fast/canvas/pointInPath.html passed, actually it failed
3262         https://bugs.webkit.org/show_bug.cgi?id=37276
3263
3264         QPainterPath::contains doesn't count the point on the bound.
3265
3266         * platform/graphics/qt/PathQt.cpp:
3267         (WebCore::isPointOnPathBorder):
3268         (WebCore::Path::contains):
3269
3270 2010-04-23  Sam Weinig  <sam@webkit.org>
3271
3272         Reviewed by David Levin.
3273
3274         Fix for https://bugs.webkit.org/show_bug.cgi?id=38060
3275         Split up Threading.h
3276
3277         Add necessary forwarding headers.
3278
3279         * ForwardingHeaders/wtf/Atomics.h: Added.
3280         * ForwardingHeaders/wtf/ThreadSafeShared.h: Added.
3281         * ForwardingHeaders/wtf/ThreadingPrimitives.h: Added.
3282
3283 2010-04-23  Rafael Weinstein  <rafaelw@grafaelw.sfo.corp.google.com>
3284
3285         Reviewed by Darin Fisher.
3286
3287         This patch adds a vector of additionalFeatures to WindowFeatures
3288         and populates it with any feature strings that evaluate to "yes"
3289         and aren't directly observed in WindowFeatures. This allows
3290         clients to capture experimental window features.
3291
3292         https://bugs.webkit.org/show_bug.cgi?id=38013
3293
3294         * page/WindowFeatures.cpp:
3295         (WebCore::WindowFeatures::setWindowFeature):
3296         * page/WindowFeatures.h:
3297
3298 2010-04-23  Dan Bernstein  <mitz@apple.com>
3299
3300         Reviewed by Simon Fraser.
3301
3302         <rdar://problem/7898436> :after content is duplicated
3303
3304         Test: fast/css-generated-content/after-duplicated-after-split.html
3305
3306         * rendering/RenderInline.cpp:
3307         (WebCore::RenderInline::splitInlines): Pass the correct owner of the child list.
3308
3309 2010-04-23  Adele Peterson  <adele@apple.com>
3310
3311         Fixing the Tiger build for real.
3312
3313         * platform/graphics/mac/SimpleFontDataMac.mm:
3314
3315 2010-04-23  Adele Peterson  <adele@apple.com>
3316
3317         Fixing the Tiger build.
3318
3319         * platform/graphics/mac/SimpleFontDataMac.mm:
3320         (WebCore::SimpleFontData::platformBoundsForGlyph):
3321
3322 2010-04-23  Jian Li  <jianli@chromium.org>
3323
3324         Reviewed by Dmitry Titov.
3325
3326         Add FileError for File API.
3327         https://bugs.webkit.org/show_bug.cgi?id=37840
3328
3329         The test will be added when implementing FileReader and FilerWriter.
3330
3331         * Android.derived.jscbindings.mk:
3332         * Android.derived.v8bindings.mk:
3333         * DerivedSources.cpp:
3334         * DerivedSources.make:
3335         * GNUmakefile.am:
3336         * WebCore.gypi:
3337         * WebCore.pri:
3338         * WebCore.pro:
3339         * WebCore.vcproj/WebCore.vcproj:
3340         * WebCore.xcodeproj/project.pbxproj:
3341         * dom/ExceptionCode.h:
3342         (WebCore::):
3343         * html/FileError.h: Added.
3344         * html/FileError.idl: Added.
3345         * page/DOMWindow.idl:
3346
3347 2010-04-23  Jian Li  <jianli@chromium.org>
3348
3349         Reviewed by Adam Barth.
3350
3351         Improve code generator scripts to handle OR ('|') condition in the
3352         extended attributes.
3353         https://bugs.webkit.org/show_bug.cgi?id=37998
3354
3355         * bindings/scripts/CodeGeneratorJS.pm:
3356         * bindings/scripts/CodeGeneratorObjC.pm:
3357         * bindings/scripts/CodeGeneratorV8.pm:
3358         * bindings/scripts/IDLStructure.pm:
3359
3360 2010-04-23  Adele Peterson  <adele@apple.com>
3361
3362         Reviewed by Dan Bernstein.
3363
3364         Fix for <rdar://problem/7855777> REGRESSION: Memory usage increase caused by storing glyph bounds in GlyphMetricsMap
3365         https://bugs.webkit.org/show_bug.cgi?id=37936
3366
3367         This change breaks the GlyphMetricsMap into two maps - one for width and one for bounds, so that we don't store
3368         a FloatRect for the glyph bounds unless we need to.
3369
3370         Covered by existing tests.  This should not cause any change in functionality.
3371
3372         Updated for removal of GlyphMetricsMap.cpp
3373         * Android.mk:
3374         * GNUmakefile.am:
3375         * WebCore.gypi:
3376         * WebCore.vcproj/WebCore.vcproj:
3377         * WebCore.xcodeproj/project.pbxproj:
3378
3379         Made GlyphMetricsMap a template, so it can be used for separate width and bounds maps.
3380         * platform/graphics/GlyphMetricsMap.cpp: Removed.
3381         * platform/graphics/GlyphMetricsMap.h:
3382         (WebCore::GlyphMetricsMap::metricsForGlyph):
3383         (WebCore::GlyphMetricsMap::setMetricsForGlyph):
3384         (WebCore::GlyphMetricsMap::GlyphMetricsPage::metricsForGlyph):
3385         (WebCore::GlyphMetricsMap::GlyphMetricsPage::setMetricsForGlyph):
3386         (WebCore::GlyphMetricsMap::GlyphMetricsPage::setMetricsForIndex):
3387         (WebCore::::unknownMetrics):
3388         (WebCore::::locatePageSlowCase):
3389
3390         * platform/graphics/mac/ComplexTextController.cpp: (WebCore::ComplexTextController::adjustGlyphsAndAdvances):
3391         Call boundsForGlyph instead of metricsForGlyph.
3392         * platform/graphics/win/UniscribeController.cpp: (WebCore::UniscribeController::shapeAndPlaceItem):
3393         ditto.
3394         * platform/graphics/SimpleFontData.cpp: (WebCore::SimpleFontData::platformGlyphInit):
3395         Call setMetricsForGlyph for both glyph maps.
3396
3397         Break getters and setters for metricsForGlyph into widthForGlyph and boundsForGlyph, maintaining present behavior.
3398         * platform/graphics/SimpleFontData.h:
3399         (WebCore::):
3400         (WebCore::SimpleFontData::boundsForGlyph):
3401         (WebCore::SimpleFontData::widthForGlyph):
3402         * platform/graphics/cairo/SimpleFontDataCairo.cpp:
3403         (WebCore::SimpleFontData::platformBoundsForGlyph):
3404         (WebCore::SimpleFontData::platformWidthForGlyph):
3405         * platform/graphics/chromium/SimpleFontDataChromiumWin.cpp:
3406         (WebCore::SimpleFontData::platformBoundsForGlyph):
3407         (WebCore::SimpleFontData::platformWidthForGlyph):
3408         * platform/graphics/chromium/SimpleFontDataLinux.cpp:
3409         (WebCore::SimpleFontData::platformBoundsForGlyph):
3410         (WebCore::SimpleFontData::platformWidthForGlyph):
3411         * platform/graphics/gtk/SimpleFontDataPango.cpp:
3412         (WebCore::SimpleFontData::platformBoundsForGlyph):
3413         (WebCore::SimpleFontData::platformWidthForGlyph):
3414         * platform/graphics/mac/SimpleFontDataMac.mm:
3415         (WebCore::SimpleFontData::platformBoundsForGlyph):
3416         (WebCore::SimpleFontData::platformWidthForGlyph):
3417         * platform/graphics/win/SimpleFontDataCGWin.cpp:
3418         (WebCore::SimpleFontData::platformBoundsForGlyph):
3419         (WebCore::SimpleFontData::platformWidthForGlyph):
3420         * platform/graphics/win/SimpleFontDataCairoWin.cpp:
3421         (WebCore::SimpleFontData::platformBoundsForGlyph):
3422         * platform/graphics/win/SimpleFontDataWin.cpp:
3423         (WebCore::SimpleFontData::boundsForGDIGlyph):
3424         (WebCore::SimpleFontData::widthForGDIGlyph):
3425         * platform/graphics/wince/SimpleFontDataWince.cpp:
3426         (WebCore::SimpleFontData::platformBoundsForGlyph):
3427         * platform/graphics/wx/SimpleFontDataWx.cpp:
3428         (WebCore::SimpleFontData::platformBoundsForGlyph):
3429         (WebCore::SimpleFontData::platformWidthForGlyph):
3430
3431 2010-04-23  Xiaomei Ji  <xji@chromium.org>
3432
3433         Reviewed by Dan Bernstein and Darin Adler
3434
3435         Fix issue "caret does not paint after type in characters in right
3436         aligned div or after delete all characters in RTL div or 
3437         0px right padding RTL textarea"
3438         https://bugs.webkit.org/show_bug.cgi?id=25319
3439
3440         Test: editing/inserting/caret-position.html
3441
3442         * rendering/RenderText.cpp:
3443         (WebCore::RenderText::localCaretRect):
3444
3445 2010-04-23  No'am Rosenthal  <noam.rosenthal@nokia.com>
3446
3447         Reviewed by Kenneth Rohde Christiansen.
3448
3449         [Qt] [Performance] GraphicsLayer: constructing the layers takes too long
3450         https://bugs.webkit.org/show_bug.cgi?id=36365
3451
3452         The issue came from using QGraphicsView's cache as is. The problem is that
3453         several code-paths require re-rendering of the item, but not re-rendering
3454         of the web content into the cache.
3455
3456         The way to solve it is by having GraphicsLayerQt manage the cache directly
3457         via QPixmapCache, instead of using QGraphicsItem cache modes.
3458
3459         FPS measurement shows significant improvement (20FPS before, 40FPS after)
3460         on several use-cases, including blog-files/leaves on a desktop environment.
3461
3462         * platform/graphics/qt/GraphicsLayerQt.cpp:
3463         (WebCore::GraphicsLayerQtImpl::GraphicsLayerQtImpl):
3464         (WebCore::GraphicsLayerQtImpl::recache):
3465         (WebCore::GraphicsLayerQtImpl::paint):
3466         (WebCore::GraphicsLayerQtImpl::flushChanges):
3467
3468 2010-04-23  James Robinson  <jamesr@chromium.org>
3469
3470         Reviewed by Dimitri Glazkov.
3471
3472         Avoid marking symbols as dllexport in chromium win builds
3473         https://bugs.webkit.org/show_bug.cgi?id=38058
3474
3475         No new tests.
3476
3477         * config.h:
3478
3479 2010-04-23  MORITA Hajime  <morrita@google.com>
3480
3481         Reviewed by Nikolas Zimmermann.
3482
3483         https://bugs.webkit.org/show_bug.cgi?id=37187
3484         SVG <use href="foo"> is interpreted as <use href="#foo">
3485
3486         getTarget() did return url parameter as is if doesn't have
3487         fragment identifier. So fixed to return empty string in such case
3488         because we need to distinguish "yyy.html" from "xxx.svg#yyy.html".
3489         
3490         Test: svg/custom/broken-internal-references.svg
3491
3492         * svg/SVGElement.cpp:
3493         (WebCore::SVGElement::insertedIntoDocument):
3494         * svg/SVGURIReference.cpp:
3495         (WebCore::SVGURIReference::getTarget):
3496
3497 2010-04-23  Simon Fraser  <simon.fraser@apple.com>
3498
3499         Reviewed by Dan Bernstein.
3500
3501         ASSERT(willBeComposited == needsToBeComposited(layer)); on gmail.com
3502         https://bugs.webkit.org/show_bug.cgi?id=38066
3503         
3504         When a layer goes into compositing mode because it has a negative z-index child that is going
3505         into compositing mode, then set willBeComposited to true. Also add another assertion to catch
3506         any other cases where the state of willBeComposited is mismanaged.
3507
3508         Test: compositing/composited-negative-zindex-child.html
3509
3510         * rendering/RenderLayerCompositor.cpp:
3511         (WebCore::RenderLayerCompositor::computeCompositingRequirements):
3512
3513 2010-04-23  Simon Fraser  <simon.fraser@apple.com>
3514
3515         Reviewed by Dan Bernstein.
3516
3517         When webkitAnimationEnd event fires, on-screen rendering should show the last frame of animation
3518         https://bugs.webkit.org/show_bug.cgi?id=37955
3519
3520         After r37484, animation and transition end events were fired on a timer, after the animation/transition
3521         ended. This opened up one event loop cycle in which the non-animating state of the element was visible
3522         before the event fired, resulting in flashes in content that reset style from the event handler.
3523         
3524         Fix by firing these events in the same event cycle as the animation end, once all animations
3525         have been updated. This also required moving the place that start animations are fixed until
3526         a later state in the state machine, so that animations have their start time set at the point
3527         the event is fired (to avoid an assertion when using the freeze API in DRT).
3528         
3529         Not testable, since the flash is very transitory and cannot be captured in a pixel test.
3530
3531         * page/animation/AnimationBase.cpp:
3532         (WebCore::AnimationBase::updateStateMachine): Move the firing of 'start' events into the state
3533         where the start time is known.
3534         * page/animation/AnimationControllerPrivate.h:
3535         * page/animation/AnimationController.cpp:
3536         (WebCore::AnimationControllerPrivate::updateStyleIfNeededDispatcherFired): Call the new fireEventsAndUpdateStyle()
3537         method.
3538         (WebCore::AnimationControllerPrivate::fireEventsAndUpdateStyle): New method to share code that used to be in
3539         updateStyleIfNeededDispatcherFired().
3540         (WebCore::AnimationControllerPrivate::animationTimerFired): Call fireEventsAndUpdateStyle() once we've
3541         processed all animations.
3542
3543 2010-04-23  Simon Fraser  <simon.fraser@apple.com>
3544
3545         Reviewed by Dan Bernstein.
3546
3547         CompositeAnimation::updateKeyframeAnimations() can make a KeyframeAnimation for animation "none"
3548         https://bugs.webkit.org/show_bug.cgi?id=38017
3549
3550         Check to see if the animation name is "none", and don't fire off a keyframe animation in
3551         that case.
3552
3553         * page/animation/CompositeAnimation.cpp:
3554         (WebCore::CompositeAnimation::updateKeyframeAnimations):
3555
3556 2010-04-23  Laszlo Gombos  <laszlo.1.gombos@nokia.com>
3557
3558         Reviewed by Kenneth Rohde Christiansen.
3559
3560         [Qt] Disable Netscape plugin support for minimal configuration
3561         https://bugs.webkit.org/show_bug.cgi?id=38026
3562
3563         No new tests, as there is no new functionality.
3564
3565         * WebCore.pri:
3566
3567 2010-04-23  Shinichiro Hamaji  <hamaji@chromium.org>
3568
3569         Reviewed by Darin Adler.
3570
3571         Need borderAndPadding(Width|Height)
3572         https://bugs.webkit.org/show_bug.cgi?id=38046
3573
3574         Refactoring only, so no new tests.
3575
3576         * rendering/InlineBox.cpp:
3577         (WebCore::InlineBox::height):
3578         * rendering/RenderApplet.cpp:
3579         (WebCore::RenderApplet::createWidgetIfNecessary):
3580         * rendering/RenderBlock.cpp:
3581         (WebCore::RenderBlock::isSelfCollapsingBlock):
3582         (WebCore::RenderBlock::calcPrefWidths):
3583         * rendering/RenderBox.cpp:
3584         (WebCore::RenderBox::calcBorderBoxWidth):
3585         (WebCore::RenderBox::calcBorderBoxHeight):
3586         (WebCore::RenderBox::calcContentBoxWidth):
3587         (WebCore::RenderBox::calcContentBoxHeight):
3588         (WebCore::RenderBox::calcWidth):
3589         (WebCore::RenderBox::calcHeight):
3590         (WebCore::RenderBox::calcPercentageHeight):
3591         (WebCore::RenderBox::calcReplacedHeightUsing):
3592         (WebCore::RenderBox::availableHeightUsing):
3593         (WebCore::RenderBox::calcAbsoluteHorizontal):
3594         (WebCore::RenderBox::calcAbsoluteVertical):
3595         (WebCore::RenderBox::calcAbsoluteHorizontalReplaced):
3596         (WebCore::RenderBox::calcAbsoluteVerticalReplaced):
3597         (WebCore::RenderBox::positionForPoint):
3598         * rendering/RenderBoxModelObject.h:
3599         (WebCore::RenderBoxModelObject::borderAndPaddingHeight):
3600         (WebCore::RenderBoxModelObject::borderAndPaddingWidth):
3601         * rendering/RenderDataGrid.cpp:
3602         (WebCore::RenderDataGrid::calcPrefWidths):
3603         * rendering/RenderFieldset.cpp:
3604         (WebCore::RenderFieldset::calcPrefWidths):
3605         * rendering/RenderFileUploadControl.cpp:
3606         (WebCore::RenderFileUploadControl::calcPrefWidths):
3607         * rendering/RenderFlexibleBox.cpp:
3608         (WebCore::RenderFlexibleBox::calcPrefWidths):
3609         (WebCore::RenderFlexibleBox::allowedChildFlex):
3610         * rendering/RenderImage.cpp:
3611         (WebCore::RenderImage::calcPrefWidths):
3612         * rendering/RenderLayer.cpp:
3613         (WebCore::RenderLayer::resize):
3614         * rendering/RenderListBox.cpp:
3615         (WebCore::RenderListBox::calcPrefWidths):
3616         (WebCore::RenderListBox::calcHeight):