Unreviewed, Chromium valgrind build fix.
[WebKit-https.git] / Source / WebCore / ChangeLog
1 2011-09-09  Alexander Pavlov  <apavlov@chromium.org>
2
3         Unreviewed, Chromium valgrind build fix.
4
5         Web Inspector: [Chromium] Valgrind signals use of uninitialized field in InspectorStyleSheetForInlineStyle
6         https://bugs.webkit.org/show_bug.cgi?id=67837
7
8         * inspector/InspectorStyleSheet.cpp:
9         (WebCore::InspectorStyleSheetForInlineStyle::InspectorStyleSheetForInlineStyle):
10
11 2011-09-09  Sheriff Bot  <webkit.review.bot@gmail.com>
12
13         Unreviewed, rolling out r94536.
14         http://trac.webkit.org/changeset/94536
15         https://bugs.webkit.org/show_bug.cgi?id=67836
16
17         breaks absoluteLocation() of RelatedMouseEvent (Requested by
18         jknotten on #webkit).
19
20         * dom/MouseRelatedEvent.cpp:
21         (WebCore::MouseRelatedEvent::MouseRelatedEvent):
22
23 2011-09-08  Alexander Pavlov  <apavlov@chromium.org>
24
25         Web Inspector: live edit both for JS and CSS is not discoverable.
26         https://bugs.webkit.org/show_bug.cgi?id=65962
27
28         Add the "Edit" button to SourceFrame, so that resources/scripts can be edited both in the
29         Resources and the Scripts panels. The button is grayed out if the resource/script is not editable.
30
31         Reviewed by Yury Semikhatsky.
32
33         * inspector/front-end/Images/statusbarButtonGlyphs.png:
34         * inspector/front-end/ResourceView.js:
35         (WebInspector.EditableResourceSourceFrame.prototype.canEditSource):
36         * inspector/front-end/ScriptsPanel.js:
37         (WebInspector.ScriptsPanel.prototype.get statusBarItems):
38         (WebInspector.ScriptsPanel.prototype.set visibleView):
39         * inspector/front-end/SourceFrame.js:
40         (WebInspector.SourceFrame):
41         (WebInspector.SourceFrame.prototype.get statusBarItems):
42         (WebInspector.SourceFrame.prototype._initializeTextViewer):
43         (WebInspector.SourceFrame.prototype._editButtonClicked):
44         (WebInspector.SourceFrame.prototype.canEditSource):
45         (WebInspector.SourceFrame.prototype.startEditing):
46         (WebInspector.SourceFrame.prototype.commitEditing):
47         (WebInspector.SourceFrame.prototype._setReadOnly):
48         (WebInspector.TextViewerDelegateForSourceFrame.prototype.doubleClick):
49         * inspector/front-end/TextViewer.js:
50         (WebInspector.TextEditorMainPanel.prototype.set readOnly):
51         (WebInspector.TextEditorMainPanel.prototype._updateSelectionOnStartEditing):
52         * inspector/front-end/inspector.css:
53         (button.edit-source-status-bar-item .glyph):
54         (button.edit-source-status-bar-item.toggled-on .glyph):
55
56 2011-09-09  Shinya Kawanaka  <shinyak@google.com>
57
58         Crashes in WebCore::AppendNodeCommand::create().
59         https://bugs.webkit.org/show_bug.cgi?id=67767
60
61         Reviewed by Darin Adler.
62
63         In CompositeEditCommand::closeParagraphUnderNewElement(), lastNode could be a non Element node.
64         The current code assumes lastNode is an Element node. This patch checks it.
65
66         Test: editing/execCommand/ident-crashes-topnode-is-text.html
67
68         * editing/CompositeEditCommand.cpp:
69         (WebCore::CompositeEditCommand::cloneParagraphUnderNewElement): Added an element node check.
70
71 2011-09-09  Shinya Kawanaka  <shinyak@google.com>
72
73         Crashes in WebCore::ApplyStyleCommand.doApply()
74         https://bugs.webkit.org/show_bug.cgi?id=67765
75
76         Reviewed by Ryosuke Niwa.
77
78         WebCore::enclosingBlock may return null, but ApplyStyleCommand::applyBlockStyle did not check it. This patch make it to be checked.
79
80         Test: editing/style/remove-format-without-enclosing-block.html
81
82         * editing/ApplyStyleCommand.cpp:
83         (WebCore::ApplyStyleCommand::applyBlockStyle): Added null check.
84
85 2011-09-09  James Simonsen  <simonjam@chromium.org>
86
87         [Chromium] Fix leak of Skia stream with custom CSS fonts
88         https://bugs.webkit.org/show_bug.cgi?id=67815
89
90         Reviewed by Adam Barth.
91
92         Test: fast/css/font-face-opentype.html under valgrind
93
94         * platform/graphics/mac/FontCustomPlatformData.cpp:
95         (WebCore::createFontCustomPlatformData):
96         * platform/graphics/skia/FontCustomPlatformData.cpp:
97         (WebCore::createFontCustomPlatformData):
98
99 2011-09-07  Ryosuke Niwa  <rniwa@webkit.org>
100
101         Push more code from HTMLInputElement::setValue to TextFieldInputType::setValue
102         https://bugs.webkit.org/show_bug.cgi?id=67742
103
104         Reviewed by Darin Adler.
105
106         Moved more code in HTMLInputElement::setValue to TextFieldInputType::setValue, and merged
107         InputType::valueChanged into InputType::setValue. Also introduced
108         InputType::dispatchChangeEventInResponseToSetValue to be overridden by TextFieldInputType.
109
110         * html/BaseButtonInputType.cpp:
111         (WebCore::BaseButtonInputType::setValue):
112         * html/BaseButtonInputType.h:
113         * html/BaseCheckableInputType.cpp:
114         (WebCore::BaseCheckableInputType::setValue):
115         * html/BaseCheckableInputType.h:
116         * html/ColorInputType.cpp:
117         * html/ColorInputType.h:
118         * html/FileInputType.cpp:
119         (WebCore::FileInputType::setValue):
120         * html/FileInputType.h:
121         * html/HTMLInputElement.cpp:
122         (WebCore::HTMLInputElement::setValue):
123         * html/HTMLInputElement.h:
124         (WebCore::HTMLInputElement::cacheSelectionInResponseToSetValue):
125         * html/HiddenInputType.cpp:
126         (WebCore::HiddenInputType::setValue):
127         * html/HiddenInputType.h:
128         * html/InputType.cpp:
129         (WebCore::InputType::setValue):
130         (WebCore::InputType::dispatchChangeEventInResponseToSetValue):
131         * html/InputType.h:
132         * html/RangeInputType.cpp:
133         (WebCore::RangeInputType::setValue):
134         * html/RangeInputType.h:
135         * html/TextFieldInputType.cpp:
136         (WebCore::TextFieldInputType::setValue):
137         (WebCore::TextFieldInputType::dispatchChangeEventInResponseToSetValue):
138         * html/TextFieldInputType.h:
139
140 2011-09-08  Annie Sullivan  <sullivan@chromium.org>
141
142         Crashes in WebCore::InsertNodeBeforeCommand constructor.
143         https://bugs.webkit.org/show_bug.cgi?id=67763
144
145         Reviewed by Ryosuke Niwa.
146
147         Changes editableRootForPosition() to use the position's containerNode instead of deprecatedNode so that
148         positions which are before or after a given node cannot return that node as the editable root.
149
150         Test: editing/inserting/insert-paragraph-selection-outside-contenteditable.html
151
152         * editing/htmlediting.cpp:
153         (WebCore::editableRootForPosition): use containerNode instead of deprecatedNode.
154
155 2011-09-08  James Weatherall  <wez@chromium.org>
156
157         Release the reference to the HTMLPlugInElement's script object, when the element is removed from the document.  This breaks a cyclical reference that would otherwise cause the element to be retained until the document is torn down.
158         https://bugs.webkit.org/show_bug.cgi?id=66181
159
160         Reviewed by Anders Carlsson.
161
162         No new tests - no functional change.
163
164         * html/HTMLPlugInElement.cpp:
165         (WebCore::HTMLPlugInElement::removedFromDocument):
166         * html/HTMLPlugInElement.h:
167
168 2011-09-08  Daniel Bates  <dbates@webkit.org>
169
170         XSS filter bypass via non-standard URL encoding
171         https://bugs.webkit.org/show_bug.cgi?id=66588
172
173         Reviewed by Adam Barth.
174
175         Tests: http/tests/security/xssAuditor/script-tag-with-16bit-unicode-surrogate-pair.html
176                http/tests/security/xssAuditor/script-tag-with-16bit-unicode.html
177                http/tests/security/xssAuditor/script-tag-with-16bit-unicode2.html
178                http/tests/security/xssAuditor/script-tag-with-16bit-unicode3.html
179                http/tests/security/xssAuditor/script-tag-with-16bit-unicode4.html
180                http/tests/security/xssAuditor/script-tag-with-16bit-unicode5.html
181                http/tests/security/xssAuditor/script-tag-with-three-times-url-encoded-16bit-unicode.html
182                http/tests/security/xssAuditor/window-open-without-url-should-not-assert.html
183
184         Implement support for decoding non-standard 16-bit Unicode escape sequences of
185         the form %u26C4 as described in <http://www.w3.org/International/iri-edit/draft-duerst-iri.html#anchor29>.
186
187         See also <http://en.wikipedia.org/wiki/Percent-encoding#Non-standard_implementations>.
188
189         * GNUmakefile.list.am: Added DecodeEscapeSequences.h.
190         * WebCore.gypi: Ditto.
191         * WebCore.pro: Ditto.
192         * WebCore.vcproj/WebCore.vcproj: Ditto.
193         * WebCore.xcodeproj/project.pbxproj: Ditto.
194         * html/parser/XSSAuditor.cpp:
195         (WebCore::decode16BitUnicodeEscapeSequences): Added.
196         (WebCore::decodeStandardURLEscapeSequences): Added.
197         (WebCore::fullyDecodeString): Modified to call decode16BitUnicodeEscapeSequences().
198         (WebCore::XSSAuditor::init): Modified to return early when the URL of the document
199         is the empty string. This can happen when opening a new browser window or calling
200         window.open("").
201         * platform/KURL.cpp:
202         (WebCore::decodeURLEscapeSequences): Abstracted code into template-function decodeEscapeSequences().
203         This function just calls decodeEscapeSequences<URLEscapeSequence>().
204         * platform/text/DecodeEscapeSequences.h: Added.
205         (WebCore::Unicode16BitEscapeSequence::findInString):
206         (WebCore::Unicode16BitEscapeSequence::matchStringPrefix):
207         (WebCore::Unicode16BitEscapeSequence::decodeRun):
208         (WebCore::URLEscapeSequence::findInString):
209         (WebCore::URLEscapeSequence::matchStringPrefix):
210         (WebCore::URLEscapeSequence::decodeRun):
211         (WebCore::decodeEscapeSequences):
212
213 2011-09-08  Adam Barth  <abarth@webkit.org>
214
215         DocumentWriter::deprecatedFrameEncoding doesn't need to refert to Settings
216         https://bugs.webkit.org/show_bug.cgi?id=67812
217
218         Reviewed by Eric Seidel.
219
220         The one caller of this function does this work already.
221
222         * loader/DocumentWriter.cpp:
223         (WebCore::DocumentWriter::deprecatedFrameEncoding):
224
225 2011-09-08  Adam Klein  <adamk@chromium.org>
226
227         Always zero-out m_sortedTextBoxesPosition to avoid uninitialized read in TextIterator
228         https://bugs.webkit.org/show_bug.cgi?id=67810
229
230         Reviewed by Tony Chang.
231
232         Reported as a valgrind failure in http://crbug.com/84777.
233
234         No possible change in behavior, so no tests. The unitialized read
235         could never have an impact:
236
237            if (m_sortedTextBoxesPosition + 1 < m_sortedTextBoxes.size()) ...
238
239         Since m_sortedTextBoxes.size() will be zero here if
240         m_sortedTextBoxesPosition is uninitialized, and they're both unsigned,
241         so no possible value of m_sortedTextBoxesPosition could be < 0.
242
243         * editing/TextIterator.cpp:
244         (WebCore::TextIterator::TextIterator):
245
246 2011-09-08  Tony Chang  <tony@chromium.org>
247
248         Cleanup of switch statements with default cases
249         https://bugs.webkit.org/show_bug.cgi?id=67808
250
251         Reviewed by Adam Barth.
252
253         No new tests, just a small refactoring.
254
255         * page/WebKitAnimation.cpp:
256         (WebCore::WebKitAnimation::fillMode):
257         * platform/audio/Distance.cpp:
258         (WebCore::DistanceEffect::gain):
259
260 2011-09-08  Eric Seidel  <eric@webkit.org>
261
262         [BiDi] Add support for the BDI element
263         https://bugs.webkit.org/show_bug.cgi?id=50913
264
265         Reviewed by Ryosuke Niwa.
266
267         This patch is ridiculously trivial now that we have unicode-bidi: isolate support in WebKit.
268
269         Test: css3/bdi-element.html
270
271         * css/html.css:
272         (bdi):
273
274 2011-09-08  David Levin  <levin@chromium.org>
275
276         [chromium] KURL::copy doesn't produce something usable on another thread.
277         https://bugs.webkit.org/show_bug.cgi?id=67809
278
279         Reviewed by Adam Barth.
280
281         No new functionality exposed so no new test. This was caught by testing code: the thread
282         sanitizer run in Chromium (http://code.google.com/p/chromium/issues/detail?id=93708).
283
284         * platform/KURLGoogle.cpp:
285         (WebCore::KURLGooglePrivate::copyTo): Clear out the invalid String so that it will
286         not be used on another thread.
287
288 2011-09-08  Alexey Proskuryakov  <ap@apple.com>
289
290         REGRESSION (r66874): Missing RefPtr in ScriptController
291         https://bugs.webkit.org/show_bug.cgi?id=67748
292
293         Reviewed by Adam Barth.
294
295         * bindings/ScriptControllerBase.cpp: (WebCore::ScriptController::executeScript):
296
297 2011-09-08  Adam Barth  <abarth@webkit.org>
298
299         Second attempt to fix Chromium build.
300
301         * dom/Document.h:
302
303 2011-09-08  Oliver Hunt  <oliver@apple.com>
304
305         Use bump allocator for initial property storage
306         https://bugs.webkit.org/show_bug.cgi?id=67494
307
308         Reviewed by Geoffrey Garen.
309
310         Add a forwarding header.
311
312         * ForwardingHeaders/runtime/StorageBarrier.h: Added.
313
314 2011-09-08  Roland Steiner  <rolandsteiner@chromium.org>
315
316         Unreviewed, rolling out r94809.
317         http://trac.webkit.org/changeset/94809
318         https://bugs.webkit.org/show_bug.cgi?id=67718
319
320         commit _still_ premature, despite CQ eagerness
321
322         * html/HTMLAttributeNames.in:
323         * html/HTMLStyleElement.cpp:
324         * html/HTMLStyleElement.h:
325         * html/HTMLStyleElement.idl:
326
327 2011-09-08  Sam Weinig  <sam@webkit.org>
328
329         Remove the Completion object from JSC, I have never liked it
330         https://bugs.webkit.org/show_bug.cgi?id=67755
331
332         Reviewed by Gavin Barraclough.
333
334         * bindings/js/JSDOMBinding.cpp:
335         (WebCore::reportException):
336         * bindings/js/JSEventListener.cpp:
337         (WebCore::JSEventListener::handleEvent):
338         * bindings/js/JSInjectedScriptManager.cpp:
339         (WebCore::InjectedScriptManager::createInjectedScript):
340         * bindings/js/JSMainThreadExecState.h:
341         (WebCore::JSMainThreadExecState::evaluate):
342         * bindings/js/ScriptController.cpp:
343         (WebCore::ScriptController::evaluateInWorld):
344         * bindings/js/WorkerScriptController.cpp:
345         (WebCore::WorkerScriptController::evaluate):
346         * bindings/objc/WebScriptObject.mm:
347         (-[WebScriptObject evaluateWebScript:]):
348         * bridge/NP_jsobject.cpp:
349         (_NPN_Evaluate):
350         * bridge/jni/jni_jsobject.mm:
351         (JavaJSObject::eval):
352
353 2011-09-08  Adam Barth  <abarth@webkit.org>
354
355         Inline DocumentWriter::encoding() into it's only caller: deprecatedFrameEncoding()
356         https://bugs.webkit.org/show_bug.cgi?id=67807
357
358         Reviewed by Eric Seidel.
359
360         This function is super nutty.  We don't want any more folks to call it
361         thinking that it does something sane.
362
363         * loader/DocumentWriter.cpp:
364         (WebCore::DocumentWriter::deprecatedFrameEncoding):
365         * loader/DocumentWriter.h:
366
367 2011-09-08  Roland Steiner  <rolandsteiner@chromium.org>
368
369         <style scoped>: Add 'scoped' attribute
370         https://bugs.webkit.org/show_bug.cgi?id=67718
371
372         Add 'scoped' attribute to IDL and attribute list,
373         implement and test setting/resetting of the attribute.
374
375         Reviewed by Dimitri Glazkov.
376
377         Test: fast/css/style-scoped/basic-attribute.html
378
379         * html/HTMLAttributeNames.in:
380         * html/HTMLStyleElement.cpp:
381         (WebCore::HTMLStyleElement::scoped):
382         (WebCore::HTMLStyleElement::setScoped):
383         (WebCore::HTMLStyleElement::scopingElement):
384         * html/HTMLStyleElement.h:
385         * html/HTMLStyleElement.idl:
386
387 2011-09-08  Sheriff Bot  <webkit.review.bot@gmail.com>
388
389         Unreviewed, rolling out r94781.
390         http://trac.webkit.org/changeset/94781
391         https://bugs.webkit.org/show_bug.cgi?id=67806
392
393         Broke Objective-C binding on Mac (Requested by rniwa on
394         #webkit).
395
396         * dom/Element.idl:
397         * dom/Node.cpp:
398         (WebCore::Node::contains):
399         * dom/Node.idl:
400         * editing/DeleteSelectionCommand.cpp:
401         (WebCore::DeleteSelectionCommand::mergeParagraphs):
402
403 2011-09-08  Eric Seidel  <eric@webkit.org>
404
405         Remove DocumentWriter::setDecoder as a grep of WebKit shows no callers
406         https://bugs.webkit.org/show_bug.cgi?id=67803
407
408         Reviewed by Adam Barth.
409
410         Smells like dead code.
411
412         * loader/DocumentWriter.cpp:
413         * loader/DocumentWriter.h:
414
415 2011-09-08  Shinya Kawanaka  <shinyak@google.com>
416
417         Crashes in WebCore::ReplaceSelectionCommand::doApply
418         https://bugs.webkit.org/show_bug.cgi?id=67762
419
420         Reviewed by Ryosuke Niwa.
421
422         WebCore::enclosingBlock may return null, but its return value was not checked. This patch checks it.
423
424         Tests: editing/inserting/insert-without-enclosing-block.html
425
426         * editing/ReplaceSelectionCommand.cpp:
427         (WebCore::ReplaceSelectionCommand::doApply): Added null check.
428
429 2011-09-08  Sheriff Bot  <webkit.review.bot@gmail.com>
430
431         Unreviewed, rolling out r94784.
432         http://trac.webkit.org/changeset/94784
433         https://bugs.webkit.org/show_bug.cgi?id=67796
434
435         Commit was premature (Requested by rolandsteiner on #webkit).
436
437         * html/HTMLAttributeNames.in:
438         * html/HTMLStyleElement.cpp:
439         * html/HTMLStyleElement.h:
440         * html/HTMLStyleElement.idl:
441
442 2011-09-08  W. James MacLean  <wjmaclean@chromium.org>
443
444         [chromium] Add backend compositor support for rescaling (zooming) textures during zoom animation.
445         https://bugs.webkit.org/show_bug.cgi?id=66472
446
447         This patch contains plumbing from Internals to WebViewImpl that can be removed
448         at a later time when the zoom animator code is complete.
449
450         Reviewed by James Robinson.
451
452         Test: platform/chromium/compositing/zoom-animator-scale-test.html
453
454         * page/Settings.cpp:
455         (WebCore::Settings::Settings):
456         * page/Settings.h:
457         (WebCore::Settings::setZoomAnimatorScale):
458         (WebCore::Settings::zoomAnimatorScale):
459         * platform/graphics/chromium/LayerRendererChromium.cpp:
460         (WebCore::LayerRendererChromium::LayerRendererChromium):
461         (WebCore::LayerRendererChromium::drawLayersInternal):
462         * platform/graphics/chromium/LayerRendererChromium.h:
463         (WebCore::LayerRendererChromium::setZoomAnimatorScale):
464         * platform/graphics/chromium/cc/CCLayerTreeHost.cpp:
465         (WebCore::CCLayerTreeHost::CCLayerTreeHost):
466         (WebCore::CCLayerTreeHost::commitTo):
467         (WebCore::CCLayerTreeHost::setZoomAnimatorScale):
468         (WebCore::CCLayerTreeHost::updateLayers):
469         * platform/graphics/chromium/cc/CCLayerTreeHost.h:
470         * platform/graphics/chromium/cc/CCLayerTreeHostImpl.cpp:
471         (WebCore::CCLayerTreeHostImpl::setZoomAnimatorScale):
472         * platform/graphics/chromium/cc/CCLayerTreeHostImpl.h:
473         * testing/Internals.cpp:
474         (WebCore::Internals::setZoomAnimatorScale):
475         * testing/Internals.h:
476         * testing/Internals.idl:
477
478 2011-09-08  Eric Carlson  <eric.carlson@apple.com>
479
480         HTMLMediaElement is missing initialTime attribute
481         https://bugs.webkit.org/show_bug.cgi?id=67791
482
483         Reviewed by Darin Adler.
484
485         Test: media/media-initialTime.html
486
487         * html/HTMLMediaElement.cpp:
488         (WebCore::HTMLMediaElement::initialTime):
489         * html/HTMLMediaElement.h:
490         * html/HTMLMediaElement.idl:
491         * platform/graphics/MediaPlayer.cpp:
492         (WebCore::MediaPlayer::initialTime):
493         * platform/graphics/MediaPlayer.h:
494         * platform/graphics/MediaPlayerPrivate.h:
495         (WebCore::MediaPlayerPrivateInterface::initialTime):
496
497 2011-09-03  Robert Hogan  <robert@webkit.org>
498
499         Elements with position:absolute don't move to correct position after images load
500         https://bugs.webkit.org/show_bug.cgi?id=54611
501
502         Reviewed by Simon Fraser.
503
504         Test: fast/block/positioning/absolute-layout-after-image-load.html
505
506         In the test the 'label' block is an absolutely positioned child of an inline flow. So during layout, 
507         this RenderBlock::layoutPositionedObjects fails to dirty it for rendering because it requires 
508         the parent to be a BlockFlow. The code to do this was introduced in http://trac.webkit.org/changeset/8284. 
509         There doesn't seem to be a good reason for requiring a BlockFlow, so remove the check. 
510
511         Note: Although the issue is encountered only on first load without a fragment identifier, it 
512         happens reliably when you include the fragment identifier in the url (#Footnote_1). This is so 
513         because scrolling to the fragment always happens before the image has loaded, rendering the page 
514         and clearing the initial dirty bits in the positioned element's renderer. When the image finally 
515         loads in this scenario, the positioned element is otherwise clean and relies on the above code to get 
516         re-rendered.
517
518         Note: This was originally landed in r94755 but positioned-float-layout-after-image-load.html exposed
519               an ASSERT bug, unrelated to this change, and was rolled out. That issue is tracked separately
520               in bug 67759.
521
522         * rendering/RenderBlock.cpp:
523         (WebCore::RenderBlock::layoutPositionedObjects): remove the check for r->parent()->isBlockFlow() when 
524                                                          deciding whether to mark children for layout
525
526 2011-09-08  Roland Steiner  <rolandsteiner@chromium.org>
527
528         <style scoped>: Add 'scoped' attribute
529         https://bugs.webkit.org/show_bug.cgi?id=67718
530
531         Add 'scoped' attribute to IDL and attribute list,
532         implement and test setting/resetting of the attribute.
533
534         Reviewed by Dimitri Glazkov.
535
536         Test: fast/css/style-scoped/basic-attribute.html
537
538         * html/HTMLAttributeNames.in:
539         * html/HTMLStyleElement.cpp:
540         (WebCore::HTMLStyleElement::scoped):
541         (WebCore::HTMLStyleElement::setScoped):
542         (WebCore::HTMLStyleElement::scopingElement):
543         * html/HTMLStyleElement.h:
544         * html/HTMLStyleElement.idl:
545
546 2011-09-08  Erik Arvidsson  <arv@chromium.org>
547
548         Move Element.contains to Node
549         https://bugs.webkit.org/show_bug.cgi?id=67651
550
551         Reviewed by Darin Adler.
552
553         This moves the contains method from Element to Node as in the DOM4 working draft: 
554         http://dvcs.w3.org/hg/domcore/raw-file/tip/Overview.html#dom-node-contains
555
556         This also special cases Document contains to make it O(1) instead of O(depth).
557
558         Tests: fast/dom/Node/contains-method.html
559                perf/document-contains.html
560
561         * dom/Element.idl:
562         * dom/Node.cpp:
563         (WebCore::Node::contains): Added document special case.
564         * dom/Node.idl:
565         * editing/DeleteSelectionCommand.cpp:
566         (WebCore::DeleteSelectionCommand::mergeParagraphs): Added a null check.
567
568 2011-09-08  Chris Rogers  <crogers@google.com>
569
570         Check AudioContext createChannelMerger() for thread safety
571         https://bugs.webkit.org/show_bug.cgi?id=67247
572
573         Reviewed by Kenneth Russell.
574
575         Test: webaudio/audiochannelmerger-stereo.html
576
577         * webaudio/AudioChannelMerger.cpp:
578         (WebCore::AudioChannelMerger::process):
579         (WebCore::AudioChannelMerger::checkNumberOfChannelsForInput):
580         * webaudio/AudioChannelMerger.h:
581
582 2011-09-08  Ned Holbrook  <nholbrook@apple.com>
583
584         Refactor hyphen measurement
585         https://bugs.webkit.org/show_bug.cgi?id=67728
586
587         Reviewed by Darin Adler.
588
589         No new tests, purely refactoring.
590
591         * rendering/RenderBlockLineLayout.cpp:
592         (WebCore::measureHyphenWidth): Added.
593         (WebCore::setLogicalWidthForTextRun): Use measureHyphenWidth().
594         (WebCore::tryHyphenating): Ditto.
595         (WebCore::RenderBlock::LineBreaker::nextLineBreak): Ditto.
596
597 2011-09-08  Julien Chaffraix  <jchaffraix@webkit.org>
598
599         Remove LayoutStateDisabler instances from RenderLayer
600         https://bugs.webkit.org/show_bug.cgi?id=66896
601
602         Reviewed by Simon Fraser.
603
604         As part of r93614, scrollTo does not call updateLayerPositions anymore.
605         This means that we don't need to disable LayoutState from the scrolling code
606         in RenderLayer.
607
608         This change is covered by the existing tests.
609
610         * rendering/RenderLayer.cpp:
611         (WebCore::RenderLayer::updateLayerPositions): Updated the comment
612         that was not accurate anymore. Also explained what is wrong with
613         LayoutState vs RenderLayer now. Note that the ASSERT is still
614         valid and will not trigger as the remaining calls to updateLayerPositions
615         are done *outside* layout() where LayoutState is not set (thus disabled).
616
617         (WebCore::RenderLayer::updateScrollInfoAfterLayout): Removed
618         2 LayoutStateDisabler surrounding scrollToOffset.
619
620 2011-09-08  Julien Chaffraix  <jchaffraix@webkit.org>
621
622         Factor out the code to get the first non-null RenderTableSection in RenderTable
623         https://bugs.webkit.org/show_bug.cgi?id=66972
624
625         Reviewed by Darin Adler.
626
627         Refactoring only, covered by existing tests.
628
629         * accessibility/AccessibilityTable.cpp:
630         (WebCore::AccessibilityTable::addChildren):
631         (WebCore::AccessibilityTable::cellForColumnAndRow):
632         * accessibility/AccessibilityTableCell.cpp:
633         (WebCore::AccessibilityTableCell::rowIndexRange):
634         Updated those for the signature change in sectionBelow. Also added
635         a FIXME where topSection should be used instead of iterating
636         over the section (and likely missing some corner cases).
637
638         * rendering/FixedTableLayout.cpp:
639         (WebCore::FixedTableLayout::calcWidthArray):
640         * rendering/RenderTable.cpp:
641         (WebCore::RenderTable::calcBorderStart):
642         (WebCore::RenderTable::calcBorderEnd):
643         (WebCore::RenderTable::outerBorderBefore):
644         (WebCore::RenderTable::sectionAbove):
645         (WebCore::RenderTable::sectionBelow):
646         (WebCore::RenderTable::firstLineBoxBaseline):
647         Updated all those functions to use the newly added functions. Also changed
648         the variable names to match the functions.
649
650         (WebCore::RenderTable::layout):
651         (WebCore::RenderTable::topNonEmptySection): Newly added function
652         that returns the top non null section of the table that has at least a
653         row.
654
655         (WebCore::RenderTable::cellAbove):
656         (WebCore::RenderTable::cellBelow):
657         Update the signature of those 2 functions to take an enum as it makes the
658         rest of the code more readable.
659
660         * rendering/RenderTable.h:
661         (WebCore::RenderTable::topSection): Newly added function to return
662         the top non null section in the table.
663
664 2011-04-19  Eric Seidel  <eric@webkit.org>
665
666         Reviewed by Ryosuke Niwa.
667
668         [BiDi] [CSS3] MASTER: Add support for the unicode-bidi:isolate CSS property
669         https://bugs.webkit.org/show_bug.cgi?id=50912
670
671         This patch adds support for CSS3 unicode-bidi: isolate property, under the -webkit- vendor prefix.
672         Parsing support was added in a previous patch, this wires up the RenderStyle values
673         to code changes in the BidiResolver.
674
675         The effect of this patch is that it makes it possible to "isolate" runs of text
676         so that their RTL-ness or LTR-ness does not bleed out into the rest of your text
677         and effect layout.  This is important because many unicode characters (like parenthesis, ':', '-', etc.)
678         do not have intrinsic directionality and are affected by whatever characters come before/after.
679         If you have usernames which include RTL text, if you inject those usernames in your page
680         you might end up with nearby characters moving!
681         (like 'RTL USERNAME - my awesome site' as a title, could end up as
682         'my awesome site - USERNAME RTL' when correct would be 'USERNAME RTL - my awesome site'.)
683         This patch makes it possible to wrap sections of text in isolated spans, so that
684         they correctly order all their RTL/LTR contents, but also correctly participate in the
685         larger RTL/LTR ordering without affecting nearby characters.
686
687         Because much of this code is old and rarely touched, I've included extra background
688         information in hopes of expanding my set of potential reviewers:
689
690         WebKit uses the standard "Unicode Bidi Algorithm" henceforth known as the UBA.
691         The UBA is defined at http://unicode.org/reports/tr9/ for those not faint of heart.
692
693         Text layout is done per-block (<div>, <p>, etc), and begins with a string of text
694         (which in our case comes from the rendering tree) and a specified width.
695         First:  Text is measured and wrapped into lines.
696         Second: The UBA is run over the lines of text.
697         Third:  WebKit builds InlineBoxes (its linebox tree) and eventually render the text.
698
699         This patch modifies our UBA to ignore all text content inside "isolated" inlines (treating them as neutral characters)
700         and then adds another step after running the UBA, where we run the UBA recursively on any
701         previously identified "isolated" content.
702
703         The result of the UBA is an ordered list of "runs" of text with the RTL runs
704         correctly RTL and the LTR runs LTR.
705
706         The UBA does three things:
707         1.  It assigns a "class" to each character in a text stream (like neutral, strongly-RTL, strongly-LTR, etc.)
708         2.  Divides the text stream up into "runs" of characters of the same directionality (all RTL, all LTR).
709         3.  Re-orders those runs.
710
711         The UBA in WebKit is implemented by BidiResolver<T> in BidiResolver.h
712
713         The InlineBidiResolver (BidiResolver specialization which knows about the rendering tree)
714         walks along its InlineIterators, looking at each character and running the
715         Unicode Bidi Algorithm (UBA).  It walks through the rendering tree subtree under
716         a block, using a (poorly named) bidiNext function which returns the next inline object.
717         Each inline object (or text character there-in) has a corresponding meaning in the UBA
718         such as a "strong RTL" character or a "neutral" character.  The UBA reads these sequence
719         of characters, and figures out what direction (RTL or LTR) to assign to any neutral
720         characters it encounters, based on surrounding characters.
721
722         As the InlineBidiResolver is walking the rendering tree, the InlineIterator::advance()
723         function calls bidiNext(), which in turn can call notifyObserverEnteredObject/notifyObserverWillExitObject
724         notifying InlineBidiResolver that it is entering or exiting an "isolated"
725         span, at which point it will either start or stop ignoring the stream of characters
726         from the InlineIterator.  When the InlineBidiResolver is ignoring the stream of
727         characters, instead of creating separate BidiRuns at each RTL/LTR boundary
728         as it normally would, it instead creates one "fake" run for the entire
729         isolated span.  These fake runs participate in the normal UBA run ordering process,
730         but after the main UBA, a second pass is made where we examine
731         the list of isolatedRuns() and run the UBA on each of them, replacing the fake
732         run we previously inserted, with the resulting list of runs from that inner UBA run.
733         The way it "ignores" characters is by treating them all as neutral when inside an isolate.
734         Thus all the characters end up grouped in a single run, but their directionality (as a group)
735         is correctly affected by any surrounding strong characters.
736
737         If you understood that last paragraph, than the rest of the change is just plumbing.
738
739         I added a huge number of FIXMEs to this code, because this code has a variety of
740         design choices (or lack there of) which make some of this very difficult.
741
742         For example the bidiNext iterator function has two sets of mutually exclusive
743         parameters and can be used optionally with or without an observer.  Prior to this
744         change there was only ever one object which cared about observing a walk over inlines
745         and that was InlineBidiResolver.  This patch (regretfully) templatizes bidiNext
746         to support a new Observer type.  The correct fix would be to rip bidiNext into
747         multiple functions and rip need for observation out of InlineBidiResolver.
748         Unfortunately I've tried both in separate bugs and failed.  This code is very very
749         old and very poorly understood.  We're slowly moving forward, this is another tiny step.
750
751         This is my fourth iteration of this patch (I'm happy to do more!), but I believe
752         it's a good compromise between fixing all of the design gotcha's of our bidi
753         system and doing the minimum amount to add this killer CSS feature.
754
755         I ran the PLT.  (It averaged 0.2% faster with this change, but I attribute that to noise).
756
757         Test: css3/unicode-bidi-isolate-basic.html and css3/unicode-bidi-isolate-aharon.html
758
759         * platform/text/BidiResolver.h:
760         (WebCore::BidiCharacterRun::setNext):
761          - Needed by the new replaceRunWithRuns function.
762         (WebCore::BidiResolver::BidiResolver):
763         (WebCore::BidiResolver::~BidiResolver):
764         (WebCore::BidiResolver::enterIsolate):
765         (WebCore::BidiResolver::exitIsolate):
766         (WebCore::BidiResolver::inIsolate):
767         (WebCore::BidiResolver::isolatedRuns):
768          - Used to track isolated spans of text as they're encoutered.
769            They're stuffed away here to be processed recursively
770            after the main UBA has done its thang.
771         (WebCore::::appendRun):
772         (WebCore::::embed):
773         (WebCore::::commitExplicitEmbedding):
774         (WebCore::::createBidiRunsForLine):
775         * platform/text/BidiRunList.h:
776         (WebCore::::replaceRunWithRuns):
777          - This effectively takes all the runs from one runlist and adds them to
778            this one, replacing the fake run we inserted during a previous pass of the UBA.
779          - This RunList now owns the runs, so we call clear() on the other RunList
780            so that we don't end up double-freeing the runs.
781         (WebCore::::clear):
782          - This allows us to "take" runs from another run list and then clear it.
783         * rendering/BidiRun.h:
784         (WebCore::BidiRun::object):
785         * rendering/InlineIterator.h:
786         (WebCore::InlineIterator::object):
787         (WebCore::InlineIterator::offset):
788         (WebCore::notifyObserverEnteredObject): Mostly just renaming and adding a FIXME about plaintext.
789         (WebCore::notifyObserverWillExitObject): Mostly just renaming.
790         (WebCore::addPlaceholderRunForIsolatedInline):
791         (WebCore::isIsolatedInline):
792         (WebCore::InlineBidiResolver::appendRun):
793         * rendering/RenderBlockLineLayout.cpp:
794         (WebCore::statusWithDirection):
795         (WebCore::constructBidiRuns):
796          - This is the heavy-lifting of this change.  This function
797            runs the UBA recursively on all the previously identified isolated spans.
798          - If we encounter more isolated spans in our run, we just add them to the
799            main list an keep going.  Because the runs are linked lists and we have
800            direct pointers to our placeholder objects, we don't care what order
801            we process the placeholders in, so long as when we're done, they're all processed.
802         (WebCore::RenderBlock::layoutInlineChildren):
803
804 2011-09-08  Kentaro Hara  <haraken@google.com>
805
806         Implement a ProgressEvent constructor for JSC
807         https://bugs.webkit.org/show_bug.cgi?id=67537
808
809         Reviewed by Sam Weinig.
810
811         The spec for the ProgressEvent constructor is here:
812         http://www.w3.org/TR/progress-events/#interface-progressevent
813
814         Test: fast/events/constructors/progress-event-constructor.html
815
816         * bindings/generic/EventConstructors.h: Added a definition for the ProgressEvent constructor.
817         * bindings/js/JSDictionary.cpp:
818         (WebCore::JSDictionary::convertValue): Converts an ECMA-262 Number into an IDL unsigned long long value. Spec: http://www.w3.org/TR/WebIDL/#es-unsigned-long-long
819         * bindings/js/JSEventConstructors.cpp: Added #includes for ProgressEvent.
820         * dom/ProgressEvent.cpp:
821         (WebCore::ProgressEventInit::ProgressEventInit):
822         (WebCore::ProgressEvent::ProgressEvent):
823         * dom/ProgressEvent.h: Added a definition for ProgressEventInit.
824         (WebCore::ProgressEvent::create):
825         * dom/ProgressEvent.idl: Makes ProgressEvent constructible.
826
827 2011-09-08  Ryosuke Niwa  <rniwa@webkit.org>
828
829         Make bindings tests quiet after r94701.
830
831         * bindings/scripts/test/JS/JSTestInterface.cpp:
832         * bindings/scripts/test/JS/JSTestInterface.h:
833         (WebCore::JSTestInterfacePrototype::JSTestInterfacePrototype):
834         * bindings/scripts/test/JS/JSTestMediaQueryListListener.cpp:
835         * bindings/scripts/test/JS/JSTestMediaQueryListListener.h:
836         (WebCore::JSTestMediaQueryListListenerPrototype::JSTestMediaQueryListListenerPrototype):
837         * bindings/scripts/test/JS/JSTestObj.cpp:
838         * bindings/scripts/test/JS/JSTestObj.h:
839         (WebCore::JSTestObjPrototype::JSTestObjPrototype):
840         * bindings/scripts/test/JS/JSTestSerializedScriptValueInterface.cpp:
841         * bindings/scripts/test/JS/JSTestSerializedScriptValueInterface.h:
842         (WebCore::JSTestSerializedScriptValueInterfacePrototype::JSTestSerializedScriptValueInterfacePrototype):
843
844 2011-09-07  Pavel Podivilov  <podivilov@chromium.org>
845
846         Web Inspector: get rid of RawSourceCode.createSourceMappingIfNeeded.
847         https://bugs.webkit.org/show_bug.cgi?id=67717
848
849         Listen to SourceMappingUpdated event instead of using createSourceMappingIfNeeded.
850
851         Reviewed by Yury Semikhatsky.
852
853         * inspector/front-end/DebuggerPresentationModel.js:
854         (WebInspector.DebuggerPresentationModel):
855         (WebInspector.DebuggerPresentationModel.prototype.linkifyLocation.updateAnchor):
856         (WebInspector.DebuggerPresentationModel.prototype.linkifyLocation):
857         (WebInspector.DebuggerPresentationModel.prototype._updateSourceMapping):
858         (WebInspector.DebuggerPresentationModel.prototype._restoreBreakpoints):
859         (WebInspector.DebuggerPresentationModel.prototype._restoreConsoleMessages):
860         (WebInspector.DebuggerPresentationModel.prototype.setFormatSource):
861         (WebInspector.DebuggerPresentationModel.prototype._consoleMessageAdded):
862         (WebInspector.DebuggerPresentationModel.prototype._createPresentationMessage):
863         (WebInspector.DebuggerPresentationModel.prototype._consoleCleared):
864         (WebInspector.DebuggerPresentationModel.prototype.continueToLine):
865         (WebInspector.DebuggerPresentationModel.prototype.messagesForUISourceCode):
866         (WebInspector.DebuggerPresentationModel.prototype._debuggerReset):
867         (WebInspector.PresentationCallFrame.prototype.sourceLine.sourceMappingUpdated):
868         (WebInspector.PresentationCallFrame.prototype.sourceLine):
869         * inspector/front-end/SourceFile.js:
870
871 2011-09-06  Pavel Podivilov  <podivilov@chromium.org>
872
873         Web Inspector: do not re-create RawSourceCode when toggling pretty-print mode.
874         https://bugs.webkit.org/show_bug.cgi?id=67647
875
876         1) Implement RawSourceCode.setFormatted that allows toggling pretty-print mode on the fly without resetting everything.
877         2) Add RawSourceCode unit tests.
878         3) Remove source mapping listeners and console messages from presentation model (they live in RawSourceCode now).
879
880         Reviewed by Yury Semikhatsky.
881
882         Test: inspector/debugger/raw-source-code.html
883
884         * inspector/front-end/DebuggerPresentationModel.js:
885         (WebInspector.DebuggerPresentationModel):
886         (WebInspector.DebuggerPresentationModel.prototype.linkifyLocation):
887         (WebInspector.DebuggerPresentationModel.prototype._addScript):
888         (WebInspector.DebuggerPresentationModel.prototype._sourceMappingUpdated):
889         (WebInspector.DebuggerPresentationModel.prototype.setFormatSource):
890         (WebInspector.DebuggerPresentationModel.prototype._createRawSourceCodeId):
891         (WebInspector.DebuggerPresentationModel.prototype._debuggerReset):
892         * inspector/front-end/ScriptsPanel.js:
893         (WebInspector.ScriptsPanel.prototype._toggleFormatSource):
894         * inspector/front-end/SourceFile.js:
895         (WebInspector.RawSourceCode):
896         (WebInspector.RawSourceCode.prototype.get uiSourceCode):
897         (WebInspector.RawSourceCode.prototype.setFormatted):
898         (WebInspector.RawSourceCode.prototype.rawLocationToUILocation):
899         (WebInspector.RawSourceCode.prototype._saveSourceMapping):
900
901 2011-09-08  Alexander Pavlov  <apavlov@chromium.org>
902
903         Web Inspector: [REGRESSION] Clear console shortcut Ctrl + L broken
904         https://bugs.webkit.org/show_bug.cgi?id=67711
905
906         Reviewed by Yury Semikhatsky.
907
908         * inspector/front-end/ConsoleView.js:
909         (WebInspector.ConsoleView.prototype._consoleCleared):
910         (WebInspector.ConsoleView.prototype._registerShortcuts):
911         (WebInspector.ConsoleView.prototype._promptKeyDown):
912
913 2011-09-08  Andras Becsi  <andras.becsi@nokia.com>
914
915         [Qt] Build fails with strict compiler
916         https://bugs.webkit.org/show_bug.cgi?id=67778
917
918         Reviewed by Csaba Osztrogonác.
919
920         No new tests needed.
921
922         * platform/graphics/TiledBackingStore.cpp:
923         (WebCore::TiledBackingStore::resizeEdgeTiles): Remove unused contentsRect variable
924         which's usage was removed in r94681 to fix the build with [-Werror=unused-but-set-variable].
925
926 2011-09-08  Sheriff Bot  <webkit.review.bot@gmail.com>
927
928         Unreviewed, rolling out r94695.
929         http://trac.webkit.org/changeset/94695
930         https://bugs.webkit.org/show_bug.cgi?id=67776
931
932         Hitting an assertion on Snow Leopard, Qt, GTK (Requested by
933         Zoltan on #webkit).
934
935         * rendering/RenderBlock.cpp:
936         (WebCore::RenderBlock::positionedFloatsNeedRelayout):
937         (WebCore::RenderBlock::layoutPositionedObjects):
938
939 2011-09-08  Alexander Pavlov  <apavlov@chromium.org>
940
941         Unreviewed, strip trailing whitespace in the Web Inspector frontend (*.js and *.css).
942
943         * inspector/front-end/ApplicationCacheItemsView.js:
944         * inspector/front-end/AuditResultView.js:
945         * inspector/front-end/BinarySearch.js:
946         * inspector/front-end/CSSStyleModel.js:
947         * inspector/front-end/ConsoleMessage.js:
948         * inspector/front-end/ConsoleModel.js:
949         * inspector/front-end/ConsoleView.js:
950         * inspector/front-end/CookieItemsView.js:
951         * inspector/front-end/CookieParser.js:
952         * inspector/front-end/DOMAgent.js:
953         * inspector/front-end/DOMStorage.js:
954         * inspector/front-end/DOMStorageItemsView.js:
955         * inspector/front-end/DataGrid.js:
956         * inspector/front-end/Database.js:
957         * inspector/front-end/DatabaseQueryView.js:
958         * inspector/front-end/DetailedHeapshotGridNodes.js:
959         * inspector/front-end/DetailedHeapshotView.js:
960         * inspector/front-end/ElementsTreeOutline.js:
961         * inspector/front-end/EmptyView.js:
962         * inspector/front-end/EventListenersSidebarPane.js:
963         * inspector/front-end/ExtensionCommon.js:
964         * inspector/front-end/GoToLineDialog.js:
965         * inspector/front-end/HeapSnapshot.js:
966         * inspector/front-end/HeapSnapshotProxy.js:
967         * inspector/front-end/HeapSnapshotWorkerDispatcher.js:
968         * inspector/front-end/ImageView.js:
969         * inspector/front-end/InjectedFakeWorker.js:
970         * inspector/front-end/InspectorFrontendHostStub.js:
971         * inspector/front-end/MetricsSidebarPane.js:
972         * inspector/front-end/NetworkManager.js:
973         * inspector/front-end/NetworkPanel.js:
974         * inspector/front-end/ObjectPropertiesSection.js:
975         * inspector/front-end/PartialQuickSort.js:
976         * inspector/front-end/ProfileView.js:
977         * inspector/front-end/ProfilesPanel.js:
978         * inspector/front-end/RemoteObject.js:
979         * inspector/front-end/Resource.js:
980         * inspector/front-end/ResourceCategory.js:
981         * inspector/front-end/ResourceHTMLView.js:
982         * inspector/front-end/ResourceHeadersView.js:
983         * inspector/front-end/ResourceJSONView.js:
984         * inspector/front-end/ResourceTimingView.js:
985         * inspector/front-end/ResourceTreeModel.js:
986         * inspector/front-end/ResourceView.js:
987         * inspector/front-end/ResourcesPanel.js:
988         * inspector/front-end/SearchController.js:
989         * inspector/front-end/SettingsScreen.js:
990         * inspector/front-end/ShortcutsScreen.js:
991         * inspector/front-end/SourceCSSTokenizer.js:
992         * inspector/front-end/SourceHTMLTokenizer.js:
993         * inspector/front-end/SourceJavaScriptTokenizer.js:
994         * inspector/front-end/StatusBarButton.js:
995         * inspector/front-end/TextEditorModel.js:
996         * inspector/front-end/TimelineGrid.js:
997         * inspector/front-end/View.js:
998         * inspector/front-end/heapProfiler.css:
999         * inspector/front-end/inspector.css:
1000         * inspector/front-end/inspector.js:
1001         * inspector/front-end/inspectorSyntaxHighlight.css:
1002         * inspector/front-end/networkPanel.css:
1003         * inspector/front-end/treeoutline.js:
1004         * inspector/front-end/utilities.js:
1005
1006 2011-09-07  Andrey Kosyakov  <caseq@chromium.org>
1007
1008         Web Inspector: trying to scroll mouse wheel when in TextViewer's gutter pane causes EventException::DISPATCH_REQUEST_ERR
1009         https://bugs.webkit.org/show_bug.cgi?id=67715
1010
1011         Reviewed by Yury Semikhatsky.
1012
1013         - avoid exception on attempt to dispatch an event that is being dispatched by cloning the event.
1014
1015         * inspector/front-end/TextViewer.js:
1016         (WebInspector.TextViewer.forwardWheelEvent):
1017         (WebInspector.TextViewer):
1018
1019 2011-09-07  Sheriff Bot  <webkit.review.bot@gmail.com>
1020
1021         Unreviewed, rolling out r94674 and r94689.
1022         http://trac.webkit.org/changeset/94674
1023         http://trac.webkit.org/changeset/94689
1024         https://bugs.webkit.org/show_bug.cgi?id=67754
1025
1026         Broke inspector/debugger/script-formatter.html (Requested by
1027         rniwa on #webkit).
1028
1029         * inspector/front-end/DebuggerPresentationModel.js:
1030         (WebInspector.DebuggerPresentationModel):
1031         (WebInspector.DebuggerPresentationModel.prototype.addSourceMappingListener):
1032         (WebInspector.DebuggerPresentationModel.prototype.removeSourceMappingListener):
1033         (WebInspector.DebuggerPresentationModel.prototype.linkifyLocation):
1034         (WebInspector.DebuggerPresentationModel.prototype._addScript):
1035         (WebInspector.DebuggerPresentationModel.prototype._sourceMappingUpdated):
1036         (WebInspector.DebuggerPresentationModel.prototype._restoreBreakpoints):
1037         (WebInspector.DebuggerPresentationModel.prototype.setFormatSource):
1038         (WebInspector.DebuggerPresentationModel.prototype._createRawSourceCodeId):
1039         (WebInspector.DebuggerPresentationModel.prototype._debuggerReset):
1040         * inspector/front-end/ScriptsPanel.js:
1041         (WebInspector.ScriptsPanel.prototype._toggleFormatSource):
1042         * inspector/front-end/SourceFile.js:
1043         (WebInspector.RawSourceCode):
1044         (WebInspector.RawSourceCode.prototype.get uiSourceCode):
1045         (WebInspector.RawSourceCode.prototype.get rawSourceCode):
1046         (WebInspector.RawSourceCode.prototype.rawLocationToUILocation):
1047         (WebInspector.RawSourceCode.prototype.requestContent):
1048         (WebInspector.RawSourceCode.prototype._saveSourceMapping):
1049
1050 2011-09-07  Julien Chaffraix  <jchaffraix@webkit.org>
1051
1052         offsetFromRoot optimization is disabled after r93837
1053         https://bugs.webkit.org/show_bug.cgi?id=67677
1054
1055         Reviewed by Simon Fraser.
1056
1057         Unfortunately not covered by any test as it does not change updateLayerPosition complexity (it is still O(n^2)
1058         because of clippedOverflowRectForRepaint). However it is a noticeable slowdown on some use cases but we don't
1059         have a good test harness to cover such slowdown.
1060
1061         * rendering/RenderLayer.cpp:
1062         (WebCore::RenderLayer::updateLayerPositions): Pass offsetFromRoot as not doing so means that we miss
1063         the optimization altogether.
1064
1065         (WebCore::RenderLayer::computeRepaintRects):
1066         (WebCore::RenderLayer::updateLayerPositionsAfterScroll):
1067         * rendering/RenderLayer.h:
1068         Renamed |cachedOffset| to |offsetFromRoot| to be consistent with our latest renaming.
1069
1070 2011-09-07  Ryosuke Niwa  <rniwa@webkit.org>
1071
1072         Windows build fix after r94737.
1073
1074         * rendering/RenderBlock.cpp:
1075         (WebCore::RenderBlock::adjustRectForColumns):
1076
1077 2011-09-07  Dan Bernstein  <mitz@apple.com>
1078
1079         Removed hyphenation function implementations for an usupported build configuration.
1080
1081         Reviewed by Sam Weinig.
1082
1083         * platform/text/cf/HyphenationCF.cpp:
1084
1085 2011-09-07  David Hyatt  <hyatt@apple.com>
1086
1087         https://bugs.webkit.org/show_bug.cgi?id=67739
1088
1089         adjustRectForColumns is O(# of columns) when it can be O(1). Fix the slow performance of this
1090         function by removing the loop and just computing the start and end column for a repaint rect
1091         and uniting everything in between.
1092
1093         Reviewed by Dan Bernstein.
1094
1095         * rendering/RenderBlock.cpp:
1096         (WebCore::RenderBlock::adjustRectForColumns):
1097
1098 2011-09-07  Sheriff Bot  <webkit.review.bot@gmail.com>
1099
1100         Unreviewed, rolling out r94714 and r94723.
1101         http://trac.webkit.org/changeset/94714
1102         http://trac.webkit.org/changeset/94723
1103         https://bugs.webkit.org/show_bug.cgi?id=67746
1104
1105         breaks gtk-linux tests with assertion failure (Requested by
1106         thorton on #webkit).
1107
1108         * platform/graphics/GraphicsContext.cpp:
1109         (WebCore::GraphicsContext::GraphicsContext):
1110         (WebCore::GraphicsContext::~GraphicsContext):
1111         * platform/graphics/GraphicsContext.h:
1112         (WebCore::GraphicsContext::inTransparencyLayer):
1113         * platform/graphics/cairo/GraphicsContextCairo.cpp:
1114         (WebCore::GraphicsContext::beginTransparencyLayer):
1115         (WebCore::GraphicsContext::endTransparencyLayer):
1116         * platform/graphics/cairo/GraphicsContextPlatformPrivateCairo.h:
1117         (WebCore::GraphicsContextPlatformPrivate::beginTransparencyLayer):
1118         (WebCore::GraphicsContextPlatformPrivate::endTransparencyLayer):
1119         * platform/graphics/cg/GraphicsContextCG.cpp:
1120         (WebCore::GraphicsContext::beginTransparencyLayer):
1121         (WebCore::GraphicsContext::endTransparencyLayer):
1122         * platform/graphics/cg/GraphicsContextPlatformPrivateCG.h:
1123         (WebCore::GraphicsContextPlatformPrivate::GraphicsContextPlatformPrivate):
1124         (WebCore::GraphicsContextPlatformPrivate::~GraphicsContextPlatformPrivate):
1125         (WebCore::GraphicsContextPlatformPrivate::beginTransparencyLayer):
1126         (WebCore::GraphicsContextPlatformPrivate::endTransparencyLayer):
1127         * platform/graphics/haiku/GraphicsContextHaiku.cpp:
1128         (WebCore::GraphicsContext::beginTransparencyLayer):
1129         (WebCore::GraphicsContext::endTransparencyLayer):
1130         * platform/graphics/mac/FontMac.mm:
1131         (WebCore::Font::drawGlyphs):
1132         * platform/graphics/openvg/GraphicsContextOpenVG.cpp:
1133         (WebCore::GraphicsContext::beginTransparencyLayer):
1134         (WebCore::GraphicsContext::endTransparencyLayer):
1135         * platform/graphics/qt/GraphicsContextQt.cpp:
1136         (WebCore::GraphicsContext::inTransparencyLayer):
1137         (WebCore::GraphicsContext::beginTransparencyLayer):
1138         (WebCore::GraphicsContext::endTransparencyLayer):
1139         * platform/graphics/skia/GraphicsContextSkia.cpp:
1140         (WebCore::GraphicsContext::beginTransparencyLayer):
1141         (WebCore::GraphicsContext::endTransparencyLayer):
1142         * platform/graphics/win/FontCGWin.cpp:
1143         (WebCore::drawGDIGlyphs):
1144         * platform/graphics/win/GraphicsContextCGWin.cpp:
1145         (WebCore::GraphicsContext::releaseWindowsContext):
1146         * platform/graphics/win/GraphicsContextCairoWin.cpp:
1147         (WebCore::GraphicsContext::releaseWindowsContext):
1148         * platform/graphics/win/GraphicsContextWin.cpp:
1149         (WebCore::GraphicsContext::inTransparencyLayer):
1150         (WebCore::GraphicsContext::getWindowsContext):
1151         * platform/graphics/wince/GraphicsContextWinCE.cpp:
1152         (WebCore::GraphicsContext::beginTransparencyLayer):
1153         (WebCore::GraphicsContext::endTransparencyLayer):
1154         * platform/graphics/wx/GraphicsContextWx.cpp:
1155         (WebCore::GraphicsContext::beginTransparencyLayer):
1156         (WebCore::GraphicsContext::endTransparencyLayer):
1157         * platform/win/ScrollbarThemeWin.cpp:
1158         (WebCore::ScrollbarThemeWin::paintTrackPiece):
1159         (WebCore::ScrollbarThemeWin::paintButton):
1160         (WebCore::ScrollbarThemeWin::paintThumb):
1161         * plugins/win/PluginViewWin.cpp:
1162         (WebCore::PluginView::paint):
1163         * rendering/RenderThemeWin.cpp:
1164         (WebCore::drawControl):
1165
1166 2011-09-07  Chris Fleizach  <cfleizach@apple.com>
1167
1168         Changes to aria-hidden don't change VO navigation
1169         https://bugs.webkit.org/show_bug.cgi?id=67722
1170
1171         Reviewed by Darin Adler.
1172
1173         When altering aria-hidden, WebCore needs to update the children caches of 
1174         affected elements. However, for elements that were children, but ignored, their
1175         caches did not get updated, and stale information would be propagated.
1176
1177         The fix is to always clearChildren() when a parent is asking for children. This 
1178         ensures information is always up to date when the parent itself is asking for new data.
1179
1180         Test: accessibility/aria-hidden-updates-alldescendants.html
1181
1182         * accessibility/AccessibilityObject.h:
1183         * accessibility/AccessibilityRenderObject.cpp:
1184         (WebCore::AccessibilityRenderObject::ariaIsHidden):
1185         (WebCore::AccessibilityRenderObject::childrenChanged):
1186         (WebCore::AccessibilityRenderObject::addChildren):
1187
1188 2011-09-07  Tim Horton  <timothy_horton@apple.com>
1189
1190         Text rendered with a simple (i.e. 0px blur) shadow inside a transparency layer has a double shadow
1191         https://bugs.webkit.org/show_bug.cgi?id=67543
1192         <rdar://problem/10070536>
1193
1194         Reviewed by Simon Fraser.
1195
1196         Generalize (begin|end)TransparencyLayer, which now forward
1197         through to (begin|end)PlatformTransparencyLayer, so that
1198         isInTransparencyLayer can exist on every platform.
1199
1200         Make use of isInTransparencyLayer in FontMac to disable
1201         "simple" shadow drawing when the text is being rendered
1202         into a transparency layer.
1203
1204         Test: svg/custom/simple-text-double-shadow.svg
1205
1206         * platform/graphics/GraphicsContext.cpp:
1207         (WebCore::GraphicsContext::GraphicsContext):
1208         (WebCore::GraphicsContext::~GraphicsContext):
1209         (WebCore::GraphicsContext::beginTransparencyLayer):
1210         (WebCore::GraphicsContext::endTransparencyLayer):
1211         (WebCore::GraphicsContext::isInTransparencyLayer):
1212         * platform/graphics/GraphicsContext.h:
1213         * platform/graphics/cairo/GraphicsContextCairo.cpp:
1214         (WebCore::GraphicsContext::beginPlatformTransparencyLayer):
1215         (WebCore::GraphicsContext::endPlatformTransparencyLayer):
1216         (WebCore::GraphicsContext::supportsTransparencyLayers):
1217         * platform/graphics/cairo/GraphicsContextPlatformPrivateCairo.h:
1218         * platform/graphics/cg/GraphicsContextCG.cpp:
1219         (WebCore::GraphicsContext::beginPlatformTransparencyLayer):
1220         (WebCore::GraphicsContext::endPlatformTransparencyLayer):
1221         (WebCore::GraphicsContext::supportsTransparencyLayers):
1222         * platform/graphics/cg/GraphicsContextPlatformPrivateCG.h:
1223         (WebCore::GraphicsContextPlatformPrivate::GraphicsContextPlatformPrivate):
1224         * platform/graphics/haiku/GraphicsContextHaiku.cpp:
1225         (WebCore::GraphicsContext::beginPlatformTransparencyLayer):
1226         (WebCore::GraphicsContext::endPlatformTransparencyLayer):
1227         (WebCore::GraphicsContext::supportsTransparencyLayers):
1228         * platform/graphics/mac/FontMac.mm:
1229         (WebCore::Font::drawGlyphs):
1230         * platform/graphics/openvg/GraphicsContextOpenVG.cpp:
1231         (WebCore::GraphicsContext::beginPlatformTransparencyLayer):
1232         (WebCore::GraphicsContext::endPlatformTransparencyLayer):
1233         (WebCore::GraphicsContext::supportsTransparencyLayers):
1234         * platform/graphics/qt/GraphicsContextQt.cpp:
1235         (WebCore::GraphicsContext::isInTransparencyLayer):
1236         (WebCore::GraphicsContext::beginPlatformTransparencyLayer):
1237         (WebCore::GraphicsContext::endPlatformTransparencyLayer):
1238         (WebCore::GraphicsContext::supportsTransparencyLayers):
1239         * platform/graphics/skia/GraphicsContextSkia.cpp:
1240         (WebCore::GraphicsContext::beginPlatformTransparencyLayer):
1241         (WebCore::GraphicsContext::endPlatformTransparencyLayer):
1242         (WebCore::GraphicsContext::supportsTransparencyLayers):
1243         * platform/graphics/win/FontCGWin.cpp:
1244         (WebCore::drawGDIGlyphs):
1245         * platform/graphics/win/GraphicsContextCGWin.cpp:
1246         (WebCore::GraphicsContext::releaseWindowsContext):
1247         * platform/graphics/win/GraphicsContextCairoWin.cpp:
1248         (WebCore::GraphicsContext::releaseWindowsContext):
1249         * platform/graphics/win/GraphicsContextWin.cpp:
1250         (WebCore::GraphicsContext::getWindowsContext):
1251         * platform/graphics/wince/GraphicsContextWinCE.cpp:
1252         (WebCore::GraphicsContext::beginPlatformTransparencyLayer):
1253         (WebCore::GraphicsContext::endPlatformTransparencyLayer):
1254         (WebCore::GraphicsContext::supportsTransparencyLayers):
1255         * platform/graphics/wx/GraphicsContextWx.cpp:
1256         (WebCore::GraphicsContext::beginPlatformTransparencyLayer):
1257         (WebCore::GraphicsContext::endPlatformTransparencyLayer):
1258         (WebCore::GraphicsContext::supportsTransparencyLayers):
1259         * platform/win/ScrollbarThemeWin.cpp:
1260         * plugins/win/PluginViewWin.cpp:
1261         * rendering/RenderThemeWin.cpp:
1262
1263 2011-09-07  Dan Bernstein  <mitz@apple.com>
1264
1265         <rdar://problem/8881922> Support the hyphenate-limit-lines property
1266         https://bugs.webkit.org/show_bug.cgi?id=67730
1267
1268         Reviewed by Dave Hyatt.
1269
1270         Tests: fast/css/parsing-hyphenate-limit-lines.html
1271                fast/text/hyphenate-limit-lines.html
1272
1273         * css/CSSComputedStyleDeclaration.cpp:
1274         (WebCore::CSSComputedStyleDeclaration::getPropertyCSSValue): Added hyphenate-limit-lines.
1275         * css/CSSParser.cpp:
1276         (WebCore::CSSParser::parseValue): Ditto. Valid values are non-negative integers and the keyword
1277         "no-limit".
1278         * css/CSSPropertyNames.in: Added -webkit-hyphenate-limit-lines.
1279         * css/CSSStyleSelector.cpp:
1280         (WebCore::CSSStyleSelector::applyProperty): Added hyphenate-limit-lines.
1281         * css/CSSValueKeywords.in: Added the "no-limit" value keyword.
1282         * rendering/RenderBlock.h:
1283         * rendering/RenderBlockLineLayout.cpp:
1284         (WebCore::RenderBlock::layoutRunsAndFloats): Count the number of consecutive hyphenated lines
1285         before the start line and pass it to layoutRunsAndFloatsInRange().
1286         (WebCore::RenderBlock::layoutRunsAndFloatsInRange): Keep track of the number of consecutive
1287         hyphenated lines before the current line and pass it to LineBreaker::nextLineBreak().
1288         (WebCore::tryHyphenating): Added parameters for the number of consecutive hyphenated lines before
1289         the current line and the limit on consecutive hyphenated lines, and an early return if the limit
1290         has been reached.
1291         (WebCore::RenderBlock::LineBreaker::nextLineBreak): Added a parameter for the number of consecutive
1292         hyphenated lines before the current line, which is passed through to tryHyphenating, along with
1293         the value of hyphenate-limit-lines.
1294         * rendering/RootInlineBox.cpp:
1295         (WebCore::RootInlineBox::isHyphenated): Added. Returns true if the line was hyphenated.
1296         * rendering/RootInlineBox.h:
1297         * rendering/style/RenderStyle.h:
1298         (WebCore::InheritedFlags::hyphenationLimitLines): Added this getter.
1299         (WebCore::InheritedFlags::setHyphenationLimitLines): Added this setter.
1300         (WebCore::InheritedFlags::initialHyphenationLimitLines): Added. The initial value is -1,
1301         corresponding to "no-limit".
1302         * rendering/style/StyleRareInheritedData.cpp:
1303         (WebCore::StyleRareInheritedData::StyleRareInheritedData): Initialize new member variable.
1304         (WebCore::StyleRareInheritedData::operator==): Compare new member variable.
1305         * rendering/style/StyleRareInheritedData.h:
1306
1307 2011-09-02  Ojan Vafai  <ojan@chromium.org>
1308
1309         split overrideSize into overrideHeight and overrideWidth
1310         https://bugs.webkit.org/show_bug.cgi?id=67550
1311
1312         Reviewed by Sam Weinig.
1313
1314         All uses of overrideSize only set one of the width or the height.
1315         This change removes a bool from RenderObject and removes some
1316         flexbox specific logic from RenderBox.
1317
1318         The only downside is that we have two global maps where we used
1319         to have one.
1320
1321         No functional changes so existing tests are sufficient.
1322
1323         * rendering/RenderBox.cpp:
1324         (WebCore::RenderBox::hasOverrideHeight):
1325         (WebCore::RenderBox::hasOverrideWidth):
1326         (WebCore::RenderBox::setOverrideHeight):
1327         (WebCore::RenderBox::setOverrideWidth):
1328         (WebCore::RenderBox::clearOverrideSize):
1329         (WebCore::RenderBox::overrideWidth):
1330         (WebCore::RenderBox::overrideHeight):
1331         (WebCore::RenderBox::computeLogicalWidth):
1332         (WebCore::RenderBox::computeLogicalHeight):
1333         (WebCore::RenderBox::computePercentageLogicalHeight):
1334         * rendering/RenderBox.h:
1335         * rendering/RenderDeprecatedFlexibleBox.cpp:
1336         (WebCore::RenderDeprecatedFlexibleBox::layoutHorizontalBox):
1337         (WebCore::RenderDeprecatedFlexibleBox::layoutVerticalBox):
1338         (WebCore::RenderDeprecatedFlexibleBox::applyLineClamp):
1339         * rendering/RenderFlexibleBox.cpp:
1340         (WebCore::RenderFlexibleBox::layoutAndPlaceChildrenHorizontal):
1341         * rendering/RenderObject.cpp:
1342         (WebCore::RenderObject::RenderObject):
1343         * rendering/RenderObject.h:
1344         * rendering/RenderTableCell.cpp:
1345         (WebCore::RenderTableCell::setOverrideHeightFromRowHeight):
1346         * rendering/RenderTableCell.h:
1347         * rendering/RenderTableSection.cpp:
1348         (WebCore::RenderTableSection::calcRowLogicalHeight):
1349         (WebCore::RenderTableSection::layoutRows):
1350
1351 2011-09-07  Alexei Svitkine  <asvitkine@chromium.org>
1352
1353         Add test infrastructure to test rubber-banding overhang drawing along with layout tests for existing Chromium Mac overhang drawing in the non-gpu path.
1354         https://bugs.webkit.org/show_bug.cgi?id=67511
1355
1356         Reviewed by Dimitri Glazkov.
1357
1358         Tests: platform/chromium-mac/rubberbanding/overhang-e.html
1359                platform/chromium-mac/rubberbanding/overhang-n.html
1360                platform/chromium-mac/rubberbanding/overhang-ne.html
1361                platform/chromium-mac/rubberbanding/overhang-nw.html
1362                platform/chromium-mac/rubberbanding/overhang-s.html
1363                platform/chromium-mac/rubberbanding/overhang-se.html
1364                platform/chromium-mac/rubberbanding/overhang-sw.html
1365                platform/chromium-mac/rubberbanding/overhang-w.html
1366
1367         * WebCore.exp.in:
1368         * platform/ScrollableArea.h:
1369         * testing/Internals.cpp:
1370         (WebCore::Internals::setScrollViewPosition):
1371         * testing/Internals.h:
1372         * testing/Internals.idl:
1373
1374 2011-09-07  David Reveman  <reveman@chromium.org>
1375
1376         [Chromium] Render surface anti-aliasing.
1377         https://bugs.webkit.org/show_bug.cgi?id=66437
1378
1379         Reviewed by James Robinson.
1380
1381         Add CCLayerQuad class and CCLayerQuad::Edge subclass to allow
1382         edge computations to be shared between tiled layers and render
1383         surfaces. Move isCCW utility function to FloatQuad class and
1384         add to2dTransform method to TransformationMatrix class. Add
1385         necessary anti-aliasing shaders for render surfaces and use them
1386         to avoid aliased edges.
1387
1388         Tests: compositing/reflections/nested-reflection-transformed.html (existing)
1389
1390         * WebCore.gypi:
1391         * platform/graphics/FloatQuad.cpp:
1392         (WebCore::FloatQuad::isCounterclockwise):
1393         * platform/graphics/FloatQuad.h:
1394         * platform/graphics/chromium/LayerChromium.cpp:
1395         (WebCore::LayerChromium::drawTexturedQuad):
1396         * platform/graphics/chromium/LayerChromium.h:
1397         * platform/graphics/chromium/LayerRendererChromium.cpp:
1398         (WebCore::LayerRendererChromium::LayerRendererChromium):
1399         (WebCore::LayerRendererChromium::headsUpDisplayProgram):
1400         (WebCore::LayerRendererChromium::renderSurfaceProgram):
1401         (WebCore::LayerRendererChromium::renderSurfaceProgramAA):
1402         (WebCore::LayerRendererChromium::renderSurfaceMaskProgram):
1403         (WebCore::LayerRendererChromium::renderSurfaceMaskProgramAA):
1404         (WebCore::LayerRendererChromium::tilerProgramSwizzle):
1405         (WebCore::LayerRendererChromium::canvasLayerProgram):
1406         (WebCore::LayerRendererChromium::pluginLayerProgram):
1407         (WebCore::LayerRendererChromium::videoLayerRGBAProgram):
1408         (WebCore::LayerRendererChromium::videoLayerYUVProgram):
1409         (WebCore::LayerRendererChromium::cleanupSharedObjects):
1410         * platform/graphics/chromium/LayerRendererChromium.h:
1411         (WebCore::LayerRendererChromium::sharedGeometryQuad):
1412         * platform/graphics/chromium/ShaderChromium.cpp:
1413         (WebCore::VertexShaderQuad::VertexShaderQuad):
1414         (WebCore::VertexShaderQuad::init):
1415         (WebCore::VertexShaderQuad::getShaderString):
1416         (WebCore::FragmentShaderRGBATexAlphaAA::FragmentShaderRGBATexAlphaAA):
1417         (WebCore::FragmentShaderRGBATexAlphaAA::init):
1418         (WebCore::FragmentShaderRGBATexAlphaAA::getShaderString):
1419         (WebCore::FragmentTexClampAlphaAABinding::FragmentTexClampAlphaAABinding):
1420         (WebCore::FragmentTexClampAlphaAABinding::init):
1421         (WebCore::FragmentShaderRGBATexClampAlphaAA::getShaderString):
1422         (WebCore::FragmentShaderRGBATexClampSwizzleAlphaAA::getShaderString):
1423         (WebCore::FragmentShaderRGBATexAlphaMaskAA::FragmentShaderRGBATexAlphaMaskAA):
1424         (WebCore::FragmentShaderRGBATexAlphaMaskAA::init):
1425         (WebCore::FragmentShaderRGBATexAlphaMaskAA::getShaderString):
1426         * platform/graphics/chromium/ShaderChromium.h:
1427         (WebCore::VertexShaderQuad::matrixLocation):
1428         (WebCore::VertexShaderQuad::pointLocation):
1429         (WebCore::FragmentShaderRGBATexAlphaAA::alphaLocation):
1430         (WebCore::FragmentShaderRGBATexAlphaAA::samplerLocation):
1431         (WebCore::FragmentShaderRGBATexAlphaAA::edgeLocation):
1432         (WebCore::FragmentShaderRGBATexAlphaMaskAA::alphaLocation):
1433         (WebCore::FragmentShaderRGBATexAlphaMaskAA::samplerLocation):
1434         (WebCore::FragmentShaderRGBATexAlphaMaskAA::maskSamplerLocation):
1435         (WebCore::FragmentShaderRGBATexAlphaMaskAA::edgeLocation):
1436         * platform/graphics/chromium/cc/CCCanvasLayerImpl.cpp:
1437         (WebCore::CCCanvasLayerImpl::draw):
1438         * platform/graphics/chromium/cc/CCHeadsUpDisplay.cpp:
1439         (WebCore::CCHeadsUpDisplay::draw):
1440         * platform/graphics/chromium/cc/CCLayerQuad.cpp: Added.
1441         (WebCore::CCLayerQuad::Edge::Edge):
1442         (WebCore::CCLayerQuad::CCLayerQuad):
1443         (WebCore::CCLayerQuad::floatQuad):
1444         (WebCore::CCLayerQuad::toFloatArray):
1445         * platform/graphics/chromium/cc/CCLayerQuad.h: Added.
1446         (WebCore::CCLayerQuad::Edge::Edge):
1447         (WebCore::CCLayerQuad::Edge::x):
1448         (WebCore::CCLayerQuad::Edge::y):
1449         (WebCore::CCLayerQuad::Edge::z):
1450         (WebCore::CCLayerQuad::Edge::setX):
1451         (WebCore::CCLayerQuad::Edge::setY):
1452         (WebCore::CCLayerQuad::Edge::setZ):
1453         (WebCore::CCLayerQuad::Edge::set):
1454         (WebCore::CCLayerQuad::Edge::moveX):
1455         (WebCore::CCLayerQuad::Edge::moveY):
1456         (WebCore::CCLayerQuad::Edge::moveZ):
1457         (WebCore::CCLayerQuad::Edge::move):
1458         (WebCore::CCLayerQuad::Edge::scaleX):
1459         (WebCore::CCLayerQuad::Edge::scaleY):
1460         (WebCore::CCLayerQuad::Edge::scaleZ):
1461         (WebCore::CCLayerQuad::Edge::scale):
1462         (WebCore::CCLayerQuad::Edge::intersect):
1463         (WebCore::CCLayerQuad::CCLayerQuad):
1464         (WebCore::CCLayerQuad::left):
1465         (WebCore::CCLayerQuad::top):
1466         (WebCore::CCLayerQuad::right):
1467         (WebCore::CCLayerQuad::bottom):
1468         (WebCore::CCLayerQuad::inflateX):
1469         (WebCore::CCLayerQuad::inflateY):
1470         (WebCore::CCLayerQuad::inflate):
1471         (WebCore::CCLayerQuad::inflateAntiAliasingDistance):
1472         * platform/graphics/chromium/cc/CCPluginLayerImpl.cpp:
1473         (WebCore::CCPluginLayerImpl::draw):
1474         * platform/graphics/chromium/cc/CCRenderSurface.cpp:
1475         (WebCore::CCRenderSurface::draw):
1476         (WebCore::CCRenderSurface::drawLayer):
1477         (WebCore::CCRenderSurface::drawSurface):
1478         * platform/graphics/chromium/cc/CCRenderSurface.h:
1479         * platform/graphics/chromium/cc/CCTiledLayerImpl.cpp:
1480         (WebCore::CCTiledLayerImpl::draw):
1481         (WebCore::CCTiledLayerImpl::drawTiles):
1482         * platform/graphics/chromium/cc/CCTiledLayerImpl.h:
1483         * platform/graphics/chromium/cc/CCVideoLayerImpl.cpp:
1484         (WebCore::CCVideoLayerImpl::drawYUV):
1485         (WebCore::CCVideoLayerImpl::drawRGBA):
1486         * platform/graphics/transforms/TransformationMatrix.cpp:
1487         (WebCore::TransformationMatrix::to2dTransform):
1488         * platform/graphics/transforms/TransformationMatrix.h:
1489
1490 2011-09-06  Oliver Hunt  <oliver@apple.com>
1491
1492         Remove JSObjectWithGlobalObject
1493         https://bugs.webkit.org/show_bug.cgi?id=67689
1494
1495         Reviewed by Geoff Garen.
1496
1497         Remove use of anonymous storage and JSObjectWithGlobalObject for
1498         accessing a JSObject's global object now that they're available
1499         on the object's structure.
1500
1501         * bindings/js/JSDOMWindowShell.cpp:
1502         (WebCore::JSDOMWindowShell::setWindow):
1503         * bindings/js/JSDOMWrapper.h:
1504         (WebCore::JSDOMWrapper::globalObject):
1505         (WebCore::JSDOMWrapper::JSDOMWrapper):
1506         * bindings/js/WorkerScriptController.cpp:
1507         (WebCore::WorkerScriptController::initScript):
1508         * bindings/scripts/CodeGeneratorJS.pm:
1509         (GenerateHeader):
1510         (GenerateImplementation):
1511         * bridge/objc/objc_runtime.h:
1512         * bridge/objc/objc_runtime.mm:
1513         (JSC::Bindings::ObjcFallbackObjectImp::ObjcFallbackObjectImp):
1514         (JSC::Bindings::ObjcFallbackObjectImp::finishCreation):
1515         * bridge/runtime_object.cpp:
1516         (JSC::Bindings::RuntimeObject::RuntimeObject):
1517         (JSC::Bindings::RuntimeObject::finishCreation):
1518         * bridge/runtime_object.h:
1519
1520 2011-09-07  Ryosuke Niwa  <rniwa@webkit.org>
1521
1522         Mac build fix after r94694.
1523
1524         * WebCore.xcodeproj/project.pbxproj:
1525
1526 2011-09-07  Tim Horton  <timothy_horton@apple.com>
1527
1528         FELighting is using width instead of height to determine skip for parallel(n>2) case
1529         https://bugs.webkit.org/show_bug.cgi?id=67719
1530         <rdar://problem/10086178>
1531
1532         Reviewed by Dirk Schulze.
1533
1534         No new tests, because the bug only exhibits under conditions which are currently
1535         impossible by default (using more than 2 cores) on some platforms.
1536
1537         * platform/graphics/filters/FELighting.cpp:
1538         (WebCore::FELighting::platformApplyGeneric):
1539
1540 2011-09-07  W. James MacLean  <wjmaclean@chromium.org>
1541
1542         Eliminate motion jitter in animated, blurred SVG image
1543         https://bugs.webkit.org/show_bug.cgi?id=67503
1544
1545         Fixes filter shear-free transform applied to SVG images.
1546
1547         In applyResource() the shearFreeAbsoluteTransform is applied to the drawing region,
1548         which is based on the object bounding box (which doesn't move). For a rotation
1549         around the centre of the box, this should really just be the identity matrix,
1550         since the BB should neither change size nor location. So really, we're just interested
1551         in the scale change of the BB here, and not in moving it.
1552
1553         This impacts how slices are extracted, and affects the {x|y}Mid and {x|y}Max extractions
1554         for vertical and horizontal slices, so the test verifies these.
1555
1556         Reviewed by Dirk Schulze.
1557
1558         Test: svg/W3C-SVG-1.1-SE/filters-image-05-f.svg
1559
1560         * rendering/svg/RenderSVGResourceFilter.cpp:
1561         (WebCore::RenderSVGResourceFilter::applyResource):
1562
1563 2011-09-03  Robert Hogan  <robert@webkit.org>
1564
1565         Elements with position:absolute don't move to correct position after images load
1566         https://bugs.webkit.org/show_bug.cgi?id=54611
1567
1568         Reviewed by Simon Fraser.
1569
1570         Test: fast/block/positioning/absolute-layout-after-image-load.html
1571               fast/block/positioning/positioned-float-layout-after-image-load.html
1572
1573         In the test the 'label' block is an absolutely positioned child of an inline flow. So during layout, 
1574         this RenderBlock::layoutPositionedObjects fails to dirty it for rendering because it requires 
1575         the parent to be a BlockFlow. The code to do this was introduced in http://trac.webkit.org/changeset/8284. 
1576         There doesn't seem to be a good reason for requiring a BlockFlow, so remove the check. Do the same
1577         for positioned floats in RenderBlock::positionedFloatsNeedRelayout(), although currently layoutPositionedObjects()
1578         takes care of it this at least ensures no regression in future.
1579
1580         Note: Although the issue is encountered only on first load without a fragment identifier, it 
1581         happens reliably when you include the fragment identifier in the url (#Footnote_1). This is so 
1582         because scrolling to the fragment always happens before the image has loaded, rendering the page 
1583         and clearing the initial dirty bits in the positioned element's renderer. When the image finally 
1584         loads in this scenario, the positioned element is otherwise clean and relies on the above code to get 
1585         re-rendered.
1586
1587         * rendering/RenderBlock.cpp:
1588         (WebCore::RenderBlock::layoutPositionedObjects): remove the check for r->parent()->isBlockFlow() when 
1589                                                          deciding whether to mark children for layout
1590         (WebCore::RenderBlock::positionedFloatsNeedRelayout): ditto
1591
1592 2011-09-07  Anna Cavender  <annacc@chromium.org>
1593
1594         Moving platform/track to html/track to avoid layering violation.
1595         https://bugs.webkit.org/show_bug.cgi?id=67680
1596
1597         Reviewed by Adam Barth.
1598
1599         No new tests. No new functionality.
1600
1601         * CMakeLists.txt:
1602         * GNUmakefile.am:
1603         * GNUmakefile.list.am:
1604         * WebCore.gyp/WebCore.gyp:
1605         * WebCore.gypi:
1606         * WebCore.pri:
1607         * WebCore.pro:
1608         * html/track/CueParser.cpp: Renamed from Source/WebCore/platform/track/CueParser.cpp.
1609         * html/track/CueParser.h: Renamed from Source/WebCore/platform/track/CueParser.h.
1610         * html/track/CueParserPrivate.h: Renamed from Source/WebCore/platform/track/CueParserPrivate.h.
1611         * html/track/WebVTTParser.cpp: Renamed from Source/WebCore/platform/track/WebVTTParser.cpp.
1612         * html/track/WebVTTParser.h: Renamed from Source/WebCore/platform/track/WebVTTParser.h.
1613         * html/track/WebVTTToken.h: Renamed from Source/WebCore/platform/track/WebVTTToken.h.
1614         * html/track/WebVTTTokenizer.cpp: Renamed from Source/WebCore/platform/track/WebVTTTokenizer.cpp.
1615         * html/track/WebVTTTokenizer.h: Renamed from Source/WebCore/platform/track/WebVTTTokenizer.h.
1616
1617 2011-09-07  David Hyatt  <hyatt@apple.com>
1618
1619         https://bugs.webkit.org/show_bug.cgi?id=67286
1620
1621         REGRESSION: css2.1/t090204-display-change-01-b-ao.html fails after r94084.
1622
1623         Make sure that the trailing floats line box explicitly sets the line top with leading and line bottom with
1624         leading to just be the block height.
1625
1626         Reviewed by Dan Bernstein.
1627
1628         * rendering/RenderBlockLineLayout.cpp:
1629         (WebCore::RenderBlock::linkToEndLineIfNeeded):
1630
1631 2011-09-06  Abhishek Arya  <inferno@chromium.org>
1632
1633         Null owningRenderer crash in RenderScrollbar::updateScrollbarParts.
1634         https://bugs.webkit.org/show_bug.cgi?id=67669
1635
1636         Reviewed by James Robinson.
1637
1638         Owning renderer can be cleared for custom scrollbars in clearOwningRenderer()
1639         call. We need a null check in updateScrollbarParts, so that we do not crash.
1640
1641         No tests since issue seen in crash reports only and I donot know a way to
1642         reproduce.
1643
1644         * rendering/RenderScrollbar.cpp:
1645         (WebCore::RenderScrollbar::updateScrollbarParts):
1646
1647 2011-09-05  Jocelyn Turcotte  <jocelyn.turcotte@nokia.com>
1648
1649         [Qt][WK2] Make TiledDrawingArea request tiles only in the direction the viewport is panned to.
1650         https://bugs.webkit.org/show_bug.cgi?id=67606
1651
1652         Reviewed by Noam Rosenthal.
1653
1654         TiledBackingStore previously used different values for horizontal and vertial multiplication
1655         to calculate the cover area.
1656         This patch replaces this mechanism, used to give a bigger panning range to vertical panning,
1657         with the possibility to use the motion vector of the viewport to request tiles ahead instead.
1658         This allows economies on rendering resources as tiles won't be rendered beside the trajectory
1659         of the viewport.
1660
1661         * platform/graphics/TiledBackingStore.cpp:
1662         (WebCore::TiledBackingStore::TiledBackingStore):
1663         (WebCore::TiledBackingStore::setKeepAndCoverAreaMultipliers):
1664         (WebCore::TiledBackingStore::setCoverAreaFocusVector):
1665         (WebCore::TiledBackingStore::createTiles):
1666         (WebCore::TiledBackingStore::calculateKeepRect):
1667         (WebCore::TiledBackingStore::calculateCoverRect):
1668         * platform/graphics/TiledBackingStore.h:
1669         (WebCore::TiledBackingStore::getKeepAndCoverAreaMultipliers):
1670
1671 2011-09-01  Jocelyn Turcotte  <jocelyn.turcotte@nokia.com>
1672
1673         [Qt] TiledBackingStore: Import the resizeEdgeTiles logic from TiledDrawindAreaProxy.
1674         https://bugs.webkit.org/show_bug.cgi?id=67416
1675
1676         Reviewed by Kenneth Rohde Christiansen.
1677
1678         Original code by Antti Koivisto.
1679         With the current code, when the page is layouted during load, edge tiles will
1680         get removed instead of continuing to show their front buffer while the tile
1681         is being rendered for the new size.
1682
1683         * platform/graphics/Tile.h:
1684         * platform/graphics/TiledBackingStore.cpp:
1685         (WebCore::TiledBackingStore::createTiles):
1686         (WebCore::TiledBackingStore::resizeEdgeTiles):
1687         * platform/graphics/TiledBackingStore.h:
1688         * platform/graphics/qt/TileQt.cpp:
1689         (WebCore::TileQt::resize):
1690         * platform/graphics/qt/TileQt.h:
1691
1692 2011-09-07  Tim Horton  <timothy_horton@apple.com>
1693
1694         Don't round-trip through TransformationMatrix in SVGImageBufferTools::clearAffineTransform2DRotation
1695         https://bugs.webkit.org/show_bug.cgi?id=67242
1696         <rdar://problem/10069770>
1697
1698         Reviewed by Dirk Schulze.
1699
1700         No new tests, minor performance improvement.
1701
1702         * platform/graphics/transforms/AffineTransform.cpp:
1703         (WebCore::AffineTransform::blend):
1704         (WebCore::AffineTransform::decompose):
1705         (WebCore::AffineTransform::recompose):
1706         * platform/graphics/transforms/AffineTransform.h:
1707         * rendering/svg/SVGImageBufferTools.cpp:
1708         (WebCore::SVGImageBufferTools::clear2DRotation):
1709
1710 2011-09-06  Pavel Podivilov  <podivilov@chromium.org>
1711
1712         Web Inspector: do not re-create RawSourceCode when toggling pretty-print mode.
1713         https://bugs.webkit.org/show_bug.cgi?id=67647
1714
1715         1) Implement RawSourceCode.setFormatted that allows toggling pretty-print mode on the fly without resetting everything.
1716         2) Add RawSourceCode unit tests.
1717         3) Remove source mapping listeners and console messages from presentation model (they live in RawSourceCode now).
1718
1719         Reviewed by Yury Semikhatsky.
1720
1721         Test: inspector/debugger/raw-source-code.html
1722
1723         * inspector/front-end/DebuggerPresentationModel.js:
1724         (WebInspector.DebuggerPresentationModel):
1725         (WebInspector.DebuggerPresentationModel.prototype.linkifyLocation):
1726         (WebInspector.DebuggerPresentationModel.prototype._addScript):
1727         (WebInspector.DebuggerPresentationModel.prototype._sourceMappingUpdated):
1728         (WebInspector.DebuggerPresentationModel.prototype.setFormatSource):
1729         (WebInspector.DebuggerPresentationModel.prototype._createRawSourceCodeId):
1730         (WebInspector.DebuggerPresentationModel.prototype._debuggerReset):
1731         * inspector/front-end/ScriptsPanel.js:
1732         (WebInspector.ScriptsPanel.prototype._toggleFormatSource):
1733         * inspector/front-end/SourceFile.js:
1734         (WebInspector.RawSourceCode):
1735         (WebInspector.RawSourceCode.prototype.get uiSourceCode):
1736         (WebInspector.RawSourceCode.prototype.setFormatted):
1737         (WebInspector.RawSourceCode.prototype.rawLocationToUILocation):
1738         (WebInspector.RawSourceCode.prototype._saveSourceMapping):
1739
1740 2011-09-07  Alexander Pavlov  <apavlov@chromium.org>
1741
1742         Web Inspector: Implement circular tabbing through the Styles sidebar pane contents
1743         https://bugs.webkit.org/show_bug.cgi?id=67127
1744
1745         Reviewed by Yury Semikhatsky.
1746
1747         * inspector/front-end/Section.js:
1748         (WebInspector.Section.prototype.get firstSibling):
1749         (WebInspector.Section.prototype.get lastSibling):
1750         * inspector/front-end/StylesSidebarPane.js:
1751         (WebInspector.StylePropertiesSection.prototype.nextEditableSibling):
1752         (WebInspector.StylePropertiesSection.prototype.previousEditableSibling):
1753         (WebInspector.StylePropertiesSection.prototype.startEditingSelector):
1754         (WebInspector.StylePropertiesSection.prototype._moveEditorFromSelector):
1755         (WebInspector.StylePropertiesSection.prototype.editingSelectorCommitted.successCallback):
1756         (WebInspector.StylePropertiesSection.prototype.editingSelectorCommitted):
1757         (WebInspector.StylePropertyTreeElement.prototype):
1758         (WebInspector.StylePropertyTreeElement.prototype.element.userInput.previousContent.context.moveDirection):
1759
1760 2011-09-02  Andrey Kosyakov  <caseq@chromium.org>
1761
1762         Web Inspector: [Extensions API] expose console API
1763         https://bugs.webkit.org/show_bug.cgi?id=67506
1764
1765         Reviewed by Pavel Feldman.
1766
1767         Test: inspector/extensions/extensions-console.html
1768
1769         * inspector/front-end/ConsoleMessage.js:
1770         (WebInspector.ConsoleMessage.prototype.get text):
1771         (WebInspector.ConsoleMessage.prototype.get parameters):
1772         * inspector/front-end/ExtensionAPI.js:
1773         (WebInspector.injectedExtensionAPI.InspectorExtensionAPI):
1774         (WebInspector.injectedExtensionAPI):
1775         (WebInspector.injectedExtensionAPI.Console.prototype.getMessages):
1776         (WebInspector.injectedExtensionAPI.Console.prototype.addMessage):
1777         (WebInspector.injectedExtensionAPI.Console.prototype.get MessageLevel):
1778         (WebInspector.injectedExtensionAPI.Network.dispatchRequestEvent):
1779         (WebInspector.injectedExtensionAPI.Network):
1780         (WebInspector.injectedExtensionAPI.AuditCategoryImpl.dispatchAuditEvent):
1781         (WebInspector.injectedExtensionAPI.AuditCategoryImpl):
1782         (WebInspector.injectedExtensionAPI.InspectedWindow.dispatchResourceEvent):
1783         (WebInspector.injectedExtensionAPI.InspectedWindow.dispatchResourceContentEvent):
1784         (WebInspector.injectedExtensionAPI.InspectedWindow):
1785         * inspector/front-end/ExtensionCommon.js:
1786         (WebInspector.commonExtensionSymbols):
1787         * inspector/front-end/ExtensionServer.js:
1788         (WebInspector.ExtensionServer):
1789         (WebInspector.ExtensionServer.prototype._notifyConsoleMessageAdded):
1790         (WebInspector.ExtensionServer.prototype._onGetConsoleMessages):
1791         (WebInspector.ExtensionServer.prototype._onAddConsoleMessage):
1792         (WebInspector.ExtensionServer.prototype._makeConsoleMessage):
1793         (WebInspector.ExtensionServer.prototype._makeConsoleMessage.convertParameter):
1794         (WebInspector.ExtensionServer.prototype._dispatchCallback):
1795         (WebInspector.ExtensionServer.prototype.initExtensions):
1796
1797 2011-09-05  Andrey Kosyakov  <caseq@chromium.org>
1798
1799         Web Inspector: disable popover when a mouse button is pressed
1800         https://bugs.webkit.org/show_bug.cgi?id=67610
1801
1802         Reviewed by Pavel Feldman.
1803
1804         - disable popover when a mouse button is pressed
1805         - disable popover in a SourceFrame when the source is being edited
1806
1807         * inspector/front-end/Popover.js:
1808         (WebInspector.PopoverHelper):
1809         (WebInspector.PopoverHelper.prototype._mouseUp):
1810         (WebInspector.PopoverHelper.prototype._mouseDown):
1811         (WebInspector.PopoverHelper.prototype._handleMouseAction):
1812         * inspector/front-end/SourceFrame.js:
1813         (WebInspector.SourceFrame.prototype._onHidePopover):
1814         (WebInspector.SourceFrame.prototype.doubleClick):
1815
1816 2011-09-07  Antti Koivisto  <antti@apple.com>
1817
1818         https://bugs.webkit.org/show_bug.cgi?id=67634
1819         De-virtualize styleForRenderer()
1820
1821         Reviewed by Sam Weinig.
1822         
1823         This has performance and code clarity benefits.
1824
1825         - move styleForRenderer from Node to Element
1826         - get rid of the now unnecessary NodeRenderingContext parameter
1827         - de-virtualize, add virtual customStyleForRenderer()
1828
1829         * dom/Element.cpp:
1830         (WebCore::Element::customStyleForRenderer):
1831         (WebCore::Element::styleForRenderer):
1832         (WebCore::Element::recalcStyle):
1833         * dom/Element.h:
1834         * dom/Node.cpp:
1835         * dom/Node.h:
1836         (WebCore::Node::hasCustomWillOrDidRecalcStyle):
1837         (WebCore::Node::setHasCustomWillOrDidRecalcStyle):
1838         (WebCore::Node::hasCustomStyleForRenderer):
1839         (WebCore::Node::setHasCustomStyleForRenderer):
1840         
1841             Move styleForRenderer, add customStyleForRenderer, add a bit.
1842         
1843         * dom/NodeRenderingContext.cpp:
1844         (WebCore::NodeRendererFactory::createRendererAndStyle): 
1845         
1846             Handle non-element case separately since styleForRenderer was moved from Node to Element.
1847
1848         * html/HTMLNoScriptElement.cpp:
1849         (WebCore::HTMLNoScriptElement::HTMLNoScriptElement):
1850         (WebCore::HTMLNoScriptElement::customStyleForRenderer):
1851         * html/HTMLNoScriptElement.h:
1852         
1853             Move a strange XHTMLMP special case to where it belongs.
1854
1855         * html/HTMLOptGroupElement.cpp:
1856         (WebCore::HTMLOptGroupElement::attach):
1857         * html/HTMLOptionElement.cpp:
1858         (WebCore::HTMLOptionElement::attach):
1859         * html/HTMLTitleElement.cpp:
1860         (WebCore::HTMLTitleElement::textWithDirection):
1861         * html/shadow/TextControlInnerElements.cpp:
1862         (WebCore::TextControlInnerElement::TextControlInnerElement):
1863         (WebCore::TextControlInnerElement::customStyleForRenderer):
1864         (WebCore::TextControlInnerTextElement::TextControlInnerTextElement):
1865         (WebCore::TextControlInnerTextElement::customStyleForRenderer):
1866         * html/shadow/TextControlInnerElements.h:
1867         * rendering/svg/SVGShadowTreeElements.cpp:
1868         (WebCore::SVGShadowTreeContainerElement::customStyleForRenderer):
1869         * rendering/svg/SVGShadowTreeElements.h:
1870         * svg/SVGElement.cpp:
1871         (WebCore::SVGElement::SVGElement):
1872         (WebCore::SVGElement::customStyleForRenderer):
1873         * svg/SVGElement.h:
1874         
1875             Adopt customStyleForRenderer().
1876
1877 2011-09-07  Ryosuke Niwa  <rniwa@webkit.org>
1878
1879         Change event is not fired for input[type=number] when the user reverts a change made by script
1880         https://bugs.webkit.org/show_bug.cgi?id=67697
1881
1882         Reviewed by Kent Tamura.
1883
1884         The bug was caused by HTMLInputElement::setValue not calling setTextAsOfLastFormControlChangeEvent
1885         for text fields other than type=text.
1886
1887         Also fixed a that stepUpFromRenderer does not call setTextAsOfLastFormControlChangeEvent at appropriate
1888         timing due to setValueAsNumber always passing sendChangeEvent=false to setValue by propagating values
1889         through setValueAsNumber and applyStep. This refactoring allows us to remove calls to dispatch* in
1890         stepUpFromRenderer because they're now called in setValueAsNumber or applyStep.
1891
1892         Test: fast/forms/number-input-changeevent.html
1893
1894         * html/BaseDateAndTimeInputType.cpp:
1895         (WebCore::BaseDateAndTimeInputType::setValueAsNumber):
1896         * html/BaseDateAndTimeInputType.h:
1897         * html/HTMLInputElement.cpp:
1898         (WebCore::HTMLInputElement::applyStep):
1899         (WebCore::HTMLInputElement::stepUp):
1900         (WebCore::HTMLInputElement::stepDown):
1901         (WebCore::HTMLInputElement::setValue):
1902         (WebCore::HTMLInputElement::setValueAsNumber):
1903         (WebCore::HTMLInputElement::stepUpFromRenderer):
1904         * html/HTMLInputElement.h:
1905         * html/InputType.cpp:
1906         (WebCore::InputType::setValueAsNumber):
1907         * html/InputType.h:
1908         * html/NumberInputType.cpp:
1909         (WebCore::NumberInputType::setValueAsNumber):
1910         * html/NumberInputType.h:
1911         * html/RangeInputType.cpp:
1912         (WebCore::RangeInputType::setValueAsNumber):
1913         (WebCore::RangeInputType::handleKeydownEvent):
1914         * html/RangeInputType.h:
1915
1916 2011-09-07  Antti Koivisto  <antti@apple.com>
1917
1918         Try to fix Qt build by moving the Qt specific include (which is not really allowed here!).
1919
1920         Not reviewed.
1921
1922         * css/CSSStyleSelector.cpp:
1923         * css/SelectorChecker.cpp:
1924         (WebCore::SelectorChecker::determineLinkStateSlowCase):
1925
1926 2011-09-07  Antti Koivisto  <antti@apple.com>
1927
1928         Move SelectorChecker out from CSSStyleSelector scope
1929         https://bugs.webkit.org/show_bug.cgi?id=67648
1930
1931         Reviewed by Sam Weinig.
1932
1933         - Move SelectorChecker to SelectorChecker.h/cpp
1934         - Make private functions private
1935         - Make members private, add accessors
1936         - Move m_sameOriginOnly to CSSStyleSelector as it is not used by SelectorChecker
1937
1938         * CMakeLists.txt:
1939         * GNUmakefile.list.am:
1940         * WebCore.gypi:
1941         * WebCore.pro:
1942         * WebCore.vcproj/WebCore.vcproj:
1943         * WebCore.xcodeproj/project.pbxproj:
1944         * css/CSSStyleSelector.cpp:
1945         (WebCore::CSSStyleSelector::CSSStyleSelector):
1946         (WebCore::CSSStyleSelector::matchRules):
1947         (WebCore::CSSStyleSelector::matchRulesForList):
1948         (WebCore::CSSStyleSelector::sortMatchedRules):
1949         (WebCore::CSSStyleSelector::initForStyleResolve):
1950         (WebCore::CSSStyleSelector::matchUARules):
1951         (WebCore::CSSStyleSelector::styleForElement):
1952         (WebCore::CSSStyleSelector::pseudoStyleForElement):
1953         (WebCore::CSSStyleSelector::styleForPage):
1954         (WebCore::CSSStyleSelector::adjustRenderStyle):
1955         (WebCore::CSSStyleSelector::pseudoStyleRulesForElement):
1956         (WebCore::CSSStyleSelector::checkSelector):
1957         (WebCore::RuleData::RuleData):
1958         (WebCore::CSSStyleSelector::applyProperty):
1959         (WebCore::CSSStyleSelector::checkForGenericFamilyChange):
1960         (WebCore::CSSStyleSelector::setFontSize):
1961         (WebCore::CSSStyleSelector::getColorFromPrimitiveValue):
1962         * css/CSSStyleSelector.h:
1963         (WebCore::CSSStyleSelector::style):
1964         (WebCore::CSSStyleSelector::parentStyle):
1965         (WebCore::CSSStyleSelector::rootElementStyle):
1966         (WebCore::CSSStyleSelector::element):
1967         (WebCore::CSSStyleSelector::fontDescription):
1968         (WebCore::CSSStyleSelector::parentFontDescription):
1969         (WebCore::CSSStyleSelector::setFontDescription):
1970         (WebCore::CSSStyleSelector::setZoom):
1971         (WebCore::CSSStyleSelector::setEffectiveZoom):
1972         (WebCore::CSSStyleSelector::setTextSizeAdjust):
1973         (WebCore::CSSStyleSelector::setStyle):
1974         (WebCore::CSSStyleSelector::fontSelector):
1975         (WebCore::CSSStyleSelector::allVisitedStateChanged):
1976         (WebCore::CSSStyleSelector::visitedStateChanged):
1977         (WebCore::CSSStyleSelector::usesSiblingRules):
1978         (WebCore::CSSStyleSelector::usesFirstLineRules):
1979         (WebCore::CSSStyleSelector::usesBeforeAfterRules):
1980         (WebCore::CSSStyleSelector::usesLinkRules):
1981         (WebCore::CSSStyleSelector::addMatchedRule):
1982         (WebCore::CSSStyleSelector::isRightPage):
1983         (WebCore::CSSStyleSelector::ParentStackFrame::ParentStackFrame):
1984         (WebCore::CSSStyleSelector::styleNotYetAvailable):
1985         * css/SelectorChecker.cpp: Added.
1986         (WebCore::SelectorChecker::SelectorChecker):
1987         (WebCore::linkAttribute):
1988         (WebCore::SelectorChecker::determineLinkStateSlowCase):
1989         (WebCore::SelectorChecker::checkSelector):
1990         (WebCore::SelectorChecker::fastCheckSelector):
1991         (WebCore::SelectorChecker::isFastCheckableSelector):
1992         (WebCore::addLocalNameToSet):
1993         (WebCore::createHtmlCaseInsensitiveAttributesSet):
1994         (WebCore::htmlAttributeHasCaseInsensitiveValue):
1995         (WebCore::attributeQualifiedNameMatches):
1996         (WebCore::attributeValueMatches):
1997         (WebCore::anyAttributeMatches):
1998         (WebCore::SelectorChecker::checkOneSelector):
1999         (WebCore::SelectorChecker::checkScrollbarPseudoClass):
2000         (WebCore::SelectorChecker::allVisitedStateChanged):
2001         (WebCore::SelectorChecker::visitedStateChanged):
2002         * css/SelectorChecker.h: Added.
2003         (WebCore::SelectorChecker::document):
2004         (WebCore::SelectorChecker::strictParsing):
2005         (WebCore::SelectorChecker::isCollectingRulesOnly):
2006         (WebCore::SelectorChecker::setCollectingRulesOnly):
2007         (WebCore::SelectorChecker::isMatchingVisitedPseudoClass):
2008         (WebCore::SelectorChecker::setMatchingVisitedPseudoClass):
2009         (WebCore::SelectorChecker::pseudoStyle):
2010         (WebCore::SelectorChecker::setPseudoStyle):
2011         (WebCore::SelectorChecker::hasUnknownPseudoElements):
2012         (WebCore::SelectorChecker::clearHasUnknownPseudoElements):
2013         (WebCore::SelectorChecker::determineLinkState):
2014         * dom/Element.cpp:
2015         (WebCore::Element::webkitMatchesSelector):
2016         * dom/SelectorQuery.cpp:
2017         (WebCore::SelectorQuery::SelectorQuery):
2018         * dom/SelectorQuery.h:
2019
2020 2011-09-07  Dmitry Lomov  <dslomov@google.com>
2021
2022         https://bugs.webkit.org/show_bug.cgi?id=67413 
2023         [Chromium]Web Inspector: inspected page with dedicated worker crashes on refresh.
2024         This patch enforces lifetime ordering between WorkerInspectorController and WorkerScriptController.
2025
2026         Reviewed by Yury Semikhatsky.
2027
2028         * workers/WorkerContext.cpp:
2029         (WebCore::WorkerContext::clearInspector):
2030         * workers/WorkerContext.h:
2031         * workers/WorkerThread.cpp:
2032         (WebCore::WorkerThreadShutdownFinishTask::performTask):
2033
2034 2011-09-07  Sheriff Bot  <webkit.review.bot@gmail.com>
2035
2036         Unreviewed, rolling out r94627 and r94632.
2037         http://trac.webkit.org/changeset/94627
2038         http://trac.webkit.org/changeset/94632
2039         https://bugs.webkit.org/show_bug.cgi?id=67698
2040
2041         It broke tests on GTK and Qt (Requested by Ossy on #webkit).
2042
2043         * WebCore.exp.in:
2044         * bindings/js/JSDOMBinding.h:
2045         (WebCore::DOMConstructorObject::DOMConstructorObject):
2046         * bindings/js/JSDOMGlobalObject.cpp:
2047         (WebCore::JSDOMGlobalObject::JSDOMGlobalObject):
2048         * bindings/js/JSDOMGlobalObject.h:
2049         * bindings/js/JSDOMWindowShell.cpp:
2050         (WebCore::JSDOMWindowShell::create):
2051         * bindings/js/JSDOMWindowShell.h:
2052         * bindings/js/JSDOMWrapper.h:
2053         (WebCore::JSDOMWrapper::JSDOMWrapper):
2054         * bindings/scripts/CodeGeneratorJS.pm:
2055         (GenerateImplementation):
2056         * bindings/scripts/test/JS/JSTestInterface.cpp:
2057         (WebCore::JSTestInterface::JSTestInterface):
2058         * bindings/scripts/test/JS/JSTestMediaQueryListListener.cpp:
2059         (WebCore::JSTestMediaQueryListListener::JSTestMediaQueryListListener):
2060         * bindings/scripts/test/JS/JSTestObj.cpp:
2061         (WebCore::JSTestObj::JSTestObj):
2062         * bindings/scripts/test/JS/JSTestSerializedScriptValueInterface.cpp:
2063         (WebCore::JSTestSerializedScriptValueInterface::JSTestSerializedScriptValueInterface):
2064         * bridge/c/CRuntimeObject.cpp:
2065         (JSC::Bindings::CRuntimeObject::CRuntimeObject):
2066         * bridge/c/CRuntimeObject.h:
2067         * bridge/jni/jsc/JavaRuntimeObject.cpp:
2068         (JSC::Bindings::JavaRuntimeObject::JavaRuntimeObject):
2069         * bridge/jni/jsc/JavaRuntimeObject.h:
2070         * bridge/objc/ObjCRuntimeObject.h:
2071         * bridge/objc/ObjCRuntimeObject.mm:
2072         (JSC::Bindings::ObjCRuntimeObject::ObjCRuntimeObject):
2073         * bridge/objc/objc_runtime.h:
2074         (JSC::Bindings::ObjcFallbackObjectImp::create):
2075         * bridge/objc/objc_runtime.mm:
2076         (JSC::Bindings::ObjcFallbackObjectImp::ObjcFallbackObjectImp):
2077         * bridge/qt/qt_instance.cpp:
2078         (JSC::Bindings::QtRuntimeObject::QtRuntimeObject):
2079         * bridge/qt/qt_pixmapruntime.cpp:
2080         (JSC::Bindings::QtPixmapRuntimeObject::QtPixmapRuntimeObject):
2081         * bridge/qt/qt_runtime.cpp:
2082         (JSC::Bindings::QtRuntimeMethod::QtRuntimeMethod):
2083         * bridge/qt/qt_runtime.h:
2084         * bridge/runtime_array.cpp:
2085         (JSC::RuntimeArray::RuntimeArray):
2086         * bridge/runtime_array.h:
2087         (JSC::RuntimeArray::create):
2088         * bridge/runtime_method.cpp:
2089         (JSC::RuntimeMethod::RuntimeMethod):
2090         * bridge/runtime_method.h:
2091         * bridge/runtime_object.cpp:
2092         (JSC::Bindings::RuntimeObject::RuntimeObject):
2093         * bridge/runtime_object.h:
2094         (JSC::Bindings::RuntimeObject::create):
2095
2096 2011-08-31  Yury Semikhatsky  <yurys@chromium.org>
2097
2098         fast/workers/worker-script-error.html fails on Chromium after r94061
2099         https://bugs.webkit.org/show_bug.cgi?id=67206
2100
2101         Default action should be prevented if window.onerror returned true and stay
2102         not prevented otherwise.
2103
2104         Reviewed by Dmitry Titov.
2105
2106         Tests: fast/events/window-onerror14.html
2107                fast/events/window-onerror15.html
2108                fast/events/window-onerror16.html
2109
2110         * bindings/v8/V8AbstractEventListener.cpp:
2111         (WebCore::V8AbstractEventListener::invokeEventHandler):
2112         (WebCore::V8AbstractEventListener::shouldPreventDefault): allow specific
2113         event listeners to decide when to prevent default action based on the handler
2114         return value.
2115         * bindings/v8/V8AbstractEventListener.h:
2116         * bindings/v8/V8WindowErrorHandler.cpp:
2117         (WebCore::V8WindowErrorHandler::callListenerFunction):
2118         (WebCore::V8WindowErrorHandler::shouldPreventDefault):
2119         * bindings/v8/V8WindowErrorHandler.h:
2120         * bindings/v8/V8WorkerContextErrorHandler.cpp:
2121         (WebCore::V8WorkerContextErrorHandler::callListenerFunction):
2122         (WebCore::V8WorkerContextErrorHandler::shouldPreventDefault):
2123         * bindings/v8/V8WorkerContextErrorHandler.h:
2124
2125 2011-09-06  Xianzhu Wang  <wangxianzhu@chromium.org>
2126
2127         Replace usages of Vector<UChar> with existing StringBuilder
2128         https://bugs.webkit.org/show_bug.cgi?id=67079
2129
2130         Reviewed by Gavin Barraclough.
2131
2132         No new tests. All existing unit tests and layout tests should run
2133         as before.
2134
2135         * css/CSSOMUtils.cpp:
2136         (WebCore::appendCharacter):
2137         (WebCore::serializeCharacter):
2138         (WebCore::serializeCharacterAsCodePoint):
2139         (WebCore::serializeIdentifier):
2140         (WebCore::serializeString):
2141         * css/CSSOMUtils.h:
2142         * css/CSSPrimitiveValue.cpp:
2143         (WebCore::CSSPrimitiveValue::cssText):
2144         * css/CSSStyleSelector.cpp:
2145         (WebCore::CSSStyleSelector::SelectorChecker::determineLinkStateSlowCase):
2146         * css/CSSWrapShapes.cpp:
2147         (WebCore::CSSWrapShapeRect::cssText):
2148         (WebCore::CSSWrapShapeCircle::cssText):
2149         (WebCore::CSSWrapShapeEllipse::cssText):
2150         (WebCore::CSSWrapShapePolygon::cssText):
2151         * editing/HTMLInterchange.cpp:
2152         (WebCore::convertHTMLTextToInterchangeFormat):
2153         * editing/MarkupAccumulator.cpp:
2154         (WebCore::appendCharactersReplacingEntities):
2155         (WebCore::MarkupAccumulator::serializeNodes):
2156         (WebCore::MarkupAccumulator::appendStartTag):
2157         (WebCore::MarkupAccumulator::appendEndTag):
2158         (WebCore::MarkupAccumulator::concatenateMarkup):
2159         (WebCore::MarkupAccumulator::appendAttributeValue):
2160         (WebCore::MarkupAccumulator::appendCustomAttributes):
2161         (WebCore::MarkupAccumulator::appendQuotedURLAttributeValue):
2162         (WebCore::MarkupAccumulator::appendNodeValue):
2163         (WebCore::MarkupAccumulator::appendNamespace):
2164         (WebCore::MarkupAccumulator::appendText):
2165         (WebCore::MarkupAccumulator::appendComment):
2166         (WebCore::MarkupAccumulator::appendDocumentType):
2167         (WebCore::MarkupAccumulator::appendProcessingInstruction):
2168         (WebCore::MarkupAccumulator::appendElement):
2169         (WebCore::MarkupAccumulator::appendOpenTag):
2170         (WebCore::MarkupAccumulator::appendCloseTag):
2171         (WebCore::MarkupAccumulator::appendAttribute):
2172         (WebCore::MarkupAccumulator::appendCDATASection):
2173         (WebCore::MarkupAccumulator::appendStartMarkup):
2174         (WebCore::MarkupAccumulator::appendEndMarkup):
2175         * editing/MarkupAccumulator.h:
2176         * editing/markup.cpp:
2177         (WebCore::StyledMarkupAccumulator::appendElement):
2178         (WebCore::StyledMarkupAccumulator::wrapWithNode):
2179         (WebCore::StyledMarkupAccumulator::wrapWithStyleNode):
2180         (WebCore::StyledMarkupAccumulator::appendStyleNodeOpenTag):
2181         (WebCore::StyledMarkupAccumulator::takeResults):
2182         (WebCore::StyledMarkupAccumulator::appendText):
2183         (WebCore::urlToMarkup):
2184         * html/DOMTokenList.cpp:
2185         (WebCore::DOMTokenList::removeToken):
2186         * html/HTMLFontElement.cpp:
2187         (WebCore::parseFontSize):
2188         * html/HTMLTextFormControlElement.cpp:
2189         (WebCore::HTMLTextFormControlElement::strippedPlaceholder):
2190         * html/parser/CSSPreloadScanner.cpp:
2191         (WebCore::CSSPreloadScanner::emitRule):
2192         * html/parser/CSSPreloadScanner.h:
2193         * html/parser/HTMLEntityParser.cpp:
2194         (WebCore::consumeHTMLEntity):
2195         * html/parser/HTMLEntityParser.h:
2196         * html/parser/HTMLParserIdioms.cpp:
2197         (WebCore::parseHTMLInteger):
2198         (WebCore::parseHTMLNonNegativeInteger):
2199         * html/parser/HTMLTokenizer.cpp:
2200         (WebCore::HTMLTokenizer::processEntity):
2201         (WebCore::HTMLTokenizer::nextToken):
2202         * html/parser/HTMLTreeBuilder.cpp:
2203         (WebCore::HTMLTreeBuilder::ExternalCharacterTokenBuffer::giveRemainingTo):
2204         (WebCore::HTMLTreeBuilder::defaultForInTableText):
2205         * html/parser/HTMLTreeBuilder.h:
2206         * inspector/InspectorValues.cpp:
2207         (WebCore::InspectorValue::toJSONString):
2208         (WebCore::InspectorValue::writeJSON):
2209         (WebCore::InspectorBasicValue::writeJSON):
2210         (WebCore::InspectorString::writeJSON):
2211         (WebCore::InspectorObject::writeJSON):
2212         (WebCore::InspectorArray::writeJSON):
2213         * inspector/InspectorValues.h:
2214         * loader/CrossOriginAccessControl.cpp:
2215         (WebCore::createAccessControlPreflightRequest):
2216         * loader/appcache/ApplicationCacheStorage.cpp:
2217         (WebCore::ApplicationCacheStorage::store):
2218         * page/Chrome.cpp:
2219         (WebCore::Chrome::setToolTip):
2220         * page/PageSerializer.cpp:
2221         (WebCore::SerializerMarkupAccumulator::appendText):
2222         (WebCore::SerializerMarkupAccumulator::appendElement):
2223         (WebCore::SerializerMarkupAccumulator::appendCustomAttributes):
2224         * page/SecurityOrigin.cpp:
2225         (WebCore::SecurityOrigin::toString):
2226         * platform/KURL.cpp:
2227         (WebCore::KURL::deprecatedString):
2228         (WebCore::decodeURLEscapeSequences):
2229         * platform/LinkHash.cpp:
2230         (WebCore::squeezeOutNullCharacters):
2231         (WebCore::cleanSlashDotDotSlashes):
2232         (WebCore::mergeDoubleSlashes):
2233         (WebCore::cleanSlashDotSlashes):
2234         (WebCore::cleanPath):
2235         (WebCore::visitedURLInline):
2236         (WebCore::visitedURL):
2237         (WebCore::visitedLinkHash):
2238         * platform/LinkHash.h:
2239         * platform/gtk/DataObjectGtk.cpp:
2240         (WebCore::DataObjectGtk::setURL):
2241         * platform/network/HTTPParsers.cpp:
2242         (WebCore::extractMIMETypeFromMediaType):
2243         * platform/text/TextCodecICU.cpp:
2244         (WebCore::TextCodecICU::decode):
2245         * platform/text/TextStream.cpp:
2246         (WebCore::TextStream::operator<<):
2247         (WebCore::TextStream::release):
2248         * platform/text/TextStream.h:
2249         * plugins/PluginStream.cpp:
2250         (WebCore::PluginStream::startStream):
2251         * rendering/InlineTextBox.cpp:
2252         (WebCore::adjustCharactersAndLengthForHyphen):
2253         * rendering/InlineTextBox.h:
2254         (WebCore::BufferForAppendingHyphen::BufferForAppendingHyphen):
2255         * rendering/RenderListItem.cpp:
2256         (WebCore::RenderListItem::markerTextWithSuffix):
2257         * rendering/RenderListMarker.cpp:
2258         (WebCore::toSymbolic):
2259         (WebCore::RenderListMarker::paint):
2260         (WebCore::RenderListMarker::suffix):
2261         * rendering/RenderTreeAsText.cpp:
2262         (WebCore::quoteAndEscapeNonPrintables):
2263         * rendering/mathml/RenderMathMLFenced.cpp:
2264         (WebCore::RenderMathMLFenced::updateFromElement):
2265         * storage/IDBLevelDBCoding.cpp:
2266         (WebCore::IDBLevelDBCoding::decodeString):
2267         * xml/XMLHttpRequest.cpp:
2268         (WebCore::XMLHttpRequest::getAllResponseHeaders):
2269         * xml/XPathFunctions.cpp:
2270         (WebCore::XPath::FunId::evaluate):
2271         (WebCore::XPath::FunConcat::evaluate):
2272         * xml/XPathUtil.cpp:
2273         (WebCore::XPath::stringValue):
2274         * xml/XSLTProcessorLibxslt.cpp:
2275         (WebCore::writeToStringBuilder):
2276         (WebCore::saveResultToString):
2277         * xml/parser/CharacterReferenceParserInlineMethods.h:
2278         (WebCore::unconsumeCharacters):
2279         (WebCore::consumeCharacterReference):
2280         * xml/parser/XMLCharacterReferenceParser.cpp:
2281         (WebCore::consumeXMLCharacterReference):
2282         * xml/parser/XMLCharacterReferenceParser.h:
2283         * xml/parser/XMLTokenizer.cpp:
2284         (WebCore::XMLTokenizer::nextToken):
2285
2286 2011-09-05  Kent Tamura  <tkent@chromium.org>
2287
2288         REGRESSION (Safari 5.1 - ToT): File input retains its file icon when the value is reset
2289         https://bugs.webkit.org/show_bug.cgi?id=67567
2290
2291         Reviewed by Dimitri Glazkov.
2292
2293         - Introduce InputType::setValue(), which is called by HTMLInputElement::setValue().
2294         - Clear m_icon in FileInputType::setValue().
2295
2296         Tests: fast/forms/file/file-reset-in-change-expected.html
2297                fast/forms/file/file-reset-in-change.html
2298
2299         * html/BaseButtonInputType.cpp:
2300         (WebCore::BaseButtonInputType::setValue):
2301         Implemenation for the "default" mode.
2302         http://www.whatwg.org/specs/web-apps/current-work/multipage/common-input-element-attributes.html#dom-input-value-default
2303         * html/BaseButtonInputType.h:
2304         * html/BaseCheckableInputType.cpp:
2305         (WebCore::BaseCheckableInputType::setValue):
2306         Implemenation for the "default/on" mode.
2307         http://www.whatwg.org/specs/web-apps/current-work/multipage/common-input-element-attributes.html#dom-input-value-default-on
2308         * html/BaseCheckableInputType.h:
2309         * html/FileInputType.cpp:
2310         (WebCore::FileInputType::setValue):
2311         Implemenation for the "filename" mode, and clearing m_icon.
2312         http://www.whatwg.org/specs/web-apps/current-work/multipage/common-input-element-attributes.html#dom-input-value-filename
2313         * html/FileInputType.h:
2314         * html/HTMLInputElement.cpp:
2315         (WebCore::HTMLInputElement::setValue):
2316         Move some code to InputType::setValue().
2317         (WebCore::HTMLInputElement::setValueInternal): A helper for InputType::setValue().
2318         * html/HTMLInputElement.h:
2319         * html/HiddenInputType.cpp:
2320         (WebCore::HiddenInputType::setValue):
2321         Implementation for the "default" mode.
2322         * html/HiddenInputType.h:
2323         * html/InputType.cpp:
2324         (WebCore::InputType::setValue):
2325         Implementation for the "value" mode.
2326         http://www.whatwg.org/specs/web-apps/current-work/multipage/common-input-element-attributes.html#dom-input-value-value
2327         * html/InputType.h:
2328         * html/TextFieldInputType.cpp:
2329         (WebCore::TextFieldInputType::setValue):
2330         In addition to the "value" mode processing, updates placeholder visibililty.
2331         * html/TextFieldInputType.h:
2332
2333 2011-09-06  Ryosuke Niwa  <rniwa@webkit.org>
2334
2335         REGRESSION(r94274): The inner text value of an input element is not updated when input.value is set
2336         https://bugs.webkit.org/show_bug.cgi?id=67681
2337
2338         Reviewed by Kent Tamura.
2339
2340         The bug was caused by HTMLInputElement::setValue's not clearing m_suggestedValue before updateInnerTextValue is called.
2341         Since updateInnerTextValue uses the suggested value when one is present, we need to clear m_suggestedValue in advance.
2342
2343         Test: fast/forms/suggested-value-after-setvalue.html
2344
2345         * html/HTMLInputElement.cpp:
2346         (WebCore::HTMLInputElement::setValue):
2347
2348 2011-09-06  Adam Barth  <abarth@webkit.org>
2349
2350         Attempt to fix GTK build.
2351
2352         * bindings/gobject/WebKitHTMLElementWrapperFactory.cpp:
2353         (WebKit::createHTMLElementWrapper):
2354
2355 2011-09-06  Ryosuke Niwa  <rniwa@webkit.org>
2356
2357         fast/forms/suggested-value-crash.html crashes on Windows
2358         https://bugs.webkit.org/show_bug.cgi?id=67688
2359
2360         Reviewed by Adam Barth.
2361
2362         The crash was caused because functions in internals were accessing uninitialized QualifiedNames.
2363         Fixed the bug by avoiding to link to inputTag and textareaTag. Instead, we resort to toInputElement
2364         and string comparison.
2365
2366         * testing/Internals.cpp:
2367         (WebCore::Internals::wasLastChangeUserEdit):
2368         (WebCore::Internals::suggestedValue):
2369         (WebCore::Internals::setSuggestedValue):
2370
2371 2011-09-06  Mark Hahnenberg  <mhahnenberg@apple.com>
2372
2373         Unzip initialization lists and constructors in JSCell hierarchy (5/7)
2374         https://bugs.webkit.org/show_bug.cgi?id=67420
2375
2376         Reviewed by Geoffrey Garen.
2377
2378         No new tests.
2379
2380         Completed the fifth level of the refactoring to add finishCreation() 
2381         methods to all classes within the JSCell hierarchy with non-trivial 
2382         constructor bodies.
2383
2384         This primarily consists of pushing the calls to finishCreation() down 
2385         into the constructors of the subclasses of the second level of the hierarchy 
2386         as well as pulling the finishCreation() calls out into the class's corresponding
2387         create() method if it has one.  Doing both simultaneously allows us to 
2388         maintain the invariant that the finishCreation() method chain is called exactly 
2389         once during the creation of an object, since calling it any other number of 
2390         times (0, 2, or more) will cause an assertion failure.
2391
2392         * WebCore.exp.in:
2393         * bindings/js/JSDOMBinding.h:
2394         (WebCore::DOMConstructorObject::DOMConstructorObject):
2395         * bindings/js/JSDOMGlobalObject.cpp:
2396         (WebCore::JSDOMGlobalObject::JSDOMGlobalObject):
2397         (WebCore::JSDOMGlobalObject::finishCreation):
2398         * bindings/js/JSDOMGlobalObject.h:
2399         * bindings/js/JSDOMWindowShell.cpp:
2400         * bindings/js/JSDOMWindowShell.h:
2401         (WebCore::JSDOMWindowShell::create):
2402         * bindings/js/JSDOMWrapper.h:
2403         (WebCore::JSDOMWrapper::JSDOMWrapper):
2404         * bindings/scripts/CodeGeneratorJS.pm:
2405         (GenerateImplementation):
2406         * bindings/scripts/test/JS/JSTestInterface.cpp:
2407         (WebCore::JSTestInterface::JSTestInterface):
2408         * bindings/scripts/test/JS/JSTestMediaQueryListListener.cpp:
2409         (WebCore::JSTestMediaQueryListListener::JSTestMediaQueryListListener):
2410         * bindings/scripts/test/JS/JSTestObj.cpp:
2411         (WebCore::JSTestObj::JSTestObj):
2412         * bindings/scripts/test/JS/JSTestSerializedScriptValueInterface.cpp:
2413         (WebCore::JSTestSerializedScriptValueInterface::JSTestSerializedScriptValueInterface):
2414         * bridge/c/CRuntimeObject.cpp:
2415         (JSC::Bindings::CRuntimeObject::CRuntimeObject):
2416         (JSC::Bindings::CRuntimeObject::finishCreation):
2417         * bridge/c/CRuntimeObject.h:
2418         * bridge/jni/jsc/JavaRuntimeObject.cpp:
2419         (JSC::Bindings::JavaRuntimeObject::JavaRuntimeObject):
2420         (JSC::Bindings::JavaRuntimeObject::finishCreation):
2421         * bridge/jni/jsc/JavaRuntimeObject.h:
2422         * bridge/objc/ObjCRuntimeObject.h:
2423         * bridge/objc/ObjCRuntimeObject.mm:
2424         (JSC::Bindings::ObjCRuntimeObject::ObjCRuntimeObject):
2425         (JSC::Bindings::ObjCRuntimeObject::finishCreation):
2426         * bridge/objc/objc_runtime.h:
2427         (JSC::Bindings::ObjcFallbackObjectImp::create):
2428         * bridge/objc/objc_runtime.mm:
2429         (JSC::Bindings::ObjcFallbackObjectImp::ObjcFallbackObjectImp):
2430         * bridge/qt/qt_instance.cpp:
2431         (JSC::Bindings::QtRuntimeObject::QtRuntimeObject):
2432         * bridge/qt/qt_pixmapruntime.cpp:
2433         (JSC::Bindings::QtPixmapRuntimeObject::QtPixmapRuntimeObject):
2434         * bridge/qt/qt_runtime.cpp:
2435         (JSC::Bindings::QtRuntimeMethod::QtRuntimeMethod):
2436         (JSC::Bindings::QtRuntimeMethod::finishCreation):
2437         * bridge/qt/qt_runtime.h:
2438         * bridge/runtime_array.cpp:
2439         (JSC::RuntimeArray::RuntimeArray):
2440         * bridge/runtime_array.h:
2441         (JSC::RuntimeArray::create):
2442         * bridge/runtime_method.cpp:
2443         (JSC::RuntimeMethod::RuntimeMethod):
2444         (JSC::RuntimeMethod::finishCreation):
2445         * bridge/runtime_method.h:
2446         * bridge/runtime_object.cpp:
2447         (JSC::Bindings::RuntimeObject::RuntimeObject):
2448         * bridge/runtime_object.h:
2449         (JSC::Bindings::RuntimeObject::create):
2450
2451 2011-09-06  Luke Macpherson   <macpherson@chromium.org>
2452
2453         Implement list style properties in CSSStyleApplyProperty.
2454         https://bugs.webkit.org/show_bug.cgi?id=67103
2455
2456         Reviewed by Eric Seidel.
2457
2458         No new tests / no behavioral changes.
2459
2460         * css/CSSStyleApplyProperty.cpp:
2461         Add class to wrap call to CSSStyleSelector::styleImage().
2462         (WebCore::ApplyPropertyStyleImage::ApplyPropertyStyleImage):
2463         (WebCore::ApplyPropertyStyleImage::applyValue):
2464         (WebCore::CSSStyleApplyProperty::CSSStyleApplyProperty):
2465         Initialize handlers for list style properties.
2466         * css/CSSStyleSelector.cpp:
2467         (WebCore::CSSStyleSelector::applyProperty):
2468         Remove existing property implementations.
2469
2470 2011-09-06  Alexis Menard  <alexis.menard@openbossa.org>
2471
2472         [Qt] Move away from QPointer as it is slow and it has a replacement QWeakPointer.
2473         https://bugs.webkit.org/show_bug.cgi?id=67673
2474
2475         Reviewed by Ariya Hidayat.
2476
2477         Move away from QPointer to QWeakPointer, it is faster.
2478
2479         No new tests, the existing ones should cover.
2480
2481         * bridge/qt/qt_instance.cpp:
2482         (JSC::Bindings::QtInstance::~QtInstance):
2483         (JSC::Bindings::QtInstance::getClass):
2484         (JSC::Bindings::QtField::name):
2485         (JSC::Bindings::QtField::valueFromInstance):
2486         * bridge/qt/qt_instance.h:
2487         (JSC::Bindings::QtInstance::getObject):
2488         * bridge/qt/qt_runtime.h:
2489         * platform/qt/SharedTimerQt.cpp:
2490         (WebCore::SharedTimerQt::inst):
2491
2492 2011-09-06  Oliver Hunt  <oliver@apple.com>
2493
2494         Update expected results of bindings tests.
2495
2496         * bindings/scripts/test/JS/JSTestInterface.cpp:
2497         (WebCore::JSTestInterfaceConstructor::createStructure):
2498         (WebCore::JSTestInterface::createPrototype):
2499         * bindings/scripts/test/JS/JSTestInterface.h:
2500         (WebCore::JSTestInterface::createStructure):
2501         (WebCore::JSTestInterfacePrototype::createStructure):
2502         * bindings/scripts/test/JS/JSTestMediaQueryListListener.cpp:
2503         (WebCore::JSTestMediaQueryListListenerConstructor::createStructure):
2504         (WebCore::JSTestMediaQueryListListener::createPrototype):
2505         * bindings/scripts/test/JS/JSTestMediaQueryListListener.h:
2506         (WebCore::JSTestMediaQueryListListener::createStructure):
2507         (WebCore::JSTestMediaQueryListListenerPrototype::createStructure):
2508         * bindings/scripts/test/JS/JSTestObj.cpp:
2509         (WebCore::JSTestObjConstructor::createStructure):
2510         (WebCore::JSTestObj::createPrototype):
2511         * bindings/scripts/test/JS/JSTestObj.h:
2512         (WebCore::JSTestObj::createStructure):
2513         (WebCore::JSTestObjPrototype::createStructure):
2514         * bindings/scripts/test/JS/JSTestSerializedScriptValueInterface.cpp:
2515         (WebCore::JSTestSerializedScriptValueInterfaceConstructor::createStructure):
2516         (WebCore::JSTestSerializedScriptValueInterface::createPrototype):
2517         * bindings/scripts/test/JS/JSTestSerializedScriptValueInterface.h:
2518         (WebCore::JSTestSerializedScriptValueInterface::createStructure):
2519         (WebCore::JSTestSerializedScriptValueInterfacePrototype::createStructure):
2520
2521 2011-09-06  Eric Seidel  <eric@webkit.org>
2522
2523         Remove window.HTMLBlockquoteElement per HTML5 (and DOM Core 1)
2524         https://bugs.webkit.org/show_bug.cgi?id=67678
2525
2526         Reviewed by Darin Adler.
2527
2528         This is why we can't have nice things.
2529
2530         There was some confusion in the original DOM HTML 1 spec about
2531         the existence of HTMlBlockquoteElement which was clarified by
2532         a later errata, removing HTMLBlockquoteElement:
2533         http://www.w3.org/DOM/updates/REC-DOM-Level-1-19981001-errata.html
2534         "This interface is an error and must be ignored. The Interface HTMLQuoteElement is used for both the Q and BLOCKQUOTE elements"
2535
2536         Le sigh.  Personally I think having a separate HTMLBlockquoteElement
2537         is clearer, but thats not how the web works.  Removed it and updated test results.
2538
2539         * CMakeLists.txt:
2540         * CodeGenerators.pri:
2541         * DerivedSources.cpp:
2542         * DerivedSources.make:
2543         * GNUmakefile.list.am:
2544         * WebCore.gypi:
2545         * WebCore.pro:
2546         * WebCore.vcproj/WebCore.vcproj:
2547         * WebCore.xcodeproj/project.pbxproj:
2548         * bindings/gobject/GNUmakefile.am:
2549         * editing/IndentOutdentCommand.cpp:
2550         * html/HTMLBlockquoteElement.cpp: Removed.
2551         * html/HTMLBlockquoteElement.h: Removed.
2552         * html/HTMLBlockquoteElement.idl: Removed.
2553         * html/HTMLElementsAllInOne.cpp:
2554         * html/HTMLQuoteElement.cpp:
2555         (WebCore::HTMLQuoteElement::HTMLQuoteElement):
2556         (WebCore::HTMLQuoteElement::insertedIntoDocument):
2557         * html/HTMLTagNames.in:
2558         * page/DOMWindow.idl:
2559
2560 2011-09-06  Ryosuke Niwa  <rniwa@webkit.org>
2561
2562         Rename confirmCompositionWithoutDisturbingSelection to cancelComposition
2563         https://bugs.webkit.org/show_bug.cgi?id=67569
2564
2565         Reviewed by Antonio Gomes.
2566
2567         Renamed Editor::confirmCompositionWithoutDisturbingSelection to Editor::cancelComposition.
2568         Also renamed the shared function from confirmComposition to setComposition.
2569
2570         * WebCore.exp.in:
2571         * editing/Editor.cpp:
2572         (WebCore::Editor::confirmComposition):
2573         (WebCore::Editor::cancelComposition):
2574         (WebCore::Editor::setComposition):
2575         * editing/Editor.h:
2576
2577 2011-09-06  Sam Weinig  <sam@webkit.org>
2578
2579         WebVTTTokenizer files in the wrong place in the Xcode project.
2580
2581         * WebCore.xcodeproj/project.pbxproj:
2582         Move WebVTTTokenizer files so they are in the right place in the project.
2583
2584 2011-09-06  Chris Rogers  <crogers@google.com>
2585
2586         MediaElementAudioSourceNode destruction triggers ASSERTS
2587         https://bugs.webkit.org/show_bug.cgi?id=67665
2588
2589         Reviewed by Nate Chapin.
2590
2591         Test: webaudio/mediaelementaudiosourcenode-gc.html
2592
2593         * html/HTMLMediaElement.cpp:
2594         (WebCore::HTMLMediaElement::setAudioSourceNode):
2595         * webaudio/AudioContext.cpp:
2596         (WebCore::AudioContext::uninitializeDispatch):
2597         (WebCore::AudioContext::stop):
2598         * webaudio/AudioContext.h:
2599
2600 2011-09-05  Oliver Hunt  <oliver@apple.com>
2601
2602         An object's structure should reference the global object responsible for its creation
2603         https://bugs.webkit.org/show_bug.cgi?id=67624
2604
2605         Reviewed by Gavin Barraclough.
2606
2607         Update calls to Structure::create() to pass the globalObject in,
2608         and update the CodeGenerator to generate appropriate createStructure
2609         methods.
2610
2611         * bindings/js/JSAudioConstructor.h:
2612         (WebCore::JSAudioConstructor::createStructure):
2613         * bindings/js/JSDOMBinding.h:
2614         (WebCore::DOMConstructorObject::createStructure):
2615         (WebCore::getDOMStructure):
2616         * bindings/js/JSDOMGlobalObject.h:
2617         (WebCore::JSDOMGlobalObject::createStructure):
2618         (WebCore::getDOMConstructor):
2619         * bindings/js/JSDOMWindowBase.h:
2620         (WebCore::JSDOMWindowBase::createStructure):
2621         * bindings/js/JSDOMWindowShell.cpp:
2622         (WebCore::JSDOMWindowShell::setWindow):
2623         * bindings/js/JSDOMWindowShell.h:
2624         (WebCore::JSDOMWindowShell::createStructure):
2625         * bindings/js/JSDOMWrapper.h:
2626         (WebCore::JSDOMWrapper::createStructure):
2627         * bindings/js/JSImageConstructor.h:
2628         (WebCore::JSImageConstructor::createStructure):
2629         * bindings/js/JSImageDataCustom.cpp:
2630         (WebCore::toJS):
2631         * bindings/js/JSOptionConstructor.h:
2632         (WebCore::JSOptionConstructor::createStructure):
2633         * bindings/js/JSWorkerContextBase.h:
2634         (WebCore::JSWorkerContextBase::createStructure):
2635         * bindings/js/WorkerScriptController.cpp:
2636         (WebCore::WorkerScriptController::initScript):
2637         * bindings/scripts/CodeGeneratorJS.pm:
2638         (GenerateHeader):
2639         (GenerateImplementation):
2640         (GenerateConstructorDeclaration):
2641         * bridge/c/CRuntimeObject.h:
2642         (JSC::Bindings::CRuntimeObject::createStructure):
2643         * bridge/c/c_instance.cpp:
2644         (JSC::Bindings::CRuntimeMethod::createStructure):
2645         * bridge/jni/jsc/JavaInstanceJSC.cpp:
2646         (JavaRuntimeMethod::createStructure):
2647         * bridge/jni/jsc/JavaRuntimeObject.h:
2648         (JSC::Bindings::JavaRuntimeObject::createStructure):
2649         * bridge/objc/ObjCRuntimeObject.h:
2650         (JSC::Bindings::ObjCRuntimeObject::createStructure):
2651         * bridge/objc/objc_instance.mm:
2652         (ObjCRuntimeMethod::createStructure):
2653         * bridge/objc/objc_runtime.h:
2654         (JSC::Bindings::ObjcFallbackObjectImp::createStructure):
2655         * bridge/runtime_array.h:
2656         (JSC::RuntimeArray::createStructure):
2657         * bridge/runtime_method.h:
2658         (JSC::RuntimeMethod::createStructure):
2659         * bridge/runtime_object.h:
2660         (JSC::Bindings::RuntimeObject::createStructure):
2661
2662 2011-09-06  Anders Carlsson  <andersca@apple.com>
2663
2664         Move NPAPI headers in bridge to plugins
2665         https://bugs.webkit.org/show_bug.cgi?id=67661
2666
2667         Reviewed by Darin Adler.
2668
2669         * WebCore.gypi:
2670         * WebCore.pro:
2671         * WebCore.vcproj/WebCore.vcproj:
2672         * WebCore.xcodeproj/project.pbxproj:
2673         Update build systems.
2674
2675         * bridge/npapi.h: Removed.
2676         * bridge/npruntime.h: Removed.
2677         * bridge/nptypes.h: Removed.
2678         * plugins/npapi.h: Copied from Source/WebCore/bridge/npapi.h.
2679         * plugins/npruntime.h: Copied from Source/WebCore/bridge/npruntime.h.
2680         * plugins/nptypes.h: Copied from Source/WebCore/bridge/nptypes.h.
2681
2682 2011-09-06  David Hyatt  <hyatt@apple.com>
2683
2684         https://bugs.webkit.org/show_bug.cgi?id=67672
2685         
2686         Improve background-size parsing. Make it actually dump auto values properly, and also make it omit
2687         auto if it is the second value. Fix the parsing to not create a value list when only a singleton value
2688         is specified.
2689
2690         Reviewed by Beth Dakin.
2691
2692         Covered well by existing tests.
2693
2694         * css/CSSComputedStyleDeclaration.cpp:
2695         (WebCore::fillSizeToCSSValue):
2696         * css/CSSParser.cpp:
2697         (WebCore::CSSParser::parseFillSize):
2698         * css/CSSStyleSelector.cpp:
2699         (WebCore::CSSStyleSelector::mapFillSize):
2700
2701 2011-09-06  David Hyatt  <hyatt@apple.com>
2702
2703         https://bugs.webkit.org/show_bug.cgi?id=67657
2704         
2705         Implement border-image-width. This patch stops short of converting -webkit-border-image to a shorthand.
2706         I'll do that in the next patch.
2707
2708         Note that unlike the -webkit-border-image syntax, border-image-width does not actually set the border
2709         width values. It simply makes cuts into the border image drawing area (which for now is just the border
2710         box, but that will change once border-image-outset is implemented).
2711         
2712         This means we need additional storage for the slices, since they are now separate from the border widths.
2713         
2714         For backwards compatibility, -webkit-border-image will continue to set the border widths when
2715         border-image-width is specified in the -webkit-border-image shorthand.
2716
2717         Reviewed by Beth Dakin.
2718
2719         Added new tests in fast/borders.
2720
2721         * css/CSSBorderImageSliceValue.cpp:
2722         (WebCore::CSSBorderImageSliceValue::CSSBorderImageSliceValue):
2723         (WebCore::CSSBorderImageSliceValue::cssText):
2724         * css/CSSBorderImageSliceValue.h:
2725         (WebCore::CSSBorderImageSliceValue::create):
2726         (WebCore::CSSBorderImageSliceValue::slices):
2727         Rename slices() to imageSlices() and add borderSlices() and m_borderSlices to hold the desired cuts
2728         for the border image drawing area. Converted the slices over to the new Quad primitive value (a RectBase
2729         subclass that is identical to Rect but dumps as a quad instead of a rect primitive).
2730
2731         * css/CSSBorderImageValue.cpp:
2732         (WebCore::CSSBorderImageValue::CSSBorderImageValue):
2733         (WebCore::CSSBorderImageValue::cssText):
2734         * css/CSSBorderImageValue.h:
2735         (WebCore::CSSBorderImageValue::create):
2736         Make CSSBorderImageValue take the border slices during construction now.
2737     
2738         * css/CSSComputedStyleDeclaration.cpp:
2739         (WebCore::valueForNinePieceImageSlice):
2740         (WebCore::valueForNinePieceImageWidth):
2741         (WebCore::valueForNinePieceImageRepeat):
2742         (WebCore::valueForNinePieceImage):
2743         (WebCore::CSSComputedStyleDeclaration::getPropertyCSSValue):
2744         Add support for computed style via valueForNinePieceImageWidth. Patch all of the border image properties
2745         to dump the most compact form possible for the property values, e.g., "stretch stretch" becomes "stretch."
2746
2747         * css/CSSParser.cpp:
2748         (WebCore::CSSParser::parseValue):
2749         (WebCore::CSSParser::parseReflect):
2750         (WebCore::BorderImageParseContext::BorderImageParseContext):
2751         (WebCore::BorderImageParseContext::commitImageSlice):
2752         (WebCore::BorderImageParseContext::commitBorderWidth):
2753         (WebCore::BorderImageParseContext::commitBorderImage):
2754         (WebCore::CSSParser::parseBorderImage):
2755         (WebCore::isBorderImageRepeatKeyword):
2756         (WebCore::CSSParser::parseBorderImageRepeat):
2757         (WebCore::BorderImageSliceParseContext::commitBorderImageSlice):
2758         (WebCore::CSSParser::parseBorderImageSlice):
2759         (WebCore::BorderImageWidthParseContext::BorderImageWidthParseContext):
2760         (WebCore::BorderImageWidthParseContext::allowNumber):
2761         (WebCore::BorderImageWidthParseContext::allowFinalCommit):
2762         (WebCore::BorderImageWidthParseContext::top):
2763         (WebCore::BorderImageWidthParseContext::commitNumber):
2764         (WebCore::BorderImageWidthParseContext::setAllowFinalCommit):
2765         (WebCore::BorderImageWidthParseContext::setTop):
2766         (WebCore::BorderImageWidthParseContext::commitBorderImageWidth):
2767         (WebCore::CSSParser::parseBorderImageWidth):
2768         * css/CSSParser.h:
2769         Modify the border-image code to pass off border-image-width parsing to parseBorderImageWidth.
2770
2771         * css/CSSPrimitiveValue.cpp:
2772         (WebCore::isValidCSSUnitTypeForDoubleConversion):
2773         (WebCore::CSSPrimitiveValue::init):
2774         (WebCore::CSSPrimitiveValue::cleanup):
2775         (WebCore::CSSPrimitiveValue::getQuadValue):
2776         (WebCore::CSSPrimitiveValue::cssText):
2777         * css/CSSPrimitiveValue.h:
2778         (WebCore::CSSPrimitiveValue::getQuadValue):
2779         Add the new Quad value to CSSPrimitiveValue.
2780     
2781         * css/CSSPropertyNames.in:
2782         Add the new properties for border-image-width and -webkit-mask-box-image-width.
2783
2784         * css/CSSStyleSelector.cpp:
2785         (WebCore::CSSStyleSelector::applyProperty):
2786         (WebCore::CSSStyleSelector::mapNinePieceImage):
2787         (WebCore::CSSStyleSelector::mapNinePieceImageSlice):
2788         (WebCore::CSSStyleSelector::mapNinePieceImageWidth):
2789         (WebCore::CSSStyleSelector::loadPendingImages):
2790         * css/CSSStyleSelector.h:
2791         Add the code to map the image width into border slices.
2792     
2793         * css/Rect.h:
2794         (WebCore::RectBase::top):
2795         (WebCore::RectBase::right):
2796         (WebCore::RectBase::bottom):
2797         (WebCore::RectBase::left):
2798         (WebCore::RectBase::setTop):
2799         (WebCore::RectBase::setRight):
2800         (WebCore::RectBase::setBottom):
2801         (WebCore::RectBase::setLeft):
2802         (WebCore::RectBase::RectBase):
2803         (WebCore::RectBase::~RectBase):
2804         (WebCore::Rect::create):
2805         (WebCore::Rect::Rect):
2806         (WebCore::Quad::create):
2807         (WebCore::Quad::Quad):
2808         Adding the new Quad value.
2809
2810         * rendering/RenderBoxModelObject.cpp:
2811         (WebCore::computeBorderImageSide):
2812         (WebCore::RenderBoxModelObject::paintNinePieceImage):
2813         Modify painting to treat the border slices as separate from the border widths.
2814         
2815         * rendering/style/NinePieceImage.cpp:
2816         (WebCore::NinePieceImage::operator==):
2817         * rendering/style/NinePieceImage.h:
2818         (WebCore::NinePieceImage::NinePieceImage):
2819         (WebCore::NinePieceImage::imageSlices):
2820         (WebCore::NinePieceImage::setImageSlices):
2821         (WebCore::NinePieceImage::borderSlices):
2822         (WebCore::NinePieceImage::setBorderSlices):
2823         (WebCore::NinePieceImage::copyImageSlicesFrom):
2824         (WebCore::NinePieceImage::copyBorderSlicesFrom):
2825         * rendering/style/StyleRareNonInheritedData.cpp:
2826         Add the border slices.
2827         
2828         (WebCore::StyleRareNonInheritedData::StyleRareNonInheritedData):
2829         * rendering/style/StyleReflection.h:
2830         (WebCore::StyleReflection::StyleReflection):
2831         Make sure masks and reflections default border-image-width to auto instead of 1, since that matches
2832         old behavior.
2833
2834 2011-09-06  Noel Gordon  <noel.gordon@gmail.com>
2835
2836         [chromium skia] JPEGImageEncoder: hoist constants out of the encoding loop
2837         https://bugs.webkit.org/show_bug.cgi?id=67589
2838
2839         Reviewed by Kenneth Russell.
2840
2841         Change the row converter function signatures to be the same.  Call them via a function
2842         pointer during the encoding loop.  Minor webkit style cleanup, remove unused include.
2843
2844         No new tests.  Covered by existing canvas 2d and 3d tests.
2845         canvas/philip/tests/toDataURL.jpeg.alpha.html
2846         fast/canvas/webgl/premultiplyalpha-test.html
2847
2848         * platform/image-encoders/skia/JPEGImageEncoder.cpp:  Remove SkUnPreMultiply.h (not used).
2849         (WebCore::preMultipliedBGRAtoRGB):  Use unsigned char* instead of void* for pixels.
2850         (WebCore::RGBAtoRGB):  pixels & pixelCount to match the preMultipliedBGRAtoRGB() signature.
2851         (WebCore::encodePixels):  Move constants out of the encoding loop: use a function pointer
2852         to call preMultipliedBGRAtoRGB or RGBAtoRGB (now they have identical signatures), define
2853         and use pixelRowStride constant.
2854         (WebCore::JPEGImageEncoder::encode):
2855
2856 2011-09-06  Aaron Colwell  <acolwell@chromium.org>
2857
2858         Allow MediaSource API to be enabled at runtime.
2859         https://bugs.webkit.org/show_bug.cgi?id=67306
2860
2861         Reviewed by Eric Carlson.
2862
2863         * bindings/generic/RuntimeEnabledFeatures.cpp:
2864         * bindings/generic/RuntimeEnabledFeatures.h:
2865         (WebCore::RuntimeEnabledFeatures::webkitMediaSourceEnabled):
2866         (WebCore::RuntimeEnabledFeatures::setWebkitMediaSourceEnabled):
2867         * html/HTMLMediaElement.idl:
2868
2869 2011-09-06  Mike Reed  <reed@google.com>
2870
2871         [skia] never draw with GDI, so that all text can be gpu-accelerated
2872         https://bugs.webkit.org/show_bug.cgi?id=65203
2873
2874         Reviewed by Kenneth Russell.
2875
2876         * platform/graphics/chromium/FontChromiumWin.cpp:
2877         (WebCore::TransparencyAwareFontPainter::TransparencyAwareFontPainter::TransparencyAwareFontPainter):
2878         (WebCore::TransparencyAwareFontPainter::TransparencyAwareGlyphPainter::TransparencyAwareGlyphPainter):
2879         (WebCore::TransparencyAwareFontPainter::TransparencyAwareGlyphPainter::drawGlyphs):
2880         (WebCore::TransparencyAwareFontPainter::TransparencyAwareUniscribePainter::TransparencyAwareUniscribePainter):
2881         (WebCore::drawGlyphsWin):
2882         (WebCore::Font::drawComplexText):
2883         * platform/graphics/chromium/UniscribeHelper.cpp:
2884         (WebCore::UniscribeHelper::draw):
2885         * platform/graphics/skia/PlatformContextSkia.cpp:
2886         * platform/graphics/skia/PlatformContextSkia.h:
2887         * platform/graphics/skia/SkiaFontWin.cpp:
2888         (WebCore::skiaDrawText):
2889         * platform/graphics/skia/SkiaFontWin.h:
2890
2891 2011-09-06  Nat Duca  <nduca@chromium.org>
2892
2893         [chromium] REGRESSION(94353): requestAnimationFrame not throttled in compositing path
2894         https://bugs.webkit.org/show_bug.cgi?id=67621
2895
2896         CCSingleThreadProxy should not perform layout when called
2897         via the compositeImmediately path. Doing so makes it look
2898         like frame rate is unbounded.
2899
2900         Reviewed by James Robinson.
2901
2902         * platform/graphics/chromium/cc/CCSingleThreadProxy.cpp:
2903         (WebCore::CCSingleThreadProxy::compositeAndReadback):
2904         (WebCore::CCSingleThreadProxy::compositeImmediately):
2905         (WebCore::CCSingleThreadProxy::commitIfNeeded):
2906         * platform/graphics/chromium/cc/CCSingleThreadProxy.h:
2907
2908 2011-09-06  Ryosuke Niwa  <rniwa@webkit.org>
2909
2910         REGRESSION(r94274): FormManagerTest.PreviewForm and FillFormNonEmptyField fail on chromium
2911         https://bugs.webkit.org/show_bug.cgi?id=67453
2912
2913         Reviewed by Kent Tamura.
2914
2915         Fixed the bug by updating inner text value in setSuggestedValue.
2916
2917         Also added a suggestedValue and setSuggestedValue on window.internals for testing purposes.
2918
2919         Test: fast/forms/suggested-value.html
2920
2921         * WebCore.exp.in:
2922         * testing/Internals.cpp:
2923         (WebCore::Internals::suggestedValue):
2924         (WebCore::Internals::setSuggestedValue):
2925         * testing/Internals.h:
2926         * testing/Internals.idl:
2927
2928 2011-09-06  Eric Carlson  <eric.carlson@apple.com>
2929
2930         load() does not reset the resource selection algorithm
2931         https://bugs.webkit.org/show_bug.cgi?id=64917
2932
2933         Reviewed by Darin Adler.
2934
2935         Test: media/video-source-load.html
2936
2937         * html/HTMLMediaElement.cpp:
2938         (WebCore::HTMLMediaElement::selectMediaResource): Reset m_nextChildNodeToConsider, update
2939             comments and rearrange logic to more closely match logic in spec.
2940         (WebCore::HTMLMediaElement::noneSupported): Update comments.
2941
2942 2011-09-06  Abhishek Arya  <inferno@chromium.org>
2943
2944         Style not propagated to anonymous boxes and anonymous
2945         inline-blocks.
2946         https://bugs.webkit.org/show_bug.cgi?id=67364
2947
2948         Reviewed by James Robinson.
2949
2950         Share propagateStyleToAnonymousChildren with RenderBlock::styleDidChange.
2951
2952         * rendering/RenderBlock.cpp:
2953         (WebCore::RenderBlock::styleDidChange):
2954         * rendering/RenderObject.cpp:
2955         (WebCore::RenderObject::propagateStyleToAnonymousChildren):
2956         * rendering/RenderObject.h:
2957
2958 2011-09-06  Robin Cao  <robin.cao@torchmobile.com.cn>
2959
2960         [skia] States of GraphicsContext may never be restored after clipToImageBuffer
2961         https://bugs.webkit.org/show_bug.cgi?id=67358
2962
2963         beginLayerClippedToImage/applyClipFromImage are mismatched when clipping to
2964         an empty ImageBuffer, which will make states of GraphicsContext incorrect.
2965
2966         Reviewed by James Robinson.
2967
2968         Test: fast/repaint/background-clip-text.html
2969
2970         * platform/graphics/skia/PlatformContextSkia.cpp:
2971         (WebCore::PlatformContextSkia::beginLayerClippedToImage):
2972
2973 2011-09-06  Raphael Kubo da Costa  <kubo@profusion.mobi>
2974
2975         [EFL] Do not allocate memory for extremely large surfaces.
2976         https://bugs.webkit.org/show_bug.cgi?id=65192
2977
2978         Reviewed by Martin Robinson.
2979
2980         So far, RenderThemeEfl tried to allocate a buffer and a cairo surface
2981         the size of the whole form element passed to it.
2982
2983         In the case of
2984         fast/overflow/overflow-height-float-not-removed-crash.html and others,
2985         this meant extremely large widgets, which crashed the code.
2986
2987         We now only render the widgets if they are smaller than some hardcoded
2988         and sufficiently large values which should work in most cases.
2989
2990         No new tests, as this was uncovered by existing ones.
2991
2992         * platform/efl/RenderThemeEfl.cpp:
2993         (WebCore::RenderThemeEfl::isFormElementTooLargeToDisplay):
2994         (WebCore::RenderThemeEfl::cacheThemePartNew):
2995         (WebCore::RenderThemeEfl::paintThemePart):
2996         * platform/efl/RenderThemeEfl.h:
2997
2998 2011-08-30  Pavel Podivilov  <podivilov@chromium.org>
2999
3000         Web Inspector: implement source map v3 consumer.
3001         https://bugs.webkit.org/show_bug.cgi?id=67205
3002
3003         Reviewed by Yury Semikhatsky.
3004
3005         Test: inspector/debugger/compiler-source-mapping.html
3006
3007         * WebCore.gypi:
3008         * WebCore.vcproj/WebCore.vcproj:
3009         * inspector/front-end/CompilerSourceMapping.js: Added.
3010         (WebInspector.CompilerSourceMapping):
3011         (WebInspector.CompilerSourceMapping.prototype.compiledLocationToSourceLocation):
3012         (WebInspector.CompilerSourceMapping.prototype.sourceLocationToCompiledLocation):
3013         (WebInspector.CompilerSourceMapping.prototype.get sources):
3014         (WebInspector.ClosureCompilerSourceMapping):
3015         (WebInspector.ClosureCompilerSourceMapping.prototype.compiledLocationToSourceLocation):
3016         (WebInspector.ClosureCompilerSourceMapping.prototype.sourceLocationToCompiledLocation):
3017         (WebInspector.ClosureCompilerSourceMapping.prototype.get sources):
3018         (WebInspector.ClosureCompilerSourceMapping.prototype._findMapping):
3019         (WebInspector.ClosureCompilerSourceMapping.prototype._parsePayload):
3020         (WebInspector.ClosureCompilerSourceMapping.prototype._isSeparator):
3021         (WebInspector.ClosureCompilerSourceMapping.prototype._decodeVLQ):
3022         (WebInspector.ClosureCompilerSourceMapping.StringCharIterator):
3023         (WebInspector.ClosureCompilerSourceMapping.StringCharIterator.prototype.next):
3024         (WebInspector.ClosureCompilerSourceMapping.StringCharIterator.prototype.peek):
3025         (WebInspector.ClosureCompilerSourceMapping.StringCharIterator.prototype.hasNext):
3026         * inspector/front-end/WebKit.qrc:
3027         * inspector/front-end/inspector.html:
3028
3029 2011-09-05  Pavel Podivilov  <podivilov@chromium.org>
3030
3031         Web Inspector: re-implement RawSourceCode.
3032         https://bugs.webkit.org/show_bug.cgi?id=67609
3033
3034         RawSourceCode content and source mapping loading logic is too complex, re-implement it using simpler semantics:
3035         1) Initially, RawSourceCode doesn't have any content or mapping because content loading and
3036         formatting operations are asynchronous, it only has scripts metadata. We don't update UI right
3037         after RawSourceCode creation until full RawSourceCode representation is ready (content + mapping).
3038         2) When RawSourceCode representation is ready (e.g. resource is finished, or content is formatted
3039         if in pretty-print mode) we dispatch SourceMappingUpdated event to notify the listeners that
3040         source code should be shown to user and raw locations should be converted to ui locations
3041         (to show breakpoins, messages, call frames etc in UI). At this moment, all source file's content
3042         is ready for loading and source mapping is available.
3043         3) Later, RawSourceCode representation may change again, e.g. if pretty-print mode is toggled, or
3044         blocked resource is finished etc., in that case SourceMappingUpdated is dispatched again to update
3045         source code, links and decorations in UI.
3046
3047         Reviewed by Yury Semikhatsky.
3048
3049         * inspector/front-end/DebuggerPresentationModel.js:
3050         (WebInspector.DebuggerPresentationModel.prototype.linkifyLocation):
3051         (WebInspector.DebuggerPresentationModel.prototype._addScript):
3052         (WebInspector.DebuggerPresentationModel.prototype._sourceMappingUpdated):
3053         (WebInspector.DebuggerPresentationModel.prototype._restoreBreakpoints):
3054         (WebInspector.DebuggerPresentationModel.prototype._addConsoleMessage.didGetUILocation):
3055         (WebInspector.DebuggerPresentationModel.prototype._addConsoleMessage):
3056         (WebInspector.DebuggerPresentationModel.prototype.messagesForUISourceCode):
3057         * inspector/front-end/ScriptsPanel.js:
3058         (WebInspector.ScriptsPanel.prototype._uiSourceCodeReplaced):
3059         (WebInspector.ScriptsPanel.prototype._sourceFrameLoaded):
3060         * inspector/front-end/SourceFile.js:
3061         (WebInspector.RawSourceCode):
3062         (WebInspector.RawSourceCode.prototype.addScript):
3063         (WebInspector.RawSourceCode.prototype.contentEdited):
3064         (WebInspector.RawSourceCode.prototype._resourceFinished):
3065         (WebInspector.RawSourceCode.prototype.requestContent):
3066         (WebInspector.RawSourceCode.prototype.createSourceMappingIfNeeded.sourceMappingUpdated):
3067         (WebInspector.RawSourceCode.prototype.createSourceMappingIfNeeded):
3068         (WebInspector.RawSourceCode.prototype.forceLoadContent):
3069         (WebInspector.RawSourceCode.prototype._updateSourceMapping.didCreateSourceMapping):
3070         (WebInspector.RawSourceCode.prototype._updateSourceMapping):
3071         (WebInspector.RawSourceCode.prototype._createContentProvider):
3072         (WebInspector.RawSourceCode.prototype._createSourceMapping.didRequestContent.didFormatContent):
3073         (WebInspector.RawSourceCode.prototype._createSourceMapping.didRequestContent):
3074         (WebInspector.RawSourceCode.prototype._createSourceMapping):
3075         (WebInspector.RawSourceCode.prototype._saveSourceMapping):
3076         (WebInspector.StaticContentProvider):
3077         (WebInspector.StaticContentProvider.prototype.requestContent):
3078
3079 2011-09-06  Csaba Osztrogonác  <ossy@webkit.org>
3080
3081         Unreviewed, rolling out r94564.
3082         http://trac.webkit.org/changeset/94564
3083         https://bugs.webkit.org/show_bug.cgi?id=67555
3084
3085         It broke many tests
3086
3087         * svg/SVGTRefElement.cpp:
3088         (WebCore::SVGTRefElement::svgAttributeChanged):
3089
3090 2011-09-06  Rob Buis  <rbuis@rim.com>
3091
3092         use after free in WebCore::SVGTRefElement::updateReferencedText
3093         https://bugs.webkit.org/show_bug.cgi?id=67555
3094
3095         Reviewed by Nikolas Zimmermann.
3096
3097         Do not install event listener if tref is not part of any document.
3098
3099         Test: svg/custom/tref-clone-crash.html
3100
3101         * svg/SVGTRefElement.cpp:
3102         (WebCore::SVGTRefElement::svgAttributeChanged):
3103
3104 2011-09-06  Sheriff Bot  <webkit.review.bot@gmail.com>
3105
3106         Unreviewed, rolling out r94560.
3107         http://trac.webkit.org/changeset/94560
3108         https://bugs.webkit.org/show_bug.cgi?id=67636
3109
3110         It made inspector/debugger/script-formatter.html flakey
3111         (Requested by Ossy on #webkit).
3112
3113         * inspector/front-end/BreakpointManager.js:
3114         (WebInspector.BreakpointManager.prototype.set reset):
3115         * inspector/front-end/DebuggerPresentationModel.js:
3116         (WebInspector.DebuggerPresentationModel.prototype._addScript.didCreateSourceMapping):
3117         (WebInspector.DebuggerPresentationModel.prototype._addScript):
3118         (WebInspector.DebuggerPresentationModel.prototype._uiSourceCodeReplaced):
3119         (WebInspector.DebuggerPresentationModel.prototype.setFormatSource):
3120         (WebInspector.DebuggerPresentationModel.prototype._addConsoleMessage.didGetUILocation):
3121         (WebInspector.DebuggerPresentationModel.prototype._addConsoleMessage):
3122         (WebInspector.PresenationCallFrame.prototype.select):
3123         * inspector/front-end/ScriptsPanel.js:
3124         (WebInspector.ScriptsPanel.prototype._uiSourceCodeReplaced):
3125         (WebInspector.ScriptsPanel.prototype._sourceFrameLoaded):
3126         * inspector/front-end/SourceFile.js:
3127         (WebInspector.RawSourceCode):
3128         (WebInspector.RawSourceCode.prototype.addScript):
3129         (WebInspector.RawSourceCode.prototype.contentEdited):
3130         (WebInspector.RawSourceCode.prototype.requestContent):
3131         (WebInspector.RawSourceCode.prototype.createSourceMappingIfNeeded.didRequestContent):
3132         (WebInspector.RawSourceCode.prototype.createSourceMappingIfNeeded):
3133         (WebInspector.RawSourceCode.prototype._setContentProvider):
3134         (WebInspector.RawSourceCode.prototype.forceLoadContent):
3135         (WebInspector.RawSourceCode.prototype._reload):
3136         (WebInspector.RawSourceCode.prototype._requestContent):
3137         (WebInspector.RawSourceCode.prototype._loadResourceContent):
3138         (WebInspector.RawSourceCode.prototype._loadScriptContent):
3139         (WebInspector.RawSourceCode.prototype._loadAndConcatenateScriptsContent):
3140         (WebInspector.RawSourceCode.prototype._didRequestContent):
3141         (WebInspector.RawSourceCode.prototype._hasPendingResource):
3142         (WebInspector.FormattedContentProvider):
3143         (WebInspector.FormattedContentProvider.prototype.requestContent.didRequestContent.didFormatContent):
3144         (WebInspector.FormattedContentProvider.prototype.requestContent):
3145
3146 2011-09-06  Antti Koivisto  <antti@apple.com>
3147
3148         https://bugs.webkit.org/show_bug.cgi?id=67480
3149         [Chromium] [REGRESSION] Layout Test svg/batik/text/textStyles.svg is failing
3150
3151         Reviewed by Dimitri Glazkov.
3152
3153         The text node needs willRecalcStyle mechanism too.
3154
3155         * dom/Text.cpp:
3156         (WebCore::Text::recalcTextStyle):
3157         * dom/Text.h:
3158         (WebCore::Text::willRecalcTextStyle):
3159         * svg/SVGTRefElement.cpp:
3160         (WebCore::SVGTRefElement::SVGTRefElement):
3161         (WebCore::SVGShadowText::SVGShadowText):
3162         (WebCore::SVGShadowText::willRecalcTextStyle):
3163
3164 2011-09-05  Pavel Podivilov  <podivilov@chromium.org>
3165
3166         Web Inspector: re-implement RawSourceCode.
3167         https://bugs.webkit.org/show_bug.cgi?id=67609
3168
3169         RawSourceCode content and source mapping loading logic is too complex, re-implement it using simpler semantics:
3170         1) Initially, RawSourceCode doesn't have any content or mapping because content loading and
3171         formatting operations are asynchronous, it only has scripts metadata. We don't update UI right
3172         after RawSourceCode creation until full RawSourceCode representation is ready (content + mapping).
3173         2) When RawSourceCode representation is ready (e.g. resource is finished, or content is formatted
3174         if in pretty-print mode) we dispatch SourceMappingUpdated event to notify the listeners that
3175         source code should be shown to user and raw locations should be converted to ui locations
3176         (to show breakpoins, messages, call frames etc in UI). At this moment, all source file's content
3177         is ready for loading and source mapping is available.
3178         3) Later, RawSourceCode representation may change again, e.g. if pretty-print mode is toggled, or
3179         blocked resource is finished etc., in that case SourceMappingUpdated is dispatched again to update
3180         source code, links and decorations in UI.
3181
3182         Reviewed by Yury Semikhatsky.
3183
3184         * inspector/front-end/DebuggerPresentationModel.js:
3185         (WebInspector.DebuggerPresentationModel.prototype.linkifyLocation):
3186         (WebInspector.DebuggerPresentationModel.prototype._addScript):
3187         (WebInspector.DebuggerPresentationModel.prototype._sourceMappingUpdated):
3188         (WebInspector.DebuggerPresentationModel.prototype._restoreBreakpoints):
3189         (WebInspector.DebuggerPresentationModel.prototype._addConsoleMessage.didGetUILocation):
3190         (WebInspector.DebuggerPresentationModel.prototype._addConsoleMessage):
3191         (WebInspector.DebuggerPresentationModel.prototype.messagesForUISourceCode):
3192         * inspector/front-end/ScriptsPanel.js:
3193         (WebInspector.ScriptsPanel.prototype._uiSourceCodeReplaced):
3194         (WebInspector.ScriptsPanel.prototype._sourceFrameLoaded):
3195         * inspector/front-end/SourceFile.js:
3196         (WebInspector.RawSourceCode):
3197         (WebInspector.RawSourceCode.prototype.addScript):
3198         (WebInspector.RawSourceCode.prototype.contentEdited):
3199         (WebInspector.RawSourceCode.prototype._resourceFinished):
3200         (WebInspector.RawSourceCode.prototype.requestContent):
3201         (WebInspector.RawSourceCode.prototype.createSourceMappingIfNeeded.sourceMappingUpdated):
3202         (WebInspector.RawSourceCode.prototype.createSourceMappingIfNeeded):
3203         (WebInspector.RawSourceCode.prototype.forceLoadContent):
3204         (WebInspector.RawSourceCode.prototype._updateSourceMapping.didCreateSourceMapping):
3205         (WebInspector.RawSourceCode.prototype._updateSourceMapping):
3206         (WebInspector.RawSourceCode.prototype._createContentProvider):
3207         (WebInspector.RawSourceCode.prototype._createSourceMapping.didRequestContent.didFormatContent):
3208         (WebInspector.RawSourceCode.prototype._createSourceMapping.didRequestContent):
3209         (WebInspector.RawSourceCode.prototype._createSourceMapping):
3210         (WebInspector.RawSourceCode.prototype._saveSourceMapping):
3211         (WebInspector.StaticContentProvider):
3212         (WebInspector.StaticContentProvider.prototype.requestContent):
3213
3214 2011-09-06  Dirk Schulze  <krit@webkit.org>
3215
3216         Return to transform multiplication: motion transform * other transforms
3217         https://bugs.webkit.org/show_bug.cgi?id=67601
3218
3219         Reviewed by Nikolas Zimmermann.
3220         
3221         Right now we take the current transform of a transformable SVG element, post multiply the animation transform
3222         and post multiply the motion transform to the other both:
3223
3224           transform * animation transform * motion transform
3225
3226         We switched to this behavior with the clean up of AffineTransform.
3227         While the specification of SVG demands us to do so, no other SVG viewer is doing it that way. Now switching back to:
3228
3229           motion transform * transform * animation transform
3230
3231         This is done by other SVG viewers as well. While their is no consense about how to multiply the different transforms
3232         on the SVG WG, their is a consense that the current specified behavior is unwanted. See
3233         http://lists.w3.org/Archives/Public/www-svg/2011Jan/0055.html for more details.
3234
3235         We pass the following tests of the official W3C SVG test suite again now:
3236
3237         - animate-elem-24-t.svg
3238         - animate-elem-30-t.svg
3239
3240         * svg/SVGStyledTransformableElement.cpp:
3241         (WebCore::SVGStyledTransformableElement::animatedLocalTransform):
3242         * svg/SVGTextElement.cpp:
3243         (WebCore::SVGTextElement::animatedLocalTransform):
3244
3245 2011-09-05  Adam Barth  <abarth@webkit.org>
3246
3247         window.HTMLSpanElement does not exist
3248         https://bugs.webkit.org/show_bug.cgi?id=67571
3249
3250         Reviewed by Sam Weinig.
3251
3252         We have these objects for most other elements and HTMLSpanElement
3253         exists in Firefox and in the HTML5 spec.  This patch adds it.
3254
3255         Test: fast/dom/wrapper-classes.html
3256
3257         * CMakeLists.txt:
3258         * CodeGenerators.pri:
3259         * DerivedSources.cpp:
3260         * DerivedSources.make:
3261         * GNUmakefile.list.am:
3262         * WebCore.gypi:
3263         * WebCore.pro:
3264         * WebCore.vcproj/WebCore.vcproj:
3265         * WebCore.xcodeproj/project.pbxproj:
3266         * html/HTMLElementsAllInOne.cpp:
3267         * html/HTMLSpanElement.cpp: Added.
3268         (WebCore::HTMLSpanElement::HTMLSpanElement):
3269         (WebCore::HTMLSpanElement::create):
3270         * html/HTMLSpanElement.h: Added.
3271         * html/HTMLSpanElement.idl: Added.
3272         * html/HTMLTagNames.in:
3273         * page/DOMWindow.idl:
3274
3275 2011-09-04  Abhishek Arya  <inferno@chromium.org>
3276
3277         Style not propagated to anonymous boxes and anonymous
3278         inline-blocks.
3279         https://bugs.webkit.org/show_bug.cgi?id=67364
3280
3281         Reviewed by James Robinson.
3282
3283         Tests: fast/ruby/ruby-block-style-not-updated-with-before-after-content.html
3284                fast/ruby/ruby-block-style-not-updated.html
3285                fast/ruby/ruby-inline-style-not-updated-with-before-after-content.html
3286                fast/ruby/ruby-inline-style-not-updated.html
3287                fast/table/table-row-style-not-updated-with-after-content.html
3288                fast/table/table-row-style-not-updated-with-before-content.html
3289                fast/table/table-row-style-not-updated.html
3290                fast/table/table-style-not-updated.html
3291
3292         * rendering/RenderObject.cpp:
3293         (WebCore::RenderObject::propagateStyleToAnonymousChildren):
3294         * rendering/RenderObject.h:
3295         (WebCore::RenderObject::isBeforeAfterContent):
3296         * rendering/RenderRuby.cpp:
3297         (WebCore::RenderRubyAsInline::styleDidChange):
3298         (WebCore::RenderRubyAsBlock::styleDidChange):
3299         * rendering/RenderRuby.h:
3300         * rendering/RenderTable.cpp:
3301         (WebCore::RenderTable::styleDidChange):
3302         * rendering/RenderTableRow.cpp:
3303         (WebCore::RenderTableRow::styleDidChange):
3304         (WebCore::RenderTableRow::addChild):
3305         * rendering/RenderTableSection.cpp:
3306         (WebCore::RenderTableSection::styleDidChange):
3307         (WebCore::RenderTableSection::addChild):
3308         * rendering/RenderTableSection.h:
3309
3310 2011-09-05  Abhishek Arya  <inferno@chromium.org>
3311
3312         Crash in RenderObjectChildList::destroyLeftOverChildren()
3313         https://bugs.webkit.org/show_bug.cgi?id=64753
3314
3315         Reviewed by James Robinson.
3316
3317         If any of the ancestors between column span element and containing
3318         column's block is a continuation, then don't attempt to render the
3319         column span by splitting the block into continuations.
3320
3321         Test: fast/multicol/column-span-parent-continuation-crash.html
3322
3323         * rendering/RenderBlock.cpp:
3324         (WebCore::RenderBlock::columnsBlockForSpanningElement):
3325
3326 2011-09-05  Sheriff Bot  <webkit.review.bot@gmail.com>
3327
3328         Unreviewed, rolling out r94537.
3329         http://trac.webkit.org/changeset/94537
3330         https://bugs.webkit.org/show_bug.cgi?id=67618
3331
3332         Does not compile on Chromium Mac (Requested by abarth_ on
3333         #webkit).
3334
3335         * platform/image-encoders/skia/JPEGImageEncoder.cpp:
3336         (WebCore::preMultipliedBGRAtoRGB):
3337         (WebCore::RGBAtoRGB):
3338         (WebCore::encodePixels):
3339         (WebCore::JPEGImageEncoder::encode):
3340
3341 2011-09-05  Noel Gordon  <noel.gordon@gmail.com>
3342
3343         [chromium skia] JPEGImageEncoder: hoist contants out of the encoding loop
3344         https://bugs.webkit.org/show_bug.cgi?id=67589
3345
3346         Reviewed by Adam Barth.
3347
3348         Change the row converter function signatures to be the same.  Call them via a function
3349         pointer during the encoding loop.  Minor webkit stlye cleanup, remove unused include.
3350
3351         No new tests.  Covered by existing canvas 2d and 3d tests.
3352         canvas/philip/tests/toDataURL.jpeg.alpha.html
3353         fast/canvas/webgl/premultiplyalpha-test.html
3354
3355         * platform/image-encoders/skia/JPEGImageEncoder.cpp:  Remove SkUnPreMultiply.h (not used).
3356         (WebCore::preMultipliedBGRAtoRGB):  Use unsigned char* instead of void* for pixels.
3357         (WebCore::RGBAtoRGB):  pixels & pixelCount to match the preMultipliedBGRAtoRGB() signature.
3358         (WebCore::encodePixels):  Move contants out of the encoding loop: use a function pointer to
3359         call preMultipliedBGRAtoRGB or RGBAtoRGB (now they have identical signatures) during the
3360         image row encoding loop.  Add/use pixelRowStride constant.
3361         (WebCore::JPEGImageEncoder::encode):  webkit style: no need to split lines.
3362
3363 2011-09-05  John Knottenbelt  <jknotten@chromium.org>
3364
3365         Take pageScaleFactor into account for MouseRelatedEvents.
3366         https://bugs.webkit.org/show_bug.cgi?id=67592
3367
3368         Reviewed by Dimitri Glazkov.
3369
3370         Test: fast/events/page-scaled-mouse-click.html
3371
3372         * dom/MouseRelatedEvent.cpp:
3373         (WebCore::MouseRelatedEvent::MouseRelatedEvent):
3374
3375 2011-09-02  Pavel Podivilov  <podivilov@chromium.org>
3376
3377         Web Inspector: rename RawSourceCode.reload to contentEdited.
3378         https://bugs.webkit.org/show_bug.cgi?id=67504
3379
3380         Make RawSourceCode.reload private and remove RawSourceCode.content getter and setter
3381         (RawSourceCode isn't supposed to have any content).
3382
3383         Reviewed by Yury Semikhatsky.
3384
3385         * inspector/front-end/DebuggerPresentationModel.js:
3386         (WebInspector.DebuggerPresentationModel.prototype.setScriptSource.didEditScriptSource):
3387         (WebInspector.DebuggerPresentationModel.prototype.setScriptSource):
3388         (WebInspector.DebuggerPresentationModelResourceBinding.prototype.canSetContent):
3389         (WebInspector.DebuggerPresentationModelResourceBinding.prototype.setContent):
3390         (WebInspector.DebuggerPresentationModelResourceBinding.prototype._setContentWithInitialContent):
3391         * inspector/front-end/SourceFile.js:
3392         (WebInspector.RawSourceCode):
3393         (WebInspector.RawSourceCode.prototype.contentEdited):
3394         (WebInspector.RawSourceCode.prototype.forceLoadContent):
3395         (WebInspector.RawSourceCode.prototype._reload):
3396         (WebInspector.RawSourceCode.prototype._didRequestContent):
3397
3398 2011-09-05  Leandro Gracia Gil  <leandrogracia@chromium.org>
3399
3400         Fix the regression of bug 65333 introduced by 60170.
3401         This caused the speech input bubble to appear in the wrong side for RTL text inputs.
3402         https://bugs.webkit.org/show_bug.cgi?id=67597
3403
3404         Reviewed by Tony Gentilcore.
3405
3406         No new tests. Fixing regression.
3407
3408         * html/shadow/TextControlInnerElements.cpp:
3409         (WebCore::InputFieldSpeechButtonElement::startSpeechInput):
3410
3411 2011-09-05  Alexander Pavlov  <apavlov@chromium.org>
3412
3413         Web Inspector: F5 results in a Web Inspector frontend reload on non-Macs
3414         https://bugs.webkit.org/show_bug.cgi?id=67602
3415
3416         Reviewed by Yury Semikhatsky.
3417
3418         * inspector/front-end/inspector.js:
3419         (WebInspector.documentKeyDown):
3420
3421 2011-09-05  Sheriff Bot  <webkit.review.bot@gmail.com>
3422
3423         Unreviewed, rolling out r94525.
3424         http://trac.webkit.org/changeset/94525
3425         https://bugs.webkit.org/show_bug.cgi?id=67599
3426
3427         WinCE compilation failed. (Requested by loislo on #webkit).
3428
3429         * platform/text/TextBoundaries.cpp:
3430         * platform/text/TextBreakIteratorICU.cpp:
3431         * platform/text/qt/TextBoundariesQt.cpp:
3432         * platform/text/qt/TextBreakIteratorQt.cpp:
3433
3434 2011-09-05  Alexander Færøy  <alexander.faeroy@nokia.com>
3435
3436         [Qt] Compiling using system ICU uses QTextBreakIterator in some cases.
3437         https://bugs.webkit.org/show_bug.cgi?id=67391
3438
3439         Reviewed by Kenneth Rohde Christiansen.
3440
3441         * platform/text/TextBoundaries.cpp:
3442         * platform/text/TextBreakIteratorICU.cpp:
3443         * platform/text/qt/TextBoundariesQt.cpp:
3444         * platform/text/qt/TextBreakIteratorQt.cpp:
3445
3446 2011-09-05  Kaustubh Atrawalkar  <kaustubh@motorola.com>
3447
3448         Logic from HTMLElement::deprecatedCreateContextualFragment moved into
3449         Range::createContextualFragment function.
3450         https://bugs.webkit.org/show_bug.cgi?id=67056
3451
3452         Reviewed by Ryosuke Niwa.
3453
3454         Code Refactoring for deprecatedCreateContextualFragment.
3455
3456         No new tests. Code Re-factoring.
3457
3458         * dom/Element.cpp:
3459         * dom/Element.h:
3460         * dom/Range.cpp:
3461         (WebCore::insertIntoFragment):
3462         (WebCore::Range::createDocumentFragmentForElement):
3463         (WebCore::Range::createContextualFragment):
3464         * dom/Range.h:
3465         * editing/markup.cpp:
3466         (WebCore::createFragmentFromMarkup):
3467         * html/HTMLElement.cpp:
3468         * html/HTMLElement.h:
3469
3470 2011-09-04  James Kozianski  <koz@chromium.org>
3471
3472         Unreviewed, rolling out r94510.
3473         http://trac.webkit.org/changeset/94510
3474         https://bugs.webkit.org/show_bug.cgi?id=66531
3475
3476         Causes layout test crashes.
3477
3478         * dom/Document.cpp:
3479         (WebCore::Document::webkitWillEnterFullScreenForElement):
3480         (WebCore::Document::webkitDidExitFullScreenForElement):
3481         * dom/NodeRenderingContext.cpp:
3482         (WebCore::wrapWithRenderFullScreen):
3483         (WebCore::NodeRendererFactory::createRendererIfNeeded):
3484         * rendering/RenderFullScreen.cpp:
3485         (RenderFullScreen::createFullScreenStyle):
3486         * rendering/RenderFullScreen.h:
3487
3488 2011-09-04  Abhishek Arya  <inferno@chromium.org>
3489
3490         Unreviewed. Compile fix for r94511.
3491
3492         * dom/Range.cpp:
3493         (WebCore::Range::processContents):
3494         (WebCore::Range::processAncestorsAndTheirSiblings):
3495
3496 2011-09-04  Abhishek Arya  <inferno@chromium.org>
3497
3498         Crash in Range::processAncestorsAndTheirSiblings.
3499         https://bugs.webkit.org/show_bug.cgi?id=67556
3500
3501         Reviewed by Ryosuke Niwa.
3502
3503         Create a temporary RefPtr Node vector to keep all the ancestor's
3504         childs so that we don't access removed child nodes.
3505
3506         Test: fast/dom/Range/range-delete-contents-event-fire-crash.html
3507
3508         * dom/Range.cpp:
3509         (WebCore::Range::processContents):
3510         (WebCore::Range::processAncestorsAndTheirSiblings):
3511
3512 2011-09-04  Jeremy Apthorp  <jeremya@google.com>
3513
3514         Don't detach elements from the render tree when entering fullscreen mode
3515         https://bugs.webkit.org/show_bug.cgi?id=66531
3516
3517         This prevents plugin instances from being destroyed and reinstantiated
3518         when entering fullscreen mode.
3519
3520         Reviewed by Darin Fisher.
3521
3522         Test: plugins/fullscreen-plugins-dont-reload.html
3523
3524         * dom/Document.cpp:
3525         (WebCore::Document::webkitWillEnterFullScreenForElement):
3526         (WebCore::Document::webkitDidExitFullScreenForElement):
3527         * dom/NodeRenderingContext.cpp:
3528         (WebCore::NodeRendererFactory::createRendererIfNeeded):
3529         * rendering/RenderFullScreen.cpp:
3530         (createFullScreenStyle):
3531         (RenderFullScreen::wrapRenderer):
3532         (RenderFullScreen::unwrapRenderer):
3533         * rendering/RenderFullScreen.h:
3534
3535 2011-09-04  Dan Bernstein  <mitz@apple.com>
3536
3537         <rdar://problem/10071256> Retain retired custom fonts until the next style recalc
3538
3539         Reviewed by Darin Adler.
3540
3541         Test: fast/css/font-face-used-after-retired.html
3542
3543         During style recalc, existing renderers may reference their old style, including font data.
3544         Allow them to do so safely by keeping retired custom font data around until after style recalc.
3545
3546         * css/CSSFontFace.cpp:
3547         (WebCore::CSSFontFace::retireCustomFont): Added. Calls through to CSSFontSelector, if the font
3548         face is still part of any segmented font face. Otherwise, deletes the custom font data.
3549         * css/CSSFontFace.h:
3550         * css/CSSFontFaceSource.cpp:
3551         (WebCore::CSSFontFaceSource::pruneTable): Changed to call retireCustomFont() instead of deleting
3552         retired font data.
3553         * css/CSSFontSelector.cpp:
3554         (WebCore::CSSFontSelector::retireCustomFont): Added. Calls through to the Document, if this is
3555         still the active font selector for a document. Otherwise, deletes the custom font data.
3556         * css/CSSFontSelector.h:
3557         * css/CSSSegmentedFontFace.cpp:
3558         (WebCore::CSSSegmentedFontFace::pruneTable): Changed to call retireCustomFont() instead of
3559         deleting retired font data.
3560         * dom/Document.cpp:
3561         (WebCore::Document::~Document): Added a call to deleteRetiredCustomFonts(), in case the Document
3562         is destroyed before getting a chance to recalc style after custom fonts have been retired.
3563         (WebCore::Document::recalcStyle): Added a call to deleteRetiredCustomFonts() after style recalc.
3564         (WebCore::Document::deleteRetiredCustomFonts): Added. Deletes all previously-retired custom font
3565         data.
3566         * dom/Document.h:
3567         (WebCore::Document::retireCustomFont): Added.
3568
3569 2011-09-04  Sam Weinig  <sam@webkit.org>
3570
3571         Document.createEvent should support all the interfaces of Event we got
3572         https://bugs.webkit.org/show_bug.cgi?id=67568
3573
3574         Reviewed by Anders Carlsson.
3575
3576         Updated fast/events/event-creation.html
3577
3578         * dom/BeforeLoadEvent.h:
3579         (WebCore::BeforeLoadEvent::create):
3580         (WebCore::BeforeLoadEvent::BeforeLoadEvent):
3581         Added empty create.
3582         
3583         * dom/Document.cpp:
3584         (WebCore::Document::createEvent):
3585         Add missing interfaces.
3586
3587         * dom/HashChangeEvent.h:
3588         (WebCore::HashChangeEvent::create):
3589         (WebCore::HashChangeEvent::HashChangeEvent):
3590         Added empty create.
3591
3592         * page/SpeechInputEvent.cpp:
3593         (WebCore::SpeechInputEvent::create):
3594         (WebCore::SpeechInputEvent::SpeechInputEvent):
3595         (WebCore::SpeechInputEvent::~SpeechInputEvent):
3596         * page/SpeechInputEvent.h:
3597         Added empty create.
3598
3599 2011-09-04  Adam Barth  <abarth@webkit.org>
3600
3601         [Chromium] Add memory threshold values to WebKitPlatformSupport.h
3602         https://bugs.webkit.org/show_bug.cgi?id=67575
3603
3604         Reviewed by Darin Fisher.
3605
3606         Grab these memory thresholds from PlatformSupport rather than hard-coding them.
3607
3608         * bindings/v8/V8GCController.cpp:
3609         (WebCore::V8GCController::checkMemoryUsage):
3610         * platform/chromium/PlatformSupport.h:
3611         * platform/qt/PlatformSupport.h:
3612         (WebCore::PlatformSupport::lowMemoryUsageMB):
3613         (WebCore::PlatformSupport::highMemoryUsageMB):
3614         (WebCore::PlatformSupport::highUsageDeltaMB):
3615
3616 2011-09-04  Kevin Ollivier  <kevino@theolliviers.com>
3617
3618         [wx] Unreviewed build fix. Add new / moved files missing from last commit.
3619
3620         * platform/wx/LocalDC.h: Added.
3621         (WebCore::LocalDC::LocalDC):
3622         (WebCore::LocalDC::context):
3623         (WebCore::LocalDC::~LocalDC):
3624         * platform/wx/wxcode/cairo: Added.
3625         * platform/wx/wxcode/cairo/non-kerned-drawing.cpp: Added.
3626         (WebCore::pangoFontMap):
3627         (WebCore::createPangoFontForFont):
3628         (WebCore::createScaledFontForFont):
3629         (WebCore::pango_font_get_glyph):
3630         (WebCore::drawTextWithSpacing):
3631         * platform/wx/wxcode/gdiplus: Added.
3632         * platform/wx/wxcode/gdiplus/non-kerned-drawing.cpp: Added.
3633         (dmin):
3634         (dmax):
3635         (DegToRad):
3636         (RadToDeg):
3637         (WebCore::drawTextWithSpacing):
3638
3639 2011-09-04  Robin Dunn  <robin@alldunn.com>
3640
3641         [wx] Enable wxWebKit to run using the wxGC Cairo backend on platforms other than GTK.
3642         https://bugs.webkit.org/show_bug.cgi?id=67577
3643
3644         Reviewed by Kevin Ollivier.
3645
3646         * platform/graphics/GlyphBuffer.h:
3647         (WebCore::GlyphBuffer::glyphAt):
3648         (WebCore::GlyphBuffer::add):
3649         * platform/graphics/wx/GraphicsContextWx.cpp:
3650         (WebCore::GraphicsContext::clipOut):
3651         (WebCore::GraphicsContext::clipPath):
3652         * platform/graphics/wx/PathWx.cpp:
3653         (WebCore::Path::Path):
3654         (WebCore::Path::clear):
3655         * platform/graphics/wx/TransformationMatrixWx.cpp:
3656         (WebCore::TransformationMatrix::operator wxGraphicsMatrix):
3657         (WebCore::AffineTransform::operator wxGraphicsMatrix):
3658         * platform/image-decoders/wx/ImageDecoderWx.cpp:
3659         (WebCore::ImageFrame::asNewNativeImage):
3660         * platform/wx/ContextMenuWx.cpp:
3661         (ContextMenu::ContextMenu):
3662         * platform/wx/LocalDC.h: Added.
3663         (WebCore::LocalDC::LocalDC):
3664         (WebCore::LocalDC::context):
3665         (WebCore::LocalDC::~LocalDC):
3666         * platform/wx/RenderThemeWx.cpp:
3667         (WebCore::RenderThemeWx::paintButton):
3668         (WebCore::RenderThemeWx::paintTextField):
3669         (WebCore::RenderThemeWx::paintMenuList):
3670         (WebCore::RenderThemeWx::paintMenuListButton):
3671         * platform/wx/ScrollbarThemeWx.cpp:
3672         (WebCore::ScrollbarThemeWx::paint):
3673         * platform/wx/wxcode/cairo: Added.
3674         * platform/wx/wxcode/cairo/non-kerned-drawing.cpp: Added.
3675         (WebCore::pangoFontMap):
3676         (WebCore::createPangoFontForFont):
3677         (WebCore::createScaledFontForFont):
3678         (WebCore::pango_font_get_glyph):
3679         (WebCore::drawTextWithSpacing):
3680         * platform/wx/wxcode/gdiplus: Added.
3681         * platform/wx/wxcode/gdiplus/non-kerned-drawing.cpp: Added.
3682         (dmin):
3683         (dmax):
3684         (DegToRad):
3685         (RadToDeg):
3686         (WebCore::drawTextWithSpacing):
3687         * platform/wx/wxcode/gtk/non-kerned-drawing.cpp: Removed.
3688         * platform/wx/wxcode/win/non-kerned-drawing.cpp: Removed.
3689         * platform/wx/wxcode/win/scrollbar_render.cpp:
3690         (GraphicsHDC::GraphicsHDC):
3691         (GraphicsHDC::~GraphicsHDC):
3692         (wxRenderer_DrawScrollbar):
3693
3694 2011-09-03  Laszlo Gombos  <laszlo.1.gombos@nokia.com>
3695
3696         REGRESSION (r86268): Fix for qt_networkAccessAllowed()
3697         https://bugs.webkit.org/show_bug.cgi?id=67570
3698
3699         Reviewed by Noam Rosenthal.
3700
3701         No new tests as this change only removes dead code.
3702         Support for Qt 4.6 has  been removed a while back.
3703
3704         * WebCore.pri:
3705         * WebCore.pro:
3706         * features.pri:
3707         * platform/network/NetworkStateNotifier.h:
3708         * platform/network/qt/NetworkStateNotifierQt.cpp:
3709
3710 2011-09-03  Ryosuke Niwa  <rniwa@webkit.org>
3711
3712         REGRESSION(r94274): selection-change-closes-typing.html fails
3713         https://bugs.webkit.org/show_bug.cgi?id=67377
3714
3715         Reviewed by Kent Tamura.
3716
3717         The problem was that when the shadow DOM is updated by setInnerTextValue, WebKit layer detects the selection
3718         change and calls confirmCompositionWithoutDisturbingSelection, which in turn modifies the shadow DOM by
3719         inserting text.
3720
3721         Fixed the bug by not inserting text in confirmCompositionWithoutDisturbingSelection. It turned out that this
3722         function is only used to cancel composition but never to confirming composition and restoring selection.
3723
3724         Test: platform/mac/editing/input/selection-change-closes-typing-2.html
3725
3726         * editing/Editor.cpp:
3727         (WebCore::Editor::confirmCompositionWithoutDisturbingSelection):
3728         (WebCore::Editor::confirmComposition):
3729
3730 2011-09-03  Sam Weinig  <sam@webkit.org>
3731
3732         Add missing Event constructors to DOMWindow.idl
3733         https://bugs.webkit.org/show_bug.cgi?id=67449
3734
3735         Reviewed by Anders Carlsson.
3736
3737         Covered by existing tests.
3738
3739         * page/DOMWindow.idl:
3740
3741 2011-08-27  Robert Hogan  <robert@webkit.org>
3742
3743         div align="center" rendering problem
3744         https://bugs.webkit.org/show_bug.cgi?id=4860
3745
3746         Reviewed by David Hyatt.
3747
3748         When an inline element with absolute position was the sole or first child of a render block with
3749         centred alignment, it wasn't obeying its parent's alignment. However it would obey the
3750         alignment if it was preceded by some text. The problem was that the element's render object
3751         was getting skipped as leading white space, so it was not included in a normal line block in
3752         a bidi run. Instead, its position was getting set by RenderBlockLineLayout::setStaticPositions()
3753         which does not pay attention to alignment. Preceding the element with some text allowed the object
3754         to get included in a Bidi run and so get a linebox which would get properly aligned.
3755
3756         The fix is to get RenderBlockLineLayout::setStaticPositions() to obey the alignment specified by
3757         the object's container. This allows WebKit to get the same result on the test as Firefox and IE.
3758         Opera has the same bug as unpatched WebKit.
3759
3760         Tests: fast/css/bug4860-absolute-block-child-does-not-inherit-alignment.html
3761                - Ensure positioned block elements inherit alignment.
3762                fast/css/bug4860-absolute-inline-child-inherits-alignment.html
3763                - Ensure positioned inline elements inherit alignment.
3764                fast/inline/absolute-positioned-inline-in-centred-block.html
3765                - Ensure positioned inline element that's the sole or first child of a rendered block
3766                  obeys parents alignment.
3767                fast/inline/absolute-positioned-block-in-centred-block.html
3768                - As above, but a positioned block should not inherit alignment.
3769
3770         * rendering/RenderBlock.h:
3771         * rendering/RenderBlockLineLayout.cpp:
3772         (WebCore::RenderBlock::updateLogicalWidthForAlignment):
3773         (WebCore::RenderBlock::computeInlineDirectionPositionsForLine): Move the alignment check to updateLogicalWidthForAlignment.
3774         (WebCore::setStaticPositions): use startAlignedOffsetForLine and use startAlignedOffsetForBlock
3775         (WebCore::RenderBlock::startAlignedOffsetForLine): New function, find the aligned offset using updateLogicalWidthForAlignment
3776
3777 2011-09-03  Andreas Kling  <kling@webkit.org>
3778
3779         Remove two unused functions from Element.
3780         https://bugs.webkit.org/show_bug.cgi?id=67492
3781
3782         Reviewed by Benjamin Poulain.
3783
3784         Removed openTagStartToString() and setCStringAttribute() as they are
3785         not called from anywhere.
3786
3787         * dom/Element.cpp:
3788         * dom/Element.h:
3789
3790 2011-09-03  Andrew Wason  <rectalogic@rectalogic.com>
3791
3792         [Qt] Enable support for WebGL OES_standard_derivatives for Qt
3793         https://bugs.webkit.org/show_bug.cgi?id=67430
3794
3795         Reviewed by Noam Rosenthal.
3796
3797         Tested using https://cvs.khronos.org/svn/repos/registry/trunk/public/webgl/sdk/tests/conformance/extensions/oes-standard-derivatives.html
3798
3799         Enable existing support for OES_standard_derivatives for Qt.
3800
3801         * platform/graphics/opengl/Extensions3DOpenGL.cpp:
3802         (WebCore::Extensions3DOpenGL::ensureEnabled):
3803         (WebCore::Extensions3DOpenGL::isEnabled):
3804
3805 2011-09-03  Yuta Kitamura  <yutak@chromium.org>
3806
3807         WebSocket: Send ArrayBuffer as WebSocket binary message
3808         https://bugs.webkit.org/show_bug.cgi?id=67477
3809
3810         Reviewed by Kent Tamura.
3811
3812         Tests: http/tests/websocket/tests/hybi/send-arraybuffer.html
3813                http/tests/websocket/tests/hybi/workers/send-arraybuffer.html
3814                http/tests/websocket/tests/hybi/bufferedAmount-after-close.html (updated)
3815
3816         * bindings/js/JSWebSocketCustom.cpp:
3817         (WebCore::JSWebSocket::send):
3818         * bindings/v8/custom/V8WebSocketCustom.cpp:
3819         (WebCore::V8WebSocket::sendCallback):
3820         * websockets/ThreadableWebSocketChannel.h:
3821         * websockets/ThreadableWebSocketChannelClientWrapper.cpp:
3822         (WebCore::ThreadableWebSocketChannelClientWrapper::ThreadableWebSocketChannelClientWrapper):
3823         (WebCore::ThreadableWebSocketChannelClientWrapper::sendRequestResult):
3824         (WebCore::ThreadableWebSocketChannelClientWrapper::setSendRequestResult):
3825         * websockets/ThreadableWebSocketChannelClientWrapper.h:
3826         Rename "sent" to "sendRequestResult" to clarify the meaning. Messages from the script may not
3827         be sent immediately, thus the return value of WebSocketChannel::send() indicates whether the
3828         message has been queued successfully, rather than whether the message has been sent or not.
3829         * websockets/WebSocket.cpp:
3830         (WebCore::WebSocket::send):
3831         Case of sending "[object ArrayBuffer]" is covered by an existing test
3832         http/tests/websocket/tests/{hybi,hixie76}/send-object.html.
3833         * websockets/WebSocket.h:
3834         * websockets/WebSocket.idl:
3835         * websockets/WebSocketChannel.cpp:
3836         (WebCore::WebSocketChannel::send):
3837         * websockets/WebSocketChannel.h:
3838         * websockets/WorkerThreadableWebSocketChannel.cpp:
3839         (WebCore::WorkerThreadableWebSocketChannel::send):
3840         (WebCore::workerContextDidSend):
3841         (WebCore::WorkerThreadableWebSocketChannel::Peer::send):
3842         (WebCore::WorkerThreadableWebSocketChannel::mainThreadSendArrayBuffer):
3843         Construct an ArrayBuffer from the data on Vector<char>.
3844         (WebCore::WorkerThreadableWebSocketChannel::Bridge::send):
3845         Copy the content into temporary buffer of Vector<char>, and send it to the main thread.
3846         * websockets/WorkerThreadableWebSocketChannel.h:
3847
3848 2011-09-02  Kentaro Hara  <haraken@google.com>
3849
3850         Implement a CustomEvent constructor for V8
3851         https://bugs.webkit.org/show_bug.cgi?id=67527
3852
3853         Reviewed by Sam Weinig.
3854
3855         Test: fast/events/constructors/custom-event-constructor.html
3856
3857         * bindings/v8/OptionsObject.h:
3858         (WebCore::OptionsObject::getKeyValue): Returns ScriptValue corresponding to a given key.
3859         * bindings/v8/custom/V8EventConstructors.cpp: Added the CustomEvent constructor.
3860         * dom/CustomEvent.idl: Added a 'V8CustomConstructor' attribute.
3861
3862 2011-09-02  Adrienne Walker  <enne@google.com>
3863
3864         [chromium] Move updateLayers from LayerRendererChromium to CCLayerTreeHost
3865         https://bugs.webkit.org/show_bug.cgi?id=67438
3866
3867         Reviewed by James Robinson.
3868
3869         Covered by existing tests.
3870
3871         Move functionality used by both CCLayerTreeHost and
3872         LayerRendererChromium into CCLayerTreeHostCommon. Move update, paint,
3873         and updateCompositorResource functions into CClayerTreeHost.
3874
3875         * WebCore.gypi:
3876         * platform/graphics/chromium/LayerChromium.cpp:
3877         (WebCore::sortLayers):
3878         * platform/graphics/chromium/LayerChromium.h:
3879         * platform/graphics/chromium/LayerRendererChromium.cpp:
3880         (WebCore::LayerRendererChromium::textureMemoryReclaimLimit):
3881         (WebCore::LayerRendererChromium::drawLayers):
3882         (WebCore::LayerRendererChromium::drawLayersInternal):
3883         * platform/graphics/chromium/LayerRendererChromium.h:
3884         * platform/graphics/chromium/cc/CCLayerImpl.cpp:
3885         (WebCore::sortLayers):
3886         * platform/graphics/chromium/cc/CCLayerImpl.h:
3887         * platform/graphics/chromium/cc/CCLayerTreeHost.cpp:
3888         (WebCore::CCLayerTreeHost::commitTo):
3889         (WebCore::CCLayerTreeHost::updateLayers):
3890         (WebCore::paintContentsIfDirty):
3891         (WebCore::CCLayerTreeHost::paintLayerContents):
3892         (WebCore::CCLayerTreeHost::updateCompositorResources):
3893         * platform/graphics/chromium/cc/CCLayerTreeHost.h:
3894         * platform/graphics/chromium/cc/CCLayerTreeHostCommon.cpp: Added.
3895         (WebCore::CCLayerTreeHostCommon::isScaleOrTranslation):
3896         (WebCore::CCLayerTreeHostCommon::calculateVisibleRect):
3897         (WebCore::CCLayerTreeHostCommon::calculateVisibleLayerRect):
3898         * platform/graphics/chromium/cc/CCLayerTreeHostCommon.h: Added.
3899         (WebCore::CCLayerTreeHostCommon::calculateDrawTransformsAndVisibility):
3900         * platform/graphics/chromium/cc/CCLayerTreeHostImpl.cpp:
3901         * platform/graphics/chromium/cc/CCLayerTreeHostImpl.h:
3902         * platform/graphics/chromium/cc/CCSingleThreadProxy.cpp:
3903         (WebCore::CCSingleThreadProxy::commitIfNeeded):
3904
3905 2011-09-02  Chris Marrin  <cmarrin@apple.com>
3906
3907         https://bugs.webkit.org/show_bug.cgi?id=67510
3908         Crash can occur when doing a PlatformCAAnimation::copy() with no valueFunction
3909
3910         Reviewed by Simon Fraser.
3911         
3912         Do a null check in two places to avoid sending nulls to CACF ValueFunction API.
3913
3914         Test: animations/pause-crash.html
3915
3916         * platform/graphics/ca/win/PlatformCAAnimationWin.cpp:
3917         (PlatformCAAnimation::valueFunction):
3918         (PlatformCAAnimation::setValueFunction):
3919
3920 2011-09-02  Bill Budge  <bbudge@chromium.org>
3921
3922         Add a 'didDownloadData' method to ResourceLoader, SubresourceLoader,
3923         SubresourceLoaderClient, DocumentThreadableLoader, ResourceHandleClient,
3924         and ThreadableLoaderClient for the Chromium port only, so we can pass
3925         these notifications from our ResourceHandle implementation through the
3926         WebCore loader framework.
3927         https://bugs.webkit.org/show_bug.cgi?id=67229
3928
3929         Reviewed by Darin Fisher.
3930
3931         No new tests. Exposes no new functionality.
3932
3933         * WebCore.gypi:
3934         * loader/DocumentThreadableLoader.h:
3935         * loader/ResourceLoader.h:
3936         * loader/SubresourceLoader.h:
3937         * loader/SubresourceLoaderClient.h:
3938         (WebCore::SubresourceLoaderClient::didDownloadData):
3939         * loader/ThreadableLoaderClient.h:
3940         (WebCore::ThreadableLoaderClient::didDownloadData):
3941         * loader/ThreadableLoaderClientWrapper.h:
3942         (WebCore::ThreadableLoaderClientWrapper::didDownloadData):
3943         * loader/chromium: Added.
3944         * loader/chromium/DocumentThreadableLoaderChromium.cpp: Added.
3945         (WebCore::DocumentThreadableLoader::didDownloadData):
3946         * loader/chromium/ResourceLoaderChromium.cpp: Added.
3947         (WebCore::ResourceLoader::didDownloadData):
3948         * loader/chromium/SubresourceLoaderChromium.cpp: Added.
3949         (WebCore::SubresourceLoader::didDownloadData):
3950         * platform/network/ResourceHandleClient.h:
3951         (WebCore::ResourceHandleClient::didDownloadData):
3952
3953 2011-09-02  Jeff Miller  <jeffm@apple.com>
3954
3955         Assert that PlatformCALayerWinInternal::displayCallback() is only called on the main thread
3956         https://bugs.webkit.org/show_bug.cgi?id=67541
3957
3958         Reviewed by Simon Fraser.
3959
3960         No new tests, covered by existing media tests.
3961
3962         * platform/graphics/ca/win/PlatformCALayerWinInternal.cpp:
3963         (PlatformCALayerWinInternal::displayCallback): Assert that is function is only called on the main thread.
3964
3965 2011-09-02  Julien Chaffraix  <jchaffraix@webkit.org>
3966
3967         Enable RenderLayer::updateLayerPosition's cachedOffset optimization for more cases
3968         https://bugs.webkit.org/show_bug.cgi?id=66901
3969
3970         Reviewed by Simon Fraser.
3971
3972         Test: fast/layers/assert-RenderLayer-update-positions.html
3973               Also covered by existing tests under the new ASSERT.
3974
3975         This change extends the range of callers making use of the cachedOffset optimization.
3976
3977         Most callers did not make use of cachedOffset as it did not work when called on a subtree.
3978         This limitation is now gone thus we can enable it more widely.
3979
3980         The semantics of the optimization are changed a bit as we now return if it is enabled whereas
3981         the old code would check if it was *disabled*. Also there were some renames done to match more
3982         closely what was going on (s/cachedOffset/offsetFromRoot/ and s/cachedOffsetDisabled/hasLayerOffset/).
3983
3984         Note that this is an optimistic optimization: if cachedOffset is not used, then we have
3985         done at least an extra traversal up to the root. I have found it to be a wash on file
3986         cycler (alexa) but to be a nice improvement (~20%) on some table benchmarks (modifying
3987         a cell, scrolling).
3988
3989         * page/FrameView.cpp:
3990         (WebCore::FrameView::layout): Extended the use of cachedOffset to subtree layouts.
3991         * rendering/RenderBoxModelObject.cpp:
3992         (WebCore::RenderBoxModelObject::styleDidChange): Forbid the use cachedOffset in this
3993         case as we have only a single layer to update.
3994
3995         * rendering/RenderLayer.cpp:
3996         (WebCore::RenderLayer::computeOffsetFromRoot): Added this function to get the offset from the root
3997         layer at a certain point in the RenderLayer's tree. It gets the root layer's checking if no layer
3998         in between would prevent convertToLayerCoords to work and return the position relative to
3999         this layer.
4000
4001         (WebCore::RenderLayer::updateLayerPositions): Added a new ASSERT to make sure our cachedOffset
4002         is always fine. Also added a comment about calling convertToLayerCoords.
4003
4004         (WebCore::RenderLayer::removeOnlyThisLayer): Added cachedOffset here too as we may have to
4005         update several layers. We save the offset prior to being removed from the hierarchy for
4006         correctness.
4007
4008         (WebCore::RenderLayer::paintChildLayerIntoColumns): Added a comment here about calling convertToLayerCoords.
4009
4010         * rendering/RenderLayer.h: Swapped the argument in updateLayerPositions to make
4011         cachedOffset a mandatory field. Patched al