2011-06-03 Chris Rogers <crogers@google.com>
[WebKit-https.git] / Source / WebCore / ChangeLog
1 2011-06-03  Chris Rogers  <crogers@google.com>
2
3         Reviewed by Kenneth Russell.
4
5         Allow existing AudioParams to use scheduled parameter changes
6         https://bugs.webkit.org/show_bug.cgi?id=62046
7
8         No new tests since audio API is not yet implemented.
9
10         * platform/audio/AudioBus.cpp:
11         (WebCore::AudioBus::processWithGainFrom):
12         (WebCore::AudioBus::copyWithSampleAccurateGainValuesFrom):
13         * platform/audio/AudioBus.h:
14         * webaudio/AudioBufferSourceNode.cpp:
15         (WebCore::AudioBufferSourceNode::AudioBufferSourceNode):
16         * webaudio/AudioGainNode.cpp:
17         (WebCore::AudioGainNode::AudioGainNode):
18         (WebCore::AudioGainNode::process):
19         * webaudio/AudioGainNode.h:
20         * webaudio/HighPass2FilterNode.cpp:
21         (WebCore::HighPass2FilterNode::HighPass2FilterNode):
22         * webaudio/LowPass2FilterNode.cpp:
23         (WebCore::LowPass2FilterNode::LowPass2FilterNode):
24
25 2011-06-03  Chris Rogers  <crogers@google.com>
26
27         Reviewed by Kenneth Russell.
28
29         Biquad filter coefficient naming is incorrect
30         https://bugs.webkit.org/show_bug.cgi?id=62053
31
32         No new tests since audio API is not yet implemented.
33
34         * platform/audio/Biquad.cpp:
35         (WebCore::Biquad::Biquad):
36         (WebCore::Biquad::process):
37         (WebCore::Biquad::processFast):
38         (WebCore::Biquad::setLowpassParams):
39         (WebCore::Biquad::setHighpassParams):
40         (WebCore::Biquad::setLowShelfParams):
41         (WebCore::Biquad::setZeroPolePairs):
42         * platform/audio/Biquad.h:
43
44 2011-06-03  Adam Barth  <abarth@webkit.org>
45
46         Reviewed by Eric Seidel.
47
48         DOMWindow::setLocation doesn't understand that DOMWindow can be inactive
49         https://bugs.webkit.org/show_bug.cgi?id=62057
50
51         This code gets confused when dealing with inactive DOMWindows.  We
52         should just block inactive DOMWindows because there's no compatibility
53         reason to support them in this code path.
54
55         Test: http/tests/security/xss-DENIED-contentWindow-eval.html
56
57         * page/DOMWindow.cpp:
58         (WebCore::DOMWindow::isInsecureScriptAccess):
59
60 2011-05-31  Martin Robinson  <mrobinson@igalia.com>
61
62         Reviewed by Ryosuke Niwa.
63
64         [GTK] Support smart replace for the pasteboard
65         https://bugs.webkit.org/show_bug.cgi?id=61734
66
67         Add smart replace support to WebCore and add hooks for it in WebKit
68         via DumpRenderTreeSupportGtk. When a platform supports smart replace,
69         WebCore will remove extra spaces that appear when pasting text. Eventually
70         WebKitGTK+ may want to expose this in the public API.
71
72         * platform/gtk/PasteboardGtk.cpp:
73         (WebCore::Pasteboard::writeSelection): Now pass whether or not to use smart replace
74         when calling writeSelection.
75         (WebCore::Pasteboard::canSmartReplace): Added an implementation that checks the clipboard
76         for whether or not it supports smart paste.
77         * platform/gtk/PasteboardHelper.cpp:
78         (WebCore::initGdkAtoms): Added initialization for smart replace atom.
79         (WebCore::PasteboardHelper::fillSelectionData): Added no-op handler for smart replace atom.
80         (WebCore::PasteboardHelper::targetListForDataObject): Properly handle new smart replace parameter.
81         (WebCore::PasteboardHelper::writeClipboardContents): Properly handle new smart replace parameter.
82         (WebCore::PasteboardHelper::clipboardContentSupportsSmartReplace): Added helper for Pasteboard.
83         * platform/gtk/PasteboardHelper.h: Add new method definition.
84
85 2011-06-03  Levi Weintraub  <leviw@chromium.org>
86
87         Reviewed by Eric Seidel.
88
89         Switch paintCell to use IntPoint
90         https://bugs.webkit.org/show_bug.cgi?id=62033
91
92         Switching paintCell to take an IntPoint representing the paint offset
93         instead of a pair of ints.
94
95         No new tests since this is simple refactoring.
96
97         * rendering/RenderTableSection.cpp:
98         (WebCore::RenderTableSection::paintCell):
99         (WebCore::RenderTableSection::paintObject):
100         * rendering/RenderTableSection.h:
101
102 2011-06-03  Martin Robinson  <mrobinson@igalia.com>
103
104         Reviewed by Dimitri Glazkov.
105
106         Teach Gtk build about window.internals
107         https://bugs.webkit.org/show_bug.cgi?id=61071
108
109         * GNUmakefile.am: Add new internals directories to the VPATH
110         (for idl processing) and the include list.
111
112 2011-06-03  Levi Weintraub  <leviw@chromium.org>
113
114         Reviewed by Eric Seidel.
115
116         Switch paintBackgroundsBehindCell to use IntPoint
117         https://bugs.webkit.org/show_bug.cgi?id=62031
118
119         Switching paintBackgroundsBehindCell to take an IntPoint representing
120         the paint offset instead of a pair of ints.
121
122         No new tests as this is simple refactoring.
123
124         * rendering/RenderTableCell.cpp:
125         (WebCore::RenderTableCell::paintBackgroundsBehindCell):
126         (WebCore::RenderTableCell::paintBoxDecorations):
127         * rendering/RenderTableCell.h:
128         * rendering/RenderTableRow.cpp:
129         (WebCore::RenderTableRow::paint):
130         * rendering/RenderTableSection.cpp:
131         (WebCore::RenderTableSection::paintCell):
132
133 2011-06-03  Levi Weintraub  <leviw@chromium.org>
134
135         Reviewed by Eric Seidel.
136
137         Switch paintCaret and paintDragCaret to use IntPoint
138         https://bugs.webkit.org/show_bug.cgi?id=62037
139
140         Switching paintCaret and paintDragCaret to use an IntPoint representing
141         the paint offset instead of a pair of ints.
142
143         No new tests since this is simple refactoring.
144
145         * editing/FrameSelection.cpp:
146         (WebCore::FrameSelection::paintCaret):
147         (WebCore::CaretBase::paintCaret):
148         (WebCore::DragCaretController::paintDragCaret):
149         * editing/FrameSelection.h:
150         * rendering/RenderBlock.cpp:
151         (WebCore::RenderBlock::paintCaret):
152         (WebCore::RenderBlock::paintObject):
153         (WebCore::RenderBlock::positionForPoint):
154         (WebCore::RenderBlock::offsetForContents):
155         * rendering/RenderBlock.h:
156
157 2011-06-03  Levi Weintraub  <leviw@chromium.org>
158
159         Reviewed by Eric Seidel.
160
161         Switch paintItemForeground and paintItemForeground to use IntPoint
162         https://bugs.webkit.org/show_bug.cgi?id=62035
163
164         Switching paintItemFore/Background to use IntPoint instead of a pair of ints.
165
166         No new tests since this is simple refactoring.
167
168         * rendering/RenderListBox.cpp:
169         (WebCore::RenderListBox::paintObject):
170         (WebCore::RenderListBox::paintItemForeground):
171         (WebCore::RenderListBox::paintItemBackground):
172         * rendering/RenderListBox.h:
173
174 2011-06-03  Alexis Menard  <alexis.menard@openbossa.org>
175
176         Reviewed by Andreas Kling.
177
178         To support building namespaced Qt, we require that forward-declarations
179         of Qt classes be wrapped in QT_BEGIN_NAMESPACE and QT_END_NAMESPACE.
180
181         * platform/network/qt/QtMIMETypeSniffer.h:
182
183 2011-06-03  Rob Buis  <rbuis@rim.com>
184
185         Reviewed by Nikolas Zimmermann.
186
187         Cleanup member variable usage in svg/animation classes
188         https://bugs.webkit.org/show_bug.cgi?id=62029
189
190         Cleanup member variables.
191
192         * svg/animation/SMILTimeContainer.cpp:
193         (WebCore::SMILTimeContainer::SMILTimeContainer):
194         (WebCore::SMILTimeContainer::sampleAnimationAtTime):
195         (WebCore::SMILTimeContainer::updateAnimations):
196         * svg/animation/SMILTimeContainer.h:
197         * svg/animation/SVGSMILElement.cpp:
198         (WebCore::SVGSMILElement::SVGSMILElement):
199         * svg/animation/SVGSMILElement.h:
200
201 2011-06-03  Chris Rogers  <crogers@google.com>
202
203         Reviewed by Kenneth Russell.
204
205         Add AudioParam parameter scheduling implementation
206         https://bugs.webkit.org/show_bug.cgi?id=61830
207
208         No new tests since audio API is not yet implemented.
209
210         * WebCore.gypi:
211         * WebCore.xcodeproj/project.pbxproj:
212         * webaudio/AudioParam.cpp:
213         (WebCore::AudioParam::value):
214         (WebCore::AudioParam::smoothedValue):
215         (WebCore::AudioParam::smooth):
216         (WebCore::AudioParam::calculateSampleAccurateValues):
217         * webaudio/AudioParam.h:
218         (WebCore::AudioParam::setContext):
219         (WebCore::AudioParam::context):
220         (WebCore::AudioParam::setValueAtTime):
221         (WebCore::AudioParam::linearRampToValueAtTime):
222         (WebCore::AudioParam::exponentialRampToValueAtTime):
223         (WebCore::AudioParam::setTargetValueAtTime):
224         (WebCore::AudioParam::setValueCurveAtTime):
225         (WebCore::AudioParam::cancelScheduledValues):
226         (WebCore::AudioParam::hasTimelineValues):
227         * webaudio/AudioParam.idl:
228         * webaudio/AudioParamTimeline.cpp: Added.
229         (WebCore::AudioParamTimeline::setValueAtTime):
230         (WebCore::AudioParamTimeline::linearRampToValueAtTime):
231         (WebCore::AudioParamTimeline::exponentialRampToValueAtTime):
232         (WebCore::AudioParamTimeline::setTargetValueAtTime):
233         (WebCore::AudioParamTimeline::setValueCurveAtTime):
234         (WebCore::isValidNumber):
235         (WebCore::AudioParamTimeline::insertEvent):
236         (WebCore::AudioParamTimeline::cancelScheduledValues):
237         (WebCore::AudioParamTimeline::valueForContextTime):
238         (WebCore::AudioParamTimeline::valuesForTimeRange):
239         (WebCore::timeToSampleFrame):
240         (WebCore::AudioParamTimeline::valuesForTimeRangeImpl):
241         * webaudio/AudioParamTimeline.h: Added.
242         (WebCore::AudioParamTimeline::AudioParamTimeline):
243         (WebCore::AudioParamTimeline::hasValues):
244         (WebCore::AudioParamTimeline::ParamEvent::ParamEvent):
245         (WebCore::AudioParamTimeline::ParamEvent::type):
246         (WebCore::AudioParamTimeline::ParamEvent::value):
247         (WebCore::AudioParamTimeline::ParamEvent::time):
248         (WebCore::AudioParamTimeline::ParamEvent::timeConstant):
249         (WebCore::AudioParamTimeline::ParamEvent::duration):
250         (WebCore::AudioParamTimeline::ParamEvent::curve):
251
252 2011-06-01  Jer Noble  <jer.noble@apple.com>
253
254         Reviewed by Simon Fraser.
255
256         Flash of broken page when exiting full screen at jerryseinfeld.com
257         https://bugs.webkit.org/show_bug.cgi?id=61897
258         <rdar://problem/9522985>
259
260         Test: fullscreen/full-screen-placeholder.html
261
262         Entering full-screen mode is causing the page layout to change because the full-screen
263         element is taken out of the normal flow.  To counteract this effect, insert a placeholder
264         block as a parent of the full-screen renderer with the same size and style as the full-screen
265         element pre-full-screen.
266
267         Only create a placeholder for block-level elements; the technique required for inline elements
268         would be vastly more complicated.
269
270         * dom/Document.cpp:
271         (WebCore::Document::webkitWillEnterFullScreenForElement): Create a placeholder
272             based on the size and style of the full-screen element.
273         (WebCore::Document::setFullScreenRenderer): Persist the placeholder size and 
274             style across new renderers.
275         * rendering/RenderFullScreen.cpp:
276         (RenderFullScreen::RenderFullScreen): Added ivar.
277         (RenderFullScreen::destroy): Make sure to safely destroy our placeholder.
278         (RenderFullScreen::createPlaceholder): Added.
279         * rendering/RenderFullScreen.h:
280         (WebCore::RenderFullScreen::placeholder): Ivar accessor.
281
282 2011-06-03  Levi Weintraub  <leviw@chromium.org>
283
284         Reviewed by Eric Seidel.
285
286         Switch paintBoxDecorations to IntPoint
287         https://bugs.webkit.org/show_bug.cgi?id=61968
288
289         Switching paintBoxDecorations to take an IntPoint representing
290         the paint offset instead of a pair of ints. Also cleaning up
291         some duplicated code in InlineFlowBox related to constraining
292         the paint rect to the linetop and linebottom.
293
294         No new tests since this is just refactoring.
295
296         * rendering/InlineFlowBox.cpp:
297         (WebCore::InlineFlowBox::paint):
298         (WebCore::InlineFlowBox::constrainToLineTopAndBottomIfNeeded): Added
299         to remove duplicate code in paintBoxDecorations and paintMask.
300         (WebCore::InlineFlowBox::paintBoxDecorations):
301         (WebCore::InlineFlowBox::paintMask):
302         * rendering/InlineFlowBox.h:
303         * rendering/RenderBlock.cpp:
304         (WebCore::RenderBlock::paintObject):
305         * rendering/RenderBox.cpp:
306         (WebCore::RenderBox::paintBoxDecorations):
307         * rendering/RenderBox.h:
308         * rendering/RenderFieldset.cpp:
309         (WebCore::RenderFieldset::paintBoxDecorations):
310         * rendering/RenderFieldset.h:
311         * rendering/RenderReplaced.cpp:
312         (WebCore::RenderReplaced::paint):
313         * rendering/RenderTable.cpp:
314         (WebCore::RenderTable::paintObject):
315         (WebCore::RenderTable::paintBoxDecorations):
316         * rendering/RenderTable.h:
317         * rendering/RenderTableCell.cpp:
318         (WebCore::RenderTableCell::paintBoxDecorations):
319         * rendering/RenderTableCell.h:
320         * rendering/RenderView.cpp:
321         (WebCore::RenderView::paintBoxDecorations):
322         * rendering/RenderView.h:
323         * rendering/RenderWidget.cpp:
324         (WebCore::RenderWidget::paint):
325         * rendering/svg/RenderSVGRoot.cpp:
326         (WebCore::RenderSVGRoot::paint):
327
328 2011-06-03  Doreen Jiang  <doreen.jiang@nokia.com>
329
330         Reviewed by Benjamin Poulain.
331
332         [Qt]The minimum size of the select menu list is incorrect for qtwebkit
333         https://bugs.webkit.org/show_bug.cgi?id=56752
334
335         The minimum width of the select-box is calculated to be as small as possible 
336         instead of hardcoded value (width of 7 characters) in minimumMenuListSize() function
337         This will avoid overapping the select lists in popular websites.
338
339         Test: fast/forms/selectlist-minsize.html
340
341         * platform/qt/RenderThemeQt.cpp:
342         (WebCore::RenderThemeQt::minimumMenuListSize):
343
344 2011-06-02  Dimitri Glazkov  <dglazkov@chromium.org>
345
346         Reviewed by Darin Adler.
347
348         Prevent event dispatch for events with related target when host is the target.
349         https://bugs.webkit.org/show_bug.cgi?id=61979
350
351         Turns out, even if we trim the ancestor chain to 0, the event is still dispatched during AT_TARGET.
352         So might as well be explicit about what we are trying to do and add a flag to prevent dispatch in these cases.
353
354         * dom/EventDispatcher.cpp:
355         (WebCore::EventDispatcher::adjustToShadowBoundaries): Added preventing dispatch when the ancestor chain is trimmed to nothing.
356         (WebCore::EventDispatcher::EventDispatcher): Added initializer.
357         (WebCore::EventDispatcher::dispatchEvent): Added a check to prevent dispatch.
358         * dom/EventDispatcher.h: Added a def.
359
360 2011-06-03  Dan Bernstein  <mitz@apple.com>
361
362         Mac build fix.
363
364         * WebCore.xcodeproj/project.pbxproj:
365
366 2011-06-03  Naoki Takano  <takano.naoki@gmail.com>
367
368         Reviewed by Eric Seidel.
369
370         [Chromium] Call setToolTipText() in WebPopupMenuImpl mouse move handler to show tool tip in select popup window.
371         https://bugs.webkit.org/show_bug.cgi?id=61260
372         http://code.google.com/p/chromium/issues/detail?id=12721
373
374         Manual test: select-popup-tooltip-test.html
375
376         * manual-tests/select-popup-tooltip-test.html: Added.
377         * platform/chromium/PopupMenuChromium.cpp:
378         (WebCore::PopupContainer::getSelectedItemToolTip): Get selected item tooltip string according to hovering mouse position.
379         * platform/chromium/PopupMenuChromium.h: Add getSelectedItemToolTip() declaration.
380
381 2011-06-03  Rob Buis  <rbuis@rim.com>
382
383         Reviewed by Nikolas Zimmermann.
384
385         Creating <animateMotion> elements via javascript do not execute
386         https://bugs.webkit.org/show_bug.cgi?id=34301
387
388         Enable constructors for SVGMPathElement and SVGAnimateMotionElement.
389
390         * DerivedSources.cpp:
391         * DerivedSources.make:
392         * GNUmakefile.list.am:
393         * WebCore.gypi:
394         * WebCore.vcproj/WebCore.vcproj:
395         * WebCore.xcodeproj/project.pbxproj:
396         * page/DOMWindow.idl:
397
398 2011-06-03  Hans Wennborg  <hans@chromium.org>
399
400         Reviewed by Steve Block.
401
402         IndexedDB: Clean-up use of INT64_MAX in LevelDB back-end
403         https://bugs.webkit.org/show_bug.cgi?id=62009
404
405         This constant should only be needed inside IDBLevelDBCoding.cpp.
406
407         No new functionality, no new tests.
408
409         * storage/IDBLevelDBBackingStore.cpp:
410         (WebCore::getNewDatabaseId):
411         (WebCore::IDBLevelDBBackingStore::getObjectStores):
412         (WebCore::getNewObjectStoreId):
413         (WebCore::IDBLevelDBBackingStore::deleteObjectStore):
414         (WebCore::getNewIndexId):
415         * storage/IDBLevelDBCoding.cpp:
416         (WebCore::IDBLevelDBCoding::DatabaseFreeListKey::encodeMaxKey):
417         (WebCore::IDBLevelDBCoding::ObjectStoreMetaDataKey::encodeMaxKey):
418         (WebCore::IDBLevelDBCoding::IndexMetaDataKey::encodeMaxKey):
419         (WebCore::IDBLevelDBCoding::ObjectStoreFreeListKey::encodeMaxKey):
420         (WebCore::IDBLevelDBCoding::IndexFreeListKey::encodeMaxKey):
421         * storage/IDBLevelDBCoding.h:
422
423 2011-06-03  Siddharth Mathur  <siddharth.mathur@nokia.com>
424
425         Reviewed by Benjamin Poulain.
426
427         [Qt] Build flag for experimental ICU library support
428         https://bugs.webkit.org/show_bug.cgi?id=60786
429
430         Adds a build-time flag (CONFIG+=use_system_icu) that enables experimental 
431         ICU powered Unicode support. 
432
433         No new tests as no new features added.
434
435         * WebCore.pri: Removed text_breaking_with_icu CONFIG flag. 
436         * WebCore.pro: Added TextCodecICU.cpp and qt/TextBreakIteratorInternalICUQt.cpp.
437         * editing/qt/SmartReplaceQt.cpp:
438         * features.pri: Support for use_system_icu CONFIG flag.
439         * platform/text/TextCodecICU.cpp: Guard with USE(ICU_UNICODE). 
440         * platform/text/qt/TextBreakIteratorInternalICUQt.cpp: Added.
441         (WebCore::Q_GLOBAL_STATIC_WITH_INITIALIZER):
442         (WebCore::currentSearchLocaleID):
443         (WebCore::currentTextBreakLocaleID):
444         * platform/text/qt/TextBreakIteratorQt.cpp: Moved out currentTextBreakLocaleID(). 
445         (WebCore::isTextBreak):
446         * platform/text/qt/TextCodecQt.cpp: Guard with USE(QT4_UNICODE). 
447         (WebCore::TextCodecQt::registerEncodingNames):
448         (WebCore::TextCodecQt::registerCodecs):
449
450 2011-06-03  Yael Aharon  <yael.aharon@nokia.com>
451
452         Reviewed by Kenneth Rohde Christiansen.
453
454         Frame flattening is broken with nested frames
455         https://bugs.webkit.org/show_bug.cgi?id=61491
456
457         Do not flatten offscreen iframes during frame flattening, as flattening might make them visible.
458
459         Test: fast/frames/flattening/iframe-flattening-out-of-view.html
460               fast/frames/flattening/iframe-flattening-out-of-view-and-scroll.html
461               fast/frames/flattening/iframe-flattening-out-of-view-scroll-and-relayout.html
462
463         * rendering/RenderIFrame.cpp:
464         (WebCore::RenderIFrame::flattenFrame):
465
466 2011-06-03  Nikolas Zimmermann  <nzimmermann@rim.com>
467
468         Reviewed by Andreas Kling.
469
470         Incorrect embedded document replaced size calculation for box-sizing: border-box
471         https://bugs.webkit.org/show_bug.cgi?id=62007
472
473         When using <object style="box-sizing: border-box" data="foo.svg"/> to embed foo.svg
474         which has an intrinsic width/height, the embedded document intrinsic size is incorrect.
475
476         RenderPart::computeEmbeddedDocumentReplacedWidth/Height has to ask the content renderer for the replaced width/height not ourselves.
477
478         Tests: svg/as-image/img-preserveAspectRatio-support-2.html
479                svg/as-object/object-box-sizing-no-width-height.html
480
481         * rendering/RenderPart.cpp:
482         (WebCore::RenderPart::computeEmbeddedDocumentReplacedWidth):
483         (WebCore::RenderPart::computeEmbeddedDocumentReplacedHeight):
484
485 2011-06-03  Sheriff Bot  <webkit.review.bot@gmail.com>
486
487         Unreviewed, rolling out r88004.
488         http://trac.webkit.org/changeset/88004
489         https://bugs.webkit.org/show_bug.cgi?id=62008
490
491         This patch broke 4 tests in the GTK bots (Requested by
492         msanchez on #webkit).
493
494         * accessibility/gtk/AXObjectCacheAtk.cpp:
495         (WebCore::AXObjectCache::handleScrolledToAnchor):
496
497 2011-06-03  Nikolas Zimmermann  <nzimmermann@rim.com>
498
499         Reviewed by Andreas Kling.
500
501         Zooming <object style="width/height: auto" data="foo.svg"/> doesn't work as expected
502         https://bugs.webkit.org/show_bug.cgi?id=62005
503
504         Zooming an object with auto size, that references a svg with fixed size was broken. The svg size stayed the same.
505         Get rid of the dependency between RenderSVGRoot and SVGSVGElement::currentScale(), always ask for the effective
506         zoom in the RenderStyle instead of asking SVGSVGElement.
507
508         The SVGSVGElement::currentScale()/setCurrentScale() methods are now only used when called from the bindings (eg. JS).
509         They only take effect on the outermost <svg> element in standalone documents, otherwhise they are no-ops.
510
511         Test: svg/zoom/page/zoom-svg-through-object-with-auto-size.html
512
513         * rendering/svg/RenderSVGRoot.cpp:
514         (WebCore::RenderSVGRoot::computeIntrinsicWidth):
515         (WebCore::RenderSVGRoot::computeIntrinsicHeight):
516         (WebCore::RenderSVGRoot::localToBorderBoxTransform):
517         * svg/SVGSVGElement.cpp:
518         (WebCore::SVGSVGElement::SVGSVGElement):
519         (WebCore::SVGSVGElement::currentScale):
520         (WebCore::SVGSVGElement::setCurrentScale):
521         * svg/SVGSVGElement.h:
522
523 2011-06-03  Mario Sanchez Prada  <msanchez@igalia.com>
524
525         Reviewed by Martin Robinson.
526
527         Focus and caret position should be updated when same-page links are followed
528         https://bugs.webkit.org/show_bug.cgi?id=59737
529
530         Update the caret position to the anchor's position after scrolling.
531
532         This behavior is specific to the Gtk port and requested because of
533         accessibility needs, that's why it's implemented in AXObjectCache.
534
535         Test: platform/gtk/accessibility/caret-browsing-anchor-followed.html
536
537         * accessibility/gtk/AXObjectCacheAtk.cpp:
538         (WebCore::AXObjectCache::handleScrolledToAnchor): Make sure the
539         caret is updated to be in the anchor's position after scrolling.
540
541 2011-06-03  Dominic Cooney  <dominicc@chromium.org>
542
543         Reviewed by Kent Tamura.
544
545         Cloned keygen shadows should have -webkit-keygen-select pseudoclass.
546         https://bugs.webkit.org/show_bug.cgi?id=61984
547
548         When cloneNode's tag name-based cloning algorithm clones the
549         KeygenSelectElements of a keygen shadow as select elements. These
550         lack the -webkit-keygen-select pseudoclass.
551
552         Test: fast/html/clone-keygen.html
553
554         * html/HTMLKeygenElement.cpp:
555         (WebCore::KeygenSelectElement::cloneElementWithoutAttributesAndChildren): Create a KeygenSelectElement when being cloned.
556
557 2011-06-02  MORITA Hajime  <morrita@google.com>
558         
559         Unreviewed ChangeLog fix.
560         
561 2011-06-03  Peter Varga  <pvarga@webkit.org>
562
563         Rubber-stamped by Csaba Osztrogonác.
564         
565         [Qt][V8] Buildfix after r87988.
566
567         No new tests needed.
568
569         * bindings/v8/ScheduledAction.cpp: Add missing guards.
570         (WebCore::ScheduledAction::execute):
571         * bindings/v8/V8EventListener.cpp: Ditto.
572         (WebCore::V8EventListener::callListenerFunction):
573
574 2011-06-03  Dominic Cooney  <dominicc@chromium.org>
575
576         Reviewed by Kent Tamura.
577
578         Cloned range input sliders should be SliderThumbElements, not divs.
579         https://bugs.webkit.org/show_bug.cgi?id=61982
580
581         Test: fast/html/clone-range.html
582
583         * html/shadow/SliderThumbElement.h:
584         (WebCore::SliderThumbElement::cloneElementWithoutAttributesAndChildren): Create a SliderThumbElement when being cloned.
585
586 2011-06-02  Yury Semikhatsky  <yurys@chromium.org>
587
588         Reviewed by Pavel Feldman.
589
590         Web Inspector: add an option for automatically attaching to new workers
591         https://bugs.webkit.org/show_bug.cgi?id=61930
592
593         Worker list is extended with a checkbox that makes inspector attach to each
594         new worker. Whenever a new worker context starts a new inspector window will
595         be opened for it.
596
597         Also worker agent and worker list will be updated when worker context is terminated.
598
599         * inspector/Inspector.json:
600         * inspector/InspectorController.cpp:
601         (WebCore::InspectorController::InspectorController):
602         * inspector/InspectorInstrumentation.cpp:
603         (WebCore::InspectorInstrumentation::workerContextTerminatedImpl):
604         * inspector/InspectorInstrumentation.h:
605         (WebCore::InspectorInstrumentation::workerContextTerminated):
606         * inspector/InspectorWorkerAgent.cpp:
607         (WebCore::InspectorWorkerAgent::WorkerFrontendChannel::~WorkerFrontendChannel):
608         (WebCore::InspectorWorkerAgent::create):
609         (WebCore::InspectorWorkerAgent::InspectorWorkerAgent):
610         (WebCore::InspectorWorkerAgent::clearFrontend):
611         (WebCore::InspectorWorkerAgent::setAutoconnectToWorkers):
612         (WebCore::InspectorWorkerAgent::didStartWorkerContext):
613         (WebCore::InspectorWorkerAgent::workerContextTerminated):
614         * inspector/InspectorWorkerAgent.h:
615         * inspector/front-end/WorkerManager.js:
616         (WebInspector.WorkerManager.prototype._workerCreated):
617         (WebInspector.WorkerManager.prototype._workerTerminated):
618         (WebInspector.WorkerManager.prototype.openWorkerInspector):
619         (WebInspector.WorkerManager.prototype._openInspectorWindow):
620         (WebInspector.WorkerManager.prototype.reset):
621         (WebInspector.WorkerMessageForwarder.prototype.workerCreated):
622         (WebInspector.WorkerMessageForwarder.prototype.workerTerminated):
623         * inspector/front-end/WorkersSidebarPane.js:
624         (WebInspector.WorkerListSidebarPane):
625         (WebInspector.WorkerListSidebarPane.prototype._workerAdded):
626         (WebInspector.WorkerListSidebarPane.prototype._workerRemoved):
627         (WebInspector.WorkerListSidebarPane.prototype._workersCleared):
628         (WebInspector.WorkerListSidebarPane.prototype._addWorker):
629         (WebInspector.WorkerListSidebarPane.prototype._workerItemClicked):
630         (WebInspector.WorkerListSidebarPane.prototype._autoattachToWorkersClicked):
631         * inspector/front-end/inspector.js:
632         (WebInspector.reset):
633
634 2011-06-02  Hayato Ito  <hayato@chromium.org>
635
636         Reviewed by Ryosuke Niwa.
637
638         Show a shadow root node itself in Node::traverseNextNodeAcrossFrame.
639         https://bugs.webkit.org/show_bug.cgi?id=61992
640
641         It's better to show a shadow root node itself for debugging.
642         Skipping it didn't add any values.
643
644         No new tests since the function is only available in debug builds.
645
646         * dom/Node.cpp:
647         (WebCore::traverseNextNodeAcrossFrame):
648
649 2011-06-02  James Robinson  <jamesr@chromium.org>
650
651         Unreviewed, rolling out r87901.
652         http://trac.webkit.org/changeset/87901
653         https://bugs.webkit.org/show_bug.cgi?id=61894
654
655         Might be responsible for performance regression on Chromium page cyclers, reverting to see...
656
657         * loader/DocumentLoader.h:
658         (WebCore::DocumentLoader::didTellClientAboutLoad):
659         (WebCore::DocumentLoader::haveToldClientAboutLoad):
660         * loader/FrameLoader.cpp:
661         (WebCore::FrameLoader::loadedResourceFromMemoryCache):
662         * loader/ResourceLoadNotifier.cpp:
663         (WebCore::ResourceLoadNotifier::dispatchWillSendRequest):
664
665 2011-06-02  Levi Weintraub  <leviw@chromium.org>
666
667         Reviewed by Eric Seidel.
668
669         Switch paintReplaced to use IntPoint
670         https://bugs.webkit.org/show_bug.cgi?id=61891
671
672         Switching paintReplaced to use IntPoint to represent the paint offset instead
673         of a pair of ints.
674
675         Also renaming the IntPoint flavor of IntRect::move to moveBy to clear up the
676         fact that the IntPoint is added as an offset as opposed to being relocated
677         to that point.
678
679         No tests because this is just a refactoring.
680
681         * page/FrameView.cpp:
682         (WebCore::FrameView::invalidateScrollbarRect):
683         (WebCore::FrameView::convertFromRenderer):
684         (WebCore::FrameView::convertToRenderer):
685         * platform/ScrollView.cpp:
686         (WebCore::ScrollView::wheelEvent):
687         * platform/ScrollbarThemeComposite.cpp:
688         (WebCore::ScrollbarThemeComposite::invalidatePart):
689         * platform/graphics/gpu/Texture.cpp
690         (WebCore::Texture::updateSubRect)
691         * platform/graphics/IntRect.h:
692         (WebCore::IntRect::moveBy):
693         * platform/mac/WidgetMac.mm:
694         (WebCore::Widget::paint):
695         * rendering/InlineFlowBox.cpp:
696         (WebCore::InlineFlowBox::paint):
697         * rendering/RenderBlock.cpp:
698         (WebCore::RenderBlock::logicalRectToPhysicalRect):
699         (WebCore::RenderBlock::selectionGaps):
700         * rendering/RenderBox.cpp:
701         (WebCore::RenderBox::offsetFromContainer):
702         (WebCore::RenderBox::computeRectForRepaint):
703         (WebCore::RenderBox::localCaretRect):
704         * rendering/RenderDetailsMarker.cpp:
705         (WebCore::RenderDetailsMarker::paint):
706         * rendering/RenderEmbeddedObject.cpp:
707         (WebCore::RenderEmbeddedObject::paintReplaced):
708         * rendering/RenderEmbeddedObject.h:
709         * rendering/RenderHTMLCanvas.cpp:
710         (WebCore::RenderHTMLCanvas::paintReplaced):
711         * rendering/RenderHTMLCanvas.h:
712         * rendering/RenderImage.cpp:
713         (WebCore::RenderImage::paintReplaced):
714         * rendering/RenderImage.h:
715         * rendering/RenderInline.cpp:
716         (WebCore::RenderInline::culledInlineVisualOverflowBoundingBox):
717         * rendering/RenderLayer.cpp:
718         (WebCore::expandClipRectForDescendantsAndReflection):
719         (WebCore::RenderLayer::paintScrollCorner):
720         (WebCore::RenderLayer::paintResizer):
721         (WebCore::RenderLayer::paintChildLayerIntoColumns):
722         (WebCore::RenderLayer::hitTestChildLayerColumns):
723         (WebCore::RenderLayer::boundingBox):
724         (WebCore::RenderLayer::setBackingNeedsRepaintInRect):
725         * rendering/RenderLayerBacking.cpp:
726         (WebCore::RenderLayerBacking::updateGraphicsLayerGeometry):
727         (WebCore::paintScrollbar):
728         (WebCore::RenderLayerBacking::paintContents):
729         * rendering/RenderLayerCompositor.cpp:
730         (WebCore::RenderLayerCompositor::calculateCompositedBounds):
731         (WebCore::RenderLayerCompositor::layerWillBeRemoved):
732         (WebCore::paintScrollbar):
733         (WebCore::RenderLayerCompositor::paintContents):
734         * rendering/RenderListBox.cpp:
735         (WebCore::RenderListBox::controlClipRect):
736         * rendering/RenderListItem.cpp:
737         (WebCore::RenderListItem::positionListMarker):
738         * rendering/RenderListMarker.cpp:
739         (WebCore::RenderListMarker::paint):
740         * rendering/RenderReplaced.cpp:
741         (WebCore::RenderReplaced::paint):
742         * rendering/RenderReplaced.h:
743         (WebCore::RenderReplaced::paintReplaced):
744         * rendering/RenderTableCell.cpp:
745         (WebCore::RenderTableCell::computeRectForRepaint):
746         * rendering/RenderTextControlSingleLine.cpp:
747         (WebCore::RenderTextControlSingleLine::controlClipRect):
748         * rendering/RenderVideo.cpp:
749         (WebCore::RenderVideo::paintReplaced):
750         * rendering/RenderVideo.h:
751         * rendering/RenderView.cpp:
752         (WebCore::RenderView::repaintViewRectangle):
753
754 2011-06-02  James Robinson  <jamesr@chromium.org>
755
756         Reviewed by Dimitri Glazkov.
757
758         [chromium][V8] Add trace events for timer fires and event listener dispatches
759         https://bugs.webkit.org/show_bug.cgi?id=61977
760
761         Adds TRACE_EVENT macro around timer and event listener dispatches.  When tracing (a chromium feature) is
762         enabled, this allows correlating these events with painting, compositing, and everything else in chromium that
763         is traced.  When tracing is disabled, this macro does nothing useful.  Trace points are very cheap when tracing
764         is disabled so this should have no performance impact for non-developers.
765
766         * bindings/v8/ScheduledAction.cpp:
767         (WebCore::ScheduledAction::execute):
768         * bindings/v8/V8EventListener.cpp:
769         (WebCore::V8EventListener::callListenerFunction):
770
771 2011-06-02  John Bates  <jbates@google.com>
772
773         Reviewed by James Robinson.
774
775         DrawingBufferChromium cleanup:
776         - Correct FIXME comment about synchronization.
777         - Remove unnecessary DrawingBufferInternal indirection struct
778           and its unused offscreenColorTexture member.
779         https://bugs.webkit.org/show_bug.cgi?id=61953
780
781         * platform/graphics/chromium/DrawingBufferChromium.cpp:
782         (WebCore::DrawingBuffer::DrawingBuffer):
783         (WebCore::DrawingBuffer::~DrawingBuffer):
784         (WebCore::DrawingBuffer::publishToPlatformLayer):
785         (WebCore::DrawingBuffer::didReset):
786         (WebCore::DrawingBuffer::platformLayer):
787         * platform/graphics/gpu/DrawingBuffer.h:
788
789 2011-06-02  Andrey Kosyakov  <caseq@chromium.org>
790
791         Reviewed by Pavel Feldman.
792
793         Web Inspector: ResourceCookiesView.resize() is missing
794         https://bugs.webkit.org/show_bug.cgi?id=61868
795
796         * inspector/front-end/ResourceCookiesView.js:
797         (WebInspector.ResourceCookiesView.prototype.resize):
798
799 2011-06-02  Kent Tamura  <tkent@chromium.org>
800
801         Reviewed by Dimitri Glazkov.
802
803         REGRESSION(r87014): Cloned text <input> doesn't work well.
804         https://bugs.webkit.org/show_bug.cgi?id=61909
805
806         The default implementation of Element::cloneNode() creates a clone
807         node by Document::createElement(). So, if a customized class is used for
808         shadow nodes, cloneNode() doesn't create a node of the correct class.
809         Such custom classes need to override Element::
810         cloneElementWithoutAttributesAndChildren().
811
812         TextFieldInputType and SearchInputType had references to shadow nodes
813         initialized in createShadowSubtree(). However createShadowSubtree() is
814         not called if the host node is cloned. The accessors for shadow nodes
815         should search a shadow tree.
816
817         Test: fast/forms/textfield-clone.html
818
819         * html/SearchInputType.cpp:
820           Remove data members for shadow nodes, and the accessors search the
821           shadow tree for the requested node by TreeScope::getElementById().
822         (WebCore::SearchInputType::SearchInputType):
823         (WebCore::innerBlockId):
824         (WebCore::resultButtonId):
825         (WebCore::cancelButtonId):
826         (WebCore::SearchInputType::createShadowSubtree):
827         (WebCore::SearchInputType::innerBlockElement):
828         (WebCore::SearchInputType::resultsButtonElement):
829         (WebCore::SearchInputType::cancelButtonElement):
830         * html/SearchInputType.h:
831         * html/TextFieldInputType.cpp: ditto.
832         (WebCore::TextFieldInputType::TextFieldInputType):
833         (WebCore::TextFieldInputType::innerTextId):
834         (WebCore::spinButtonId):
835         (WebCore::TextFieldInputType::speechButtonId):
836         (WebCore::TextFieldInputType::appendChildAndSetId):
837         (WebCore::TextFieldInputType::createShadowSubtree):
838         (WebCore::TextFieldInputType::getShadowElementById):
839         (WebCore::TextFieldInputType::innerTextElement):
840         (WebCore::TextFieldInputType::innerSpinButtonElement):
841         (WebCore::TextFieldInputType::speechButtonElement):
842         * html/TextFieldInputType.h:
843         * html/shadow/TextControlInnerElements.cpp:
844           Overrides cloneElementWithoutAttributesAndChildren() in order that cloneNode()
845           produces an instance of the correct class.
846         (WebCore::TextControlInnerElement::cloneElementWithoutAttributesAndChildren):
847         (WebCore::TextControlInnerTextElement::cloneElementWithoutAttributesAndChildren):
848         (WebCore::SearchFieldResultsButtonElement::cloneElementWithoutAttributesAndChildren):
849         (WebCore::SearchFieldCancelButtonElement::cloneElementWithoutAttributesAndChildren):
850         (WebCore::SpinButtonElement::cloneElementWithoutAttributesAndChildren):
851         (WebCore::InputFieldSpeechButtonElement::cloneElementWithoutAttributesAndChildren):
852         * html/shadow/TextControlInnerElements.h:
853
854 2011-05-28  Martin Robinson  <mrobinson@igalia.com>
855
856         Reviewed by Gustavo Noronha Silva.
857
858         [GTK] Remove PasteboardHelperGtk
859         https://bugs.webkit.org/show_bug.cgi?id=61690
860
861         Remove the virtual methods from PasteboardHelper, so that PasteboardHelperGtk
862         can be removed. Since the GtkClipboard IDs are verified to be the same between
863         WebKit and WebCore we no longer need to communicate from WebCore to WebKit to
864         get them.
865
866         No new tests. This is just a code refactor.
867
868         * platform/Pasteboard.h: Remove GTK+ specific methods. They are no longer needed.
869         * platform/gtk/ClipboardGtk.cpp: Remove the m_helper member and access the
870         PasteboardHelper singleton directly.
871         * platform/gtk/ClipboardGtk.h: Ditto.
872         * platform/gtk/PasteboardGtk.cpp: Ditto.
873         * platform/gtk/PasteboardHelper.cpp:
874         (WebCore::removeMarkupPrefix): Remove an extra line.
875         (WebCore::PasteboardHelper::defaultPasteboardHelper): Added this static getter
876         for the singleton.
877         (WebCore::PasteboardHelper::PasteboardHelper): Moved the contents of initTargetList here.
878         (WebCore::PasteboardHelper::getCurrentClipboard): Instead of talking with WebKit to determine
879         whether or not to use the primary selection clipboard, just use our new member.
880         (WebCore::PasteboardHelper::fillSelectionData): Use our local enum to get the ID.
881         (WebCore::PasteboardHelper::targetListForDataObject): Ditto.
882         (WebCore::PasteboardHelper::dropAtomsForContext): Ditto.
883         (WebCore::getClipboardContentsCallback): Ditto.
884         * platform/gtk/PasteboardHelper.h: PasteboardHelper now keeps track of whether or
885         not to use the primary selection clipboard internally.
886         (WebCore::PasteboardHelper::setUsePrimarySelectionClipboard): Added.
887         (WebCore::PasteboardHelper::usePrimarySelectionClipboard): Added.
888
889 2011-06-02  Levi Weintraub  <leviw@chromium.org>
890
891         Reviewed by Eric Seidel.
892
893         Teach InlineBox about FloatPoint
894         https://bugs.webkit.org/show_bug.cgi?id=44412
895
896         Original patch by Eric Seidel. Updated by me.
897
898         This is another step towards more point/size
899         usage throughout the rendering tree.
900
901         Added left(), right(), top(), and bottom() methods
902         to InlineBox. Removed m_x, and m_y and replaced them
903         with a single m_topLeft member.
904
905         No new tests since this is just a refactoring.
906
907         * rendering/EllipsisBox.cpp:
908         (WebCore::EllipsisBox::paint):
909         (WebCore::EllipsisBox::selectionRect):
910         (WebCore::EllipsisBox::paintSelection):
911         (WebCore::EllipsisBox::nodeAtPoint):
912         * rendering/EllipsisBox.h:
913         (WebCore::EllipsisBox::EllipsisBox):
914         * rendering/InlineBox.cpp:
915         (WebCore::InlineBox::adjustPosition):
916         (WebCore::InlineBox::canAccommodateEllipsis):
917         * rendering/InlineBox.h:
918         (WebCore::InlineBox::InlineBox):
919         (WebCore::InlineBox::setX):
920         (WebCore::InlineBox::x):
921         (WebCore::InlineBox::left):
922         (WebCore::InlineBox::setY):
923         (WebCore::InlineBox::y):
924         (WebCore::InlineBox::top):
925         (WebCore::InlineBox::topLeft):
926         (WebCore::InlineBox::right):
927         (WebCore::InlineBox::bottom):
928         (WebCore::InlineBox::logicalLeft):
929         (WebCore::InlineBox::setLogicalLeft):
930         (WebCore::InlineBox::logicalTop):
931         (WebCore::InlineBox::setLogicalTop):
932         (WebCore::InlineBox::logicalFrameRect):
933         * rendering/InlineFlowBox.h:
934         (WebCore::InlineFlowBox::frameRectIncludingLineHeight):
935         * rendering/InlineTextBox.cpp:
936         (WebCore::InlineTextBox::placeEllipsisBox):
937         (WebCore::InlineTextBox::paintTextMatchMarker):
938         (WebCore::InlineTextBox::computeRectForReplacementMarker):
939         * rendering/RenderText.cpp:
940         (WebCore::RenderText::firstRunX):
941         (WebCore::RenderText::firstRunY):
942         * rendering/RenderTreeAsText.cpp:
943         (WebCore::writeTextRun):
944         * rendering/RootInlineBox.cpp:
945         (WebCore::RootInlineBox::placeEllipsis):
946         * rendering/svg/RenderSVGText.cpp:
947         (WebCore::RenderSVGText::positionForPoint):
948         * rendering/svg/SVGInlineTextBox.h:
949         (WebCore::SVGInlineTextBox::selectionTop):
950         * rendering/svg/SVGRootInlineBox.cpp:
951         (WebCore::SVGRootInlineBox::closestLeafChildForPosition):
952
953 2011-06-02  Jian Li  <jianli@chromium.org>
954
955         Reviewed by David Levin.
956
957         Update the behavior of multiple reads for FileReader
958         https://bugs.webkit.org/show_bug.cgi?id=61793
959
960         Changed to throw an OperationNotAllowedException with the NOT_ALLOWED_ERR
961         status code on any of the read methods that occur when readyState = LOADING.
962         Otherwise, calling any of the read methods should work. 
963
964         Test: fast/files/read-file-async.html
965
966         * CodeGenerators.pri:
967         * DerivedSources.cpp:
968         * DerivedSources.make:
969         * GNUmakefile.list.am:
970         * WebCore.gypi:
971         * WebCore.pro:
972         * WebCore.vcproj/WebCore.vcproj:
973         * WebCore.xcodeproj/project.pbxproj:
974         * bindings/js/JSDOMBinding.cpp:
975         (WebCore::setDOMException):
976         * bindings/v8/V8Proxy.cpp:
977         (WebCore::V8Proxy::setDOMException):
978         * dom/ExceptionCode.cpp:
979         (WebCore::getExceptionCodeDescription):
980         * dom/ExceptionCode.h:
981         * fileapi/FileReader.cpp:
982         (WebCore::FileReader::FileReader):
983         (WebCore::FileReader::hasPendingActivity):
984         (WebCore::FileReader::readAsArrayBuffer):
985         (WebCore::FileReader::readAsBinaryString):
986         (WebCore::FileReader::readAsText):
987         (WebCore::FileReader::readAsDataURL):
988         (WebCore::FileReader::readInternal):
989         (WebCore::FileReader::abort):
990         (WebCore::FileReader::doAbort):
991         (WebCore::FileReader::terminate):
992         (WebCore::FileReader::start):
993         (WebCore::FileReader::didStartLoading):
994         (WebCore::FileReader::didFinishLoading):
995         (WebCore::FileReader::didFail):
996         * fileapi/FileReader.h:
997         (WebCore::FileReader::readyState):
998         * fileapi/FileReader.idl:
999         * fileapi/OperationNotAllowedException.h: Added.
1000         (WebCore::OperationNotAllowedException::create):
1001         (WebCore::OperationNotAllowedException::OperationNotAllowedException):
1002         * fileapi/OperationNotAllowedException.idl: Added.
1003
1004 2011-06-02  Adrienne Walker  <enne@google.com>
1005
1006         Reviewed by James Robinson.
1007
1008         [chromium] Compositor HUD should respect mapTexSubImage2D returning NULL
1009         https://bugs.webkit.org/show_bug.cgi?id=61954
1010
1011         * platform/graphics/chromium/cc/CCHeadsUpDisplay.cpp:
1012         (WebCore::CCHeadsUpDisplay::draw):
1013
1014 2011-06-02  Brady Eidson  <beidson@apple.com>
1015
1016         Reviewed by Oliver Hunt.
1017
1018         <rdar://problem/9539920> and https://bugs.webkit.org/show_bug.cgi?id=61950
1019         Repro crash loading certain webarchives after r87566.
1020
1021         Test: webarchive/loading/javascript-url-iframe-crash.html
1022
1023         * bindings/ScriptControllerBase.cpp:
1024         (WebCore::ScriptController::executeIfJavaScriptURL): DocumentWriter::replaceDocument can
1025           cause the DocumentLoader to be destroyed, so protect it with a Ref here.
1026
1027 2011-06-02  Jay Civelli  <jcivelli@chromium.org>
1028
1029         Reviewed by Adam Barth.
1030
1031         Adding MHTML generation support to MHTMLArchive.
1032         https://bugs.webkit.org/show_bug.cgi?id=7169
1033
1034         * loader/archive/mhtml/MHTMLArchive.cpp:
1035         (WebCore::generateRandomBoundary):
1036         (WebCore::replaceNonPrintableCharacters):
1037         (WebCore::MHTMLArchive::generateMHTMLData):
1038         * loader/archive/mhtml/MHTMLArchive.h:
1039         * page/PageSerializer.cpp:
1040         (WebCore::PageSerializer::serializeFrame):
1041         (WebCore::PageSerializer::serializeCSSStyleSheet):
1042         * platform/SharedBuffer.cpp:
1043         (WebCore::SharedBuffer::append):
1044         * platform/SharedBuffer.h:
1045
1046 2011-06-02  Simon Fraser  <simon.fraser@apple.com>
1047
1048         Reviewed by Andreas Kling.
1049
1050         Share Path code that uses beziers to construct a rounded rect
1051         https://bugs.webkit.org/show_bug.cgi?id=61960
1052
1053         Have two methods in Path that construct beziers for rounded
1054         rects to share the same code.
1055         
1056         Make gCircleControlPoint a little more precise, and add
1057         a comment describing its derivation.
1058         
1059         Make use of FloatRect::maxX() and maxY().
1060
1061         * platform/graphics/Path.cpp:
1062         (WebCore::Path::addRoundedRect):
1063         (WebCore::Path::addBeziersForRoundedRect):
1064         * platform/graphics/Path.h:
1065
1066 2011-06-02  Ryosuke Niwa  <rniwa@webkit.org>
1067
1068         Reviewed by Enrica Casucci.
1069
1070         ApplyStyleCommand shouldn't call collapseTextDecorationProperties
1071         https://bugs.webkit.org/show_bug.cgi?id=61887
1072
1073         Removed the call to collapseTextDecorationProperties in ApplyStyleCommand::applyInlineStyle.
1074
1075         No new tests because this is a code refactoring.
1076
1077         * editing/ApplyStyleCommand.cpp:
1078         (WebCore::ApplyStyleCommand::applyInlineStyle): No loner calls collapseTextDecorationProperties.
1079         (WebCore::ApplyStyleCommand::pushDownInlineStyleAroundNode): Updated comment.
1080         * editing/EditingStyle.cpp:
1081         (WebCore::HTMLElementEquivalent::propertyExistsInStyle): Added to check both text-decoration
1082         and -webkit-text-decorations-in-effect.
1083         (WebCore::HTMLTextDecorationEquivalent::HTMLTextDecorationEquivalent): Added a comment.
1084         (WebCore::HTMLTextDecorationEquivalent::propertyExistsInStyle): Checks both text-decoration
1085         and -webkit-text-decorations-in-effect.
1086         (WebCore::HTMLTextDecorationEquivalent::valueIsPresentInStyle): Checks if a text decoration
1087         is present in -webkit-text-decorations-in-effect or text-decoration preferring the former.
1088         (WebCore::EditingStyle::conflictsWithInlineStyleOfElement): Merged loops for when conflictingProperties
1089         is false and true. Added a support for -webkit-text-decorations-in-effect.
1090
1091 2011-06-02  Ryosuke Niwa  <rniwa@webkit.org>
1092
1093         Reviewed by Eric Seidel.
1094
1095         Make more functions static local in EventHandlers.cpp
1096         https://bugs.webkit.org/show_bug.cgi?id=58503
1097
1098         Removed canHandleDragAndDropForTarget and made focusDirectionForKey local to EventHandler.cpp.
1099
1100         * page/EventHandler.cpp:
1101         (WebCore::targetIsFrame): Extracted from canHandleDragAndDropForTarget.
1102         (WebCore::EventHandler::updateDragAndDrop): Calls contentFrameForTarget instead of canHandleDragAndDropForTarget.
1103         (WebCore::EventHandler::cancelDragAndDrop): Ditto.
1104         (WebCore::EventHandler::performDragAndDrop): Ditto.
1105         (WebCore::focusDirectionForKey): No longer a member function of EventHandler class.
1106         (WebCore::handleKeyboardSelectionMovement): No longer a member function of EventHandler class; also calls
1107         focusDirectionForKey instead of manually comparing.
1108         * page/EventHandler.h:
1109
1110 2011-06-02  Alok Priyadarshi  <alokp@chromium.org>
1111
1112         Reviewed by James Robinson.
1113
1114         [chromium] Things jump around when selecting anything on the page
1115         https://bugs.webkit.org/show_bug.cgi?id=61639
1116
1117         WebCore::LayerTextureUpdaterSkPicture::updateTextureRect was not updating a tile sub-region properly.
1118         It did not consider dest-rect when selecting the clip and translation required to draw the content-rect into dest-rect.
1119         Also removed clearing of framebuffer because it used to clear the whole tile not just dest-rect.
1120         An appropriate viewport could be set to just clear the dest-rect, but it was debug only code and I did not want to mess
1121         with the viewport set by skia.
1122
1123         No new tests. This case should be covered by most of the layout tests (pixel) targeting selection or hovering when chromium is run in compositing mode.
1124         Here is a non-exhaustive list of existing tests covering this case.
1125         Test: editing/selection/14971.html (existing)
1126               editing/selection/3690703-2.html (existing)
1127               editing/selection/4402375.html (existing)
1128               editing/selection/4818145.html (existing)
1129
1130         * platform/graphics/chromium/LayerTextureUpdaterCanvas.cpp:
1131         (WebCore::LayerTextureUpdaterSkPicture::updateTextureRect):
1132         (WebCore::LayerTextureUpdaterSkPicture::createFrameBuffer):
1133         * platform/graphics/chromium/LayerTextureUpdaterCanvas.h:
1134
1135 2011-06-02  Dimitri Glazkov  <dglazkov@chromium.org>
1136
1137         Reviewed by Darin Adler.
1138
1139         Add build logistics and plumbing for window.internals object.
1140         https://bugs.webkit.org/show_bug.cgi?id=60313
1141
1142         Test: fast/harness/internals-object.html
1143
1144         * Configurations/WebCoreTestSupport.xcconfig: Added.
1145         * DerivedSources.make: Added support for generating from Internals.idl.
1146         * WebCore.gyp/WebCore.gyp: Added new webcore_test_support library.
1147         * WebCore.gypi: Ditto.
1148         * WebCore.xcodeproj/project.pbxproj: Added WebCoreTestSupport library.
1149         * testing/Internals.cpp: Added.
1150         * testing/Internals.h: Added.
1151         * testing/Internals.idl: Added.
1152         * testing/js/WebCoreTestSupport.cpp: Added.
1153         * testing/js/WebCoreTestSupport.h: Added.
1154         * testing/v8/WebCoreTestSupport.cpp: Added.
1155         * testing/v8/WebCoreTestSupport.h: Added.
1156
1157 2011-06-01  Adrienne Walker  <enne@google.com>
1158
1159         Reviewed by Eric Seidel.
1160
1161         [chromium] LayerChromium should use a RefPtr for replica layer
1162         https://bugs.webkit.org/show_bug.cgi?id=61898
1163
1164         Having this member variable be a raw pointer is brittle and assumes
1165         that the GraphicsLayer tree keeps this in sync.  There aren't any
1166         known bugs caused by this, but it seems like good sense to do this.
1167
1168         * platform/graphics/chromium/LayerChromium.h:
1169         (WebCore::LayerChromium::replicaLayer):
1170
1171 2011-06-02  Ryosuke Niwa  <rniwa@webkit.org>
1172
1173         Reviewed by Eric Seidel.
1174
1175         REGRESSION: inline style is lost when deleting line break between paragraphs with same style
1176         https://bugs.webkit.org/show_bug.cgi?id=61899
1177
1178         The bug was caused by ReplaceSelectionCommand::doApply's calling handleStyleSpansBeforeInsertion
1179         before insertionPos is adjusted by positionAvoidingPrecedingNodes and positionOutsideTabSpan.
1180
1181         Fixed the bug by calling handleStyleSpansBeforeInsertion after the calls to these two functions.
1182
1183         Test: editing/deleting/delete-line-break-between-paragraphs-with-same-style.html
1184
1185         * editing/ReplaceSelectionCommand.cpp:
1186         (WebCore::ReplaceSelectionCommand::doApply):
1187
1188 2011-06-01  Ryosuke Niwa  <rniwa@webkit.org>
1189
1190         Reviewed by Simon Fraser.
1191
1192         REGRESSION: Text selection broken for text with line-height applied
1193         https://bugs.webkit.org/show_bug.cgi?id=54929
1194
1195         The bug was caused by RenderText::positionForPoint's not considering the case where a point is
1196         above selectionTop and below lineTop of the first root inline box. Fixed the bug by considering
1197         any point between selectionTop and lineTop to be inside a root inline box. This condition is
1198         consistent with the condition we use to determine the bottom of a line.
1199
1200         Test: editing/selection/hit-test-on-text-with-line-height.html
1201
1202         * rendering/RenderBlock.cpp:
1203         (WebCore::RenderBlock::positionForPointWithInlineChildren): Fixed a condition to determine whether
1204         or not a point is above the first root line box. We need to check both selectionTop and logicalTop
1205         for the same reason explained above.
1206         * rendering/RenderText.cpp:
1207         (WebCore::RenderText::positionForPoint): See above.
1208
1209 2011-06-02  Andreas Kling  <kling@webkit.org>
1210
1211         Reviewed by James Robinson.
1212
1213         Canvas/V8: Fix setting strokeStyle or fillStyle to a CSS system color.
1214         https://bugs.webkit.org/show_bug.cgi?id=61944
1215
1216         Call setFillColor/setStrokeColor (instead of setFillStyle/setStrokeStyle)
1217         for string styles. This ensures that system color resolution is performed,
1218         and matches what the JSC bindings do.
1219
1220         Test: canvas/philip/tests/2d.fillStyle.parse.system.html
1221
1222         * bindings/v8/custom/V8CanvasRenderingContext2DCustom.cpp:
1223         (WebCore::toCanvasStyle):
1224         (WebCore::V8CanvasRenderingContext2D::strokeStyleAccessorSetter):
1225         (WebCore::V8CanvasRenderingContext2D::fillStyleAccessorSetter):
1226
1227 2011-06-02  Sheriff Bot  <webkit.review.bot@gmail.com>
1228
1229         Unreviewed, rolling out r87920.
1230         http://trac.webkit.org/changeset/87920
1231         https://bugs.webkit.org/show_bug.cgi?id=61943
1232
1233         This patch does not build in Win Builder (dbg)(shared)
1234         downstream (Requested by abarth|gardener on #webkit).
1235
1236         * platform/chromium/PopupMenuChromium.cpp:
1237         (WebCore::PopupContainer::showPopup):
1238         (WebCore::PopupListBox::handleMouseReleaseEvent):
1239         (WebCore::PopupListBox::acceptIndex):
1240
1241 2011-06-02  Dimitri Glazkov  <dglazkov@chromium.org>
1242
1243         Unreviewed, rolling out r87926.
1244         http://trac.webkit.org/changeset/87926
1245         https://bugs.webkit.org/show_bug.cgi?id=60313
1246
1247         Fails to find WebCoreTestSupport.dylib on bots.
1248
1249         * Configurations/WebCore.xcconfig:
1250         * Configurations/WebCoreTestSupport.xcconfig: Removed.
1251         * DerivedSources.make:
1252         * WebCore.exp.in:
1253         * WebCore.gyp/WebCore.gyp:
1254         * WebCore.gypi:
1255         * WebCore.xcodeproj/project.pbxproj:
1256         * bindings/js/JSDOMWrapper.cpp:
1257         (WebCore::JSDOMWrapper::~JSDOMWrapper):
1258         * bindings/js/JSDOMWrapper.h:
1259         * testing/Internals.cpp: Removed.
1260         * testing/Internals.h: Removed.
1261         * testing/Internals.idl: Removed.
1262         * testing/js/WebCoreTestSupport.cpp: Removed.
1263         * testing/js/WebCoreTestSupport.h: Removed.
1264         * testing/v8/WebCoreTestSupport.cpp: Removed.
1265         * testing/v8/WebCoreTestSupport.h: Removed.
1266
1267 2011-06-02  Carlos Garcia Campos  <cgarcia@igalia.com>
1268
1269         Reviewed by Martin Robinson.
1270
1271         [GTK] Implement popup menus in Webkit2
1272         https://bugs.webkit.org/show_bug.cgi?id=61854
1273
1274         Move common code into a new class to be used by both WebKit1 and
1275         WebKit2.
1276
1277         * GNUmakefile.list.am: Add new files to compilation.
1278         * platform/gtk/GtkPopupMenu.cpp: Copied from Source/WebCore/platform/gtk/PopupMenuGtk.cpp.
1279         (WebCore::GtkPopupMenu::GtkPopupMenu):
1280         (WebCore::GtkPopupMenu::~GtkPopupMenu):
1281         (WebCore::GtkPopupMenu::clear): Remove all menu items.
1282         (WebCore::GtkPopupMenu::appendSeparator): Add a new separator
1283         item to the menu.
1284         (WebCore::GtkPopupMenu::appendItem): Add a new item to the menu for
1285         the given action.
1286         (WebCore::GtkPopupMenu::popUp): Show the menu.
1287         (WebCore::GtkPopupMenu::popDown): Hide the menu.
1288         (WebCore::GtkPopupMenu::menuRemoveItem):
1289         (WebCore::GtkPopupMenu::menuPositionFunction):
1290         (WebCore::GtkPopupMenu::resetTypeAheadFindState):
1291         (WebCore::GtkPopupMenu::typeAheadFind):
1292         (WebCore::GtkPopupMenu::selectItemCallback):
1293         (WebCore::GtkPopupMenu::keyPressEventCallback):
1294         * platform/gtk/GtkPopupMenu.h: Copied from Source/WebCore/platform/gtk/PopupMenuGtk.h.
1295         (WebCore::GtkPopupMenu::create):
1296         (WebCore::GtkPopupMenu::platformMenu):
1297         * platform/gtk/PopupMenuGtk.cpp:
1298         (WebCore::PopupMenuGtk::PopupMenuGtk):
1299         (WebCore::PopupMenuGtk::~PopupMenuGtk):
1300         (WebCore::PopupMenuGtk::show): Use GtkPopupMenu.
1301         (WebCore::PopupMenuGtk::hide): Ditto.
1302         (WebCore::PopupMenuGtk::menuItemActivated):
1303         (WebCore::PopupMenuGtk::menuUnmapped):
1304         * platform/gtk/PopupMenuGtk.h:
1305
1306 2011-05-21  Dimitri Glazkov  <dglazkov@chromium.org>
1307
1308         Reviewed by Darin Adler.
1309
1310         Add build logistics and plumbing for window.internals object.
1311         https://bugs.webkit.org/show_bug.cgi?id=60313
1312
1313         Test: fast/harness/internals-object.html
1314
1315         * Configurations/WebCoreTestSupport.xcconfig: Added.
1316         * DerivedSources.make: Added support for generating from Internals.idl.
1317         * WebCore.gyp/WebCore.gyp: Added new webcore_test_support library.
1318         * WebCore.gypi: Ditto.
1319         * WebCore.xcodeproj/project.pbxproj: Added WebCoreTestSupport library.
1320         * testing/Internals.cpp: Added.
1321         * testing/Internals.h: Added.
1322         * testing/Internals.idl: Added.
1323         * testing/js/WebCoreTestSupport.cpp: Added.
1324         * testing/js/WebCoreTestSupport.h: Added.
1325         * testing/v8/WebCoreTestSupport.cpp: Added.
1326         * testing/v8/WebCoreTestSupport.h: Added.
1327
1328 2011-06-02  Naoki Takano  <takano.naoki@gmail.com>
1329
1330         Reviewed by Dimitri Glazkov.
1331
1332         [Chromium] Click event is not fired for a menulist <select>
1333         https://bugs.webkit.org/show_bug.cgi?id=60563
1334
1335         Tests: SelectItemEventFire, SelectItemKeyEvent, SelectItemRemoveSelectOnChange and SelectItemRemoveSelectOnChange in webkit_unit_tests.
1336
1337         * platform/chromium/PopupMenuChromium.cpp:
1338         (WebCore::PopupContainer::showPopup): Set m_focusedNode from m_frameView.
1339         (WebCore::PopupListBox::handleMouseReleaseEvent): Call dispatchMouseEvent to forward the event only if select popup.
1340         (WebCore::PopupListBox::acceptIndex): Change to return accepted or not.
1341
1342 2011-06-02  Dimitri Glazkov  <dglazkov@chromium.org>
1343
1344         Reviewed by Darin Adler.
1345
1346         Stop event propagation for cases where relatedTarget is both ancestor of the target and at shadow boundary.
1347         https://bugs.webkit.org/show_bug.cgi?id=61892
1348
1349         In the cases where the relatedTarget of an event is an ancestor of the target, and the relatedTarget is
1350         a shadow host, we should not allow events to escape out of the hosted shadow DOM subtree.
1351
1352         * dom/EventDispatcher.cpp:
1353         (WebCore::EventDispatcher::adjustToShadowBoundaries): Added a check that is valid for both new and old shadow DOM.
1354
1355 2011-06-02  Hans Wennborg  <hans@chromium.org>
1356
1357         Reviewed by Tony Gentilcore.
1358
1359         Fix LevelDBTransaction::clearTree()
1360         https://bugs.webkit.org/show_bug.cgi?id=61917
1361
1362         This was broken in the code I copied it from; we can't delete and walk
1363         the tree at the same time.
1364
1365         No new functionality, no new tests.
1366
1367         * platform/leveldb/LevelDBTransaction.cpp:
1368         (WebCore::LevelDBTransaction::clearTree):
1369
1370 2011-06-02  Andreas Kling  <kling@webkit.org>
1371
1372         Rubber-stamped by Simon Hausmann.
1373
1374         Remove Qt's precompiled header hack as it was broken, and was not even
1375         used unless building WebKit inside a Qt tree.
1376
1377         * WebCore.pri:
1378
1379 2011-06-02  James Robinson  <jamesr@chromium.org>
1380
1381         Reviewed by Brady Eidson.
1382
1383         DocumentLoader keeps a reference to all URL strings ever loaded leading to lots of memory waste
1384         https://bugs.webkit.org/show_bug.cgi?id=61894
1385
1386         DocumentLoader::m_resourcesClientKnowsAbout is a set of all the URLs that have passed through
1387         FrameLoader::dispatchWillSendRequest() and is used by FrameLoader::loadedResourceFromMemoryCached to decide
1388         whether to inform the FrameLoader's m_client about this load.  Unfortunately, this set holds a reference to the
1389         URL string for every resource loaded, so on pages that use data URLs to "load" large amounts of data this leaks
1390         lots of memory.
1391
1392         This set only has an effect on the Mac port, as the only two ports that implement
1393         FrameLoaderClient::dispatchDidLoadResourceFromMemoryCache() are Chromium and Mac and the Chromium implementation
1394         can correctly handle receiving multiple callbacks.  This patch limits the set to only PLATFORM(MAC) so other
1395         ports do not have to pay this memory cost.  It's possible that a better fix exists specifically for the Mac port
1396         implementation, but that would have to determined by someone who works on that port specifically.
1397
1398         * loader/DocumentLoader.h:
1399         (WebCore::DocumentLoader::didTellClientAboutLoad):
1400         (WebCore::DocumentLoader::haveToldClientAboutLoad):
1401
1402 2011-06-02  Aparna Nandyal  <aparna.nand@wipro.com>
1403
1404         Reviewed by Andreas Kling.
1405
1406         [Qt] Multiple drop events when doing DnD of images.
1407         https://bugs.webkit.org/show_bug.cgi?id=61504
1408
1409         Duplicate entries of the url were getting added into drag data
1410         which is removed. The duplicate entries were causing the same image
1411         url to be copied twice. The code changes now match other webkit ports.
1412
1413         * platform/qt/ClipboardQt.cpp:
1414         (WebCore::ClipboardQt::declareAndWriteDragImage):
1415
1416 2011-06-02  Naiem Shaik  <naiem.shaik@gmail.com>
1417
1418         Reviewed by Kent Tamura.
1419         
1420         Fixing invalid value being returned for default checkbox and radio state
1421         https://bugs.webkit.org/show_bug.cgi?id=61674
1422
1423         As per http://www.w3.org/TR/html5/number-state.html#checkbox-state and
1424         http://www.w3.org/TR/html5/number-state.html#radio-button-state:
1425         The value IDL attribute is in mode default/on: 
1426         If the element has a value attribute, it must return that attribute's 
1427         value; otherwise, it must return the string "on".  
1428         Currently default value is empty string;Default value of Radio button 
1429         and checkbox should be "on".Changed fallbackValue function to return the same
1430         This works as per spec in IE9,Firefox and Opera
1431
1432         Tests: fast/forms/checkbox-default-value.html
1433                fast/forms/radio-default-value.html
1434
1435         * html/BaseCheckableInputType.cpp:
1436         (WebCore::BaseCheckableInputType::fallbackValue):
1437
1438 2011-06-02  Kent Tamura  <tkent@chromium.org>
1439
1440         [Chromium/Mac] Fix a wrong merge for r87881
1441         https://bugs.webkit.org/show_bug.cgi?id=61845
1442
1443         * platform/chromium/ThemeChromiumMac.mm:
1444         (WebCore::paintStepper):
1445
1446 2011-06-02  Ian Henderson  <ianh@apple.com>
1447
1448         Reviewed by Simon Fraser.
1449
1450         [CG] GraphicsContext::fillRoundedRect() ignores the gradient fill the CGContextFillEllipseInRect() code path
1451         https://bugs.webkit.org/show_bug.cgi?id=61882
1452
1453         If we have a gradient or pattern fill set, take the slow path, which
1454         handles these cases properly.
1455
1456         No new tests, since we never try to fill a rounded rect with a
1457         gradient or pattern.
1458
1459         * platform/graphics/cg/GraphicsContextCG.cpp:
1460         (WebCore::GraphicsContext::fillRoundedRect):
1461
1462 2011-06-02  MORITA Hajime  <morrita@google.com>
1463
1464         Reviewed by Kent Tamura.
1465
1466         [Refactoring] Node::nextRenderer() and previousRenderer() should be part of NodeRenderingContext
1467         https://bugs.webkit.org/show_bug.cgi?id=61912
1468
1469         Inlined Node::nextRenderer() and previousRenderer() into NodeRenderingContext and
1470         removed original definitions.
1471
1472         No test, no behavioral change.
1473         
1474         * dom/Node.cpp:
1475         * dom/Node.h:
1476         * dom/NodeRenderingContext.cpp:
1477         (WebCore::NodeRenderingContext::nextRenderer):
1478         (WebCore::NodeRenderingContext::previousRenderer):
1479
1480 2011-06-02  Piroska András  <Piroska.Andras@stud.u-szeged.hu>
1481
1482         Rubber-stamped by Gabor Loki.
1483
1484         Trivial buildfix for the ParallelJobs part of FEConvolveMatrix.
1485
1486         * platform/graphics/filters/FEConvolveMatrix.cpp:
1487         (WebCore::FEConvolveMatrix::apply): Rename variable i to job
1488
1489 2011-06-02  Yuta Kitamura  <yutak@chromium.org>
1490
1491         Reviewed by Kent Tamura.
1492
1493         WebSocket: Call WebSocketChannel::fail() when WebSocketHandshake has failed
1494         https://bugs.webkit.org/show_bug.cgi?id=61841
1495
1496         There is no change in behavior except that capitalization of a few error messages
1497         has been changed. No new tests are added.
1498
1499         * websockets/WebSocketChannel.cpp:
1500         (WebCore::WebSocketChannel::processBuffer):
1501         Pass m_handshake.failureReason() to fail() if the handshake has failed.
1502         * websockets/WebSocketHandshake.cpp:
1503         Replace occurrences of m_handle->addMessage() with assignments to m_failureReason.
1504         Change capitalization of a few messages so that all messages start with a capital letter.
1505         (WebCore::WebSocketHandshake::readServerHandshake):
1506         (WebCore::WebSocketHandshake::failureReason):
1507         (WebCore::WebSocketHandshake::readStatusLine):
1508         (WebCore::WebSocketHandshake::readHTTPHeaders):
1509         (WebCore::WebSocketHandshake::checkResponseHeaders):
1510         * websockets/WebSocketHandshake.h:
1511         Add failureReason(), which returns a string that describes why WebSocket handshake
1512         has failed.
1513
1514 2011-06-01  Dan Bernstein  <mitz@apple.com>
1515
1516         Reviewed by Anders Carlsson.
1517
1518         Incorrect UA style when printing a simple document
1519         https://bugs.webkit.org/show_bug.cgi?id=61900
1520
1521         This is not testable in run-webkit-tests because unless the test is the first to run in an instance
1522         of DumpRenderTree, it is not guaranteed that the full default style sheet has not been initialized.
1523
1524         * css/CSSStyleSelector.cpp:
1525         (WebCore::loadFullDefaultStyle): Replace the simple default print style, which is now equal to the
1526         simple default style, with a new RuleSet before adding the style rules from the full default sheet.
1527         (WebCore::loadSimpleDefaultStyle): Set defaultPrintStyle to point to the default style. They are
1528         equal in the simple case.
1529
1530 2011-06-01  Kent Tamura  <tkent@chromium.org>
1531
1532         Reviewed by Dimitri Glazkov.
1533
1534         Remove outer-spin-button
1535         https://bugs.webkit.org/show_bug.cgi?id=61845
1536
1537         Remove outer-spin-button, and render steppers as inner-spin-button.
1538         Outer-spin-button have never worked well with padding and border of
1539         <input>, and the layout code is very tricky and very hard to maintain it.
1540
1541         * css/CSSPrimitiveValueMappings.h:
1542         (WebCore::CSSPrimitiveValue::CSSPrimitiveValue):
1543         * css/CSSValueKeywords.in:
1544         * css/html.css:
1545         * html/HTMLInputElement.cpp:
1546         (WebCore::HTMLInputElement::innerSpinButtonElement):
1547         * html/HTMLInputElement.h:
1548         * html/InputType.h:
1549         * html/TextFieldInputType.cpp:
1550         (WebCore::TextFieldInputType::TextFieldInputType):
1551         (WebCore::TextFieldInputType::createShadowSubtree):
1552         (WebCore::TextFieldInputType::destroyShadowSubtree):
1553         * html/TextFieldInputType.h:
1554         * html/shadow/TextControlInnerElements.cpp:
1555         (WebCore::SpinButtonElement::SpinButtonElement):
1556         (WebCore::SpinButtonElement::create):
1557         (WebCore::SpinButtonElement::shadowPseudoId):
1558         * html/shadow/TextControlInnerElements.h:
1559         * platform/ThemeTypes.h:
1560         * platform/chromium/ThemeChromiumMac.mm:
1561         (WebCore::paintStepper):
1562          Center the stepper drawing area because the specified area can be
1563          larger than the NSStepper sizes.
1564         (WebCore::ThemeChromiumMac::controlSize):
1565         (WebCore::ThemeChromiumMac::minimumControlSize):
1566         (WebCore::ThemeChromiumMac::inflateControlPaintRect):
1567         (WebCore::ThemeChromiumMac::paint):
1568         * platform/mac/ThemeMac.mm:
1569         (WebCore::paintStepper):
1570          Center the stepper drawing area because the specified area can be
1571          larger than the NSStepper sizes.
1572         (WebCore::ThemeMac::controlSize):
1573         (WebCore::ThemeMac::minimumControlSize):
1574         (WebCore::ThemeMac::inflateControlPaintRect):
1575         (WebCore::ThemeMac::paint):
1576         * rendering/RenderBox.cpp:
1577         (WebCore::RenderBox::paintBoxDecorations):
1578         * rendering/RenderBox.h:
1579         * rendering/RenderTextControlSingleLine.cpp:
1580         (WebCore::RenderTextControlSingleLine::layout):
1581         (WebCore::RenderTextControlSingleLine::nodeAtPoint):
1582         (WebCore::RenderTextControlSingleLine::textBlockWidth):
1583         * rendering/RenderTextControlSingleLine.h:
1584         * rendering/RenderTheme.cpp:
1585         (WebCore::RenderTheme::adjustStyle):
1586         (WebCore::RenderTheme::paint):
1587         (WebCore::RenderTheme::adjustInnerSpinButtonStyle):
1588         * rendering/RenderTheme.h:
1589         * rendering/RenderThemeMac.mm:
1590         (WebCore::RenderThemeMac::adjustRepaintRect):
1591
1592 2011-06-01  Emil A Eklund  <eae@chromium.org>
1593
1594         Reviewed by Eric Seidel.
1595
1596         Switch RenderLayer::convertToLayerCoords to use IntPoint
1597         https://bugs.webkit.org/show_bug.cgi?id=61818
1598
1599         Covered by existing tests.
1600
1601         * platform/graphics/FloatPoint.h:
1602         (WebCore::flooredIntSize):
1603         * rendering/RenderLayer.cpp:
1604         (WebCore::RenderLayer::updateLayerPositions):
1605         (WebCore::expandClipRectForDescendantsAndReflection):
1606         (WebCore::transparencyClipBox):
1607         (WebCore::RenderLayer::convertToLayerCoords):
1608         (WebCore::RenderLayer::paintLayer):
1609         (WebCore::RenderLayer::paintChildLayerIntoColumns):
1610         (WebCore::RenderLayer::createLocalTransformState):
1611         (WebCore::RenderLayer::hitTestChildLayerColumns):
1612         (WebCore::RenderLayer::calculateClipRects):
1613         (WebCore::RenderLayer::calculateRects):
1614         (WebCore::RenderLayer::boundingBox):
1615         (WebCore::RenderLayer::setBackingNeedsRepaintInRect):
1616         * rendering/RenderLayer.h:
1617         * rendering/RenderLayerBacking.cpp:
1618         (WebCore::RenderLayerBacking::updateCompositedBounds):
1619         (WebCore::RenderLayerBacking::updateGraphicsLayerGeometry):
1620         * rendering/RenderLayerCompositor.cpp:
1621         (WebCore::RenderLayerCompositor::calculateCompositedBounds):
1622         (WebCore::RenderLayerCompositor::layerWillBeRemoved):
1623         (WebCore::RenderLayerCompositor::recursiveRepaintLayerRect):
1624
1625 2011-06-01  Roland Steiner  <rolandsteiner@chromium.org>
1626
1627         Reviewed by Kent Tamura.
1628
1629         Remove superfluous renderer() test
1630         https://bugs.webkit.org/show_bug.cgi?id=61907
1631
1632         No new tests. (trivial)
1633
1634         * dom/Document.cpp:
1635         (WebCore::Document::recalcStyle):
1636
1637 2011-06-01  Levi Weintraub  <leviw@chromium.org>
1638
1639         Reviewed by Hajime Morita.
1640
1641         Add IntPoint + IntPoint operator
1642         https://bugs.webkit.org/show_bug.cgi?id=61876
1643
1644         Adding an operator+ convenience method to IntPoint that sums two points
1645         and returns the result as an IntPoint. Changing doImageDrag to use it
1646         as a proof of concept.
1647
1648         No new tests since there is no change in behavior.
1649
1650         * page/DragController.cpp:
1651         (WebCore::DragController::doImageDrag):
1652         * platform/graphics/IntPoint.h:
1653         (WebCore::operator+):
1654
1655 2011-06-01  Jaehun Lim  <ljaehun.lim@samsung.com>
1656
1657         Reviewed by Eric Seidel.
1658
1659         [EFL] Add adjustMenuListButtonStyle and paintMenuListButton functions
1660         https://bugs.webkit.org/show_bug.cgi?id=61836
1661
1662         Add functions for rendering drop-down list when style attributes are applied.
1663
1664         * platform/efl/RenderThemeEfl.cpp:
1665         (WebCore::RenderThemeEfl::adjustMenuListButtonStyle):
1666         (WebCore::RenderThemeEfl::paintMenuListButton):
1667         * platform/efl/RenderThemeEfl.h:
1668
1669 2011-06-01  Yuta Kitamura  <yutak@chromium.org>
1670
1671         Reviewed by Kent Tamura.
1672
1673         WebSocket: WebSocketChannel::fail() should close the connection immediately
1674         https://bugs.webkit.org/show_bug.cgi?id=61851
1675
1676         The effect of this change is almost unobservable. The difference between m_handle->close() and
1677         m_handle->disconnect() is that the former does not close the connection if the handle has
1678         unsent data while the latter immediately closes the connection regardless of unsent data.
1679         Usually a socket stream handle does not have unsent data, and even if it has any, it is hard
1680         for user scripts to observe the difference between close() and disconnect() (it should take some time
1681         for onclose() to be called if there are any unsent data, but there ought to be no other difference
1682         in user scripts' perspective).
1683
1684         No new tests are added, because writing a test for this issue is not feasible due to the above reason.
1685
1686         * websockets/WebSocketChannel.cpp:
1687         (WebCore::WebSocketChannel::fail): Use m_handle->disconnect() instead of m_handle->close().
1688
1689 2011-06-01  Abhishek Arya  <inferno@chromium.org>
1690
1691         Unreviewed.
1692
1693         Coding style nit. Move ec=0 initialization, change
1694         recommended by Alexey in bug.
1695         https://bugs.webkit.org/show_bug.cgi?id=60831
1696
1697         * dom/Document.cpp:
1698         (WebCore::Document::setBody):
1699
1700 2011-06-01  Hayato Ito  <hayato@chromium.org>
1701
1702         Reviewed by Kent Tamura.
1703
1704         Move {Next,Previous}FocusableNode functions from Document to FocusController.
1705         https://bugs.webkit.org/show_bug.cgi?id=61839
1706
1707         There are some member functions in Document which use 'this'
1708         pointer, but we should use TreeScope instead of Document in some
1709         places to handle focus issues nicely. We have to move these
1710         functions out of Document class so that we can give the TreeScope
1711         as a parameter.
1712
1713         No new tests since no functionality was changed.
1714
1715         * dom/Document.cpp:
1716         * dom/Document.h:
1717         * page/FocusController.cpp:
1718         (WebCore::FocusController::deepFocusableNode):
1719         (WebCore::FocusController::advanceFocusInDocumentOrder):
1720         (WebCore::nextNodeWithExactTabIndex):
1721         (WebCore::previousNodeWithExactTabIndex):
1722         (WebCore::nextNodeWithGreaterTabIndex):
1723         (WebCore::previousNodeWithLowerTabIndex):
1724         (WebCore::FocusController::nextFocusableNode):
1725         (WebCore::FocusController::previousFocusableNode):
1726         * page/FocusController.h:
1727
1728 2011-06-01  Adrienne Walker  <enne@google.com>
1729
1730         Reviewed by James Robinson.
1731
1732         [chromium] Fix syncing of removed mask and replica layers
1733         https://bugs.webkit.org/show_bug.cgi?id=61895
1734
1735         * platform/graphics/chromium/TreeSynchronizer.cpp:
1736         (WebCore::TreeSynchronizer::synchronizeTreeRecursive):
1737
1738 2011-06-01  Julien Chaffraix  <jchaffraix@codeaurora.org>
1739
1740         Reviewed by Simon Fraser.
1741
1742         CSSStyleSheet#insertRule doesn't work well with imported stylesheets
1743         https://bugs.webkit.org/show_bug.cgi?id=56981
1744
1745         Test: fast/css/import-and-insert-rule-no-update.html
1746
1747         The bug arises from the fact that <link> element did not know about a programmatically
1748         loading sheet (using insertRule and @import) and would thus never call removePendingSheet.
1749         This is needed to make sure our style selector contains an up-to-date list of stylesheets.
1750
1751         The gist of the patch adds a way for style sheet owner element to know if we are
1752         programmatically loading a style sheet. This is needed as <link> keeps the information
1753         about that last loaded stylesheet.
1754
1755         * css/CSSImportRule.cpp:
1756         (WebCore::CSSImportRule::insertedIntoParent): Call startLoadingDynamicSheet
1757         on our parent style sheet instead of directly adding a pending style sheet.
1758
1759         * css/CSSStyleSheet.cpp:
1760         (WebCore::CSSStyleSheet::startLoadingDynamicSheet): Call startLoadingDynamicSheet
1761         on our owner element if we have one.
1762
1763         * css/CSSStyleSheet.h:
1764         * dom/Node.h:
1765         (WebCore::Node::startLoadingDynamicSheet): Added common implementation of
1766         startLoadingDynamicSheet, which should never be called.
1767
1768         * dom/StyleElement.cpp:
1769         (WebCore::StyleElement::startLoadingDynamicSheet):
1770         * dom/StyleElement.h:
1771         Common implementation of startLoadingDynamicSheet for style elements.
1772
1773         * html/HTMLLinkElement.cpp:
1774         (WebCore::HTMLLinkElement::startLoadingDynamicSheet):
1775         * html/HTMLLinkElement.h:
1776         Use the HTMLLinkElement plumbing to make sure we call addRemovePendingSheet.
1777
1778         * html/HTMLStyleElement.h:
1779         (WebCore::HTMLStyleElement::startLoadingDynamicSheet):
1780         * svg/SVGStyleElement.h:
1781         (WebCore::SVGStyleElement::startLoadingDynamicSheet):
1782         Forward the call to StyleElement.
1783
1784 2011-06-01  Levi Weintraub  <leviw@chromium.org>
1785
1786         Reviewed by Eric Seidel.
1787
1788         Switch paintCustomHighlight to use IntPoint
1789         https://bugs.webkit.org/show_bug.cgi?id=61562
1790
1791         Switching paintCustomHighlight to use an IntPoint for
1792         its paint offset instead of a pair of ints.
1793
1794         No new tests since this is refactoring.
1795
1796         * rendering/InlineTextBox.cpp:
1797         (WebCore::InlineTextBox::paint):
1798         (WebCore::InlineTextBox::paintCustomHighlight):
1799         * rendering/InlineTextBox.h:
1800         * rendering/RenderBox.cpp:
1801         (WebCore::RenderBox::paintCustomHighlight):
1802         * rendering/RenderBox.h:
1803         * rendering/RenderImage.cpp:
1804         (WebCore::RenderImage::paintReplaced):
1805         * rendering/RenderListMarker.cpp:
1806         (WebCore::RenderListMarker::paint):
1807         * rendering/RenderWidget.cpp:
1808         (WebCore::RenderWidget::paint):
1809         * rendering/RootInlineBox.cpp:
1810         (WebCore::RootInlineBox::paintCustomHighlight):
1811         (WebCore::RootInlineBox::paint):
1812         * rendering/RootInlineBox.h:
1813
1814 2011-06-01  Emil A Eklund  <eae@chromium.org>
1815
1816         Reviewed by Eric Seidel.
1817
1818         Switch MouseRelatedEvent to use IntPoint
1819         https://bugs.webkit.org/show_bug.cgi?id=61574
1820
1821         Covered by existing tests.
1822
1823         * dom/MouseEvent.cpp:
1824         (WebCore::MouseEvent::MouseEvent):
1825         (WebCore::MouseEvent::initMouseEvent):
1826         (WebCore::SimulatedMouseEvent::SimulatedMouseEvent):
1827         * dom/MouseRelatedEvent.cpp:
1828         (WebCore::MouseRelatedEvent::MouseRelatedEvent):
1829         (WebCore::contentsScrollOffset):
1830         (WebCore::MouseRelatedEvent::initCoordinates):
1831         (WebCore::MouseRelatedEvent::computeRelativePosition):
1832         (WebCore::MouseRelatedEvent::layerX):
1833         (WebCore::MouseRelatedEvent::layerY):
1834         (WebCore::MouseRelatedEvent::offsetX):
1835         (WebCore::MouseRelatedEvent::offsetY):
1836         (WebCore::MouseRelatedEvent::pageX):
1837         (WebCore::MouseRelatedEvent::pageY):
1838         (WebCore::MouseRelatedEvent::pageLocation):
1839         (WebCore::MouseRelatedEvent::x):
1840         (WebCore::MouseRelatedEvent::y):
1841         * dom/MouseRelatedEvent.h:
1842         (WebCore::MouseRelatedEvent::screenX):
1843         (WebCore::MouseRelatedEvent::screenY):
1844         (WebCore::MouseRelatedEvent::screenLocation):
1845         (WebCore::MouseRelatedEvent::clientX):
1846         (WebCore::MouseRelatedEvent::clientY):
1847         (WebCore::MouseRelatedEvent::clientLocation):
1848         (WebCore::MouseRelatedEvent::absoluteLocation):
1849         * dom/TouchEvent.cpp:
1850         (WebCore::TouchEvent::TouchEvent):
1851         (WebCore::TouchEvent::initTouchEvent):
1852         * dom/WheelEvent.cpp:
1853         (WebCore::WheelEvent::WheelEvent):
1854         (WebCore::WheelEvent::initWheelEvent):
1855         (WebCore::WheelEventDispatchMediator::WheelEventDispatchMediator):
1856         * dom/WheelEvent.h:
1857         (WebCore::WheelEvent::create):
1858         (WebCore::WheelEvent::wheelDelta):
1859         (WebCore::WheelEvent::wheelDeltaX):
1860         (WebCore::WheelEvent::wheelDeltaY):
1861         (WebCore::WheelEvent::rawDeltaX):
1862         (WebCore::WheelEvent::rawDeltaY):
1863         (WebCore::WheelEvent::isHorizontal):
1864         * platform/graphics/IntPoint.h:
1865         (WebCore::IntPoint::scale):
1866
1867 2011-06-01  Levi Weintraub  <leviw@chromium.org>
1868
1869         Reviewed by Eric Seidel.
1870
1871         Switch paintOverflowControls to use IntPoint
1872         https://bugs.webkit.org/show_bug.cgi?id=61884
1873
1874         Switching paintOverflowControls to use an IntPoint instead of a pair of ints.
1875
1876         No new tests since this is simple refactoring.
1877
1878         * rendering/RenderBlock.cpp:
1879         (WebCore::RenderBlock::paint):
1880         * rendering/RenderLayer.cpp:
1881         (WebCore::RenderLayer::paintOverflowControls):
1882         (WebCore::RenderLayer::paintLayer):
1883         * rendering/RenderLayer.h:
1884         * rendering/RenderLayerBacking.cpp:
1885         (WebCore::RenderLayerBacking::paintIntoLayer):
1886
1887 2011-06-01  Abhishek Arya  <inferno@chromium.org>
1888
1889         Reviewed by Alexey Proskuryakov.
1890
1891         Fix setting of document.body
1892         https://bugs.webkit.org/show_bug.cgi?id=60831
1893
1894         1. Only allowing setting to an element if it has a body tag.
1895         2. If element is from another document, import it.
1896
1897         Test: fast/dom/document-set-body.html
1898
1899         * dom/Document.cpp:
1900         (WebCore::Document::setBody):
1901
1902 2011-06-01  Chris Fleizach  <cfleizach@apple.com>
1903
1904         Reviewed by Darin Adler.
1905
1906         Safari always crashes on http://bbc.co.uk when VoiceOver enabled
1907         https://bugs.webkit.org/show_bug.cgi?id=61886
1908
1909         This crash can happen on webpages that remove an element from the DOM when the element receives focus.
1910         When AppKit goes to post a notification to inform VoiceOver the focus has changed, it asks for the AXFocusedUIElement.
1911         However by posting that notification, a render tree update is performed. This causes the element to disappear, but
1912         AppKit still has a handle to it and continues to try to reference it. When the autorelease pool pops, the reference goes bad.
1913
1914         To fix, the root element, the AccessibilityScrollView, needs to implement updateBackingStore(), otherwise this method 
1915         will not be called in time.
1916
1917         No test could be created because to cause it depends on an internal AppKit mechanism
1918         that is only triggered remotely through the accessibility runtime.
1919
1920         * accessibility/AccessibilityObject.cpp:
1921         (WebCore::AccessibilityObject::updateBackingStore):
1922         * accessibility/AccessibilityObject.h:
1923         * accessibility/AccessibilityRenderObject.cpp:
1924         * accessibility/AccessibilityRenderObject.h:
1925
1926 2011-06-01  David Carson  <dacarson@apple.com>
1927
1928         Reviewed by Antti Koivisto.
1929
1930         https://bugs.webkit.org/show_bug.cgi?id=61831
1931         If width and height of an iframe is fixed and should not be visible, then
1932         it shouldn't be flattened.
1933
1934         Test: fast/frames/flattening/iframe-flattening-fixed-width-and-height-zero-size.html
1935
1936         * rendering/RenderIFrame.cpp:
1937         (WebCore::RenderIFrame::flattenFrame): add a check for a zero width or height
1938
1939 2011-06-01  Daniel Cheng  <dcheng@chromium.org>
1940
1941         Reviewed by Tony Chang.
1942
1943         [chromium] Use correct file name for dragging out images.
1944         https://bugs.webkit.org/show_bug.cgi?id=24887
1945
1946         We try to guess an appropriate filename when dragging out images. In order, we try to use:
1947         - The filename suggested in the HTTP header.
1948         - The last path component of the source URL.
1949         - The alt text.
1950         This matches the behavior of the other WebKit ports.
1951
1952         Test: fast/events/drag-image-filename.html
1953
1954         * platform/chromium/ClipboardChromium.cpp:
1955         (WebCore::writeImageToDataObject):
1956         * platform/chromium/ClipboardChromiumMac.cpp:
1957         (WebCore::isInvalidFileCharacter):
1958         (WebCore::ClipboardChromium::validateFileName):
1959
1960 2011-06-01  Levi Weintraub  <leviw@chromium.org>
1961
1962         Reviewed by Eric Seidel.
1963
1964         Text is scaled in a stair-step pattern
1965         https://bugs.webkit.org/show_bug.cgi?id=60317
1966
1967         Stop scaling the specified font to the actual on-screen value when font-rendering: 
1968         geometricPrecision is specified, but instead scale the graphics context. This allows
1969         us to scale text up and down smoothly.
1970
1971         Test: svg/text/scaling-font-with-geometric-precision.html
1972
1973         * rendering/svg/RenderSVGInlineText.cpp:
1974         (WebCore::RenderSVGInlineText::computeNewScaledFontForStyle):
1975
1976 2011-06-01  Levi Weintraub  <leviw@chromium.org>
1977
1978         Reviewed by Eric Seidel.
1979
1980         Switch paintResizer to use IntPoint
1981         https://bugs.webkit.org/show_bug.cgi?id=61883
1982
1983         Switch paintResizer to take an IntPoint instead of a pair of ints.
1984
1985         No new tests as this is simple refactoring.
1986
1987         * rendering/RenderLayer.cpp:
1988         (WebCore::RenderLayer::paintOverflowControls):
1989         (WebCore::RenderLayer::paintResizer):
1990         * rendering/RenderLayer.h:
1991         * rendering/RenderLayerBacking.cpp:
1992         (WebCore::RenderLayerBacking::paintContents):
1993
1994 2011-06-01  Jer Noble  <jer.noble@apple.com>
1995
1996         Reviewed by Darin Adler.
1997
1998         Page layout messed up after exiting full screen at Apple trailers page
1999         https://bugs.webkit.org/show_bug.cgi?id=61755
2000         <rdar://problem/9525277>
2001
2002         Test: fullscreen/full-screen-zIndex-after.html
2003
2004         Fix the incomplete implementation of r87660. Make parameters to
2005         setContainsFullScreenElementRecursively() in webkitWillExitFullScreenForElement() match those
2006         in webkitWillEnterFullScreenForElement(), so the ancestors' flags do not become
2007         inconsistent..
2008
2009         * dom/Document.cpp:
2010         (WebCore::Document::webkitWillExitFullScreenForElement):
2011
2012 2011-06-01  Levi Weintraub  <leviw@chromium.org>
2013
2014         Reviewed by Eric Seidel.
2015
2016         Switch paintScrollCorner to use IntPoint
2017         https://bugs.webkit.org/show_bug.cgi?id=61874
2018
2019         Changing paintScrollCorner to take an IntPoint representing the paint
2020         offset instead of a pair of ints.
2021
2022         No new tests as this is simple refactoring.
2023
2024         * rendering/RenderLayer.cpp:
2025         (WebCore::RenderLayer::paintOverflowControls):
2026         (WebCore::RenderLayer::paintScrollCorner):
2027         * rendering/RenderLayer.h:
2028         * rendering/RenderLayerBacking.cpp:
2029         (WebCore::RenderLayerBacking::paintContents):
2030
2031 2011-06-01  Kenneth Russell  <kbr@google.com>
2032
2033         Reviewed by Nate Chapin.
2034
2035         [V8] Optimize fetches of indexed properties in custom bindings
2036         https://bugs.webkit.org/show_bug.cgi?id=61821
2037
2038         Avoid allocating garbage in affected custom bindings. This speeds
2039         up one test case by at least a factor of two. No new tests;
2040         covered by existing layout tests (typed array and otherwise).
2041
2042         * bindings/v8/custom/V8ArrayBufferViewCustom.h:
2043         (WebCore::constructWebGLArray):
2044         (WebCore::setWebGLArrayHelper):
2045         * bindings/v8/custom/V8InspectorFrontendHostCustom.cpp:
2046         (WebCore::V8InspectorFrontendHost::showContextMenuCallback):
2047         * bindings/v8/custom/V8MessagePortCustom.cpp:
2048         (WebCore::getMessagePortArray):
2049         * bindings/v8/custom/V8WebGLRenderingContextCustom.cpp:
2050         (WebCore::jsArrayToFloatArray):
2051         (WebCore::jsArrayToIntArray):
2052
2053 2011-06-01  Andras Becsi  <abecsi@webkit.org>
2054
2055         Reviewed by Csaba Osztrogonác.
2056
2057         [Qt] Fix the Phonon build when logging is disabled
2058         https://bugs.webkit.org/show_bug.cgi?id=61869
2059
2060         No new tests needed.
2061
2062         * platform/graphics/qt/MediaPlayerPrivatePhonon.cpp: Add missing guards.
2063         (WebCore::MediaPlayerPrivatePhonon::networkState):
2064         (WebCore::MediaPlayerPrivatePhonon::readyState):
2065         (WebCore::MediaPlayerPrivatePhonon::updateStates):
2066         (WebCore::MediaPlayerPrivatePhonon::stateChanged):
2067
2068 2011-06-01  Abhishek Arya  <inferno@chromium.org>
2069
2070         Reviewed by Antti Koivisto.
2071
2072         Do not use the pushed style selector if it is not equal to the
2073         parent document's style selector. It usually means that it is
2074         in a bad state, e.g. already cleared.
2075         https://bugs.webkit.org/show_bug.cgi?id=61737
2076
2077         * dom/Element.cpp:
2078         (WebCore::StyleSelectorParentPusher::~StyleSelectorParentPusher):
2079
2080 2011-06-01  Levi Weintraub  <leviw@chromium.org>
2081
2082         Reviewed by Eric Seidel.
2083
2084         Switch RenderLineBoxList intersection functions to use IntPoint
2085         https://bugs.webkit.org/show_bug.cgi?id=61794
2086
2087         Switching rangeIntersectsRect, anyLineIntersectsRect, and lineIntersectsDirtyRect
2088         to take IntPoint instead of a tx/ty to represent the offset to be applied match
2089         the rect and lines' coordinates.
2090
2091         No new tests since this is merely refactoring.
2092
2093         * rendering/RenderLineBoxList.cpp:
2094         (WebCore::RenderLineBoxList::rangeIntersectsRect):
2095         (WebCore::RenderLineBoxList::anyLineIntersectsRect):
2096         (WebCore::RenderLineBoxList::lineIntersectsDirtyRect):
2097         (WebCore::RenderLineBoxList::paint):
2098         (WebCore::RenderLineBoxList::hitTest):
2099         * rendering/RenderLineBoxList.h:
2100
2101 2011-05-19  Adrienne Walker  <enne@google.com>
2102
2103         Reviewed by James Robinson.
2104
2105         [chromium] Don't split long, narrow layers into multiple tiles.
2106         https://bugs.webkit.org/show_bug.cgi?id=60821
2107
2108         This changes the heuristic for when we tile layers to be less bad
2109         about wasting texture space.  Long, narrow layers that are tiled with
2110         a large tile size waste texture space.  Now layers are only tiled if
2111         they are above 512px in one dimension and extend into a second tile in
2112         the other.  If they are not tiled, their layer texture will exactly
2113         fit their layer bounds.  In particular, this will help scrollbars.
2114
2115         * platform/graphics/chromium/ContentLayerChromium.cpp:
2116         (WebCore::ContentLayerChromium::updateLayerSize):
2117         * platform/graphics/chromium/LayerRendererChromium.h:
2118         (WebCore::LayerRendererChromium::maxTextureSize):
2119
2120 2011-06-01  Cary Clark  <caryclark@google.com>
2121
2122         Reviewed by Eric Seidel.
2123
2124         Ready Chromium port for Skia on Mac
2125         https://bugs.webkit.org/show_bug.cgi?id=61800
2126
2127         Skia on Mac is not enabled. The executing
2128         code is unchanged, so there are no new tests.
2129
2130         * platform/chromium/DragImageRef.h:
2131         Use Skia for DragImageRef instead of CG.
2132
2133         * platform/chromium/ScrollbarThemeChromiumMac.mm:
2134         (WebCore::ScrollbarThemeChromiumMac::paint):
2135         Get the total matrix from Skia for the scrollbar.
2136         Convert the SkCanvas into a CGContext to draw.
2137
2138         * platform/chromium/ThemeChromiumMac.mm:
2139         (WebCore::paintStepper):
2140         Ditto.
2141
2142 2011-06-01  Yury Semikhatsky  <yurys@chromium.org>
2143
2144         Reviewed by Pavel Feldman.
2145
2146         Web Inspector: allow opening inspector for existing workers
2147         https://bugs.webkit.org/show_bug.cgi?id=61853
2148
2149         Added sidebar pane with a list of all workers. Each worker has a check box
2150         that allows opening inspector for the worker.
2151
2152         * inspector/Inspector.json:
2153         * inspector/InspectorInstrumentation.cpp:
2154         (WebCore::InspectorInstrumentation::didStartWorkerContextImpl):
2155         * inspector/InspectorInstrumentation.h:
2156         (WebCore::InspectorInstrumentation::didStartWorkerContext):
2157         * inspector/InspectorWorkerAgent.cpp:
2158         (WebCore::InspectorWorkerAgent::WorkerFrontendChannel::WorkerFrontendChannel):
2159         (WebCore::InspectorWorkerAgent::WorkerFrontendChannel::~WorkerFrontendChannel):
2160         (WebCore::InspectorWorkerAgent::WorkerFrontendChannel::connectToWorkerContext):
2161         (WebCore::InspectorWorkerAgent::WorkerFrontendChannel::disconnectFromWorkerContext):
2162         (WebCore::InspectorWorkerAgent::clearFrontend):
2163         (WebCore::InspectorWorkerAgent::connectToWorker):
2164         (WebCore::InspectorWorkerAgent::disconnectFromWorker):
2165         (WebCore::InspectorWorkerAgent::didStartWorkerContext):
2166         * inspector/InspectorWorkerAgent.h:
2167         * inspector/front-end/ScriptsPanel.js:
2168         (WebInspector.ScriptsPanel):
2169         * inspector/front-end/Settings.js:
2170         * inspector/front-end/WorkerManager.js:
2171         (WebInspector.WorkerManager):
2172         (WebInspector.WorkerManager.prototype._workerCreated):
2173         (WebInspector.WorkerManager.prototype._sendMessageToWorkerInspector):
2174         (WebInspector.WorkerManager.prototype.openWorkerInspector):
2175         (WebInspector.WorkerManager.prototype.closeWorkerInspector):
2176         (WebInspector.WorkerManager.prototype._workerInspectorClosing):
2177         (WebInspector.WorkerMessageForwarder):
2178         (WebInspector.WorkerMessageForwarder.prototype.workerCreated):
2179         (WebInspector.WorkerMessageForwarder.prototype.dispatchMessageFromWorker):
2180         * inspector/front-end/WorkersSidebarPane.js:
2181         (WebInspector.WorkersSidebarPane):
2182         (WebInspector.WorkersSidebarPane.prototype.addWorker):
2183         (WebInspector.WorkerListSidebarPane):
2184         (WebInspector.WorkerListSidebarPane.prototype._workerAdded):
2185         (WebInspector.WorkerListSidebarPane.prototype._workerRemoved):
2186         (WebInspector.WorkerListSidebarPane.prototype._workerInspectorClosed):
2187         (WebInspector.WorkerListSidebarPane.prototype._addWorker):
2188         (WebInspector.WorkerListSidebarPane.prototype._createCheckbox):
2189         (WebInspector.WorkerListSidebarPane.prototype._workerItemClicked):
2190         * workers/Worker.cpp:
2191         (WebCore::Worker::notifyFinished):
2192
2193 2011-06-01  Shishir Agrawal  <shishir@chromium.org>
2194
2195         Reviewed by Tony Gentilcore.
2196
2197         Renaming the Page Visibility attributes as per the modified spec draft.
2198         https://bugs.webkit.org/show_bug.cgi?id=61825
2199
2200         Spec draft:
2201         http://dvcs.w3.org/hg/webperf/raw-file/tip/specs/PageVisibility/Overview.html
2202
2203         - Event needs to be webkitVisibilityChange from webkitVisibilityStateChange
2204         - The attribute webkitIsVisible needs to change to webkitHidden
2205
2206         * dom/Document.cpp:
2207         (WebCore::Document::webkitHidden):
2208         (WebCore::Document::dispatchVisibilityStateChangeEvent):
2209         * dom/Document.h:
2210         * dom/Document.idl:
2211         * dom/EventNames.h:
2212
2213 2011-06-01  Nikolas Zimmermann  <nzimmermann@rim.com>
2214
2215         Reviewed by Rob Buis.
2216
2217         Remove duplicated code in various computeReplacedLogical*() functions
2218         https://bugs.webkit.org/show_bug.cgi?id=61860
2219
2220         Centralize this calculation in RenderBox::computeReplacedLogicalWidthRespectingMinMaxWidth:
2221         int minLogicalWidth = computeReplacedLogicalWidthUsing(style()->logicalMinWidth());
2222         int maxLogicalWidth = !includeMaxWidth || style()->logicalMaxWidth().isUndefined() ? logicalWidth : computeReplacedLogicalWidthUsing(style()->logicalMaxWidth());
2223         return max(minLogicalWidth, min(logicalWidth, maxLogicalWidth));
2224
2225         Centralize this calculation in RenderBox::computeReplacedLogicalHeightRespectingMinMaxHeight:
2226         int minLogicalHeight = computeReplacedLogicalHeightUsing(style()->logicalMinHeight());
2227         int maxLogicalHeight = style()->logicalMaxHeight().isUndefined() ? logicalHeight : computeReplacedLogicalHeightUsing(style()->logicalMaxHeight());
2228         return max(minLogicalHeight, min(logicalHeight, maxLogicalHeight));
2229
2230         Use the new helper methods where possible, deduplicating lots of code.
2231
2232         * rendering/RenderBox.cpp:
2233         (WebCore::RenderBox::computeReplacedLogicalWidth):
2234         (WebCore::RenderBox::computeReplacedLogicalWidthRespectingMinMaxWidth):
2235         (WebCore::RenderBox::computeReplacedLogicalHeight):
2236         (WebCore::RenderBox::computeReplacedLogicalHeightRespectingMinMaxHeight):
2237         * rendering/RenderBox.h:
2238         * rendering/RenderImage.cpp:
2239         (WebCore::RenderImage::computeReplacedLogicalWidth):
2240         (WebCore::RenderImage::computeReplacedLogicalHeight):
2241         * rendering/RenderPart.cpp:
2242         (WebCore::RenderPart::computeEmbeddedDocumentReplacedWidth):
2243         (WebCore::RenderPart::computeEmbeddedDocumentReplacedHeight):
2244         (WebCore::RenderPart::computeReplacedLogicalWidth):
2245         (WebCore::RenderPart::computeReplacedLogicalHeight):
2246         * rendering/RenderPart.h:
2247         * rendering/RenderReplaced.cpp:
2248         (WebCore::RenderReplaced::computeReplacedLogicalWidth):
2249         (WebCore::RenderReplaced::computeReplacedLogicalHeight):
2250         * rendering/svg/RenderSVGRoot.cpp:
2251         (WebCore::RenderSVGRoot::computeReplacedLogicalWidth):
2252         (WebCore::RenderSVGRoot::computeReplacedLogicalHeight):
2253
2254 2011-06-01  Sheriff Bot  <webkit.review.bot@gmail.com>
2255
2256         Unreviewed, rolling out r87788.
2257         http://trac.webkit.org/changeset/87788
2258         https://bugs.webkit.org/show_bug.cgi?id=61856
2259
2260         breaks windows chromium canary (Requested by jknotten on
2261         #webkit).
2262
2263         * loader/archive/mhtml/MHTMLArchive.cpp:
2264         * loader/archive/mhtml/MHTMLArchive.h:
2265         * page/PageSerializer.cpp:
2266         (WebCore::PageSerializer::serializeFrame):
2267         (WebCore::PageSerializer::serializeCSSStyleSheet):
2268         * platform/SharedBuffer.cpp:
2269         * platform/SharedBuffer.h:
2270
2271 2011-06-01  Joseph Pecoraro  <joepeck@webkit.org>
2272
2273         Reviewed by Pavel Feldman.
2274
2275         Web Inspector: [JSC] JSLock ASSERTs Seen Under eventListenerHandlerBody
2276         https://bugs.webkit.org/show_bug.cgi?id=61835
2277
2278         Add a JSLock call before possible allocations in jsFunction and toString.
2279
2280         * bindings/js/ScriptEventListener.cpp:
2281         (WebCore::eventListenerHandlerBody):
2282
2283 2011-06-01  Jay Civelli  <jcivelli@chromium.org>
2284
2285         Reviewed by Adam Barth.
2286
2287         Adding MHTML generation support to MHTMLArchive.
2288         https://bugs.webkit.org/show_bug.cgi?id=7169
2289
2290         * loader/archive/mhtml/MHTMLArchive.cpp:
2291         (WebCore::generateRandomBoundary):
2292         (WebCore::replaceNonPrintableCharacters):
2293         (WebCore::MHTMLArchive::generateMHTMLData):
2294         * loader/archive/mhtml/MHTMLArchive.h:
2295         * page/PageSerializer.cpp:
2296         (WebCore::PageSerializer::serializeFrame):
2297         (WebCore::PageSerializer::serializeCSSStyleSheet):
2298         * platform/SharedBuffer.cpp:
2299         (WebCore::SharedBuffer::append):
2300         * platform/SharedBuffer.h:
2301
2302 2011-06-01  Dimitri Glazkov  <dglazkov@chromium.org>
2303
2304         Reviewed by Kent Tamura.
2305
2306         Remove ShadowElement and compact remaining used bits into RenderFileUploadControl.
2307         https://bugs.webkit.org/show_bug.cgi?id=61816
2308
2309         This is a near-mechanical move-and-rename of ShadowElement, which is now only
2310         used by input[type=file]. Next step -- switch it over to new shadow DOM.
2311
2312         Refactoring, no change in behavior.
2313
2314         * CMakeLists.txt: Removed ShadowElement.cpp and ShadowElement.h.
2315         * GNUmakefile.list.am: Ditto.
2316         * WebCore.gypi: Ditto.
2317         * WebCore.pro: Ditto.
2318         * WebCore/WebCore.vcproj/WebCore.vcproj: Ditto.
2319         * WebCore.xcodeproj/project.pbxproj: Ditto.
2320         * WebCore/rendering/RenderingAllInOne.cpp: Ditto.
2321         * rendering/RenderFileUploadControl.cpp:
2322         (WebCore::UploadButton::create): Moved from ShadowElement, renamed as UploadButton.
2323         (WebCore::UploadButton::detach): Ditto.
2324         (WebCore::UploadButton::UploadButton): Ditto.
2325         (WebCore::RenderFileUploadControl::updateFromElement): Changed to use UploadButton.
2326         * rendering/RenderMeter.cpp: Removed ShadowElement.h include, which is no longer used.
2327         * rendering/RenderProgress.cpp: Ditto.
2328         * rendering/ShadowElement.cpp: Removed.
2329         * rendering/ShadowElement.h: Removed.
2330
2331 2011-06-01  Nikolas Zimmermann  <nzimmermann@rim.com>
2332
2333         Reviewed by Rob Buis.
2334
2335         SVG fails all 3 of Hixie's CSS intrinsic sizing tests
2336         https://bugs.webkit.org/show_bug.cgi?id=15473
2337
2338         Hixies CSS intrinsic sizing tests cover percentage sizes specified on the target SVG document as width/height attributes
2339         and using width: auto / height: auto on the <object> that hosts the SVG document. Take percentage sizes of the outermost
2340         SVGs width/height attributes into account when determining the intrinsic size of the <object>.
2341
2342         Added several other testcases demonstrating several scenarios. All tests work exactly the same in WebKit and Firefox now.
2343         The *on-target-svg-absolute.xhtml tests look equal to WebKit/FF but Opera fails them, likely a relict of the different
2344         interpretation of the intrinsic size of a SVG document in SVG Tiny 1.2.
2345
2346         Tests: svg/custom/object-sizing-height-50p-on-target-svg-absolute.xhtml
2347                svg/custom/object-sizing-height-50p-on-target-svg.xhtml
2348                svg/custom/object-sizing-width-50p-height-50p-on-target-svg-absolute.xhtml
2349                svg/custom/object-sizing-width-50p-height-50p-on-target-svg.xhtml
2350                svg/custom/object-sizing-width-50p-height-75p-on-target-svg-absolute.xhtml
2351                svg/custom/object-sizing-width-50p-height-75p-on-target-svg.xhtml
2352                svg/custom/object-sizing-width-50p-on-target-svg-absolute.xhtml
2353                svg/custom/object-sizing-width-50p-on-target-svg.xhtml
2354                svg/custom/object-sizing-width-75p-height-50p-on-target-svg-absolute.xhtml
2355                svg/custom/object-sizing-width-75p-height-50p-on-target-svg.xhtml
2356                svg/hixie/intrinsic/001.html
2357                svg/hixie/intrinsic/002.html
2358                svg/hixie/intrinsic/003.html
2359
2360         * rendering/RenderPart.cpp:
2361         (WebCore::RenderPart::computeReplacedLogicalWidth):
2362         (WebCore::RenderPart::computeReplacedLogicalHeight):
2363         * rendering/svg/RenderSVGRoot.cpp:
2364         (WebCore::RenderSVGRoot::computeIntrinsicRatio):
2365         * rendering/svg/RenderSVGRoot.h:
2366
2367 2011-05-31  Tonis Tiigi  <tonistiigi@gmail.com>
2368
2369         Reviewed by Pavel Feldman.
2370
2371         Web Inspector: Timeline panel improvements for managing current selection
2372         https://bugs.webkit.org/show_bug.cgi?id=61468
2373
2374         Enables X-axis dragging of the selected area.
2375         Double click zoom-out.
2376         Fixes slightly wrong selection area position.
2377
2378         * inspector/front-end/TimelineOverviewPane.js:
2379         (WebInspector.TimelineOverviewPane):
2380         (WebInspector.TimelineOverviewPane.prototype._dragWindow):
2381         (WebInspector.TimelineOverviewPane.prototype._endWindowSelectorDragging):
2382         (WebInspector.TimelineOverviewPane.prototype._resizeWindowRight):
2383         (WebInspector.TimelineOverviewPane.prototype._resizeWindowMaximum):
2384         (WebInspector.TimelineOverviewPane.prototype.scrollWindow):
2385         (WebInspector.TimelineOverviewPane.prototype._createTimelineCategoryStatusBarCheckbox):
2386         * inspector/front-end/TimelinePanel.js:
2387         (WebInspector.TimelinePanel):
2388
2389 2011-05-31  Keishi Hattori  <keishi@webkit.org>
2390
2391         Reviewed by Kent Tamura.
2392
2393         Fix to enable page scroll of select element
2394         https://bugs.webkit.org/show_bug.cgi?id=53628
2395
2396         Manual test: select-page-scroll.html
2397
2398         * manual-tests/select-page-scroll.html: Added.
2399         * rendering/RenderListBox.cpp:
2400         (WebCore::RenderListBox::computeLogicalHeight): Fix min to max.
2401
2402 2011-05-31  Yong Li  <yoli@rim.com>
2403
2404         Reviewed by Eric Seidel.
2405
2406         https://bugs.webkit.org/show_bug.cgi?id=54807
2407         We have been assuming plain bitfields (like "int a : 31") are always signed integers.
2408         However some compilers can treat them as unsigned. For example, RVCT 4.0 states plain
2409         bitfields (declared without either signed or unsigned qualifiers) are treats as unsigned.
2410         http://infocenter.arm.com/help/index.jsp?topic=/com.arm.doc.dui0348c/Babjddhe.html
2411         Although we can use "--signed-bitfields" flag to make RVCT 4.0 behave as most other compilers,
2412         always using "signed"/"unsigned" qualifier to declare integral type bitfields is still a good
2413         rule we should have in order to make our code independent from compilers and compiler flags.
2414
2415         No new test added because this change is not known to fix any issue.
2416
2417         * css/CSSPrimitiveValue.h:
2418         * css/CSSProperty.h:
2419         * rendering/InlineBox.h:
2420         * rendering/RenderBlock.h:
2421
2422 2011-05-31  Hironori Bono  <hbono@chromium.org>
2423
2424         Reviewed by Eric Seidel.
2425
2426         Send an input event when we change the text direction.
2427         https://bugs.webkit.org/show_bug.cgi?id=50952
2428
2429         Both Safari and Chrome call Editor::setBaseWritingDirection() to change
2430         the text direction of an editable element with their UIs. This change
2431         calls dispatchInputEvent() to send an input event when the function
2432         actually changes the "dir" attribute so we can send an input event as
2433         written in the HTML5 spec.
2434
2435         Test: fast/html/set-text-direction.html
2436
2437         * editing/Editor.cpp:
2438         (WebCore::Editor::setBaseWritingDirection):
2439
2440 2011-05-31  Jer Noble  <jer.noble@apple.com>
2441
2442         Reviewed by Darin Adler.
2443
2444         Flash of black at the end of full screen transition at apple.com product videos
2445         https://bugs.webkit.org/show_bug.cgi?id=61756
2446
2447         Added two new entries to the WebCore exports list.
2448
2449         * WebCore.exp.in:
2450
2451 2011-05-31  Rafael Brandao  <rafael.lobo@openbossa.org>
2452
2453         Reviewed by Andreas Kling.
2454
2455         [Qt] tst_QWebFrame::render() failing
2456         https://bugs.webkit.org/show_bug.cgi?id=60893
2457
2458         Due a problem on QPicture (http://bugreports.qt.nokia.com/browse/QTBUG-19496),
2459         this test was calculating the final geometry incorrectly. As the order between
2460         a translate and a draw operation could be relevant for it, but not for the
2461         final rendered result, they were changed on ScrollbarThemeQt::paint.
2462
2463         * platform/qt/ScrollbarThemeQt.cpp:
2464         (WebCore::ScrollbarThemeQt::paint):
2465
2466 2011-05-27  Adrienne Walker  <enne@google.com>
2467
2468         Reviewed by James Robinson.
2469
2470         [chromium] Fix crash from empty reflections with masks
2471         https://bugs.webkit.org/show_bug.cgi?id=61654
2472
2473         Change the iteration for updateCompositorResources to match that being
2474         done in the paint and draw steps.  This mismatch of iteration style
2475         was causing layers with replica masks to correctly get skipped while
2476         painting but not get skipped during texture upload.
2477
2478         Test: compositing/reflections/empty-reflection-with-mask.html
2479
2480         * platform/graphics/chromium/LayerRendererChromium.cpp:
2481         (WebCore::LayerRendererChromium::updateLayers):
2482         (WebCore::LayerRendererChromium::updateCompositorResources):
2483         * platform/graphics/chromium/LayerRendererChromium.h:
2484
2485 2011-05-31  B.J. Wever  <skylined@chromium.org>
2486
2487         Reviewed by Adam Barth.
2488
2489         requestFileSystem and resolveLocalFileSystemURI are not checking if
2490         errorCallback is NULL before scheduling a callback on error.
2491         https://bugs.webkit.org/show_bug.cgi?id=49539
2492
2493         Test: fast/filesystem/filesystem-no-callback-null-ptr-crash.html
2494
2495         * fileapi/DOMFileSystem.cpp:
2496         (WebCore::DOMFileSystem::scheduleCallback): Only call callback if
2497           one is supplied.
2498
2499 2011-05-31  Brady Eidson  <beidson@apple.com>
2500
2501         Reviewed by Darin Adler.
2502
2503         Another swipe at resolving <rdar://problem/9125145> and https://bugs.webkit.org/show_bug.cgi?id=61494
2504         
2505         Re-land http://trac.webkit.org/changeset/87566 with invalid ASSERTs removed.
2506
2507         No new tests. No change in behavior.
2508
2509         Instead of storing the DocumentLoader at construction and never changing it,
2510         always calculate it based on the FrameLoader's current DocumentLoader:
2511         * dom/Document.cpp:
2512         (WebCore::Document::Document):
2513         (WebCore::Document::suggestedMIMEType):
2514         (WebCore::Document::lastModified):
2515         (WebCore::Document::initSecurityContext):
2516         (WebCore::Document::updateURLForPushOrReplaceState):
2517         (WebCore::Document::loader):
2518         * dom/Document.h:
2519
2520         Null-check or ASSERT that the DocumentLoader exists (or both) depending on the scenario:
2521         * bindings/ScriptControllerBase.cpp:
2522         (WebCore::ScriptController::executeIfJavaScriptURL):
2523         * html/MediaDocument.cpp:
2524         (WebCore::MediaDocument::replaceMediaElementTimerFired):
2525         * html/PluginDocument.cpp:
2526         (WebCore::PluginDocumentParser::createDocumentStructure):
2527         * platform/mac/HTMLConverter.mm:
2528         (fileWrapperForElement):
2529
2530         * WebCore.exp.in:
2531
2532 2011-05-31  Levi Weintraub  <leviw@chromium.org>
2533
2534         Reviewed by Simon Fraser.
2535
2536         Change InlineBox::paint and its overloaded variants to use IntPoint
2537         https://bugs.webkit.org/show_bug.cgi?id=61804
2538
2539         Changing InlineBox::paint, its 7 overloaded variants, and RootInlineBox::paintEllipsisBox
2540         to use IntPoint for their paint offset instead of a pair of ints.
2541
2542         No new tests since this is just a refactoring.
2543
2544         * rendering/EllipsisBox.cpp:
2545         (WebCore::EllipsisBox::paint):
2546         * rendering/EllipsisBox.h:
2547         * rendering/InlineBox.cpp:
2548         (WebCore::InlineBox::paint):
2549         * rendering/InlineBox.h:
2550         * rendering/InlineFlowBox.cpp:
2551         (WebCore::InlineFlowBox::paint):
2552         * rendering/InlineFlowBox.h:
2553         * rendering/InlineTextBox.cpp:
2554         (WebCore::InlineTextBox::paint):
2555         * rendering/InlineTextBox.h:
2556         * rendering/RenderBlock.cpp:
2557         (WebCore::RenderBlock::paintEllipsisBoxes):
2558         * rendering/RenderBoxModelObject.cpp:
2559         (WebCore::RenderBoxModelObject::paintFillLayerExtended):
2560         * rendering/RenderLineBoxList.cpp:
2561         (WebCore::RenderLineBoxList::paint):
2562         * rendering/RootInlineBox.cpp:
2563         (WebCore::RootInlineBox::paintEllipsisBox):
2564         (WebCore::RootInlineBox::paint):
2565         * rendering/RootInlineBox.h:
2566         * rendering/svg/SVGInlineFlowBox.cpp:
2567         (WebCore::SVGInlineFlowBox::paint):
2568         * rendering/svg/SVGInlineFlowBox.h:
2569         * rendering/svg/SVGInlineTextBox.cpp:
2570         (WebCore::SVGInlineTextBox::paint):
2571         * rendering/svg/SVGInlineTextBox.h:
2572         * rendering/svg/SVGRootInlineBox.cpp:
2573         (WebCore::SVGRootInlineBox::paint):
2574         * rendering/svg/SVGRootInlineBox.h:
2575
2576 2011-05-31  James Robinson  <jamesr@chromium.org>
2577
2578         Reviewed by Kenneth Russell.
2579
2580         [chromium] Clear out LayerChromium's m_ccLayerImpl ptr on CCLayerImpl destruction
2581         https://bugs.webkit.org/show_bug.cgi?id=61593
2582
2583         Whenever a CCLayerImpl is being destroyed, clear out its owner's m_ccLayerImpl pointer.
2584         This is extremely defensive and not strictly necessary, but not harmful either.
2585
2586         * platform/graphics/chromium/LayerChromium.h:
2587         * platform/graphics/chromium/cc/CCLayerImpl.cpp:
2588         (WebCore::CCLayerImpl::~CCLayerImpl):
2589
2590 2011-05-31  Stephen White  <senorblanco@chromium.org>
2591
2592         Unreviewed; build fix.
2593
2594         Silence some warnings on the Safari/Mac release build.
2595
2596         * platform/graphics/gpu/TilingData.h:
2597         (WebCore::TilingData::assertTile):
2598
2599 2011-05-31  Justin Novosad  <junov@chromium.org>
2600
2601         Reviewed by Stephen White.
2602
2603         [Chromium] Build fails when ACCELERATED_2D_CANVAS is disabled
2604         https://bugs.webkit.org/show_bug.cgi?id=61790
2605         Changing the build guards in these two files that are required
2606         by the accelerated compositing feature.
2607
2608         * platform/graphics/gpu/LoopBlinnMathUtils.cpp:
2609         * platform/graphics/gpu/TilingData.cpp:
2610
2611 2011-05-31  Justin Novosad  <junov@chromium.org>
2612
2613         Reviewed by Stephen White.
2614
2615         [Chromium] Build fails when ACCELERATED_2D_CANVAS is disabled
2616         https://bugs.webkit.org/show_bug.cgi?id=61790
2617         Changing the build guards in these two files that are required
2618         by the accelerated compositing feature.
2619
2620         * platform/graphics/gpu/LoopBlinnMathUtils.cpp:
2621         * platform/graphics/gpu/TilingData.cpp:
2622
2623 2011-05-31  Rob Buis  <rbuis@rim.com>
2624
2625         Reviewed by Dirk Schulze.
2626
2627         https://bugs.webkit.org/show_bug.cgi?id=34301
2628         Creating <animateMotion> elements via javascript do not execute
2629
2630         https://bugs.webkit.org/show_bug.cgi?id=17043
2631         SVG missing some .idl files
2632
2633         Add missing idl files.
2634
2635         Test: svg/animations/animate-mpath-insert.html
2636
2637         * CMakeLists.txt:
2638         * CodeGenerators.pri:
2639         * WebCore.gypi:
2640         * WebCore.xcodeproj/project.pbxproj:
2641         * svg/SVGAnimateMotionElement.idl: Added.
2642         * svg/SVGMPathElement.idl: Added.
2643
2644 2011-05-31  Robin Dunn  <robin@alldunn.com>
2645
2646         Reviewed by Kevin Ollivier.
2647
2648         [wx] Implement printing support for wxWidgets 2.9.x and above.
2649         
2650         https://bugs.webkit.org/show_bug.cgi?id=61796
2651
2652         * platform/graphics/GraphicsContext.h:
2653         * platform/graphics/wx/FontWx.cpp:
2654         (WebCore::Font::drawGlyphs):
2655         * platform/graphics/wx/GraphicsContextWx.cpp:
2656         (WebCore::GraphicsContextPlatformPrivate::GraphicsContextPlatformPrivate):
2657         (WebCore::GraphicsContext::drawRect):
2658         (WebCore::GraphicsContext::drawLine):
2659         (WebCore::GraphicsContext::drawEllipse):
2660         (WebCore::GraphicsContext::strokeArc):
2661         (WebCore::GraphicsContext::drawConvexPolygon):
2662         (WebCore::GraphicsContext::fillRect):
2663         (WebCore::GraphicsContext::drawLineForText):
2664         (WebCore::GraphicsContext::scale):
2665         (WebCore::GraphicsContext::currentScale):
2666         * platform/wx/wxcode/win/non-kerned-drawing.cpp:
2667         (WebCore::drawTextWithSpacing):
2668
2669 2011-05-31  Joseph Pecoraro  <joepeck@webkit.org>
2670
2671         Reviewed by Pavel Feldman.
2672
2673         Web Inspector: Missing InspectorFrontendHost.saveSessionSetting function
2674         https://bugs.webkit.org/show_bug.cgi?id=61751
2675
2676         Add missing stub function causing an error on load.
2677
2678         * inspector/front-end/InspectorFrontendHostStub.js:
2679         (.WebInspector.InspectorFrontendHostStub.prototype.saveSessionSetting):
2680
2681 2011-05-31  Abhishek Arya  <inferno@chromium.org>
2682
2683         Reviewed by Dimitri Glazkov.
2684
2685         Improve hasMediaControls logic to check that node has
2686         media controls. This can be false when cloning nodes.
2687         https://bugs.webkit.org/show_bug.cgi?id=61765
2688
2689         Test: media/media-controls-clone-crash.html
2690
2691         * dom/Node.h:
2692         (WebCore::Node::isMediaControls):
2693         * html/HTMLMediaElement.cpp:
2694         (WebCore::HTMLMediaElement::mediaControls):
2695         (WebCore::HTMLMediaElement::hasMediaControls):
2696         * html/shadow/MediaControls.h:
2697         (WebCore::MediaControls::isMediaControls):
2698         (WebCore::toMediaControls):
2699
2700 2011-05-31  Xan Lopez  <xlopez@igalia.com>
2701
2702         Reviewed by Martin Robinson.
2703
2704         [GTK] Provide custom DOM bindings methods to check if input/textareas have been edited
2705         https://bugs.webkit.org/show_bug.cgi?id=61791
2706
2707         * bindings/gobject/GNUmakefile.am: add new files.
2708         * bindings/gobject/WebKitDOMCustom.cpp: Added.
2709         (webkit_dom_html_text_area_element_is_edited):
2710         (webkit_dom_html_input_element_is_edited):
2711         * bindings/gobject/WebKitDOMCustom.h: Added.
2712
2713 2011-05-31  Noam Rosenthal  <noam.rosenthal@nokia.com>
2714
2715         Unreviewed build fix for Symbian.
2716         Opt-out Symbian for TextureMapper.
2717
2718         No new tests: build fix.
2719
2720         * WebCore.pri:
2721
2722 2011-05-31  Levi Weintraub  <leviw@chromium.org>
2723
2724         Reviewed by Eric Seidel.
2725
2726         Switch paintFocusRing to IntPoint
2727         https://bugs.webkit.org/show_bug.cgi?id=61580
2728
2729         Switching paintFocusRing to take an IntPoint representing the paint offset
2730         instead of a pair of ints.
2731
2732         No new tests as this is just refactoring.
2733
2734         * rendering/RenderInline.cpp:
2735         (WebCore::RenderInline::paintOutline):
2736         * rendering/RenderObject.cpp:
2737         (WebCore::RenderObject::paintFocusRing):
2738         (WebCore::RenderObject::paintOutline):
2739         * rendering/RenderObject.h:
2740
2741 2011-05-31  Abhishek Arya  <inferno@chromium.org>
2742
2743         Reviewed by Dimitri Glazkov.
2744
2745         Convert raw ptr to RefPtr for documentElement.
2746         https://bugs.webkit.org/show_bug.cgi?id=61688
2747
2748         Test: fast/dom/xml-parser-error-message-crash.svg
2749
2750         * dom/XMLDocumentParser.cpp:
2751         (WebCore::XMLDocumentParser::insertErrorMessageBlock):
2752
2753 2011-05-31  Andreas Kling  <kling@webkit.org>
2754
2755         Reviewed by Antti Koivisto.
2756
2757         Canvas/JSC: Auto-generate overloads for setShadow()
2758         https://bugs.webkit.org/show_bug.cgi?id=61786
2759
2760         Move CanvasRenderingContext2D.setShadow() to auto-generated JSC bindings.
2761
2762         There is a subtle difference to the previous behavior: invalid numbers of
2763         arguments now raise TypeError instead of SyntaxError. This is in accordance
2764         with Web IDL, and matches the existing V8 bindings.
2765
2766         Test: fast/canvas/canvas-overloads-setShadow.html
2767
2768         * bindings/js/JSCanvasRenderingContext2DCustom.cpp:
2769         * html/canvas/CanvasRenderingContext2D.idl:
2770
2771 2011-05-31  Andreas Kling  <kling@webkit.org>
2772
2773         Reviewed by Antti Koivisto.
2774
2775         Canvas/JSC: Auto-generate overloads for drawImageFromRect()
2776         https://bugs.webkit.org/show_bug.cgi?id=61709
2777
2778         Move CanvasRenderingContext2D.drawImageFromRect() to auto-generated JSC bindings.
2779         Make it [RequiresAllArguments=Raise] to match the old behavior.
2780         Side effect: calling drawImageFromRect() with zero arguments will now raise
2781         SyntaxError instead of TypeError.
2782
2783         Test: fast/canvas/canvas-overloads-drawImageFromRect.html
2784
2785         * bindings/js/JSCanvasRenderingContext2DCustom.cpp:
2786         * html/canvas/CanvasRenderingContext2D.h:
2787         * html/canvas/CanvasRenderingContext2D.idl:
2788
2789 2011-05-31  Andreas Kling  <kling@webkit.org>
2790
2791         Reviewed by Antti Koivisto.
2792
2793         Canvas/JSC: Auto-generate overloads for drawImage()
2794         https://bugs.webkit.org/show_bug.cgi?id=61703
2795
2796         Move CanvasRenderingContext2D.drawImage() to auto-generated JSC bindings.
2797
2798         There is a subtle difference to the previous behavior: invalid numbers of
2799         arguments now raise TypeError instead of SyntaxError. This is in accordance
2800         with Web IDL, and matches the existing V8 bindings.
2801
2802         Test: fast/canvas/canvas-overloads-drawImage.html
2803
2804         * bindings/js/JSCanvasRenderingContext2DCustom.cpp:
2805         * html/canvas/CanvasRenderingContext2D.idl:
2806
2807 2011-05-31  Andreas Kling  <kling@webkit.org>
2808
2809         Reviewed by Antti Koivisto.
2810
2811         Canvas/JSC: Auto-generate overloads for strokeRect()
2812         https://bugs.webkit.org/show_bug.cgi?id=61641
2813
2814         Move CanvasRenderingContext2D.setStrokeColor() to auto-generated JSC bindings.
2815
2816         No behavioral change.
2817
2818         Test: fast/canvas/canvas-overloads-strokeRect.html
2819
2820         * bindings/js/JSCanvasRenderingContext2DCustom.cpp:
2821         * html/canvas/CanvasRenderingContext2D.idl:
2822
2823 2011-05-31  Andreas Kling  <kling@webkit.org>
2824
2825         Reviewed by Antti Koivisto.
2826
2827         Canvas/JSC: Auto-generate overloads for setFillColor()
2828         https://bugs.webkit.org/show_bug.cgi?id=61635
2829
2830         Move CanvasRenderingContext2D.setStrokeColor() to auto-generated JSC bindings.
2831
2832         There is a subtle difference to the previous behavior: invalid numbers of
2833         arguments now raise TypeError instead of SyntaxError. This is in accordance
2834         with Web IDL, but doesn't matter much anyway since this method is WebKit-only.
2835
2836         Test: fast/canvas/canvas-overloads-setFillColor.html
2837
2838         * bindings/js/JSCanvasRenderingContext2DCustom.cpp:
2839         * html/canvas/CanvasRenderingContext2D.idl:
2840
2841 2011-05-31  Andreas Kling  <kling@webkit.org>
2842
2843         Reviewed by Antti Koivisto.
2844
2845         Canvas/JSC: Auto-generate overloads for setStrokeColor()
2846         https://bugs.webkit.org/show_bug.cgi?id=61629
2847
2848         Move CanvasRenderingContext2D.setStrokeColor() to auto-generated JSC bindings.
2849
2850         There is a subtle difference to the previous behavior: invalid numbers of
2851         arguments now raise TypeError instead of SyntaxError. This is in accordance
2852         with Web IDL, but doesn't matter much anyway since this method is WebKit-only.
2853
2854         Test: fast/canvas/canvas-overloads-setStrokeColor.html
2855
2856         * bindings/js/JSCanvasRenderingContext2DCustom.cpp:
2857         * html/canvas/CanvasRenderingContext2D.idl:
2858
2859 2011-05-31  Andreas Kling  <kling@webkit.org>
2860
2861         Reviewed by Antti Koivisto.
2862
2863         Canvas/JSC: Auto-generate overloads for strokeText()
2864         https://bugs.webkit.org/show_bug.cgi?id=61626
2865
2866         Move CanvasRenderingContext2D.strokeText() to auto-generated JSC bindings.
2867         Make it [RequiresAllArguments=Raise] to match the old behavior.
2868         This has the side-effect of aligning the behaviors of JSC and V8.
2869
2870         Test: fast/canvas/canvas-overloads-strokeText.html
2871
2872         * bindings/js/JSCanvasRenderingContext2DCustom.cpp:
2873         * html/canvas/CanvasRenderingContext2D.idl:
2874
2875 2011-05-31  Andreas Kling  <kling@webkit.org>
2876
2877         Reviewed by Antti Koivisto.
2878
2879         Canvas/JSC: Auto-generate overloads for fillText()
2880         https://bugs.webkit.org/show_bug.cgi?id=61623
2881
2882         Move CanvasRenderingContext2D.fillText() to auto-generated JSC bindings.
2883         Make it [RequiresAllArguments=Raise] to match the old behavior.
2884         This has the side-effect of aligning the behaviors of JSC and V8.
2885
2886         Test: fast/canvas/canvas-overloads-fillText.html
2887
2888         * bindings/js/JSCanvasRenderingContext2DCustom.cpp:
2889         * html/canvas/CanvasRenderingContext2D.idl:
2890
2891 2011-05-31  Yael Aharon  <yael.aharon@nokia.com>
2892
2893         Reviewed by Kenneth Rohde Christiansen.
2894
2895         Frame flattening is broken with nested frames
2896         https://bugs.webkit.org/show_bug.cgi?id=61491
2897
2898         After r77988, when frame flattening is enabled, performPostLayoutTasks() is called on a timer for iframes.
2899         This causes layout of nested iframes to sometimes happen asynchronously, but WebCore expects layout to always finish synchronously.
2900         Added a call to updateWidgetPosition() for cases that performPostLayoutTasks() is now happening asynchronously.
2901
2902         Test: fast/frames/flattening/iframe-flattening-nested.html
2903
2904         * page/FrameView.cpp:
2905         (WebCore::FrameView::layout):
2906
2907 2011-05-31  Tommy Widenflycht  <tommyw@google.com>
2908
2909         Reviewed by Tony Gentilcore.
2910
2911         Fix getUserMedia callback bindings for JSC.
2912         https://bugs.webkit.org/show_bug.cgi?id=60174
2913
2914         This patch initializes the exception code variable to 0.
2915
2916         Test: fast/dom/MediaStream/argument-types.html
2917
2918         * bindings/js/JSNavigatorCustom.cpp:
2919         (WebCore::JSNavigator::webkitGetUserMedia):
2920
2921 2011-05-31  Oleg Romashin  <oleg.romashin@nokia.com>
2922
2923         Reviewed by Benjamin Poulain.
2924
2925         Fix compilation with debug enabled, m_lightSource.type is not valid anymore
2926         https://bugs.webkit.org/show_bug.cgi?id=61719
2927
2928         * platform/graphics/filters/arm/FELightingNEON.h:
2929         (WebCore::FELighting::platformApplyNeon):
2930
2931 2011-05-31  Oliver Varga  <Varga.Oliver@stud.u-szeged.hu>
2932
2933         Reviewed by Nikolas Zimmermann.
2934
2935         Invalid color handling is broken for SVG
2936         https://bugs.webkit.org/show_bug.cgi?id=58531
2937
2938         Fix invalid color fallback handling. If the fill/stroke attributes computed
2939         value leads to a an invalid color, inherit the desired color from the parent
2940         style instead. Matches Opera/FF and SVG 1.1 Second Edition (http://www.w3.org/TR/SVG/).
2941
2942         Tests: svg/custom/invalid-stroke-hex.svg
2943                svg/custom/invalid-uri-stroke.svg
2944
2945         * rendering/svg/RenderSVGResource.cpp:
2946         (WebCore::inheritColorFromParentStyleIfNeeded):
2947         (WebCore::requestPaintingResource):
2948
2949 2011-05-31  Vangelis Kokkevis  <vangelis@chromium.org>
2950
2951         Reviewed by Kent Tamura.
2952
2953         [chromium] Avoid double deletion of DrawingBuffer's color buffer
2954         texture.
2955         https://bugs.webkit.org/show_bug.cgi?id=61761
2956
2957         Test: Verified that the DCHECK in GraphicsContext3D implementation
2958         doesn't trigger.
2959
2960         * platform/graphics/chromium/DrawingBufferChromium.cpp:
2961         (WebCore::DrawingBuffer::~DrawingBuffer):
2962
2963 2011-05-30  Hayato Ito  <hayato@chromium.org>
2964
2965         Reviewed by Ryosuke Niwa.
2966
2967         Add a utility function for dumping a tree for the Node, including a document of a frame.
2968         https://bugs.webkit.org/show_bug.cgi?id=61727
2969
2970         No new tests since added functions are only available in debug builds.
2971
2972         * dom/Node.cpp:
2973         (WebCore::parentOrHostOrFrameOwner):
2974         (WebCore::traverseNextNodeAcrossFrame):
2975         (WebCore::Node::showTreeForThisAcrossFrame):
2976         * dom/Node.h:
2977
2978 2011-05-30  James Kozianski  <koz@chromium.org>
2979
2980         Reviewed by Kent Tamura.
2981
2982         [Chromium] Make isValidProtocol() accept protocols with '+'.
2983         https://bugs.webkit.org/show_bug.cgi?id=61759
2984
2985         Also, detect syntax errors before security errors; some syntax errors
2986         will also trigger a security error, but it's more helpful to the
2987         programmer to know if they have a syntax error, which are well-defined
2988         in the spec, rather than a security error, which aren't.
2989
2990         * page/Navigator.cpp:
2991         (WebCore::Navigator::registerProtocolHandler):
2992         Detect syntax errors before security errors.
2993         * platform/KURLGoogle.cpp:
2994         (WebCore::isSchemeChar):
2995         Include '+' in the list of valid characters.
2996
2997 2011-05-30  Andrey Petrov  <andrey.petrov@gmail.com>
2998
2999         Reviewed by Hajime Morita.
3000
3001         Using jQuery to show/hide IMG elements crashes WebKit
3002         https://bugs.webkit.org/show_bug.cgi?id=31721
3003
3004         For platform code, do not assert nodes always have renderer at
3005         the time context menu action is invoked.
3006         Renderer can actually be empty for a given node if it was hidden
3007         or removed from domtree by some non-user generated event (e.g timeout) 
3008         after the popup menu had been created.
3009
3010         Changing Chromium, Gtk, Mac, Qt, Win and WinCE.
3011
3012         Test: editing/pasteboard/copy-standalone-image-crash.html
3013
3014         * platform/chromium/PasteboardChromium.cpp:
3015         (WebCore::Pasteboard::writeImage):
3016         * platform/gtk/PasteboardGtk.cpp:
3017         (WebCore::Pasteboard::writeImage):
3018         * platform/mac/PasteboardMac.mm:
3019         (WebCore::Pasteboard::writeImage):
3020         * platform/qt/PasteboardQt.cpp:
3021         (WebCore::Pasteboard::writeImage):
3022         * platform/win/PasteboardWin.cpp:
3023         (WebCore::Pasteboard::writeImage):
3024         * platform/wince/PasteboardWinCE.cpp:
3025         (WebCore::Pasteboard::writeImage):
3026
3027 2011-05-30  Daniel Bates  <dbates@webkit.org>
3028
3029         Reviewed by Adam Barth.
3030
3031         Rename XSSFilter to XSSAuditor
3032         https://bugs.webkit.org/show_bug.cgi?id=61718
3033
3034         Currently we use the names XSSFilter and XSSAuditor throughout the project.
3035         Instead, we should choose one name for consistency.
3036
3037         No functionality was changed. So, no new tests.
3038
3039         * CMakeLists.txt:
3040         * GNUmakefile.list.am:
3041         * WebCore.gypi:
3042         * WebCore.pro:
3043         * WebCore.vcproj/WebCore.vcproj:
3044         * WebCore.xcodeproj/project.pbxproj:
3045         * html/parser/HTMLDocumentParser.cpp:
3046         (WebCore::HTMLDocumentParser::HTMLDocumentParser):
3047         (WebCore::HTMLDocumentParser::pumpTokenizer):
3048         * html/parser/HTMLDocumentParser.h:
3049         * html/parser/XSSAuditor.cpp: Copied from Source/WebCore/html/parser/XSSFilter.cpp.
3050         (WebCore::XSSAuditor::XSSAuditor):
3051         (WebCore::XSSAuditor::init):
3052         (WebCore::XSSAuditor::filterToken):
3053         (WebCore::XSSAuditor::filterTokenInitial):
3054         (WebCore::XSSAuditor::filterTokenAfterScriptStartTag):
3055         (WebCore::XSSAuditor::filterScriptToken):
3056         (WebCore::XSSAuditor::filterObjectToken):
3057         (WebCore::XSSAuditor::filterParamToken):
3058         (WebCore::XSSAuditor::filterEmbedToken):
3059         (WebCore::XSSAuditor::filterAppletToken):
3060         (WebCore::XSSAuditor::filterIframeToken):
3061         (WebCore::XSSAuditor::filterMetaToken):
3062         (WebCore::XSSAuditor::filterBaseToken):
3063         (WebCore::XSSAuditor::filterFormToken):
3064         (WebCore::XSSAuditor::eraseDangerousAttributesIfInjected):
3065         (WebCore::XSSAuditor::eraseAttributeIfInjected):
3066         (WebCore::XSSAuditor::snippetForRange):
3067         (WebCore::XSSAuditor::snippetForAttribute):
3068         (WebCore::XSSAuditor::isContainedInRequest):
3069         (WebCore::XSSAuditor::isSameOriginResource):
3070         * html/parser/XSSAuditor.h: Copied from Source/WebCore/html/parser/XSSFilter.h.
3071         * html/parser/XSSFilter.cpp: Removed.
3072         * html/parser/XSSFilter.h: Removed.
3073
3074 2011-05-30  No'am Rosenthal  <noam.rosenthal@nokia.com>
3075
3076         Reviewed by Simon Hausmann.
3077
3078         WebKit2: Enable serializing of data types needed for cross-process accelerated compositing
3079         https://bugs.webkit.org/show_bug.cgi?id=61694
3080
3081         Expose a public clearAll() function to reset WebCore::Animation.
3082
3083         No new functionality, so no new tests.
3084
3085         * platform/animation/Animation.h:
3086         (WebCore::Animation::clearAll):
3087
3088 2011-05-30  Eric Carlson  <eric.carlson@apple.com>
3089
3090         Reviewed by Alexey Proskuryakov.
3091
3092         Audio and video files saved to the Application Cache should preserve the original file extension
3093         https://bugs.webkit.org/show_bug.cgi?id=61750
3094         <rdar://9524922>
3095
3096         No new tests, it isn't possible to check the name of the file in the cache from within
3097         DRT. Changes verified manually.
3098
3099         * loader/appcache/ApplicationCacheStorage.cpp:
3100         (WebCore::ApplicationCacheStorage::store): Append the original file extension to the cache
3101             file name.
3102         (WebCore::ApplicationCacheStorage::writeDataToUniqueFileInDirectory): Add extension parameter.
3103         * loader/appcache/ApplicationCacheStorage.h:
3104
3105 2011-05-30  Jer Noble  <jer.noble@apple.com>
3106
3107         Reviewed by Dan Bernstein.
3108
3109         Play/Pause button in wrong state when entering full screen on Vimeo
3110         https://bugs.webkit.org/show_bug.cgi?id=61754
3111
3112         Update the play/pause button inside reset().  This ensures the button is in
3113         the correct state when the controls are created after playback has already
3114         started.
3115
3116         * html/shadow/MediaControlRootElement.cpp:
3117         (WebCore::MediaControlRootElement::reset):
3118
3119 2011-05-30  No'am Rosenthal  <noam.rosenthal@nokia.com>
3120
3121         Reviewed by Simon Hausmann.
3122
3123         WebKit2: Enable serializing of data types needed for cross-process accelerated compositing
3124         https://bugs.webkit.org/show_bug.cgi?id=61694
3125
3126         Added a public TimingFunction::type() method.
3127
3128         No new functionality, so no new tests.
3129
3130         * platform/animation/TimingFunction.h:
3131         (WebCore::TimingFunction::type):
3132
3133 2011-05-30  Noam Rosenthal  <noam.rosenthal@nokia.com>
3134
3135         BUILD FIX for r87697 on Windows/Symbian
3136
3137         For now enabling TextureMapper for Mac/Linux only.
3138
3139         * WebCore.pri:
3140
3141 2011-05-30  David Kilzer  <ddkilzer@apple.com>
3142
3143         BUILD FIX for r87692 with !ENABLE(FULLSCREEN_API)
3144
3145         * dom/EventDispatcher.cpp:
3146         (WebCore::EventDispatcher::determineDispatchBehavior): Mark
3147         shadowRoot as an unused parameter with !ENABLE(FULLSCREEN_API).
3148
3149 2011-05-30  No'am Rosenthal  <noam.rosenthal@nokia.com>
3150
3151         Reviewed by Andreas Kling.
3152
3153         [Texmap][Qt] Enable TextureMapper by default
3154         https://bugs.webkit.org/show_bug.cgi?id=61740
3155
3156         Make CONFIG+=texmap an opt-out instead of an opt-in.
3157
3158         No new functionality so no new tests.
3159
3160         * WebCore.pri:
3161
3162 2011-05-30  Martin Robinson  <mrobinson@igalia.com>
3163
3164         Reviewed by Xan Lopez.
3165
3166         [GTK] fast/css/font-face-zero-hash-key.html is crashing on the bots
3167         https://bugs.webkit.org/show_bug.cgi?id=61693
3168
3169         Do not try to read the FT_Face from m_scaledFont if it m_scaledFont is
3170         null. A recent change fixing 0-pixel-size fonts means that m_scaledFont
3171         may now be null.
3172
3173         No new tests. This change should cause fast/css/font-face-zero-hash-key.html
3174         to stop crashing.
3175
3176         * platform/graphics/freetype/FontPlatformDataFreeType.cpp:
3177         (WebCore::FontPlatformData::FontPlatformData): Do a null check before accessing
3178         m_scaledFont.
3179
3180 2011-05-30  Noam Rosenthal  <noam.rosenthal@nokia.com>
3181
3182         Reviewed by Kenneth Rohde Christiansen.
3183
3184         [Texmap][Qt] Disable accelerated plugins/media until they're working.
3185         https://bugs.webkit.org/show_bug.cgi?id=61687
3186
3187         Until this works properly, we should indicate that our media implementation
3188         in texture mapper doesn't support accelerated compositing.
3189
3190         This makes LayoutTests/compositing/video/* work again.
3191
3192         * platform/graphics/qt/MediaPlayerPrivateQt.h:
3193         (WebCore::MediaPlayerPrivateQt::supportsAcceleratedRendering):
3194         (WebCore::MediaPlayerPrivateQt::platformLayer):
3195
3196 2011-05-30  Mikhail Naganov  <mnaganov@chromium.org>
3197
3198         Reviewed by Adam Barth.
3199
3200         [Chromium] Fix regression after r87628.
3201         https://bugs.webkit.org/show_bug.cgi?id=61733
3202
3203         Having r87628 in place, Chrome reliability bot crashes in
3204         WebCore::HTMLLinkElement::onloadTimerFired.
3205
3206         This is because the change makes WebCore::CachedResource::setRequest to
3207         call checkNotify on request reset.  HTMLLinkElement registers itself as
3208         CachedResource client via m_cachedSheet, which can happen even if
3209         m_cachedLinkResource wasn't set.  As a result,
3210         WebCore::HTMLLinkElement::notifyFinished is got called with unset
3211         m_cachedLinkResource, which causes a crash in
3212         HTMLLinkElement::onloadTimerFired
3213
3214         * html/HTMLLinkElement.cpp:
3215         (WebCore::HTMLLinkElement::notifyFinished):
3216
3217 2011-05-30  Jer Noble  <jer.noble@apple.com>
3218
3219         Reviewed by Darin Adler and Simon Fraser.
3220
3221         REGRESSION (r87622): Scrubbing a Vimeo movie when in fullscreen stops playback; no way to make it start again
3222         https://bugs.webkit.org/show_bug.cgi?id=61717
3223         rdar://problem/9522272
3224
3225         May be some good way to test this later. No immediate idea about the best way.
3226
3227         When a media element is taken into full-screen mode, stop events from propagating
3228         outside the media element's shadow DOM, EventDispatcher::determineDispatchBehavior()
3229         has been changed to take a shadow root node. In our full screen media element check,
3230         we check to see if the passed shadow root is the shadow root of the full screen media
3231         element, and if so, specify events should StayInsideShadowDOM. The end result is that
3232         inside EventDispatcher::ensureEventAncestors, an ancestor chain is built up all the
3233         way from the SliderThumb to the video element's shadow root, but no further.
3234
3235         * dom/EventDispatcher.cpp:
3236         (WebCore::EventDispatcher::determineDispatchBehavior): Restrict events to the
3237         shadow DOM when showing a full screen video.
3238
3239         * html/HTMLMediaElement.cpp:
3240         (WebCore::HTMLMediaElement::HTMLMediaElement): Removed code to manage full screen controls.
3241         The events telling us about activity in the shadow DOM no longer bubble out so we need to
3242         handle this inside the shadow DOM on the root element.
3243         (WebCore::HTMLMediaElement::play): Ditto.
3244         (WebCore::HTMLMediaElement::playbackProgressTimerFired): Ditto.
3245         (WebCore::HTMLMediaElement::defaultEventHandler): Ditto.
3246         (WebCore::HTMLMediaElement::enterFullscreen): Ditto.
3247         (WebCore::HTMLMediaElement::exitFullscreen): Ditto.
3248         * html/HTMLMediaElement.h: Added isPlaying function, removed things moved to the root element.
3249
3250         * html/shadow/MediaControlElements.cpp:
3251         (WebCore::MediaControlVolumeSliderContainerElement::defaultEventHandler): Rolled out
3252         changes that tried to make special rules for events using preDispatchEventHandler and such.
3253         This rolls out both r87622 and r87655.
3254         (WebCore::MediaControlMuteButtonElement::defaultEventHandler): Ditto.
3255         (WebCore::MediaControlPanelMuteButtonElement::defaultEventHandler): Ditto.
3256         (WebCore::MediaControlPlayButtonElement::defaultEventHandler): Ditto.
3257         (WebCore::MediaControlSeekButtonElement::defaultEventHandler): Ditto.
3258         (WebCore::MediaControlRewindButtonElement::defaultEventHandler): Ditto.
3259         (WebCore::MediaControlReturnToRealtimeButtonElement::defaultEventHandler): Ditto.
3260         (WebCore::MediaControlToggleClosedCaptionsButtonElement::defaultEventHandler): Ditto.
3261         (WebCore::MediaControlTimelineElement::defaultEventHandler): Ditto.
3262         (WebCore::MediaControlVolumeSliderElement::defaultEventHandler): Ditto.
3263         (WebCore::MediaControlFullscreenButtonElement::defaultEventHandler): Ditto.
3264         (WebCore::MediaControlFullscreenVolumeMinButtonElement::defaultEventHandler): Ditto.
3265         (WebCore::MediaControlFullscreenVolumeMaxButtonElement::defaultEventHandler): Ditto.
3266         * html/shadow/MediaControlElements.h: Ditto.
3267
3268         * html/shadow/MediaControlRootElement.cpp:
3269         (WebCore::MediaControlRootElement::MediaControlRootElement): Initialize new data members.
3270         (WebCore::MediaControlRootElement::playbackStarted): Start the timer so we will consider
3271         hiding the controls later.
3272         (WebCore::MediaControlRootElement::playbackProgressed): Hide the controls if the mouse
3273         is no longer over the controls.
3274         (WebCore::MediaControlRootElement::playbackStopped): Stop the timer since we only hide
3275         automatically if we're playing.
3276         (WebCore::MediaControlRootElement::enteredFullscreen): Start the timer.
3277         (WebCore::MediaControlRootElement::exitedFullscreen): Stop the timer since we only care
3278         if we are full screen.
3279         (WebCore::MediaControlRootElement::containsRelatedTarget): Added. Helper for next function.
3280         (WebCore::MediaControlRootElement::defaultEventHandler): Do the hide/show and timer functions
3281         as the mouse is moved in and out.
3282         (WebCore::MediaControlRootElement::startHideFullscreenControlsTimer): Start the timer if
3283         needed.
3284         (WebCore::MediaControlRootElement::hideFullscreenControlsTimerFired): Hide if the conditions
3285         are met.
3286         (WebCore::MediaControlRootElement::stopHideFullscreenControlsTimer): Stop the timer.
3287
3288         * html/shadow/MediaControlRootElement.h: Added new functions and data members.
3289
3290
3291 2011-05-30  Gavin Peters  <gavinp@chromium.org>
3292
3293         Reviewed by Adam Barth.
3294
3295         prevent HTMLLinkElement from watching multiple CachedResources
3296         https://bugs.webkit.org/show_bug.cgi?id=61686
3297
3298         If we modify an existing link element, stop listening to the previous
3299         cached resource, to prevent double notifications (which crash).
3300
3301         Test: fast/dom/HTMLLinkElement/prefetch-too-many-clients.html
3302
3303         * html/HTMLLinkElement.cpp:
3304         (WebCore::HTMLLinkElement::process):
3305
3306 2011-05-30  Peter Varga  <pvarga@webkit.org>
3307
3308         Unreviewed build fix.
3309
3310         [Qt][V8] Fix debug build.
3311
3312         No new tests needed.
3313
3314         * css/CSSStyleDeclaration.cpp: Add missing header.
3315         * dom/Text.cpp: Ditto.
3316         * rendering/InlineTextBox.cpp: Ditto.
3317
3318 2011-05-30  Sheriff Bot  <webkit.review.bot@gmail.com>
3319
3320         Unreviewed, rolling out r87683.
3321         http://trac.webkit.org/changeset/87683
3322         https://bugs.webkit.org/show_bug.cgi?id=61729
3323
3324         Breaks inspector tests on Chromium (Requested by apavlov on
3325         #webkit).
3326
3327         * inspector/front-end/StylesSidebarPane.js:
3328         (WebInspector.StylesSidebarPane.prototype.update):
3329
3330 2011-05-25  Alexander Pavlov  <apavlov@chromium.org>
3331
3332         Reviewed by Yury Semikhatsky.
3333
3334         Web Inspector: node selection is slow in the Elements panel.
3335         https://bugs.webkit.org/show_bug.cgi?id=60813
3336
3337         Schedule full style updates rather than request all node styles from the backend up front.
3338
3339         * inspector/front-end/StylesSidebarPane.js:
3340         (WebInspector.StylesSidebarPane.prototype.update.reloadAllStyles):
3341         (WebInspector.StylesSidebarPane.prototype.update):
3342
3343 2011-05-30  Andrey Kosyakov  <caseq@chromium.org>
3344
3345         Reviewed by Pavel Feldman.
3346
3347         Web Inspector: do not issue frontendReused for reload or navigation.
3348         https://bugs.webkit.org/show_bug.cgi?id=61192
3349
3350        - only issue frontendReused when inspector is attached after main resource committed load
3351        - upon committing loading main resource, reset agents before sending FrameNavigated to page agent
3352        - Ensure main resource is set early so that abbreviations of URLs in resource tree are consistent after reload
3353        - do not enable agents explicitly in frontendReused (this is done by backend when resotring state from cookie)
3354
3355         * inspector/InspectorAgent.cpp:
3356         (WebCore::InspectorAgent::InspectorAgent):
3357         (WebCore::InspectorAgent::restore):
3358         (WebCore::InspectorAgent::clearFrontend):
3359         (WebCore::InspectorAgent::didCommitLoad):
3360         * inspector/InspectorAgent.h:
3361         * inspector/InspectorInstrumentation.cpp:
3362         (WebCore::InspectorInstrumentation::didCommitLoadImpl):
3363         * inspector/front-end/NetworkManager.js:
3364         * inspector/front-end/ResourceTreeModel.js:
3365         (WebInspector.ResourceTreeModel.prototype._processCachedResources):
3366         (WebInspector.ResourceTreeModel.prototype._frameNavigated):
3367         (WebInspector.ResourceTreeModel.prototype._cleanupFramesAfterNavigation):
3368         (WebInspector.ResourceTreeModel.prototype._addFramesRecursively):
3369         * inspector/front-end/ResourcesPanel.js:
3370         (WebInspector.ResourcesPanel.prototype.reset):
3371         (WebInspector.ResourcesPanel.prototype._resetResourcesTree):
3372         (WebInspector.DatabaseTreeElement.prototype.onpopulate):
3373         (WebInspector.SearchResultsTreeElementsTraverser.prototype._lastTreeElement):
3374         * inspector/front-end/inspector.js:
3375         (WebInspector.reset):
3376         (WebInspector.frontendReused):
3377
3378 2011-05-30  Ryan Sleevi  <rsleevi@chromium.org>
3379
3380         Reviewed by Darin Adler.
3381
3382         FEConvolveMatrix::getPixelValue() fails to properly check if y is within bounds, causing it to fail to correctly apply the kernel and edge mode to the first targetY pixels
3383         https://bugs.webkit.org/show_bug.cgi?id=61603
3384
3385         Test: svg/filters/feConvolveFilter-y-bounds.svg
3386
3387         * platform/graphics/filters/FEConvolveMatrix.cpp:
3388         (WebCore::FEConvolveMatrix::getPixelValue):
3389
3390 2011-05-30  Nate Chapin  <japhet@chromium.org>
3391
3392         Reviewed by Antti Koivisto.
3393
3394         Refactor the CachedResourceLoader -> CachedResource -> CachedResourceRequest
3395         flow so it's a little less circular.
3396         https://bugs.webkit.org/show_bug.cgi?id=61666
3397
3398         * loader/cache/CachedFont.cpp:
3399         (WebCore::CachedFont::beginLoadIfNeeded):
3400         * loader/cache/CachedResource.cpp:
3401         (WebCore::CachedResource::load):
3402         * loader/cache/CachedResourceLoader.cpp:
3403         (WebCore::CachedResourceLoader::requestImage):
3404         (WebCore::CachedResourceLoader::setAutoLoadImages):
3405         (WebCore::CachedResourceLoader::loadStarted):
3406         * loader/cache/CachedResourceLoader.h:
3407         * loader/cache/CachedResourceRequest.cpp:
3408         (WebCore::CachedResourceRequest::load):
3409
3410 2011-05-30  Sheriff Bot  <webkit.review.bot@gmail.com>
3411
3412         Unreviewed, rolling out r87618.
3413         http://trac.webkit.org/changeset/87618
3414         https://bugs.webkit.org/show_bug.cgi?id=61720
3415
3416         Causes BrowserFocusTest.FocusOnReload to fail (Requested by
3417         abarth|gardener on #webkit).
3418
3419         * html/HTMLLinkElement.cpp:
3420         (WebCore::HTMLLinkElement::process):
3421
3422 2011-05-29  Yuta Kitamura  <yutak@chromium.org>
3423
3424         Reviewed by Kent Tamura.
3425
3426         WebSocket closing handshake
3427         https://bugs.webkit.org/show_bug.cgi?id=35721
3428
3429         Implement WebSocket closing handshake based on Ian Hickson's
3430         WebSocket protocol draft 76.
3431
3432         Tests: http/tests/websocket/tests/client-close.html
3433                http/tests/websocket/tests/server-close.html
3434
3435         * platform/network/SocketStreamHandleBase.cpp:
3436         (WebCore::SocketStreamHandleBase::send):
3437         Do not send a message if we are in Closing state.
3438         (WebCore::SocketStreamHandleBase::close):
3439         Do not disconnect if we have pending data which have not been sent yet.
3440         In this case, the actual disconnection will happen in sendPendingData().
3441         (WebCore::SocketStreamHandleBase::disconnect):
3442         Renamed from close(). Disconnect the connection immediately.
3443         (WebCore::SocketStreamHandleBase::sendPendingData):
3444         * platform/network/SocketStreamHandleBase.h:
3445         * websockets/ThreadableWebSocketChannelClientWrapper.cpp:
3446         Add didStartClosingHandshake(). Add a function argument (ClosingHandshakeCompletionStatus)
3447         to didClose().
3448         (WebCore::ThreadableWebSocketChannelClientWrapper::didStartClosingHandshake):
3449         (WebCore::ThreadableWebSocketChannelClientWrapper::didClose):
3450         (WebCore::ThreadableWebSocketChannelClientWrapper::didStartClosingHandshakeCallback):
3451         (WebCore::ThreadableWebSocketChannelClientWrapper::didCloseCallback):
3452         * websockets/ThreadableWebSocketChannelClientWrapper.h:
3453         * websockets/WebSocket.cpp:
3454         (WebCore::WebSocket::send):
3455         (WebCore::WebSocket::close):
3456         Fail if close() is attempted before the connection is established.
3457         Otherwise, set the state to CLOSING and start the closing handshake.
3458         (WebCore::WebSocket::bufferedAmount):
3459         If the state is CLOSING, we need to consider buffered data in m_channel and sent after close().
3460         (WebCore::WebSocket::didConnect):
3461         (WebCore::WebSocket::didReceiveMessage):
3462         We need to invoke message event in CLOSING state as well as OPEN state.
3463         (WebCore::WebSocket::didReceiveMessageError):
3464         (WebCore::WebSocket::didStartClosingHandshake):
3465         (WebCore::WebSocket::didClose):
3466         * websockets/WebSocket.h:
3467         * websockets/WebSocketChannel.cpp:
3468         (WebCore::WebSocketChannel::WebSocketChannel):
3469         (WebCore::WebSocketChannel::close):
3470         Start the closing handshake.
3471         (WebCore::WebSocketChannel::disconnect):
3472         Disconnect the socket stream, instead of close.
3473         (WebCore::WebSocketChannel::didClose):
3474         (WebCore::WebSocketChannel::didReceiveData): Ditto.
3475         (WebCore::WebSocketChannel::didFail): Ditto.
3476         (WebCore::WebSocketChannel::processBuffer):
3477         Ditto.
3478         Handle 0xFF 0x00 byte sequence, and discard received data once the closing handshake has started.
3479         (WebCore::WebSocketChannel::startClosingHandshake):
3480         Send 0xFF 0x00 byte sequence.
3481         (WebCore::WebSocketChannel::closingTimerFired):
3482         Disconnect the socket stream if the closing handshake has timed out.
3483         * websockets/WebSocketChannel.h:
3484         m_closing is true if "the WebSocket closing handshake has started" (as stated in the protocol
3485         specification).
3486         * websockets/WebSocketChannelClient.h:
3487         (WebCore::WebSocketChannelClient::didStartClosingHandshake): Added.
3488         (WebCore::WebSocketChannelClient::didClose): Add closingHandshakeCompletion parameter.
3489         * websockets/WorkerThreadableWebSocketChannel.cpp:
3490         Add closingHandshakeCompletion parameter to didClose(), and add didStartClosingHandshake().
3491         (WebCore::WorkerThreadableWebSocketChannel::Peer::close):
3492         (WebCore::workerContextDidStartClosingHandshake):
3493         (WebCore::WorkerThreadableWebSocketChannel::Peer::didStartClosingHandshake):
3494         (WebCore::workerContextDidClose):
3495         (WebCore::WorkerThreadableWebSocketChannel::Peer::didClose):
3496         * websockets/WorkerThreadableWebSocketChannel.h:
3497
3498 2011-05-29  Adam Barth  <abarth@webkit.org>
3499
3500         Attempt to fix build by implementing pure virtual function.
3501
3502         * html/shadow/MediaControlRootElementChromium.cpp:
3503         (WebCore::MediaControlRootElementChromium::shouldHideControls):
3504         * html/shadow/MediaControlRootElementChromium.h:
3505
3506 2011-05-29  Brian Weinstein  <bweinstein@apple.com>
3507
3508         Reviewed by Darin Adler.
3509
3510      &nb