2011-02-07 Pavel Feldman <pfeldman@chromium.org>
[WebKit-https.git] / Source / WebCore / ChangeLog
1 2011-02-07  Pavel Feldman  <pfeldman@chromium.org>
2
3         Reviewed by Yury Semikhatsky.
4
5         Web Inspector: ignore cache upon reload via Ctrl(Cmd)+Shift+R.
6         https://bugs.webkit.org/show_bug.cgi?id=53914
7
8         * inspector/Inspector.idl:
9         * inspector/InspectorAgent.cpp:
10         (WebCore::InspectorAgent::reloadPage):
11         * inspector/InspectorAgent.h:
12         * inspector/front-end/AuditsPanel.js:
13         (WebInspector.AuditsPanel.prototype._reloadResources):
14         * inspector/front-end/ExtensionServer.js:
15         (WebInspector.ExtensionServer.prototype._onReload):
16         * inspector/front-end/inspector.js:
17         (WebInspector.documentKeyDown):
18
19 2011-02-08  Antti Koivisto  <antti@apple.com>
20
21         Reviewed by Cameron Zwarich.
22
23         Skip over sibling selectors when collecting descendant selector hashes 
24         https://bugs.webkit.org/show_bug.cgi?id=53987
25         
26         Skip instead of bailing out. This will allow optimizing some sibling selector cases.
27
28         * css/CSSStyleSelector.cpp:
29         (WebCore::RuleData::RuleData):
30         (WebCore::RuleData::collectIdentifierHashes):
31         (WebCore::RuleData::collectDescendantSelectorIdentifierHashes):
32         * css/CSSStyleSelector.h:
33
34 2011-02-07  Cris Neckar  <cdn@chromium.org>
35
36         Reviewed by Jian Li.
37
38         Fix null deref in DOMURL
39         https://bugs.webkit.org/show_bug.cgi?id=53811
40
41         Test: fast/files/domurl-script-execution-context-crash.html
42
43         * html/DOMURL.cpp:
44         (WebCore::DOMURL::DOMURL):
45
46 2011-02-07  Mark Rowe  <mrowe@apple.com>
47
48         Fix the 32-bit build.
49
50         * platform/mac/ScrollAnimatorMac.mm:
51         (WebCore::ScrollAnimatorMac::didAddVerticalScrollbar): Remove some extraneous characters.
52         (WebCore::ScrollAnimatorMac::didAddHorizontalScrollbar): Ditto.
53
54 2011-02-07  Xiyuan Xia  <xiyuan@chromium.org>
55
56         Reviewed by Tony Chang.
57
58         [Chromium] Select popup box does not align with select button when appearance is not "menulist".
59         https://bugs.webkit.org/show_bug.cgi?id=53942
60
61         Added manual test select_webkit_appearance_off_popup_alignment.html.
62
63         * manual-tests/select_webkit_appearance_off_popup_alignment.html: Added.
64         * platform/chromium/PopupMenuChromium.cpp:
65         (WebCore::PopupListBox::layout):
66
67 2011-02-07  Aparna Nandyal  <aparna.nand@wipro.com>
68
69         Reviewed by Andreas Kling.
70
71         [Qt] - Context menu needs "Copy" as well when the selected text is a link.
72         https://bugs.webkit.org/show_bug.cgi?id=40983
73
74         Added copy option for Qt platform if selection is a link. 
75         Added a test in tst_qwebpage.cpp. 
76
77         * page/ContextMenuController.cpp:
78         (WebCore::ContextMenuController::populate):
79
80 2011-02-07  Mike Reed  <reed@google.com>
81
82         Reviewed by Kenneth Russell.
83
84         Add compile-time flag ENABLE(SKIA_GPU) to use Skia's gpu backend
85         when drawing <canvas>. Disabled by default.
86
87         No new tests. existing canvas layouttests apply
88
89         * platform/graphics/chromium/DrawingBufferChromium.cpp:
90         (WebCore::DrawingBuffer::publishToPlatformLayer):
91         * platform/graphics/skia/PlatformContextSkia.cpp:
92         (WebCore::GetGlobalGrContext):
93         (WebCore::PlatformContextSkia::isPrinting):
94         (WebCore::PlatformContextSkia::setSharedGraphicsContext3D):
95         (WebCore::PlatformContextSkia::syncSoftwareCanvas):
96
97 2011-02-07  Jay Civelli  <jcivelli@chromium.org>
98
99         Reviewed by Darin Fisher.
100
101         Removing unused code from PopupMenuChromium.
102         https://bugs.webkit.org/show_bug.cgi?id=53866
103
104        * platform/chromium/PopupMenuChromium.cpp:
105         (WebCore::PopupListBox::layout):
106         (WebCore::PopupMenuChromium::show):
107         * platform/chromium/PopupMenuChromium.h:
108
109 2011-02-07  Kenichi Ishibashi  <bashi@chromium.org>
110
111         Reviewed by Andreas Kling.
112
113         HTMLOutputElement::childrenChanged() should call its base class childrenChanged()
114         https://bugs.webkit.org/show_bug.cgi?id=53791
115
116         Calls HTMLFormControlElement::childrenChanged() in HTMLOutputElement::childrenChanged().
117
118         Test: fast/dom/HTMLOutputElement/htmloutputelement-children-removed.html
119
120         * html/HTMLOutputElement.cpp:
121         (WebCore::HTMLOutputElement::childrenChanged): Calls super class's
122         childrenChanged().
123
124 2011-02-07  Benjamin Poulain  <ikipou@gmail.com>
125
126         Reviewed by Kenneth Rohde Christiansen.
127
128         [Qt] cookiesEnabled could create the cookieJar on the wrong thread.
129         https://bugs.webkit.org/show_bug.cgi?id=52289
130
131         Use the QtNAMThreadSafeProxy to make sure the cookie jar is created
132         in the same thread as the QNetworkAccessManager.
133
134         * platform/network/qt/QtNAMThreadSafeProxy.cpp:
135         (WebCore::QtNAMThreadSafeProxy::QtNAMThreadSafeProxy):
136         (WebCore::QtNAMThreadSafeProxy::hasCookieJar):
137         * platform/network/qt/QtNAMThreadSafeProxy.h:
138         * platform/qt/CookieJarQt.cpp:
139         (WebCore::cookiesEnabled):
140
141 2011-02-07  Alexey Marinichev  <amarinichev@chromium.org>
142
143         Reviewed by Kenneth Russell.
144
145         Hook up WebGraphicsContext3D::setContextLostCallback.
146         https://bugs.webkit.org/show_bug.cgi?id=53722
147
148         Test: fast/canvas/webgl/context-lost.html, comment out the line with
149         extension.loseContext() and kill the GPU process "Lose context"
150         message shows up.
151
152         * html/canvas/WebGLRenderingContext.cpp:
153         (WebCore::WebGLRenderingContextLostCallback::WebGLRenderingContextLostCallback):
154         (WebCore::WebGLRenderingContextLostCallback::onContextLost):
155         (WebCore::WebGLRenderingContextLostCallback::~WebGLRenderingContextLostCallback):
156         (WebCore::WebGLRenderingContext::initializeNewContext):
157         (WebCore::WebGLRenderingContext::~WebGLRenderingContext):
158         * platform/graphics/GraphicsContext3D.h:
159         (WebCore::GraphicsContext3D::ContextLostCallback::~ContextLostCallback):
160         * platform/graphics/mac/GraphicsContext3DMac.mm:
161         (WebCore::GraphicsContext3D::setContextLostCallback): stub
162         * platform/graphics/qt/GraphicsContext3DQt.cpp:
163         (WebCore::GraphicsContext3D::setContextLostCallback): stub
164
165 2011-02-07  Patrick Gansterer  <paroga@webkit.org>
166
167         Reviewed by Eric Seidel.
168
169         Add missing PaintInfo include in RenderThemeWin.cpp
170         https://bugs.webkit.org/show_bug.cgi?id=53885
171
172         * rendering/RenderThemeWin.cpp:
173
174 2011-02-07  Qi Zhang  <qi.2.zhang@nokia.com>
175
176         Reviewed by Andreas Kling.
177
178         [Qt] enum QWebPage::WebAction doesn't have value QWebPage::CopyImageUrl
179         https://bugs.webkit.org/show_bug.cgi?id=52974
180
181         Add ContextMenuItemTagCopyImageUrlToClipboard into standard action but Qt platform specific.
182
183         * page/ContextMenuController.cpp:
184         (WebCore::ContextMenuController::contextMenuItemSelected):
185         (WebCore::ContextMenuController::populate):
186         (WebCore::ContextMenuController::checkOrEnableIfNeeded):
187         * platform/ContextMenuItem.h:
188         * platform/LocalizationStrategy.h:
189         * platform/LocalizedStrings.cpp:
190         (WebCore::contextMenuItemTagCopyImageUrlToClipboard):
191         * platform/LocalizedStrings.h:
192
193 2011-02-07  Kenichi Ishibashi  <bashi@chromium.org>
194
195         Reviewed by Kent Tamura.
196
197         HTMLFormElement::formElementIndex() returns a bad index into a vector of form associated elements
198         https://bugs.webkit.org/show_bug.cgi?id=53970
199
200         Adds HTMLObjectElement::virtualForm() to make HTMLObjectElement::form()
201         return the right value.
202
203         Test: fast/dom/HTMLObjectElement/form/nested-form-element.html
204
205         * html/HTMLObjectElement.cpp:
206         (WebCore::HTMLObjectElement::virtualForm): Added.
207         * html/HTMLObjectElement.h: Added virtualForm().
208
209 2011-02-07  Ryosuke Niwa  <rniwa@webkit.org>
210
211         Unreviewed Leopard build fix.
212
213         * WebCore.xcodeproj/project.pbxproj: let XCode have developmentRegion.
214         * platform/mac/DragImageMac.mm:
215         (WebCore::webkit_CGCeiling): Cast the return value of ceil to CGFloat.
216
217 2011-02-07  Enrica Casucci  <enrica@apple.com>
218
219         Reviewed by Sam Weinig.
220
221         Fixing a build break on Mac caused by http://trac.webkit.org/changeset/77874
222
223         When moving code from WebKit to WebCore we needed to move some additional
224         functions previously in NSStringExtras.
225         
226         * WebCore.xcodeproj/project.pbxproj:
227         * platform/mac/DragImageMac.mm:
228         (WebCore::fontFromNSFont):
229         (WebCore::canUseFastRenderer):
230         (WebCore::widthWithFont):
231         (WebCore::webkit_CGCeiling):
232         (WebCore::drawAtPoint):
233         (WebCore::drawDoubledAtPoint):
234         (WebCore::createDragImageForLink):
235
236 2011-02-07  Lucas Forschler  <lforschler@apple.com>
237
238         Reviewed by Geoff Garen.
239
240         Tr #2, Fix the Leopard 32bit debug build.
241         
242         No new tests required.
243
244         * WebCore.xcodeproj/project.pbxproj:
245         * accessibility/AccessibilityAllInOne.cpp:
246
247 2011-02-07  Beth Dakin  <bdakin@apple.com>
248
249         Reviewed by Sam Weinig.
250
251         Fix for <rdar://problem/8946961> Fix repaint problems
252         with WKScrollbarPainter scrollers while resizing the window
253
254         Remove setPainterForPainterController() and 
255         removePainterFromPainterController() since they aren't
256         used anymore.
257         * platform/mac/ScrollAnimatorMac.h:
258         
259         Return early if they alpha hasn't changed.
260         * platform/mac/ScrollAnimatorMac.mm:
261         (-[ScrollbarPainterDelegate scrollerImp:animateKnobAlphaTo:duration:]):
262         (-[ScrollbarPainterDelegate scrollerImp:animateTrackAlphaTo:duration:]):
263         
264         If we're in a live resize, restore alpha to 1.
265         (WebCore::ScrollAnimatorMac::didAddVerticalScrollbar):
266         (WebCore::ScrollAnimatorMac::didAddHorizontalScrollbar):
267
268 2011-02-07  Beth Dakin  <bdakin@apple.com>
269
270         Reviewed by Eric Seidel.
271
272         Fix for https://bugs.webkit.org/show_bug.cgi?id=53950
273         USE_WK_SCROLLBAR_PAINTER in ScrollbarThemeMac should be in
274         Platform.h instead
275
276         Use hot new USE(WK_SCROLLBAR_PAINTER) from Platform.h rather
277         than the silly, old in-file #define.
278
279         * platform/mac/ScrollbarThemeMac.mm:
280         (+[ScrollbarPrefsObserver appearancePrefsChanged:]):
281         (WebCore::updateArrowPlacement):
282         (WebCore::ScrollbarThemeMac::registerScrollbar):
283         (WebCore::ScrollbarThemeMac::scrollbarThickness):
284         (WebCore::ScrollbarThemeMac::usesOverlayScrollbars):
285         (WebCore::ScrollbarThemeMac::hasThumb):
286         (WebCore::ScrollbarThemeMac::minimumThumbLength):
287         (WebCore::ScrollbarThemeMac::paint):
288
289 2011-02-07  Enrica Casucci  <enrica@apple.com>
290
291         Reviewed Adam Roben and Darin Adler.
292
293         WebKit2: drag and drop support on Windows.
294         https://bugs.webkit.org/show_bug.cgi?id=52775
295         <rdar://problem/8514409>
296
297         * loader/EmptyClients.h: Removed createDragImageFromLink.
298         * page/DragClient.h: Ditto.
299         * page/DragController.cpp:
300         (WebCore::DragController::startDrag): changed call to createDragImageFromLink.
301         * platform/DragImage.h:
302         * platform/mac/DragImageMac.mm:
303         (WebCore::createDragImageForLink): Moved from DragClient.
304         * platform/win/ClipboardUtilitiesWin.cpp: Added a series of functions
305         to de-serialize the drag data from the map into an IDataObject.
306         (WebCore::getWebLocData):
307         (WebCore::texthtmlFormat):
308         (WebCore::createGlobalData):
309         (WebCore::getFullCFHTML):
310         (WebCore::urlWFormat):
311         (WebCore::urlFormat):
312         (WebCore::filenameWFormat):
313         (WebCore::filenameFormat):
314         (WebCore::htmlFormat):
315         (WebCore::smartPasteFormat):
316         (WebCore::getURL):
317         (WebCore::getPlainText):
318         (WebCore::getTextHTML):
319         (WebCore::ClipboardDataItem::ClipboardDataItem):
320         (WebCore::getStringData):
321         (WebCore::getUtf8Data):
322         (WebCore::getCFData):
323         (WebCore::setUCharData):
324         (WebCore::setCharData):
325         (WebCore::setCFData):
326         (WebCore::getClipboardMap):
327         (WebCore::getClipboardData):
328         (WebCore::setClipboardData):
329         * platform/win/ClipboardUtilitiesWin.h:
330         * platform/win/DragImageWin.cpp: Moved createDragImageForLink from DragClient
331         to a platform specific file in WebCore. It makes a lot more sense here, since
332         the drag image is always created in WebCore for all the other content types
333         except for links.
334         (WebCore::dragLabelFont):
335         (WebCore::createDragImageForLink):
336         * platform/win/WCDataObject.cpp: Added new way to
337         construct a WCDataObject from a DragDataMap.
338         (WebCore::WCDataObject::createInstance):
339         (WebCore::WCDataObject::clearData):
340         * platform/win/WCDataObject.h:
341
342 2011-02-07  Sheriff Bot  <webkit.review.bot@gmail.com>
343
344         Unreviewed, rolling out r77848.
345         http://trac.webkit.org/changeset/77848
346         https://bugs.webkit.org/show_bug.cgi?id=53963
347
348         caused 6 test failures (Requested by othermaciej on #webkit).
349
350         * rendering/RenderBlockLineLayout.cpp:
351         (WebCore::RenderBlock::computeInlineDirectionPositionsForLine):
352
353 2011-02-04  Kenneth Russell  <kbr@google.com>
354
355         Reviewed by James Robinson.
356
357         Add shaders for GPU accelerated path rendering
358         https://bugs.webkit.org/show_bug.cgi?id=45520
359
360         Refactored SolidFillShader and TexShader to call new
361         generateVertex() and generateFragment() methods on base Shader
362         class, and added support for the Loop/Blinn shaders. Refactored
363         Loop/Blinn shader classes to derive from Shader.
364
365         Tested these changes with several of the IE9 Testdrive demos with
366         accelerated 2D canvas enabled, as well as a full layout test run
367         with --platform chromium-gpu.
368
369         * platform/graphics/gpu/LoopBlinnShader.cpp: Added.
370         (WebCore::LoopBlinnShader::LoopBlinnShader):
371         (WebCore::LoopBlinnShader::use):
372         * platform/graphics/gpu/LoopBlinnShader.h: Added.
373         * platform/graphics/gpu/LoopBlinnSolidFillShader.cpp: Added.
374         (WebCore::LoopBlinnSolidFillShader::create):
375         (WebCore::LoopBlinnSolidFillShader::LoopBlinnSolidFillShader):
376         (WebCore::LoopBlinnSolidFillShader::use):
377         * platform/graphics/gpu/LoopBlinnSolidFillShader.h: Added.
378         * platform/graphics/gpu/Shader.cpp:
379         (WebCore::Shader::affineTo4x4):
380         (WebCore::Shader::loadShader):
381         (WebCore::Shader::loadProgram):
382         (WebCore::Shader::generateVertex):
383         (WebCore::Shader::generateFragment):
384         * platform/graphics/gpu/Shader.h:
385         * platform/graphics/gpu/SolidFillShader.cpp:
386         (WebCore::SolidFillShader::create):
387         * platform/graphics/gpu/TexShader.cpp:
388         (WebCore::TexShader::TexShader):
389         (WebCore::TexShader::create):
390
391 2011-02-07  Dan Bernstein  <mitz@apple.com>
392
393         Reviewed by Oliver Hunt.
394
395         <rdar://problem/8946023> REGRESSION (r76674): SVG + BiDi text broken (text-intro-05-t.svg)
396         https://bugs.webkit.org/show_bug.cgi?id=53480
397
398         * WebCore.xcodeproj/project.pbxproj:
399         * platform/graphics/mac/ComplexTextController.cpp:
400         (WebCore::ComplexTextController::ComplexTextRun::ComplexTextRun): m_indexEnd should be an
401         offset into m_characters, not into the run’s characters.
402         * platform/graphics/mac/ComplexTextControllerATSUI.cpp:
403         (WebCore::ComplexTextController::ComplexTextRun::ComplexTextRun): Ditto.
404
405 2011-02-07  Sam Weinig  <sam@webkit.org>
406
407         Reviewed by Anders Carlsson.
408
409         Add bundle API to get the background color of a frame
410         <rdar://problem/8962670>
411         https://bugs.webkit.org/show_bug.cgi?id=53952
412
413         * WebCore.exp.in: Add export.
414
415 2011-02-07  Geoffrey Garen  <ggaren@apple.com>
416
417         Reviewed by Darin Adler.
418
419         Assertion failure in ~JSGlobalObject when loading apple.com HTML5
420         transitions demo page
421         https://bugs.webkit.org/show_bug.cgi?id=53853
422
423         This was a long-standing bookkeeping bug uncovered by some heap refactoring.
424
425         * html/HTMLCanvasElement.cpp:
426         (WebCore::HTMLCanvasElement::createImageBuffer):
427         * html/HTMLImageLoader.cpp:
428         (WebCore::HTMLImageLoader::notifyFinished):
429         * xml/XMLHttpRequest.cpp:
430         (WebCore::XMLHttpRequest::dropProtection): Take the JSLock before
431         reporting extra cost to the JavaScriptCore heap, since all use of
432         JavaScriptCore is supposed to be guarded by JSLock.
433
434 2011-02-07  Jian Li  <jianli@chromium.org>
435
436         Reviewed by David Levin.
437
438         Intermittent crash in fast/files/read-blob-async.html on the GTK+ debug
439         bots
440         https://bugs.webkit.org/show_bug.cgi?id=53104
441
442         Covered by the existing tests.
443
444         * fileapi/FileStreamProxy.cpp:
445         (WebCore::FileStreamProxy::startOnFileThread):
446         * platform/network/BlobRegistryImpl.cpp:
447         (WebCore::BlobRegistryImpl::createResourceHandle):
448         * platform/network/BlobResourceHandle.cpp:
449         (WebCore::BlobResourceHandle::BlobResourceHandle):
450         (WebCore::BlobResourceHandle::cancel):
451         (WebCore::delayedStartBlobResourceHandle):
452         (WebCore::BlobResourceHandle::start): Keep BlobResourceHandle alive
453         till the delay function is called.
454         (WebCore::BlobResourceHandle::doStart):
455         (WebCore::doNotifyFinish):
456         (WebCore::BlobResourceHandle::notifyFinish): Notify the client via the
457         standalone function to prevent the handle from being disposed immediately
458         by the client which will make the calls in the stack that're still bound
459         to the handle suffer.
460         * platform/network/BlobResourceHandle.h:
461         * platform/network/ResourceHandle.h: Change cancel() to virtual so that
462         BlobResourceHandle::cancel will be called when we abort a FileReader.
463
464 2011-02-07  Sheriff Bot  <webkit.review.bot@gmail.com>
465
466         Unreviewed, rolling out r77845.
467         http://trac.webkit.org/changeset/77845
468         https://bugs.webkit.org/show_bug.cgi?id=53946
469
470         build failure (Requested by lforschler_ on #webkit).
471
472         * WebCore.xcodeproj/project.pbxproj:
473         * accessibility/AccessibilityAllInOne.cpp:
474
475 2011-02-07  Darin Adler  <darin@apple.com>
476
477         https://bugs.webkit.org/show_bug.cgi?id=53939
478         fast/css/text-overflow-ellipsis.html failure after r77818/77819
479
480         * platform/text/TextCodecICU.cpp:
481         (WebCore::TextCodecICU::registerExtendedEncodingNames):
482         Add back the "utf8" synonym for "UTF-8".
483
484 2011-02-07  David Hyatt  <hyatt@apple.com>
485
486         Reviewed by Dan Bernstein.
487
488         Remove an unnecessary extra computeLogicalWidth() from line layout.
489
490         * rendering/RenderBlockLineLayout.cpp:
491         (WebCore::RenderBlock::computeInlineDirectionPositionsForLine):
492
493 2011-02-07  Lucas Forschler  <lforschler@apple.com>
494
495         Reviewed by Geoffrey Garen.
496
497         Fix Leopard Intel Debug Build.
498         <rdar://problem/8953606> REGRESSION: Can't link WebCore on 32-bit Leopard (53681)
499         This could potentially break windows, since I had to change #include <filename> to #include "filename"
500         
501         * WebCore.xcodeproj/project.pbxproj:
502         * accessibility/AccessibilityAllInOne.cpp:
503
504 2011-02-07  Sam Weinig  <sam@webkit.org>
505
506         Fix build.
507
508         * platform/mac/ScrollAnimatorMac.mm:
509         (WebCore::ScrollAnimatorMac::didAddVerticalScrollbar):
510         (WebCore::ScrollAnimatorMac::willRemoveVerticalScrollbar):
511         (WebCore::ScrollAnimatorMac::didAddHorizontalScrollbar):
512         (WebCore::ScrollAnimatorMac::willRemoveHorizontalScrollbar):
513
514 2011-02-07  Sam Weinig  <sam@webkit.org>
515
516         Reviewed by Beth Dakin.
517
518         Add mechanism to inform the ScrollAnimator when Scrollbars are added 
519         and removed.
520
521         * platform/ScrollAnimator.h:
522         (WebCore::ScrollAnimator::didAddVerticalScrollbar):
523         (WebCore::ScrollAnimator::willRemoveVerticalScrollbar):
524         (WebCore::ScrollAnimator::didAddHorizontalScrollbar):
525         (WebCore::ScrollAnimator::willRemoveHorizontalScrollbar):
526         Make virtual to allow platform specific overrides.
527
528         * platform/ScrollView.cpp:
529         (WebCore::ScrollView::setHasHorizontalScrollbar):
530         (WebCore::ScrollView::setHasVerticalScrollbar):
531         Call new ScrollableArea functions.
532
533         * platform/ScrollableArea.cpp:
534         (WebCore::ScrollableArea::didAddVerticalScrollbar):
535         (WebCore::ScrollableArea::willRemoveVerticalScrollbar):
536         (WebCore::ScrollableArea::didAddHorizontalScrollbar):
537         (WebCore::ScrollableArea::willRemoveHorizontalScrollbar):
538         * platform/ScrollableArea.h:
539         Pipe to ScrollAnimator.
540
541         * platform/mac/ScrollAnimatorMac.h:
542         * platform/mac/ScrollAnimatorMac.mm:
543         (WebCore::ScrollAnimatorMac::didAddVerticalScrollbar):
544         (WebCore::ScrollAnimatorMac::willRemoveVerticalScrollbar):
545         (WebCore::ScrollAnimatorMac::didAddHorizontalScrollbar):
546         (WebCore::ScrollAnimatorMac::willRemoveHorizontalScrollbar):
547         * platform/mac/ScrollbarThemeMac.h:
548         * platform/mac/ScrollbarThemeMac.mm:
549         (WebCore::ScrollbarThemeMac::registerScrollbar):
550         (WebCore::ScrollbarThemeMac::unregisterScrollbar):
551         (WebCore::ScrollbarThemeMac::painterForScrollbar):
552         Move painter delegate registration to the new didAdd/willRemove functions.
553
554 2011-02-07  Anders Carlsson  <andersca@apple.com>
555
556         Reviewed by Dan Bernstein.
557
558         Missing text match markers with accelerated content
559         https://bugs.webkit.org/show_bug.cgi?id=53934
560
561         When doing the fake paint that recomputes the text match rects, we need to
562         flatten compositing layers, otherwise the rects won't be updated until the next paint call.
563
564         (This worked by accident in WebKit1 because Safari calls -[NSWindow displayIfNeeded] on the containing
565         window before asking for the text match rects).
566
567         * editing/Editor.cpp:
568         (WebCore::Editor::countMatchesForText):
569
570 2011-02-07  Antti Koivisto  <antti@apple.com>
571
572         Reviewed by Andreas Kling.
573
574         REGRESSION(r77740): CSSStyleSelector accessing deleted memory for svg/dom/use-transform.svg
575         https://bugs.webkit.org/show_bug.cgi?id=53900
576         
577         Ignore link elements in shadow trees.
578
579         * dom/Element.cpp:
580         (WebCore::StyleSelectorParentPusher::StyleSelectorParentPusher):
581         (WebCore::StyleSelectorParentPusher::~StyleSelectorParentPusher):
582                 
583             Some asserts to catch cases like this.
584
585         (WebCore::Element::attach):
586         (WebCore::Element::recalcStyle):
587         * html/HTMLLinkElement.cpp:
588         (WebCore::HTMLLinkElement::HTMLLinkElement):
589         (WebCore::HTMLLinkElement::process):
590         (WebCore::HTMLLinkElement::insertedIntoDocument):
591         (WebCore::HTMLLinkElement::removedFromDocument):
592         * html/HTMLLinkElement.h:
593
594 2011-02-07  Darin Adler  <darin@apple.com>
595
596         Turn UTF-8 decoder off for now so we can look into failing tests
597         without leaving the tree red.
598
599         * platform/text/TextCodecICU.cpp:
600         (WebCore::TextCodecICU::registerBaseEncodingNames): Reverting
601         earlier change so this can handle UTF-8.
602         (WebCore::TextCodecICU::registerBaseCodecs): Ditto.
603         (WebCore::TextCodecICU::registerExtendedEncodingNames): Ditto.
604         (WebCore::TextCodecICU::registerExtendedCodecs): Ditto.
605         * platform/text/TextCodecICU.h: Ditto.
606         * platform/text/TextEncodingRegistry.cpp:
607         (WebCore::buildBaseTextCodecMaps): Ditto.
608         (WebCore::extendTextCodecMaps): Ditto.
609         * platform/text/brew/TextCodecBrew.cpp:
610         (WebCore::TextCodecBrew::registerBaseEncodingNames): Ditto.
611         (WebCore::TextCodecBrew::registerBaseCodecs): Ditto.
612         (WebCore::TextCodecBrew::registerExtendedEncodingNames): Ditto.
613         (WebCore::TextCodecBrew::registerExtendedCodecs): Ditto.
614         * platform/text/brew/TextCodecBrew.h: Ditto.
615         * platform/text/gtk/TextCodecGtk.cpp:
616         (WebCore::TextCodecGtk::registerBaseEncodingNames): Ditto.
617         (WebCore::TextCodecGtk::registerBaseCodecs): Ditto.
618         * platform/text/wince/TextCodecWinCE.cpp:
619         (WebCore::TextCodecWinCE::registerBaseEncodingNames): Ditto.
620         (WebCore::TextCodecWinCE::registerBaseCodecs): Ditto.
621         (WebCore::TextCodecWinCE::registerExtendedEncodingNames): Ditto.
622         (WebCore::TextCodecWinCE::registerExtendedCodecs): Ditto.
623         * platform/text/wince/TextCodecWinCE.h: Ditto.
624
625 2011-02-07  Anders Carlsson  <andersca@apple.com>
626
627         Reviewed by Maciej Stachowiak.
628
629         Don't exclude overlay scrollers from the page overlay bounds
630         https://bugs.webkit.org/show_bug.cgi?id=53924
631
632         Export ScrollbarTheme::nativeTheme.
633
634         * WebCore.exp.in:
635
636 2011-02-07  Zhenyao Mo  <zmo@google.com>
637
638         Reviewed by Kenneth Russell.
639
640         Crash in glDrawArrays with NaCl crystal model
641         https://bugs.webkit.org/show_bug.cgi?id=52831
642
643         * html/canvas/WebGLRenderingContext.cpp: Allocate large enough buffer for atttrib0 if it's enabled and not used.
644         (WebCore::WebGLRenderingContext::initVertexAttrib0):
645         (WebCore::WebGLRenderingContext::simulateVertexAttrib0):
646         * html/canvas/WebGLRenderingContext.h:
647
648 2011-02-07  Chris Fleizach  <cfleizach@apple.com>
649
650         Reviewed by Darin Adler.
651
652         WAI-ARIA @aria-sort not exposed on rowheader and columnheader roles.
653         https://bugs.webkit.org/show_bug.cgi?id=53842
654
655         Test: platform/mac/accessibility/aria-sort.html
656
657         * accessibility/AccessibilityObject.cpp:
658         (WebCore::AccessibilityObject::sortDirection):
659         * accessibility/AccessibilityObject.h:
660         * accessibility/mac/AccessibilityObjectWrapper.mm:
661         (-[AccessibilityObjectWrapper additionalAccessibilityAttributeNames]):
662         (-[AccessibilityObjectWrapper accessibilityAttributeValue:]):
663         * html/HTMLAttributeNames.in:
664
665 2011-02-07  Darin Adler  <darin@apple.com>
666
667         Reviewed by Antti Koivisto.
668
669         Add built-in decoder for UTF-8 for improved performance
670         https://bugs.webkit.org/show_bug.cgi?id=53898
671
672         Correct behavior is covered by existing tests.
673
674         * Android.mk: Added TextCodecUTF8.
675         * CMakeLists.txt: Ditto.
676         * GNUmakefile.am: Ditto.
677         * WebCore.gypi: Ditto.
678         * WebCore.pro: Ditto.
679         * WebCore.vcproj/WebCore.vcproj: Ditto.
680         * WebCore.xcodeproj/project.pbxproj: Ditto.
681
682         * platform/text/TextCodecICU.cpp: Removed registration of UTF-8
683         since that's now handled by the built-in UTF-8 codec.
684         (WebCore::TextCodecICU::registerEncodingNames): Renamed to remove
685         the word "extended" since all codecs from ICU are now extended.
686         (WebCore::TextCodecICU::registerCodecs): Ditto.
687         * platform/text/TextCodecICU.h: Ditto.
688
689         * platform/text/TextCodecUTF16.cpp:
690         (WebCore::TextCodecUTF16::decode): Added a FIXME about missing
691         error handling.
692
693         * platform/text/TextCodecUTF8.cpp: Added.
694         * platform/text/TextCodecUTF8.h: Added.
695
696         * platform/text/TextEncodingRegistry.cpp:
697         (WebCore::buildBaseTextCodecMaps): Added TextCodecUTF8, and
698         removed TextCodecICU, TextCodecBrew, and TextCodecWinCE.
699         (WebCore::extendTextCodecMaps): Updated names for
700         TextCodecICU and TextCodecWinCE.
701
702         * platform/text/brew/TextCodecBrew.cpp:
703         (WebCore::TextCodecBrew::registerEncodingNames): Renamed to remove
704         the word "extended" since all codecs from Brew are now extended.
705         (WebCore::TextCodecBrew::registerCodecs): Ditto.
706         * platform/text/brew/TextCodecBrew.h: Ditto.
707
708         * platform/text/gtk/TextCodecGtk.cpp:
709         (WebCore::TextCodecGtk::registerBaseEncodingNames): Removed
710         registration of UTF-8. It's questionable whether the other codecs
711         here are really basic. If we think they qualify, then we should
712         register them on other platforms, not just GTK.
713         (WebCore::TextCodecGtk::registerBaseCodecs): Ditto.
714
715         * platform/text/wince/TextCodecWinCE.cpp:
716         (WebCore::getCodePage): Removed special case for UTF-8 since we
717         no longer use this codec for UTF-8.
718         (WebCore::TextCodecWinCE::registerEncodingNames): Renamed to remove
719         the word "extended" since all codecs from WinCE are now extended.
720         (WebCore::TextCodecWinCE::registerCodecs): Ditto.
721         * platform/text/wince/TextCodecWinCE.h: Ditto.
722
723 2011-02-07  Mario Sanchez Prada  <msanchez@igalia.com>
724
725         Reviewed by Xan Lopez.
726
727         [Gtk] atk_text_get_caret_offset fails for list items
728         https://bugs.webkit.org/show_bug.cgi?id=53436
729
730         Consider list item markers when calculating the offset.
731
732         * accessibility/gtk/AccessibilityObjectWrapperAtk.cpp:
733         (webkit_accessible_text_get_caret_offset): Adjust the offset
734         with the item marker's length for list items.
735         (webkit_accessible_text_set_caret_offset): Replace usage of
736         g_utf8_strlen() by calling to markerText.length().
737
738 2011-02-07  Yi Shen  <yi.4.shen@nokia.com>
739
740         Reviewed by Tor Arne Vestbø.
741
742         [Qt] Fix LayoutTests/media/restore-from-page-cache.html
743         https://bugs.webkit.org/show_bug.cgi?id=53621
744
745         Changed the networkState to MediaPlayer::Loaded when 
746         MediaPlayerPrivateQt has enough data.
747
748         Test: media/restore-from-page-cache.html
749
750         * platform/graphics/qt/MediaPlayerPrivateQt.cpp:
751         (WebCore::MediaPlayerPrivateQt::updateStates):
752
753 2011-01-31  Pavel Podivilov  <podivilov@chromium.org>
754
755         Reviewed by Yury Semikhatsky.
756
757         Web Inspector: implement beautification of scripts inlined in html documents.
758         https://bugs.webkit.org/show_bug.cgi?id=52706
759
760         To beautify scripts inlined in html, we need to cut individual scripts, beautify them using UglifyJS library, and
761         finally paste them back to html.
762
763         * WebCore.gypi:
764         * WebCore.vcproj/WebCore.vcproj:
765         * inspector/front-end/ScriptFormatter.js:
766         (WebInspector.ScriptFormatter): Implement formatting of scripts inlined in html.
767         (WebInspector.ScriptFormatter.prototype.formatContent.didFormatChunks):
768         (WebInspector.ScriptFormatter.prototype.formatContent):
769         (WebInspector.ScriptFormatter.prototype._splitContentIntoChunks):
770         (WebInspector.ScriptFormatter.prototype._formatChunks.didFormat):
771         (WebInspector.ScriptFormatter.prototype._formatChunks):
772         (WebInspector.ScriptFormatter.prototype._buildContentFromChunks):
773         (WebInspector.ScriptFormatter.prototype._formatScript.messageHandler):
774         (WebInspector.ScriptFormatter.prototype._formatScript):
775         * inspector/front-end/ScriptFormatterWorker.js:
776         (onmessage):
777         (buildMapping):
778         * inspector/front-end/SourceFrame.js:
779         (WebInspector.SourceFrameContent): Use SourceFrameContent and FormattedSourceFrameContent to perform operations with line numbers.
780         * inspector/front-end/SourceFrameContent.js: Added.
781         (WebInspector.SourceFrameContent): Helper class, holds resource text and scripts layout
782         (WebInspector.SourceFrameContent.prototype.get scriptRanges):
783         (WebInspector.SourceFrameContent.prototype.locationToPosition):
784         (WebInspector.SourceFrameContent.prototype.positionToLocation):
785         (WebInspector.SourceFrameContent.prototype.scriptLocationForLineNumber):
786         (WebInspector.SourceFrameContent.prototype.scriptLocationForRange):
787         (WebInspector.SourceFrameContent.prototype.lineNumberToRange):
788         (WebInspector.SourceFrameContent.prototype._intersectingScriptRange):
789         (WebInspector):
790         (WebInspector.FormattedSourceFrameContent): Helper class, holds original and formatted versions of resource and mapping between them.
791         (WebInspector.FormattedSourceFrameContent.prototype.get text):
792         (WebInspector.FormattedSourceFrameContent.prototype.originalLocationToFormattedLocation):
793         (WebInspector.FormattedSourceFrameContent.prototype.scriptLocationForFormattedLineNumber):
794         (WebInspector.FormattedSourceFrameContent.prototype._convertPosition):
795         * inspector/front-end/WebKit.qrc:
796         * inspector/front-end/inspector.html:
797
798 2011-02-07  Pavel Feldman  <pfeldman@chromium.org>
799
800         Reviewed by Yury Semikhatsky.
801
802         Web Inspector: "Reveal in elements panel" does not always work.
803         https://bugs.webkit.org/show_bug.cgi?id=53775
804
805         * inspector/front-end/ConsoleView.js:
806         (WebInspector.ConsoleView):
807         * inspector/front-end/ContextMenu.js:
808         (WebInspector.ContextMenu.prototype.show):
809         * inspector/front-end/ElementsPanel.js:
810         (WebInspector.ElementsPanel.prototype.switchToAndFocus):
811         * inspector/front-end/ElementsTreeOutline.js:
812         (WebInspector.ElementsTreeOutline.prototype._contextMenuEventFired.focusElement):
813         (WebInspector.ElementsTreeOutline.prototype._contextMenuEventFired):
814         * inspector/front-end/ObjectPropertiesSection.js:
815         (WebInspector.ObjectPropertyTreeElement.prototype.update):
816         (WebInspector.ObjectPropertyTreeElement.prototype._contextMenuEventFired):
817         * inspector/front-end/inspector.js:
818         (WebInspector.cancelSearch):
819
820 2011-02-07  Adam Barth  <abarth@webkit.org>
821
822         Reviewed by Eric Seidel.
823
824         Relative .. in URL paths shouldn't skip adjacent / characters
825         https://bugs.webkit.org/show_bug.cgi?id=53907
826
827         Our new behavior matches Firefox, Chrome, and IE.
828
829         * platform/KURL.cpp:
830         (WebCore::copyPathRemovingDots):
831
832 2011-02-07  Maciej Stachowiak  <mjs@apple.com>
833
834         Reviewed by Antti Koivisto.
835
836         WebKitTestRunner does not block remote resources or complain about them
837         https://bugs.webkit.org/show_bug.cgi?id=42139
838         <rdar://problem/8183942>
839
840         * Configurations/WebCore.xcconfig: Allow WebKitTestRunner to link
841         WebCore.
842         * WebCore.exp.in: Export a handful of KURL symbols.
843
844 2011-02-06  Ryosuke Niwa  <rniwa@webkit.org>
845
846         Reviewed by Darin Adler.
847
848         OwnArraryPtr.h uses deleteOwnedPtr but doesn’t include OwnPtrCommon.h
849         https://bugs.webkit.org/show_bug.cgi?id=52867
850
851         * ForwardingHeaders/wtf/OwnArrayPtrCommon.h: Removed.
852         * bindings/v8/NPV8Object.cpp:
853         (WebCore::createValueListFromVariantArgs): Returns PassOwnArrayPtr<v8::Handle<v8::Value>> instead of
854         v8::Handle<v8::Value>*.
855         (_NPN_Invoke): Calls createValueListFromVariantArgs.
856         (_NPN_InvokeDefault): createValueListFromVariantArgs.
857         (_NPN_Construct): createValueListFromVariantArgs.
858         * bindings/v8/ScriptFunctionCall.cpp:
859         (WebCore::ScriptFunctionCall::call): Calls adoptArrayPtr.
860         (WebCore::ScriptFunctionCall::construct): Ditto.
861         (WebCore::ScriptCallback::call):
862         * bindings/v8/V8DOMWindowShell.cpp:
863         (WebCore::V8DOMWindowShell::createNewContext): Ditto.
864         * bindings/v8/V8NPObject.cpp:
865         (WebCore::npObjectInvokeImpl): Ditto
866         * bindings/v8/V8NodeFilterCondition.cpp:
867         (WebCore::V8NodeFilterCondition::acceptNode): Ditto,
868         * html/HTMLAreaElement.cpp:
869         (WebCore::HTMLAreaElement::parseMappedAttribute): Calls newCoordsArray.
870         * html/HTMLFrameSetElement.cpp:
871         (WebCore::HTMLFrameSetElement::parseMappedAttribute): Calls newLengthArray.
872         * html/canvas/WebGLRenderingContext.cpp:
873         (WebCore::WebGLRenderingContext::getAttachedShaders): Calls adoptArraYptr.
874         (WebCore::WebGLRenderingContext::simulateVertexAttrib0): Ditto.
875         (WebCore::WebGLRenderingContext::LRUImageBufferCache::LRUImageBufferCache): Dito.
876         * platform/Length.cpp:
877         (WebCore::newCoordsArray): Returns PassOwnArrayPtr<Length> instead of Length*.
878         (WebCore::newLengthArray): Returns PassOwnArrayPtr<Length> instead of Length*.
879         * platform/Length.h: Prototype changes.
880         * platform/graphics/ANGLEWebKitBridge.cpp:
881         (WebCore::ANGLEWebKitBridge::validateShaderSource): Calls adoptArrayPtr.
882         * platform/graphics/ca/win/CACFLayerTreeHost.cpp:
883         (WebCore::getDirtyRects): Ditto.
884         * platform/graphics/chromium/ComplexTextControllerLinux.cpp:
885         (WebCore::ComplexTextController::getNormalizedTextRun): Ditto.
886         * platform/graphics/chromium/HarfbuzzSkia.cpp:
887         (WebCore::glyphsToAdvances): Ditto.
888         (WebCore::canRender): Ditto.
889         * platform/graphics/gpu/Texture.cpp:
890         (WebCore::Texture::updateSubRect): Ditto.
891         * platform/graphics/opengl/GraphicsContext3DOpenGL.cpp:
892         (WebCore::GraphicsContext3D::paintRenderingResultsToCanvas): Ditto.
893         * platform/graphics/skia/PlatformContextSkia.cpp:
894         (WebCore::PlatformContextSkia::readbackHardwareToSoftware): Ditto.
895         * platform/graphics/wince/SharedBitmap.cpp:
896         (WebCore::SharedBitmap::to16bit): Ditto.
897         * platform/win/ContextMenuWin.cpp:
898         (WebCore::ContextMenu::getContextMenuItems): Ditto.
899         * platform/win/LoggingWin.cpp:
900         (WebCore::initializeWithUserDefault): Ditto.
901         * plugins/win/PluginPackageWin.cpp:
902         (WebCore::PluginPackage::fetchInfo): Ditto.
903
904 2011-02-06  Kent Tamura  <tkent@chromium.org>
905
906         Unreviewed.
907
908         * WebCore.xcodeproj/project.pbxproj: Run sort-xcode-project-file.
909
910 2011-02-03  Dominic Cooney  <dominicc@google.com>
911
912         Reviewed by Dimitri Glazkov.
913
914         Convert <keygen> option elements to a shadow DOM
915         https://bugs.webkit.org/show_bug.cgi?id=51379
916
917         Covered by existing tests e.g. fast/html/keygen.html,
918         html5lib/runner.html, etc.
919
920         * css/html.css:
921         (form): Cleanup.
922         (keygen, select): Border radii should match so focus ring looks good.
923         (keygen::-webkit-keygen-select): No margin on the shadow element.
924         (select): Hoisting border radius to keygen, select rule.
925         * dom/SelectElement.cpp:
926         (WebCore::toSelectElement): keygen is no longer a select element.
927         * html/HTMLKeygenElement.cpp: Implements keygen shadow.
928         (WebCore::KeygenSelectElement::create):
929         (WebCore::KeygenSelectElement::shadowPseudoId):
930         (WebCore::KeygenSelectElement::KeygenSelectElement):
931         (WebCore::HTMLKeygenElement::HTMLKeygenElement):
932         (WebCore::HTMLKeygenElement::parseMappedAttribute):
933         (WebCore::HTMLKeygenElement::appendFormData):
934         (WebCore::HTMLKeygenElement::formControlType):
935         (WebCore::HTMLKeygenElement::reset):
936         (WebCore::HTMLKeygenElement::selectShadow):
937         * html/HTMLKeygenElement.h: keygen is no longer a select on C++ side.
938         (WebCore::HTMLKeygenElement::canStartSelection):
939         (WebCore::HTMLKeygenElement::isEnumeratable):
940         (WebCore::HTMLKeygenElement::isResettable):
941         * html/HTMLOptionElement.cpp:
942         (WebCore::HTMLOptionElement::ownerSelectElement): Only owned by selects.
943         * html/HTMLSelectElement.cpp:
944         (WebCore::HTMLSelectElement::HTMLSelectElement): Only 'select' tag name.
945
946 2011-02-06  Benjamin Poulain  <ikipou@gmail.com>
947
948         Reviewed by Kenneth Rohde Christiansen.
949
950         [Qt] Fix coding style errors in ClipboardQt.h
951         https://bugs.webkit.org/show_bug.cgi?id=43520
952
953         Fix coding style: order of header and indentation.
954
955         * platform/qt/ClipboardQt.h:
956         (WebCore::ClipboardQt::create):
957         (WebCore::ClipboardQt::clipboardData):
958         (WebCore::ClipboardQt::invalidateWritableData):
959
960 2011-02-06  Antti Koivisto  <antti@apple.com>
961
962         Reviewed by Maciej Stachowiak.
963
964         Use bloom filter for descendant selector filtering
965         https://bugs.webkit.org/show_bug.cgi?id=53880
966         
967         Bloom filter is faster than a hash set in this kind of use.
968         
969         Shark thinks this speeds up style matching by ~30% on sites
970         with lots of descendant selectors.
971
972         * ForwardingHeaders/wtf/BloomFilter.h: Added.
973         * css/CSSStyleSelector.cpp:
974         (WebCore::collectElementIdentifierHashes):
975         (WebCore::CSSStyleSelector::pushParent):
976         (WebCore::CSSStyleSelector::popParent):
977         (WebCore::CSSStyleSelector::fastRejectSelector):
978         (WebCore::RuleData::collectDescendantSelectorIdentifierHashes):
979         * css/CSSStyleSelector.h:
980
981 2011-02-06  Maciej Stachowiak  <mjs@apple.com>
982
983         Reviewed by Antti Koivisto.
984
985         media/video-document-types.html sometimes crashes the WebProcess
986         https://bugs.webkit.org/show_bug.cgi?id=53884
987
988         No new tests. Already covered by media/video-document-types.html
989
990         * html/HTMLMediaElement.cpp:
991         (WebCore::HTMLMediaElement::userCancelledLoad): Stop the load timer
992         when cancelling the load.
993
994 2011-02-06  Patrick Gansterer  <paroga@webkit.org>
995
996         Reviewed by Adam Roben.
997
998         [WIN] Use WCHAR instead of TCHAR
999         https://bugs.webkit.org/show_bug.cgi?id=53863
1000
1001         We always use the UNICODE versions of windows functions, so
1002         the usage of TCHAR makes no sense and mixing them is bad style.
1003
1004         * platform/graphics/win/IconWin.cpp:
1005         (WebCore::Icon::createIconForFiles):
1006         * platform/graphics/win/QTMovie.cpp:
1007         * platform/graphics/win/QTMovieGWorld.cpp:
1008         (QTMovieGWorld::fullscreenWndProc):
1009         (QTMovieGWorld::enterFullscreen):
1010         * platform/graphics/win/SimpleFontDataCGWin.cpp:
1011         (WebCore::SimpleFontData::platformInit):
1012         * platform/graphics/win/SimpleFontDataCairoWin.cpp:
1013         * platform/graphics/win/SimpleFontDataWin.cpp:
1014         * platform/graphics/wince/SimpleFontDataWinCE.cpp:
1015         * platform/win/BString.cpp:
1016         * platform/win/ClipboardWin.cpp:
1017         (WebCore::filesystemPathFromUrlOrTitle):
1018         (WebCore::createGlobalHDropContent):
1019         (WebCore::createGlobalImageFileDescriptor):
1020         * platform/win/ContextMenuWin.cpp:
1021         * platform/win/CursorWin.cpp:
1022         (WebCore::loadSharedCursor):
1023         * platform/win/FileChooserWin.cpp:
1024         (WebCore::FileChooser::basenameForWidth):
1025         * platform/win/PopupMenuWin.cpp:
1026         (WebCore::PopupMenuWin::popupClassName):
1027         (WebCore::PopupMenuWin::show):
1028         * platform/win/PopupMenuWin.h:
1029
1030 2011-02-06  Patrick Gansterer  <paroga@webkit.org>
1031
1032         Reviewed by Andreas Kling.
1033
1034         Replace FLT_MAX with std::numeric_limits
1035         https://bugs.webkit.org/show_bug.cgi?id=53861
1036
1037         Also move EFL's userIdleTime from TemporaryLinkStubs into SystemTimeEfl.
1038
1039         * html/NumberInputType.cpp:
1040         * html/parser/HTMLParserIdioms.cpp:
1041         (WebCore::parseToDoubleForNumberType):
1042         * platform/brew/SystemTimeBrew.cpp:
1043         (WebCore::userIdleTime):
1044         * platform/efl/SystemTimeEfl.cpp:
1045         (WebCore::userIdleTime):
1046         * platform/efl/TemporaryLinkStubs.cpp:
1047         * platform/graphics/ca/GraphicsLayerCA.cpp:
1048         (WebCore::GraphicsLayerCA::setupAnimation):
1049         * platform/win/SystemTimeWin.cpp:
1050         (WebCore::userIdleTime):
1051         * platform/wx/SystemTimeWx.cpp:
1052         (WebCore::userIdleTime):
1053
1054 2011-02-06  Patrick Gansterer  <paroga@webkit.org>
1055
1056         Reviewed by Andreas Kling.
1057
1058         [CMake] Add dependencies for Visual Studio projects
1059         https://bugs.webkit.org/show_bug.cgi?id=53773
1060
1061         Add a JavaScriptCore dependecy to WebCore, so CMake can 
1062         generate the correct build order for the solution.
1063
1064         * CMakeLists.txt:
1065
1066 2011-02-06  Patrick Gansterer  <paroga@webkit.org>
1067
1068         Reviewed by Andreas Kling.
1069
1070         [CMake] Unify ENABLE_SVG sections
1071         https://bugs.webkit.org/show_bug.cgi?id=53778
1072
1073         * CMakeLists.txt:
1074
1075 2011-02-06  Andreas Kling  <kling@webkit.org>
1076
1077         Reviewed by Dirk Schulze.
1078
1079         Refactor Font::normalizeSpaces() to avoid an extra String copy.
1080         https://bugs.webkit.org/show_bug.cgi?id=53871
1081
1082         Have normalizeSpaces() take UChar*,length arguments instead of a
1083         String, since all call sites were creating temporaries from these
1084         components anyway.
1085
1086         Font::normalizeSpaces() now always makes 1 String copy,
1087         instead of 1 in the best case and 2 in the worst case.
1088
1089         * platform/graphics/Font.cpp:
1090         (WebCore::Font::normalizeSpaces):
1091         * platform/graphics/Font.h:
1092         * platform/graphics/qt/FontQt.cpp:
1093         (WebCore::drawTextCommon):
1094         (WebCore::Font::floatWidthForSimpleText):
1095         (WebCore::Font::floatWidthForComplexText):
1096         (WebCore::Font::offsetForPositionForSimpleText):
1097         (WebCore::Font::offsetForPositionForComplexText):
1098         (WebCore::Font::selectionRectForSimpleText):
1099         (WebCore::Font::selectionRectForComplexText):
1100         * svg/SVGFont.cpp:
1101         (WebCore::SVGTextRunWalker::walk):
1102
1103 2011-02-06  Andreas Kling  <kling@webkit.org>
1104
1105         Reviewed by Dirk Schulze.
1106
1107         Fix potential buffer overrun in SVGTextRunWalker::walk()
1108         https://bugs.webkit.org/show_bug.cgi?id=53870
1109
1110         A new String was created from a UChar* with a 'length' argument
1111         that could be greater than the number of UChars available.
1112
1113         * svg/SVGFont.cpp:
1114         (WebCore::SVGTextRunWalker::walk):
1115
1116 2011-02-05  Adam Barth  <abarth@webkit.org>
1117
1118         Reviewed by Eric Seidel.
1119
1120         Remove unused parameter related to XSSAuditor
1121         https://bugs.webkit.org/show_bug.cgi?id=53862
1122
1123         * WebCore.exp.in:
1124         * bindings/ScriptControllerBase.cpp:
1125         (WebCore::ScriptController::executeScript):
1126         (WebCore::ScriptController::executeIfJavaScriptURL):
1127         * bindings/ScriptControllerBase.h:
1128         * bindings/js/ScriptController.cpp:
1129         (WebCore::ScriptController::evaluateInWorld):
1130         (WebCore::ScriptController::evaluate):
1131         (WebCore::ScriptController::executeScriptInWorld):
1132         * bindings/js/ScriptController.h:
1133         * bindings/v8/ScriptController.cpp:
1134         (WebCore::ScriptController::evaluate):
1135         * bindings/v8/ScriptController.h:
1136
1137 2011-02-05  Adam Barth  <abarth@webkit.org>
1138
1139         Fix Qt build.
1140
1141         * WebCore.pro:
1142
1143 2011-02-05  Adam Barth  <abarth@webkit.org>
1144
1145         Reviewed by Eric Seidel.
1146
1147         Delete XSSAuditor
1148         https://bugs.webkit.org/show_bug.cgi?id=53859
1149
1150         The job of the XSSAuditor is now done by the XSSFilter.  In the future,
1151         we might rename XSSFilter to XSSAuditor.
1152
1153         * Android.mk:
1154         * CMakeLists.txt:
1155         * GNUmakefile.am:
1156         * WebCore.gypi:
1157         * WebCore.vcproj/WebCore.vcproj:
1158         * WebCore.xcodeproj/project.pbxproj:
1159         * bindings/ScriptControllerBase.cpp:
1160         (WebCore::ScriptController::executeIfJavaScriptURL):
1161         * bindings/ScriptControllerBase.h:
1162         * bindings/js/ScriptController.cpp:
1163         (WebCore::ScriptController::ScriptController):
1164         (WebCore::ScriptController::evaluateInWorld):
1165         * bindings/js/ScriptController.h:
1166         * bindings/js/ScriptEventListener.cpp:
1167         (WebCore::createAttributeEventListener):
1168         * bindings/v8/ScriptController.cpp:
1169         (WebCore::ScriptController::ScriptController):
1170         (WebCore::ScriptController::evaluate):
1171         * bindings/v8/ScriptController.h:
1172         * bindings/v8/ScriptEventListener.cpp:
1173         (WebCore::createAttributeEventListener):
1174         * dom/Document.cpp:
1175         (WebCore::Document::implicitOpen):
1176         (WebCore::Document::processBaseElement):
1177         * dom/ScriptableDocumentParser.cpp:
1178         (WebCore::ScriptableDocumentParser::ScriptableDocumentParser):
1179         * dom/ScriptableDocumentParser.h:
1180         * html/parser/HTMLDocumentParser.cpp:
1181         (WebCore::HTMLDocumentParser::shouldLoadExternalScriptFromSrc):
1182         * loader/SubframeLoader.cpp:
1183         (WebCore::SubframeLoader::requestObject):
1184         (WebCore::SubframeLoader::loadMediaPlayerProxyPlugin):
1185         * page/XSSAuditor.cpp: Removed.
1186         * page/XSSAuditor.h: Removed.
1187
1188 2011-02-05  Anders Carlsson  <andersca@apple.com>
1189
1190         Reviewed by Darin Adler.
1191
1192         Need a way to resize and scroll the page at the same time
1193         https://bugs.webkit.org/show_bug.cgi?id=53814
1194         <rdar://problem/8498008>
1195
1196         Export a function needed by WebKit2.
1197
1198         * WebCore.exp.in:
1199
1200 2011-02-05  Patrick Gansterer  <paroga@webkit.org>
1201
1202         Reviewed by Alexey Proskuryakov.
1203
1204         Use Document::encoding() instead of DocumentWriter::encoding()
1205         https://bugs.webkit.org/show_bug.cgi?id=53398
1206
1207         This change makes the code more readable, when a subresource
1208         inherits the character encoding of the document.
1209
1210         * dom/ProcessingInstruction.cpp:
1211         (WebCore::ProcessingInstruction::checkStyleSheet):
1212         * dom/ScriptElement.cpp:
1213         (WebCore::ScriptElement::scriptCharset):
1214         * html/HTMLLinkElement.cpp:
1215         (WebCore::HTMLLinkElement::process):
1216         * loader/cache/CachedResourceLoader.cpp:
1217         (WebCore::CachedResourceLoader::requestPreload):
1218         * platform/network/FormDataBuilder.cpp:
1219         (WebCore::FormDataBuilder::encodingFromAcceptCharset):
1220
1221 2011-02-05  Adam Barth  <abarth@webkit.org>
1222
1223         Reviewed by Eric Seidel.
1224
1225         Introduce URLString to represent a canonicalized URL represented by a string
1226         https://bugs.webkit.org/show_bug.cgi?id=53847
1227
1228         Instead of using String all over the codebase to represent a URL,
1229         instead we should have a type to represent a canonicalized URL in the
1230         form of a string.  This patch introduces that type.
1231
1232         * GNUmakefile.am:
1233         * WebCore.gypi:
1234         * WebCore.xcodeproj/project.pbxproj:
1235         * platform/KURL.cpp:
1236         (WebCore::KURL::KURL):
1237         * platform/KURL.h:
1238         (WebCore::KURL::urlString):
1239
1240 2011-02-05  Robert Hogan  <robert@webkit.org>
1241
1242         Reviewed by Antonio Gomes.
1243
1244         [Qt] Style widgets not rendering
1245         https://bugs.webkit.org/show_bug.cgi?id=53849
1246
1247         * html/HTMLObjectElement.cpp:
1248         (WebCore::HTMLObjectElement::hasValidClassId): x-qt-styled-widget is a valid class id too
1249
1250 2011-02-05  Jochen Eisinger  <jochen@chromium.org>
1251
1252         Reviewed by Adam Barth.
1253
1254         Add ContentSecurityPolicy object to Document and pass the X-WebKit-CSP header from the MainResourceLoader.
1255         https://bugs.webkit.org/show_bug.cgi?id=53685
1256
1257         * WebCore.xcodeproj/project.pbxproj:
1258         * dom/Document.h:
1259         (WebCore::Document::contentSecurityPolicy):
1260         * loader/MainResourceLoader.cpp:
1261         (WebCore::MainResourceLoader::didReceiveResponse):
1262         * page/ContentSecurityPolicy.cpp:
1263         (WebCore::ContentSecurityPolicy::didReceiveHeader):
1264         * page/ContentSecurityPolicy.h:
1265
1266 2011-02-05  Eric Seidel  <eric@webkit.org>
1267
1268         Reviewed by Adam Barth.
1269
1270         Safari should lowercase schemes in cannonicalized urls to match every other browser
1271         https://bugs.webkit.org/show_bug.cgi?id=53848
1272
1273         We're clearly the odd man out here.  See results from every browser at:
1274         https://github.com/abarth/url-spec/blob/master/tests/gurl-results/by-browser.txt
1275
1276         * platform/KURL.cpp:
1277         (WebCore::KURL::parse):
1278          - Just lowercase the scheme when copying.
1279
1280 2011-02-05  Antti Koivisto  <antti@apple.com>
1281
1282         Reviewed by Dave Hyatt.
1283
1284         Optimize matching of descendant selectors
1285         https://bugs.webkit.org/show_bug.cgi?id=49876
1286         <rdar://problem/8772822>
1287         
1288         During style recalculation, maintain a filter of tags, ids and classes seen in ancestor elements.
1289         Use the filter to quickly reject descendant and child selectors when doing style matching.
1290
1291         This speeds up style recalculations 3-6x on many major web sites.
1292
1293         * css/CSSStyleSelector.cpp:
1294         (WebCore::RuleData::RuleData):
1295         (WebCore::RuleData::descendantSelectorIdentifierHashes):
1296         (WebCore::collectElementIdentifiers):
1297         (WebCore::CSSStyleSelector::pushParent):
1298         (WebCore::CSSStyleSelector::popParent):
1299         (WebCore::CSSStyleSelector::fastRejectSelector):
1300         (WebCore::CSSStyleSelector::matchRulesForList):
1301         (WebCore::RuleData::collectDescendantSelectorIdentifierHashes):
1302         * css/CSSStyleSelector.h:
1303         (WebCore::CSSStyleSelector::ParentStackFrame::ParentStackFrame):
1304         * dom/Element.cpp:
1305         (WebCore::StyleSelectorParentPusher::StyleSelectorParentPusher):
1306         (WebCore::StyleSelectorParentPusher::push):
1307         (WebCore::StyleSelectorParentPusher::~StyleSelectorParentPusher):
1308         (WebCore::Element::attach):
1309         (WebCore::Element::recalcStyle):
1310
1311 2011-02-05  Nate Chapin  <japhet@chromium.org>
1312
1313         Reviewed by Adam Barth.
1314
1315         Refactor: NotificationCenter shouldn't hold its own copy of the ScriptExecutionContext*
1316         when it inherits one from ActiveDOMObject.
1317         https://bugs.webkit.org/show_bug.cgi?id=53815
1318
1319         * bindings/js/JSDesktopNotificationsCustom.cpp:
1320         (WebCore::JSNotificationCenter::requestPermission):
1321         * bindings/v8/custom/V8NotificationCenterCustom.cpp:
1322         (WebCore::V8NotificationCenter::requestPermissionCallback):
1323         * notifications/NotificationCenter.cpp:
1324         (WebCore::NotificationCenter::NotificationCenter):
1325         (WebCore::NotificationCenter::checkPermission):
1326         (WebCore::NotificationCenter::requestPermission):
1327         (WebCore::NotificationCenter::disconnectFrame):
1328         * notifications/NotificationCenter.h:
1329         (WebCore::NotificationCenter::createHTMLNotification):
1330         (WebCore::NotificationCenter::createNotification):
1331
1332 2011-02-04  Adam Barth  <abarth@webkit.org>
1333
1334         Reviewed by Maciej Stachowiak.
1335
1336         Crash in WebCore::TextEncoding::decode below XSSFilter::init
1337         https://bugs.webkit.org/show_bug.cgi?id=53837
1338
1339         Add missing null check.
1340
1341         Test: http/tests/security/xssAuditor/non-block-javascript-url-frame.html
1342
1343         * html/parser/XSSFilter.cpp:
1344         (WebCore::XSSFilter::init):
1345
1346 2011-02-04  Simon Fraser  <simon.fraser@apple.com>
1347
1348         Reviewed by Dan Bernstein.
1349
1350         Crashes in ShadowBlur via WebKit2 FindController
1351         https://bugs.webkit.org/show_bug.cgi?id=53830
1352         
1353         Fix a crash cause by re-entering ShadowBlur, and add assertions to
1354         detect when it happens.
1355         
1356         The re-entrancy occurred when drawRectShadowWithTiling() filled
1357         the interior of the shadow with fillRect() on the context
1358         which still had the shadow state set. This would make another ShadowBlur
1359         on the stack and call into the code again, potentially blowing away
1360         the image buffer.
1361         
1362         Fix by turning off shadows in the destination context while we're
1363         drawing the tiled shadow. The non-tiled code path already did this.
1364
1365         Not testable because CSS shadows clip out the inside of the rect
1366         being shadowed, and SVG uses fillPath, even for rects.
1367
1368         * platform/graphics/ShadowBlur.cpp:
1369         (WebCore::ScratchBuffer::ScratchBuffer):
1370         (WebCore::ScratchBuffer::getScratchBuffer):
1371         (WebCore::ScratchBuffer::scheduleScratchBufferPurge):
1372         (WebCore::ShadowBlur::ShadowBlur):
1373         (WebCore::ShadowBlur::drawRectShadowWithTiling):
1374
1375 2011-02-04  Carlos Garcia Campos  <cgarcia@igalia.com>
1376
1377         Reviewed by Martin Robinson.
1378
1379         [GTK] Don't use a fixed size for search field icons
1380         https://bugs.webkit.org/show_bug.cgi?id=50624
1381
1382         Use the parent input content box to make sure the icon fits in the
1383         search field, scaling it down when needed.
1384
1385         * platform/gtk/RenderThemeGtk.cpp:
1386         (WebCore::paintGdkPixbuf):
1387         (WebCore::getIconSizeForPixelSize):
1388         (WebCore::adjustSearchFieldIconStyle):
1389         (WebCore::RenderThemeGtk::adjustSearchFieldResultsDecorationStyle):
1390         (WebCore::centerRectVerticallyInParentInputElement):
1391         (WebCore::RenderThemeGtk::paintSearchFieldResultsDecoration):
1392         (WebCore::RenderThemeGtk::adjustSearchFieldCancelButtonStyle):
1393         (WebCore::RenderThemeGtk::paintSearchFieldCancelButton):
1394         (WebCore::RenderThemeGtk::paintCapsLockIndicator):
1395         (WebCore::RenderThemeGtk::paintMediaButton):
1396
1397 2011-02-04  Hironori Bono  <hbono@chromium.org>
1398
1399         Reviewed by Adam Barth.
1400
1401         [chromium] JPEG corruption
1402         https://bugs.webkit.org/show_bug.cgi?id=53250
1403
1404         Same as gray-scale JPEGs, we convert the colors of CMYK JPEGs with color
1405         profiles from CMYK to RGB twice and it causes color corruption. This
1406         change suppresses the color profiles for CMYK JPEGs same as gray-scale
1407         ones.
1408
1409         Test: fast/images/cmyk-jpeg-with-color-profile.html
1410
1411         * platform/image-decoders/jpeg/JPEGImageDecoder.cpp:
1412         (WebCore::JPEGImageReader::decode):
1413
1414 2011-02-04  Xiyuan Xia  <xiyuan@chromium.org>
1415
1416         Reviewed by Tony Chang.
1417
1418         [Chromium] Option text in select popup does not align with menulist button text
1419         https://bugs.webkit.org/show_bug.cgi?id=53632
1420
1421         This makes clientPaddingLeft and  clientPaddingRight return
1422         the additional m_innerBlock's padding so that the popup item text
1423         aligns with the menulist button text.
1424
1425         * rendering/RenderMenuList.cpp:
1426         (WebCore::RenderMenuList::clientPaddingLeft):
1427         (WebCore::RenderMenuList::clientPaddingRight):
1428
1429 2011-02-04  Anders Carlsson  <andersca@apple.com>
1430
1431         Reviewed by Sam Weinig and Beth Dakin.
1432
1433         REGRESSION: Horizontal scrollbar thumbs leave artifacts over page content when scrolling vertically
1434         <rdar://problem/8962457>
1435
1436         * platform/ScrollView.cpp:
1437         (WebCore::ScrollView::scrollContents):
1438         Subtract scrollbars from the scroll view rect if overlay scrollers are enabled.
1439         
1440         * platform/ScrollableArea.cpp:
1441         (WebCore::ScrollableArea::setScrollOffsetFromAnimation):
1442         Make sure to invalidate both scrollbars if overlay scrollers are enabled.
1443
1444 2011-02-04  Adam Barth  <abarth@webkit.org>
1445
1446         Reviewed by Eric Seidel.
1447
1448         PluginDocuments don't create widgets for plugins on back/forward
1449         https://bugs.webkit.org/show_bug.cgi?id=53474
1450
1451         Long ago, PluginDocument always caused the HTMLEmbedElement to create
1452         its widget synchronously during a post-layout task.  Recently, however,
1453         some changes to the HistroyController caused layout on back/forward to
1454         become slightly more complicated (and added an extra level of recursion
1455         to layout).  This extra level of recursion triggered the "I've recursed
1456         too many times" condition in the post-layout task queue, causing the
1457         FrameView to run the remainder of the tasks asynchronously.
1458         Unfortunately, that broke PluginDocument because it needs its the
1459         HTMLEmbedElement's updateWidget task to run synchronously.
1460
1461         This patch adds a mechanism for "kicking off" the pending post-layout
1462         tasks synchronously (instead of waiting for the timer to fire).
1463         PluginDocument then uses that facility to ensure that the
1464         HTMLEmbedElement's updateWidget task happens.
1465
1466         Test: plugins/plugin-document-back-forward.html
1467
1468         * html/PluginDocument.cpp:
1469         (WebCore::PluginDocumentParser::appendBytes):
1470         * page/FrameView.cpp:
1471         (WebCore::FrameView::flushAnyPendingPostLayoutTasks):
1472         * page/FrameView.h:
1473
1474 2011-02-04  Charlie Reis  <creis@chromium.org>
1475
1476         Reviewed by Mihai Parparita.
1477
1478         Crash in WebCore::HistoryController::itemsAreClones
1479         https://bugs.webkit.org/show_bug.cgi?id=52819
1480
1481         Avoids deleting the current HistoryItem while it is still in use.
1482         Ensures that provisional items are committed for same document navigations.
1483         Ensures that error pages are committed on back/forward navigations.
1484         Also removes unneeded sanity checks used for diagnosing the problem.
1485
1486         * loader/HistoryController.cpp:
1487         * loader/HistoryController.h:
1488
1489 2011-02-04  Carol Szabo  <carol.szabo@nokia.com>
1490
1491         Reviewed by David Hyatt.
1492
1493         Code Changes.
1494
1495         CSS 2.1 failure: content-*
1496         https://bugs.webkit.org/show_bug.cgi?id=52126
1497
1498         Test: fast/css/counters/content-021.html
1499
1500         * rendering/CounterNode.cpp:
1501         (showCounterTree):
1502         Made parameter const because it is supposed to be so.
1503         * rendering/RenderCounter.cpp:
1504         (WebCore::previousInPreOrder):
1505         (WebCore::previousSiblingOrParent):
1506         (WebCore::parentElement):
1507         (WebCore::areRenderersElementsSiblings):
1508         (WebCore::nextInPreOrder):
1509         Added these local helper functions to help navigate the DOM tree
1510         enriched with :before and :after pseudo elements.
1511         (WebCore::planCounter):
1512         Fixed bug that would create a repeat counter for second and
1513         subsequent renderers associated with the same DOM element.
1514         (WebCore::findPlaceForCounter):
1515         (WebCore::makeCounterNode):
1516         Changed to use the new tree navigation functions described above
1517         instead of the Renderer Tree navigation functions.
1518         (WebCore::RenderCounter::rendererSubtreeAttached):
1519         (WebCore::RenderCounter::rendererStyleChanged):
1520         Optimized to not bother about counters until the renderers are
1521         finally attached.
1522         (showRendererTree):
1523         (showNodeTree):
1524         Debug helper functions used to debug Counter bugs.
1525
1526 2011-02-04  Dan Bernstein  <mitz@apple.com>
1527
1528         Typo fix.
1529
1530         * html/parser/XSSFilter.cpp:
1531         (WebCore::HTMLNames::containsJavaScriptURL):
1532
1533 2011-02-04  Dan Bernstein  <mitz@apple.com>
1534
1535         Reviewed by Anders Carlsson.
1536
1537         Make an infinite loop introduced in r77454 finite.
1538
1539         * html/parser/XSSFilter.cpp:
1540         (WebCore::HTMLNames::containsJavaScriptURL):
1541
1542 2011-02-04  Jer Noble  <jer.noble@apple.com>
1543
1544         Reviewed by Eric Carlson.
1545
1546         Frame accurate seeking isn't always accurate
1547         https://bugs.webkit.org/show_bug.cgi?id=52697
1548
1549         Test: media/video-frame-accurate-seek.html
1550
1551         Make seeking slightly more accurate by rounding instead of truncating
1552         when converting from seconds-in-float to time/timeScale.
1553
1554         * platform/graphics/mac/MediaPlayerPrivateQTKit.mm:
1555         (WebCore::MediaPlayerPrivateQTKit::createQTTime):
1556         * platform/graphics/win/MediaPlayerPrivateQuickTimeVisualContext.cpp:
1557         (WebCore::MediaPlayerPrivateQuickTimeVisualContext::mediaTimeForTimeValue):
1558         * platform/graphics/win/QTMovie.cpp:
1559         (QTMovie::setCurrentTime):
1560
1561 2011-02-04  Jeremy Orlow  <jorlow@chromium.org>
1562
1563         Reviewed by Nate Chapin.
1564
1565         Second IndexedDB events overhaul patch
1566         https://bugs.webkit.org/show_bug.cgi?id=53813
1567
1568         If an IDBRequest has a IDBTransaction, it should propogate
1569         events through it. In order to do this, IDBRequest needs to
1570         hold a transaction frontend object rather than a backend one.
1571
1572         Test: storage/indexeddb/request-event-propagation.html
1573
1574         * storage/IDBCursor.cpp:
1575         (WebCore::IDBCursor::IDBCursor):
1576         * storage/IDBCursor.h:
1577         (WebCore::IDBCursor::create):
1578         * storage/IDBDatabase.cpp:
1579         (WebCore::IDBDatabase::setSetVersionTransaction):
1580         (WebCore::IDBDatabase::createObjectStore):
1581         (WebCore::IDBDatabase::deleteObjectStore):
1582         * storage/IDBDatabase.h:
1583         * storage/IDBIndex.cpp:
1584         (WebCore::IDBIndex::IDBIndex):
1585         (WebCore::IDBIndex::openCursor):
1586         (WebCore::IDBIndex::openKeyCursor):
1587         (WebCore::IDBIndex::get):
1588         (WebCore::IDBIndex::getKey):
1589         * storage/IDBIndex.h:
1590         (WebCore::IDBIndex::create):
1591         * storage/IDBObjectStore.cpp:
1592         (WebCore::IDBObjectStore::IDBObjectStore):
1593         (WebCore::IDBObjectStore::get):
1594         (WebCore::IDBObjectStore::add):
1595         (WebCore::IDBObjectStore::put):
1596         (WebCore::IDBObjectStore::deleteFunction):
1597         (WebCore::IDBObjectStore::createIndex):
1598         (WebCore::IDBObjectStore::deleteIndex):
1599         (WebCore::IDBObjectStore::openCursor):
1600         * storage/IDBObjectStore.h:
1601         (WebCore::IDBObjectStore::create):
1602         * storage/IDBRequest.cpp:
1603         (WebCore::IDBRequest::create):
1604         (WebCore::IDBRequest::IDBRequest):
1605         (WebCore::IDBRequest::resetReadyState):
1606         (WebCore::IDBRequest::onSuccess):
1607         (WebCore::IDBRequest::dispatchEvent):
1608         * storage/IDBRequest.h:
1609         * storage/IDBTransaction.cpp:
1610         (WebCore::IDBTransaction::IDBTransaction):
1611         (WebCore::IDBTransaction::objectStore):
1612         (WebCore::IDBTransaction::contextDestroyed):
1613         (WebCore::IDBTransaction::enqueueEvent):
1614         * storage/IDBTransaction.h:
1615         * storage/IDBTransaction.idl:
1616
1617 2011-02-04  Jeremy Orlow  <jorlow@chromium.org>
1618
1619         Reviewed by Nate Chapin.
1620
1621         First step towards event propogation within IndexedDB
1622         https://bugs.webkit.org/show_bug.cgi?id=53795
1623
1624         This is the first step towards implementing
1625         http://www.w3.org/Bugs/Public/show_bug.cgi?id=11348
1626         within IndexedDB. I've created a method that knows how
1627         to capture and bubble (based on Node's dispatchGenericEvent).
1628         I've then changed IDBRequest to use it.
1629
1630         The only functional change is that preventDefault now must
1631         be called in error events to prevent the transaction from
1632         being aborted. The tests reflect this change and there's one
1633         specific test to look at this behavior.
1634
1635         Test: storage/indexeddb/error-causes-abort-by-default.html
1636
1637         * storage/IDBAbortEvent.cpp:
1638         (WebCore::IDBAbortEvent::create):
1639         (WebCore::IDBAbortEvent::IDBAbortEvent):
1640         * storage/IDBAbortEvent.h:
1641         * storage/IDBCompleteEvent.cpp:
1642         (WebCore::IDBCompleteEvent::create):
1643         (WebCore::IDBCompleteEvent::IDBCompleteEvent):
1644         * storage/IDBCompleteEvent.h:
1645         * storage/IDBErrorEvent.cpp:
1646         (WebCore::IDBErrorEvent::IDBErrorEvent):
1647         * storage/IDBEvent.cpp:
1648         (WebCore::IDBEvent::IDBEvent):
1649         (WebCore::IDBEvent::dispatch):
1650         * storage/IDBEvent.h:
1651         * storage/IDBRequest.cpp:
1652         (WebCore::IDBRequest::dispatchEvent):
1653         * storage/IDBRequest.h:
1654         * storage/IDBSuccessEvent.cpp:
1655         (WebCore::IDBSuccessEvent::IDBSuccessEvent):
1656         * storage/IDBTransaction.cpp:
1657         (WebCore::IDBTransaction::onAbort):
1658         (WebCore::IDBTransaction::onComplete):
1659         * storage/IDBTransaction.h:
1660         (WebCore::IDBTransaction::backend):
1661         * storage/IDBTransactionBackendImpl.cpp:
1662         (WebCore::IDBTransactionBackendImpl::taskTimerFired):
1663
1664 2011-02-04  Daniel Cheng  <dcheng@chromium.org>
1665
1666         Reviewed by Dmitry Titov.
1667
1668         Clone WebClipboard to be frame-specific.
1669         https://bugs.webkit.org/show_bug.cgi?id=53727
1670
1671         For drop operations, Chrome currently snapshots the data and copies it
1672         into the renderer process. As we add more supported drag data types, the
1673         copy will become increasingly expensive. Instead, we'd like to snapshot
1674         data in the browser to reduce the amount of data copied and to support
1675         Blob in DataTransferItem. In order to allow this, we associated
1676         WebClipboard with a frame so it can correctly route its IPCs to the
1677         corresponding Chromium host.
1678
1679         No new tests because no new functionality.
1680
1681         * platform/chromium/ChromiumDataObject.cpp:
1682         (WebCore::ChromiumDataObject::createReadable):
1683         * platform/chromium/ChromiumDataObject.h:
1684         * platform/chromium/ClipboardChromium.cpp:
1685         (WebCore::ClipboardChromium::create):
1686         * platform/chromium/PlatformBridge.h:
1687         * platform/chromium/ReadableDataObject.cpp:
1688         (WebCore::ReadableDataObject::create):
1689         (WebCore::ReadableDataObject::ReadableDataObject):
1690         (WebCore::ReadableDataObject::getData):
1691         (WebCore::ReadableDataObject::urlTitle):
1692         (WebCore::ReadableDataObject::htmlBaseUrl):
1693         (WebCore::ReadableDataObject::filenames):
1694         (WebCore::ReadableDataObject::ensureTypeCacheInitialized):
1695         * platform/chromium/ReadableDataObject.h:
1696
1697 2011-02-04  Jeremy Orlow  <jorlow@chromium.org>
1698
1699         Revert https://bugs.webkit.org/show_bug.cgi?id=53795
1700
1701         * storage/IDBAbortEvent.cpp:
1702         (WebCore::IDBAbortEvent::create):
1703         (WebCore::IDBAbortEvent::IDBAbortEvent):
1704         * storage/IDBAbortEvent.h:
1705         * storage/IDBCompleteEvent.cpp:
1706         (WebCore::IDBCompleteEvent::create):
1707         (WebCore::IDBCompleteEvent::IDBCompleteEvent):
1708         * storage/IDBCompleteEvent.h:
1709         * storage/IDBErrorEvent.cpp:
1710         (WebCore::IDBErrorEvent::IDBErrorEvent):
1711         * storage/IDBEvent.cpp:
1712         (WebCore::IDBEvent::IDBEvent):
1713         * storage/IDBEvent.h:
1714         * storage/IDBRequest.cpp:
1715         (WebCore::IDBRequest::dispatchEvent):
1716         * storage/IDBRequest.h:
1717         * storage/IDBSuccessEvent.cpp:
1718         (WebCore::IDBSuccessEvent::IDBSuccessEvent):
1719         * storage/IDBTransaction.cpp:
1720         (WebCore::IDBTransaction::onAbort):
1721         (WebCore::IDBTransaction::onComplete):
1722         * storage/IDBTransaction.h:
1723         * storage/IDBTransactionBackendImpl.cpp:
1724         (WebCore::IDBTransactionBackendImpl::taskTimerFired):
1725
1726 2011-02-04  Martin Galpin  <martin@66laps.com>
1727
1728         Reviewed by David Levin.
1729
1730         CORS origin header not set on GET when a preflight request is required.
1731         https://bugs.webkit.org/show_bug.cgi?id=50773
1732         
1733         Test: http/tests/xmlhttprequest/cross-origin-preflight-get.html
1734
1735         * loader/DocumentThreadableLoader.cpp:
1736         (WebCore::DocumentThreadableLoader::preflightSuccess): 
1737         Explicitly set the request origin after a preflight request succeeds.
1738
1739 2011-02-04  Jeremy Orlow  <jorlow@chromium.org>
1740
1741         Reviewed by Nate Chapin.
1742
1743         First step towards event propogation within IndexedDB
1744         https://bugs.webkit.org/show_bug.cgi?id=53795
1745
1746         This is the first step towards implementing
1747         http://www.w3.org/Bugs/Public/show_bug.cgi?id=11348
1748         within IndexedDB. I've created a method that knows how
1749         to capture and bubble (based on Node's dispatchGenericEvent).
1750         I've then changed IDBRequest to use it.
1751
1752         The only functional change is that preventDefault now must
1753         be called in error events to prevent the transaction from
1754         being aborted. The tests reflect this change and there's one
1755         specific test to look at this behavior.
1756
1757         Test: storage/indexeddb/error-causes-abort-by-default.html
1758
1759         * storage/IDBAbortEvent.cpp:
1760         (WebCore::IDBAbortEvent::create):
1761         (WebCore::IDBAbortEvent::IDBAbortEvent):
1762         * storage/IDBAbortEvent.h:
1763         * storage/IDBCompleteEvent.cpp:
1764         (WebCore::IDBCompleteEvent::create):
1765         (WebCore::IDBCompleteEvent::IDBCompleteEvent):
1766         * storage/IDBCompleteEvent.h:
1767         * storage/IDBErrorEvent.cpp:
1768         (WebCore::IDBErrorEvent::IDBErrorEvent):
1769         * storage/IDBEvent.cpp:
1770         (WebCore::IDBEvent::IDBEvent):
1771         (WebCore::IDBEvent::dispatch):
1772         * storage/IDBEvent.h:
1773         * storage/IDBRequest.cpp:
1774         (WebCore::IDBRequest::dispatchEvent):
1775         * storage/IDBRequest.h:
1776         * storage/IDBSuccessEvent.cpp:
1777         (WebCore::IDBSuccessEvent::IDBSuccessEvent):
1778         * storage/IDBTransaction.cpp:
1779         (WebCore::IDBTransaction::onAbort):
1780         (WebCore::IDBTransaction::onComplete):
1781         * storage/IDBTransaction.h:
1782         (WebCore::IDBTransaction::backend):
1783         * storage/IDBTransactionBackendImpl.cpp:
1784         (WebCore::IDBTransactionBackendImpl::taskTimerFired):
1785
1786 2011-02-04  Dimitri Glazkov  <dglazkov@chromium.org>
1787
1788         Reviewed by Csaba Osztrogonác.
1789
1790         [Qt]REGRESSION(r76951): media/controls-without-preload.html fails
1791         https://bugs.webkit.org/show_bug.cgi?id=53674
1792
1793         * css/mediaControlsQt.css:
1794
1795 2011-02-04  Dan Bernstein  <mitz@apple.com>
1796
1797         Reviewed by Darin Adler and Dave Hyatt.
1798
1799         <rdar://problem/8902704> Make ruby text size 50% by default
1800         https://bugs.webkit.org/show_bug.cgi?id=53723
1801
1802         * css/html.css:
1803         (ruby > rt): Changed the font-size from 60% to 50%.
1804
1805 2011-02-04  Antti Koivisto  <antti@apple.com>
1806
1807         Reviewed by Dimitri Glazkov.
1808
1809         https://bugs.webkit.org/show_bug.cgi?id=53610
1810         Regression: adjacent sibling selector not working as expected
1811         <rdar://problem/8960033>
1812         
1813         https://bugs.webkit.org/show_bug.cgi?id=53574
1814         REGRESSION (r76012): :last-child:after not working as expected
1815         <rdar://problem/8948643>
1816         
1817         Test for additional conditions in parent style that prevent sharing.
1818
1819         Tests: fast/selectors/style-sharing-adjacent-selector.html
1820                fast/selectors/style-sharing-last-child.html
1821
1822         * css/CSSStyleSelector.cpp:
1823         (WebCore::parentStylePreventsSharing):
1824         (WebCore::CSSStyleSelector::locateSharedStyle):
1825
1826 2011-02-04  Mark Mentovai  <mark@chromium.org>
1827
1828         Reviewed by Dimitri Glazkov.
1829
1830         Chromium GYP build fix.
1831
1832         When various settings were moved to webcore_prerequisites in r66364,
1833         things that should have been direct_dependent_settings were not marked
1834         as such. GYP 'defines', for example, make no sense on a 'none'-type
1835         target such as webcore_prerequisites. It appears that it was intended
1836         for these settings to be pushed to direct dependents, which would make
1837         direct_dependent_settings correct.
1838
1839         Losing the ChromiumWebCoreObjC defines on the Mac, for example, caused
1840         http://crbug.com/71537, which at best causes Mac console log spew, and
1841         at worst may result in Chromium's copy of WebCore using system
1842         definitions of certain Objective-C classes at runtime, or vice-versa.
1843
1844         The build now includes a postbuild step to prevent
1845         http://crbug.com/71537 from regressing again. The build will fail upon
1846         regression.
1847
1848         https://bugs.webkit.org/show_bug.cgi?id=53630
1849
1850         * WebCore.gyp/WebCore.gyp: Move things in webcore_prerequisites into
1851           direct_dependent_settings as needed, add the check_objc_rename
1852           postbuild step.
1853         * WebCore.gyp/mac/check_objc_rename.sh: Added.
1854
1855 2011-02-04  Robert Hogan  <robert@webkit.org>
1856
1857         Reviewed by Darin Fisher.
1858
1859         Move chromium iframe shim code to cross-platform file
1860         https://bugs.webkit.org/show_bug.cgi?id=52594
1861
1862         Move Chromium code for identifying and cutting out
1863         iframe shims from plugins to cross-platform utility file
1864         IFrameShimSupport.cpp.
1865         Amend PluginViewQt to use this code to handle shims correctly.
1866
1867         * WebCore.gypi: Add Chromium support for IFrameShimSupport.cpp
1868         * WebCore.pro: Add Qt support for IFrameShimSupport.cpp
1869         * plugins/IFrameShimSupport.cpp: Added.
1870         (WebCore::getObjectStack):
1871         (WebCore::iframeIsAbovePlugin):
1872         (WebCore::getPluginOcclusions):
1873         * plugins/IFframeShimSupport.h: Added.
1874         * plugins/qt/PluginViewQt.cpp:
1875         (WebCore::PluginView::setNPWindowIfNeeded):
1876
1877 2011-02-04  Xiaomei Ji  <xji@chromium.org>
1878
1879         Reviewed by David Levin.
1880
1881         Implement "<option> should implement the dir attribute" for chromium port after r76983.
1882         https://bugs.webkit.org/show_bug.cgi?id=50969
1883
1884         Use manual test Source/WebCore/manual-tests/pop-up-alignment-and-direction.html
1885         added in r76983.
1886
1887         * platform/chromium/PopupMenuChromium.cpp: Remove directionality hint from
1888         <select> drop-down setting.
1889         (WebCore::PopupListBox::paintRow): Use <option>'s directionality to paint
1890         items in drop-down and pass-in bidi override flag when creating text run.
1891         * platform/chromium/PopupMenuChromium.h: Remove directionalityHint from
1892         PopupContainerSettings.
1893
1894 2011-02-04  Jeremy Orlow  <jorlow@chromium.org>
1895
1896         Build fix from merge mistake.
1897
1898         * storage/IDBTransaction.cpp:
1899         (WebCore::IDBTransaction::ensureEventTargetData):
1900
1901 2011-02-04  Levi Weintraub  <leviw@chromium.org>
1902
1903         Reviewed by Darin Adler.
1904
1905         Remove unneeded function declarations in comments in EditorClient.h
1906         https://bugs.webkit.org/show_bug.cgi?id=53745
1907
1908         Removing unused commented out function declarations. No tests since this is just cleanup.
1909
1910         * page/EditorClient.h:
1911
1912 2011-02-03  Jeremy Orlow  <jorlow@chromium.org>
1913
1914         Reviewed by Nate Chapin.
1915
1916         Refactor IDBRequest and IDBTransaction a bit
1917         https://bugs.webkit.org/show_bug.cgi?id=53565
1918
1919         There were a lot of subtle issues with the way IDBTransaction
1920         and IDBRequest used to be written. This cleans a lot of them up
1921         and largely simplifies the logic. Using EventQueue rather than
1922         timers is one example of the simplification.
1923
1924         * bindings/scripts/CodeGeneratorV8.pm:
1925         * dom/EventQueue.cpp:
1926         (WebCore::EventQueue::enqueueEvent):
1927         (WebCore::EventQueue::dispatchEvent):
1928         * storage/IDBCursor.cpp:
1929         (WebCore::IDBCursor::continueFunction):
1930         * storage/IDBRequest.cpp:
1931         (WebCore::IDBRequest::create):
1932         (WebCore::IDBRequest::IDBRequest):
1933         (WebCore::IDBRequest::resetReadyState):
1934         (WebCore::IDBRequest::onError):
1935         (WebCore::IDBRequest::onSuccess):
1936         (WebCore::IDBRequest::dispatchEvent):
1937         (WebCore::IDBRequest::enqueueEvent):
1938         (WebCore::IDBRequest::eventTargetData):
1939         (WebCore::IDBRequest::ensureEventTargetData):
1940         * storage/IDBRequest.h:
1941         (WebCore::IDBRequest::dispatchEvent):
1942         * storage/IDBTransaction.cpp:
1943         (WebCore::IDBTransaction::create):
1944         (WebCore::IDBTransaction::IDBTransaction):
1945         (WebCore::IDBTransaction::objectStore):
1946         (WebCore::IDBTransaction::abort):
1947         (WebCore::IDBTransaction::onAbort):
1948         (WebCore::IDBTransaction::onComplete):
1949         (WebCore::IDBTransaction::onTimeout):
1950         (WebCore::IDBTransaction::canSuspend):
1951         (WebCore::IDBTransaction::stop):
1952         (WebCore::IDBTransaction::enqueueEvent):
1953         (WebCore::IDBTransaction::eventTargetData):
1954         (WebCore::IDBTransaction::ensureEventTargetData):
1955         * storage/IDBTransaction.h:
1956
1957 2011-02-01  Jeremy Orlow  <jorlow@chromium.org>
1958
1959         Reviewed by Nate Chapin.
1960
1961         Remove the timeout event from IndexedDB
1962         https://bugs.webkit.org/show_bug.cgi?id=53521
1963
1964         Remove timeout and ontimeout from IDBTransaction per the spec.
1965
1966         * WebCore.gypi:
1967         * storage/IDBDatabase.cpp:
1968         (WebCore::IDBDatabase::transaction):
1969         * storage/IDBDatabase.h:
1970         (WebCore::IDBDatabase::transaction):
1971         * storage/IDBDatabase.idl:
1972         * storage/IDBDatabaseBackendImpl.cpp:
1973         (WebCore::IDBDatabaseBackendImpl::setVersion):
1974         (WebCore::IDBDatabaseBackendImpl::transaction):
1975         * storage/IDBDatabaseBackendImpl.h:
1976         * storage/IDBDatabaseBackendInterface.h:
1977         * storage/IDBTimeoutEvent.cpp: Removed.
1978         * storage/IDBTimeoutEvent.h: Removed.
1979         * storage/IDBTransaction.cpp:
1980         (WebCore::IDBTransaction::IDBTransaction):
1981         (WebCore::IDBTransaction::onAbort):
1982         (WebCore::IDBTransaction::onComplete):
1983         * storage/IDBTransaction.h:
1984         * storage/IDBTransaction.idl:
1985         * storage/IDBTransactionBackendImpl.cpp:
1986         (WebCore::IDBTransactionBackendImpl::create):
1987         (WebCore::IDBTransactionBackendImpl::IDBTransactionBackendImpl):
1988         * storage/IDBTransactionBackendImpl.h:
1989         * storage/IDBTransactionCallbacks.h:
1990
1991 2011-02-04  Chris Fleizach  <cfleizach@apple.com>
1992
1993         Reviewed by Darin Adler.
1994
1995         AX: Can't set accessibility overridden attributes on web objects
1996         https://bugs.webkit.org/show_bug.cgi?id=53725
1997
1998         accessibilitySetOverriddenValue does not work on AX objects from WebCore because 
1999         the right method needed to be overridden (accessibilitySupportsOverriddenAttributes).
2000         Unfortunately, there's no way to test this from DRT, since AppKit returns the overridden
2001         attribute only when an AX client asks for it through the AX frameworks.
2002
2003         * accessibility/mac/AccessibilityObjectWrapper.mm:
2004         (-[AccessibilityObjectWrapper accessibilitySupportsOverriddenAttributes]):
2005
2006 2011-02-03  Dimitri Glazkov  <dglazkov@chromium.org>
2007
2008         Reviewed by Kent Tamura.
2009
2010         REGRESSION(r76147): Slider thumb is not repainted when let go outside of the slider track.
2011         https://bugs.webkit.org/show_bug.cgi?id=53691
2012
2013         Test: fast/repaint/slider-thumb-drag-release.html
2014
2015         * html/shadow/SliderThumbElement.cpp:
2016         (WebCore::SliderThumbElement::stopDragging): Added dirtying the layout bit to ensure
2017             that the thumb is repainted.
2018
2019 2011-02-04  Mikhail Naganov  <mnaganov@chromium.org>
2020
2021         Reviewed by Pavel Feldman.
2022
2023         Web Inspector: Add "show more" data grid node and waiting message UI components.
2024         https://bugs.webkit.org/show_bug.cgi?id=53763
2025
2026         - "show more" data grid node is used for on-demand population of
2027         data grid contents (similar to DOM tree capability for limiting
2028         displayed nodes count);
2029
2030         - waiting message is used for informing user about long lasting
2031         operations (with a possibility to cancel them).
2032
2033         * English.lproj/localizedStrings.js:
2034         * WebCore.gypi:
2035         * WebCore.vcproj/WebCore.vcproj:
2036         * inspector/front-end/PleaseWaitMessage.js: Added.
2037         (WebInspector.PleaseWaitMessage):
2038         * inspector/front-end/ShowMoreDataGridNode.js: Added.
2039         (WebInspector.ShowMoreDataGridNode):
2040         * inspector/front-end/WebKit.qrc:
2041         * inspector/front-end/inspector.css:
2042         (.data-grid button):
2043         (.please-wait-msg):
2044         * inspector/front-end/inspector.html:
2045
2046 2011-02-04  Adele Peterson  <adele@apple.com>
2047
2048         Reviewed by Dan Bernstein.
2049
2050         Fix for https://bugs.webkit.org/show_bug.cgi?id=53740
2051         <rdar://problem/8503629> Allow platforms to specify if the placeholder should be visible when text controls are focused
2052
2053         Tests:
2054         fast/forms/textarea-placeholder-visibility-1.html
2055         fast/forms/textarea-placeholder-visibility-2.html
2056         fast/forms/input-placeholder-visibility-1.html
2057         fast/forms/input-placeholder-visibility-2.html
2058         fast/forms/input-placeholder-visibility-3.html
2059
2060         * html/HTMLFormControlElement.cpp: (WebCore::HTMLTextFormControlElement::placeholderShouldBeVisible):
2061         Add a check for shouldShowPlaceholderWhenFocused.
2062         * html/HTMLTextAreaElement.cpp: (WebCore::HTMLTextAreaElement::updateValue):
2063         Whenever the value is updated, we should also update placeholder visibility.
2064         * rendering/RenderTheme.h: (WebCore::RenderTheme::shouldShowPlaceholderWhenFocused):
2065         Make the default the same as the existing behavior.
2066         * rendering/RenderThemeMac.h:
2067         * rendering/RenderThemeMac.mm: (WebCore::RenderThemeMac::shouldShowPlaceholderWhenFocused):
2068         Show placeholder when appropriate. 
2069
2070 2011-02-04  Pavel Podivilov  <podivilov@chromium.org>
2071
2072         Reviewed by Pavel Feldman.
2073
2074         Web Inspector: evaluate on hover does not work on a breakpoint.
2075         https://bugs.webkit.org/show_bug.cgi?id=53768
2076
2077         * inspector/front-end/SourceFrame.js:
2078         (WebInspector.SourceFrame.prototype._mouseHover):
2079
2080 2011-02-04  Sheriff Bot  <webkit.review.bot@gmail.com>
2081
2082         Unreviewed, rolling out r77625 and r77626.
2083         http://trac.webkit.org/changeset/77625
2084         http://trac.webkit.org/changeset/77626
2085         https://bugs.webkit.org/show_bug.cgi?id=53765
2086
2087         It broke Windows builds (Requested by Ossy_ on #webkit).
2088
2089         * Android.jscbindings.mk:
2090         * CMakeLists.txt:
2091         * ForwardingHeaders/pcre/pcre.h: Added.
2092         * ForwardingHeaders/yarr/Yarr.h: Removed.
2093         * ForwardingHeaders/yarr/YarrInterpreter.h: Removed.
2094         * ForwardingHeaders/yarr/YarrPattern.h: Removed.
2095         * WebCore.gyp/WebCore.gyp:
2096         * WebCore.pro:
2097         * WebCore.vcproj/WebCore.vcproj:
2098         * WebCore.vcproj/copyForwardingHeaders.cmd:
2099         * platform/text/RegularExpression.cpp:
2100         (WebCore::RegularExpression::Private::regexp):
2101         (WebCore::RegularExpression::Private::compile):
2102         (WebCore::RegularExpression::Private::Private):
2103         (WebCore::RegularExpression::Private::create):
2104         (WebCore::RegularExpression::Private::~Private):
2105         (WebCore::RegularExpression::match):
2106
2107 2011-02-04  Peter Varga  <pvarga@webkit.org>
2108
2109         Rubber-stamped by Csaba Osztrogonác.
2110
2111         Replace PCRE with Yarr in WebCore
2112         https://bugs.webkit.org/show_bug.cgi?id=53496
2113
2114         Speculative windows build fix.
2115
2116         No new tests needed.
2117
2118         * platform/text/RegularExpression.cpp:
2119
2120 2011-02-04  Peter Varga  <pvarga@webkit.org>
2121
2122
2123         Reviewed by Gavin Barraclough.
2124
2125         Replace PCRE with Yarr in WebCore
2126         https://bugs.webkit.org/show_bug.cgi?id=53496
2127
2128         No new tests needed.
2129
2130         * Android.jscbindings.mk:
2131         * CMakeLists.txt:
2132         * ForwardingHeaders/pcre/pcre.h: Removed.
2133         * ForwardingHeaders/yarr/Yarr.h: Added.
2134         * ForwardingHeaders/yarr/YarrInterpreter.h: Added.
2135         * ForwardingHeaders/yarr/YarrPattern.h: Added.
2136         * WebCore.gyp/WebCore.gyp:
2137         * WebCore.pro:
2138         * WebCore.vcproj/WebCore.vcproj:
2139         * WebCore.vcproj/copyForwardingHeaders.cmd:
2140         * platform/text/RegularExpression.cpp:
2141         (WebCore::RegularExpression::Private::create):
2142         (WebCore::RegularExpression::Private::Private):
2143         (WebCore::RegularExpression::Private::compile):
2144         (WebCore::RegularExpression::match):
2145
2146 2011-02-04  Pavel Feldman  <pfeldman@chromium.org>
2147
2148         Reviewed by Yury Semikhatsky.
2149
2150         Web Inspector: Network panel filtering is broken.
2151         https://bugs.webkit.org/show_bug.cgi?id=53764
2152
2153         * inspector/front-end/NetworkPanel.js:
2154         (WebInspector.NetworkPanel.prototype._sortItems):
2155         (WebInspector.NetworkPanel.prototype._sortByTimeline):
2156         (WebInspector.NetworkPanel.prototype._filter):
2157         (WebInspector.NetworkPanel.prototype._updateOffscreenRows):
2158         (WebInspector.NetworkDataGridNode.prototype.isFilteredOut):
2159         (WebInspector.NetworkDataGridNode.prototype.get selectable):
2160         (WebInspector.NetworkTotalGridNode.prototype.isFilteredOut):
2161         (WebInspector.NetworkTotalGridNode.prototype.get selectable):
2162
2163 2011-02-04  Andrey Kosyakov  <caseq@chromium.org>
2164
2165         Reviewed by Pavel Feldman.
2166
2167         Web Inspector: support overriding user agent strings
2168         https://bugs.webkit.org/show_bug.cgi?id=51485
2169
2170         Test: http/tests/inspector/extensions-useragent.html
2171
2172         * inspector/Inspector.idl:
2173         * inspector/InspectorController.cpp:
2174         (WebCore::InspectorController::disconnectFrontend):
2175         (WebCore::InspectorController::setUserAgentOverride):
2176         (WebCore::InspectorController::userAgentOverride):
2177         * inspector/InspectorController.h:
2178         * inspector/front-end/ExtensionAPI.js:
2179         (WebInspector.injectedExtensionAPI.InspectedWindow.prototype.reload):
2180         * inspector/front-end/ExtensionServer.js:
2181         (WebInspector.ExtensionServer.prototype._onReload):
2182         * loader/FrameLoader.cpp:
2183         (WebCore::FrameLoader::userAgent):
2184         (WebCore::FrameLoader::applyUserAgent):
2185
2186 2011-02-04  Pavel Podivilov  <podivilov@chromium.org>
2187
2188         Reviewed by Pavel Feldman.
2189
2190         Web Inspector: scripts panel displays wrong file name after reload.
2191         https://bugs.webkit.org/show_bug.cgi?id=53761
2192
2193         * inspector/front-end/ScriptsPanel.js:
2194         (WebInspector.ScriptsPanel.prototype._resourceLoadingFinished):
2195
2196 2011-02-03  Yury Semikhatsky  <yurys@chromium.org>
2197
2198         Reviewed by Pavel Feldman.
2199
2200         Web Inspector: remove settings related methods from InspectorClient
2201         https://bugs.webkit.org/show_bug.cgi?id=53686
2202
2203         * WebCore.exp.in:
2204         * inspector/CodeGeneratorInspector.pm:
2205         * inspector/InspectorClient.h:
2206         * inspector/InspectorFrontendClientLocal.cpp:
2207         (WebCore::InspectorFrontendClientLocal::InspectorFrontendClientLocal):
2208         (WebCore::InspectorFrontendClientLocal::changeAttachedWindowHeight):
2209         (WebCore::InspectorFrontendClientLocal::restoreAttachedWindowHeight):
2210         * inspector/InspectorFrontendClientLocal.h: ports that provide in-process implementation of the inspector front-end can
2211         provide platform-specific settings accessor.
2212         (WebCore::InspectorFrontendClientLocal::Settings::Settings):
2213         (WebCore::InspectorFrontendClientLocal::Settings::~Settings):
2214         (WebCore::InspectorFrontendClientLocal::Settings::inspectorAttachedHeight):
2215         (WebCore::InspectorFrontendClientLocal::Settings::storeInspectorAttachedHeight):
2216         * loader/EmptyClients.h:
2217
2218 2011-02-03  Anton Muhin  <antonm@chromium.org>
2219
2220         Reviewed by Adam Barth.
2221
2222         [v8] frame several more JS code invocations into v8::TryCatch
2223         https://bugs.webkit.org/show_bug.cgi?id=53594
2224
2225         This patch is preemptive and adjusts v8 bindings code to forthcoming small change
2226         in v8::ThrowException---currently sometimes exceptions thrown by this method
2227         do not reach surrounding v8::TryCatch handler (see
2228         http://code.google.com/p/v8/issues/detail?id=1072 and
2229         http://codereview.chromium.org/6397011/).  Therefore the goal of this patch
2230         is to make forthcoming v8 roll as smooth as possible (alas, we'll still need
2231         one rebaseline as of now.)
2232
2233         * bindings/v8/V8Proxy.cpp:
2234         (WebCore::V8Proxy::runScript): Do not rely on empty handle as a signal of exception, wrap into v8::TryCatch instead
2235         * bindings/v8/V8WindowErrorHandler.cpp:
2236         (WebCore::V8WindowErrorHandler::callListenerFunction): Ditto
2237
2238 2011-02-03  Maciej Stachowiak  <mjs@apple.com>
2239
2240         Reviewed by Dan Bernstein.
2241
2242         WebKit2: Need WebKit2 equivalent of WebResourceLoadDelegate::willSendRequest in the Bundle
2243         https://bugs.webkit.org/show_bug.cgi?id=52897
2244         <rdar://problem/8898294>
2245
2246         * WebCore.exp.in: Add export now needed by WebKit2
2247
2248 2011-02-03  Victoria Kirst  <vrk@google.com>
2249
2250         Reviewed by James Robinson.
2251
2252         Replaces float literals with uniform values in shader code
2253         so that buggy drivers unable to parse float values in different
2254         locales will not produce a pink video.
2255
2256         [chromium] Fix pink video bug with gpu-acceleration enabled
2257         https://bugs.webkit.org/show_bug.cgi?id=53568
2258
2259         * platform/graphics/chromium/VideoLayerChromium.cpp:
2260         (WebCore::VideoLayerChromium::SharedValues::SharedValues):
2261         (WebCore::VideoLayerChromium::drawYUV):
2262         * platform/graphics/chromium/VideoLayerChromium.h:
2263         (WebCore::VideoLayerChromium::SharedValues::signAdjLocation):
2264
2265 2011-02-03  James Kozianski  <koz@chromium.org>
2266
2267         Reviewed by Dimitri Glazkov.
2268
2269         Add navigator.registerProtocolHandler behind a flag.
2270         https://bugs.webkit.org/show_bug.cgi?id=52609
2271
2272         This method is described in the HTML5 specification here,
2273         http://dev.w3.org/html5/spec/Overview.html#dom-navigator-registerprotocolhandler
2274
2275         This change is largely cribbed from B. Green's 29651 patches. It is
2276         behind a flag so as not to break JS feature detection.
2277
2278         New layout test fast/dom/registerProtocolHandler.html.
2279
2280         * Configurations/FeatureDefines.xcconfig:
2281         * loader/EmptyClients.h:
2282         (WebCore::EmptyChromeClient::registerProtocolHandler):
2283         * page/Chrome.cpp:
2284         (WebCore::Chrome::registerProtocolHandler):
2285         * page/Chrome.h:
2286         * page/ChromeClient.h:
2287         * page/Navigator.cpp:
2288         (WebCore::verifyCustomHandlerURL):
2289         (WebCore::verifyProtocolHandlerScheme):
2290         (WebCore::Navigator::registerProtocolHandler):
2291         * page/Navigator.h:
2292         * page/Navigator.idl:
2293
2294 2011-02-03  Brian Ryner  <bryner@chromium.org>
2295
2296         Reviewed by Darin Fisher.
2297
2298         Add a field to the ResourceResponse for tracking the socket address
2299         of the host that the resource was fetched from.  Patch was originally
2300         by Paul Marks.
2301         https://bugs.webkit.org/show_bug.cgi?id=53699
2302
2303         * platform/network/chromium/ResourceResponse.cpp:
2304         (WebCore::ResourceResponse::doPlatformCopyData):
2305         (WebCore::ResourceResponse::doPlatformAdopt):
2306         * platform/network/chromium/ResourceResponse.h:
2307         (WebCore::ResourceResponse::socketAddress):
2308         (WebCore::ResourceResponse::setSocketAddress):
2309
2310 2011-02-03  Adam Langley  <agl@chromium.org>
2311
2312         Reviewed by Adam Barth.
2313
2314         Plumb mixed script URL to FrameLoaderClient
2315         https://bugs.webkit.org/show_bug.cgi?id=52384
2316
2317         Regressions covered by http/tests/security/mixedContent/*
2318
2319         * loader/EmptyClients.h:
2320         (WebCore::EmptyFrameLoaderClient::didRunInsecureContent):
2321         * loader/FrameLoader.cpp:
2322         (WebCore::FrameLoader::checkIfRunInsecureContent):
2323         * loader/FrameLoaderClient.h:
2324
2325 2011-02-03  Simon Fraser  <simon.fraser@apple.com>
2326
2327         Reviewed by Dan Bernstein.
2328
2329         REGRESSION: Artifacts on box-shadow corners in some cases
2330         https://bugs.webkit.org/show_bug.cgi?id=53731
2331
2332         Fix overdrawing artifacts in ShadowBlur's tiling code path,
2333         which show up in shadows using a color with alpha.
2334         
2335         Test: fast/box-shadow/shadow-tiling-artifact.html
2336
2337         * platform/graphics/ShadowBlur.cpp:
2338         (WebCore::ShadowBlur::drawRectShadowWithTiling): Ensure
2339         that the inner rect that gets filled does not overlap with any
2340         of the eight tiled areas by having the corner and side dimensions
2341         be the same for contiguous areas.
2342
2343 2011-02-03  Adam Barth  <abarth@webkit.org>
2344
2345         Reviewed by Alexey Proskuryakov.
2346
2347         XSS Auditor is spinning inside decodeURLEscapeSequences() if there are
2348         percent signs in large posted data
2349         https://bugs.webkit.org/show_bug.cgi?id=53405
2350
2351         If the input string contains many non-% characters followed by a %
2352         character that is not a valid URL escape sequence, then the old
2353         algorithm would only advance the initial search by one character
2354         (instead of jumping to just after the % character).  That would cause
2355         the algorithm to take N^2 time (in the number of characters before the
2356         first % character).  This patch just advances the search past the first
2357         % character so we can start looking for next % character sooner.
2358
2359         * platform/KURL.cpp:
2360         (WebCore::decodeURLEscapeSequences):
2361
2362 2011-02-03  Pavel Podivilov  <podivilov@chromium.org>
2363
2364         Reviewed by Pavel Feldman.
2365
2366         Web Inspector: click on a breakpoint highlights wrong line in source frame.
2367         https://bugs.webkit.org/show_bug.cgi?id=53692
2368
2369         * inspector/front-end/BreakpointsSidebarPane.js:
2370         (WebInspector.JavaScriptBreakpointsSidebarPane.prototype._setupBreakpointElement):
2371
2372 2011-02-03  Anton Muhin  <antonm@chromium.org>
2373
2374         Reviewed by Adam Barth.
2375
2376         [v8] Bail out if to string conversion returned empty handle
2377         https://bugs.webkit.org/show_bug.cgi?id=53687
2378
2379         This a temporary measure: actually one probably should never get empty handle
2380         if there was no exception.  The root cause is under investigation.
2381         The bailout though allows Chromium not to crash---attempt to convert an empty
2382         v8 hande into WebCore string crashes with invalid memory access.
2383
2384         See http://code.google.com/p/chromium/issues/detail?id=71544
2385
2386         There is no known reduction expressible as a layout test so far.  The crash found with automated testing tools.
2387
2388         * bindings/v8/V8Binding.cpp:
2389         (WebCore::v8NonStringValueToWebCoreString): Bail out on empty handle
2390         * bindings/v8/V8Binding.h:
2391         (WebCore::V8ParameterBase::prepareBase): Ditto
2392
2393 2011-02-03  Adam Barth  <abarth@webkit.org>
2394
2395         Attempt to fix Chromium build.
2396
2397         * html/parser/XSSFilter.cpp:
2398
2399 2011-02-03  Dirk Pranke  <dpranke@chromium.org>
2400
2401         Unreviewed, rolling out r77562.
2402         http://trac.webkit.org/changeset/77562
2403         https://bugs.webkit.org/show_bug.cgi?id=53630
2404
2405         broke chromium mac build
2406
2407         * WebCore.gyp/WebCore.gyp:
2408         * WebCore.gyp/mac/check_objc_rename.sh: Removed.
2409
2410 2011-02-03  Adam Barth  <abarth@webkit.org>
2411
2412         Reviewed by Daniel Bates.
2413
2414         XSS Auditor severely affects loading performance after submitting a large form
2415         https://bugs.webkit.org/show_bug.cgi?id=49845
2416
2417         Switch over from the XSSAuditor to the XSSFilter, improving performance
2418         on this example.
2419
2420         * html/parser/XSSFilter.cpp:
2421         (WebCore::XSSFilter::filterToken):
2422         * page/XSSAuditor.cpp:
2423         (WebCore::XSSAuditor::isEnabled):
2424
2425 2011-02-03  Dirk Pranke  <dpranke@chromium.org>
2426
2427         Unreviewed, rolling out r77567.
2428         http://trac.webkit.org/changeset/77567
2429         https://bugs.webkit.org/show_bug.cgi?id=53468
2430
2431         broke chromium linux svg, canvas tests, possibly win also?
2432
2433         * platform/graphics/skia/ImageBufferSkia.cpp:
2434         (WebCore::getImageData):
2435         (WebCore::ImageBuffer::getUnmultipliedImageData):
2436         (WebCore::ImageBuffer::getPremultipliedImageData):
2437         (WebCore::putImageData):
2438         (WebCore::ImageBuffer::putUnmultipliedImageData):
2439         (WebCore::ImageBuffer::putPremultipliedImageData):
2440
2441 2011-02-02  MORITA Hajime  <morrita@google.com>
2442
2443         Reviewed by Dimitri Glazkov.
2444
2445         Refactoring: <progress> should not use ShadowElement
2446         https://bugs.webkit.org/show_bug.cgi?id=53583
2447
2448         - Introduced RenderIndicatorPart and RenderProgressBarValuePart
2449           to be responsible for bar-part layout,
2450           which adopted layout logic from ShadowBlockElement.
2451         - ProgressBarValueElement is no longer a subclass of ShadowBlockElement.
2452         - Remove dependency from RenderProgress to HTMLProgressElement and
2453           ShadowBlockElement.
2454         - The shadow tree is no longer removed on detach(). It becomes persistent.
2455           This is now possible because the ShadowBlockElement dependency is gone.
2456         - ::-webkit-appearance for -webkit-progress-bar-value is no longer referred.
2457           That didn't make sense.
2458
2459         * html/HTMLProgressElement.cpp:
2460         (WebCore::HTMLProgressElement::createShadowSubtreeIfNeeded):
2461         * html/HTMLProgressElement.h:
2462         * html/shadow/ProgressBarValueElement.h: Added.
2463         (WebCore::ProgressBarValueElement::ProgressBarValueElement):
2464         (WebCore::ProgressBarValueElement::shadowPseudoId):
2465         (WebCore::ProgressBarValueElement::createRenderer):
2466         (WebCore::ProgressBarValueElement::create):
2467         * rendering/RenderIndicator.cpp:
2468         (WebCore::RenderIndicatorPart::RenderIndicatorPart):
2469         (WebCore::RenderIndicatorPart::~RenderIndicatorPart):
2470         (WebCore::RenderIndicatorPart::layout):
2471         (WebCore::RenderIndicatorPart::styleDidChange):
2472         * rendering/RenderIndicator.h: Added RenderIndicatorPart class
2473         (WebCore::RenderIndicatorPart::originalVisibility):
2474         (WebCore::RenderIndicatorPart::requiresForcedStyleRecalcPropagation):
2475         (WebCore::RenderIndicatorPart::canHaveChildren):
2476         * rendering/RenderProgress.cpp:
2477         (WebCore::RenderProgressBarValuePart::preferredFrameRect):
2478         (WebCore::RenderProgressBarValuePart::shouldBeHidden):
2479         (WebCore::RenderProgress::updateFromElement):
2480         (WebCore::RenderProgress::layoutParts):
2481         (WebCore::RenderProgress::shouldHaveParts):
2482         * rendering/RenderProgress.h:
2483         (WebCore::RenderProgressBarValuePart::RenderProgressBarValuePart):
2484
2485 2011-02-03  Jia Pu  <jpu@apple.com>
2486
2487         Reversion should not be marked as misspelled.
2488         https://bugs.webkit.org/show_bug.cgi?id=53255
2489
2490         This patch includes fix for reported bug, and also some housekeeping changes.
2491
2492         To implement desired behavior, we need:
2493         1. Add a new marker type, SpellCheckingExemption, since now we distingusish between text
2494            that shouldn't be spellchecked and text shouldn't be autocorrected.
2495         2. Make sure that there is no pending correction panel when we enter markAllMisspellingsAndBadGrammarInRanges().
2496            Otherwise the spell checking code in that function may interfere with autocorrection. This
2497            is achieved by explicitly applying pending correction when user types space, line break or
2498            paragraph break.
2499
2500         Housekeeping code changes include:
2501         1. Change manual-tests that were broken by relocated WebCore directory.
2502         2. Use TextIterator in various DocumentMarkerController functions instead of using
2503            Node::traverseNextNode() directly.
2504         3. Allow passing multiple marker types into DocumentMarkerController::removeMarkers() and
2505            DocumentMarkerController::hasMarkers() to improve clarity and efficiency.
2506         4. Fixes of minor bugs that were exposed previously.
2507
2508         * WebCore.exp.in: Change signature of DocumentMarkerController::removeMarkers().
2509
2510         * dom/DocumentMarker.h: Added new marker type SpellCheckingExemption.
2511
2512         * dom/DocumentMarkerController.cpp:
2513         (WebCore::DocumentMarkerController::removeMarkers): Use TextIterator to scan the range to be
2514            consistent with addMarker() function. Allow passing in multiple marker types in one call.
2515            Added a boolean argument to specify the behavior when removing markers that partially
2516            overlap the specified range.
2517         (WebCore::DocumentMarkerController::removeMarkersFromMarkerMapVectorPair): Allow passing in
2518            multiple marker types in one call.
2519         (WebCore::DocumentMarkerController::hasMarkers): Use TextIterator to scan the range to be
2520            consistent with addMarker() function. Allow passing in multiple marker types in one call.
2521
2522         * dom/DocumentMarkerController.h: Allow passing in multiple marker types to removeMarkers()
2523            and hasMarkers(). Added a boolean argument to removeMarkers() to specify the behavior when
2524            removing markers that partially overlap the specified range.
2525
2526         * editing/Editor.cpp:
2527         (WebCore::markerTypesForAutocorrection): Add SpellCheckingExemption marker when apply correction.
2528         (WebCore::markerTypesForReplacement): Ditto.
2529         (WebCore::Editor::respondToChangedSelection): Reordered call to dismissCorrectionPanel() and
2530            setSelection() to make sure there is no pending correction when entering
2531            markAllMisspellingsAndBadGrammarInRanges().
2532         (WebCore::Editor::appliedEditing): Only remove CorrectionIndicator markers when the command
2533            is a top level command to improve efficiency.
2534         (WebCore::Editor::insertTextWithoutSendingTextEvent): Added code to applying pending correction.
2535         (WebCore::Editor::insertLineBreak): Ditto.
2536         (WebCore::Editor::insertParagraphSeparator): Ditto.
2537         (WebCore::Editor::markAllMisspellingsAndBadGrammarInRanges): Don't mark mispelling if the
2538            text carries SpellCheckingExemption marker.
2539         (WebCore::Editor::correctionPanelTimerFired): Reset correction panel if the returned suggestion
2540            from spellchecker is an empty string.
2541         (WebCore::Editor::removeSpellAndCorrectionMarkersFromWordsToBeEdited):
2542            Use new DocumentMarkerController::removeMarkers() to replace custom implemenation to improve
2543            efficiency and readability.
2544         (WebCore::Editor::applyCorrectionPanelInfo): Remove the code that set caret position after
2545            applying correction, since it's unnecessary. Also, store pre-correction string together with
2546            the marker for reversion panel to use.
2547         (WebCore::Editor::applyAutocorrectionBeforeTypingIfAppropriate): Apply pending correction.
2548         (WebCore::Editor::changeSelectionAfterCommand): Moved marker removal code to Editor::appliedEditing()
2549            where we have access to EditCommand object.
2550
2551         * editing/Editor.h: Added new function applyAutocorrectionAfterTypingIfAppropriate().
2552
2553         * manual-tests/autocorrection/autocorrection-cancelled-by-ESC.html: Change manual-tests that
2554            were broken by relocated WebCore directory.
2555
2556         * manual-tests/autocorrection/autocorrection-cancelled-by-typing-1.html: Ditto.
2557
2558         * manual-tests/autocorrection/autocorrection-contraction.html: Ditto.
2559
2560         * manual-tests/autocorrection/continue-typing-to-dismiss-reversion.html: Ditto.
2561
2562         * manual-tests/autocorrection/delete-to-dismiss-reversion.html: Ditto.
2563
2564         * manual-tests/autocorrection/delete-to-end-of-word-to-show-reversion.html: Ditto.
2565
2566         * manual-tests/autocorrection/dismiss-multiple-guesses.html: Ditto.
2567
2568         * manual-tests/autocorrection/move-to-end-of-word-to-show-reversion.html: Ditto.
2569
2570         * manual-tests/autocorrection/select-from-multiple-guesses.html: Ditto.
2571
2572         * manual-tests/autocorrection/spell-checking-after-reversion.html: Added.
2573
2574         * manual-tests/autocorrection/type-whitespace-to-dismiss-reversion.html: Change manual-tests that
2575            were broken by relocated WebCore directory.
2576
2577         * rendering/InlineTextBox.cpp:
2578         (WebCore::InlineTextBox::paintDocumentMarkers): Code clean-up to be more concise.
2579
2580 2011-02-03  Abhishek Arya  <inferno@chromium.org>
2581
2582         Unreviewed, qt build fix.
2583
2584         * rendering/RenderBlock.cpp:
2585         (WebCore::RenderBlock::removeFloatingObject):
2586
2587 2011-02-03  Brian Salomon  <bsalomon@google.com>
2588
2589         Reviewed by James Robinson.
2590
2591         Handle non-raster backed images in getUnmultipliedImageData()
2592         https://bugs.webkit.org/show_bug.cgi?id=53468
2593
2594         No new tests. Existing canvas tests sufficient
2595         LayoutTests/canvas/philip/...
2596
2597         * platform/graphics/skia/ImageBufferSkia.cpp:
2598         (WebCore::getImageData):
2599         (WebCore::ImageBuffer::getUnmultipliedImageData):
2600         (WebCore::ImageBuffer::getPremultipliedImageData):
2601         (WebCore::putImageData):
2602         (WebCore::ImageBuffer::putUnmultipliedImageData):
2603         (WebCore::ImageBuffer::putPremultipliedImageData):
2604
2605 2011-02-03  Abhishek Arya  <inferno@chromium.org>
2606
2607         Reviewed by James Robinson.
2608
2609         Enforce more limits on root inline boxes height calculations.
2610         https://bugs.webkit.org/show_bug.cgi?id=53729
2611
2612         Test: fast/overflow/overflow-height-float-not-removed-crash.html
2613
2614         * rendering/RenderBlock.cpp:
2615         (WebCore::RenderBlock::removeFloatingObject): prevent logicalBottom to
2616         become negative when logicalTop is INT_MAX.
2617         (WebCore::RenderBlock::markLinesDirtyInBlockRange): when logicalBottom
2618         is INT_MAX, we should dirty everything. So, we bail out to make
2619         afterLowest equal to the lastRootBox() or lowestDirstLine.
2620
2621 2011-02-03  David Levin  <levin@chromium.org>
2622
2623         Reviewed by Adam Barth and Oliver Hunt.
2624
2625         Worker.importScript() should clean errors for cross origin imports.
2626         https://bugs.webkit.org/show_bug.cgi?id=52871
2627
2628         Test: http/tests/workers/worker-importScriptsOnError.html
2629
2630         * bindings/js/WorkerScriptController.cpp:
2631         (WebCore::WorkerScriptController::evaluate): Use sanitizeScriptError
2632         to determine when to create a clean exception.
2633         * bindings/v8/WorkerContextExecutionProxy.cpp:
2634         (WebCore::WorkerContextExecutionProxy::evaluate): Ditto.
2635         * dom/ScriptExecutionContext.cpp:
2636         (WebCore::ScriptExecutionContext::sanitizeScriptError): Figure out
2637         if the error needs to be cleaned up.
2638         (WebCore::ScriptExecutionContext::dispatchErrorEvent): Extracted
2639         sanitizeScriptError for use by other places.
2640         * dom/ScriptExecutionContext.h:
2641         * workers/WorkerContext.cpp:
2642         (WebCore::WorkerContext::importScripts): Use the reponse url when
2643         telling the evaluate where the script came fro.
2644         * workers/WorkerScriptLoader.cpp:
2645         (WebCore::WorkerScriptLoader::responseURL): Expose the url that
2646         the script was loaded from (which may be different from url() due
2647         to redirects).
2648         (WebCore::WorkerScriptLoader::didReceiveResponse): Capture the reponse url.
2649         * workers/WorkerScriptLoader.h:
2650
2651 2011-02-03  Mark Mentovai  <mark@chromium.org>
2652
2653         Reviewed by Dimitri Glazkov.
2654
2655         Chromium GYP build fix.
2656
2657         When various settings were moved to webcore_prerequisites in r66364,
2658         things that should have been direct_dependent_settings were not marked
2659         as such. GYP 'defines', for example, make no sense on a 'none'-type
2660         target such as webcore_prerequisites. It appears that it was intended
2661         for these settings to be pushed to direct dependents, which would make
2662         direct_dependent_settings correct.
2663
2664         Losing the ChromiumWebCoreObjC defines on the Mac, for example, caused
2665         http://crbug.com/71537, which at best causes Mac console log spew, and
2666         at worst may result in Chromium's copy of WebCore using system
2667         definitions of certain Objective-C classes at runtime, or vice-versa.
2668
2669         The build now includes a postbuild step to prevent
2670         http://crbug.com/71537 from regressing again. The build will fail upon
2671         regression.
2672
2673         https://bugs.webkit.org/show_bug.cgi?id=53630
2674
2675         * WebCore.gyp/WebCore.gyp: Move things in webcore_prerequisites into
2676           direct_dependent_settings as needed, add the check_objc_rename
2677           postbuild step.
2678         * WebCore.gyp/mac/check_objc_rename.sh: Added.
2679
2680 2011-02-03  Adam Barth  <abarth@webkit.org>
2681
2682         Reviewed by Eric Seidel.
2683
2684         Make XSSFilter go fast by adding a SuffixTree
2685         https://bugs.webkit.org/show_bug.cgi?id=53665
2686
2687         The SuffixTree lets us quickly reject snippets if the POST data is
2688         large (because we can avoid a linear scan over the POST data).
2689
2690         * html/parser/XSSFilter.cpp:
2691         (WebCore::XSSFilter::init):
2692         (WebCore::XSSFilter::isContainedInRequest):
2693         * html/parser/XSSFilter.h:
2694
2695 2011-02-03  Mihai Parparita  <mihaip@chromium.org>
2696
2697         Reviewed by Alexey Proskuryakov.
2698
2699         REGRESSION (r77355): Page cache layout tests crash
2700         https://bugs.webkit.org/show_bug.cgi?id=53648
2701
2702         Test: fast/events/pagehide-timeout.html
2703         
2704         Suspend active DOM objects after all pagehide event handlers have run,
2705         otherwise it's possible for them to create more objects that weren't
2706         getting suspended.
2707
2708         * history/CachedFrame.cpp:
2709         (WebCore::CachedFrame::CachedFrame):
2710
2711 2011-02-03  Jeremy Orlow  <jorlow@chromium.org>
2712
2713         Reviewed by Nate Chapin.
2714
2715         SerializedScriptValue should not require v8 to create undefined and null values
2716         https://bugs.webkit.org/show_bug.cgi?id=53730
2717
2718         Instead of creating a v8 type and passing that into the constructor, just use
2719         the writer class directly. While I was at it, I cleaned up the code a bit too
2720         by getting rid of the WireData/StringValue enum as I found that personally
2721         confusing.
2722
2723         This is necessary because these methods are called by IndexedDB in the browser
2724         process where v8 is not spun up.
2725
2726         No functionality changed and not possible to test.
2727
2728         * bindings/v8/SerializedScriptValue.cpp:
2729         (WebCore::SerializedScriptValue::createFromWire):
2730         (WebCore::SerializedScriptValue::create):
2731         (WebCore::SerializedScriptValue::nullValue):
2732         (WebCore::SerializedScriptValue::undefinedValue):
2733         (WebCore::SerializedScriptValue::release):
2734         (WebCore::SerializedScriptValue::SerializedScriptValue):
2735         * bindings/v8/SerializedScriptValue.h:
2736
2737 2011-02-03  Beth Dakin  <bdakin@apple.com>
2738
2739         Reviewed by Sam Weinig.
2740
2741         Fix for <rdar://problem/8944544> Ability to animate track
2742         for WKPainter scrollers
2743
2744         Two new WebKitSystemInterface functions.
2745         * WebCore.exp.in:
2746         * platform/mac/WebCoreSystemInterface.h:
2747         * platform/mac/WebCoreSystemInterface.mm:
2748
2749         Use Scrollbar::convertFromContainingView() to return the right point.
2750         * platform/mac/ScrollAnimatorMac.mm:
2751         (-[ScrollbarPainterControllerDelegate scrollerImpPair:convertContentPoint:toScrollerImp:]):
2752         
2753         ScrollKnobAnimation is now ScrollbarPartAnimation. It can
2754         now be used to animate the knob or the track.
2755         (-[ScrollbarPartAnimation initWithScrollbarPainter:part:WebCore::scrollAnimator:WebCore::animateAlphaTo:duration:]):
2756         (-[ScrollbarPartAnimation setCurrentProgress:]):
2757         (-[ScrollbarPainterDelegate setUpAnimation:scrollerPainter:part:WebCore::animateAlphaTo:duration:]):
2758         (-[ScrollbarPainterDelegate scrollerImp:animateKnobAlphaTo:duration:]):
2759         (-[ScrollbarPainterDelegate scrollerImp:animateTrackAlphaTo:duration:]):
2760
2761         Scrollbars need invalodating after the overlay state changes. 
2762         (-[ScrollbarPainterDelegate scrollerImp:overlayScrollerStateChangedTo:]):
2763
2764 2011-02-03  Sam Weinig  <sam@webkit.org>
2765
2766         Reviewed by Beth Dakin.
2767
2768         Scroll thumb jumps to top when resizing horizontally.
2769
2770         * platform/ScrollView.cpp:
2771         (WebCore::ScrollView::updateScrollbars): Add call to update
2772         the scrollbar's offset in the case where we may have created
2773         a new scrollbar but have not changed the current position.
2774
2775 2011-02-03  Justin Schuh  <jschuh@chromium.org>
2776
2777         Reviewed by Dirk Schulze.
2778
2779         startAnimations should use a local, RefCounted Vector.
2780         https://bugs.webkit.org/show_bug.cgi?id=53458
2781
2782         Test: svg/custom/use-animation-in-fill.html
2783
2784         * svg/SVGDocumentExtensions.cpp:
2785         (WebCore::SVGDocumentExtensions::startAnimations):
2786
2787 2011-02-03  Adam Barth  <abarth@webkit.org>
2788
2789         Reviewed by Daniel Bates.
2790
2791         XSSFilter shouldn't bother to analyze pages without "injection"
2792         characters in the request
2793         https://bugs.webkit.org/show_bug.cgi?id=53664
2794
2795         If the request lacks these "injection" characters, then it's unlikely
2796         that there's a reflective XSS attack happening.  This hueristic lets us
2797         avoid analyzing the vast majority of responses for XSS.  Of course, the
2798         hueristic isn't perfect.  Because of this huerstic, we miss out on
2799         injections into unquoted attributes.  However, it's a trade-off that's
2800         worked well in the XSSAuditor.
2801
2802         * html/parser/XSSFilter.cpp:
2803         (WebCore::HTMLNames::isRequiredForInjection):
2804         (WebCore::XSSFilter::XSSFilter):
2805         (WebCore::XSSFilter::init):
2806         (WebCore::XSSFilter::filterToken):
2807         (WebCore::XSSFilter::isContainedInRequest):
2808         * html/parser/XSSFilter.h:
2809
2810 2011-02-03  Vangelis Kokkevis  <vangelis@chromium.org>
2811
2812         Reviewed by Kenneth Russell.
2813
2814         [chromium] Fixing a compositor crash occurring on layers
2815         without an associated RenderSurface.
2816         https://bugs.webkit.org/show_bug.cgi?id=53679
2817         Regression was introduced by in r77425 
2818
2819         Test: http://webkit.org/blog/386/3d-transforms/ doesn't crash
2820         anymore.
2821
2822         * platform/graphics/chromium/LayerRendererChromium.cpp:
2823         (WebCore::LayerRendererChromium::drawLayer):
2824
2825 2011-02-03  Dan Bernstein  <mitz@apple.com>
2826
2827         Reviewed by Anders Carlsson.
2828
2829         <rdar://problem/8948788> Text emphasis marks have wrong orientation for vertical text
2830         https://bugs.webkit.org/show_bug.cgi?id=53709
2831
2832         Covered by rendering of fast/text/emphasis-vertical.html
2833
2834         * platform/graphics/mac/SimpleFontDataMac.mm:
2835         (WebCore::SimpleFontData::scaledFontData): Give the scaled font the same orientation this font
2836         has.
2837
2838 2011-02-02  Levi Weintraub  <leviw@chromium.org>
2839
2840         Reviewed by Ryosuke Niwa.
2841
2842         Moving cursor down in table cycles at the end of a row
2843         https://bugs.webkit.org/show_bug.cgi?id=50012
2844
2845         Avoids a caret cycling issue with certain content (e.g. tables) found at the very
2846         end of a document due to a bug in nextLeafWithSameEditability.
2847
2848         Test: editing/selection/move-by-line-cycles-in-table.html
2849
2850         * editing/visible_units.cpp:
2851         (WebCore::nextLeafWithSameEditability): Properly avoid descending back into the
2852         original leaf node.
2853
2854 2011-02-03  Pavel Podivilov  <podivilov@chromium.org>
2855
2856         Reviewed by Pavel Feldman.
2857
2858         Web Inspector: remove dead code related to changes panel.
2859         https://bugs.webkit.org/show_bug.cgi?id=53688
2860
2861         * WebCore.gypi:
2862         * WebCore.vcproj/WebCore.vcproj:
2863         * inspector/front-end/ChangesView.js: Removed.
2864         * inspector/front-end/WebKit.qrc:
2865         * inspector/front-end/inspector.css:
2866         (#error-warning-count):
2867         (#error-warning-count:hover):
2868         (#error-count + #warning-count):
2869         * inspector/front-end/inspector.html:
2870         * inspector/front-end/inspector.js:
2871
2872 2011-02-02  Sam Weinig  <sam@webkit.org>
2873
2874         Reviewed by Anders Carlsson.
2875
2876         Add notification of the end of a rubber band.
2877         <rdar://problem/8940648>
2878
2879         * WebCore.exp.in:
2880         Add additional exprots.
2881
2882         * page/ChromeClient.h:
2883         (WebCore::ChromeClient::didCompleteRubberBandForMainFrame):
2884         * page/FrameView.cpp:
2885         (WebCore::FrameView::didCompleteRubberBand):
2886         * page/FrameView.h:
2887         * platform/ScrollView.cpp:
2888         (WebCore::ScrollView::didCompleteRubberBand):
2889         * platform/ScrollView.h:
2890         Add hook.
2891
2892         * platform/ScrollableArea.h:
2893         (WebCore::ScrollableArea::inLiveResize):
2894         (WebCore::ScrollableArea::maximumScrollPosition):
2895         (WebCore::ScrollableArea::visibleWidth):
2896         (WebCore::ScrollableArea::overhangAmount):
2897         (WebCore::ScrollableArea::didCompleteRubberBand):
2898         Reorganize and de-virtualize live resize notifications.
2899
2900         * platform/mac/ScrollAnimatorMac.mm:
2901         (WebCore::ScrollAnimatorMac::snapRubberBandTimerFired):
2902         Call the new hook when the rubberband ends.
2903
2904 2011-02-02  Evan Martin  <evan@chromium.org>
2905
2906         Reviewed by Tony Chang.
2907
2908         [chromium] complex joining characters positioned in wrong place
2909         https://bugs.webkit.org/show_bug.cgi?id=53637
2910
2911         Provide the correct font metrics to Harfbuzz related to the font design space.
2912         There are used in some fonts for GPOS positioning.
2913
2914         Test: platform/chromium-linux/fast/text/international/complex-joining-using-gpos.html
2915
2916         * platform/graphics/chromium/ComplexTextControllerLinux.cpp:
2917         (WebCore::ComplexTextController::setupFontForScriptRun):
2918         (WebCore::ComplexTextController::allocHarfbuzzFont):
2919         * platform/graphics/chromium/FontPlatformDataLinux.cpp:
2920         (WebCore::FontPlatformData::FontPlatformData):
2921         (WebCore::FontPlatformData::emSizeInFontUnits):
2922         (WebCore::FontPlatformData::operator=):
2923         * platform/graphics/chromium/FontPlatformDataLinux.h:
2924         (WebCore::FontPlatformData::FontPlatformData):
2925
2926 2011-02-02  Dimitri Glazkov  <dglazkov@chromium.org>
2927
2928         Reviewed by Kent Tamura.
2929
2930         REGRESSION(r76147): Slider thumb position is not updated when value attribute is changed.
2931         https://bugs.webkit.org/show_bug.cgi?id=53634
2932
2933         Test: fast/dom/HTMLInputElement/input-slider-update.html
2934
2935         * html/HTMLInputElement.cpp:
2936         (WebCore::HTMLInputElement::setValue): Added a call to InputType::valueChanged.
2937         * html/InputType.cpp:
2938         (WebCore::InputType::valueChanged): Added empty implementation.
2939         * html/InputType.h: Added def.
2940         * html/RangeInputType.cpp:
2941         (WebCore::RangeInputType::valueChanged): Added implementation that dirties layout
2942             bit on the thumb.
2943         * html/RangeInputType.h: Added def.
2944
2945 2011-02-02  Pavel Podivilov  <podivilov@chromium.org>
2946
2947         Reviewed by Pavel Feldman.
2948
2949         Web Inspector: do not share source frames between resources panel and scripts panel.
2950         https://bugs.webkit.org/show_bug.cgi?id=53584
2951
2952         Currently, we show error messages only for resources. This change will allow showing error
2953         messages in source frame even when resource is not available (eval scripts, inlined scripts).
2954
2955         * inspector/front-end/ConsoleView.js:
2956         (WebInspector.ConsoleView.prototype.addMessage):
2957         (WebInspector.ConsoleView.prototype.clearMessages):
2958         * inspector/front-end/ResourceView.js:
2959         (WebInspector.ResourceView.recreateResourceView):
2960         * inspector/front-end/ResourcesPanel.js:
2961         (WebInspector.FrameResourceTreeElement.prototype._setBubbleText):
2962         * inspector/front-end/ScriptsPanel.js:
2963         (WebInspector.ScriptsPanel.prototype._scriptSourceChanged):
2964         (WebInspector.ScriptsPanel.prototype.addConsoleMessage):
2965         (WebInspector.ScriptsPanel.prototype.clearConsoleMessages):
2966         (WebInspector.ScriptsPanel.prototype.reset):
2967         (WebInspector.ScriptsPanel.prototype._sourceFrameForScriptOrResource):
2968         (WebInspector.ScriptsPanel.prototype._sourceFrameForResource):
2969         (WebInspector.ScriptsPanel.prototype._sourceFrameForScript):
2970
2971 2011-02-03  Simon Fraser  <simon.fraser@apple.com>
2972
2973         Fix 32-bit builds.
2974
2975         * platform/graphics/ShadowBlur.cpp:
2976         (WebCore::ShadowBlur::blurLayerImage):
2977
2978 2011-02-03  Mikhail Naganov  <mnaganov@chromium.org>
2979
2980         Reviewed by Pavel Feldman.
2981
2982         Web Inspector: Add reporting of JS heap size limit to 'console.memory'.
2983         https://bugs.webkit.org/show_bug.cgi?id=53592
2984
2985         In JSC there is no limit, thus 'undefined' value is returned.
2986         For V8, the limit reported by the VM is returned.
2987
2988         * Android.jscbindings.mk:
2989         * CMakeLists.txt:
2990         * GNUmakefile.am:
2991         * WebCore.gypi:
2992         * WebCore.pro:
2993         * WebCore.vcproj/WebCore.vcproj:
2994         * WebCore.xcodeproj/project.pbxproj:
2995         * bindings/js/JSBindingsAllInOne.cpp:
2996         * bindings/js/JSMemoryInfoCustom.cpp: Added.
2997         * bindings/js/ScriptGCEvent.cpp:
2998         (WebCore::ScriptGCEvent::getHeapSize):
2999         * bindings/js/ScriptGCEvent.h:
3000         * bindings/v8/ScriptGCEvent.cpp:
3001         (WebCore::ScriptGCEvent::getHeapSize):
3002         * bindings/v8/ScriptGCEvent.h:
3003         * inspector/InspectorTimelineAgent.cpp:
3004         (WebCore::InspectorTimelineAgent::setHeapSizeStatistic):
3005         * page/MemoryInfo.cpp:
3006         (WebCore::MemoryInfo::MemoryInfo):
3007         * page/MemoryInfo.h:
3008         (WebCore::MemoryInfo::jsHeapSizeLimit):
3009         * page/MemoryInfo.idl:
3010
3011 2011-01-27  Philippe Normand  <pnormand@igalia.com>
3012
3013         Reviewed by Martin Robinson.
3014
3015         [GTK] LayoutTests/media/audio-mpeg4-supported.html fails
3016         https://bugs.webkit.org/show_bug.cgi?id=53125
3017
3018         * platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:
3019         (WebCore::mimeTypeCache): Add audio/x-m4a mimetype in the cache.
3020
3021 2011-02-03  Simon Fraser  <simon.fraser@apple.com>
3022
3023         Reviewed by Sam Weinig.
3024
3025         ShadowBlur radius for CSS shadows is slightly too big
3026         https://bugs.webkit.org/show_bug.cgi?id=53660
3027         
3028         If we follow SVG gaussian blur for CSS shadows, we can end up rendering
3029         shadows that extend further than the CSS "blur radius", which results
3030         in the shadows being truncated.
3031         
3032         Fix with a small fudge factor to reduce the kernel diameter slightly
3033         for CSS shadows.
3034         
3035         Also more closely follow the algorithm described in the SVG spec
3036         for computing the kernel size for different diameters, and clean up
3037         some variable naming relating to the shadow bounds.
3038
3039         * platform/graphics/ShadowBlur.cpp:
3040         (WebCore::ShadowBlur::blurLayerImage):
3041         (WebCore::ShadowBlur::drawRectShadowWithTiling):
3042
3043 2011-02-01  Pavel Podivilov  <podivilov@chromium.org>
3044
3045         Reviewed by Pavel Feldman.
3046
3047         Web Inspector: introduce new api for managing JavaScript breakpoints.
3048         https://bugs.webkit.org/show_bug.cgi?id=53235
3049
3050         Single protocol breakpoint (e.g. set by url) is mapped on zero or more VM breakpoints (set by sourceID).
3051         removeJavaScriptBreakpoint(breakpointId) removes breakpoint and all linked VM breakpoints.
3052         Since UI uses VM breakpoint location rather then protocol breakpoint location, all resolved breakpoints locations are passed to frontend.
3053
3054         SourceFrame is now aware of whether breakpoint is resolved or not and may display it accordingly.
3055         JavaScriptBreakpointsSidebarPane filters out breakpoints set on nonexistent scripts to avoid UI cluttering.
3056
3057         * bindings/js/ScriptDebugServer.cpp:
3058         (WebCore::ScriptDebugServer::setBreakpoint):
3059         (WebCore::ScriptDebugServer::removeBreakpoint):
3060         * bindings/js/ScriptDebugServer.h:
3061         * bindings/v8/DebuggerScript.js:
3062         ():
3063         * bindings/v8/ScriptDebugServer.cpp:
3064         (WebCore::ScriptDebugServer::setBreakpoint):
3065         * bindings/v8/ScriptDebugServer.h:
3066         * inspector/Inspector.idl:
3067         * inspector/InspectorAgent.cpp: clear breakpoints from inspector state when new frontend is created
3068         (WebCore::InspectorAgent::restoreInspectorStateFromCookie):
3069         (WebCore::InspectorAgent::populateScriptObjects):
3070         (WebCore::InspectorAgent::restoreDebugger):
3071         (WebCore::InspectorAgent::showAndEnableDebugger):
3072         (WebCore::InspectorAgent::enableDebugger):
3073         * inspector/InspectorAgent.h:
3074         * inspector/InspectorDebuggerAgent.cpp: manage relations between protocol breakpoints and VM breakpoints
3075         (WebCore::InspectorDebuggerAgent::InspectorDebuggerAgent):
3076         (WebCore::InspectorDebuggerAgent::inspectedURLChanged):
3077         (WebCore::InspectorDebuggerAgent::setJavaScriptBreakpoint):
3078         (WebCore::InspectorDebuggerAgent::setJavaScriptBreakpointBySourceId):
3079         (WebCore::InspectorDebuggerAgent::removeJavaScriptBreakpoint):
3080         (WebCore::InspectorDebuggerAgent::continueToLocation):
3081         (WebCore::InspectorDebuggerAgent::resolveBreakpoint):
3082         (WebCore::InspectorDebuggerAgent::getScriptSource):
3083         (WebCore::InspectorDebuggerAgent::didParseSource):
3084         (WebCore::InspectorDebuggerAgent::didPause):
3085         * inspector/InspectorDebuggerAgent.h:
3086         (WebCore::InspectorDebuggerAgent::Script::Script):
3087         * inspector/InspectorValues.cpp:
3088         (WebCore::InspectorValue::asNumber):
3089         (WebCore::InspectorBasicValue::asNumber):
3090         (WebCore::InspectorObject::remove):
3091         * inspector/InspectorValues.h:
3092         (WebCore::InspectorObject::getNumber):
3093         (WebCore::InspectorObject::find):
3094         * inspector/ScriptBreakpoint.h:
3095         (WebCore::ScriptBreakpoint::ScriptBreakpoint):
3096         * inspector/front-end/Breakpoint.js:
3097         (WebInspector.Breakpoint):
3098         (WebInspector.Breakpoint.prototype.addLocation):
3099         * inspector/front-end/BreakpointManager.js: remove all stuff related to JavaScript breakpoints from here
3100         (WebInspector.BreakpointManager):
3101         (WebInspector.BreakpointManager.prototype._projectChanged):
3102         (WebInspector.BreakpointManager.prototype._saveBreakpoints):
3103         (WebInspector.BreakpointManager.prototype._validateBreakpoints):
3104         * inspector/front-end/BreakpointsSidebarPane.js:
3105         (WebInspector.JavaScriptBreakpointsSidebarPane): filter breakpoints set on nonexistent scripts to avoid ui cluttering
3106         * inspector/front-end/DebuggerModel.js:
3107         (WebInspector.DebuggerModel): pull all JavaScript from localStorage and push them to fronted when debugger is enabled, save resolved breakpoints data
3108         * inspector/front-end/Script.js:
3109         (WebInspector.Script.prototype.sourceLine):
3110         * inspector/front-end/ScriptsPanel.js:
3111         (WebInspector.ScriptsPanel.prototype._toggleDebugging):
3112         * inspector/front-end/Settings.js:
3113         (WebInspector.Settings):
3114         * inspector/front-end/SourceFrame.js: handle resolved and unresolved breakpoints differently
3115         * inspector/front-end/inspector.js:
3116
3117 2011-02-03  Nikolas Zimmermann  <nzimmermann@rim.com>
3118
3119         Reviewed by Dirk Schulze.
3120
3121         small text which is scaled to be large renders pixelated
3122         https://bugs.webkit.org/show_bug.cgi?id=12448
3123
3124         SVG <text> with font-size smaller or equal to 1 does not paint correctly
3125         https://bugs.webkit.org/show_bug.cgi?id=14242
3126
3127         misplaced text in SVG
3128         https://bugs.webkit.org/show_bug.cgi?id=17053
3129
3130         Don't render very small (but zoomed) text inside SVG
3131         https://bugs.webkit.org/show_bug.cgi?id=19393
3132
3133         Tiny fonts scaled up end up too large in Safari
3134         https://bugs.webkit.org/show_bug.cgi?id=20192
3135
3136         Stretched SVG Text has awful glyph spacing 
3137         https://bugs.webkit.org/show_bug.cgi?id=21774
3138
3139         REGRESSION (r72141?): svg/batik/text/smallFonts.svg failing on Leopard
3140         https://bugs.webkit.org/show_bug.cgi?id=49846
3141
3142         [Gtk] Text height in zoomed SVG is 1px too high
3143         https://bugs.webkit.org/show_bug.cgi?id=50313
3144
3145         SVG text smaller than 0.5px not displayed properly
3146         https://bugs.webkit.org/show_bug.cgi?id=50528
3147
3148         When rendering text, we're selecting a font with a size, as specified in the markup.
3149         This can lead to problems, if the context, where the text is rendered upon, is scaled. If a parent
3150         element of the <text> defines a transform=".." or the outermost <svg> containing a viewBox the
3151         problem becomes apparent.
3152
3153         Consider following two snippets, which should render exactly the same:
3154         <svg viewBox="0 0 100 100"><text x="25" y="50" font-size="25">test</text></svg>
3155         <svg viewBox="0 0 1 1"><text x="0.25" y="0.5" font-size="0.25">test</text></svg>
3156
3157         When selecting a font size below 0.5, FontCacheMac would request a font with size 0,
3158         which AppKit turns into 12. This lead to huge text rendering, instead of small text on Mac.
3159         Other platforms have different problems (Qt simply scales the font, leading to pixelation etc.)
3160
3161         To fix this in a cross-platform fashion, we now always compute the final font size on screen,
3162         remove any scaling from the context, draw the text using the scaled font size, then reapply
3163         the context scale. This makes the example snippets above render exactly the same and fixes
3164         numerous of bugs, present since years. As we're now heavily using floating-point font sizes
3165         internally, depending on the scale of the document, it's very important to use the new
3166         floating-point text metrics information (floatAscent/floatDescent/floatHeight) everywhere in SVG.
3167
3168         Fixes existing tests: css3/zoom-coords.xhtml (cross-platform inconsistencies should be gone, mac now reports floatHeight values for SVG text height)
3169                               svg/hixie/text/003.html (no more pixelation)
3170                               svg/batik/text/smallFonts.svg (small fonts aren't rendered huge anymore on mac)
3171                               svg/hixie/viewbox/preserveAspectRatio/001.xml (bug 21774, no more awful spacing)
3172                               svg/zoom/page/zoom-zoom-coords.xhtml (cross-platform inconsistencies should be gone, inspired by bug 50313)
3173
3174         Tests: svg/text/font-size-below-point-five-2.svg (reduction from bug 50528)
3175                svg/text/font-size-below-point-five.svg (reduction from bug 50528)
3176                svg/text/scaled-font.svg (reduction from bug 12448)
3177                svg/text/small-fonts-2.svg (reduction from bug 14242)
3178                svg/text/small-fonts-3.svg (reduction from bug 17053)
3179                svg/text/small-fonts-in-html5.html (reduction from bug 19393)
3180                svg/text/small-fonts.svg (reduction from bug 20192))
3181
3182         * rendering/svg/RenderSVGInlineText.cpp: Cache 'float scalingFactor' & 'Font scaledFont', whenever the on-screen representation changes.
3183         * rendering/svg/RenderSVGInlineText.h:
3184         * rendering/svg/RenderSVGText.cpp: Update scalingFactor/scaledFont, if necessary.
3185         * rendering/svg/SVGInlineTextBox.cpp: Switch to new font rendering strategy. Always use scaledFont, and remove any context scale before drawing.
3186         * rendering/svg/SVGInlineTextBox.h:
3187         * rendering/svg/SVGTextLayoutEngineBaseline.cpp: Use floating-point metrics everywhere.
3188         * rendering/svg/SVGTextMetrics.cpp: Ditto.
3189         * rendering/svg/SVGTextMetrics.h: Ditto.
3190         * rendering/svg/SVGTextQuery.cpp: Ditto.
3191         * svg/SVGFont.cpp: Adjust stroke thickness, when drawing SVGFonts into a normalized context (no more scale).
3192         * svg/SVGTextContentElement.cpp: Make <text> elements always dependant on window size changes in combination with viewBox set.
3193         * svg/SVGTextPositioningElement.cpp: Remove now unnecessary code to determine wheter relative lengths are used as text attributes.
3194         * svg/SVGTextPositioningElement.h: 
3195
3196 2011-02-03  Pavel Feldman  <pfeldman@chromium.org>
3197
3198         Reviewed by Yury Semikhatsky.
3199
3200         Web Inspector: resources panel doesn't show frames after reload.
3201         https://bugs.webkit.org/show_bug.cgi?id=53430
3202
3203         * inspector/front-end/ResourcesPanel.js:
3204         (WebInspector.ResourcesPanel.prototype.show):
3205         (WebInspector.ResourcesPanel.prototype.loadEventFired):
3206         (WebInspector.ResourcesPanel.prototype._initDefaultSelection):
3207         (WebInspector.ResourcesPanel.prototype.reset):
3208         (WebInspector.ResourcesPanel.prototype.clear):
3209         * inspector/front-end/inspector.js:
3210         (WebInspector.loadEventFired):
3211
3212 2011-02-01  Alexander Pavlov  <apavlov@chromium.org>
3213
3214         Reviewed by Pavel Feldman.
3215
3216         Web Inspector: Remove the *2 suffix from the CSS style-related protocol methods
3217         https://bugs.webkit.org/show_bug.cgi?id=53492
3218
3219         * inspector/Inspector.idl:
3220         * inspector/InspectorCSSAgent.cpp:
3221         (WebCore::InspectorCSSAgent::getStylesForNode):
3222         (WebCore::InspectorCSSAgent::getInlineStyleForNode):
3223         (WebCore::InspectorCSSAgent::getComputedStyleForNode):
3224         (WebCore::InspectorCSSAgent::getAllStyles):
3225         (WebCore::InspectorCSSAgent::getStyleSheet):
3226         (WebCore::InspectorCSSAgent::getStyleSheetText):
3227         (WebCore::InspectorCSSAgent::setStyleSheetText):
3228         (WebCore::InspectorCSSAgent::setPropertyText):
3229         (WebCore::InspectorCSSAgent::toggleProperty):
3230         (WebCore::InspectorCSSAgent::setRuleSelector):
3231         (WebCore::InspectorCSSAgent::addRule):
3232         * inspector/InspectorCSSAgent.h:
3233         * inspector/front-end/AuditRules.js:
3234         (WebInspector.AuditRules.UnusedCssRule.prototype.doRun):
3235         * inspector/front-end/CSSStyleModel.js:
3236         (WebInspector.CSSStyleModel.prototype.getStylesAsync):
3237         (WebInspector.CSSStyleModel.prototype.getComputedStyleAsync):
3238         (WebInspector.CSSStyleModel.prototype.getInlineStyleAsync):
3239         (WebInspector.CSSStyleModel.prototype.setRuleSelector):
3240         (WebInspector.CSSStyleModel.prototype.addRule):
3241         (WebInspector.CSSStyleModel.prototype._styleSheetChanged):
3242         (WebInspector.CSSStyleModel.prototype._onRevert):
3243         (WebInspector.CSSStyleDeclaration.prototype.insertPropertyAt):
3244         (WebInspector.CSSProperty.prototype.setText):
3245         (WebInspector.CSSProperty.prototype.setDisabled):
3246         (WebInspector.CSSStyleSheet.createForId):
3247         (WebInspector.CSSStyleSheet.prototype.setText):
3248
3249 2011-02-03  Adam Barth  <abarth@webkit.org>
3250
3251         Reviewed by Daniel Bates.
3252
3253         Teach XSSFilter about data URLs
3254         https://bugs.webkit.org/show_bug.cgi?id=53662
3255
3256         The XSS filter doesn't really make sense for data URLs because
3257         everything in a "response" from a data URL was part of the request.
3258
3259         Test: http/tests/security/xssAuditor/data-urls-work.html
3260
3261         * html/parser/XSSFilter.cpp:
3262         (WebCore::XSSFilter::init):
3263         (WebCore::XSSFilter::filterToken):
3264
3265 2011-02-02  Chris Evans  <cevans@chromium.org>
3266
3267         Reviewed by Darin Fisher.
3268
3269         window.find() can fail when switching case sensitivity
3270         https://bugs.webkit.org/show_bug.cgi?id=53654
3271
3272         Reset the pattern to a safe one when done, to avoid usearch_reset()
3273         indirectly touching the old, stale text pointer.
3274
3275         Test: fast/text/find-window.html
3276
3277         * editing/TextIterator.cpp:
3278         (WebCore::SearchBuffer::~SearchBuffer): leave a safe pattern buffer when done.
3279
3280 2011-02-02  Adam Barth  <abarth@webkit.org>
3281
3282         Reviewed by Daniel Bates.
3283
3284         Teach XSSFilter that <param> elements can contain URLs
3285         https://bugs.webkit.org/show_bug.cgi?id=53652
3286
3287         When loading plugins for the <object> tag, we're "smart" enough to
3288         reach into the <param> elements and pull out the URL in some cases.
3289         This patch teaches the XSSFilter how to block injections into those
3290         sorts of param elements.
3291
3292         Fixes:
3293             http/tests/security/xssAuditor/object-*
3294
3295         * html/HTMLParamElement.cpp:
3296         (WebCore::HTMLParamElement::isURLParameter):
3297         (WebCore::HTMLParamElement::isURLAttribute):
3298         (WebCore::HTMLParamElement::addSubresourceAttributeURLs):
3299         * html/HTMLParamElement.h:
3300             - Add a helper function so that HTMLParamElement can share the
3301               ground truth for these names with the XSSFilter.
3302         * html/parser/XSSFilter.cpp:
3303         (WebCore::XSSFilter::filterTokenInitial):
3304         (WebCore::XSSFilter::filterParamToken):
3305         * html/parser/XSSFilter.h:
3306
3307 2011-02-02  Dimitri Glazkov  <dglazkov@chromium.org>
3308
3309         Reviewed by David Levin.
3310
3311         GCC compiler on ARM issues bogus warnings and fails to compile.
3312         https://bugs.webkit.org/show_bug.cgi?id=53620
3313
3314         Despite warnings explicitly being disallowed (-Wno-uninitialized),
3315         gcc (Ubuntu 4.4.3-4ubuntu5) 4.4.3 throws up the warnings like:
3316
3317         "error: 'colorTransparent.unstatic.4909' may be used uninitialized in this function"
3318
3319         The fix is to add an extra condition, which somehow pacifies the compiler.
3320
3321         * css/CSSPrimitiveValue.cpp:
3322         (WebCore::CSSPrimitiveValue::createColor): Added workaround conditions.
3323
3324 2011-02-02  Adam Barth  <abarth@webkit.org>
3325
3326         Reviewed by Daniel Bates.
3327
3328         Teach XSSFilter about X-XSS-Protection
3329         https://bugs.webkit.org/show_bug.cgi?id=53640
3330
3331         This patch causes us to pass:
3332             http/tests/security/xssAuditor/full-block-*
3333             http/tests/security/xssAuditor/no-protection-script-tag.html
3334
3335         * html/parser/XSSFilter.cpp:
3336         (WebCore::XSSFilter::XSSFilter):
3337         (WebCore::XSSFilter::init):
3338         (WebCore::XSSFilter::filterToken):
3339         * html/parser/XSSFilter.h:
3340
3341 2011-02-02  Adam Barth  <abarth@webkit.org>
3342
3343         Reviewed by Daniel Bates.
3344
3345         When XSSFilter blocks JavaScript URLs, use a safe JavaScript URL
3346         instead of the empty string
3347         https://bugs.webkit.org/show_bug.cgi?id=53643
3348
3349         In a URL context, the empty string completes to the URL of the current
3350         page, which causes these tests to go into an infinite loop.  Instead,
3351         we should use a "safe" JavaScript URL that does nothing.
3352
3353         Fixes:
3354             http/tests/security/xssAuditor/javascript-link*
3355
3356         * html/parser/XSSFilter.cpp:
3357         (WebCore::XSSFilter::eraseDangerousAttributesIfInjected):
3358
3359 2011-02-02  Dan Bernstein  <mitz@apple.com>
3360
3361         Reviewed by Sam Weinig.
3362
3363         <rdar://problem/8380506> REGRESSION (r61921): RTL text in <b> tag doesn't display in WebKit under certain conditions
3364         https://bugs.webkit.org/show_bug.cgi?id=44942
3365
3366         Test: fast/text/bidi-embedding-pop-and-push-same-2.html
3367
3368         * platform/text/BidiResolver.h:
3369         (WebCore::::commitExplicitEmbedding): Changed to return a boolean indicating whether there was
3370         a change to embedding levels.
3371         (WebCore::::createBidiRunsForLine): If embedding levels did not change as a result of committing
3372         the explicit embedding sequence, then runs were not added, and we should continue normally.
3373
3374 2011-02-02  Sam Weinig  <sam@webkit.org>
3375
3376         Reviewed by Dan Bernstein.
3377
3378         Fix miscalculation of the overhang area used for painting. We were
3379         not correctly accounting for scrollbars resulting in an non-negative
3380         overhang even when we weren't over the edge.
3381
3382         * platform/ScrollView.cpp:
3383         (WebCore::ScrollView::calculateOverhangAreasForPainting):
3384
3385 2011-02-02  Jeremy Orlow  <jorlow@chromium.org>
3386
3387         Reviewed by Nate Chapin.
3388
3389         IDBTransaction and IDBRequest can be deleted while ScriptExecutionContext is iterating....which is bad
3390         https://bugs.webkit.org/show_bug.cgi?id=52722
3391
3392         The solution is to change ScriptExecutionContext's destructor to iterate over
3393         the list in a way that handles the mutations. This new method is destructive,
3394         but that's OK since the object is going away. I've also added a several asserts.
3395
3396         There should be no behavior change.
3397
3398         * dom/ScriptExecutionContext.cpp:
3399         (WebCore::ScriptExecutionContext::ScriptExecutionContext):
3400         (WebCore::ScriptExecutionContext::~ScriptExecutionContext):
3401         (WebCore::ScriptExecutionContext::canSuspendActiveDOMObjects):
3402         (WebCore::ScriptExecutionContext::suspendActiveDOMObjects):
3403         (WebCore::ScriptExecutionContext::resumeActiveDOMObjects):
3404         (WebCore::ScriptExecutionContext::stopActiveDOMObjects):
3405         (WebCore::ScriptExecutionContext::createdActiveDOMObject):
3406         (WebCore::ScriptExecutionContext::destroyedActiveDOMObject):
3407         * dom/ScriptExecutionContext.h:
3408         * storage/IDBTransaction.cpp:
3409         (WebCore::IDBTransaction::contextDestroyed):
3410         * storage/IDBTransaction.h:
3411
3412 2011-02-02  Mark Rowe  <mrowe@apple.com>
3413
3414         Build fix.
3415
3416         * WebCore.exp.in: Remove some bogus symbols from the .exp.in file.
3417         * platform/mac/ScrollbarThemeMac.mm:
3418         (WebCore::ScrollbarThemeMac::unregisterScrollbar): Look the object
3419         up in the HashMap rather than relying on a local variable that doesn't
3420         exist.
3421
3422 2011-02-02  Adam Barth  <abarth@webkit.org>
3423
3424         Reviewed by Daniel Bates.
3425
3426         Teach XSSFilter about JavaScript URLs
3427         https://bugs.webkit.org/show_bug.cgi?id=53635
3428
3429         This patch teaches the XSSFilter to check for JavaScript URLs in
3430         attribute values.  If this approach has too many false positives, we
3431         can restrict which attribute names we examine.
3432
3433         Fixes these tests:
3434             http/tests/security/xssAuditor/anchor-url-dom-write-location-javascript-URL.html
3435             http/tests/security/xssAuditor/dom-write-location-javascript-URL.html
3436             http/tests/security/xssAuditor/iframe-javascript-url*
3437
3438         * html/parser/XSSFilter.cpp:
3439         (WebCore::HTMLNames::containsJavaScriptURL):
3440         (WebCore::XSSFilter::filterTokenInitial):
3441         (WebCore::XSSFilter::eraseDangerousAttributesIfInjected):
3442         * html/parser/XSSFilter.h:
3443
3444 2011-02-02  Dan Bernstein  <mitz@apple.com>
3445
3446         Reviewed by Sam Weinig, even though this is just a...
3447
3448         ...build fix.
3449
3450         * platform/mac/ScrollAnimatorMac.mm:
3451         (WebCore::ScrollAnimatorMac::~ScrollAnimatorMac):
3452
3453 2011-02-02  Mark Rowe  <mrowe@apple.com>
3454
3455         Reviewed by Beth Dakin.
3456
3457         <rdar://problem/8952012> Crash on launch inside scrollbar code.
3458
3459         We need to ensure that we remove ourselves as the delegates of objects when we're going
3460         away as failing to do this can lead to crashes if the lifetime of the other objects
3461         is longer than ours.
3462
3463         * platform/mac/ScrollAnimatorMac.mm:
3464         (WebCore::ScrollAnimatorMac::~ScrollAnimatorMac):
3465         * platform/mac/ScrollbarThemeMac.mm:
3466         (WebCore::ScrollbarThemeMac::unregisterScrollbar):
3467
3468 2011-02-02  Beth Dakin  <bdakin@apple.com>
3469
3470         Build fix.
3471
3472         * WebCore.exp.in:
3473
3474 2011-02-02  Patrick Gansterer  <paroga@webkit.org>
3475
3476         Unreviewed WinCE build fix for r77397.
3477
3478         * page/wince/FrameWinCE.cpp:
3479         (WebCore::computePageRectsForFrame):
3480
3481 2011-02-02  Patrick Gansterer  <paroga@webkit.org>
3482
3483         Unreviewed WinCE build fix for r77398.
3484
3485         * platform/graphics/wince/PlatformPathWinCE.cpp:
3486         (WebCore::containsPoint):
3487         (WebCore::inflateRectToContainPoint):
3488         (WebCore::PlatformPath::addRect):
3489         * platform/graphics/wince/SharedBitmap.cpp:
3490         (WebCore::SharedBitmap::drawPattern):
3491         * rendering/RenderThemeWinCE.cpp:
3492         (WebCore::RenderThemeWinCE::paintMenuListButton):
3493         (WebCore::RenderThemeWinCE::paintSearchFieldCancelButton):
3494         (WebCore::RenderThemeWinCE::paintSliderTrack):
3495         (WebCore::RenderThemeWinCE::paintMediaMuteButton):
3496         (WebCore::RenderThemeWinCE::paintMediaPlayButton):
3497         (WebCore::RenderThemeWinCE::paintMediaSeekBackButton):
3498         (WebCore::RenderThemeWinCE::paintMediaSeekForwardButton):
3499
3500 2011-02-02  Jian Li  <jianli@chromium.org>
3501
3502         Reviewed by Kenneth Russell.
3503
3504         [V8] Accessing DataView with index of -1 returns 0, doesn't throw
3505         https://bugs.webkit.org/show_bug.cgi?id=53559
3506
3507         Added test cases to cover this in fast/canvas/webgl/data-view-test.html.
3508
3509         * html/canvas/DataView.h:
3510         (WebCore::DataView::beyondRange):
3511
3512 2011-02-02  Sam Weinig  <sam@webkit.org>
3513
3514         Reviewed by Beth Dakin.
3515