Implement absolutely positioned flex items
[WebKit-https.git] / Source / WebCore / ChangeLog
1 2012-09-20  Tony Chang  <tony@chromium.org>
2
3         Implement absolutely positioned flex items
4         https://bugs.webkit.org/show_bug.cgi?id=93798
5
6         Reviewed by Ojan Vafai.
7
8         Previously, we treated absolutely positioned flex items as a 0x0 placeholder element.
9         Now we position the 0x0 placeholder where the next item would go. This causes the
10         following changes:
11         - justify-content: space-{around,between} no longer change due to the existence of absolutely positioned flex items.
12         - alignment doesn't change the placement of absolutely positioned flex items.
13         - auto margins in the alignment direction don't do anything on absolutely positioned flex items.
14
15         Test: css3/flexbox/position-absolute-children.html
16
17         * rendering/RenderFlexibleBox.cpp:
18         (WebCore::RenderFlexibleBox::availableAlignmentSpaceForChild): Absolutely positioned flex items should not use this.
19         (WebCore::RenderFlexibleBox::updateAutoMarginsInCrossAxis): Absolutely positioned flex items should not use this.
20         (WebCore::initialJustifyContentOffset): If there are no flex items, space-around should center an absolutely positioned flex item.
21         (WebCore::RenderFlexibleBox::numberOfInFlowPositionedChildren): Helper method for helping to compute space-between and space-around.
22         (WebCore::RenderFlexibleBox::layoutAndPlaceChildren): Fix spacing when space-between or space-around.
23         (WebCore::RenderFlexibleBox::layoutColumnReverse): Fix spacing when space-between or space-around.
24         (WebCore::RenderFlexibleBox::alignChildren): Treat absolutely positioned children like flex-start.
25         * rendering/RenderFlexibleBox.h: numberOfInFlowPositionedChildren method.
26
27 2012-09-20  Sheriff Bot  <webkit.review.bot@gmail.com>
28
29         Unreviewed, rolling out r129144.
30         http://trac.webkit.org/changeset/129144
31         https://bugs.webkit.org/show_bug.cgi?id=97244
32
33         causing lots of assertions in tests (Requested by smfr on
34         #webkit).
35
36         * rendering/InlineBox.h:
37         (WebCore::InlineBox::markDirty):
38         * rendering/InlineTextBox.cpp:
39         * rendering/InlineTextBox.h:
40         (WebCore::InlineTextBox::start):
41         (WebCore::InlineTextBox::end):
42         (WebCore::InlineTextBox::len):
43         (WebCore::InlineTextBox::offsetRun):
44
45 2012-09-20  Mike West  <mkwst@chromium.org>
46
47         CSP reports should send an empty 'referrer' rather than nothing.
48         https://bugs.webkit.org/show_bug.cgi?id=97233
49
50         Reviewed by Adam Barth.
51
52         Currently, if a protected resource doesn't have a referrer, then any
53         Content Security Policy violations send a report that doesn't contain
54         a referrer attribute. It's arguably friendlier to developers to include
55         an explicitly empty attribute.
56
57         This new behavior is covered by updates to existing test expectations
58         around the reporting functionality.
59
60         * page/ContentSecurityPolicy.cpp:
61         (WebCore::ContentSecurityPolicy::reportViolation):
62             Drop the 'if', and always write out a referrer.
63
64 2012-09-20  David Barton  <dbarton@mathscribe.com>
65
66         [MathML] Increase visual space around fraction parts, italic variables, and operators
67         https://bugs.webkit.org/show_bug.cgi?id=97228
68
69         Reviewed by Eric Seidel.
70
71         This makes MathML more readable, and more in agreement with Firefox and TeX.
72
73         Tested by existing tests.
74
75         * css/mathml.css:
76         (mfrac > :first-child):
77         (mfrac > :last-child):
78         (mfrac):
79         (mi):
80         (msub > mi:first-child, msubsup > mi:first-child):
81             - Subscripts don't need to move right after an italic <mi>.
82         (msubsup > mi:first-child + * + *):
83             - Superscripts do need to move right after an italic <mi>.
84         (math > mo, mrow > mo, msqrt > mo, mtd > mo):
85             - These are ok values for now. It will be better to use different values for different operators, as the FIXME says.
86         (math > mo:last-child, mrow > mo:last-child, msqrt > mo:last-child, mtd > mo:last-child):
87             - Prefix and postfix operators, including fences, generally get less spacing than infix operators.
88         
89         * rendering/mathml/RenderMathMLFenced.cpp:
90         (WebCore::RenderMathMLFenced::createMathMLOperator):
91             - Usually the separator is a comma or semicolon, so we only put space after it for now.
92         (WebCore::RenderMathMLFenced::makeFences):
93         (WebCore::RenderMathMLFenced::addChild):
94         (WebCore::RenderMathMLFenced::styleDidChange):
95         * rendering/mathml/RenderMathMLFenced.h:
96         (RenderMathMLFenced):
97         
98         * rendering/mathml/RenderMathMLFraction.cpp:
99         (WebCore):
100         (WebCore::RenderMathMLFraction::updateFromElement):
101             - gDenominatorPad is now handled by mathml.css.
102         
103         * rendering/mathml/RenderMathMLSubSup.cpp:
104         (WebCore):
105         (WebCore::RenderMathMLSubSup::fixScriptsStyle):
106             - gSubsupScriptMargin is now handled by mathml.css.
107
108 2012-09-20  Tommy Widenflycht  <tommyw@google.com>
109
110         MediaStream API: Extend UserMediaRequest with a ownerDocument method
111         https://bugs.webkit.org/show_bug.cgi?id=97095
112
113         Reviewed by Adam Barth.
114
115         Chromium need to know exactly which frame called getUserMedia so that it can
116         clean away the stream when the frame goes away.
117         Since that information is available in webkit add an accessor method.
118
119         Chromium mock class extended to test the added method.
120
121         * Modules/mediastream/UserMediaRequest.cpp:
122         (WebCore::UserMediaRequest::ownerDocument):
123         (WebCore):
124         * Modules/mediastream/UserMediaRequest.h:
125         (WebCore):
126         (UserMediaRequest):
127
128 2012-09-20  Levi Weintraub  <leviw@chromium.org>
129
130         Prevent reading stale data from InlineTextBoxes
131         https://bugs.webkit.org/show_bug.cgi?id=94750
132
133         Reviewed by Eric Seidel.
134
135         Text from dirty InlineTextBoxes should never be read or used. This change enforces this
136         design goal by forcefully zero-ing out the start and length of InlineTextBoxes when 
137         they're being marked dirty. It also adds asserts to accessors for those members.
138
139         This change involves making markDirty virtual. Running the line-layout performance test
140         as well as profiling resizing the html5 spec showed negligable impact with this change.
141
142         No new tests as this doesn't change any proper behavior.
143
144         * rendering/InlineBox.h:
145         (WebCore::InlineBox::markDirty): Making virtual to allow InlineTextBox to overload and
146         zero out its start and length.
147         * rendering/InlineTextBox.cpp:
148         (WebCore::InlineTextBox::markDirty): Zeroing out start and length when we mark the box dirty.
149         * rendering/InlineTextBox.h:
150         (WebCore::InlineTextBox::start): Adding an assert when we hit this case.
151         (WebCore::InlineTextBox::end): Ditto.
152         (WebCore::InlineTextBox::len): Ditto.
153         (WebCore::InlineTextBox::offsetRun): Ditto.
154
155 2012-09-20  Mike West  <mkwst@chromium.org>
156
157         Support paths in Content Security Policy directives.
158         https://bugs.webkit.org/show_bug.cgi?id=89750
159
160         Reviewed by Adam Barth.
161
162         In CSP 1.0, paths are simply ignored: 'script-src
163         http://example.com/path/to/a/file' would allow script to be loaded from
164         http://example.com/path/to/a/file/javascript.js, but also from
165         http://example.com/javascript.js.
166
167         This patch is an experimental implementation of more granular path
168         support in CSP source lists as proposed in the current editor's draft of
169         CSP 1.1. Paths are treated as specifying directories in which resources
170         can be found, and are implicitly terminated with a '/': in other words,
171         'script-src http://a.com/path' is the same as
172         'script-src http://a.com/path/'. Moreover, paths cannot contain either
173         '?' or '#' characters.
174
175         This is implemented outside the CSP_NEXT flag. All ports will be
176         effected.
177
178         Spec: https://dvcs.w3.org/hg/content-security-policy/raw-file/tip/csp-specification.dev.html#matching
179
180         Tests: http/tests/security/contentSecurityPolicy/source-list-parsing-paths-01.html
181                http/tests/security/contentSecurityPolicy/source-list-parsing-paths-02.html
182
183         * page/ContentSecurityPolicy.cpp:
184         (WebCore::CSPSource::CSPSource):
185             Store a path along with each CSP source.
186         (WebCore::CSPSource::matches):
187             Check the path when comparing a URL to the source.
188         (WebCore::CSPSource::pathMatches):
189             Compare the URL-decoded version of the resource to validate against
190             the source's stored path. If the resource's path begins with the
191             stored path, then it matches! If not, it doesn't.
192         (CSPSource):
193             Store a path along with each CSP source.
194         (WebCore::CSPSourceList::parse):
195             Pass a 'path' in when creating CSPSource objects.
196         (WebCore::CSPSourceList::parsePath):
197             Actually parse the path, flagging errors if '?' or '#' are present,
198             URL-decoding the result, and ensuring that a terminal '/' is
199             added if necessary.
200         (WebCore::CSPSourceList::addSourceSelf):
201             Ensure that 'self' sources have an empty path.
202         * page/ContentSecurityPolicy.h:
203             Dropping the "ignored path component" console warning.
204
205 2012-09-20  Joanmarie Diggs  <jdiggs@igalia.com>
206
207         [GTK] ControlsPanel string is not localized in LocalizedStringsGtk
208         https://bugs.webkit.org/show_bug.cgi?id=96502
209
210         Reviewed by Chris Fleizach.
211
212         Adds the ControlsPanel string to the strings localized in LocalizedStringsGtk.
213
214         Test: platform/gtk/accessibility/media-controls-panel-title.html
215
216         * platform/gtk/LocalizedStringsGtk.cpp:
217         (WebCore::localizedMediaControlElementString):
218
219 2012-09-20  Julien Chaffraix  <jchaffraix@webkit.org>
220
221         Remove isStartColumn in the border collapsing code
222         https://bugs.webkit.org/show_bug.cgi?id=97024
223
224         Reviewed by Abhishek Arya.
225
226         isStartColumn is embedding the same information as prevCell. As we need to compute it
227         in most of the cases, we may as well just reuse them.
228
229         While touching this code, I cleaned up the code by removing some unneeded checks and renaming
230         some variables in preparation for bug 79272.
231
232         Refactoring covered by existing collapsing borders tests.
233
234         * rendering/RenderTableCell.cpp:
235         (WebCore::RenderTableCell::computeCollapsedStartBorder):
236         Removed |isStartColumn|.
237
238         (WebCore::RenderTableCell::computeCollapsedEndBorder):
239         Added a comment about why |isEndColumn| is needed. Also cleaned up this code to be
240         consistent with computeCollapsedStartBorder.
241
242 2012-09-20  Andrey Adaikin  <aandrey@chromium.org>
243
244         Web Inspector: setPropertyValue does not work for non-finite numbers
245         https://bugs.webkit.org/show_bug.cgi?id=97016
246
247         Reviewed by Vsevolod Vlasov.
248
249         Fix: setting a property to NaN, Infinity or -Infinity numbers did not work.
250
251         * inspector/front-end/RemoteObject.js:
252         (WebInspector.RemoteObject.prototype.setPropertyValue):
253
254 2012-09-20  Otto Derek Cheung  <otcheung@rim.com>
255
256         Web Inspector: Cookie info in Network Resources Cookies tab are incorrect
257         https://bugs.webkit.org/show_bug.cgi?id=95491
258
259         Reviewed by Vsevolod Vlasov.
260
261         Web Inspector: Cookie info in Network Resources Cookies tab are incorrect
262         https://bugs.webkit.org/show_bug.cgi?id=95491
263
264         Fixing a typo that causes cookies to appear as a "Session"
265         cookie in the Networking panel because it can never find a properly named
266         "expired" header.
267
268         This bug exposes another bug where the cookie GMT strings are inproperly
269         parsed, causing an "invalid date" error to show up in the cookies tab in 
270         the Networking panel.
271
272         Also changed test expectations in LayoutTests/inspector/cookie-parser-expected.txt
273
274         * inspector/front-end/CookieParser.js:
275         (WebInspector.Cookie.prototype.get session):
276
277 2012-09-20  Alexander Pavlov  <apavlov@chromium.org>
278
279         Web Inspector: [Elements] Word wrap disablement in the DOM tree broken
280         https://bugs.webkit.org/show_bug.cgi?id=97185
281
282         Reviewed by Pavel Feldman.
283
284         Restored the effective "white-space: nowrap" for the tree elements.
285
286         * inspector/front-end/inspector.css:
287         (.nowrap):
288
289 2012-09-20  Allan Sandfeld Jensen  <allan.jensen@nokia.com>
290
291         [TouchAdjustment] Simplify and improve hybrid distance function.
292         https://bugs.webkit.org/show_bug.cgi?id=96519
293
294         Reviewed by Antonio Gomes.
295
296         The current distance function is a combination of two functions. One measuring the distance from
297         the hot-spot in the touch-area to the centerline of the target, and one measuring how much of the
298         target is covered.
299
300         The distance to the center-line was used instead of just the distance to the target, to make it
301         easier to hit small targets near big targets. The very same feature is however also the reason
302         measuring how much the target is covered is added. Using the distance to center-line is therefore
303         redundant now, and can be replaced with the simpler 'distance the hot-spot needs to be adjusted'.
304
305         Tested by existing touchadjustment tests.
306
307         * page/TouchAdjustment.cpp:
308         (TouchAdjustment):
309         (WebCore::TouchAdjustment::hybridDistanceFunction):
310         * platform/graphics/IntRect.cpp:
311         * platform/graphics/IntRect.h:
312         (IntRect):
313
314 2012-09-20  Yoshifumi Inoue  <yosin@chromium.org>
315
316         [Forms] HTMLSelectElement should call formStateDidChange on both menulist and lisbox mode
317         https://bugs.webkit.org/show_bug.cgi?id=97177
318
319         Reviewed by Kent Tamura.
320
321         This patch makes listbox mode select element to call formStateDidChange()
322         when selected options are changed.
323
324         For this change, this patch moves notifyFormStateChanged() to
325         HTMLFormControlElementWithState class from HTMLTextFormControlElement
326         for sharing code HTMLSelectElement class and HTMLInputElement/HTMLTextAreaElement
327         derived from HTMLTextFormControlElement.
328
329         No new tests. We can't test this change in WebKit test tools. Test script
330         will be implemented in Chromium side.
331
332         * html/HTMLFormControlElementWithState.cpp:
333         (WebCore::HTMLFormControlElementWithState::notifyFormStateChanged):
334         (WebCore):
335         * html/HTMLFormControlElementWithState.h: Moved a declaration of notifyFormStateChanged() from HTMLTextFormControlElement.
336         (HTMLFormControlElementWithState): Moved an implemented of notifyFormStateChanged() from HTMLTextFormControlElement.
337         * html/HTMLSelectElement.cpp:
338         (WebCore::HTMLSelectElement::selectOption): Changed to call notifyFormStateChanged() instead of formStateDidChange().
339         (WebCore::HTMLSelectElement::updateListBoxSelection): Changed to call notifyFormStateChanged().
340         * html/HTMLTextFormControlElement.cpp: Moved an implemented of notifyFormStateChanged() to HTMLFormControlElementWithState class.
341         * html/HTMLTextFormControlElement.h: Moved a declaration of notifyFormStateChanged() to HTMLFormControlElementWithState class.
342
343 2012-09-20  Keishi Hattori  <keishi@webkit.org>
344
345         REGRESSION(r127727): Can't navigate between months with arrow keys in calendar picker
346         https://bugs.webkit.org/show_bug.cgi?id=97166
347
348         Reviewed by Kent Tamura.
349
350         Fixing bug in r127727 so arrow keys work properly.
351
352         Test: fast/forms/date/calendar-picker-key-operations.html
353
354         * Resources/pagepopups/calendarPicker.js:
355         (DaysTable.prototype._maybeSetPreviousMonth):
356         (DaysTable.prototype._maybeSetNextMonth):
357
358 2012-09-18  Alexander Pavlov  <apavlov@chromium.org>
359
360         Web Inspector: Use and process the actual ScriptId in the protocol EventListener object
361         https://bugs.webkit.org/show_bug.cgi?id=93271
362
363         Reviewed by Yury Semikhatsky.
364
365         - Use the actual script identifier in the "location" object's "scriptId" field
366           for the DOM.EventListener protocol type, but send the script URL in the new "sourceName" field.
367         - Use 0-based lines in the "location" object's "lineNumber" field for linkifyRawLocation() to work correctly.
368         - Fixed formatting of links to listener locations to contain "(program)" rather than empty string.
369
370         * bindings/js/ScriptEventListener.cpp:
371         (WebCore::eventListenerHandlerLocation):
372         * bindings/js/ScriptEventListener.h:
373         (WebCore):
374         * bindings/v8/ScriptEventListener.cpp:
375         (WebCore::eventListenerHandlerLocation):
376         * bindings/v8/ScriptEventListener.h:
377         (WebCore):
378         * inspector/Inspector.json:
379         * inspector/InspectorDOMAgent.cpp:
380         (WebCore::InspectorDOMAgent::buildObjectForEventListener):
381         * inspector/front-end/BreakpointsSidebarPane.js:
382         * inspector/front-end/EventListenersSidebarPane.js:
383         * inspector/front-end/Linkifier.js:
384         (WebInspector.Linkifier.DefaultFormatter.prototype.formatLiveAnchor):
385         * inspector/front-end/ResourceUtils.js:
386         (WebInspector.formatLinkText): Use "(program)" if URL is empty.
387
388 2012-09-19  Dan Bernstein  <mitz@apple.com>
389
390         WebCore part of adding a setting and API for disabling screen font substitution
391         https://bugs.webkit.org/show_bug.cgi?id=97168
392
393         Reviewed by Tim Horton.
394
395         * WebCore.exp.in: Added an entry for Settings::setScreenFontSubstitutionEnabled.
396         * css/StyleResolver.cpp:
397         (WebCore::StyleResolver::collectMatchingRulesForList): Changed to use printer fonts if
398         screen font substitution is not enabled.
399         * page/Settings.cpp:
400         (WebCore::Settings::Settings): Added initializer for new m_screenFontSubstitutionEnabled
401         member variable. The initial value is true, matching existing behavior.
402         (WebCore::Settings::setScreenFontSubstitutionEnabled): Added this setter, which updated the
403         member variable and forces a style recalc in all pages using this Settings.
404         * page/Settings.h:
405         (Settings): Added m_screenFontSubstitutionEnabled boolean member variable.
406         (WebCore::Settings::screenFontSubstitutionEnabled): Added this getter.
407
408 2012-09-19  Yoshifumi Inoue  <yosin@chromium.org>
409
410         [Forms] multiple fields time input UI should call notifyFormStateChanged() when value of field is changed
411         https://bugs.webkit.org/show_bug.cgi?id=97169
412
413         Reviewed by Kent Tamura.
414
415         This patch makes multiple fields time input UI calls notifyFormStateChanged()
416         when field value is changed as other input types do.
417
418         This patch affects ports which enable both ENABLE_INPUT_TYPE_TIME and
419         ENABLE_INPUT_TYPE_TIME_MULTIPLE_FIELDS.
420
421         No new tests. We can't test this change in WebKit test tools. Test script
422         will be implemented in Chromium side.
423
424         * html/TimeInputType.cpp:
425         (WebCore::TimeInputType::DateTimeEditControlOwnerImpl::editControlValueChanged):
426
427 2012-09-19  Keishi Hattori  <keishi@webkit.org>
428
429         REGRESSION(r127727): Calendar picker focus ring should be hidden until key event
430         https://bugs.webkit.org/show_bug.cgi?id=97165
431
432         Reviewed by Kent Tamura.
433
434         The regression was caused because NoFocusRing class was being removed
435         from then main element inside resetMain().
436
437         No new tests. Covered by calendar-picker-appearance.html.
438
439         * Resources/pagepopups/calendarPicker.js:
440         (initialize):
441         (CalendarPicker):
442         (CalendarPicker.prototype._layout):
443         (DaysTable.prototype._handleKey):
444         (CalendarPicker.prototype._handleBodyKeyDown):
445         (CalendarPicker.prototype.maybeUpdateFocusStyle): Make this a method of CalendarPicker because we don't use it for other pickers.
446
447 2012-09-19  David Grogan  <dgrogan@chromium.org>
448
449         IndexedDB: Print console warning about setVersion
450         https://bugs.webkit.org/show_bug.cgi?id=96575
451
452         Reviewed by Tony Chang.
453
454         setVersion has been out of the spec for almost a year but there are
455         still a lot of users.
456
457         We show the warning once per database object as an approximation for
458         once per page.
459
460         No new tests, but 150-something rebaselines.
461
462         * Modules/indexeddb/IDBDatabase.cpp:
463         (WebCore::IDBDatabase::IDBDatabase):
464         (WebCore::IDBDatabase::setVersion):
465         * Modules/indexeddb/IDBDatabase.h:
466         (IDBDatabase):
467
468 2012-09-19  Sean Wang  <Xuewen.Wang@torchmobile.com.cn>
469
470         [BlackBerry] Basic authentication challenge credentials for stored credentials again after restarting browser
471         https://bugs.webkit.org/show_bug.cgi?id=96362
472
473         Reviewed by Rob Buis.
474
475         This patch enable reading credentials from the persistent credential storage
476         when it is not private browsing mode and there is not a credential in the RAM
477         for the requested resource.
478
479         Since we don't load persistent stored credentials into RAM at the starting time,
480         even we have saved the credentials at the last browsing, after restarting the browser,
481         it will still challenge for credentials for the requesting resources.
482
483         No new tests, it uses the original authentication tests. There is no way to
484         clear all credentials or restarting browsers to test this feature.
485
486         * platform/network/blackberry/CredentialBackingStore.cpp:
487         (WebCore::CredentialBackingStore::getProtectionSpace):
488         (WebCore):
489         * platform/network/blackberry/CredentialBackingStore.h:
490         (CredentialBackingStore):
491         * platform/network/blackberry/NetworkManager.cpp:
492         (WebCore::NetworkManager::startJob):
493
494 2012-09-19  Shinya Kawanaka  <shinyak@chromium.org>
495
496         [Refactoring] ButtonInputType of <input> element should have innerElement to make <input> AuthorShadowDOM-ready
497         https://bugs.webkit.org/show_bug.cgi?id=95939
498
499         Reviewed by Dimitri Glazkov.
500
501         We had 2 ways to show text in RenderButton. One is to use RenderButton::setText() and the other is to add renderer
502         as a child of RenderButton. <input type="button"> used the former one, and <button> used the latter one.
503         The former makes RenderButton a bit messy, and also prevents from making <input> AuthorShadowDOM ready.
504
505         So we remove RenderButton::setText() and refactor <input type="button"> to use a Shadow DOM to show text.
506
507         Since the text in <input type="button"> should create RenderTextFragment, we introduce TextForButtonInputType
508         class. RenderText will allow us to select the inner text of <input>, but it should not.
509
510         No new tests, existing tests should cover the change.
511
512         * html/BaseButtonInputType.cpp:
513         (TextForButtonInputType): Special Text node which creates RenderTextFragment.
514         (WebCore):
515         (WebCore::TextForButtonInputType::create):
516         (WebCore::TextForButtonInputType::TextForButtonInputType):
517         (WebCore::TextForButtonInputType::createRenderer):
518         (WebCore::BaseButtonInputType::BaseButtonInputType):
519         (WebCore::BaseButtonInputType::createShadowSubtree):
520         (WebCore::BaseButtonInputType::destroyShadowSubtree):
521         (WebCore::BaseButtonInputType::valueAttributeChanged): When a button value is changed, we reflect the value to
522         the text node in ShadowDOM.
523         * html/BaseButtonInputType.h:
524         (BaseButtonInputType):
525         * html/FileInputType.cpp:
526         (WebCore::UploadButtonElement::create): Creates Shadow DOM subtree.
527         (WebCore::UploadButtonElement::createForMultiple): Creates Shadow DOM subtree.
528         * html/HTMLInputElement.cpp:
529         (WebCore::HTMLInputElement::parseAttribute):
530         * html/InputType.cpp:
531         (WebCore::InputType::valueAttributeChanged):
532         (WebCore):
533         * html/InputType.h:
534         (InputType):
535         * rendering/RenderButton.cpp:
536         (WebCore::RenderButton::RenderButton):
537         (WebCore::RenderButton::styleDidChange): Removed unnecessary text related code.
538         * rendering/RenderButton.h:
539         (RenderButton):
540
541 2012-09-19  Jason Liu  <jason.liu@torchmobile.com.cn>
542
543         [BlackBerry] Get infinite amount of requests after attempting re-authentication basic.
544         https://bugs.webkit.org/show_bug.cgi?id=96994
545
546         Reviewed by Rob Buis.
547
548         We should remove the wrong credentials before calling sendRequestWithCredentials again.
549         #PR 200226
550         Reviewed internally by Jonathan Dong.
551
552         No new tests. It is covered by ManualTests/blackberry/http-auth-challenge.html.
553
554
555         * platform/network/blackberry/NetworkJob.cpp:
556         (WebCore::NetworkJob::notifyAuthReceived):
557
558 2012-09-19  Adam Barth  <abarth@webkit.org>
559
560         Remove Blob.webkitSlice
561         https://bugs.webkit.org/show_bug.cgi?id=96715
562
563         Reviewed by Darin Fisher.
564
565         Based on these usage metrics, it appears that it is safe to remove
566         Blob.webkitSlice. Folks that were previously calling webkitSlice should
567         just call slice instead. They do the same thing.
568
569         Ratio of Blob.webkitSlice calls to Blob.slice: 14.87%
570         Ratio of Blob.webkitSlice calls to Document creation: 0.0053%
571
572         * fileapi/Blob.cpp:
573         (WebCore::Blob::slice):
574         * fileapi/Blob.h:
575         (Blob):
576         * fileapi/Blob.idl:
577         * fileapi/File.h:
578         (File):
579         * inspector/front-end/FileUtils.js:
580         (WebInspector.ChunkedFileReader.prototype._loadChunk):
581
582 2012-09-19  Julien Chaffraix  <jchaffraix@webkit.org>
583
584         The collapsing border code needs direction-aware border getters
585         https://bugs.webkit.org/show_bug.cgi?id=96710
586
587         Reviewed by Ojan Vafai.
588
589         This refactoring is needed to extend our collapsing border support for mixed directionality
590         at the table cell level (we currently wrongly ignore any direction below the row-group). For
591         now, the new helpers are dumb and return exactly the old result but they will be made
592         direction-aware in a follow-up change.
593
594         Refactoring covered by existing tests.
595
596         * rendering/RenderBox.h:
597         (WebCore::RenderBox::hasSameDirectionAs):
598         Added this helper function. For now, it's only used to compare against
599         the table direction but we will reuse it to compare the current cell
600         direction against the other table parts.
601
602         * rendering/RenderTableCell.h:
603         (WebCore::RenderTableCell::computeCollapsedStartBorder):
604         (WebCore::RenderTableCell::computeCollapsedEndBorder):
605         Transitioned those 2 functions to using the new direction-aware functions.
606
607         * rendering/RenderTable.cpp:
608         (WebCore::RenderTable::tableStartBorderAdjoiningCell):
609         (WebCore::RenderTable::tableEndBorderAdjoiningCell):
610         * rendering/RenderTableSection.cpp:
611         (WebCore::RenderTableSection::firstRowCellAdjoiningTableStart):
612         (WebCore::RenderTableSection::firstRowCellAdjoiningTableEnd):
613         * rendering/RenderTableCell.h:
614         (WebCore::RenderTableCell::borderAdjoiningTableStart):
615         (WebCore::RenderTableCell::borderAdjoiningTableEnd):
616         * rendering/RenderTableSection.h:
617         (WebCore::RenderTableSection::borderAdjoiningTableStart):
618         (WebCore::RenderTableSection::borderAdjoiningTableEnd):
619         Updated those call sites to use RenderBox::hasSameDirectionAs.
620
621         * rendering/RenderTableCell.h:
622         (WebCore::RenderTableCell::borderAdjoiningNextCell):
623         (WebCore::RenderTableCell::borderAdjoiningPreviousCell):
624         * rendering/RenderTableCol.cpp:
625         (WebCore::RenderTableCol::borderAdjoiningCellStartBorder):
626         (WebCore::RenderTableCol::borderAdjoiningCellEndBorder):
627         (WebCore::RenderTableCol::borderAdjoiningCellBefore):
628         (WebCore::RenderTableCol::borderAdjoiningCellAfter):
629         * rendering/RenderTableCol.h:
630         * rendering/RenderTableRow.cpp:
631         (WebCore::RenderTableRow::borderAdjoiningStartCell):
632         (WebCore::RenderTableRow::borderAdjoiningEndCell):
633         * rendering/RenderTableRow.h:
634         (WebCore::RenderTableRow::borderAdjoiningTableStart):
635         (WebCore::RenderTableRow::borderAdjoiningTableEnd):
636         * rendering/RenderTableSection.cpp:
637         (WebCore::RenderTableSection::borderAdjoiningStartCell):
638         (WebCore::RenderTableSection::borderAdjoiningEndCell):
639         New direction-aware functions. Added some ASSERT to ensure
640         we don't call them with the wrong parameters.
641
642 2012-09-19  Kentaro Hara  <haraken@chromium.org>
643
644         [V8] ScriptController::compileAndRunScript() can crash
645         https://bugs.webkit.org/show_bug.cgi?id=96567
646
647         Reviewed by Adam Barth.
648
649         See chromium bug: http://code.google.com/p/chromium/issues/detail?id=146776
650
651         The root cause is that v8::PreCompile() can return 0 when the stack of
652         V8's parser overflows (c.f. http://code.google.com/codesearch#OAMlx_jo-ck/src/v8/src/parser.cc&exact_package=chromium&q=kPreParseStackOverflow&type=cs&l=6021).
653
654         This patch adds the 0 check to the caller side. Given that precompileScript()
655         is just trying to speculatively precompile a script, it's OK to give up
656         precompiling for such edge cases.
657
658         Manually tested with the html generated by the following shell script:
659
660           echo '<script language="JavaScript" type="text/javascript" src="asan-crash.js"></script>' > asan-crash.html
661           echo 'if(wURLF.search("")>=0) {}' > asan-crash.js
662           for i in `seq 14830`
663           do
664             echo 'else if(wURLF.search("")>=0) {}' >> asan-crash.js
665           done
666
667         I didn't add the test because '14380' depends on an environment
668         and because we don't want to add a huge html test.
669
670         * bindings/v8/ScriptSourceCode.cpp:
671         (WebCore::ScriptSourceCode::precompileScript):
672
673 2012-09-19  Joshua Bell  <jsbell@chromium.org>
674
675         IndexedDB: Pending call cleanup
676         https://bugs.webkit.org/show_bug.cgi?id=96952
677
678         Reviewed by Tony Chang.
679
680         Replace RefPtr usage with OwnPtr for PendingXXXCalls (since they're never referenced twice)
681         and replace queue of "second half open" calls with a single item.
682
683         No new tests - no functional changes.
684
685         * Modules/indexeddb/IDBDatabaseBackendImpl.cpp:
686         (WebCore::IDBDatabaseBackendImpl::PendingOpenCall::create):
687         (WebCore::IDBDatabaseBackendImpl::PendingOpenWithVersionCall::create):
688         (WebCore::IDBDatabaseBackendImpl::PendingDeleteCall::create):
689         (WebCore::IDBDatabaseBackendImpl::PendingSetVersionCall::create):
690         (WebCore::IDBDatabaseBackendImpl::setVersion):
691         (WebCore::IDBDatabaseBackendImpl::transactionFinishedAndAbortFired):
692         (WebCore::IDBDatabaseBackendImpl::processPendingCalls):
693         (WebCore::IDBDatabaseBackendImpl::runIntVersionChangeTransaction):
694         (WebCore::IDBDatabaseBackendImpl::close):
695         * Modules/indexeddb/IDBDatabaseBackendImpl.h:
696         (IDBDatabaseBackendImpl):
697
698 2012-09-19  Kenichi Ishibashi  <bashi@chromium.org>
699
700         [Chromium] Improve glyph positioning of HarfBuzzShaper
701         https://bugs.webkit.org/show_bug.cgi?id=97093
702
703         Reviewed by Tony Chang.
704
705         For proper positioning, HarfBuzzShaper requires the positions(offsets and advance)
706         of the previous glyph. This mean we need to shape all HarfBuzzRuns before glyph positioning.
707         Collect and shape HarfBuzzRuns, then set positions of glyphs.
708
709         No new tests. Tests that uses spacing for complex text (e.g. fast/text/atsui-negative-spacing-features.html)
710         should close in the expectations. (not the identical, maybe there are subtle differences between
711         harfbuzz old and harfbuzz ng)
712
713         * platform/graphics/harfbuzz/ng/HarfBuzzShaper.cpp:
714         (WebCore::HarfBuzzShaper::HarfBuzzRun::applyShapeResult): Allocate m_offsets.
715         (WebCore::HarfBuzzShaper::HarfBuzzRun::setGlyphAndPositions): Renamed and set offset too.
716         (WebCore::HarfBuzzShaper::HarfBuzzRun::characterIndexForXPosition):
717         (WebCore::HarfBuzzShaper::shape): Call fillGlyphBuffer() if we need to fill glyphBuffer.
718         (WebCore::HarfBuzzShaper::shapeHarfBuzzRuns): Removed glyph positioning code.
719         (WebCore::HarfBuzzShaper::setGlyphPositionsForHarfBuzzRun): Ditto.
720         (WebCore::HarfBuzzShaper::fillGlyphBufferFromHarfBuzzRun): Added.
721         (WebCore):
722         (WebCore::HarfBuzzShaper::fillGlyphBuffer): Added.
723         * platform/graphics/harfbuzz/ng/HarfBuzzShaper.h:
724         (HarfBuzzRun):
725         (WebCore::HarfBuzzShaper::HarfBuzzRun::offsets): Added.
726         (WebCore::HarfBuzzShaper::HarfBuzzRun::glyphToCharacterIndexes): Added.
727         (HarfBuzzShaper):
728
729 2012-09-19  James Simonsen  <simonjam@chromium.org>
730
731         [Chromium] Disable resource load scheduling
732         https://bugs.webkit.org/show_bug.cgi?id=97131
733
734         Reviewed by Nate Chapin.
735
736         We'll use Chrome's network stack for scheduling instead.
737
738         No new tests.
739
740         * loader/ResourceLoadScheduler.cpp:
741         * loader/cache/CachedResourceLoader.cpp:
742         (WebCore::CachedResourceLoader::preload):
743
744 2012-09-19  Dan Bernstein  <mitz@apple.com>
745
746         When kerning is enabled, word spacing is doubly accounted for in RenderText::computePreferredLogicalWidths
747         https://bugs.webkit.org/show_bug.cgi?id=97146
748
749         Reviewed by Anders Carlsson.
750
751         Test: fast/text/word-space-with-kerning.html
752
753         * rendering/RenderText.cpp:
754         (WebCore::RenderText::computePreferredLogicalWidths): When kerning is enabled, words are
755         measured with their trailing space, if there is one, then the width of a space is subtracted.
756         Changed that width, stored in the local variable wordTrailingSpaceWidth, to include the
757         word spacing, since it is included in the result of widthFromCache().
758
759 2012-09-19  Joshua Bell  <jsbell@chromium.org>
760
761         IndexedDB: Remove "current transaction" concept from backing store
762         https://bugs.webkit.org/show_bug.cgi?id=96663
763
764         Reviewed by Tony Chang.
765
766         IndexedDB should allow multiple transactions to run in parallel within and
767         across databases within an origin. As an initial step to enabling this, the
768         backing store should not hold a "current transaction" - instead, operations
769         should be done relative to a transaction managed by the database.
770
771         No new tests - no functional changes.
772
773         * Modules/indexeddb/IDBBackingStore.h:
774         (IDBBackingStore):
775         * Modules/indexeddb/IDBDatabaseBackendImpl.cpp:
776         (WebCore::IDBDatabaseBackendImpl::createObjectStoreInternal):
777         (WebCore::IDBDatabaseBackendImpl::deleteObjectStoreInternal):
778         (WebCore::IDBDatabaseBackendImpl::setVersionInternal):
779         (WebCore::IDBDatabaseBackendImpl::setIntVersionInternal):
780         * Modules/indexeddb/IDBDatabaseBackendImpl.h:
781         (IDBDatabaseBackendImpl):
782         * Modules/indexeddb/IDBIndexBackendImpl.cpp:
783         (WebCore::IDBIndexBackendImpl::openCursorInternal):
784         (WebCore::IDBIndexBackendImpl::countInternal):
785         (WebCore::IDBIndexBackendImpl::count):
786         (WebCore::IDBIndexBackendImpl::getInternal):
787         (WebCore::IDBIndexBackendImpl::getKeyInternal):
788         (WebCore::IDBIndexBackendImpl::get):
789         (WebCore::IDBIndexBackendImpl::getKey):
790         * Modules/indexeddb/IDBIndexBackendImpl.h:
791         (IDBIndexBackendImpl):
792         * Modules/indexeddb/IDBLevelDBBackingStore.cpp:
793         (WebCore::IDBLevelDBBackingStore::updateIDBDatabaseIntVersion):
794         (WebCore::IDBLevelDBBackingStore::updateIDBDatabaseMetaData):
795         (WebCore::IDBLevelDBBackingStore::createObjectStore):
796         (WebCore::IDBLevelDBBackingStore::deleteObjectStore):
797         (WebCore::IDBLevelDBBackingStore::getObjectStoreRecord):
798         (WebCore):
799         (WebCore::IDBLevelDBBackingStore::putObjectStoreRecord):
800         (WebCore::IDBLevelDBBackingStore::clearObjectStore):
801         (WebCore::IDBLevelDBBackingStore::deleteObjectStoreRecord):
802         (WebCore::IDBLevelDBBackingStore::getKeyGeneratorCurrentNumber):
803         (WebCore::IDBLevelDBBackingStore::maybeUpdateKeyGeneratorCurrentNumber):
804         (WebCore::IDBLevelDBBackingStore::keyExistsInObjectStore):
805         (WebCore::IDBLevelDBBackingStore::forEachObjectStoreRecord):
806         (WebCore::IDBLevelDBBackingStore::createIndex):
807         (WebCore::IDBLevelDBBackingStore::deleteIndex):
808         (WebCore::IDBLevelDBBackingStore::putIndexDataForRecord):
809         (WebCore::IDBLevelDBBackingStore::deleteIndexDataForRecord):
810         (WebCore::IDBLevelDBBackingStore::findKeyInIndex):
811         (WebCore::IDBLevelDBBackingStore::getPrimaryKeyViaIndex):
812         (WebCore::IDBLevelDBBackingStore::keyExistsInIndex):
813         (WebCore::IDBLevelDBBackingStore::openObjectStoreCursor):
814         (WebCore::IDBLevelDBBackingStore::openObjectStoreKeyCursor):
815         (WebCore::IDBLevelDBBackingStore::openIndexKeyCursor):
816         (WebCore::IDBLevelDBBackingStore::openIndexCursor):
817         (WebCore::IDBLevelDBBackingStore::Transaction::Transaction):
818         (WebCore::IDBLevelDBBackingStore::Transaction::begin):
819         (WebCore::IDBLevelDBBackingStore::Transaction::commit):
820         (WebCore::IDBLevelDBBackingStore::Transaction::rollback):
821         * Modules/indexeddb/IDBLevelDBBackingStore.h:
822         (IDBLevelDBBackingStore):
823         (WebCore::IDBLevelDBBackingStore::Transaction::levelDBTransaction):
824         (Transaction):
825         (WebCore::IDBLevelDBBackingStore::Transaction::levelDBTransactionFrom):
826         * Modules/indexeddb/IDBObjectStoreBackendImpl.cpp:
827         (WebCore::IDBObjectStoreBackendImpl::get):
828         (WebCore::IDBObjectStoreBackendImpl::getInternal):
829         (WebCore):
830         (WebCore::makeIndexWriters):
831         (WebCore::IDBObjectStoreBackendImpl::setIndexKeys):
832         (WebCore::IDBObjectStoreBackendImpl::putInternal):
833         (WebCore::IDBObjectStoreBackendImpl::deleteFunction):
834         (WebCore::IDBObjectStoreBackendImpl::deleteInternal):
835         (WebCore::IDBObjectStoreBackendImpl::clear):
836         (WebCore::IDBObjectStoreBackendImpl::clearInternal):
837         (WebCore::IDBObjectStoreBackendImpl::createIndexInternal):
838         (WebCore::IDBObjectStoreBackendImpl::deleteIndexInternal):
839         (WebCore::IDBObjectStoreBackendImpl::openCursorInternal):
840         (WebCore::IDBObjectStoreBackendImpl::count):
841         (WebCore::IDBObjectStoreBackendImpl::countInternal):
842         (WebCore::IDBObjectStoreBackendImpl::generateKey):
843         (WebCore::IDBObjectStoreBackendImpl::updateKeyGenerator):
844         * Modules/indexeddb/IDBObjectStoreBackendImpl.h:
845         (IDBObjectStoreBackendImpl):
846
847 2012-09-19  Terry Anderson  <tdanderson@chromium.org>
848
849         [chromium] Store the contents scale factor in PlatformContextSkia on initialization
850         https://bugs.webkit.org/show_bug.cgi?id=96137
851
852         Reviewed by Stephen White.
853
854         When the compositor creates a PlatformContextSkia, the scale on |canvas| will 
855         be equal to the content scale factor (which, without pinch-to-zoom, will be
856         the same as the device scale factor). Set this value as a member on PlatformContextSkia, 
857         which will be used to correctly render glyphs when hinting is used and the device
858         scale factor is not 1.
859
860         Tests: added two new unit tests.
861
862         * platform/graphics/chromium/OpaqueRectTrackingContentLayerDelegate.cpp:
863         (WebCore::OpaqueRectTrackingContentLayerDelegate::paintContents):
864         * platform/graphics/skia/PlatformContextSkia.cpp:
865         (WebCore::PlatformContextSkia::PlatformContextSkia):
866         (WebCore::PlatformContextSkia::setupPaintCommon):
867         * platform/graphics/skia/PlatformContextSkia.h:
868         (PlatformContextSkia):
869         (WebCore::PlatformContextSkia::setHintingScaleFactor):
870         (WebCore::PlatformContextSkia::hintingScaleFactor):
871
872 2012-09-19  Kenichi Ishibashi  <bashi@chromium.org>
873
874         [Chromium] HarfBuzzShaper should take into account combining characters
875         https://bugs.webkit.org/show_bug.cgi?id=97069
876
877         Reviewed by Tony Chang.
878
879         When dividing a text run into HarfBuzzRuns, try to find suitable SimpleFontData for
880         combining character sequence if there are one or more mark characters are followed.
881         If there is no combined glyphs in the font, use fallback font for mark characters.
882
883         No new tests.
884         In platform/chromium-linux/fast/text/international/complex-joining-using-gpos.html,
885         U+0947 (devanagari vowel sign e) should be displayed.
886         In fast/text/wide-zero-width-space.html, &eacute; and e&#0301; should look identical.
887
888         * platform/graphics/harfbuzz/ng/HarfBuzzShaper.cpp:
889         (WebCore):
890         (WebCore::fontDataForCombiningCharacterSequence): Added.
891         (WebCore::HarfBuzzShaper::collectHarfBuzzRuns): See above description.
892
893 2012-09-19  Tony Chang  <tony@chromium.org>
894
895         Remove RenderIFrame::updateLogicalHeight and RenderIFrame::updateLogicalWidth
896         https://bugs.webkit.org/show_bug.cgi?id=97049
897
898         Reviewed by Ojan Vafai.
899
900         This is an incremental step in making updateLogicalHeight non-virtual so it's
901         possible to call computeLogicalHeight on any RenderBox and get the right
902         version of the function.
903
904         The code in RenderIFrame::layout was calling flattenFrame(), which would
905         query it's bounding box size.  Since we hadn't done a layout yet, the size
906         is unknown.  The fix is to only call flattenFrame() after calling
907         updateLogicalWidth and updateLogicalHeight. We can then fixup the size of
908         the iframe.
909
910         No new tests, existing tests in fast/frames/flattening should continue to pass.
911
912         * rendering/RenderIFrame.cpp:
913         (WebCore::RenderIFrame::layout):
914         * rendering/RenderIFrame.h:
915         (RenderIFrame):
916
917 2012-09-19  Joshua Bell  <jsbell@chromium.org>
918
919         IndexedDB: Free up resources used by completed cursors earlier
920         https://bugs.webkit.org/show_bug.cgi?id=97023
921
922         Reviewed by Tony Chang.
923
924         Prior to this patch, IDBCursor objects are kept around by their parent
925         IDBTransaction until the transaction finishes. It's possible to release
926         references to them earlier, when the cursor has been "run to the end",
927         as no further events will fire and all calls to continue() etc should fail.
928
929         This change tells the cursor it's done when "null" finally comes through in
930         the IDBRequest, and the cursor then lets transaction know it can be
931         forgotten.
932
933         The added test doesn't distinguish the new behavior, but does exercise
934         "finished" cursors and apparently we didn't have tests for these before.
935
936         Test: storage/indexeddb/cursor-finished.html
937
938         * Modules/indexeddb/IDBCursor.cpp:
939         (WebCore::IDBCursor::close): Make idempotent; notify transaction.
940         * Modules/indexeddb/IDBRequest.cpp:
941         (WebCore::IDBRequest::onSuccess): Tell cursor it's finished before releasing.
942         * Modules/indexeddb/IDBTransaction.cpp:
943         (WebCore::IDBTransaction::OpenCursorNotifier::~OpenCursorNotifier):
944         (WebCore):
945         (WebCore::IDBTransaction::OpenCursorNotifier::cursorFinished): New method for explicit notification.
946         * Modules/indexeddb/IDBTransaction.h:
947         (OpenCursorNotifier):
948
949 2012-09-19  David Grogan  <dgrogan@chromium.org>
950
951         IndexedDB: fire upgradeneeded even without an explicit integer version
952         https://bugs.webkit.org/show_bug.cgi?id=96444
953
954         Reviewed by Tony Chang.
955
956         Also of note:
957         - New databases now get a default version of 1 instead of
958         the empty string when they are opened.
959         - We now allow databases with an integer version to revert to a string
960         version by calling setVersion.
961
962         Implementation detail: we store both an integer version and string
963         version for a particular database. If both are set we give preference
964         to the integer version and assume the db is on the integer track.
965
966         Test: storage/indexeddb/intversion-two-opens-no-versions.html
967
968         * Modules/indexeddb/IDBDatabaseBackendImpl.cpp:
969         (WebCore):
970         (WebCore::IDBDatabaseBackendImpl::IDBDatabaseBackendImpl):
971         (WebCore::IDBDatabaseBackendImpl::setVersion):
972         (WebCore::IDBDatabaseBackendImpl::setVersionInternal):
973         Now that this can be called even after an int version is set we have
974         to make it revoke the int version.
975
976         (WebCore::IDBDatabaseBackendImpl::openConnection):
977         Nested ifs were getting deep, so refactor to return early instead.
978
979         (WebCore::IDBDatabaseBackendImpl::deleteDatabase):
980         (WebCore::IDBDatabaseBackendImpl::resetVersion):
981         Now that an int version could have been set before setVersion was
982         called we have to reset the int version on abort.
983
984         * Modules/indexeddb/IDBDatabaseBackendImpl.h:
985         (IDBDatabaseBackendImpl):
986         * Modules/indexeddb/IDBLevelDBBackingStore.cpp:
987         (WebCore::IDBLevelDBBackingStore::updateIDBDatabaseIntVersion):
988         * Modules/indexeddb/IDBOpenDBRequest.cpp:
989         0 is now a valid integer version to store to leveldb if an idb
990         database is reverting to a string version.
991
992         (WebCore::IDBOpenDBRequest::onUpgradeNeeded):
993         If the open request did not specify an integer version but
994         upgradeneeded is called, it means the database was given the default
995         version of 1.
996
997 2012-09-19  Dominic Mazzoni  <dmazzoni@google.com>
998
999         AX: A few control types are returning the wrong answer for isReadOnly
1000         https://bugs.webkit.org/show_bug.cgi?id=96735
1001
1002         Reviewed by Chris Fleizach.
1003
1004         All input types should be read-only except ones that
1005         are text fields. The previous logic was marking things like
1006         checkboxes as not read-only.
1007
1008         Tests: platform/chromium/accessibility/readonly.html
1009                platform/mac/accessibility/form-control-value-settable.html
1010
1011         * accessibility/AccessibilityNodeObject.cpp:
1012         (WebCore::AccessibilityNodeObject::isReadOnly):
1013
1014 2012-09-19  Mark Pilgrim  <pilgrim@chromium.org>
1015
1016         [Chromium] Remove unused PlatformSupport reference in V8GCController
1017         https://bugs.webkit.org/show_bug.cgi?id=97118
1018
1019         Reviewed by Ryosuke Niwa.
1020
1021         Part of a refactoring series. See tracking bug 82948.
1022         
1023         * bindings/v8/V8GCController.cpp:
1024
1025 2012-09-19  Mark Pilgrim  <pilgrim@chromium.org>
1026
1027         [Chromium] Remove unused PlatformSupport reference in V8DOMWindowShell
1028         https://bugs.webkit.org/show_bug.cgi?id=97117
1029
1030         Reviewed by Ryosuke Niwa.
1031
1032         Part of a refactoring series. See tracking bug 82948.
1033
1034         * bindings/v8/V8DOMWindowShell.cpp:
1035
1036 2012-09-19  Kentaro Hara  <haraken@chromium.org>
1037
1038         [V8] Remove WorkerContextExecutionProxy::runScript()
1039         https://bugs.webkit.org/show_bug.cgi?id=97060
1040
1041         Reviewed by Adam Barth.
1042
1043         To kill WorkerContextExecutionProxy, this patch removes
1044         WorkerContextExecutionProxy::runScript() by replacing it
1045         with ScriptRunner::runCompiledScript().
1046
1047         For the replacement, this patch moves TryCatch logic in
1048         runCompiledScript() to the caller side. The reason why
1049         we have to avoid nesting TryCatches is a V8 bug:
1050         http://code.google.com/p/v8/issues/detail?id=2166
1051
1052         No tests. No change in behavior.
1053
1054         * bindings/v8/ScriptController.cpp:
1055         (WebCore::ScriptController::compileAndRunScript):
1056         * bindings/v8/ScriptRunner.cpp:
1057         (WebCore::ScriptRunner::runCompiledScript):
1058         * bindings/v8/WorkerContextExecutionProxy.cpp:
1059         (WebCore::WorkerContextExecutionProxy::evaluate):
1060         * bindings/v8/WorkerContextExecutionProxy.h:
1061         (WorkerContextExecutionProxy):
1062
1063 2012-09-19  Rob Buis  <rbuis@rim.com>
1064
1065         [BlackBerry] Fix vertical positioning problem for 'X' in search field
1066         https://bugs.webkit.org/show_bug.cgi?id=97126
1067
1068         Reviewed by Antonio Gomes.
1069
1070         We have the same problem as described in bug 30245, so integrate that code.
1071
1072         * platform/blackberry/RenderThemeBlackBerry.cpp:
1073         (WebCore::RenderThemeBlackBerry::convertToPaintingRect):
1074         (WebCore):
1075         (WebCore::RenderThemeBlackBerry::paintSearchFieldCancelButton):
1076
1077 2012-09-19  Rob Buis  <rbuis@rim.com>
1078
1079         [BlackBerry] Remove custom painting code for searchCancel
1080         https://bugs.webkit.org/show_bug.cgi?id=97119
1081
1082         Reviewed by Antonio Gomes.
1083
1084         Remove the dynamic painting code for searchCancel, we use a png file now.
1085
1086         * platform/graphics/blackberry/ImageBlackBerry.cpp:
1087         (WebCore::Image::loadPlatformResource):
1088
1089 2012-09-19  Mark Pilgrim  <pilgrim@chromium.org>
1090
1091         [Chromium] Move notifyJSOutOfMemory out of PlatformSupport
1092         https://bugs.webkit.org/show_bug.cgi?id=97116
1093
1094         Reviewed by Adam Barth.
1095
1096         Part of a refactoring series. See tracking bug 82948.
1097
1098         * bindings/v8/V8Binding.cpp:
1099         (WebCore::handleOutOfMemory):
1100         * loader/FrameLoaderClient.h:
1101         (WebCore::FrameLoaderClient::didExhaustMemoryAvailableForScript):
1102         (FrameLoaderClient):
1103         * platform/chromium/PlatformSupport.h:
1104         (PlatformSupport):
1105
1106 2012-09-18  Dirk Schulze  <krit@webkit.org>
1107
1108         Implement 'mask-type' for <mask>
1109         https://bugs.webkit.org/show_bug.cgi?id=97011
1110
1111         Reviewed by Andreas Kling.
1112
1113         The CSS Masking specification defines the presentation attribute 'mask-type' to
1114         switch between luminance and alpha masking. 'mask-type' just affects the SVG
1115         mask element. The luminance masking is the current behavior of of SVG masking.
1116         Alpha masking is simular to '-webkit-mask-image'.
1117
1118         This patch implements this property and make it possible to switch between both
1119         masking modes. Since the default value is 'luminance', this does not break
1120         exisiting content which is tested with exisiting tests.
1121
1122         http://dvcs.w3.org/hg/FXTF/raw-file/tip/masking/index.html#the-mask-type
1123
1124         Tests: svg/css/mask-type.html
1125                svg/masking/mask-type-alpha-expected.svg
1126                svg/masking/mask-type-alpha.svg
1127                svg/masking/mask-type-luminance-expected.svg
1128                svg/masking/mask-type-luminance.svg
1129                svg/masking/mask-type-not-set-expected.svg
1130                svg/masking/mask-type-not-set.svg
1131
1132         * css/CSSComputedStyleDeclaration.cpp: Add mask-type property.
1133         (WebCore):
1134         (WebCore::CSSComputedStyleDeclaration::getPropertyCSSValue):
1135         * css/CSSPrimitiveValueMappings.h:
1136         (WebCore::CSSPrimitiveValue::CSSPrimitiveValue):
1137         (WebCore):
1138         (WebCore::CSSPrimitiveValue::operator EMaskType):
1139         * css/CSSProperty.cpp:
1140         (WebCore::CSSProperty::isInheritedProperty):
1141         * css/SVGCSSComputedStyleDeclaration.cpp:
1142         (WebCore::CSSComputedStyleDeclaration::getSVGPropertyCSSValue):
1143         * css/SVGCSSParser.cpp:
1144         (WebCore::CSSParser::parseSVGValue):
1145         * css/SVGCSSPropertyNames.in: Add mask-type.
1146         * css/SVGCSSStyleSelector.cpp:
1147         (WebCore::StyleResolver::applySVGProperty):
1148         * css/SVGCSSValueKeywords.in:
1149         * rendering/style/SVGRenderStyle.cpp:
1150         (WebCore::SVGRenderStyle::diff):
1151         * rendering/style/SVGRenderStyle.h:
1152         (WebCore::SVGRenderStyle::initialMaskType):
1153         (WebCore::SVGRenderStyle::setMaskType):
1154         (SVGRenderStyle):
1155         (WebCore::SVGRenderStyle::maskType):
1156         (WebCore::SVGRenderStyle::setBitDefaults):
1157         * rendering/style/SVGRenderStyleDefs.h:
1158         * rendering/svg/RenderSVGResourceMasker.cpp:
1159
1160             Switch between the two masking modes according to the
1161             computed value of mask-type.
1162
1163         (WebCore::RenderSVGResourceMasker::drawContentIntoMaskImage):
1164         * svg/SVGStyledElement.cpp:
1165         (WebCore::SVGStyledElement::cssPropertyIdForSVGAttributeName):
1166         (WebCore::cssPropertyToTypeMap):
1167         * svg/svgattrs.in: Add the new attribute to the attribute list.
1168
1169 2012-09-19  Mark Pilgrim  <pilgrim@chromium.org>
1170
1171         [Chromium] Remove unused popupsAllowed function from PlatformSupport
1172         https://bugs.webkit.org/show_bug.cgi?id=96521
1173
1174         Reviewed by Eric Seidel.
1175
1176         Part of a refactoring series. See tracking bug 82948.
1177
1178         * bindings/v8/NPV8Object.cpp:
1179         (WebCore::v8ObjectToNPObject):
1180         (_NPN_Evaluate):
1181         (_NPN_GetProperty):
1182         * platform/chromium/PlatformSupport.h:
1183         (PlatformSupport):
1184
1185 2012-09-19  Jonathan Dong  <jonathan.dong@torchmobile.com.cn>
1186
1187         [BlackBerry] Add function playerId() in class PageClientBlackBerry
1188         https://bugs.webkit.org/show_bug.cgi?id=97099
1189
1190         Reviewed by Yong Li.
1191
1192         Added function playerID() in class PageClientBlackBerry.
1193
1194         Internally reviewed by Charles Wei.
1195
1196         No new tests since there's no functional change.
1197
1198         * platform/blackberry/PageClientBlackBerry.h:
1199
1200 2012-09-19  Raul Hudea  <rhudea@adobe.com>
1201
1202         [CSSRegions][CSSOM] Make sure all Regions APIs are not visible if CSS_REGIONS is not defined
1203         https://bugs.webkit.org/show_bug.cgi?id=96300
1204
1205         Reviewed by Yury Semikhatsky.
1206
1207         All CSS Regions APIs should be exposed only if CSS_REGIONS is enabled
1208
1209         No new tests because of no behavior changes.
1210
1211         * css/StyleRule.cpp:
1212         (WebCore::StyleRuleBase::reportMemoryUsage): Fix compile without CSS_REGIONS enabled and added an ASSERT_NOT_REACHED as in other functions
1213         * dom/Element.cpp: Compile webkitRegionOverset only if CSS_REGIONS is enabled
1214         (WebCore):
1215         * dom/Element.h:
1216         * dom/Element.idl: Expose webkitRegionOverset only if CSS_REGIONS is enabled
1217
1218 2012-09-19  Patrick Gansterer  <paroga@webkit.org>
1219
1220         Remove all usages of M_PI from WebCore
1221         https://bugs.webkit.org/show_bug.cgi?id=93109
1222
1223         Reviewed by Dirk Schulze.
1224
1225         <wtf/MathExtras.h> implements many functions dealing with M_PI.
1226         Use them in WebCore instead of duplicating the functionality.
1227
1228         * platform/blackberry/PlatformTouchEventBlackBerry.cpp:
1229         (WebCore::PlatformTouchEvent::PlatformTouchEvent):
1230         * platform/graphics/ca/mac/PlatformCALayerMac.mm:
1231         (PlatformCALayer::setFilters):
1232         * platform/graphics/cairo/GraphicsContextCairo.cpp:
1233         (WebCore::GraphicsContext::drawEllipse):
1234         (WebCore::GraphicsContext::strokeArc):
1235         * platform/graphics/wx/FontPlatformDataWxMac.mm:
1236         * platform/mac/WebWindowAnimation.mm:
1237         (-[WebWindowScaleAnimation currentValue]):
1238         * platform/wx/wxcode/gdiplus/non-kerned-drawing.cpp:
1239         (DegToRad):
1240         (RadToDeg):
1241
1242 2012-09-10  Vsevolod Vlasov  <vsevik@chromium.org>
1243
1244         Web Inspector: Network request headers text fallback has typo.
1245         https://bugs.webkit.org/show_bug.cgi?id=96280
1246
1247         Reviewed by Pavel Feldman.
1248
1249         * inspector/front-end/NetworkRequest.js:
1250         (WebInspector.NetworkRequest.prototype.get requestHeadersText):
1251         (WebInspector.NetworkRequest.prototype.get responseHeadersText):
1252
1253 2012-09-19  Jonathan Dong  <jonathan.dong@torchmobile.com.cn>
1254
1255         [BlackBerry] remove static_cast which will cause video crash
1256         https://bugs.webkit.org/show_bug.cgi?id=97070
1257
1258         Reviewed by Antonio Gomes.
1259
1260         Removed the static_cast to avoid layering violation which
1261         will cause a runtime crash.
1262         We won't create a real MediaPlayerPrivate object before we call
1263         MediaPlayer::load(), so if we use player()->implementation()
1264         before calling load() in some cases, it points to a
1265         NullMediaPlayerPrivate object. Here we should not use static_cast,
1266         instead we should use HTMLMediaElement::percentLoaded() to
1267         avoid layering violation as we don't have the buffering bug which
1268         the deleted comment refers to.
1269
1270         Internally reviewed by Max Feil.
1271
1272         Test case: media/video-size.html
1273
1274         * platform/blackberry/RenderThemeBlackBerry.cpp:
1275         (WebCore::RenderThemeBlackBerry::paintMediaSliderTrack):
1276
1277 2012-09-19  Rick Byers  <rbyers@chromium.org>
1278
1279         Do touch adjustment on GestureTapDown
1280         https://bugs.webkit.org/show_bug.cgi?id=96677
1281
1282         Reviewed by Antonio Gomes.
1283
1284         Do touch adjustment on GestureTapDown exactly as for GestureTap today.
1285
1286         Test: touchadjustment/touch-links-active.html
1287
1288         * page/EventHandler.cpp:
1289         (WebCore::EventHandler::handleGestureEvent):
1290         (WebCore::EventHandler::adjustGesturePosition):
1291
1292 2012-09-19  Vsevolod Vlasov  <vsevik@chromium.org>
1293
1294         Unreviewed another follow up Apple Win build fix for r128992.
1295
1296         * inspector/InspectorAllInOne.cpp:
1297
1298 2012-09-19  Carlos Garcia Campos  <cgarcia@igalia.com>
1299
1300         [GTK] REGRESSION(r128907): it broke several WebKit2 API tests
1301         https://bugs.webkit.org/show_bug.cgi?id=97092
1302
1303         Reviewed by Martin Robinson.
1304
1305         Calling resizeLater() from the constructor of
1306         RedirectedXCompositeWindow can cause the callback to be called
1307         later by the main loop after the RedirectedXCompositeWindow object
1308         has been destroyed. Instead of calling resizeLater(), initialize
1309         the usable size to the given initial size.
1310
1311         * platform/gtk/RedirectedXCompositeWindow.cpp:
1312         (WebCore::RedirectedXCompositeWindow::RedirectedXCompositeWindow):
1313
1314 2012-09-19  Vsevolod Vlasov  <vsevik@chromium.org>
1315
1316         Unreviewed follow up Apple Win build fix for r128992.
1317
1318         * inspector/InspectorAllInOne.cpp:
1319
1320 2012-09-19  Andrey Adaikin  <aandrey@chromium.org>
1321
1322         Web Inspector: [WebGL] -> [Canvas] Rename WebGLAgent to CanvasAgent
1323         https://bugs.webkit.org/show_bug.cgi?id=96917
1324
1325         Reviewed by Vsevolod Vlasov.
1326
1327         Rename WebGLAgent* and WebGLInstrumentation* files to Canvas* as we will support both 2D and 3D/WebGL canvas instrumentation.
1328
1329         * CMakeLists.txt:
1330         * DerivedSources.make:
1331         * DerivedSources.pri:
1332         * GNUmakefile.am:
1333         * GNUmakefile.list.am:
1334         * Target.pri:
1335         * WebCore.gyp/WebCore.gyp:
1336         * WebCore.gypi:
1337         * WebCore.vcproj/WebCore.vcproj:
1338         * WebCore.xcodeproj/project.pbxproj:
1339         * bindings/js/JSHTMLCanvasElementCustom.cpp:
1340         * bindings/v8/custom/V8HTMLCanvasElementCustom.cpp:
1341         * inspector/CodeGeneratorInspector.py:
1342         * inspector/InjectedScriptCanvasModule.cpp: Renamed from Source/WebCore/inspector/InjectedScriptWebGLModule.cpp.
1343         (WebCore):
1344         (WebCore::InjectedScriptCanvasModule::InjectedScriptCanvasModule):
1345         (WebCore::InjectedScriptCanvasModule::moduleForState):
1346         (WebCore::InjectedScriptCanvasModule::source):
1347         (WebCore::InjectedScriptCanvasModule::wrapWebGLContext):
1348         (WebCore::InjectedScriptCanvasModule::captureFrame):
1349         (WebCore::InjectedScriptCanvasModule::dropTraceLog):
1350         (WebCore::InjectedScriptCanvasModule::traceLog):
1351         (WebCore::InjectedScriptCanvasModule::replayTraceLog):
1352         * inspector/InjectedScriptCanvasModule.h: Renamed from Source/WebCore/inspector/InjectedScriptWebGLModule.h.
1353         (WebCore):
1354         (InjectedScriptCanvasModule):
1355         * inspector/InjectedScriptCanvasModuleSource.js: Renamed from Source/WebCore/inspector/InjectedScriptWebGLModuleSource.js.
1356         (.):
1357         * inspector/Inspector.json:
1358         * inspector/InspectorAllInOne.cpp:
1359         * inspector/InspectorCanvasAgent.cpp: Renamed from Source/WebCore/inspector/InspectorWebGLAgent.cpp.
1360         (WebCore):
1361         (CanvasAgentState):
1362         (WebCore::InspectorCanvasAgent::InspectorCanvasAgent):
1363         (WebCore::InspectorCanvasAgent::~InspectorCanvasAgent):
1364         (WebCore::InspectorCanvasAgent::setFrontend):
1365         (WebCore::InspectorCanvasAgent::clearFrontend):
1366         (WebCore::InspectorCanvasAgent::restore):
1367         (WebCore::InspectorCanvasAgent::enable):
1368         (WebCore::InspectorCanvasAgent::disable):
1369         (WebCore::InspectorCanvasAgent::dropTraceLog):
1370         (WebCore::InspectorCanvasAgent::captureFrame):
1371         (WebCore::InspectorCanvasAgent::getTraceLog):
1372         (WebCore::InspectorCanvasAgent::replayTraceLog):
1373         (WebCore::InspectorCanvasAgent::wrapWebGLRenderingContextForInstrumentation):
1374         (WebCore::InspectorCanvasAgent::injectedScriptCanvasModuleForTraceLogId):
1375         * inspector/InspectorCanvasAgent.h: Renamed from Source/WebCore/inspector/InspectorWebGLAgent.h.
1376         (WebCore):
1377         (InspectorCanvasAgent):
1378         (WebCore::InspectorCanvasAgent::create):
1379         (WebCore::InspectorCanvasAgent::enabled):
1380         * inspector/InspectorCanvasInstrumentation.h: Renamed from Source/WebCore/inspector/InspectorWebGLInstrumentation.h.
1381         (WebCore):
1382         (WebCore::InspectorInstrumentation::wrapWebGLRenderingContextForInstrumentation):
1383         * inspector/InspectorController.cpp:
1384         (WebCore::InspectorController::InspectorController):
1385         * inspector/InstrumentingAgents.h:
1386         (WebCore):
1387         (WebCore::InstrumentingAgents::InstrumentingAgents):
1388         (WebCore::InstrumentingAgents::inspectorCanvasAgent):
1389         (WebCore::InstrumentingAgents::setInspectorCanvasAgent):
1390         (InstrumentingAgents):
1391         * inspector/compile-front-end.py:
1392         * inspector/front-end/CanvasProfileView.js: Renamed from Source/WebCore/inspector/front-end/WebGLProfileView.js.
1393         (WebInspector.CanvasProfileView):
1394         (WebInspector.CanvasProfileView.prototype.dispose):
1395         (WebInspector.CanvasProfileView.prototype.get statusBarItems):
1396         (WebInspector.CanvasProfileView.prototype.get profile):
1397         (WebInspector.CanvasProfileView.prototype.wasShown):
1398         (WebInspector.CanvasProfileView.prototype.willHide):
1399         (WebInspector.CanvasProfileView.prototype._showTraceLog):
1400         (WebInspector.CanvasProfileView.prototype._onTraceLogItemClick.didReplayTraceLog):
1401         (WebInspector.CanvasProfileView.prototype._onTraceLogItemClick):
1402         (WebInspector.CanvasProfileType):
1403         (WebInspector.CanvasProfileType.prototype.get buttonTooltip):
1404         (WebInspector.CanvasProfileType.prototype.buttonClicked.didStartCapturingFrame):
1405         (WebInspector.CanvasProfileType.prototype.buttonClicked):
1406         (WebInspector.CanvasProfileType.prototype.get treeItemTitle):
1407         (WebInspector.CanvasProfileType.prototype.get description):
1408         (WebInspector.CanvasProfileType.prototype.reset):
1409         (WebInspector.CanvasProfileType.prototype.createTemporaryProfile):
1410         (WebInspector.CanvasProfileType.prototype.createProfile):
1411         (WebInspector.CanvasProfileHeader):
1412         (WebInspector.CanvasProfileHeader.prototype.traceLogId):
1413         (WebInspector.CanvasProfileHeader.prototype.createSidebarTreeElement):
1414         (WebInspector.CanvasProfileHeader.prototype.createView):
1415         * inspector/front-end/ProfilesPanel.js:
1416         (WebInspector.ProfilesPanel):
1417         * inspector/front-end/Settings.js:
1418         (WebInspector.ExperimentsSettings):
1419         * inspector/front-end/WebKit.qrc:
1420         * inspector/front-end/canvasProfiler.css: Renamed from Source/WebCore/inspector/front-end/webGLProfiler.css.
1421         (.canvas-profile-view):
1422         (.canvas-trace-log):
1423         (.canvas-trace-log div):
1424         (#canvas-replay-image-container):
1425         (#canvas-replay-image):
1426
1427 2012-09-19  Carlos Garcia Campos  <cgarcia@igalia.com>
1428
1429         [GTK] Add API to get/set the security policy of a given URI scheme to WebKit2 GTK+
1430         https://bugs.webkit.org/show_bug.cgi?id=96497
1431
1432         Reviewed by Martin Robinson.
1433
1434         * WebCore.exp.in: Add new exported symbols.
1435
1436 2012-09-19  Patrick Gansterer  <paroga@webkit.org>
1437
1438         [WIN] Use BString in favour of BSTR to improve memory management
1439         https://bugs.webkit.org/show_bug.cgi?id=93128
1440
1441         Reviewed by Anders Carlsson.
1442
1443         BString automatically calls SysFreeString() in its destructor which helps
1444         avoiding memory leaks. So it should be used instead of BSTR directly.
1445         Add operator& to BString to allow its usage for out parameters too (like COMPtr).
1446         This fixes already a few memory leaks in the existing code.
1447
1448         * platform/win/BString.cpp:
1449         (WebCore::BString::~BString):
1450         (WebCore::BString::adoptBSTR):
1451         (WebCore::BString::clear):
1452         (WebCore):
1453         * platform/win/BString.h:
1454         (BString):
1455         (WebCore::BString::operator&):
1456
1457 2012-09-19  Simon Hausmann  <simon.hausmann@digia.com>
1458
1459         [Qt] Link failure with bfd linker on --minimal build
1460         https://bugs.webkit.org/show_bug.cgi?id=97075
1461
1462         Reviewed by Tor Arne Vestbø.
1463
1464         Fix two dependency errors triggered by --minimal:
1465
1466         - GStreamerVersioning.cpp uses functions from libgstvideo (gst_video_format_parse_caps), so we need to pull
1467         that module not only when video is enabled by generally when using gstreamer.
1468         - GraphicsSurfaceGLX depends on Xlib (XOpenDisplay, etc.), so we need to do CONFIG += x11 to get that and not
1469         implicitly rely on x11 netscape plugins being enabled.
1470
1471         * WebCore.pri:
1472
1473 2012-09-19  Tommy Widenflycht  <tommyw@google.com>
1474
1475         MediaStream API: Rename the RTCIceServer uri parameter to url.
1476         https://bugs.webkit.org/show_bug.cgi?id=97086
1477
1478         Reviewed by Hajime Morita.
1479
1480         Either the standard has changed or I can't read.
1481         http://dev.w3.org/2011/webrtc/editor/webrtc.html#dictionary-rtciceserver-members
1482
1483         Existing tests changed to cover this patch.
1484
1485         * Modules/mediastream/RTCPeerConnection.cpp:
1486         (WebCore::RTCPeerConnection::parseConfiguration):
1487
1488 2012-09-19  Sheriff Bot  <webkit.review.bot@gmail.com>
1489
1490         Unreviewed, rolling out r128976.
1491         http://trac.webkit.org/changeset/128976
1492         https://bugs.webkit.org/show_bug.cgi?id=97083
1493
1494         Breaks compilation on QT, Apple WIn (Requested by vsevik on
1495         #webkit).
1496
1497         * CMakeLists.txt:
1498         * DerivedSources.make:
1499         * DerivedSources.pri:
1500         * GNUmakefile.am:
1501         * GNUmakefile.list.am:
1502         * Target.pri:
1503         * WebCore.gyp/WebCore.gyp:
1504         * WebCore.gypi:
1505         * WebCore.vcproj/WebCore.vcproj:
1506         * WebCore.xcodeproj/project.pbxproj:
1507         * bindings/js/JSHTMLCanvasElementCustom.cpp:
1508         * bindings/v8/custom/V8HTMLCanvasElementCustom.cpp:
1509         * inspector/CodeGeneratorInspector.py:
1510         * inspector/InjectedScriptWebGLModule.cpp: Renamed from Source/WebCore/inspector/InjectedScriptCanvasModule.cpp.
1511         (WebCore):
1512         (WebCore::InjectedScriptWebGLModule::InjectedScriptWebGLModule):
1513         (WebCore::InjectedScriptWebGLModule::moduleForState):
1514         (WebCore::InjectedScriptWebGLModule::source):
1515         (WebCore::InjectedScriptWebGLModule::wrapWebGLContext):
1516         (WebCore::InjectedScriptWebGLModule::captureFrame):
1517         (WebCore::InjectedScriptWebGLModule::dropTraceLog):
1518         (WebCore::InjectedScriptWebGLModule::traceLog):
1519         (WebCore::InjectedScriptWebGLModule::replayTraceLog):
1520         * inspector/InjectedScriptWebGLModule.h: Renamed from Source/WebCore/inspector/InjectedScriptCanvasModule.h.
1521         (WebCore):
1522         (InjectedScriptWebGLModule):
1523         * inspector/InjectedScriptWebGLModuleSource.js: Renamed from Source/WebCore/inspector/InjectedScriptCanvasModuleSource.js.
1524         (.):
1525         * inspector/Inspector.json:
1526         * inspector/InspectorAllInOne.cpp:
1527         * inspector/InspectorController.cpp:
1528         (WebCore::InspectorController::InspectorController):
1529         * inspector/InspectorWebGLAgent.cpp: Renamed from Source/WebCore/inspector/InspectorCanvasAgent.cpp.
1530         (WebCore):
1531         (WebGLAgentState):
1532         (WebCore::InspectorWebGLAgent::InspectorWebGLAgent):
1533         (WebCore::InspectorWebGLAgent::~InspectorWebGLAgent):
1534         (WebCore::InspectorWebGLAgent::setFrontend):
1535         (WebCore::InspectorWebGLAgent::clearFrontend):
1536         (WebCore::InspectorWebGLAgent::restore):
1537         (WebCore::InspectorWebGLAgent::enable):
1538         (WebCore::InspectorWebGLAgent::disable):
1539         (WebCore::InspectorWebGLAgent::dropTraceLog):
1540         (WebCore::InspectorWebGLAgent::captureFrame):
1541         (WebCore::InspectorWebGLAgent::getTraceLog):
1542         (WebCore::InspectorWebGLAgent::replayTraceLog):
1543         (WebCore::InspectorWebGLAgent::wrapWebGLRenderingContextForInstrumentation):
1544         (WebCore::InspectorWebGLAgent::injectedScriptWebGLModuleForTraceLogId):
1545         * inspector/InspectorWebGLAgent.h: Renamed from Source/WebCore/inspector/InspectorCanvasAgent.h.
1546         (WebCore):
1547         (InspectorWebGLAgent):
1548         (WebCore::InspectorWebGLAgent::create):
1549         (WebCore::InspectorWebGLAgent::enabled):
1550         * inspector/InspectorWebGLInstrumentation.h: Renamed from Source/WebCore/inspector/InspectorCanvasInstrumentation.h.
1551         (WebCore):
1552         (WebCore::InspectorInstrumentation::wrapWebGLRenderingContextForInstrumentation):
1553         * inspector/InstrumentingAgents.h:
1554         (WebCore):
1555         (WebCore::InstrumentingAgents::InstrumentingAgents):
1556         (InstrumentingAgents):
1557         (WebCore::InstrumentingAgents::inspectorWebGLAgent):
1558         (WebCore::InstrumentingAgents::setInspectorWebGLAgent):
1559         * inspector/compile-front-end.py:
1560         * inspector/front-end/ProfilesPanel.js:
1561         (WebInspector.ProfilesPanel):
1562         * inspector/front-end/Settings.js:
1563         (WebInspector.ExperimentsSettings):
1564         * inspector/front-end/WebGLProfileView.js: Renamed from Source/WebCore/inspector/front-end/CanvasProfileView.js.
1565         (WebInspector.WebGLProfileView):
1566         (WebInspector.WebGLProfileView.prototype.dispose):
1567         (WebInspector.WebGLProfileView.prototype.get statusBarItems):
1568         (WebInspector.WebGLProfileView.prototype.get profile):
1569         (WebInspector.WebGLProfileView.prototype.wasShown):
1570         (WebInspector.WebGLProfileView.prototype.willHide):
1571         (WebInspector.WebGLProfileView.prototype._showTraceLog):
1572         (WebInspector.WebGLProfileView.prototype._onTraceLogItemClick.didReplayTraceLog):
1573         (WebInspector.WebGLProfileView.prototype._onTraceLogItemClick):
1574         (WebInspector.WebGLProfileType):
1575         (WebInspector.WebGLProfileType.prototype.get buttonTooltip):
1576         (WebInspector.WebGLProfileType.prototype.buttonClicked.didStartCapturingFrame):
1577         (WebInspector.WebGLProfileType.prototype.buttonClicked):
1578         (WebInspector.WebGLProfileType.prototype.get treeItemTitle):
1579         (WebInspector.WebGLProfileType.prototype.get description):
1580         (WebInspector.WebGLProfileType.prototype.reset):
1581         (WebInspector.WebGLProfileType.prototype.createTemporaryProfile):
1582         (WebInspector.WebGLProfileType.prototype.createProfile):
1583         (WebInspector.WebGLProfileHeader):
1584         (WebInspector.WebGLProfileHeader.prototype.traceLogId):
1585         (WebInspector.WebGLProfileHeader.prototype.createSidebarTreeElement):
1586         (WebInspector.WebGLProfileHeader.prototype.createView):
1587         * inspector/front-end/WebKit.qrc:
1588         * inspector/front-end/webGLProfiler.css: Renamed from Source/WebCore/inspector/front-end/canvasProfiler.css.
1589         (.webgl-profile-view):
1590         (.webgl-trace-log):
1591         (.webgl-trace-log div):
1592         (#webgl-replay-image-container):
1593         (#webgl-replay-image):
1594
1595 2012-09-19  Simon Hausmann  <simon.hausmann@digia.com>
1596
1597         [Qt][Win] Fix rendering of flash content when scrolling
1598         https://bugs.webkit.org/show_bug.cgi?id=92905
1599
1600         Reviewed by Jocelyn Turcotte.
1601
1602         Fix rendering offset similar to r121441.
1603
1604         * plugins/win/PluginViewWin.cpp:
1605         (WebCore::PluginView::paint):
1606         (WebCore::PluginView::setNPWindowRect):
1607
1608 2012-09-19  Andrey Adaikin  <aandrey@chromium.org>
1609
1610         Web Inspector: [WebGL] -> [Canvas] Rename WebGLAgent to CanvasAgent
1611         https://bugs.webkit.org/show_bug.cgi?id=96917
1612
1613         Reviewed by Vsevolod Vlasov.
1614
1615         Rename WebGLAgent* and WebGLInstrumentation* files to Canvas* as we will support both 2D and 3D/WebGL canvas instrumentation.
1616
1617         * CMakeLists.txt:
1618         * DerivedSources.make:
1619         * DerivedSources.pri:
1620         * GNUmakefile.am:
1621         * GNUmakefile.list.am:
1622         * Target.pri:
1623         * WebCore.gyp/WebCore.gyp:
1624         * WebCore.gypi:
1625         * WebCore.vcproj/WebCore.vcproj:
1626         * WebCore.xcodeproj/project.pbxproj:
1627         * bindings/js/JSHTMLCanvasElementCustom.cpp:
1628         * bindings/v8/custom/V8HTMLCanvasElementCustom.cpp:
1629         * inspector/CodeGeneratorInspector.py:
1630         * inspector/InjectedScriptCanvasModule.cpp: Renamed from Source/WebCore/inspector/InjectedScriptWebGLModule.cpp.
1631         (WebCore):
1632         (WebCore::InjectedScriptCanvasModule::InjectedScriptCanvasModule):
1633         (WebCore::InjectedScriptCanvasModule::moduleForState):
1634         (WebCore::InjectedScriptCanvasModule::source):
1635         (WebCore::InjectedScriptCanvasModule::wrapWebGLContext):
1636         (WebCore::InjectedScriptCanvasModule::captureFrame):
1637         (WebCore::InjectedScriptCanvasModule::dropTraceLog):
1638         (WebCore::InjectedScriptCanvasModule::traceLog):
1639         (WebCore::InjectedScriptCanvasModule::replayTraceLog):
1640         * inspector/InjectedScriptCanvasModule.h: Renamed from Source/WebCore/inspector/InjectedScriptWebGLModule.h.
1641         (WebCore):
1642         (InjectedScriptCanvasModule):
1643         * inspector/InjectedScriptCanvasModuleSource.js: Renamed from Source/WebCore/inspector/InjectedScriptWebGLModuleSource.js.
1644         (.):
1645         * inspector/Inspector.json:
1646         * inspector/InspectorAllInOne.cpp:
1647         * inspector/InspectorCanvasAgent.cpp: Renamed from Source/WebCore/inspector/InspectorWebGLAgent.cpp.
1648         (WebCore):
1649         (CanvasAgentState):
1650         (WebCore::InspectorCanvasAgent::InspectorCanvasAgent):
1651         (WebCore::InspectorCanvasAgent::~InspectorCanvasAgent):
1652         (WebCore::InspectorCanvasAgent::setFrontend):
1653         (WebCore::InspectorCanvasAgent::clearFrontend):
1654         (WebCore::InspectorCanvasAgent::restore):
1655         (WebCore::InspectorCanvasAgent::enable):
1656         (WebCore::InspectorCanvasAgent::disable):
1657         (WebCore::InspectorCanvasAgent::dropTraceLog):
1658         (WebCore::InspectorCanvasAgent::captureFrame):
1659         (WebCore::InspectorCanvasAgent::getTraceLog):
1660         (WebCore::InspectorCanvasAgent::replayTraceLog):
1661         (WebCore::InspectorCanvasAgent::wrapWebGLRenderingContextForInstrumentation):
1662         (WebCore::InspectorCanvasAgent::injectedScriptCanvasModuleForTraceLogId):
1663         * inspector/InspectorCanvasAgent.h: Renamed from Source/WebCore/inspector/InspectorWebGLAgent.h.
1664         (WebCore):
1665         (InspectorCanvasAgent):
1666         (WebCore::InspectorCanvasAgent::create):
1667         (WebCore::InspectorCanvasAgent::enabled):
1668         * inspector/InspectorCanvasInstrumentation.h: Renamed from Source/WebCore/inspector/InspectorWebGLInstrumentation.h.
1669         (WebCore):
1670         (WebCore::InspectorInstrumentation::wrapWebGLRenderingContextForInstrumentation):
1671         * inspector/InspectorController.cpp:
1672         (WebCore::InspectorController::InspectorController):
1673         * inspector/InstrumentingAgents.h:
1674         (WebCore):
1675         (WebCore::InstrumentingAgents::InstrumentingAgents):
1676         (WebCore::InstrumentingAgents::inspectorCanvasAgent):
1677         (WebCore::InstrumentingAgents::setInspectorCanvasAgent):
1678         (InstrumentingAgents):
1679         * inspector/compile-front-end.py:
1680         * inspector/front-end/CanvasProfileView.js: Renamed from Source/WebCore/inspector/front-end/WebGLProfileView.js.
1681         (WebInspector.CanvasProfileView):
1682         (WebInspector.CanvasProfileView.prototype.dispose):
1683         (WebInspector.CanvasProfileView.prototype.get statusBarItems):
1684         (WebInspector.CanvasProfileView.prototype.get profile):
1685         (WebInspector.CanvasProfileView.prototype.wasShown):
1686         (WebInspector.CanvasProfileView.prototype.willHide):
1687         (WebInspector.CanvasProfileView.prototype._showTraceLog):
1688         (WebInspector.CanvasProfileView.prototype._onTraceLogItemClick.didReplayTraceLog):
1689         (WebInspector.CanvasProfileView.prototype._onTraceLogItemClick):
1690         (WebInspector.CanvasProfileType):
1691         (WebInspector.CanvasProfileType.prototype.get buttonTooltip):
1692         (WebInspector.CanvasProfileType.prototype.buttonClicked.didStartCapturingFrame):
1693         (WebInspector.CanvasProfileType.prototype.buttonClicked):
1694         (WebInspector.CanvasProfileType.prototype.get treeItemTitle):
1695         (WebInspector.CanvasProfileType.prototype.get description):
1696         (WebInspector.CanvasProfileType.prototype.reset):
1697         (WebInspector.CanvasProfileType.prototype.createTemporaryProfile):
1698         (WebInspector.CanvasProfileType.prototype.createProfile):
1699         (WebInspector.CanvasProfileHeader):
1700         (WebInspector.CanvasProfileHeader.prototype.traceLogId):
1701         (WebInspector.CanvasProfileHeader.prototype.createSidebarTreeElement):
1702         (WebInspector.CanvasProfileHeader.prototype.createView):
1703         * inspector/front-end/ProfilesPanel.js:
1704         (WebInspector.ProfilesPanel):
1705         * inspector/front-end/Settings.js:
1706         (WebInspector.ExperimentsSettings):
1707         * inspector/front-end/WebKit.qrc:
1708         * inspector/front-end/canvasProfiler.css: Renamed from Source/WebCore/inspector/front-end/webGLProfiler.css.
1709         (.canvas-profile-view):
1710         (.canvas-trace-log):
1711         (.canvas-trace-log div):
1712         (#canvas-replay-image-container):
1713         (#canvas-replay-image):
1714
1715 2012-09-18  Kenichi Ishibashi  <bashi@chromium.org>
1716
1717         [Chromium] SkiaGetGlyphWidthAndExtents() should invert y-axis
1718         https://bugs.webkit.org/show_bug.cgi?id=97067
1719
1720         Reviewed by Yuta Kitamura.
1721
1722         Invert skBounds.fTop and skBounds.height(). Don't call hb_font_set_ppem().
1723
1724         No new tests. Arabic shadda (U+0651) should be placed more higher when Arabic lam (U+0644) follows it.
1725         Tests under svg/W3C-I18N contain such sequences so these tests cover this change.
1726
1727         * platform/graphics/harfbuzz/ng/HarfBuzzNGFaceSkia.cpp:
1728         (WebCore::SkiaGetGlyphWidthAndExtents):
1729         (WebCore::HarfBuzzNGFace::createFont):
1730
1731 2012-09-18  Kenichi Ishibashi  <bashi@chromium.org>
1732
1733         [Chromium] Don't treat tab as spaces for word-end in HarfBuzzShaper
1734         https://bugs.webkit.org/show_bug.cgi?id=97068
1735
1736         Reviewed by Yuta Kitamura.
1737
1738         No new tests. fast/text/wide-zero-width-space.html should cover this change.
1739
1740         * platform/graphics/harfbuzz/ng/HarfBuzzShaper.cpp:
1741         (WebCore::normalizeCharacters): Don't treat tab as space.
1742
1743 2012-09-18  Eric Carlson  <eric.carlson@apple.com>
1744
1745         Check settings before registering AVFoundation media engine.
1746         https://bugs.webkit.org/show_bug.cgi?id=97048
1747         <rdar://problem/12313594>
1748
1749         Reviewed by Dan Bernstein.
1750
1751         Fix the bug introduced in r122676.
1752
1753         * platform/graphics/MediaPlayer.cpp:
1754         (WebCore::installedMediaEngines): Uncomment the call to check AVFoundation settings.
1755
1756 2012-09-18  Sailesh Agrawal  <sail@chromium.org>
1757
1758         Chromium: Scrollbar with tickmarks doesn't respond to clicks
1759         https://bugs.webkit.org/show_bug.cgi?id=96049
1760
1761         Reviewed by Beth Dakin.
1762
1763         Currently when a scrollbar has tickmarks its forced to be visible by setting its alpha to 1.0. The alpha value is reset to its old value at the end of the drawing routine. This approach doesn't work with the hit testing code which relies on the scrollbar's alpha value
1764
1765         Unfortunately there doesn't seem to be anyway to force a scrollbar to be visible. The closest API is -[NSScrollerImpPair lockOverlayScrollerState:]. Unfortunately this locks both the horizontal and vertical scrollbar. It also doesn't expand the knob width.
1766
1767         My fix simply adds a new alphaLocked attribute to the scrollbar. If this attribute is set to true then hit testing will return true.
1768
1769         Test: fast/scrolling/scrollbar-tickmarks-hittest.html
1770
1771         * WebCore.exp.in:
1772         * WebCore.order:
1773         * page/Settings.cpp:
1774         (WebCore):
1775         (WebCore::Settings::setUsesOverlayScrollbars): Sets the usesOverlayScrollbars flag.
1776         (WebCore::Settings::usesOverlayScrollbars): Gets the usesOverlayScrollbars flag.
1777         * page/Settings.h:
1778         (Settings):
1779         * platform/Scrollbar.cpp:
1780         (WebCore::Scrollbar::Scrollbar):
1781         * platform/Scrollbar.h:
1782         (WebCore::Scrollbar::isAlphaLocked):
1783         (WebCore::Scrollbar::setIsAlphaLocked):
1784         (Scrollbar):
1785         * platform/ScrollbarThemeClient.h:
1786         (ScrollbarThemeClient):
1787         * platform/chromium/ScrollbarThemeChromiumMac.mm:
1788         (WebCore::ScrollbarThemeChromiumMac::paint): Updated to set and unset the alphaLocked attribute.
1789         * platform/chromium/support/WebScrollbarImpl.cpp:
1790         (WebKit::WebScrollbarImpl::isAlphaLocked):
1791         (WebKit):
1792         (WebKit::WebScrollbarImpl::setIsAlphaLocked):
1793         * platform/chromium/support/WebScrollbarImpl.h:
1794         (WebScrollbarImpl):
1795         * platform/graphics/chromium/cc/CCScrollbarLayerImpl.cpp:
1796         (WebCore::CCScrollbarLayerImpl::CCScrollbarLayerImpl):
1797         (WebCore::CCScrollbarLayerImpl::CCScrollbar::isAlphaLocked):
1798         (WebCore):
1799         (WebCore::CCScrollbarLayerImpl::CCScrollbar::setIsAlphaLocked):
1800         * platform/graphics/chromium/cc/CCScrollbarLayerImpl.h:
1801         (CCScrollbar):
1802         (CCScrollbarLayerImpl):
1803         * platform/mac/NSScrollerImpDetails.mm:
1804         (WebCore::recommendedScrollerStyle): Check the usesOverlayScrollbars setting to see if overlay scrollbars should be forced on.
1805         * platform/mac/ScrollAnimatorMac.mm:
1806         (WebCore::ScrollAnimatorMac::shouldScrollbarParticipateInHitTesting): Updated to check the alphaLocked attribute.
1807         * testing/InternalSettings.cpp:
1808         (WebCore::InternalSettings::reset): Resets the usesOverlayScrollbars setting.
1809         (WebCore::InternalSettings::setUsesOverlayScrollbars): Sets the usesOverlayScrollbars setting.
1810         (WebCore):
1811         * testing/InternalSettings.h:
1812         (InternalSettings):
1813         * testing/InternalSettings.idl: Add a new setUsesOverlayScrollbars function.
1814
1815 2012-09-18  Kentaro Hara  <haraken@chromium.org>
1816
1817         [V8] Notification.requestPermission(function() {alert();}) crashes
1818         https://bugs.webkit.org/show_bug.cgi?id=94462
1819
1820         Reviewed by Adam Barth.
1821
1822         Since Notification.requestPermission() is a static method,
1823         we need to use getExecutionContext() instead of retrieving a context
1824         from a DOM object.
1825
1826         Test: http/tests/notifications/notification-request-permission.html
1827
1828         * bindings/v8/custom/V8NotificationCustom.cpp:
1829         (WebCore::V8Notification::requestPermissionCallback):
1830
1831 2012-09-18  Shinya Kawanaka  <shinyak@chromium.org>
1832
1833         [Refactoring] ContentDistributor::distributeSelectionsTo should not change ContentDistribution pool.
1834         https://bugs.webkit.org/show_bug.cgi?id=96993
1835
1836         Reviewed by Dimitri Glazkov.
1837
1838         Since we would like to reuse ContentDistribution pool, it should not be updated in
1839         ContentDistributor::distributeSelectionsTo. Instead, we should have Vector<bool> to indicate an element is
1840         distributed or not.
1841
1842         No new tests, simple refactoring.
1843
1844         * html/shadow/ContentDistributor.cpp:
1845         (WebCore::ContentDistributor::distribute):
1846         (WebCore::ContentDistributor::distributeSelectionsTo):
1847         * html/shadow/ContentDistributor.h:
1848         (ContentDistributor):
1849
1850 2012-09-18  Byungwoo Lee  <bw80.lee@samsung.com>
1851
1852         Title string should be changed when document.title is set to ''.
1853         https://bugs.webkit.org/show_bug.cgi?id=96793
1854
1855         Reviewed by Kenneth Rohde Christiansen.
1856
1857         DocumentLoader::setTitle() function returns without anything (changing
1858         m_pageTitle and calling FrameLoaderClient::setTitle()) when new title
1859         string is empty.
1860         So, when document.title is set to '', title string of a browser cannot
1861         be changed.
1862         For applying the change of document.title properly, empty string check
1863         should be removed.
1864
1865         Test: fast/dom/title-text-property-assigning-empty-string.html
1866
1867         * loader/DocumentLoader.cpp:
1868         (WebCore::DocumentLoader::setTitle):
1869
1870 2012-09-18  Simon Fraser  <simon.fraser@apple.com>
1871
1872         fast/forms/search-event-delay.html is asserting in markAllMisspellingsAndBadGrammarInRanges()
1873         https://bugs.webkit.org/show_bug.cgi?id=82761
1874
1875         Reviewed by Ryosuke Niwa.
1876
1877         Speculative fix for this assertion: have InternalSettings save
1878         and restore the value of the "unifiedTextCheckerEnabled" setting
1879         between tests, so that tests change the value of this setting don't
1880         affect later tests.
1881
1882         * testing/InternalSettings.cpp:
1883         (WebCore::InternalSettings::Backup::Backup):
1884         (WebCore::InternalSettings::Backup::restoreTo):
1885         * testing/InternalSettings.h:
1886         (Backup):
1887
1888 2012-09-18  John Mellor  <johnme@chromium.org>
1889
1890         Text Autosizing: Ignore constrained heights in certain circumstances.
1891         https://bugs.webkit.org/show_bug.cgi?id=96848
1892
1893         Reviewed by Julien Chaffraix.
1894
1895         Ignore constrained heights on html and body elements, as some sites
1896         (e.g. wikipedia) set height:100% on these, without intending to
1897         constrain the height of descendants.
1898
1899         Also ignore constrained heights on ancestors of floats and out-of-flow
1900         positioned elements with no height set, since the height of these is
1901         determined independently from their ancestors.
1902
1903         Test: fast/text-autosizing/constrained-height-body.html
1904               fast/text-autosizing/constrained-out-of-flow.html
1905               fast/text-autosizing/constrained-then-float-ancestors.html
1906               fast/text-autosizing/constrained-then-position-absolute-ancestors.html
1907               fast/text-autosizing/constrained-then-position-fixed-ancestors.html
1908
1909         * rendering/TextAutosizer.cpp:
1910         (WebCore::contentHeightIsConstrained):
1911
1912             Adjusted constrainedness algorithm.
1913
1914 2012-09-18  Tommy Widenflycht  <tommyw@google.com>
1915
1916         MediaStream API: Create a flag to enable PeerConnection00
1917         https://bugs.webkit.org/show_bug.cgi?id=96989
1918
1919         Reviewed by Adam Barth.
1920
1921         Adding the functionality to separately enable/disable PeerConnection00.
1922         For now it is enabled by default.
1923
1924         Not testable, nor likely to cause issues.
1925
1926         * bindings/generic/RuntimeEnabledFeatures.cpp:
1927         (WebCore):
1928         * bindings/generic/RuntimeEnabledFeatures.h:
1929         (WebCore::RuntimeEnabledFeatures::deprecatedPeerConnectionEnabled):
1930         (WebCore::RuntimeEnabledFeatures::setDeprecatedPeerConnectionEnabled):
1931         (WebCore::RuntimeEnabledFeatures::webkitPeerConnection00Enabled):
1932         (RuntimeEnabledFeatures):
1933
1934 2012-09-18  Bo Liu  <boliu@chromium.org>
1935
1936         Revert 128780, 128676, 128645
1937         https://bugs.webkit.org/show_bug.cgi?id=97022
1938
1939         Reviewed by Adam Barth.
1940
1941         I made these revisions to add in-place reload behavior to ImagesEnabled setting.
1942         Reverting this for now due to them causing performance regression in
1943         chromium, possibly caused by increased calls to
1944         PermissionClient::imageAllowed.
1945
1946         * WebCore.exp.in:
1947         * loader/FrameLoader.cpp:
1948         (WebCore::FrameLoader::didBeginDocument):
1949         * loader/SubresourceLoader.cpp:
1950         (WebCore::SubresourceLoader::willSendRequest):
1951         * loader/cache/CachedImage.cpp:
1952         (WebCore::CachedImage::load):
1953         * loader/cache/CachedImage.h:
1954         (WebCore::CachedImage::stillNeedsLoad):
1955         * loader/cache/CachedResource.cpp:
1956         (WebCore::CachedResource::didAddClient):
1957         * loader/cache/CachedResource.h:
1958         * loader/cache/CachedResourceLoader.cpp:
1959         (WebCore::CachedResourceLoader::CachedResourceLoader):
1960         (WebCore::CachedResourceLoader::requestImage):
1961         (WebCore::CachedResourceLoader::canRequest):
1962         (WebCore::CachedResourceLoader::determineRevalidationPolicy):
1963         (WebCore::CachedResourceLoader::setAutoLoadImages):
1964         * loader/cache/CachedResourceLoader.h:
1965         (CachedResourceLoader):
1966         * page/Settings.cpp:
1967         (WebCore::setLoadsImagesAutomaticallyInAllFrames):
1968         (WebCore::Settings::Settings):
1969         (WebCore::Settings::setLoadsImagesAutomatically):
1970         (WebCore::Settings::loadsImagesAutomaticallyTimerFired):
1971         (WebCore::Settings::setImagesEnabled):
1972         * page/Settings.h:
1973         (Settings):
1974         * testing/InternalSettings.cpp:
1975         (WebCore::InternalSettings::Backup::Backup):
1976         (WebCore::InternalSettings::Backup::restoreTo):
1977         (WebCore::InternalSettings::setLangAttributeAwareFormControlUIEnabled):
1978         * testing/InternalSettings.h:
1979         (Backup):
1980         (InternalSettings):
1981         * testing/InternalSettings.idl:
1982
1983 2012-09-18  John J. Barton  <johnjbarton@chromium.org>
1984
1985         Web Inspector: Set focus on the ExtensionPanel's iframe when it is selected
1986         https://bugs.webkit.org/show_bug.cgi?id=96148
1987
1988         Reviewed by Vsevolod Vlasov.
1989
1990         ExtensionView ctor calls setDefaultFocusedElement with its iframe,
1991         ExtensionPanel ctor calls setDefaultFocusedElement with the extensionView
1992         and ExtensionPanel's setDefaultFocusedElement calls its grandparent impl
1993
1994         Tests: Added hasFocus test to extensions/extension-panel.html
1995
1996         * inspector/front-end/ExtensionPanel.js:
1997         (WebInspector.ExtensionPanel):
1998         (WebInspector.ExtensionPanel.prototype.defaultFocusedElement):
1999         * inspector/front-end/ExtensionView.js:
2000         (WebInspector.ExtensionView):
2001
2002 2012-09-18  Martin Robinson  <mrobinson@igalia.com>
2003
2004         [GTK] [WebKit2] Use XComposite window for accelerated compositing
2005         https://bugs.webkit.org/show_bug.cgi?id=94417
2006
2007         Reviewed by Carlos Garcia Campos.
2008
2009         Instead of rendering directly to the widget's native window, render to an
2010         offscreen window redirected to a Pixmap with XComposite.
2011
2012         No new tests. This will be covered by the existing accelerated compositing tests,
2013         which should now give correct pixel results.
2014
2015         * platform/gtk/RedirectedXCompositeWindow.cpp:
2016         (WebCore::RedirectedXCompositeWindow::resize): Add a call to XFlush which ensures
2017         that pending X11 operations complete.
2018         * platform/gtk/RedirectedXCompositeWindow.h:
2019         (WebCore::RedirectedXCompositeWindow::windowId): Added this accessor.
2020
2021 2012-09-18  Julien Chaffraix  <jchaffraix@webkit.org>
2022
2023         Tables without any descendant and auto logical width should have a 0px logical width
2024         https://bugs.webkit.org/show_bug.cgi?id=95521
2025
2026         Reviewed by Abhishek Arya.
2027
2028         The code would wrongly add the border-spacing in the row direction to the table's logical
2029         width even if we didn't have a column. The new behavior matches FireFox and Opera. IE
2030         matches our old behavior for inline tables but our new behavior for normal tables which
2031         is a bug on their side.
2032
2033         Tests: fast/table/empty-table-should-take-no-space.html
2034                fast/table/fixed-table-layout/empty-table-should-take-no-space-fixed-layout.html
2035
2036         * rendering/RenderTable.h:
2037         (WebCore::RenderTable::borderSpacingInRowDirection):
2038         Added this new helper function to return the right border-spacing. Added a FIXME as the code always
2039         return the horizontal dimension which is wrong in vertical-writing mode.
2040
2041         (WebCore::RenderTable::bordersPaddingAndSpacingInRowDirection):
2042         Changed to call borderSpacingInRowDirection. Added a comment as to why we don't add border-spacing on
2043         border-collapse: separate tables.
2044
2045 2012-09-18  Zan Dobersek  <zandobersek@gmail.com>
2046
2047         [GTK] Build is broken without option --enable-unstable-features
2048         https://bugs.webkit.org/show_bug.cgi?id=96996
2049
2050         Reviewed by Martin Robinson.
2051
2052         When searching for the bare feature define in feature_defines_unstable or
2053         feature_defines_overrides, search for the bare define followed by = character.
2054         This avoids incorrectly matching the ENABLE_VIDEO define to the ENABLE_VIDEO_TRACK
2055         overriding define (and works as well for other similarly named feature defines).
2056
2057         No new tests - no new functionality.
2058
2059         * GNUmakefile.am:
2060
2061 2012-09-18  Andrey Kosyakov  <caseq@chromium.org>
2062
2063         Web Inspector: [Extensions API] postpone requests to add extensions until extension server is initialized
2064         https://bugs.webkit.org/show_bug.cgi?id=97012
2065
2066         Reviewed by Vsevolod Vlasov.
2067
2068         - queue extensions being added unless initialization is complete;
2069         - add queued extensions upon completion of initialization;
2070
2071         * inspector/front-end/ExtensionServer.js:
2072         (WebInspector.ExtensionServer.prototype.initExtensions):
2073         (WebInspector.ExtensionServer.prototype._addExtensions):
2074         (WebInspector.ExtensionServer.prototype._addExtension):
2075         (WebInspector.ExtensionServer.prototype._innerAddExtension):
2076
2077 2012-09-18  Christophe Dumez  <christophe.dumez@intel.com>
2078
2079         [EFL] min-device-width failures in media tests
2080         https://bugs.webkit.org/show_bug.cgi?id=96920
2081
2082         Reviewed by Kenneth Rohde Christiansen.
2083
2084         Return a realistic value (800x600) for screen resolution if
2085         it cannot be detected, instead of returning (0x0).
2086
2087         This allows for some tests to pass on the build bots
2088         where X is not running.
2089
2090         No new tests, already covered by existing tests.
2091
2092         * platform/efl/PlatformScreenEfl.cpp:
2093         (WebCore::screenRect):
2094
2095 2012-09-18  Simon Hausmann  <simon.hausmann@digia.com>
2096
2097         Fix compilation with Qt 5 on MeeGo 1.2 Harmattan
2098         https://bugs.webkit.org/show_bug.cgi?id=96937
2099
2100         Reviewed by Jocelyn Turcotte.
2101
2102         The gl2ext.h header file on the platform is outdated. Instead use the newer copy from Qt
2103         through implicit inclusion of qopengl.h. Since Qt's declarations are based on newer Khronos
2104         headers, the multi sampling extensions do have the PROC suffix, we need the same workaround
2105         as QNX.
2106
2107         * platform/graphics/opengl/Extensions3DOpenGLES.h:
2108
2109 2012-09-14  Andrey Kosyakov  <caseq@chromium.org>
2110
2111         Web Inspector: [Extensions API] explicitly manage extension audit progress
2112         https://bugs.webkit.org/show_bug.cgi?id=96803
2113
2114         Reviewed by Alexander Pavlov.
2115
2116         - create a sub-progress per audit category;
2117         - manage audit category progress within the category, not in the panel logic;
2118         - consider audit is done when all categories are done;
2119         - expose AuditResults.updateProgress(worked, totalWork) in the extensions API;
2120         - retain old magic for computing audit progress if extension specifies extension results count.
2121
2122         * inspector/front-end/AuditsPanel.js:
2123         (WebInspector.AuditsPanel.prototype._executeAudit.ruleResultReadyCallback):
2124         (WebInspector.AuditsPanel.prototype._executeAudit):
2125         (WebInspector.AuditCategory.prototype.run.callbackWrapper):
2126         (WebInspector.AuditCategory.prototype.run):
2127         * inspector/front-end/ExtensionAPI.js:
2128         (defineCommonExtensionSymbols):
2129         (injectedExtensionAPI.Audits.prototype.addCategory):
2130         (injectedExtensionAPI.AuditResultImpl.prototype.updateProgress):
2131         * inspector/front-end/ExtensionAuditCategory.js:
2132         (WebInspector.ExtensionAuditCategory.prototype.run):
2133         (WebInspector.ExtensionAuditCategoryResults):
2134         (WebInspector.ExtensionAuditCategoryResults.prototype.done):
2135         (WebInspector.ExtensionAuditCategoryResults.prototype._addResult):
2136         (WebInspector.ExtensionAuditCategoryResults.prototype.updateProgress):
2137         * inspector/front-end/ExtensionServer.js:
2138         (WebInspector.ExtensionServer):
2139         (WebInspector.ExtensionServer.prototype._onUpdateAuditProgress):
2140         (WebInspector.ExtensionServer.prototype._onStopAuditCategoryRun):
2141         * inspector/front-end/ProgressBar.js:
2142         (WebInspector.ProgressIndicator.prototype.done): Assure only first call to done() has effect.
2143
2144 2012-09-19  Allan Sandfeld Jensen  <allan.jensen@nokia.com>
2145
2146         Revert r127457 and following fixes due to several hit-testing regressions
2147         https://bugs.webkit.org/show_bug.cgi?id=96830
2148
2149         Reviewed by Antonio Gomes.
2150
2151         The revert misssed one related follow-up.
2152
2153         * dom/Document.cpp:
2154         (WebCore::Document::updateHoverActiveState):
2155
2156
2157 2012-09-18  Mihnea Ovidenie  <mihnea@adobe.com>
2158
2159         [CSSRegions]Flag auto-height regions
2160         https://bugs.webkit.org/show_bug.cgi?id=96267
2161
2162         Reviewed by Julien Chaffraix.
2163
2164         The regions having auto logical height should be flagged so that their height will computed as part of a 2 pass-layout mechanism.
2165         A valid region is flagged as having auto logical height if:
2166         - has auto logical height and is part of the normal flow
2167         - has auto logical height, is not part of normal flow and does not have logical top/bottom specified
2168
2169         An invalid region (part of circular dependency) will not be marked even if its style matches the above situations.
2170
2171         Test: fast/regions/autoheight-regions-mark.html
2172
2173         * rendering/FlowThreadController.cpp: Keep a counter of auto logical height valid regions.
2174         (WebCore::FlowThreadController::FlowThreadController):
2175         (WebCore::FlowThreadController::layoutRenderNamedFlowThreads): Verify that the current number of auto logical height regions is correct by iterating over all the regions attached to the flow threads
2176         and compute the number of auto logical height regions on the spot.
2177         (WebCore):
2178         (WebCore::FlowThreadController::isAutoLogicalHeightRegionsFlagConsistent): Helper function that is used to verify the number of auto logical height regions.
2179         * rendering/FlowThreadController.h:
2180         (WebCore::FlowThreadController::hasAutoLogicalHeightRegions):
2181         (WebCore::FlowThreadController::incrementAutoLogicalHeightRegions):
2182         (WebCore::FlowThreadController::decrementAutoLogicalHeightRegions):
2183         (FlowThreadController):
2184         * rendering/RenderFlowThread.cpp:
2185         (WebCore):
2186         (WebCore::RenderFlowThread::autoLogicalHeightRegionsCount): Helper function that is used to count the number of regions marked as having auto logical height.
2187         * rendering/RenderFlowThread.h:
2188         * rendering/RenderRegion.cpp:
2189         (WebCore::RenderRegion::RenderRegion):
2190         (WebCore::RenderRegion::updateRegionHasAutoLogicalHeightFlag):
2191         (WebCore):
2192         (WebCore::RenderRegion::styleDidChange): For a region that is attached to a flow thread, verify whether the style change modified its auto logical height appearance.
2193         (WebCore::RenderRegion::attachRegion): Handle the case of attaching region to a flow thread and the detach/attach sequence when the region is moved in the render tree.
2194         (WebCore::RenderRegion::detachRegion):
2195         * rendering/RenderRegion.h:
2196         (WebCore::RenderRegion::shouldHaveAutoLogicalHeight):
2197         (WebCore::RenderRegion::hasAutoLogicalHeight):
2198         (RenderRegion):
2199         * rendering/RenderTreeAsText.cpp: For the regions that use auto logical height, modify the output to reflect that.
2200         (WebCore::writeRenderNamedFlowThreads):
2201
2202 2012-09-18  Shinya Kawanaka  <shinyak@chromium.org>
2203
2204         Disable adding an AuthorShadowRoot to replaced elements.
2205         https://bugs.webkit.org/show_bug.cgi?id=96978
2206
2207         Reviewed by Hajime Morita.
2208
2209         We (people who implement Shadow DOM) have concluded that we don't support adding AuthorShadowRoot to
2210         replaced elements in the current spec, since it turned out that a lot of difficulties exist and it brings
2211         a lot of mess to our codebase.
2212
2213         For now, we just disable adding AuthorShadowRoot to these replaced elements.
2214
2215         Test: fast/dom/shadow/shadow-disable.html
2216
2217         * html/HTMLImageElement.h:
2218         * html/HTMLKeygenElement.h:
2219         * html/HTMLMeterElement.h:
2220         * html/HTMLProgressElement.h:
2221         * html/HTMLTextAreaElement.h:
2222
2223 2012-09-17  Csaba Osztrogonác  <ossy@webkit.org>
2224
2225         Unreviewed, rolling out r128826 and r128813.
2226
2227         * ForwardingHeaders/runtime/JSDestructibleObject.h: Removed.
2228         * bindings/js/JSDOMWrapper.h:
2229         (WebCore::JSDOMWrapper::JSDOMWrapper):
2230         * bindings/scripts/CodeGeneratorJS.pm:
2231         (GenerateHeader):
2232         * bridge/objc/objc_runtime.h:
2233         (ObjcFallbackObjectImp):
2234         * bridge/objc/objc_runtime.mm:
2235         (Bindings):
2236         (JSC::Bindings::ObjcFallbackObjectImp::ObjcFallbackObjectImp):
2237         * bridge/runtime_array.cpp:
2238         (JSC):
2239         (JSC::RuntimeArray::destroy):
2240         * bridge/runtime_array.h:
2241         (JSC::RuntimeArray::create):
2242         * bridge/runtime_object.cpp:
2243         (Bindings):
2244         (JSC::Bindings::RuntimeObject::RuntimeObject):
2245         * bridge/runtime_object.h:
2246         (RuntimeObject):
2247
2248 2012-09-17  Kent Tamura  <tkent@chromium.org>
2249
2250         Export RuntimeEnabledFeatures::isLangAttributeAwareFormControlUIEnabled correctly
2251         https://bugs.webkit.org/show_bug.cgi?id=96855
2252
2253         Reviewed by Hajime Morita.
2254
2255         * bindings/generic/RuntimeEnabledFeatures.h:
2256         (RuntimeEnabledFeatures): Add WEBCORE_TESTING.
2257         * testing/InternalSettings.cpp: Remove a workaround.
2258         (WebCore::InternalSettings::Backup::Backup):
2259         (WebCore::InternalSettings::Backup::restoreTo):
2260         (WebCore::InternalSettings::setLangAttributeAwareFormControlUIEnabled):
2261         * testing/InternalSettings.h: ditto.
2262
2263 2012-09-17  Vivek Galatage  <vivekgalatage@gmail.com>
2264
2265         [Gtk] Remove the unused variable warning in GamepadsGtk.cpp using ASSERT_UNUSED macro
2266         https://bugs.webkit.org/show_bug.cgi?id=96975
2267
2268         Reviewed by Kentaro Hara.
2269
2270         Replacing a simple ASSERT with ASSERT_UNUSED to avoid the warning.
2271
2272         No new tests as refactoring done.
2273
2274         * platform/gtk/GamepadsGtk.cpp:
2275         (WebCore::GamepadDeviceGtk::readCallback):
2276
2277 2012-09-17  Roger Fong  <roger_fong@apple.com>
2278
2279         [Win] Null check timing function received from CoreAnimation when calling CACFAnimationGetTimingFunction.
2280         https://bugs.webkit.org/show_bug.cgi?id=96972
2281
2282         Reviewed by Timothy Horton
2283
2284         When paused, some CSS animations cause CoreAnimation to pass back a null timing function when calling CACFAnimationGetTimingFunction.
2285         This patch fixes this simply by ensuring that if the output of this method is null, it does not get passed into CACFAnimationSetTimingFunction
2286         via the PlatformCAAnimation::copyTimingFunctionFrom method.
2287
2288         * platform/graphics/ca/win/PlatformCAAnimationWin.cpp:
2289         (PlatformCAAnimation::copyTimingFunctionFrom):
2290
2291 2012-09-17  David Barton  <dbarton@mathscribe.com>
2292
2293         Convert MathML to use flexboxes
2294         https://bugs.webkit.org/show_bug.cgi?id=96843
2295
2296         Reviewed by Eric Seidel.
2297
2298         Using the CSS Flexible Box Model simplifies MathML in many ways. Control over alignment, row vs.
2299         column layout, and child layout order are all much easier. Complexities involving floats,
2300         continuations, and most anonymous boxes are eliminated, as are their potential for crashes and
2301         security vulnerabilities.
2302
2303         In a flexbox, column alignment is done with align-items or align-self, instead of text-align.
2304         vertical-align and baselinePosition() are replaced by the firstLineBoxBaseline() virtual
2305         function.
2306
2307         Tested by existing tests.
2308
2309         * css/mathml.css:
2310         (math):
2311         (math[display="block"]):
2312         (mo, mrow, mfenced, mfrac, msub, msup, msubsup, munder, mover, munderover, msqrt, mroot):
2313         (math, mrow, mfenced, msqrt, mroot):
2314         (msqrt > *):
2315         (mo, mfrac, munder, mover, munderover):
2316         (munder, mover, munderover):
2317         (mfrac > *):
2318         (mfrac[numalign="left"] > :first-child):
2319         (mfrac[numalign="right"] > :first-child):
2320         (mfrac[denomalign="left"] > :last-child):
2321         (mfrac[denomalign="right"] > :last-child):
2322         (msubsup > :last-child, mover > :last-child, munderover > :last-child):
2323         (msub > * + *, msup > * + *, msubsup > * + *, munder > * + *, mover > * + *, munderover > * + *):
2324         (mroot):
2325         (mroot > * + *):
2326         (mtable):
2327         
2328         * mathml/MathMLInlineContainerElement.cpp:
2329         (WebCore::MathMLInlineContainerElement::createRenderer):
2330         * mathml/mathtags.in:
2331         
2332         * rendering/mathml/RenderMathMLBlock.cpp:
2333         (WebCore::RenderMathMLBlock::RenderMathMLBlock):
2334         (WebCore::RenderMathMLBlock::computePreferredLogicalWidths):
2335         (WebCore::RenderMathMLBlock::baselinePosition):
2336         (WebCore::RenderMathMLBlock::renderName):
2337         (WebCore::RenderMathMLBlock::paint):
2338         (WebCore::RenderMathMLTable::firstLineBoxBaseline):
2339         * rendering/mathml/RenderMathMLBlock.h:
2340         (RenderMathMLBlock):
2341         (RenderMathMLTable):
2342         (WebCore::RenderMathMLTable::RenderMathMLTable):
2343             - Change RenderMathMLBlock's base class to RenderFlexibleBox, and its display to FLEX or INLINE_FLEX.
2344             - Add RenderMathMLTable for its firstLineBoxBaseline() function, like { vertical-align: middle }.
2345         
2346         * rendering/mathml/RenderMathMLFenced.cpp:
2347         (WebCore::RenderMathMLFenced::createMathMLOperator):
2348         (WebCore::RenderMathMLFenced::makeFences):
2349             - Use RenderMathMLRow::addChild as a more robust name for RenderBlock::addChild.
2350         (WebCore::RenderMathMLFenced::addChild):
2351             - All inline children of a flexbox are treated as blocks automatically.
2352         
2353         * rendering/mathml/RenderMathMLFraction.cpp:
2354         (WebCore::RenderMathMLFraction::fixChildStyle):
2355         (WebCore::RenderMathMLFraction::updateFromElement):
2356             - numalign and denomalign attributes are now handled by mathml.css.
2357         (WebCore::RenderMathMLFraction::addChild):
2358         (WebCore::RenderMathMLFraction::layout):
2359         (WebCore::RenderMathMLFraction::firstLineBoxBaseline):
2360         * rendering/mathml/RenderMathMLFraction.h:
2361         (RenderMathMLFraction):
2362         
2363         * rendering/mathml/RenderMathMLOperator.cpp:
2364         (WebCore::RenderMathMLOperator::updateFromElement):
2365         (WebCore::RenderMathMLOperator::createStackableStyle):
2366         (WebCore::RenderMathMLOperator::firstLineBoxBaseline):
2367         * rendering/mathml/RenderMathMLOperator.h:
2368         * rendering/mathml/RenderMathMLRow.cpp:
2369         (WebCore::RenderMathMLRow::createAnonymousWithParentRenderer):
2370         
2371         * rendering/mathml/RenderMathMLSubSup.cpp:
2372         (WebCore::RenderMathMLSubSup::RenderMathMLSubSup):
2373         (WebCore::RenderMathMLSubSup::fixScriptsStyle):
2374         (WebCore::RenderMathMLSubSup::addChild):
2375         (WebCore::RenderMathMLSubSup::styleDidChange):
2376         (WebCore::RenderMathMLSubSup::layout):
2377         * rendering/mathml/RenderMathMLSubSup.h:
2378             - Rename Sup to Super, to make it more readable vs. Sub.
2379             - Instead of vertical-align, msub and msup now use the m_scripts anonymous box like msubsup does.
2380             - Individual anonymous block wrappers are no longer needed around the superscript and subscript to
2381               lay them out in a column.
2382             - Handle msub and msup layout, and improve msubsup layout, by requiring a superscript's baseline
2383               to be at least (int) fontSize / 3 + 1 above the main baseline, and a subscript's baseline to be
2384               at least (int) fontSize / 5 + 1 below it.
2385         
2386         * rendering/mathml/RenderMathMLUnderOver.cpp:
2387         (WebCore::RenderMathMLUnderOver::unembellishedOperator):
2388         (WebCore::RenderMathMLUnderOver::firstLineBoxBaseline):
2389         * rendering/mathml/RenderMathMLUnderOver.h:
2390         (RenderMathMLUnderOver):
2391             - RenderMathMLUnderOver no longer needs to use anonymous wrappers for column layout. Centering and
2392               child layout order (overscript first) are also handled by mathml.css.
2393
2394 2012-09-17  Ryuan Choi  <ryuan.choi@samsung.com>
2395
2396         [EFL] Several key codes are not mapped with evas key name.
2397         https://bugs.webkit.org/show_bug.cgi?id=96915
2398
2399         Reviewed by Gyuyoung Kim.
2400
2401         * platform/efl/EflKeyboardUtilities.cpp:
2402         (WebCore::createWindowsKeyMap):
2403         Added missing items of hashmap for virtual key code.
2404
2405 2012-09-17  Filip Pizlo  <fpizlo@apple.com>
2406
2407         Unreviewed, fix build.
2408
2409         * css/CSSRule.cpp:
2410         (SameSizeAsCSSRule):
2411
2412 2012-09-16  Mark Hahnenberg  <mhahnenberg@apple.com>
2413
2414         Delayed structure sweep can leak structures without bound
2415         https://bugs.webkit.org/show_bug.cgi?id=96546
2416
2417         Reviewed by Gavin Barraclough.
2418
2419         This patch gets rid of the separate Structure allocator in the MarkedSpace and adds two new destructor-only
2420         allocators. We now have separate allocators for our three types of objects: those objects with no destructors,
2421         those objects with destructors and with immortal structures, and those objects with destructors that don't have 
2422         immortal structures. All of the objects of the third type (destructors without immortal structures) now 
2423         inherit from a new class named JSDestructibleObject (which in turn is a subclass of JSNonFinalObject), which stores 
2424         the ClassInfo for these classes at a fixed offset for safe retrieval during sweeping/destruction.
2425
2426         No new tests.
2427
2428         * ForwardingHeaders/runtime/JSDestructableObject.h: Added.
2429         * bindings/js/JSDOMWrapper.h: Inherits from JSDestructibleObject.
2430         (JSDOMWrapper):
2431         (WebCore::JSDOMWrapper::JSDOMWrapper):
2432         * bindings/scripts/CodeGeneratorJS.pm: Add finalizers to anything that inherits from JSGlobalObject,
2433         e.g. JSDOMWindow and JSWorkerContexts. For those classes we also need to use the NEEDS_DESTRUCTOR macro.
2434         (GenerateHeader):
2435         * bridge/objc/objc_runtime.h: Inherit from JSDestructibleObject.
2436         (ObjcFallbackObjectImp):
2437         * bridge/objc/objc_runtime.mm:
2438         (Bindings):
2439         (JSC::Bindings::ObjcFallbackObjectImp::ObjcFallbackObjectImp):
2440         * bridge/runtime_array.cpp: Use a finalizer so that JSArray isn't forced to inherit from JSDestructibleObject.
2441         (JSC):
2442         (JSC::RuntimeArray::destroy):
2443         * bridge/runtime_array.h:
2444         (JSC::RuntimeArray::create):
2445         (JSC):
2446         * bridge/runtime_object.cpp: Inherit from JSDestructibleObject.
2447         (Bindings):
2448         (JSC::Bindings::RuntimeObject::RuntimeObject):
2449         * bridge/runtime_object.h:
2450         (RuntimeObject):
2451
2452 2012-09-17  Sheriff Bot  <webkit.review.bot@gmail.com>
2453
2454         Unreviewed, rolling out r128809.
2455         http://trac.webkit.org/changeset/128809
2456         https://bugs.webkit.org/show_bug.cgi?id=96958
2457
2458         Broke the Windows build. (Requested by andersca on #webkit).
2459
2460         * platform/win/BString.cpp:
2461         (WebCore::BString::~BString):
2462         (WebCore::BString::adoptBSTR):
2463         * platform/win/BString.h:
2464         (BString):
2465
2466 2012-09-17  Patrick Gansterer  <paroga@webkit.org>
2467
2468         [WIN] Use BString in favour of BSTR to improve memory management
2469         https://bugs.webkit.org/show_bug.cgi?id=93128
2470
2471         Reviewed by Anders Carlsson.
2472
2473         BString automatically calls SysFreeString() in its destructor which helps
2474         avoiding memory leaks. So it should be used instead of BSTR directly.
2475         Add operator& to BString to allow its usage for out parameters too (like COMPtr).
2476         This fixes already a few memory leaks in the existing code.
2477
2478         * platform/win/BString.cpp:
2479         (WebCore::BString::~BString):
2480         (WebCore::BString::adoptBSTR):
2481         (WebCore::BString::clear):
2482         (WebCore):
2483         * platform/win/BString.h:
2484         (BString):
2485         (WebCore::BString::operator&):
2486
2487 2012-09-17  Tony Chang  <tony@chromium.org>
2488
2489         Make CSS.PrefixUsage histogram smaller to save memory
2490         https://bugs.webkit.org/show_bug.cgi?id=96941
2491
2492         Reviewed by Ojan Vafai.
2493
2494         Each bucket costs about 12 bytes. This reduces the size of the histogram
2495         from 600 to 384, which will save about 2.5k per renderer and browser
2496         process.
2497
2498         In the long run, we could probably generate a table in makeprop.pl that
2499         only has the webkit prefix values to save even more memory (there are
2500         194 properties that start with -webkit).
2501
2502         No new tests, just refactoring.
2503
2504         * css/CSSParser.cpp:
2505         (WebCore::cssPropertyID):
2506
2507 2012-09-17  Rob Buis  <rbuis@rim.com>
2508
2509         [BlackBerry] Enable VIDEO_TRACK
2510         https://bugs.webkit.org/show_bug.cgi?id=96949
2511
2512         Reviewed by Antonio Gomes.
2513
2514         Turn on runtime feature for VIDEO_TRACK.
2515
2516         * bindings/generic/RuntimeEnabledFeatures.cpp:
2517         (WebCore):
2518
2519 2012-09-17  Adam Barth  <abarth@webkit.org>
2520
2521         Measure the usage of window.webkitIndexedDB so we can measure the transition to webkit.indexedDB
2522         https://bugs.webkit.org/show_bug.cgi?id=96943
2523
2524         Reviewed by Ojan Vafai.
2525
2526         We don't yet support window.indexedDB but we will once
2527         https://bugs.webkit.org/show_bug.cgi?id=96548 lands. This metric will
2528         help us measure the transition from the prefixed to the unprefixed API.
2529
2530         * Modules/indexeddb/DOMWindowIndexedDatabase.idl:
2531         * page/FeatureObserver.h:
2532
2533 2012-09-17  Adam Barth  <abarth@webkit.org>
2534
2535         Measure usage of the legacy WebKitBlobBuilder API in the hopes of being able to remove it
2536         https://bugs.webkit.org/show_bug.cgi?id=96939
2537
2538         Reviewed by Ojan Vafai.
2539
2540         In the course of standardization, the BlobBuilder API was removed in
2541         favor of just using the Blob constructor. This patch adds some
2542         measurement to see how often this legacy API is used. If the API is not
2543         used very much, we might be able to remove it.
2544
2545         * fileapi/WebKitBlobBuilder.cpp:
2546         (WebCore::WebKitBlobBuilder::create):
2547         * page/FeatureObserver.h:
2548
2549 2012-09-17  Joshua Bell  <jsbell@chromium.org>
2550
2551         IndexedDB: Result of IDBFactory.deleteDatabase() should be undefined, not null
2552         https://bugs.webkit.org/show_bug.cgi?id=96538
2553
2554         Reviewed by Tony Chang.
2555
2556         Trivial implementation change to match the spec.
2557
2558         Tests: storage/indexeddb/factory-deletedatabase-expected.html
2559                storage/indexeddb/intversion-long-queue-expected.html
2560
2561         * Modules/indexeddb/IDBDatabaseBackendImpl.cpp:
2562         (WebCore::IDBDatabaseBackendImpl::deleteDatabase):
2563
2564 2012-09-17  Rick Byers  <rbyers@chromium.org>
2565
2566         Allow gesture events to set active/hover state.
2567         https://bugs.webkit.org/show_bug.cgi?id=96060
2568
2569         Reviewed by Antonio Gomes.
2570
2571         Adds GestureTapDownCancel as a new PlatformGestureEvent type.  On ports
2572         that support gesture events, use GestureTapDown to trigger active/hover
2573         states, and GestureTap/GestureTapDownCancel to clear them.  This is
2574         superior to using touch events for a number of reasons:
2575           1) some ports (chromium) avoid sending touch events unless absolutely
2576           necessary, since they hurt scroll performance by blocking threaded
2577           scrolling.
2578           2) with touch, and element really shouldn't be 'active' when the user
2579           happens to be touching it while scrolling.  In that case they aren't
2580           'manipulating the element', they're manipulating the page or div that
2581           is scrolling.
2582           3) similarly, there may be other gestures that involve touching the
2583           element which aren't really about manipulating that element (eg.
2584           pinch to zoom).
2585
2586         Test: fast/events/touch/gesture/gesture-tap-active-state.html
2587         Test: fast/events/touch/gesture/gesture-tap-active-state-iframe.html
2588         * dom/GestureEvent.cpp:
2589         (WebCore::GestureEvent::create):
2590         * page/EventHandler.cpp:
2591         (WebCore::EventHandler::handleGestureEvent):
2592         (WebCore::EventHandler::handleTouchEvent):
2593         * platform/PlatformEvent.h:
2594
2595 2012-09-17  Alec Flett  <alecflett@chromium.org>
2596
2597         IndexedDB: Use ScriptValue instead of SerializedScriptValue for get/openCursor
2598         https://bugs.webkit.org/show_bug.cgi?id=95409
2599
2600         Reviewed by Kentaro Hara.
2601
2602         This reduces a bunch of serialization/deserialization when writing
2603         to objectstores with indexes.
2604
2605         No new tests, as this covers core functionality of IndexedDB, and
2606         almost every test would fail. Some likely tests that would fail
2607         fundamentally include:
2608
2609         storage/indexeddb/objectstore-basics.html
2610         storage/indexeddb/cursor-basics.html
2611         storage/indexeddb/index-basics.html
2612
2613         * Modules/indexeddb/IDBAny.cpp:
2614         (WebCore::IDBAny::scriptValue):
2615         (WebCore::IDBAny::integer):
2616         (WebCore):
2617         (WebCore::IDBAny::set):
2618         * Modules/indexeddb/IDBAny.h:
2619         (WebCore):
2620         (IDBAny):
2621         (WebCore::IDBAny::create):
2622         * Modules/indexeddb/IDBCursor.cpp:
2623         (WebCore::IDBCursor::setValueReady):
2624         * Modules/indexeddb/IDBCursor.h:
2625         (WebCore):
2626         (IDBCursor):
2627         * Modules/indexeddb/IDBDatabase.cpp:
2628         (WebCore::IDBDatabase::version):
2629         * Modules/indexeddb/IDBObjectStore.cpp:
2630         (WebCore):
2631         * Modules/indexeddb/IDBRequest.cpp:
2632         (WebCore::IDBRequest::setResultCursor):
2633         (WebCore::IDBRequest::onSuccess):
2634         (WebCore):
2635         (WebCore::IDBRequest::onSuccessInternal):
2636         (WebCore::IDBRequest::dispatchEvent):
2637         * Modules/indexeddb/IDBRequest.h:
2638         (IDBRequest):
2639         * Modules/indexeddb/IDBTransactionCallbacks.h:
2640         * bindings/v8/IDBBindingUtilities.cpp:
2641         (WebCore::deserializeIDBValue):
2642         (WebCore::injectIDBKeyIntoScriptValue):
2643         * bindings/v8/IDBBindingUtilities.h:
2644         (WebCore):
2645         * bindings/v8/custom/V8IDBAnyCustom.cpp:
2646         (WebCore::toV8):
2647
2648 2012-09-17  Adam Barth  <abarth@webkit.org>
2649
2650         We should make collecting metrics easier by adding an IDL attribute
2651         https://bugs.webkit.org/show_bug.cgi?id=96837
2652
2653         Reviewed by Kentaro Hara.
2654
2655         Currently it is too hard to set up a good measurement experiment to see
2656         whether we can safely remove a feature (including vendor-prefixed
2657         features). This patch introduces the [V8MeasureAs] IDL attribute to make
2658         that process easier.
2659
2660         When you add the [V8MeasureAs] IDL property to an API, we'll count what
2661         fraction of Page objects used that API.
2662
2663         * Modules/notifications/DOMWindowNotifications.idl:
2664         * bindings/scripts/CodeGeneratorV8.pm:
2665         (GenerateFeatureObservation):
2666         (GenerateNormalAttrGetter):
2667         (GenerateReplaceableAttrSetter):
2668         (GenerateNormalAttrSetter):
2669         (GenerateOverloadedFunctionCallback):
2670         (GenerateFunctionCallback):
2671         (GenerateConstructorCallback):
2672         (GenerateNamedConstructorCallback):
2673         * bindings/scripts/IDLAttributes.txt:
2674         * bindings/scripts/test/TestObj.idl:
2675         * bindings/scripts/test/V8/V8TestObj.cpp:
2676         (WebCore::TestObjV8Internal::testObjAttrAttrGetter):
2677         (WebCore::TestObjV8Internal::testObjAttrAttrSetter):
2678         (WebCore::TestObjV8Internal::objMethodCallback):
2679         (WebCore):
2680         * page/Page.h:
2681         (WebCore::Page::featureObserver):
2682         (Page):
2683
2684 2012-09-17  Bear Travis  <betravis@adobe.com>
2685
2686         [CSS Exclusions] Enable shape-inside for percentage lengths based on logical height
2687         https://bugs.webkit.org/show_bug.cgi?id=93547
2688
2689         Reviewed by Levi Weintraub.
2690
2691         Shape-inside needs to be passed the logical size to use when computing percentage
2692         based coordinates. The CSS Regions-specific method computeInitialRegionRangeForBlock
2693         has been generalized to updateRegionsAndExclusionsLogicalSize. This method takes
2694         the pre-child-layout logical width and height, and uses them to compute the logical
2695         width and height that regions and exclusions should use for layout. Regions use a
2696         block's maximum possible logical height to compute a region's maximum extent.
2697         Exclusions use a block's fixed logical width and height, or 0 if one does not exist,
2698         to resolve percentage-based shape lengths. The default logical size used for resolving
2699         percentage based coordinates is tested in shape-inside-percentage-auto.html.
2700
2701         Test: fast/exclusions/shape-inside/shape-inside-percentage.html
2702
2703         * rendering/RenderBlock.cpp:
2704         (WebCore::RenderBlock::updateRegionsAndExclusionsLogicalSize): Calculates the logical
2705         height regions and exclusions should use, and updates their layout sizes through
2706         computeExclusionShapeSize and computeRegionRangeForBlock.
2707         (WebCore):
2708         (WebCore::RenderBlock::computeExclusionShapeSize): Pass the appropriate logical size
2709         to exclusion shapes so they can resolve percentage based coordinates.
2710         (WebCore::RenderBlock::layoutBlock): Call the new updateRegionsAndExclusionsLogicalSize
2711         method.
2712         * rendering/RenderBlock.h:
2713         (RenderBlock):
2714         * rendering/RenderBox.cpp:
2715         (WebCore::percentageLogicalHeightIsResolvable): Determine if percentage lengths
2716         based on logical height can be resolved.
2717         (WebCore):
2718         (WebCore::RenderBox::percentageLogicalHeightIsResolvableFromBlock): Added declaration.
2719         * rendering/RenderBox.h:
2720         (RenderBox):
2721         * rendering/RenderDeprecatedFlexibleBox.cpp:
2722         (WebCore::RenderDeprecatedFlexibleBox::layoutBlock): Calling
2723         updateRegionsAndExclusionsLogicalSize rather than computeInitialRegionRangeForBlock.
2724         * rendering/RenderFlexibleBox.cpp:
2725         (WebCore::RenderFlexibleBox::layoutBlock): Ditto.
2726         * rendering/RenderGrid.cpp:
2727         (WebCore::RenderGrid::layoutBlock): Ditto.
2728
2729 2012-09-17  Vangelis Kokkevis  <vangelis@chromium.org>
2730
2731         [chromium] Add gpu_test trace events tracking the creation of a DrawingBuffer
2732         and Canvas2DLayerBridge. They will be used by browser tests to verify the
2733         existence of WebGL and accelerated canvas.
2734         https://bugs.webkit.org/show_bug.cgi?id=96871
2735
2736         Reviewed by James Robinson.
2737
2738         * platform/graphics/chromium/Canvas2DLayerBridge.cpp:
2739         (WebCore::Canvas2DLayerBridge::Canvas2DLayerBridge):
2740         * platform/graphics/chromium/DrawingBufferChromium.cpp:
2741         (WebCore::DrawingBuffer::DrawingBuffer):
2742
2743 2012-09-17  Bo Liu  <boliu@chromium.org>
2744
2745         Fix LoadImagesAutomatically cache behavior
2746         https://bugs.webkit.org/show_bug.cgi?id=96829
2747
2748         Reviewed by Adam Barth.
2749
2750         I broke the caching behavior of LoadImagesAutomatically in
2751         http://trac.webkit.org/changeset/128645
2752
2753         This restores the original behavior that AutoLoadImage does not block
2754         loads from memory cache.
2755
2756         Test: fast/loader/display-image-unset-allows-cached-image-load.html
2757
2758         * loader/cache/CachedResourceLoader.cpp:
2759         (WebCore::CachedResourceLoader::determineRevalidationPolicy):
2760         (WebCore::CachedResourceLoader::clientAllowsImage):
2761         (WebCore::CachedResourceLoader::shouldDeferImageLoad):
2762         * loader/cache/CachedResourceLoader.h:
2763         (CachedResourceLoader):
2764
2765 2012-09-17  Andrei Poenaru  <poenaru@adobe.com>
2766
2767         Web Inspector: Display Named Flows in the Tabbed Pane of the "CSS Named Flows" Drawer
2768         https://bugs.webkit.org/show_bug.cgi?id=96733
2769
2770         Reviewed by Alexander Pavlov.
2771
2772         Added functionality to the Tabbed Pane from the CSS Named Flows Drawer.
2773
2774         * English.lproj/localizedStrings.js:
2775         * WebCore.gypi:
2776         * WebCore.vcproj/WebCore.vcproj:
2777         * inspector/compile-front-end.py:
2778         * inspector/front-end/CSSNamedFlowCollectionsView.js:
2779         (WebInspector.CSSNamedFlowCollectionsView.prototype._appendNamedFlow):
2780         (WebInspector.CSSNamedFlowCollectionsView.prototype._removeNamedFlow):
2781         (WebInspector.CSSNamedFlowCollectionsView.prototype._updateNamedFlow):
2782         (WebInspector.CSSNamedFlowCollectionsView.prototype._showNamedFlow):
2783         (WebInspector.CSSNamedFlowCollectionsView.prototype._selectNamedFlowInSidebar):
2784         (WebInspector.CSSNamedFlowCollectionsView.prototype._selectNamedFlowTab):
2785         (WebInspector.CSSNamedFlowCollectionsView.prototype._tabSelected):
2786         (WebInspector.CSSNamedFlowCollectionsView.prototype._tabClosed):
2787         (WebInspector.CSSNamedFlowCollectionsView.prototype.wasShown):
2788         (WebInspector.CSSNamedFlowCollectionsView.prototype.willHide):
2789         (WebInspector.FlowTreeElement):
2790         (WebInspector.FlowTreeElement.prototype.setOverset):
2791         * inspector/front-end/CSSNamedFlowView.js: Added.
2792         (WebInspector.CSSNamedFlowView):
2793         (WebInspector.CSSNamedFlowView.prototype._createFlowTreeOutline):
2794         (WebInspector.CSSNamedFlowView.prototype._insertContentNode):
2795         (WebInspector.CSSNamedFlowView.prototype._insertRegion):
2796         (WebInspector.CSSNamedFlowView.prototype.get flow):
2797         (WebInspector.CSSNamedFlowView.prototype.set flow):
2798         (WebInspector.CSSNamedFlowView.prototype._updateRegionOverset):
2799         (WebInspector.CSSNamedFlowView.prototype._mergeContentNodes):
2800         (WebInspector.CSSNamedFlowView.prototype._mergeRegions):
2801         (WebInspector.CSSNamedFlowView.prototype._update):
2802         * inspector/front-end/ElementsPanel.js:
2803         * inspector/front-end/Images/regionEmpty.png: Added.
2804         * inspector/front-end/Images/regionFit.png: Added.
2805         * inspector/front-end/Images/regionOverset.png: Added.
2806         * inspector/front-end/WebKit.qrc:
2807         * inspector/front-end/cssNamedFlows.css:
2808         (.css-named-flow-collections-view .split-view-sidebar-left .named-flow-overflow::before, .css-named-flow-collections-view .region-empty:before, .css-named-flow-collections-view .region-fit::before, .css-named-flow-collections-view .region-overset::before):
2809         (.css-named-flow-collections-view .split-view-sidebar-left .named-flow-overflow::before):
2810         (.css-named-flow-collections-view .region-empty::before):
2811         (.css-named-flow-collections-view .region-fit::before):
2812         (.css-named-flow-collections-view .region-overset::before):
2813         (.css-named-flow-collections-view .split-view-contents .named-flow-element):
2814
2815 2012-09-17  Zan Dobersek  <zandobersek@gmail.com>
2816
2817         [Gtk] Remove configuration options for stable features that are currently enabled
2818         https://bugs.webkit.org/show_bug.cgi?id=96621
2819
2820         Reviewed by Martin Robinson.
2821
2822         Remove Automake conditional checking for features that are being removed in
2823         configure.ac. Unstable features that don't introduce dependencies are now
2824         disabled if necessary by being listed in the unstable feature defines overriding
2825         variable.
2826
2827         No new tests - no new functionality.
2828
2829         * GNUmakefile.am:
2830         * GNUmakefile.features.am:
2831         * bindings/gobject/GNUmakefile.am:
2832
2833 2012-09-17  Lauro Neto  <lauro.neto@openbossa.org>
2834
2835         [Qt] Cleanup/refactor the user agent detection code
2836         https://bugs.webkit.org/show_bug.cgi?id=96822
2837
2838         Unreviewed build fix.
2839
2840         Build fixes for Windows and Mac OS builds.
2841
2842         * platform/qt/UserAgentQt.cpp:
2843         (WebCore::UserAgentQt::standardUserAgent):
2844
2845             QLatin1String doesn't have a default contructor. Replaced #ifdef with #if.
2846
2847 2012-09-17  Lauro Neto  <lauro.neto@openbossa.org>
2848
2849         Updates to the useragent patch
2850
2851         [Qt] Cleanup/refactor the user agent detection code
2852         https://bugs.webkit.org/show_bug.cgi?id=96822
2853
2854         Reviewed by Simon Hausmann.
2855
2856         Replaced Q_WS_*/Q_OS_* with WTF OS/CPU detection macros.
2857         Cleanup the check for unsupported OS.
2858         Replaced QString.arg() usage with simple string concatenation.
2859
2860         * platform/qt/UserAgentQt.cpp:
2861         (WebCore::UserAgentQt::standardUserAgent):
2862
2863 2012-09-17  Sheriff Bot  <webkit.review.bot@gmail.com>
2864
2865         Unreviewed, rolling out r128759.
2866         http://trac.webkit.org/changeset/128759
2867         https://bugs.webkit.org/show_bug.cgi?id=96929
2868
2869         New assertion hit on multiple platforms (Requested by carewolf
2870         on #webkit).
2871
2872         * dom/Document.cpp:
2873         (WebCore::Document::updateHoverActiveState):
2874
2875 2012-09-17  Ilya Tikhonovsky  <loislo@chromium.org>
2876
2877         Web Inspector: NMI: now when we can detect instrumented classes we can
2878         remove addInstrumentedMember and use addMember for everything.
2879         https://bugs.webkit.org/show_bug.cgi?id=96913
2880
2881         Reviewed by Yury Semikhatsky.
2882
2883         * bindings/v8/DOMDataStore.cpp:
2884         (WebCore::DOMDataStore::reportMemoryUsage):
2885         * bindings/v8/IntrusiveDOMWrapperMap.h:
2886         * bindings/v8/V8PerIsolateData.cpp:
2887         (WebCore::V8PerIsolateData::reportMemoryUsage):
2888         * css/CSSBorderImageSliceValue.cpp:
2889         (WebCore::CSSBorderImageSliceValue::reportDescendantMemoryUsage):
2890         * css/CSSCalculationValue.cpp:
2891         * css/CSSCanvasValue.cpp:
2892         (WebCore::CSSCanvasValue::reportDescendantMemoryUsage):
2893         * css/CSSCharsetRule.cpp:
2894         (WebCore::CSSCharsetRule::reportDescendantMemoryUsage):
2895         * css/CSSComputedStyleDeclaration.cpp:
2896         (WebCore::CSSComputedStyleDeclaration::reportMemoryUsage):
2897         * css/CSSCrossfadeValue.cpp:
2898         (WebCore::CSSCrossfadeValue::reportDescendantMemoryUsage):
2899         * css/CSSFontFaceRule.cpp:
2900         (WebCore::CSSFontFaceRule::reportDescendantMemoryUsage):
2901         * css/CSSFontFaceSrcValue.cpp:
2902         (WebCore::CSSFontFaceSrcValue::reportDescendantMemoryUsage):
2903         * css/CSSFunctionValue.cpp:
2904         (WebCore::CSSFunctionValue::reportDescendantMemoryUsage):
2905         * css/CSSGradientValue.cpp:
2906         (WebCore::CSSGradientColorStop::reportMemoryUsage):
2907         (WebCore::CSSGradientValue::reportBaseClassMemoryUsage):
2908         (WebCore::CSSLinearGradientValue::reportDescendantMemoryUsage):
2909         (WebCore::CSSRadialGradientValue::reportDescendantMemoryUsage):
2910         * css/CSSImageSetValue.cpp:
2911         (WebCore::CSSImageSetValue::ImageWithScale::reportMemoryUsage):
2912         * css/CSSImageValue.cpp:
2913         (WebCore::CSSImageValue::reportDescendantMemoryUsage):
2914         * css/CSSImportRule.cpp:
2915         (WebCore::CSSImportRule::reportDescendantMemoryUsage):
2916         * css/CSSMediaRule.cpp:
2917         (WebCore::CSSMediaRule::reportDescendantMemoryUsage):
2918         * css/CSSPageRule.cpp:
2919         (WebCore::CSSPageRule::reportDescendantMemoryUsage):
2920         * css/CSSPrimitiveValue.cpp:
2921         (WebCore::CSSPrimitiveValue::reportDescendantMemoryUsage):
2922         * css/CSSProperty.cpp:
2923         (WebCore::CSSProperty::reportMemoryUsage):
2924         * css/CSSReflectValue.cpp:
2925         (WebCore::CSSReflectValue::reportDescendantMemoryUsage):
2926         * css/CSSRule.cpp:
2927         (WebCore::CSSRule::reportBaseClassMemoryUsage):
2928         * css/CSSRuleList.h:
2929         * css/CSSStyleRule.cpp:
2930         (WebCore::CSSStyleRule::reportDescendantMemoryUsage):
2931         * css/CSSStyleSheet.cpp:
2932         (WebCore::CSSStyleSheet::reportMemoryUsage):
2933         * css/CSSValue.cpp:
2934         (WebCore::TextCloneCSSValue::reportDescendantMemoryUsage):
2935         * css/CSSVariableValue.h:
2936         (WebCore::CSSVariableValue::reportDescendantMemoryUsage):
2937         * css/FontFeatureValue.cpp:
2938         (WebCore::FontFeatureValue::reportDescendantMemoryUsage):
2939         * css/FontValue.cpp:
2940         (WebCore::FontValue::reportDescendantMemoryUsage):
2941         * css/MediaList.cpp:
2942         (WebCore::MediaList::reportMemoryUsage):
2943         * css/MediaQuery.cpp:
2944         (WebCore::MediaQuery::reportMemoryUsage):
2945         * css/MediaQueryExp.cpp:
2946         (WebCore::MediaQueryExp::reportMemoryUsage):
2947         * css/PropertySetCSSStyleDeclaration.cpp:
2948         (WebCore::PropertySetCSSStyleDeclaration::reportMemoryUsage):
2949         (WebCore::StyleRuleCSSStyleDeclaration::reportMemoryUsage):
2950         (WebCore::InlineCSSStyleDeclaration::reportMemoryUsage):
2951         * css/ShadowValue.cpp:
2952         (WebCore::ShadowValue::reportDescendantMemoryUsage):
2953         * css/StylePropertySet.cpp:
2954         (WebCore::StylePropertySet::reportMemoryUsage):
2955         * css/StyleResolver.cpp:
2956         (WebCore::StyleResolver::collectMatchingRulesForList):
2957         * css/StyleRule.cpp:
2958         (WebCore::StyleRule::reportDescendantMemoryUsage):
2959         (WebCore::StyleRulePage::reportDescendantMemoryUsage):
2960         (WebCore::StyleRuleFontFace::reportDescendantMemoryUsage):
2961         (WebCore::StyleRuleMedia::reportDescendantMemoryUsage):
2962         (WebCore::StyleRuleRegion::reportDescendantMemoryUsage):
2963         * css/StyleRuleImport.cpp:
2964         (WebCore::StyleRuleImport::reportDescendantMemoryUsage):
2965         * css/StyleSheetContents.cpp:
2966         (WebCore::StyleSheetContents::reportMemoryUsage):
2967         * css/WebKitCSSKeyframeRule.cpp:
2968         (WebCore::StyleKeyframe::reportMemoryUsage):
2969         (WebCore::WebKitCSSKeyframeRule::reportDescendantMemoryUsage):
2970         * css/WebKitCSSKeyframesRule.cpp:
2971         (WebCore::StyleRuleKeyframes::reportDescendantMemoryUsage):
2972         (WebCore::WebKitCSSKeyframesRule::reportDescendantMemoryUsage):
2973         * css/WebKitCSSRegionRule.cpp:
2974         (WebCore::WebKitCSSRegionRule::reportDescendantMemoryUsage):
2975         * css/WebKitCSSSVGDocumentValue.cpp:
2976         (WebCore::WebKitCSSSVGDocumentValue::reportDescendantMemoryUsage):
2977         * css/WebKitCSSShaderValue.cpp:
2978         (WebCore::WebKitCSSShaderValue::reportDescendantMemoryUsage):
2979         * dom/Attribute.h:
2980         (WebCore::Attribute::reportMemoryUsage):
2981         * dom/CharacterData.cpp:
2982         (WebCore::CharacterData::reportMemoryUsage):
2983         * dom/ContainerNode.h:
2984         (WebCore::ContainerNode::reportMemoryUsage):
2985         * dom/Document.cpp:
2986         (WebCore::Document::reportMemoryUsage):
2987         * dom/Element.h:
2988         (WebCore::Element::reportMemoryUsage):
2989         * dom/ElementAttributeData.cpp:
2990         (WebCore::ElementAttributeData::reportMemoryUsage):
2991         * dom/Event.cpp:
2992         (WebCore::Event::reportMemoryUsage):
2993         * dom/Node.cpp:
2994         (WebCore::Node::reportMemoryUsage):
2995         * dom/QualifiedName.cpp:
2996         (WebCore::QualifiedName::reportMemoryUsage):
2997         (WebCore::QualifiedName::QualifiedNameImpl::reportMemoryUsage):
2998         * html/HTMLImageElement.cpp:
2999         (WebCore::HTMLImageElement::reportMemoryUsage):
3000         * loader/DocumentLoader.cpp:
3001         (WebCore::DocumentLoader::reportMemoryUsage):
3002         * loader/FrameLoader.cpp:
3003         (WebCore::FrameLoader::reportMemoryUsage):
3004         * loader/MainResourceLoader.cpp:
3005         (WebCore::MainResourceLoader::reportMemoryUsage):
3006         * loader/ResourceLoader.cpp:
3007         (WebCore::ResourceLoader::reportMemoryUsage):
3008         * loader/SubresourceLoader.cpp:
3009         (WebCore::SubresourceLoader::reportMemoryUsage):
3010         * loader/SubstituteData.cpp:
3011         (WebCore::SubstituteData::reportMemoryUsage):
3012         * loader/cache/CachedCSSStyleSheet.cpp:
3013         (WebCore::CachedCSSStyleSheet::reportMemoryUsage):
3014         * loader/cache/CachedFont.cpp:
3015         (WebCore::CachedFont::reportMemoryUsage):
3016         * loader/cache/CachedImage.cpp:
3017         (WebCore::CachedImage::reportMemoryUsage):
3018         * loader/cache/CachedResource.cpp:
3019         (WebCore::CachedResource::reportMemoryUsage):
3020         * loader/cache/CachedResourceHandle.cpp:
3021         (WebCore::CachedResourceHandleBase::reportMemoryUsage):
3022         * loader/cache/CachedResourceLoader.cpp:
3023         (WebCore::CachedResourceLoader::reportMemoryUsage):
3024         * loader/cache/CachedSVGDocument.cpp:
3025         (WebCore::CachedSVGDocument::reportMemoryUsage):
3026         * loader/cache/CachedScript.cpp:
3027         (WebCore::CachedScript::reportMemoryUsage):
3028         * loader/cache/CachedShader.cpp:
3029         (WebCore::CachedShader::reportMemoryUsage):
3030         * loader/cache/CachedXSLStyleSheet.cpp:
3031         (WebCore::CachedXSLStyleSheet::reportMemoryUsage):
3032         * loader/cache/MemoryCache.cpp:
3033         (WebCore::MemoryCache::reportMemoryUsage):
3034         * page/Frame.cpp:
3035         (WebCore::Frame::reportMemoryUsage):
3036         * platform/KURL.cpp:
3037         (WebCore::KURL::reportMemoryUsage):
3038         * platform/KURLGoogle.cpp:
3039         (WebCore::KURLGooglePrivate::reportMemoryUsage):
3040         * platform/KURLWTFURLImpl.h:
3041         (WebCore::KURLWTFURLImpl::reportMemoryUsage):
3042         * platform/TreeShared.h:
3043         (WebCore::TreeShared::reportMemoryUsage):
3044         * platform/graphics/CrossfadeGeneratedImage.cpp:
3045         (WebCore::CrossfadeGeneratedImage::reportMemoryUsage):
3046         * platform/graphics/Image.cpp:
3047         (WebCore::Image::reportMemoryUsage):
3048         * platform/network/ResourceRequestBase.cpp:
3049         (WebCore::ResourceRequestBase::reportMemoryUsage):
3050         * platform/network/ResourceResponseBase.cpp:
3051         (WebCore::ResourceResponseBase::reportMemoryUsage):
3052         * rendering/style/DataRef.h:
3053         (WebCore::DataRef::reportMemoryUsage):
3054         * rendering/style/RenderStyle.cpp:
3055         (WebCore::RenderStyle::reportMemoryUsage):
3056         * rendering/style/StyleRareInheritedData.cpp:
3057         (WebCore::StyleRareInheritedData::reportMemoryUsage):
3058         * rendering/style/StyleRareNonInheritedData.cpp:
3059         (WebCore::StyleRareNonInheritedData::reportMemoryUsage):
3060         * svg/SVGPaint.cpp:
3061         (WebCore::SVGPaint::reportDescendantMemoryUsage):
3062         * svg/graphics/SVGImage.cpp:
3063         (WebCore::SVGImage::reportMemoryUsage):
3064
3065 2012-09-17  Allan Sandfeld Jensen  <allan.jensen@nokia.com>
3066
3067         [TouchAdjustment] Adjusted point outside bounds for non-rectilinear targets
3068         https://bugs.webkit.org/show_bug.cgi?id=96098
3069
3070         Reviewed by Antonio Gomes.
3071
3072         Simplifies how snapTo tries to restrict the adjustment to the touch-area, and 
3073         at the same fix it to give better guarantees.
3074
3075         Test: touchadjustment/rotated-node.html
3076
3077         * page/TouchAdjustment.cpp:
3078         (WebCore::TouchAdjustment::snapTo):
3079
3080 2012-09-17  Filip Spacek  <fspacek@rim.com>
3081
3082         [BlackBerry] Use glDeleteProgram to delete OpenGL shader programs.
3083         https://bugs.webkit.org/show_bug.cgi?id=96771
3084
3085         Reviewed by Rob Buis.
3086
3087         Reviewed internally by Arvid Nilsson.
3088
3089         * platform/graphics/blackberry/EGLImageLayerWebKitThread.cpp:
3090         (WebCore::EGLImageLayerWebKitThread::EGLImageLayerWebKitThread):
3091         (WebCore::EGLImageLayerWebKitThread::~EGLImageLayerWebKitThread):
3092         (WebCore::EGLImageLayerWebKitThread::deleteFrontBuffer):
3093         (WebCore::EGLImageLayerWebKitThread::createShaderIfNeeded):
3094         (WebCore::EGLImageLayerWebKitThread::blitToFrontBuffer):
3095         * platform/graphics/blackberry/EGLImageLayerWebKitThread.h:
3096         (EGLImageLayerWebKitThread):
3097
3098 2012-09-17  Allan Sandfeld Jensen  <allan.jensen@nokia.com>
3099
3100         Revert r127457 and following fixes due to several hit-testing regressions
3101         https://bugs.webkit.org/show_bug.cgi?id=96830
3102
3103         Reviewed by Antonio Gomes.
3104
3105         The revert misssed one related follow-up.
3106
3107         * dom/Document.cpp:
3108         (WebCore::Document::updateHoverActiveState):
3109
3110 2012-09-17  Allan Sandfeld Jensen  <allan.jensen@nokia.com>
3111
3112         [TouchAdjustment] Adjusted point outside bounds for non-rectilinear targets
3113         https://bugs.webkit.org/show_bug.cgi?id=96098
3114
3115         Reviewed by Antonio Gomes.
3116
3117         Simplifies how snapTo tries to restrict the adjustment to the touch-area, and 
3118         at the same fix it to give better guarantees.
3119
3120         Test: touchadjustment/rotated-node.html
3121
3122         * page/TouchAdjustment.cpp:
3123         (WebCore::TouchAdjustment::snapTo):
3124
3125 2012-09-17  Yury Semikhatsky  <yurys@chromium.org>
3126
3127         Unreviewed. Fix Mac compilation.
3128
3129         * bindings/v8/DOMDataStore.h: added missing virtual modifier.
3130         (DOMDataStore):
3131
3132 2012-09-17  Yury Semikhatsky  <yurys@chromium.org>
3133
3134         Web Inspector: NMI don't double count fields of StaticDOMDataStore
3135         https://bugs.webkit.org/show_bug.cgi?id=96911
3136
3137         Reviewed by Alexander Pavlov.
3138
3139         Provided two separate memory usage reporting routines for static and
3140         scoped DOM data stores.
3141
3142         * bindings/v8/DOMDataStore.cpp:
3143         * bindings/v8/DOMDataStore.h:
3144         (DOMDataStore):
3145         * bindings/v8/ScopedDOMDataStore.cpp:
3146         (WebCore::ScopedDOMDataStore::reportMemoryUsage):
3147         (WebCore):
3148         * bindings/v8/ScopedDOMDataStore.h:
3149         (ScopedDOMDataStore):
3150         * bindings/v8/StaticDOMDataStore.cpp:
3151         (WebCore::StaticDOMDataStore::reportMemoryUsage):
3152         (WebCore):
3153         * bindings/v8/StaticDOMDataStore.h:
3154         (StaticDOMDataStore):
3155
3156 2012-09-17  Christophe Dumez  <christophe.dumez@intel.com>
3157
3158         [EFL] autoscroll-in-textarea.html fails on EFL
3159         https://bugs.webkit.org/show_bug.cgi?id=94150
3160
3161         Reviewed by Kenneth Rohde Christiansen.
3162
3163         Do not call adjustTextAreaStyle() from RenderThemeEfl::adjustTextAreaStyle().
3164         This is consistent with Mac port implementation.
3165
3166         Calling adjustTextAreaStyle() causes the TextArea in the test to display 6.5
3167         rows instead of the 6 that are requested. This causes the test case to fail
3168         because the top row that is being displayed when scrolling down is different
3169         than the one expected.
3170
3171         Test: fast/events/autoscroll-in-textarea.html
3172
3173         * platform/efl/RenderThemeEfl.cpp:
3174         (WebCore::RenderThemeEfl::adjustTextAreaStyle):
3175
3176 2012-09-17  Vsevolod Vlasov  <vsevik@chromium.org>
3177
3178         Web Inspector: XHR replay fixes: should remove replayed xhr from memory cache, should not assert.
3179         https://bugs.webkit.org/show_bug.cgi?id=96904
3180
3181         Reviewed by Yury Semikhatsky.
3182
3183         Replayed request is now removed from meory cache before replaying.
3184         Request body is now set to 0 when it was not present in original request.
3185
3186         Test: http/tests/inspector/network/network-xhr-replay.html
3187
3188         * inspector/InspectorResourceAgent.cpp:
3189         (WebCore::InspectorResourceAgent::replayXHR):
3190         * xml/XMLHttpRequest.cpp:
3191         (WebCore::XMLHttpRequest::sendFromInspector):
3192
3193 2012-09-17  Alejandro Piñeiro  <apinheiro@igalia.com>
3194
3195         AX: Regression (r126369) - toggle buttons no longer return accessible titles
3196         https://bugs.webkit.org/show_bug.cgi?id=94858
3197
3198         Reviewed by Chris Fleizach.
3199
3200         After the addition of the ToggleButtonRole some logic broke because some parts
3201         of the code were assuming/waiting for a ButtonRole
3202
3203         Test: platform/gtk/accessibility/aria-toggle-button-with-title.html
3204
3205         * accessibility/AccessibilityNodeObject.cpp:
3206         (WebCore::AccessibilityNodeObject::isImageButton): using
3207         isButton instead of a ButtonRole comparison
3208         (WebCore::AccessibilityNodeObject::isPressed): using isButton
3209         instead of a ButtonRole comparison
3210         (WebCore::AccessibilityNodeObject::actionElement):
3211         ToggleButtonRole also contemplated in order to call or not toElement
3212         (WebCore::AccessibilityNodeObject::title): ToggleButtonRole also
3213         contemplated in order to call or not textUnderElement
3214         * accessibility/AccessibilityObject.cpp:
3215         (WebCore::AccessibilityObject::actionVerb): buttonAction also
3216         assigned to ToggleButtonRole
3217         (WebCore::AccessibilityObject::isButton): isButton now returns
3218         that an object is a button if it is a ButtonRole, a
3219         PopUpButtonRole or a ToggleButtonRole
3220         * accessibility/AccessibilityObject.h:
3221         (AccessibilityObject): isButton is now implemented on the .c file
3222         * accessibility/AccessibilityRenderObject.cpp:
3223         (WebCore::AccessibilityRenderObject::actionVerb): ToggleButtonRole
3224         also returns a buttonAction
3225
3226 2012-09-14  Alexander Pavlov  <apavlov@chromium.org>
3227
3228         Web Inspector: Group selectors to highlight matched selector in the Styles pane of Elements Panel
3229         https://bugs.webkit.org/show_bug.cgi?id=96626
3230
3231         Reviewed by Vsevolod Vlasov.
3232
3233         Introduced evaluation of element.webkitMatchesSelector() for every part of a selector group (delimited by commas).
3234         Non-matching selectors in groups are dimmed. If element styles have changed so that the element matches none of the selectors,
3235         the entire group is rendered as matched.
3236
3237         * inspector/front-end/StylesSidebarPane.js:
3238         (WebInspector.StylesSidebarPane.prototype._innerRebuildUpdate.markCallback):
3239         (WebInspector.StylesSidebarPane.prototype._innerRebuildUpdate):
3240         (WebInspector.StylesSidebarPane.prototype._rebuildStyleRules):
3241         (WebInspector.StylePropertiesSection):
3242         (WebInspector.StylePropertiesSection.prototype._markMatchedSelectorsInGroup.mycallback):
3243         (WebInspector.StylePropertiesSection.prototype._markMatchedSelectorsInGroup.trim):
3244         (WebInspector.StylePropertiesSection.prototype._markMatchedSelectorsInGroup.resolvedCallback):
3245         (WebInspector.StylePropertiesSection.prototype._markMatchedSelectorsInGroup):
3246         (WebInspector.StylePropertiesSection.prototype._markMatchedSelectorsInGroup.matchesCallback):
3247         (WebInspector.StylePropertiesSection.prototype.startEditingSelector):
3248         (WebInspector.StylePropertiesSection.prototype._moveEditorFromSelector.markCallback):
3249         (WebInspector.StylePropertiesSection.prototype._moveEditorFromSelector):
3250         (WebInspector.StylePropertiesSection.prototype.editingSelectorCancelled):
3251         * inspector/front-end/elementsPanel.css:
3252         (.styles-section .selector):
3253         (.styles-section .selector-matches):
3254
3255 2012-09-17  Mike West  <mkwst@chromium.org>
3256
3257         Don't GC img elements blocked by CSP until error events fire.
3258         https://bugs.webkit.org/show_bug.cgi?id=94677
3259
3260         Reviewed by Jochen Eisinger.
3261
3262         Currently, the GC checks that no load events are pending for an image
3263         element before reclaiming its memory. It's not, however, checking that
3264         error events are taken care of. This leads to the potential of firing an
3265         event on a DOM element that we've already collected. That's a Bad Thing.
3266
3267         This patch adjusts the check to catch error events as well as load
3268         events, which should ensure that the element isn't collected until it's
3269         really ready. As a drive-by, it also changes the name of the check to
3270         'hasPendingActivity' from 'hasPendingLoadEvent' for clarity.
3271
3272         http/tests/security/contentSecurityPolicy/register-bypassing-scheme.html
3273         should no longer crash, and the new
3274         http/tests/security/contentSecurityPolicy/img-blocked-no-gc-crash.html
3275         and fast/events/onerror-img-after-gc.html shouldn't crash either.
3276
3277         Tests: fast/events/onerror-img-after-gc.html
3278                http/tests/security/contentSecurityPolicy/img-blocked-no-gc-crash.html
3279
3280         * bindings/v8/V8GCController.cpp:
3281         (WebCore::calculateGroupId):
3282             Switch to using ImageLoader::hasPendingActivity().
3283         * html/HTMLImageElement.h:
3284         (WebCore::HTMLImageElement::hasPendingActivity):
3285             Switch to using ImageLoader::hasPendingActivity().
3286         * loader/ImageLoader.h:
3287         (WebCore::ImageLoader::hasPendingActivity):
3288             Added a check against pending error events in order to ensure that
3289             elements aren't garbage collected prematurely. Aslo renamed from
3290             ImageLoader::hasPendingLoadEvent for clarity.
3291         * svg/SVGImageElement.cpp:
3292         (WebCore::SVGImageElement::haveLoadedRequiredResources):
3293             Switch to using ImageLoader::hasPendingActivity().
3294
3295 2012-09-17  Philip Rogers  <pdr@google.com>
3296
3297         Make SVGPathSegList.appendItem O(1) instead of O(n)
3298         https://bugs.webkit.org/show_bug.cgi?id=94048
3299
3300         Reviewed by Nikolas Zimmermann.
3301
3302         Paths in SVG can be specified with a String (with the d attribute) or
3303         with an SVGPathSegList. In SVGPathElement a single representation is
3304         maintained: an SVGPathByteStream. To keep the byte stream synchronized with
3305         the d attribute and the PathSegList, this byte stream is
3306         rebuilt on every operation. As a result, any modification to the
3307         path is an O(n) operation.
3308
3309         This patch takes advantage of the stream aspect of SVGPathByteStream
3310         to make SVGPathSegList.append an O(1) operation instead of O(n).
3311         When an SVGPathSeg is appended to an SVGPathSegList, this patch parses
3312         the SVGPathSeg and directly appends the resulting bytes to the
3313         byte stream.
3314
3315         To achieve this some plumbing has been added to pass more information
3316         about the actual path changes from the SVGPathSegListTearOff to the
3317         SVGPathElement: instead of the generic commitChange() this patch adds
3318         commitChange(ListModification type). If we decide to change our
3319         internal path data structure in the future, this additional commitChange
3320         function can be used to pass the information needed to make
3321         SVGPathSegList synchronization faster.
3322
3323         SVG Path Benchmark (http://bl.ocks.org/1296930) showing just the
3324         appendItem() time used in building a 5000 segment path (avg of 3 runs):
3325         WebKit without patch: 562 ms
3326         Firefox 18.01a:       55 ms
3327         Opera 12.50 internal: 27 ms
3328         WebKit with patch:    7 ms
3329
3330         Test: perf/svg-path-appenditem.html
3331
3332             This test proves the claim: SVGPathSegList.appendItem is now O(1).
3333             Additional tests that appendItem works are covered with existing tests.
3334
3335         * svg/SVGPathByteStream.h:
3336         (WebCore::SVGPathByteStream::append):
3337
3338             This additional append method allows an SVGPathByteStream to be
3339             appended to another.
3340
3341         * svg/SVGPathElement.cpp:
3342         (WebCore::SVGPathElement::pathSegListChanged):
3343
3344             By passing the extra ListModification type to pathSegListChanged,
3345             SVGPathElement is now able to only synchronize the parts of the byte stream
3346             that actually changed. In this patch only append is treated
3347             differently but one can imagine other performance improvements this
3348             additional information allows.
3349
3350         * svg/SVGPathElement.h:
3351         (SVGPathElement):
3352         * svg/SVGPathParser.cpp:
3353         (WebCore::SVGPathParser::parsePathDataFromSource):
3354
3355             During normal SVGPathSegList parsing we enforce that the path start with a moveto
3356             command. This function has been expanded to make that optional so that parsing
3357             can be performed elsewhere in the path (e.g., in the middle).
3358
3359         * svg/SVGPathParser.h:
3360         (SVGPathParser):
3361         * svg/SVGPathSegList.cpp:
3362         (WebCore::SVGPathSegList::commitChange):
3363         * svg/SVGPathSegList.h:
3364         (SVGPathSegList):
3365         * svg/SVGPathSegWithContext.h:
3366         (WebCore::SVGPathSegWithContext::commitChange):
3367         * svg/SVGPathUtilities.cpp:
3368         (WebCore::appendSVGPathByteStreamFromSVGPathSeg):
3369
3370             This function reuses the SVGPathSegList parsing infrastructure
3371             to parse an SVGPathSegList with just the single SVGPathSeg that
3372             is being appended. The resulting byte stream can then be appended
3373             to the result path byte stream.
3374
3375         (WebCore):
3376         * svg/SVGPathUtilities.h:
3377         (WebCore):
3378         * svg/properties/SVGListProperty.h:
3379         (WebCore::SVGListProperty::appendItemValues):
3380         (WebCore::SVGListProperty::appendItemValuesAndWrappers):
3381         (WebCore::SVGListProperty::commitChange):
3382         (SVGListProperty):
3383         * svg/properties/SVGPathSegListPropertyTearOff.h:
3384         (WebCore::SVGPathSegListPropertyTearOff::commitChange):
3385         (SVGPathSegListPropertyTearOff):
3386
3387 2012-09-16  James Robinson  <jamesr@chromium.org>
3388
3389         Chromium win build fix - listing a file that doesn't exist is a fatal errors in the msvs gyp generator.
3390
3391         * WebCore.gypi:
3392
3393 2012-09-16  Dan Bernstein  <mitz@apple.com>
3394
3395         REGRESSION (r126763): css1/pseudo/firstline.html fails when using the complex text code path
3396         https://bugs.webkit.org/show_bug.cgi?id=96890
3397
3398         Reviewed by Sam Weinig.
3399
3400         Test: fast/text/stale-TextLayout-from-first-line.html
3401
3402         When a first-line style specifies a font, different pieces of the same RenderText can be
3403         laid out using different fonts, requiring a differet TextLayout for each piece.
3404
3405         * rendering/RenderBlock.h:
3406         (RenderTextInfo): Added m_font data member.
3407         * rendering/RenderBlockLineLayout.cpp:
3408         (WebCore::RenderBlock::RenderTextInfo::RenderTextInfo): Added initializer for new data member.
3409         (WebCore::RenderBlock::LineBreaker::nextLineBreak): Added code to update the text layout in
3410         renderTextInfo if the font has changed.
3411
3412 2012-09-16  Kalev Lember  <kalevlember@gmail.com>
3413
3414         [GTK] Missing dllexport causing linking errors on Windows platform
3415         https://bugs.webkit.org/show_bug.cgi?id=96888
3416
3417         Reviewed by Kentaro Hara.
3418
3419         Define BUILDING_WebCore during the build to properly mark
3420         FrameDestructionObserver symbols with __declspec(dllexport) attribute.
3421
3422         * GNUmakefile.am:
3423
3424 2012-09-15  Mike West  <mkwst@chromium.org>
3425
3426         Pause inspector when inline scripts are blocked by Content Security Policy.
3427         https://bugs.webkit.org/show_bug.cgi?id=93865
3428
3429         Reviewed by Pavel Feldman.
3430
3431         When Content Security Policy blocks an inline script that's been
3432         injected after the document is parsed, a fairly unhelpful console
3433         warning is generated; it points at line 1, regardless of where the error
3434         occurred. This patch adjusts CSP to not only warn on the console, but
3435         also to notify the inspector that it should pause execution if the
3436         developer has toggled "Break on Exceptions". Developers will have a
3437         better chance of tracking down the error, as they'll have a complete
3438         call stack to work with.
3439