[HTMLTemplateElement] processTemplateEndTag() needs to check for template in html...
[WebKit-https.git] / Source / WebCore / ChangeLog
1 2013-03-08  Rafael Weinstein  <rafaelw@chromium.org>
2
3         [HTMLTemplateElement] processTemplateEndTag() needs to check for template in html scope
4         https://bugs.webkit.org/show_bug.cgi?id=111880
5
6         Reviewed by Eric Seidel.
7
8         Currently, </template> handling exits with an error if there is not a template tag "in scope"
9         which will be true if there is a table (for instance) below a template. This makes it so that
10         the search (correctly) examines the entire element stack.
11
12         Tests added to html5lib testing library.
13
14         * html/parser/HTMLTreeBuilder.cpp:
15         (WebCore::HTMLTreeBuilder::processTemplateEndTag):
16
17 2013-03-08  Eric Seidel  <eric@webkit.org>
18
19         BackgroundHTMLParser should be able to atomize well-known strings
20         https://bugs.webkit.org/show_bug.cgi?id=107337
21
22         Reviewed by Adam Barth.
23
24         Testing this patch easily requires applying bug 107236 locally
25         to remove all the rendering noise from Parser/html-threaded-parser.html.
26
27         This patch adds a new class HTMLIdentifier which allows us to avoid
28         allocating strings for known tag/attribute names from HTMLNames.
29
30         There is still a lot of meat on this bone, but I think it's important to
31         land something "smallish" to start and iterate from there.
32
33         This took Parser/html-threaded-parser.html from:
34         median= 443.726500002 ms, stdev= 7.25002679952 ms, min= 430.244000047 ms, max= 455.511000007 ms
35         to:
36         median= 427.849500004 ms, stdev= 9.96967058292 ms, min= 417.914000049 ms, max= 461.528000014 ms
37         on my MBP.
38
39         * CMakeLists.txt:
40         * GNUmakefile.list.am:
41         * Target.pri:
42         * WebCore.gypi:
43         * WebCore.vcproj/WebCore.vcproj:
44         * WebCore.vcxproj/WebCore.vcxproj:
45         * html/parser/AtomicHTMLToken.h:
46         (WebCore::AtomicHTMLToken::AtomicHTMLToken):
47         * html/parser/BackgroundHTMLParser.cpp:
48         (WebCore::tokenExitsForeignContent):
49         (WebCore::tokenExitsSVG):
50         (WebCore::tokenExitsMath):
51         (WebCore::BackgroundHTMLParser::simulateTreeBuilder):
52         * html/parser/CSSPreloadScanner.cpp:
53         (WebCore::CSSPreloadScanner::scan):
54         * html/parser/CSSPreloadScanner.h:
55         (WebCore):
56         (CSSPreloadScanner):
57         * html/parser/CompactHTMLToken.cpp:
58         (SameSizeAsCompactHTMLToken):
59         (WebCore::CompactHTMLToken::CompactHTMLToken):
60         * html/parser/CompactHTMLToken.h:
61         (WebCore::CompactHTMLToken::Attribute::Attribute):
62         (Attribute):
63         (WebCore::CompactHTMLToken::data):
64         (WebCore::CompactHTMLToken::publicIdentifier):
65         (CompactHTMLToken):
66         * html/parser/HTMLDocumentParser.cpp:
67         (WebCore::HTMLDocumentParser::startBackgroundParser):
68         * html/parser/HTMLIdentifier.cpp: Added.
69         (WebCore):
70         (WebCore::identifierTable):
71         (WebCore::HTMLIdentifier::hasIndex):
72         (WebCore::HTMLIdentifier::findIndex):
73         (WebCore::nameForIndex):
74         (WebCore::HTMLIdentifier::asString):
75         (WebCore::HTMLIdentifier::asStringImpl):
76         (WebCore::HTMLIdentifier::addNames):
77         (WebCore::HTMLIdentifier::init):
78         * html/parser/HTMLIdentifier.h: Added.
79         (WebCore):
80         (HTMLIdentifier):
81         (WebCore::HTMLIdentifier::HTMLIdentifier):
82         (WebCore::HTMLIdentifier::isSafeToSendToAnotherThread):
83         * html/parser/HTMLParserIdioms.cpp:
84         (WebCore::threadSafeEqual):
85         (WebCore::threadSafeMatch):
86         * html/parser/HTMLParserIdioms.h:
87         (WebCore):
88         (WebCore::threadSafeHTMLNamesMatch):
89         * html/parser/HTMLPreloadScanner.cpp:
90         (WebCore::TokenPreloadScanner::tagIdFor):
91         (WebCore::TokenPreloadScanner::StartTagScanner::match):
92         (TokenPreloadScanner::StartTagScanner):
93         (WebCore::TokenPreloadScanner::StartTagScanner::processAttribute):
94         * html/parser/HTMLPreloadScanner.h:
95
96 2013-03-08  Brandon Jones  <bajones@google.com>
97
98         Check to ensure MultisampleRenderbuffer creation succeeds
99         https://bugs.webkit.org/show_bug.cgi?id=111780
100
101         Reviewed by Dean Jackson.
102
103         On OSX systems using AMD graphics chips the allocation of large
104         Multisample Renderbuffers in Chromium would fail without any indication
105         of failure. Attempting to draw to the buffer resulted in garbage being
106         rendered onscreen. This could be reproduced by opening a full-page
107         WebGL app and pressing (Command + "-") several times. This patch adds an
108         additional check during DrawingBuffer resize to verify that the resized
109         buffer is valid. 
110
111         * platform/graphics/gpu/DrawingBuffer.cpp:
112         (WebCore):
113         (WebCore::DrawingBuffer::checkBufferIntegrity):
114         (WebCore::DrawingBuffer::reset):
115         * platform/graphics/gpu/DrawingBuffer.h:
116         (DrawingBuffer):
117
118 2013-03-08  Harald Alvestrand  <hta@chromium.org>
119
120         Implemented new API for RTCStatsReport object.
121         https://bugs.webkit.org/show_bug.cgi?id=110333
122
123         Removed RTCStatsElement object, moved its interface to
124         RTCStatsReport. Preserved some interfaces for
125         backwards compatibility; will be removed in a later patch.
126
127         Reviewed by Adam Barth.
128
129         Tested by extensions to RTCPeerConnection-stats test.
130
131         * Modules/mediastream/RTCStatsElement.cpp: Removed.
132         * Modules/mediastream/RTCStatsElement.h: Removed.
133         * Modules/mediastream/RTCStatsElement.idl: Removed.
134         * Modules/mediastream/RTCStatsReport.cpp:
135         (WebCore::RTCStatsReport::create):
136         (WebCore::RTCStatsReport::RTCStatsReport):
137         (WebCore):
138         (WebCore::RTCStatsReport::names):
139         (WebCore::RTCStatsReport::local):
140         (WebCore::RTCStatsReport::remote):
141         (WebCore::RTCStatsReport::addStatistic):
142         (WebCore::RTCStatsReport::addElement):
143         * Modules/mediastream/RTCStatsReport.h:
144         (RTCStatsReport):
145         (WebCore::RTCStatsReport::timestamp):
146         (WebCore::RTCStatsReport::id):
147         (WebCore::RTCStatsReport::stat):
148         * Modules/mediastream/RTCStatsReport.idl:
149         * Modules/mediastream/RTCStatsResponse.cpp:
150         (WebCore::RTCStatsResponse::namedItem):
151         (WebCore):
152         (WebCore::RTCStatsResponse::addReport):
153         (WebCore::RTCStatsResponse::addStatistic):
154         * Modules/mediastream/RTCStatsResponse.h:
155         (RTCStatsResponse):
156         * Modules/mediastream/RTCStatsResponse.idl:
157         * WebCore.gypi:
158         * platform/chromium/support/WebRTCStatsResponse.cpp:
159         (WebKit::WebRTCStatsResponse::addReport):
160         (WebKit):
161         (WebKit::WebRTCStatsResponse::addStatistic):
162         (WebKit::WebRTCStatsResponse::addElement):
163         * platform/mediastream/RTCStatsResponseBase.h:
164         (RTCStatsResponseBase):
165
166 2013-03-08  Eric Seidel  <eric@webkit.org>
167
168         Free up background parser's checkpoints when speculation succeeds
169         https://bugs.webkit.org/show_bug.cgi?id=110547
170
171         Reviewed by Adam Barth.
172
173         This should be a memory (and possible perf) win while parsing
174         pages, as we will no longer hold multiple copies of every
175         source byte during the whole parse.
176
177         Many LayoutTests exercise this code path, and I've manually (debugger and printf)
178         that we're hitting this code, but we'll have to wait for the memory/perf bots
179         to tell us if this shows up as a win.
180
181         We only bother to message the parser at the end of a speculation chain, so as not
182         to send too many messages to the background parser.
183
184         * html/parser/BackgroundHTMLInputStream.cpp:
185         (WebCore::BackgroundHTMLInputStream::BackgroundHTMLInputStream):
186         (WebCore::BackgroundHTMLInputStream::invalidateCheckpointsUpThrough):
187         (WebCore):
188         (WebCore::BackgroundHTMLInputStream::rewindTo):
189         * html/parser/BackgroundHTMLInputStream.h:
190         (BackgroundHTMLInputStream):
191         (Checkpoint):
192         (WebCore::BackgroundHTMLInputStream::Checkpoint::isNull):
193         (WebCore::BackgroundHTMLInputStream::Checkpoint::clear):
194         * html/parser/BackgroundHTMLParser.cpp:
195         (WebCore::BackgroundHTMLParser::passedCheckpoint):
196         (WebCore):
197         * html/parser/BackgroundHTMLParser.h:
198         (BackgroundHTMLParser):
199         * html/parser/HTMLDocumentParser.cpp:
200         (WebCore::HTMLDocumentParser::pumpPendingSpeculations):
201
202 2013-03-08  Chandra Shekar Vallala  <brk376@motorola.com>
203
204         [chromium] Keydown event for 'shift+alt' returns win keycode instead of 'alt'
205         https://bugs.webkit.org/show_bug.cgi?id=111112
206
207         Reviewed by Tony Chang.
208
209         Return windows keycode of Alt incase of GDK_META_L, GDK_META_R. This matches
210         the firefox behaviour in linux platform.
211
212         Added Manual Test : ManualTests/shift-alt-key-event.html
213         Try press Shift then alt key. The test passes if the shiftKey, altKey values
214         of JSKeyEvent are true and keycode/which is 18.
215
216         * platform/chromium/KeyCodeConversionGtk.cpp:
217         (WebCore::windowsKeyCodeForKeyEvent):
218
219 2013-03-08  Mike West  <mkwst@chromium.org>
220
221         CSP: 'eval()' is blocked in report-only mode.
222         https://bugs.webkit.org/show_bug.cgi?id=111867
223
224         Reviewed by Adam Barth.
225
226         Setting a 'Content-Security-Policy-Report-Only' header should not have
227         any effect on what a page actually executes. Currently, however, setting
228         a 'script-src' directive that doesn't whitelist 'unsafe-eval' actually
229         blocks 'eval()' on the page. This patch fixes that by checking whether
230         we're in report-only mode before turning 'eval()' off inside the script
231         engine.
232
233         This leaves us in a weird state, however. We don't currently have any
234         mechanism of explaining to the VM that we just want to be notified of
235         'eval()' usage. I've filed http://wkbug.com/111869 to cover this
236         aspect.
237
238         Test: http/tests/security/contentSecurityPolicy/eval-allowed-in-report-only-mode.html
239
240         * page/ContentSecurityPolicy.cpp:
241         (WebCore::ContentSecurityPolicy::didReceiveHeader):
242             For each policy we parse, check that we're only turning off eval in
243             the VM when we're in enforce mode. If we're in report-only mode,
244             skip it.
245
246 2013-03-08  Christian Biesinger  <cbiesinger@chromium.org>
247
248         REGRESSION (r143643): <button> should support ::first-line and ::first-letter
249         https://bugs.webkit.org/show_bug.cgi?id=111782
250
251         Reviewed by Ojan Vafai.
252
253         Test: fast/forms/button-first-line-first-letter.html
254
255         * rendering/RenderBlock.cpp:
256         (WebCore::RenderBlock::firstLineBlock):
257         (WebCore::findFirstLetterBlock):
258         Add isRenderButton to the first-line and first-letter checks that
259         don't allow ::first-* styles for flexbox.
260
261 2013-03-08  Geoffrey Garen  <ggaren@apple.com>
262
263         Removed an out-of-date comment from SharedTimer
264         https://bugs.webkit.org/show_bug.cgi?id=111875
265
266         Reviewed by Mark Hahnenberg.
267
268         Even if we surround each call to an ObjC interface with an autorelease
269         pool, it's still nice to have one at top-level entry points like
270         timers, to avoid turning a single mistake into a long-term leak.
271
272         * platform/ios/SharedTimerIOS.mm:
273         (WebCore::timerFired):
274         * platform/mac/SharedTimerMac.mm:
275         (WebCore::timerFired):
276
277 2013-03-08  Benjamin Poulain  <benjamin@webkit.org>
278
279         [Mac] Add a feature flag for 'view-mode' Media Feature, disable it on Mac
280         https://bugs.webkit.org/show_bug.cgi?id=111297
281
282         Reviewed by Kenneth Rohde Christiansen.
283
284         The 'view-mode' Media Feature spec is implemented in WebCore but
285         there is no WebKit support for it on Mac.
286         Because of this, we always lie and report a windowed view mode.
287
288         This patch add a feature flag for the feature and disable it on
289         Mac so that we stop reporting incorrect default values.
290
291         * WebCore.exp.in:
292         * css/CSSValueKeywords.in:
293         * css/MediaFeatureNames.h:
294         (MediaFeatureNames):
295         * css/MediaQueryEvaluator.cpp:
296         * css/MediaQueryExp.cpp:
297         (WebCore::featureWithCSSValueID):
298         (WebCore::featureWithoutValue):
299         * page/Page.cpp:
300         (WebCore::Page::Page):
301         * page/Page.h:
302         (Page):
303
304 2013-03-08  Ryosuke Niwa  <rniwa@webkit.org>
305
306         After sending message, Mail changes formatting
307         https://bugs.webkit.org/show_bug.cgi?id=111360
308
309         Reviewed by Enrica Casucci.
310
311         Added makeInsertedContentRoundTrippableWithHTMLTreeBuilder to move prohibited children (e.g. p, h1, etc...)
312         out of paragraph elements to run immediately after the fragment insertion. This function splits trees and
313         moves prohibited children out of paragraph elements to keep the tree isomorphic under HTML serialization and
314         parsing. Unfortunately, there are many other DOM tree constructs we need to fix to make the subtree truly
315         isomorphic but this is a step forward.
316
317         Test: editing/pasteboard/pasting-into-p-should-not-nest-p.html
318
319         * editing/ReplaceSelectionCommand.cpp:
320         (WebCore::isProhibitedParagraphChild): Added. Matches the list at
321         https://dvcs.w3.org/hg/editing/raw-file/57abe6d3cb60/editing.html#prohibited-paragraph-child
322         except main element, which is currently missing in the specification.
323         (WebCore::ReplaceSelectionCommand::makeInsertedContentRoundTrippableWithHTMLTreeBuilder): Added.
324         (WebCore::ReplaceSelectionCommand::moveNodeOutOfAncestor): Added.
325         (WebCore::ReplaceSelectionCommand::doApply): Call moveProhibitedChildrenOutOfParagraphElements.
326
327         * editing/ReplaceSelectionCommand.h:
328         (ReplaceSelectionCommand):
329
330 2013-03-08  Eric Seidel  <eric@webkit.org>
331
332         AtomicHTMLToken should not be heap allocated or RefCounted
333         https://bugs.webkit.org/show_bug.cgi?id=111250
334
335         Reviewed by Adam Barth.
336
337         It was clearly an oversight on our part to ever make AtomicHTMLToken ref-counted.
338         We don't need the actual "token" saved, just enough of it to recreate a fake token.
339
340         This removed many more mallocs than I thought it would, for a nice little speed win.
341         Before:
342         median= 450.482999993 ms, stdev= 7.2381436538 ms, min= 436.084999994 ms, max= 464.968999964 ms
343         After:
344         median= 436.41600004 ms, stdev= 5.71435647554 ms, min= 427.160999971 ms, max= 446.753000026 ms
345
346         * html/parser/AtomicHTMLToken.h:
347         (AtomicHTMLToken):
348         * html/parser/HTMLConstructionSite.cpp:
349         (WebCore::HTMLConstructionSite::createElementFromSavedToken):
350         * html/parser/HTMLDocumentParser.cpp:
351         (WebCore::HTMLDocumentParser::constructTreeFromHTMLToken):
352         (WebCore::HTMLDocumentParser::constructTreeFromCompactHTMLToken):
353         * html/parser/HTMLElementStack.cpp:
354         (WebCore::HTMLElementStack::isHTMLIntegrationPoint):
355         * html/parser/HTMLFormattingElementList.cpp:
356         (WebCore):
357         (WebCore::HTMLFormattingElementList::tryToEnsureNoahsArkConditionQuickly):
358         (WebCore::HTMLFormattingElementList::ensureNoahsArkCondition):
359         * html/parser/HTMLStackItem.h:
360         (WebCore::HTMLStackItem::create):
361         (WebCore::HTMLStackItem::localName):
362         (WebCore::HTMLStackItem::attributes):
363         (WebCore::HTMLStackItem::getAttributeItem):
364         (HTMLStackItem):
365         (WebCore::HTMLStackItem::hasLocalName):
366         (WebCore::HTMLStackItem::hasTagName):
367         (WebCore::HTMLStackItem::HTMLStackItem):
368         * html/parser/HTMLTreeBuilder.cpp:
369         (WebCore::HTMLTreeBuilder::processFakeStartTag):
370         (WebCore::HTMLTreeBuilder::processFakeEndTag):
371         (WebCore::HTMLTreeBuilder::processFakePEndTagIfPInButtonScope):
372         (WebCore::HTMLTreeBuilder::processStartTagForInBody):
373         (WebCore::HTMLTreeBuilder::processStartTag):
374         (WebCore::HTMLTreeBuilder::processEndTagForInBody):
375         (WebCore::HTMLTreeBuilder::processEndTag):
376         (WebCore::HTMLTreeBuilder::defaultForBeforeHTML):
377         (WebCore::HTMLTreeBuilder::defaultForBeforeHead):
378         (WebCore::HTMLTreeBuilder::defaultForInHead):
379         (WebCore::HTMLTreeBuilder::defaultForInHeadNoscript):
380         (WebCore::HTMLTreeBuilder::defaultForAfterHead):
381         * html/parser/TextDocumentParser.cpp:
382         (WebCore::TextDocumentParser::insertFakePreElement):
383
384 2013-03-08  Roger Fong  <roger_fong@apple.com>
385
386         Makefile fixes.
387
388         * WebCore.vcxproj/WebCore.make:
389
390 2013-03-07  Emil A Eklund  <eae@chromium.org>
391
392         [sub-pixel] Rounding error in table cell height calculation causes unnecessary scrollbar
393         https://bugs.webkit.org/show_bug.cgi?id=111794
394
395         Reviewed by Levi Weintraub.
396         
397         In RenderTableCell::logicalHeightForRowSizing the
398         adjustedLogicalHeight is calculated from the logicalHeight and
399         intrinsic padding and is then returned and floored. This can
400         cause cause the cell to be slightly smaller (0.5px) than the
401         element it contains.
402
403         Test: fast/sub-pixel/table-cell-height.html
404
405         * rendering/RenderTableCell.h:
406         (WebCore::RenderTableCell::logicalHeightForRowSizing):
407         Change to use pixelSnapped version of logicalHeight method and
408         change signature to return int as the only caller immediately
409         down-casts the result to an int.
410
411 2013-03-08  Christian Biesinger  <cbiesinger@chromium.org>
412
413         RenderFullScreen needs to clear override sizes when exiting full screen
414         https://bugs.webkit.org/show_bug.cgi?id=111775
415
416         Reviewed by Ojan Vafai.
417
418         Test: fullscreen/full-screen-with-flex-item.html
419
420         * rendering/RenderFullScreen.cpp:
421         (RenderFullScreen::unwrapRenderer):
422         RenderFullScreen is a flexbox, so it will potentially set override
423         sizes on its children while in fullscreen mode. When we exit
424         fullscreen mode, we need to clear this override size, otherwise the
425         the leftover override size may affect layout. See the testcase for an
426         example.
427
428 2013-03-08  Julien Chaffraix  <jchaffraix@webkit.org>
429
430         [CSS Grid Layout] Handle 2 positions with one 'auto' properly
431         https://bugs.webkit.org/show_bug.cgi?id=111653
432
433         Reviewed by Tony Chang.
434
435         The rendering code was making the assumption that we have one position.
436         Thus it couldn't fully match what the specification wants as the 2 opposite
437         positions are required to resolve either position in several cases (e.g.
438         1 / span 2, auto / 'c').
439
440         This change introduces resolveGridPositionsFromStyle to do both opposite
441         positions resolution in one pass and thus handling more cases.
442
443         Test: fast/css-grid-layout/grid-item-spanning-resolution.html
444
445         * rendering/RenderGrid.cpp:
446         (WebCore::RenderGrid::maximumIndexInDirection):
447         (WebCore::RenderGrid::placeItemsOnGrid):
448         (WebCore::RenderGrid::placeSpecifiedMajorAxisItemsOnGrid):
449         (WebCore::RenderGrid::placeAutoMajorAxisItemOnGrid):
450         Updated the above functions to rely on resolveGridPositionsFromStyle.
451
452         (WebCore::RenderGrid::resolveGridPositionsFromStyle):
453         Added this new function that handle the correct resolution.
454
455         (WebCore::RenderGrid::resolveGridPositionFromStyle):
456         Updated the ASSERT to match the new code flow.
457
458         * rendering/RenderGrid.h:
459         (WebCore::RenderGrid::GridSpan::GridSpan):
460         Introduced this new struct to hold the 2 positions along one axis.
461
462 2013-03-08  Dominic Cooney  <dominicc@chromium.org>
463
464         RenderTextControlSingleLine should not assume that its text element has a renderer
465         https://bugs.webkit.org/show_bug.cgi?id=111826
466
467         Reviewed by Ojan Vafai.
468
469         Tests: fast/forms/search/search-autoscroll-hidden-decoration-container-crash.html
470                fast/forms/search/search-hide-decoration-container-crash.html
471                fast/forms/search/search-scroll-hidden-decoration-container-crash.html
472
473         * rendering/RenderTextControlSingleLine.cpp:
474         (WebCore::RenderTextControlSingleLine::layout):
475         (WebCore::RenderTextControlSingleLine::controlClipRect):
476         (WebCore::RenderTextControlSingleLine::autoscroll):
477         (WebCore::RenderTextControlSingleLine::scroll):
478
479 2013-03-08  Joshua Bell  <jsbell@chromium.org>
480
481         IndexedDB: Use WeakPtr for Factory-to-BackingStore reference
482         https://bugs.webkit.org/show_bug.cgi?id=111459
483
484         Reviewed by Adam Barth.
485
486         IDBFactoryBackendImpl maintains a map of backing stores - if another database in the same
487         origin is opened, the backing store instance must be re-used). This was a map to raw
488         pointers so that the backing store can be collected when all database references are
489         dropped. The map was maintained manually by passing the factory to the IDBBackingStore which
490         would add/remove itself on creation/destruction.
491
492         Replace this with a HashMap<WeakPtr<T>>. This simplifies the plumbing; map entries
493         "leak" but are purged on subsequent opens.
494
495         Added webkit_unit_test (Chromium port) to verify refcounts.
496
497         * Modules/indexeddb/IDBBackingStore.cpp:
498         (WebCore::IDBBackingStore::IDBBackingStore): No need to notify factory of lifetime.
499         (WebCore::IDBBackingStore::~IDBBackingStore): Ditto.
500         (WebCore::IDBBackingStore::open): Ditto.
501         * Modules/indexeddb/IDBBackingStore.h: No reference to the factory, but...
502         (WebCore::IDBBackingStore::createWeakPtr): Do need to expose weak pointers for the factory to hold.
503         * Modules/indexeddb/IDBFactoryBackendImpl.cpp:
504         (WebCore::cleanWeakMap): Helper function to scrub a HashMap<WeakPtr<T>> of empty pointers.
505         May move to WTF when we've learned how general it is, or come up with a dedicated WeakPtrHashMap type.
506         (WebCore::IDBFactoryBackendImpl::openBackingStore): WeakPtr fu.
507         * Modules/indexeddb/IDBFactoryBackendImpl.h:
508         (IDBFactoryBackendImpl): Remove plumbing methods.
509
510 2013-03-08  John Mellor  <johnme@chromium.org>
511
512         @media queries do not take zooming into account
513         https://bugs.webkit.org/show_bug.cgi?id=53186
514
515         Reviewed by Kenneth Rohde Christiansen.
516
517         Fixes @media width and height to take into account full page zoom, by
518         adding code to MediaQueryEvaluator's width/heightMediaFeatureEval,
519         corresponding to the existing code in Element::clientWidth which makes
520         document.documentElement.clientWidth take into account page zoom.
521
522         Test: fast/media/mq-width-pagezoom.html
523
524         * css/MediaQueryEvaluator.cpp:
525         (WebCore::heightMediaFeatureEval):
526         (WebCore::widthMediaFeatureEval):
527
528 2013-03-08  Carlos Garcia Campos  <cgarcia@igalia.com>
529
530         [BlackBerry] Add stubs for DNSResolveQueue platform specific methods
531         https://bugs.webkit.org/show_bug.cgi?id=111841
532
533         Reviewed by Rob Buis.
534
535         Add empty implementations of
536         DNSResolveQueue::platformProxyIsEnabledInSystemPreferences() and
537         DNSResolveQueue::platformResolve() to DNSBlackBerry.cpp to make it
538         build.
539
540         * platform/network/blackberry/DNSBlackBerry.cpp:
541         (WebCore::DNSResolveQueue::platformProxyIsEnabledInSystemPreferences):
542         (WebCore::DNSResolveQueue::platformResolve):
543
544 2013-03-08  Glenn Hartmann  <hartmanng@chromium.org>
545
546        Adding a hook to collect data for a Google UMA histogram to track when
547        m_needsCompositedScrolling is turned on and off.
548        https://bugs.webkit.org/show_bug.cgi?id=111725
549
550        Reviewed by Julien Chaffraix.
551
552        We want to keep track of this information to quantify the effects of a
553        few patches that will cause us to opt in to composited scrolling.
554        Specifically, we want to measure the effects of
555        https://bugs.webkit.org/show_bug.cgi?id=109302,
556        https://bugs.webkit.org/show_bug.cgi?id=109966,
557        https://bugs.webkit.org/show_bug.cgi?id=109591, and
558        https://bugs.webkit.org/show_bug.cgi?id=107618.
559
560        We do this by measuring a per-layer boolean value, and comparing the
561        ratio between number of layers opted in and number of layers that remain
562        uncomposited. We hope the relative number of layers opting in will
563        increase after the relevant patches land and are enabled.
564
565        Unfortunately implementing extra statistics is impractical at the
566        moment since most of the actionable relevant data is expensive to
567        compute. For example, it would be useful to know if the layers that opt
568        out do so because of invisible or non-overlapping layers that cause a
569        potential stacking container's children to be discontiguous, because we
570        would potentially be able to mitigate the problem. However, this would
571        add considerable overhead to perform overlap testing just to gather
572        data.
573
574        No new tests (no change in behaviour).
575
576        * rendering/RenderLayer.cpp:
577        (WebCore::RenderLayer::updateNeedsCompositedScrolling):
578
579 2013-03-08  Alberto Garcia  <agarcia@igalia.com>
580
581         [BlackBerry] GraphicsContext: rename addRoundedRectClip to clipRoundedRect
582         https://bugs.webkit.org/show_bug.cgi?id=111852
583
584         Reviewed by Rob Buis.
585
586         This changed in r139353.
587
588         * platform/graphics/blackberry/GraphicsContextBlackBerry.cpp:
589         (WebCore::GraphicsContext::clipRoundedRect):
590
591 2013-03-08  Alberto Garcia  <agarcia@igalia.com>
592
593         [BlackBerry] Add BlendMode parameter to GraphicsContext::setPlatformCompositeOperation
594         https://bugs.webkit.org/show_bug.cgi?id=111840
595
596         Reviewed by Rob Buis.
597
598         This parameter was added in r137011.
599
600         * platform/graphics/blackberry/GraphicsContextBlackBerry.cpp:
601         (WebCore::GraphicsContext::setPlatformCompositeOperation):
602
603 2013-03-08  Alberto Garcia  <agarcia@igalia.com>
604
605         [BlackBerry] Remove unused GraphicsContext::addInnerRoundedRectClip()
606         https://bugs.webkit.org/show_bug.cgi?id=111838
607
608         Reviewed by Rob Buis.
609
610         This was removed in r139138.
611
612         * platform/graphics/blackberry/GraphicsContextBlackBerry.cpp:
613
614 2013-03-08  Alberto Garcia  <agarcia@igalia.com>
615
616         [BlackBerry] GraphicsContext: add fillRule parameter to clip() and canvasClip()
617         https://bugs.webkit.org/show_bug.cgi?id=111836
618
619         Reviewed by Rob Buis.
620
621         This parameter was added in r139967.
622
623         * platform/graphics/blackberry/PathBlackBerry.cpp:
624         (WebCore):
625         (WebCore::GraphicsContext::clip):
626         (WebCore::GraphicsContext::canvasClip):
627
628 2013-03-08  Vsevolod Vlasov  <vsevik@chromium.org>
629
630         Web Inspector: Get rid of file system ids and use file pathes as uri for file based uiSourceCodes.
631         https://bugs.webkit.org/show_bug.cgi?id=111753
632
633         Reviewed by Pavel Feldman.
634
635         * inspector/front-end/FileSystemMapping.js:
636         (WebInspector.FileSystemMappingImpl):
637         (WebInspector.FileSystemMappingImpl.prototype._loadFromSettings.get this):
638         (WebInspector.FileSystemMappingImpl.prototype._loadFromSettings):
639         (WebInspector.FileSystemMappingImpl.prototype._saveToSettings):
640         (WebInspector.FileSystemMappingImpl.prototype.set addFileSystemMapping):
641         (WebInspector.FileSystemMappingImpl.prototype.removeFileSystemMapping):
642         (WebInspector.FileSystemMappingImpl.prototype.fileSystemPaths):
643         (WebInspector.FileSystemMappingImpl.prototype.fileSystemPathForPrefix):
644         * inspector/front-end/FileSystemProjectDelegate.js:
645         (WebInspector.FileSystemProjectDelegate.projectId):
646         (WebInspector.FileSystemProjectDelegate.prototype.id):
647         (WebInspector.FileSystemProjectDelegate.prototype.fileSystemPath):
648         (WebInspector.FileSystemWorkspaceProvider):
649         (WebInspector.FileSystemWorkspaceProvider.prototype._fileSystemAdded):
650         (WebInspector.FileSystemWorkspaceProvider.prototype._fileSystemRemoved):
651         (WebInspector.FileSystemWorkspaceProvider.prototype.fileSystemPath):
652         * inspector/front-end/IsolatedFileSystemManager.js:
653         (WebInspector.IsolatedFileSystemManager.prototype._innerAddFileSystem):
654         (WebInspector.IsolatedFileSystemManager.prototype._fileSystemRemoved):
655         * inspector/front-end/Workspace.js:
656         (WebInspector.Workspace.prototype.uiSourceCodeForURL):
657
658 2013-03-08  Vsevolod Vlasov  <vsevik@chromium.org>
659
660         Web Inspector: Polish TabbedEditorContaner and ScriptsNavigator behavior.
661         https://bugs.webkit.org/show_bug.cgi?id=111732
662
663         Reviewed by Pavel Feldman.
664
665         Resources matching inspectedPageURL are always expanded in NavigatorView now.
666         Snippets tab in scripts navigator is not automatically opened anymore.
667         Cleared saved TabbedEditorContainer history because it might have been corrupted due to errors in earlier versions.
668         Snippets are not revealed in TabbedEditorContainer anymore unless they were actually selected by user or there is no other tabs opened.
669
670         * inspector/front-end/NavigatorView.js:
671         (WebInspector.NavigatorView):
672         (WebInspector.NavigatorView.prototype.addUISourceCode):
673         (WebInspector.NavigatorView.prototype._inspectedURLChanged):
674         (WebInspector.NavigatorView.prototype.revealUISourceCode):
675         (WebInspector.NavigatorView.prototype.removeUISourceCode):
676         (WebInspector.NavigatorFolderTreeElement.prototype.onattach):
677         (WebInspector.NavigatorUISourceCodeTreeNode.prototype.uiSourceCode):
678         (WebInspector.NavigatorUISourceCodeTreeNode.prototype.reveal):
679         * inspector/front-end/ScriptsNavigator.js:
680         (WebInspector.ScriptsNavigator.prototype.revealUISourceCode):
681         * inspector/front-end/ScriptsPanel.js:
682         (WebInspector.ScriptsPanel.prototype._showFile):
683         * inspector/front-end/Settings.js:
684         (WebInspector.VersionController.prototype._updateVersionFrom1To2):
685         * inspector/front-end/TabbedEditorContainer.js:
686         (WebInspector.TabbedEditorContainer.prototype.addUISourceCode.tabId.this._tabIds.get this):
687         (WebInspector.TabbedEditorContainer.prototype.addUISourceCode):
688         (WebInspector.TabbedEditorContainer.History.prototype._rebuildItemIndex):
689
690 2013-03-08  Vsevolod Vlasov  <vsevik@chromium.org>
691
692         Web Inspector: Add shortcut for running a snippet.
693         https://bugs.webkit.org/show_bug.cgi?id=111680
694
695         Reviewed by Pavel Feldman.
696
697         Added Ctrl/Cmd+Enter as a shortcut for running a snippet.
698
699         * inspector/front-end/SnippetJavaScriptSourceFrame.js:
700         (WebInspector.SnippetJavaScriptSourceFrame):
701         (WebInspector.SnippetJavaScriptSourceFrame.prototype._runButtonClicked):
702         (WebInspector.SnippetJavaScriptSourceFrame.prototype._runSnippet):
703         (WebInspector.SnippetJavaScriptSourceFrame.prototype._onKeyDown):
704
705 2013-03-08  Philip Rogers  <pdr@google.com>
706
707         Prevent infinite loop in SVG use cycle detection
708         https://bugs.webkit.org/show_bug.cgi?id=111822
709
710         Reviewed by Stephen Chenney.
711
712         SVG use cycle detection depended on idForStyleResolution() which differs from
713         getIdAttribute() in quirks mode. During use tree cycle detection, this difference
714         resulted in an infinite loop because idForStyleResolution() used lower-cased id
715         attributes. This patch removes an existing fixme for this and switches to using
716         getIdAttribute().
717
718         Test: svg/custom/use-cycle-detection.html
719
720         * svg/SVGUseElement.cpp:
721         (WebCore::SVGUseElement::hasCycleUseReferencing):
722
723 2013-03-08  Yuki Sekiguchi  <yuki.sekiguchi@access-company.com>
724
725         When we set word-wrap: break-word and xml:space="preserve" to svg text element, the text is collapsed.
726         https://bugs.webkit.org/show_bug.cgi?id=111675
727
728         Reviewed by Stephen Chenney.
729
730         RenderSVGText define its size when it laid out its first line at SVGRootInlineBox::computePerCharacterLayoutInformation().
731
732         In the following spec, SVG don't perform automatic line break or word wrapping.
733         http://www.w3.org/TR/SVG/text.html#Introduction
734         > SVG performs no automatic line breaking or word wrapping.
735         However, when we set word-wrap: break-word and xml:space="preserve" to svg text element, RenderBlock::LineBreaker::nextLineBreak() breaks the text.
736         This make single character lines and make RenderSVGText narrow.
737
738         We must ignore word-wrap property to make the text a single line.
739
740         We always disable break words and break all in nextLineBreak() when the object is SVGInlineText.
741
742         Test: svg/text/preserve-break-word.html
743
744         * rendering/RenderBlockLineLayout.cpp:
745         (WebCore::RenderBlock::LineBreaker::nextSegmentBreak): Disable break words and break all when we process SVG Text.
746
747 2013-03-08  Allan Sandfeld Jensen  <allan.jensen@digia.com>
748
749         [Qt] HTML5 video - sound volume bar out of widget
750         https://bugs.webkit.org/show_bug.cgi?id=108213
751
752         Reviewed by Jocelyn Turcotte.
753
754         Since we use Safari shadow DOM for media controls, follow
755         the overall layout of Safari media control CSS.
756
757         * css/mediaControlsQt.css:
758         (audio::-webkit-media-controls-panel, video::-webkit-media-controls-panel):
759         (audio::-webkit-media-controls-mute-button, video::-webkit-media-controls-mute-button):
760         (audio::-webkit-media-controls-play-button, video::-webkit-media-controls-play-button):
761         (audio::-webkit-media-controls-timeline-container, video::-webkit-media-controls-timeline-container):
762         (audio::-webkit-media-controls-current-time-display, video::-webkit-media-controls-current-time-display):
763         (audio::-webkit-media-controls-time-remaining-display, video::-webkit-media-controls-time-remaining-display):
764         (audio::-webkit-media-controls-timeline, video::-webkit-media-controls-timeline):
765         (audio::-webkit-media-controls-volume-slider-container, video::-webkit-media-controls-volume-slider-container):
766         (audio::-webkit-media-controls-volume-slider, video::-webkit-media-controls-volume-slider):
767         (audio::-webkit-media-controls-seek-back-button, video::-webkit-media-controls-seek-back-button):
768         (audio::-webkit-media-controls-seek-forward-button, video::-webkit-media-controls-seek-forward-button):
769         (audio::-webkit-media-controls-rewind-button, video::-webkit-media-controls-rewind-button):
770         (audio::-webkit-media-controls-return-to-realtime-button, video::-webkit-media-controls-return-to-realtime-button):
771         (audio::-webkit-media-controls-toggle-closed-captions-button, video::-webkit-media-controls-toggle-closed-captions-button):
772
773 2013-03-08  Allan Sandfeld Jensen  <allan.jensen@digia.com>
774
775         [Qt] Doesn't build with QtMultimedia
776         https://bugs.webkit.org/show_bug.cgi?id=111847
777
778         Reviewed by Jocelyn Turcotte.
779
780         Fix include.
781
782         * platform/graphics/qt/MediaPlayerPrivateQt.h:
783
784 2013-03-08  Huang Dongsung  <luxtella@company100.net>
785
786         [EFL][Qt] REGRESSION(r144787): A fixed element lags when scrolling and wheeling.
787         https://bugs.webkit.org/show_bug.cgi?id=111829
788
789         Reviewed by Noam Rosenthal.
790
791         Currently, flagsChanged deals with all boolean flags. It introduces this bug
792         because when another flag (i.e. preserves3D) is changed, fixedToViewport is set
793         to false. So this patch updates all flags when at least one flag is changed.
794
795         In addition, this patch amends isScrollable code to match other flags.
796
797         This patch can only be tested manually since there is no automated
798         testing facilities for in-motion touch.
799         Test: ManualTests/fixed-position.html
800               ManualTests/nested-fixed-position.html
801
802         * platform/graphics/texmap/coordinated/CoordinatedGraphicsLayer.cpp:
803         (WebCore::CoordinatedGraphicsLayer::setScrollableArea):
804         (WebCore::CoordinatedGraphicsLayer::syncLayerState):
805         * platform/graphics/texmap/coordinated/CoordinatedGraphicsScene.cpp:
806         (WebCore::CoordinatedGraphicsScene::setLayerState):
807         * platform/graphics/texmap/coordinated/CoordinatedGraphicsState.h:
808         (WebCore::CoordinatedGraphicsLayerState::CoordinatedGraphicsLayerState):
809
810 2013-03-07  Dean Jackson  <dino@apple.com>
811
812         Remove dead label code in snapshotted plugin
813         https://bugs.webkit.org/show_bug.cgi?id=111781
814
815         Reviewed by Tim Horton.
816
817         Since ports can use the shadow tree to do label display,
818         there is no need for the hardcoded timers in RenderSnapshottedPlugin.
819
820         * rendering/RenderSnapshottedPlugIn.cpp: Remove label flags and timers.
821         (WebCore::RenderSnapshottedPlugIn::RenderSnapshottedPlugIn):
822         (WebCore::RenderSnapshottedPlugIn::~RenderSnapshottedPlugIn):
823         (WebCore::RenderSnapshottedPlugIn::updateSnapshot):
824         (WebCore::RenderSnapshottedPlugIn::handleEvent):
825         * rendering/RenderSnapshottedPlugIn.h:
826         (RenderSnapshottedPlugIn):
827
828 2013-03-07  Dean Jackson  <dino@apple.com>
829
830         Implement a custom appearance for the snapshotted plugin background
831         https://bugs.webkit.org/show_bug.cgi?id=108368
832
833         Reviewed by Tim Horton.
834
835         After https://bugs.webkit.org/show_bug.cgi?id=108284 (r142507), a
836         snapshotted plugin was no longer drawing the background of the
837         label blurred. Since the snapshot content was now a shadow tree,
838         it wasn't feasible to pre-blur a region of the snapshot: the label
839         could be any size and in any location, with ports being able to
840         override the appearance through their UA style sheet.
841
842         Instead we now use one of the elements in the tree, the snapshot-overlay,
843         as a hook where ports can add any effect they want. This could be simply
844         a border, or a transparent mask, or even a CSS filter. We introduce a custom
845         CSS appearance "snapshotted-plugin-overlay", which could be added to the
846         element in the injected UA stylesheet. This calls into RenderTheme in
847         the same way that custom controls do.
848
849         Meanwhile, in RenderThemeMac, we implement the appearance by drawing the
850         content of the plugin snapshot into the background of the element. That
851         way we can add effects in CSS.
852
853         Test: plugins/snapshot-appearance.html
854
855         * css/CSSPrimitiveValueMappings.h:
856         (WebCore::CSSPrimitiveValue::CSSPrimitiveValue): Handle SnapshottedPluginOverlayPart.
857         * css/CSSValueKeywords.in: New appearance value snapshotted-plugin-overlay.
858         * platform/ThemeTypes.h: New value SnapshottedPluginOverlayPart.
859         * html/HTMLPlugInElement.h:
860         (WebCore::toHTMLPlugInElement): Add safer casting helpers.
861         * html/HTMLPlugInImageElement.h:
862         (WebCore::toHTMLPlugInImageElement): Ditto.
863         * rendering/RenderSnapshottedPlugIn.cpp: Remove the code for handling
864             the blur directly in the renderer.
865         (WebCore::RenderSnapshottedPlugIn::paint): Simplify the paint logic since we're
866             no longer trying to blur here.
867         (WebCore::RenderSnapshottedPlugIn::paintSnapshot): Ditto.
868         * rendering/RenderSnapshottedPlugIn.h: Remove the methods that were trying
869             to blur the image directly.
870         * rendering/RenderTheme.cpp:
871         (WebCore::RenderTheme::paint): Call paintSnapshottedPluginOverlay.
872         * rendering/RenderTheme.h:
873         (WebCore::RenderTheme::paintSnapshottedPluginOverlay): New virtual method with default implementation.
874         * rendering/RenderThemeMacShared.h:
875         (RenderThemeMacShared): Override paintSnapshottedPluginOverlay.
876         * rendering/RenderThemeMacShared.mm:
877         (WebCore::RenderThemeMacShared::paintSnapshottedPluginOverlay): Implement a custom render path
878             that takes the snapshot image from the node's parent, and draws it into the background.
879             Along the way make sure we're actually using the right type of element (an HTMLPlugInImageElement).
880
881 2013-03-08  Sergio Villar Senin  <svillar@igalia.com>
882
883         Improve drag&drop of list items in contentEditable divs
884         https://bugs.webkit.org/show_bug.cgi?id=111556
885
886         Reviewed by Ryosuke Niwa.
887
888         A single fully selected <li> should generate the same markup as if
889         we were selecting some of them, i.e., we should preserve the list
890         structure and appearance.
891
892         Test: editing/selection/drag-list-item.html
893
894         * editing/htmlediting.cpp:
895         (WebCore::isListItem): modified constness.
896         * editing/htmlediting.h:
897         (WebCore): ditto.
898         * editing/markup.cpp:
899         (WebCore::highestAncestorToWrapMarkup):
900
901 2013-03-08  Alberto Garcia  <agarcia@igalia.com>
902
903         [BlackBerry] LayerTiler: rename currentFrameHasAlpha as currentFrameKnownToBeOpaque
904         https://bugs.webkit.org/show_bug.cgi?id=111828
905
906         Reviewed by Carlos Garcia Campos.
907
908         This changed in r141637.
909
910         * platform/graphics/blackberry/LayerTiler.cpp:
911         (WebCore::LayerTiler::updateTextureContentsIfNeeded):
912
913 2013-03-08  Antoine Quint  <graouts@apple.com>
914
915         Fix a couple of typos.
916
917         Unreviewed.
918
919         * inspector/Inspector.json:
920
921 2013-03-08  Carlos Garcia Campos  <cgarcia@igalia.com>
922
923         [BlackBerry] Use OwnPtr for CredentialBackingStore members
924         https://bugs.webkit.org/show_bug.cgi?id=111737
925
926         Reviewed by Rob Buis.
927
928         It simplifies the code a bit.
929
930         * platform/network/blackberry/CredentialBackingStore.cpp:
931         (WebCore::CredentialBackingStore::~CredentialBackingStore):
932         (WebCore::CredentialBackingStore::open):
933         (WebCore::CredentialBackingStore::certMgrWrapper):
934         * platform/network/blackberry/CredentialBackingStore.h:
935         (CredentialBackingStore):
936
937 2013-03-07  Gavin Barraclough  <barraclough@apple.com>
938
939         MemoryPressureHandler should fully flush the WebCore & NS URL caches
940         https://bugs.webkit.org/show_bug.cgi?id=111827
941
942         Rubber Stamped by Geoff Garen
943
944         When the handler is fired we should free as much memory as possible.
945
946         * platform/mac/MemoryPressureHandlerMac.mm:
947         (WebCore::MemoryPressureHandler::releaseMemory):
948             - fully flush the WebCore & NS URL caches
949
950 2013-03-07  Keishi Hattori  <keishi@webkit.org>
951
952         Update calendar picker UI
953         https://bugs.webkit.org/show_bug.cgi?id=109439
954
955         Reviewed by Kent Tamura.
956
957         This patch changes the calendar picker UI.
958
959         Added tests to existing calendar picker tests.
960         Test: platform/chromium/fast/forms/calendar-picker/calendar-picker-appearance-month-popup.html
961
962         * Resources/pagepopups/calendarPicker.css:
963         (body):
964         (.rtl):
965         (.scroll-view):
966         (.scroll-view-content):
967         (.list-cell):
968         (.list-cell.hidden):
969         (.day-cell):
970         (.week-number-cell):
971         (.day-cell.today):
972         (.day-cell.highlighted):
973         (.day-cell.highlighted.disabled):
974         (.day-cell.selected):
975         (.day-cell.disabled):
976         (.day-cell.current-month):
977         (.calendar-table-view):
978         (.preparing .calendar-table-view:focus):
979         (.week-day-label):
980         (.week-number-label):
981         (.calendar-table-header-view):
982         (.calendar-picker):
983         (.calendar-header-view):
984         (.calendar-title):
985         (.rtl .calendar-title):
986         (.month-popup-button:disabled):
987         (.month-popup-button):
988         (.month-popup-button .disclosure-triangle):
989         (.month-popup-button .disclosure-triangle svg):
990         (.today-button::after):
991         (.calendar-navigation-button):
992         (.year-list-view):
993         (.year-list-cell):
994         (.year-list-cell .label):
995         (.year-list-cell .month-chooser):
996         (.month-buttons-row):
997         (.month-button):
998         (.month-button.highlighted):
999         (.scrubby-scroll-bar):
1000         (.scrubby-scroll-thumb):
1001         (.month-popup-view):
1002         (.year-list-view .scrubby-scroll-bar):
1003         (.rtl .year-list-view .scrubby-scroll-bar):
1004         * Resources/pagepopups/calendarPicker.js:
1005         (setGlobalParams): Sets the global params.
1006         (initialize):
1007         (openCalendarPicker):
1008         (CalendarHeaderView.prototype.onNavigationButtonClick): Fix typo.
1009         (CalendarPicker):
1010         (CalendarPicker.prototype.onWindowResize): We want to have the "preparing" class applied
1011         to cancel css transitions while setting up the calendar picker so we can avoid flaky pixel tests.
1012         (CalendarPicker.prototype.onYearListViewDidHide): The user clicked on a month so hide the month popup.
1013         (CalendarPicker.prototype.onYearListViewDidSelectMonth): Change the current month in response to the month popup.
1014         (CalendarPicker.prototype.attachTo): We want the calendar table focused when the calendar picker first opens.
1015         (CalendarPicker.prototype.cleanup): Clean up any event listeners or elements attached to nodes outside of this.element.
1016         (CalendarPicker.prototype.onMonthPopupButtonClick): Open the month popup in response to the month popup button being clicked.
1017         (CalendarPicker.prototype._setConfig): Configures the calendar picker.
1018         (CalendarPicker.prototype.currentMonth): The currently shown month.
1019         (CalendarPicker.prototype.setCurrentMonth): Scrolls the calendar table to the given month. Use the navigation behavior param to specify if you want a transition animation.
1020         (CalendarPicker.prototype.adjustHeight): Adjusts the height so its just tall enough to fit the current month. If the month picker is open, fit that.
1021         (CalendarPicker.prototype.selection): Currently selected date range.
1022         (CalendarPicker.prototype.highlight): Currently highlighted date range.
1023         (CalendarPicker.prototype.firstVisibleDay): Returns the first visible day ignoring scroll animation (i.e. this is the first visible day when the scroll animation is done).
1024         (CalendarPicker.prototype.lastVisibleDay): Returns the last visible day ignoring scroll animation.
1025         (CalendarPicker.prototype.selectRangeContainingDay): Sets the selection to the date range containing the given day.
1026         (CalendarPicker.prototype.highlightRangeContainingDay): Sets the highlight to the date range containing the given day.
1027         (CalendarPicker.prototype.setSelection): Sets the selection to the given date range.
1028         (CalendarPicker.prototype._setHighlight): Sets the highlight to the given date range.
1029         (CalendarPicker.prototype._stepMismatch): Just moving.
1030         (CalendarPicker.prototype._outOfRange): Ditto.
1031         (CalendarPicker.prototype.isValid): Returns true if the given date range is a valid selection.
1032         (CalendarPicker.prototype.isValidDay): Returns true if the day is part of a valid selection.
1033         (CalendarPicker.prototype._moveHighlight): Moves the highlight to the given date range if possible. Returns true if it succeeds.
1034         (CalendarPicker.prototype.onCalendarTableKeyDown): Handles the arrow keys, etc.
1035         (CalendarPicker.prototype.width):
1036         (CalendarPicker.prototype.height):
1037         (CalendarPicker.prototype.setHeight):
1038         (CalendarPicker.prototype.onBodyKeyDown): Handles esc/m/y/d.
1039         * Resources/pagepopups/chromium/calendarPickerChromium.css:
1040         (.calendar-table-view:focus):
1041         (.preparing .calendar-table-view:focus):
1042
1043 2013-03-07  Seokju Kwon  <seokju.kwon@gmail.com>
1044
1045         Web Inspector: Remove unused return value after r122962
1046         https://bugs.webkit.org/show_bug.cgi?id=111821
1047
1048         Reviewed by Pavel Feldman.
1049
1050         No new tests.
1051
1052         * inspector/front-end/ConsolePanel.js:
1053         (WebInspector.ConsolePanel.prototype.jumpToPreviousSearchResult):
1054         * inspector/front-end/ElementsPanel.js:
1055         (WebInspector.ElementsPanel.prototype.jumpToPreviousSearchResult):
1056         * inspector/front-end/ScriptsPanel.js:
1057         (WebInspector.ScriptsPanel.prototype.jumpToPreviousSearchResult):
1058
1059 2013-03-07  Sheriff Bot  <webkit.review.bot@gmail.com>
1060
1061         Unreviewed, rolling out r145166.
1062         http://trac.webkit.org/changeset/145166
1063         https://bugs.webkit.org/show_bug.cgi?id=111819
1064
1065         build break - no symbol
1066         webkit_support::CreateScopedTempDirectory() (Requested by
1067         hayato on #webkit).
1068
1069         * Modules/indexeddb/IDBBackingStore.cpp:
1070         (WebCore::IDBBackingStore::IDBBackingStore):
1071         (WebCore::IDBBackingStore::~IDBBackingStore):
1072         (WebCore::IDBBackingStore::open):
1073         * Modules/indexeddb/IDBBackingStore.h:
1074         (WebCore):
1075         (IDBBackingStore):
1076         * Modules/indexeddb/IDBFactoryBackendImpl.cpp:
1077         (WebCore::IDBFactoryBackendImpl::addIDBBackingStore):
1078         (WebCore):
1079         (WebCore::IDBFactoryBackendImpl::removeIDBBackingStore):
1080         (WebCore::IDBFactoryBackendImpl::openBackingStore):
1081         * Modules/indexeddb/IDBFactoryBackendImpl.h:
1082         (IDBFactoryBackendImpl):
1083
1084 2013-03-07  Hajime Morrita  <morrita@google.com>
1085
1086         Custom Elements: CustomElement constructor shouldn't share function instance
1087         https://bugs.webkit.org/show_bug.cgi?id=111807
1088
1089         Reviewed by Kentaro Hara.
1090
1091         Adaptor functions of custom elements unintentionally share the instance.
1092         This fix gives new one for each.
1093
1094         Test: Updated fast/dom/custom/document-register-basic.html
1095
1096         * bindings/v8/V8AdaptorFunction.cpp:
1097         (WebCore::V8AdaptorFunction::wrap):
1098
1099 2013-03-07  Jared Wyles  <wyles@adobe.com>
1100
1101         Reading border radius from style property returns in wrong order.
1102         https://bugs.webkit.org/show_bug.cgi?id=110853
1103
1104         Reviewed by Ryosuke Niwa
1105         
1106         Updating the order of border-radius to return in the order specified
1107         in http://www.w3.org/TR/css3-background/#the-border-radius
1108
1109         Tests updated in LayoutTests/fast/borders/border-radius-parsing.html 
1110         Changed the expectations in LayoutTests/inspector/elements/elements-panel-styles-expected.txt 
1111         
1112         Compat information -
1113         jQuery's css function favours using getComputedStyle for elements so that should not be impacted.
1114         Zepto does check for the element on style first so may be a slight concern there.
1115
1116         * css/StylePropertyShorthand.cpp:
1117         (WebCore::borderRadiusShorthand):
1118
1119 2013-03-07  Andreas Kling  <akling@apple.com>
1120
1121         Resizing Cappuccino is very laggy on WebKit since Safari 5.1
1122         <http://webkit.org/b/71354>
1123         <rdar://problem/10565998>
1124
1125         Reviewed by Anders Carlsson.
1126
1127         * WebCore.exp.in: Export FloatPoint(const NSPoint&)
1128
1129 2013-03-07  Andreas Kling  <akling@apple.com>
1130
1131         Remove desktop version of -webkit-text-size-adjust property.
1132         <http://webkit.org/b/56543>
1133         <rdar://problem/9150203>
1134
1135         Reviewed by Simon Fraser.
1136
1137         This property existed to support a number of Apple-internal clients of WebKit.
1138         We no longer need this property, and since it's clashing with a mobile version of the
1139         same property with different meaning, let's remove it altogether from the desktop build.
1140
1141         * css/CSSComputedStyleDeclaration.cpp:
1142         (WebCore::CSSComputedStyleDeclaration::getPropertyCSSValue):
1143         * css/CSSParser.cpp:
1144         (WebCore::isValidKeywordPropertyAndValue):
1145         (WebCore::isKeywordPropertyID):
1146         (WebCore::CSSParser::parseValue):
1147         * css/CSSPrimitiveValue.cpp:
1148         (WebCore::CSSPrimitiveValue::computeLengthDouble):
1149         * css/CSSProperty.cpp:
1150         (WebCore::CSSProperty::isInheritedProperty):
1151         * css/CSSPropertyNames.in:
1152         * css/StyleBuilder.cpp:
1153         (WebCore::ApplyPropertyLineHeight::applyValue):
1154         * css/StyleResolver.cpp:
1155         (WebCore::StyleResolver::updateFont):
1156         (WebCore::StyleResolver::applyProperties):
1157         (WebCore::StyleResolver::applyProperty):
1158         * css/StyleResolver.h:
1159         (StyleResolver):
1160         * css/svg.css:
1161         * editing/EditingStyle.cpp:
1162         * inspector/front-end/inspector.css:
1163         (#console-messages):
1164         * inspector/front-end/resourcesPanel.css:
1165         (.storage-view.query):
1166         * rendering/style/RenderStyle.cpp:
1167         (WebCore::RenderStyle::diff):
1168         * rendering/style/RenderStyle.h:
1169         * rendering/style/StyleRareInheritedData.cpp:
1170         (WebCore::StyleRareInheritedData::StyleRareInheritedData):
1171         (WebCore::StyleRareInheritedData::operator==):
1172         * rendering/style/StyleRareInheritedData.h:
1173         (StyleRareInheritedData):
1174
1175 2013-03-07  Joshua Bell  <jsbell@chromium.org>
1176
1177         IndexedDB: Use WeakPtr for Factory-to-BackingStore reference
1178         https://bugs.webkit.org/show_bug.cgi?id=111459
1179
1180         Reviewed by Adam Barth.
1181
1182         IDBFactoryBackendImpl maintains a map of backing stores - if another database in the same
1183         origin is opened, the backing store instance must be re-used). This was a map to raw
1184         pointers so that the backing store can be collected when all database references are
1185         dropped. The map was maintained manually by passing the factory to the IDBBackingStore which
1186         would add/remove itself on creation/destruction.
1187
1188         Replace this with a HashMap<WeakPtr<>>. This simplifies the plumbing; map entries
1189         "leak" but are purged on subsequent opens.
1190
1191         Added webkit_unit_test (Chromium port) to verify refcounts.
1192
1193         * Modules/indexeddb/IDBBackingStore.cpp:
1194         (WebCore::IDBBackingStore::IDBBackingStore): No need to notify factory of lifetime.
1195         (WebCore::IDBBackingStore::~IDBBackingStore): Ditto.
1196         (WebCore::IDBBackingStore::open): Ditto.
1197         * Modules/indexeddb/IDBBackingStore.h: No reference to the factory, but...
1198         (WebCore::IDBBackingStore::createWeakPtr): Do need to expose weak pointers for the factory to hold.
1199         * Modules/indexeddb/IDBFactoryBackendImpl.cpp:
1200         (WebCore::cleanWeakMap): Helper function to scrub a HashMap<WeakPtr<T>> of empty pointers.
1201         May move to WTF when we've learned how general it is, or come up with a dedicated WeakPtrHashMap type.
1202         (WebCore::IDBFactoryBackendImpl::openBackingStore): WeakPtr fu.
1203         * Modules/indexeddb/IDBFactoryBackendImpl.h:
1204         (IDBFactoryBackendImpl): Remove plumbing methods.
1205
1206 2013-03-07  Otto Derek Cheung  <otcheung@rim.com>
1207
1208         [BlackBerry] RefCounting ParsedCookie to avoid SegFaults
1209         https://bugs.webkit.org/show_bug.cgi?id=111761
1210
1211         Reviewed by Rob Buis.
1212
1213         Making necessary changes to ref count the ParsedCookie object.
1214
1215         Tested using the opera cookie test suite and the BB Browser cookie test suite.
1216         Tested using the browser, visiting popular sites such as facebook, reddit, google etc
1217         to ensure cookie functionality isn't changed.
1218
1219         * loader/blackberry/CookieJarBlackBerry.cpp:
1220         (WebCore::getRawCookies):
1221         * platform/blackberry/CookieDatabaseBackingStore/CookieDatabaseBackingStore.cpp:
1222         (WebCore::CookieDatabaseBackingStore::insert):
1223         (WebCore::CookieDatabaseBackingStore::update):
1224         (WebCore::CookieDatabaseBackingStore::remove):
1225         (WebCore::CookieDatabaseBackingStore::getCookiesFromDatabase):
1226         (WebCore::CookieDatabaseBackingStore::invokeGetCookiesWithLimit):
1227         (WebCore::CookieDatabaseBackingStore::invokeSendChangesToDatabase):
1228         (WebCore::CookieDatabaseBackingStore::addToChangeQueue):
1229         * platform/blackberry/CookieDatabaseBackingStore/CookieDatabaseBackingStore.h:
1230         (CookieDatabaseBackingStore):
1231         * platform/blackberry/CookieManager.cpp:
1232         (WebCore::cookieSorter):
1233         (WebCore::CookieManager::setCookies):
1234         (WebCore::CookieManager::getCookie):
1235         (WebCore::CookieManager::generateHtmlFragmentForCookies):
1236         (WebCore::CookieManager::getRawCookies):
1237         (WebCore::CookieManager::checkAndTreatCookie):
1238         (WebCore::CookieManager::addCookieToMap):
1239         (WebCore::CookieManager::getBackingStoreCookies):
1240         (WebCore::CookieManager::findOrCreateCookieMap):
1241         (WebCore::CookieManager::removeCookieWithName):
1242         (WebCore::CookieManager::cookieLimitCleanUp):
1243         * platform/blackberry/CookieManager.h:
1244         * platform/blackberry/CookieMap.cpp:
1245         (WebCore::CookieMap::addOrReplaceCookie):
1246         (WebCore::CookieMap::removeCookieAtIndex):
1247         (WebCore::CookieMap::removeCookie):
1248         (WebCore::CookieMap::getAllCookies):
1249         (WebCore::CookieMap::removeOldestCookie):
1250         (WebCore::CookieMap::deleteAllCookiesAndDomains):
1251         (WebCore::CookieMap::getAllChildCookies):
1252         * platform/blackberry/CookieMap.h:
1253         (CookieMap):
1254         * platform/blackberry/CookieParser.cpp:
1255         (WebCore):
1256         (WebCore::CookieParser::parse):
1257         (WebCore::CookieParser::parseOneCookie):
1258         * platform/blackberry/CookieParser.h:
1259         (CookieParser):
1260         * platform/blackberry/ParsedCookie.cpp:
1261         * platform/blackberry/ParsedCookie.h:
1262         (ParsedCookie):
1263         (WebCore::ParsedCookie::create):
1264
1265 2013-03-07  Aaron Colwell  <acolwell@chromium.org>
1266
1267         Heap-use-after-free in WebCore::HTMLMediaElement::~HTMLMediaElement
1268         https://bugs.webkit.org/show_bug.cgi?id=110623
1269
1270         Reviewed by Kentaro Hara.
1271
1272         Test: http/tests/misc/delete-frame-during-readystatechange-with-gc-after-video-removal.html
1273
1274         * bindings/v8/V8GCController.cpp: Fix MinorGCWrapperVisitor so it doesn't collect ActiveDOMObjects
1275                                           that have pending activity.
1276         * html/HTMLAudioElement.h:
1277         (HTMLAudioElement): Removed hasPendingActivity() now that this is handled by the base class.
1278         * html/HTMLAudioElement.idl: Removed ActiveDOMObject annotation since HTMLMediaElement now has it.
1279         * html/HTMLMediaElement.cpp:
1280         (WebCore::HTMLMediaElement::hasPendingActivity): Update implementation to return true if the media
1281                                                          has audio and is playing. This brings the code into
1282                                                          compliance with the detached element behavior outlined
1283                                                          in the HTML5 spec.
1284         * html/HTMLMediaElement.idl: Added ActiveDOMObject annotation so that all derived classes are
1285                                      considered ActiveDOMObjects.
1286
1287 2013-03-07  Jeffrey Pfau  <jpfau@apple.com>
1288
1289         CFNetwork cache partitioning does not work properly on subdomains
1290         https://bugs.webkit.org/show_bug.cgi?id=111772
1291
1292         Reviewed by David Kilzer.
1293
1294         Ensure that the cache partitioning is done over the top privately-controlled domain for the NSURLRequest.
1295
1296         Not possible to test with current automated test tools, must be tested manually.
1297
1298         * loader/cache/MemoryCache.cpp: Remove extraneous calls to partitionName
1299         (WebCore):
1300         (WebCore::MemoryCache::add):
1301         (WebCore::MemoryCache::revalidationSucceeded):
1302         (WebCore::MemoryCache::resourceForRequest):
1303         (WebCore::MemoryCache::evict):
1304         (WebCore::MemoryCache::removeResourcesWithOrigin):
1305         * platform/network/cf/ResourceRequest.h: Put top privately-controlled domain reduction code into ResourceRequest::partitionName
1306         (ResourceRequest):
1307         (WebCore::ResourceRequest::cachePartition):
1308         (WebCore::ResourceRequest::setCachePartition): Pre-process the partition name
1309         * platform/network/cf/ResourceRequestCFNet.cpp:
1310         (WebCore):
1311         (WebCore::ResourceRequest::partitionName):
1312         * platform/network/mac/ResourceRequestMac.mm:
1313         (WebCore::ResourceRequest::doUpdatePlatformRequest): Use a UTF-8 version of the cache partition name
1314
1315 2013-03-07  Kenneth Russell  <kbr@google.com>
1316
1317         Compute WebGL context attributes from DrawingBuffer when it is used
1318         https://bugs.webkit.org/show_bug.cgi?id=111666
1319
1320         Reviewed by James Robinson.
1321
1322         Fixed computation of antialias flag when DrawingBuffer is used.
1323
1324         No new tests; covered by existing tests. Ran WebGL conformance
1325         tests on desktop Linux and Android to test.
1326
1327         * html/canvas/WebGLRenderingContext.cpp:
1328         (WebCore):
1329         (WebCore::WebGLRenderingContext::getContextAttributes):
1330             Query DrawingBuffer, when used, for antialias flag.
1331
1332 2013-03-07  Beth Dakin  <bdakin@apple.com>
1333
1334         Need API to draw custom overhang area
1335         https://bugs.webkit.org/show_bug.cgi?id=111679
1336         -and corresponding-
1337         <rdar://problem/13291415>
1338
1339         Reviewed by Simon Fraser.
1340
1341         This will allow clients to put custom images into the top or bottom overhang area.
1342
1343         New FrameView API takes a bool indicating whether the client wants a top/bottom 
1344         overhang layer. If the bool is true, the overhang layer will be returned. 
1345         * WebCore.exp.in:
1346         * page/FrameView.cpp:
1347         (WebCore::FrameView::setWantsLayerForTopOverHangArea):
1348         (WebCore::FrameView::setWantsLayerForBottomOverHangArea):
1349         * page/FrameView.h:
1350         (FrameView):
1351
1352         Keep member variables for the top and bottom overhang layers. Create them if 
1353         necessary, and update them if the root layer changes.
1354         * rendering/RenderLayerCompositor.cpp:
1355         (WebCore::RenderLayerCompositor::updateRootLayerPosition):
1356         (WebCore::RenderLayerCompositor::updateLayerForTopOverhangArea):
1357         (WebCore::RenderLayerCompositor::updateLayerForBottomOverhangArea):
1358         (WebCore::RenderLayerCompositor::reportMemoryUsage):
1359         * rendering/RenderLayerCompositor.h:
1360         (RenderLayerCompositor):
1361
1362 2013-03-07  Gavin Barraclough  <barraclough@apple.com>
1363
1364         Reduce page cache size on Mac
1365         https://bugs.webkit.org/show_bug.cgi?id=111795
1366
1367         Rubber stamped by Geoff Garen
1368
1369         5 entries is unnecessarily large; research show 3 should suffice.
1370         On a low memory warning we should clear this completely.
1371
1372         * platform/mac/MemoryPressureHandlerMac.mm:
1373         (WebCore::MemoryPressureHandler::releaseMemory):
1374             - clear the page cache completely
1375
1376 2013-03-07  Simon Fraser  <simon.fraser@apple.com>
1377
1378         Rename Mac's TileCache to TileController, and WebTileCacheLayer to WebTiledBackingLayer
1379         https://bugs.webkit.org/show_bug.cgi?id=111779
1380
1381         Reviewed by Tim Horton.
1382         
1383         "TileCache" was a name conflict in downstream code, so rename it to TileController.
1384         The layer that has a TileController is now a WebTiledBackingLayer (which fits with
1385         the TiledBacking API that TileController exposes).
1386         
1387         Also renamed the flags in PlatformCALayer to match.
1388
1389         Rename only, no behavior change.
1390
1391         * WebCore.xcodeproj/project.pbxproj:
1392         * page/scrolling/mac/ScrollingTreeScrollingNodeMac.mm:
1393         (WebCore::ScrollingTreeScrollingNodeMac::logExposedUnfilledArea):
1394         * platform/graphics/GraphicsLayerClient.h:
1395         (WebCore::GraphicsLayerClient::shouldUseTiledBacking):
1396         * platform/graphics/ca/GraphicsLayerCA.cpp:
1397         (WebCore::GraphicsLayerCA::GraphicsLayerCA):
1398         (WebCore::GraphicsLayerCA::recursiveCommitChanges):
1399         (WebCore::GraphicsLayerCA::platformCALayerShowRepaintCounter):
1400         (WebCore::GraphicsLayerCA::platformCALayerDidCreateTiles):
1401         (WebCore::GraphicsLayerCA::updateVisibleRect):
1402         (WebCore::GraphicsLayerCA::getDebugBorderInfo):
1403         (WebCore::GraphicsLayerCA::requiresTiledLayer):
1404         (WebCore::GraphicsLayerCA::swapFromOrToTiledLayer):
1405         * platform/graphics/ca/GraphicsLayerCA.h:
1406         * platform/graphics/ca/PlatformCALayer.h:
1407         (WebCore::PlatformCALayer::usesTiledBackingLayer):
1408         * platform/graphics/ca/mac/PlatformCALayerMac.mm:
1409         (PlatformCALayer::PlatformCALayer):
1410         (PlatformCALayer::~PlatformCALayer):
1411         (PlatformCALayer::tiledBacking):
1412         * platform/graphics/ca/mac/TileController.h: Renamed from Source/WebCore/platform/graphics/ca/mac/TileCache.h.
1413         * platform/graphics/ca/mac/WebTileLayer.h:
1414         (TileController):
1415         * platform/graphics/ca/mac/WebTileLayer.mm:
1416         (-[WebTileLayer drawInContext:]):
1417         (-[WebTileLayer setTileController:WebCore::]):
1418         (-[WebTileLayer logFilledFreshTile]):
1419         * platform/graphics/ca/mac/WebTiledBackingLayer.h: Renamed from Source/WebCore/platform/graphics/ca/mac/WebTileCacheLayer.h.
1420         * platform/graphics/ca/mac/WebTiledBackingLayer.mm: Renamed from Source/WebCore/platform/graphics/ca/mac/WebTileCacheLayer.mm.
1421         * platform/graphics/mac/WebLayer.mm:
1422         (drawLayerContents):
1423         * rendering/RenderLayerBacking.cpp:
1424         (WebCore::RenderLayerBacking::RenderLayerBacking):
1425         (WebCore::RenderLayerBacking::shouldUseTiledBacking):
1426         (WebCore::RenderLayerBacking::adjustTiledBackingCoverage):
1427         (WebCore::RenderLayerBacking::createPrimaryGraphicsLayer):
1428         * rendering/RenderLayerBacking.h:
1429         (WebCore::RenderLayerBacking::usingTiledBacking):
1430         (RenderLayerBacking):
1431         (WebCore::RenderLayerBacking::hasTiledBackingFlatteningLayer):
1432         * rendering/RenderLayerCompositor.cpp:
1433         (WebCore::RenderLayerCompositor::frameViewDidLayout):
1434         (WebCore::RenderLayerCompositor::rootFixedBackgroundsChanged):
1435         (WebCore::RenderLayerCompositor::supportsFixedRootBackgroundCompositing):
1436
1437 2013-03-07  Alexey Proskuryakov  <ap@apple.com>
1438
1439         FormData should allow setting filename to empty
1440         https://bugs.webkit.org/show_bug.cgi?id=111687
1441
1442         Reviewed by Brady Eidson.
1443
1444         Tests: http/tests/local/formdata/send-form-data-with-empty-blob-filename.html
1445                http/tests/local/formdata/send-form-data-with-empty-file-filename.html
1446
1447         * platform/network/FormData.cpp: (WebCore::FormData::appendKeyValuePairItems):
1448         Missing value is a null string. If the string is empty, we should treat is as
1449         authoritative.
1450
1451 2013-03-07  David Hyatt  <hyatt@apple.com>
1452
1453         REGRESSION: fast/border/border-fit-2.html needs updating
1454         https://bugs.webkit.org/show_bug.cgi?id=111776
1455
1456         Reviewed by Simon Fraser.
1457
1458         This test is incorrectly shrinking the border image now.
1459         We need to apply some clamping to the border-fit like the
1460         old code did. The pixel results *are* still changing though,
1461         since a layout-time shrinkage will not result in right-aligned
1462         boxes in an LTR block when the left edge gets chopped. We'll
1463         have to see if this behavioral change ends up being a problem,
1464         but for now we'll rebaseline and assume it will be ok.
1465
1466         * rendering/RenderBlock.cpp:
1467         (WebCore::RenderBlock::fitBorderToLinesIfNeeded):
1468
1469 2013-03-07  Antoine Quint  <graouts@apple.com>
1470
1471         Web Inspector: provide reasons why a layer was composited in the LayerTreeAgent
1472         https://bugs.webkit.org/show_bug.cgi?id=111703
1473
1474         Introduce a new LayerTree.reasonsForCompositingLayer(layerId) method which returns
1475         the list of reasons why the provided layer was composited as an object with an
1476         optional property for each possible reason. The RenderLayerCompositor already knows
1477         how to provide this information via its own reasonsForCompositing() method, and we
1478         process the returned bitmask to populate the object sent to the front-end.
1479
1480         Reviewed by Timothy Hatcher.
1481
1482         Test: inspector-protocol/layers/layers-compositing-reasons.html
1483
1484         * inspector/Inspector.json:
1485         * inspector/InspectorLayerTreeAgent.cpp:
1486         (WebCore::InspectorLayerTreeAgent::reasonsForCompositingLayer):
1487         (WebCore):
1488         * inspector/InspectorLayerTreeAgent.h:
1489         (InspectorLayerTreeAgent):
1490
1491 2013-03-07  Anders Carlsson  <andersca@apple.com>
1492
1493         Add a didFocusTextField callback to the injected bundle form client
1494         https://bugs.webkit.org/show_bug.cgi?id=111771
1495
1496         Reviewed by Andreas Kling.
1497
1498         Export a symbol needed by WebKit2.
1499
1500         * WebCore.exp.in:
1501
1502 2013-03-06  James Robinson  <jamesr@chromium.org>
1503
1504         [chromium] Stop using WebTransformationMatrix on WebLayer
1505         https://bugs.webkit.org/show_bug.cgi?id=111635
1506
1507         Reviewed by Adrienne Walker.
1508
1509         Switches over to the SkMatrix44 transform setters.
1510
1511         * platform/graphics/chromium/GraphicsLayerChromium.cpp:
1512         (WebCore::transformToSkMatrix44):
1513           Utility for convering a WebCore::TransformationMatrix to an SkMatrix44.
1514           Will move to a more common location once it gets more callers.
1515         (WebCore::GraphicsLayerChromium::updateTransform):
1516         (WebCore::GraphicsLayerChromium::updateChildrenTransform):
1517
1518 2013-03-07  Eric Carlson  <eric.carlson@apple.com>
1519
1520         [Mac] allow iOS to use CaptionUserPreferencesMac
1521         https://bugs.webkit.org/show_bug.cgi?id=111770
1522
1523         Reviewed by Dean Jackson.
1524
1525         No new tests, covered by existing tests.
1526
1527         * page/CaptionUserPreferencesMac.h:
1528         * page/CaptionUserPreferencesMac.mm:
1529         (WebCore::userCaptionPreferencesChangedNotificationCallback): Respond to notifications on
1530             the web thread.
1531
1532 2013-03-07  Mike West  <mkwst@chromium.org>
1533
1534         Move side-effects on hover/active state out of hit-testing
1535         https://bugs.webkit.org/show_bug.cgi?id=98168
1536
1537         Reviewed by Julien Chaffraix.
1538
1539         Original patch by Allan Sandfeld Jensen; I'm just tweaking things.
1540
1541         Document::updateHoverActiveState is currently called during hit testing
1542         to update the hover and active states of elements effected by mouse
1543         movements (or their keyboard equivalents). This conflates the hit test
1544         algorithm itself with side-effects associated with specific use-cases.
1545
1546         This conflation makes it very difficult to reuse the hover/active logic
1547         for things other than hit testing. 'mouseenter'/'mouseleave' events[1]
1548         are one example of a feature that would be simple to implement on top of
1549         this existing logic if we split it out from the hit testing path, and
1550         instead call it explicitly when necessary. An explicit split between
1551         hit testing and its side-effects will also enable us to simplify the
1552         logic in future patches with well-named parameters, rather than relying
1553         on stuffing properties into HitTestRequest.
1554
1555         This patch drops the call to Document::updateHoverActiveState from
1556         RenderView::hitTest, and adjusts the three call-sites in EventHandler
1557         to explicitly call out to it rather than Document::updateStyleIfNeeded.
1558         The latter call is still necessary but has been folded into
1559         updateHoverActiveState, as the former is never called without calling
1560         the latter.
1561
1562         [1]: http://wkbug.com/18930
1563
1564         * dom/Document.h:
1565         * dom/Document.cpp:
1566         (WebCore::Document::updateHoverActiveState):
1567             First, this function must now only be called from contexts that were
1568             performing a read/write hit-test: the code asserts this
1569             precondition.
1570
1571             Second, rather than accepting a HitTestResult, the function accepts
1572             an Element* from which to begin the hover/active chain changes.
1573
1574             Third, we have to explicitly update the hover/active states for
1575             documents between the updated element and the top-level document.
1576             The hit-testing logic was taking care of this for us, now we need to
1577             take care of it ourselves.
1578
1579             Fourth, call out to updateStyleIfNeeded rather than making our
1580             caller do so. The calls were always paired; now that's explicit.
1581         (WebCore::Document::prepareMouseEvent):
1582         * page/EventHandler.cpp:
1583         (WebCore::EventHandler::hitTestResultAtPoint):
1584         (WebCore::EventHandler::sendContextMenuEventForKey):
1585         (WebCore::EventHandler::hoverTimerFired):
1586             Call out to updateHoverActiveState rather than updateStyleIfNeeded.
1587         * rendering/RenderView.cpp:
1588         (WebCore::RenderView::hitTest):
1589             Drop the call to updateHoverActiveState.
1590
1591 2013-03-07  Sheriff Bot  <webkit.review.bot@gmail.com>
1592
1593         Unreviewed, rolling out r145097.
1594         http://trac.webkit.org/changeset/145097
1595         https://bugs.webkit.org/show_bug.cgi?id=111765
1596
1597         Triggers an ASSERT in the Chromium port (Requested by abarth
1598         on #webkit).
1599
1600         * html/FileInputType.cpp:
1601         (WebCore::FileInputType::appendFormData):
1602         * platform/network/FormData.cpp:
1603         (WebCore::FormData::appendKeyValuePairItems):
1604
1605 2013-03-07  Chris Fleizach  <cfleizach@apple.com>
1606
1607         AX: Can't activate links with VoiceOver in Safari
1608         https://bugs.webkit.org/show_bug.cgi?id=111755
1609
1610         Reviewed by Tim Horton.
1611
1612         VoiceOver is relying on the press action being the first action in the list. We changed
1613         that order inadvertently recently, which confuses VoiceOver.
1614
1615         Test: platform/mac/accessibility/press-action-is-first.html
1616
1617         * accessibility/mac/WebAccessibilityObjectWrapperMac.mm:
1618         (-[WebAccessibilityObjectWrapper accessibilityActionNames]):
1619
1620 2013-03-07  Rafael Weinstein  <rafaelw@chromium.org>
1621
1622         Unreviewed, rolling out r145083.
1623         http://trac.webkit.org/changeset/145083
1624         https://bugs.webkit.org/show_bug.cgi?id=110733
1625
1626         caused lots crashes in http/tests/security/xssAuditor/* tests
1627
1628         * html/parser/XSSAuditor.cpp:
1629         (WebCore::XSSAuditor::XSSAuditor):
1630         (WebCore::XSSAuditor::init):
1631         (WebCore::XSSAuditor::filterToken):
1632         * html/parser/XSSAuditor.h:
1633         * html/parser/XSSAuditorDelegate.cpp:
1634         (WebCore::XSSAuditorDelegate::didBlockScript):
1635         * html/parser/XSSAuditorDelegate.h:
1636         (WebCore::XSSInfo::create):
1637         (XSSInfo):
1638         (WebCore::XSSInfo::XSSInfo):
1639
1640 2013-03-07  Michelangelo De Simone  <michelangelo@webkit.org>
1641
1642         [CSS Shaders] Implement hue and saturation non-separable blend modes
1643         https://bugs.webkit.org/show_bug.cgi?id=109464
1644
1645         Added the following GLSL helper functions to the CustomFilterValidatedProgram:
1646
1647             - css_Sat(C): returns the saturation for the color C
1648             - css_SetSat(C, s): sets the saturation s on the color C
1649             - css_SetSatHelper(Cmin, Cmid, Cmax, s): helper function for css_SetSat
1650
1651         The above functions are being used for the "hue" and "saturation" non-separable
1652         blend modes, the relevant spec for such modes is at URL:
1653         https://dvcs.w3.org/hg/FXTF/rawfile/tip/compositing/index.html#blendingnonseparable
1654
1655         Reviewed by Dean Jackson.
1656
1657         Tests: css3/filters/custom/custom-filter-nonseparable-blend-mode-hue.html
1658                css3/filters/custom/custom-filter-nonseparable-blend-mode-saturation.html
1659
1660         * platform/graphics/filters/CustomFilterValidatedProgram.cpp:
1661         (WebCore::CustomFilterValidatedProgram::blendFunctionString):
1662
1663 2013-03-07  Andrey Lushnikov  <lushnikov@chromium.org>
1664
1665         Web Inspector: [ACE] set correct font
1666         https://bugs.webkit.org/show_bug.cgi?id=111747
1667
1668         Reviewed by Pavel Feldman.
1669
1670         No new tests.
1671
1672         Set class "source-code" for the ace editor element.
1673
1674         * inspector/front-end/AceTextEditor.js:
1675         (WebInspector.AceTextEditor):
1676
1677 2013-03-06  Ojan Vafai  <ojan@chromium.org>
1678
1679         Recalculate borders at the beginning of table layout
1680         https://bugs.webkit.org/show_bug.cgi?id=111634
1681
1682         Reviewed by Julien Chaffraix.
1683
1684         Doing it in convertStyleLogicalWidthToComputedWidth missed some dynamic
1685         relayout cases. I confirmed that the new results match the results we
1686         would get if we set the border width initially instead of dynamically.
1687
1688         * rendering/RenderTable.cpp:
1689         (WebCore::RenderTable::convertStyleLogicalWidthToComputedWidth):
1690         (WebCore::RenderTable::layout):
1691
1692 2013-03-07  David Hyatt  <hyatt@apple.com>
1693
1694         border-fit-adjust should happen at layout time rather than paint time
1695         https://bugs.webkit.org/show_bug.cgi?id=111606
1696         <rdar://problem/13101714>
1697
1698         Reviewed by Antti Koivisto.
1699
1700         In order for border-fit-adjust to be accurate in more cases, it needs
1701         to be a layout-time adjustment rather than a paint-time adjustment.
1702         Specifically there are cases where an LTR adjusted box was right-aligned
1703         by its container, and without genuinely shrinking the size of the box,
1704         we end up chopping off the right edge but not shifting the box to the
1705         right to compensate.
1706         
1707         This patch changes border-fit-adjust to now do the adjustment using
1708         the override width mechanism and a second layout pass instead of just
1709         hacking painting.
1710
1711         Test: fast/block/border-fit-with-right-alignment.html
1712
1713         * rendering/RenderBlock.cpp:
1714         (WebCore::RenderBlock::layoutBlock):
1715         Calls fitBorderToLinesIfNeeded at the end of layout to do a second
1716         layout pass if the adjustment needs to be made.
1717
1718         (WebCore::RenderBlock::fitBorderToLinesIfNeeded):
1719         Renamed borderFitAdjust to fitBorderToLinesIfNeeded and made it
1720         non-virtual, since it's no longer called from RenderBox code. Changed it
1721         to do a relayout using override widths if an adjustment is needed.
1722
1723         * rendering/RenderBlock.h:
1724         (RenderBlock):
1725         Renamed borderFitAdjust to fitBorderToLinesIfNeeded and made it
1726         non-virtual.
1727
1728         * rendering/RenderBox.cpp:
1729         (WebCore::RenderBox::paintBoxDecorations):
1730         (WebCore::RenderBox::paintMask):
1731         Removed the paint-time border-fit adjustment.
1732
1733         (WebCore::RenderBox::computeLogicalWidthInRegion):
1734         Use the override width when border-fit is set to lines.
1735
1736         * rendering/RenderBox.h:
1737         (RenderBox):
1738         Remove the virtual borderFitAdjust method.
1739
1740 2013-03-07  Allan Sandfeld Jensen  <allan.jensen@digia.com>
1741
1742         REGRESSION(r143727): Clicking / selecting inside an <embed> is broken
1743         https://bugs.webkit.org/show_bug.cgi?id=111217
1744
1745         Reviewed by Julien Chaffraix.
1746
1747         Hit-testing into child frames need to happen in RenderPart, otherwise
1748         we will miss frame views in <embed> and <object> elements. 
1749
1750         Test: fast/dom/nodesFromRect/nodesFromRect-embedded-frame-content.html
1751
1752         * rendering/RenderFrameBase.cpp:
1753         * rendering/RenderFrameBase.h:
1754         (RenderFrameBase):
1755         * rendering/RenderPart.cpp:
1756         (WebCore::RenderPart::nodeAtPoint):
1757         * rendering/RenderPart.h:
1758         (RenderPart):
1759
1760 2013-03-07  Alexey Proskuryakov  <ap@apple.com>
1761
1762         FormData should allow setting filename to empty
1763         https://bugs.webkit.org/show_bug.cgi?id=111687
1764
1765         Reviewed by Brady Eidson.
1766
1767         Tests: http/tests/local/formdata/send-form-data-with-empty-blob-filename.html
1768                http/tests/local/formdata/send-form-data-with-empty-file-filename.html
1769
1770         * html/FileInputType.cpp: (WebCore::FileInputType::appendFormData):
1771         Use a Blob for empty file input, not a hacky File with empty path.
1772
1773         * platform/network/FormData.cpp: (WebCore::FormData::appendKeyValuePairItems):
1774         Missing value is a null string. If the string is empty, we should treat is as
1775         authoritative.
1776
1777 2013-03-07  Andrey Lushnikov  <lushnikov@chromium.org>
1778
1779         Web Inspector: [CodeMirror] dublicated horizontal scroll
1780         https://bugs.webkit.org/show_bug.cgi?id=111712
1781
1782         Reviewed by Pavel Feldman.
1783
1784         Set a box-sizing css property on all codemirror elements to
1785         "content-box".
1786
1787         No new tests.
1788
1789         * inspector/front-end/cm/cmdevtools.css:
1790         (.CodeMirror *):
1791
1792 2013-03-07  Vsevolod Vlasov  <vsevik@chromium.org>
1793
1794         Web Inspector: Styles sidebar pane toolbar disappears in horizontal split mode.
1795         https://bugs.webkit.org/show_bug.cgi?id=111735
1796
1797         Reviewed by Pavel Feldman.
1798
1799         * inspector/front-end/ElementsPanel.js:
1800         (WebInspector.ElementsPanel.prototype._splitVertically):
1801         * inspector/front-end/elementsPanel.css:
1802         (.sidebar-pane.composite .metrics-and-computed .sidebar-pane-toolbar):
1803
1804 2013-03-07  Zan Dobersek  <zdobersek@igalia.com>
1805
1806         [GTK] Limit the supported compilers to GCC >= 4.7 and Clang >= 3.0
1807         https://bugs.webkit.org/show_bug.cgi?id=109932
1808
1809         Reviewed by Martin Robinson.
1810
1811         * GNUmakefile.am: Replace references to SYMBOL_VISIBILITY_INLINES and SYMBOL_VISIBILITY variables with the actual flags.
1812         They are now available by default due to the limited set of supported compilers.
1813         * bindings/gobject/GNUmakefile.am: Ditto.
1814
1815 2013-03-07  Mike West  <mkwst@chromium.org>
1816
1817         XSSAuditor should send only one console error when blocking a page.
1818         https://bugs.webkit.org/show_bug.cgi?id=110733
1819
1820         Reviewed by Daniel Bates.
1821
1822         Currently, we send two console errors when XSSAuditor blocks a page:
1823         "Refused to execute a JavaScript script. Source code of script found
1824         within request.\n", and "Entire page will be blocked.".
1825
1826         We should only send one message, tuning it properly for the context, and
1827         including the URL of the page effected by the XSSAuditor's work.
1828
1829         Covered by rebaselines of all the XSSAuditor and 'reflected-xss' tests.
1830
1831         * html/parser/XSSAuditor.cpp:
1832         * html/parser/XSSAuditor.h:
1833         (WebCore::XSSAuditor::XSSAuditor):
1834             Add two booleans to track the headers used to set the XSSAuditor state.
1835         (WebCore::XSSAuditor::init):
1836             Save a copy of the document's URL even if we're not generating a
1837             report upon violation: we'll need it for the console messages. Also
1838             populate the didSendValidXXXHeader booleans for use later.
1839         (WebCore::XSSAuditor::filterToken):
1840             Add detail about the header status to the constructed XSSInfo object.
1841         * html/parser/XSSAuditorDelegate.cpp:
1842         (WebCore::buildConsoleError):
1843             Move message construction out into a separate inlined function, as
1844             it's becoming complex.
1845         (WebCore::XSSAuditorDelegate::didBlockScript):
1846             Fold the "Entire page will be blocked" message into the main console
1847             error.
1848         * html/parser/XSSAuditorDelegate.h:
1849         (WebCore::XSSInfo::create):
1850         (WebCore::XSSInfo::XSSInfo):
1851             Add detail about header status to XSSInfo in order to correctly
1852             construct the console error.
1853
1854 2013-03-07  Vsevolod Vlasov  <vsevik@chromium.org>
1855
1856         Web Inspector: Add some more compilation annotations to NavigatorView
1857         https://bugs.webkit.org/show_bug.cgi?id=111730
1858
1859         Reviewed by Alexander Pavlov.
1860
1861         * inspector/front-end/NavigatorView.js:
1862
1863 2013-03-06  Gustavo Noronha Silva  <gns@gnome.org>
1864
1865         [GTK] Enable translations for WebKit2
1866         https://bugs.webkit.org/show_bug.cgi?id=111398
1867
1868         Reviewed by Martin Robinson.
1869
1870         Build change only, thus no tests.
1871
1872         * GNUmakefile.am: distribute po files.
1873         * platform/gtk/po/POTFILES.in: adjust paths for translatable files.
1874
1875 2013-03-07  Andrey Lushnikov  <lushnikov@chromium.org>
1876
1877         Web Inspector: [CodeMirror] update codemirror to version 3.1
1878         https://bugs.webkit.org/show_bug.cgi?id=111711
1879
1880         Reviewed by Vsevolod Vlasov.
1881
1882         Update code mirror experimental editor to version 3.1
1883
1884         No new tests.
1885
1886         * inspector/front-end/cm/codemirror.css:
1887         (.CodeMirror div.CodeMirror-cursor):
1888         (.CodeMirror div.CodeMirror-secondarycursor):
1889         (.CodeMirror.cm-keymap-fat-cursor div.CodeMirror-cursor):
1890         (.CodeMirror.cm-keymap-fat-cursor div.CodeMirror-cursor:not(#nonsense_id)):
1891         (.CodeMirror div.CodeMirror-cursor.CodeMirror-overwrite):
1892         (.CodeMirror-gutters):
1893         (.CodeMirror-linewidget):
1894         (.CodeMirror-widget):
1895         (.CodeMirror-focused div.CodeMirror-cursor):
1896         (@media print):
1897         * inspector/front-end/cm/codemirror.js:
1898         (window.CodeMirror):
1899         (window.CodeMirror.):
1900
1901 2013-03-07  Sergio Correia  <sergio.correia@openbossa.org>
1902
1903         OpenGLShims: fix check for ANGLE GLES2 extensions
1904         https://bugs.webkit.org/show_bug.cgi?id=111656
1905
1906         Reviewed by Simon Hausmann.
1907
1908         The check for ANGLE GLES2 extensions is currently being overriden
1909         with checks for APPLE extensions in lookupOpenGLFunctionAddress().
1910
1911         No new tests. No user visible behavior changed.
1912
1913         * platform/graphics/OpenGLShims.cpp:
1914         (WebCore::lookupOpenGLFunctionAddress):
1915
1916 2013-03-07  David Kilzer  <ddkilzer@apple.com>
1917
1918         Rename visible_units.h to VisibleUnits.h in WebCore.vcxproj.filters
1919         <http://webkit.org/b/111426>
1920
1921         * WebCore.vcxproj/WebCore.vcxproj.filters: Rename visible_units.h
1922         to VisibleUnits.h and re-sort.
1923
1924 2013-03-07  Vsevolod Vlasov  <vsevik@chromium.org>
1925
1926         Web Inspector: Support a shortcut for reloading front-end in debug mode.
1927         https://bugs.webkit.org/show_bug.cgi?id=111709
1928
1929         Reviewed by Pavel Feldman.
1930
1931         * inspector/front-end/buildSystemOnly.js:
1932         * inspector/front-end/inspector.js:
1933         (WebInspector.documentKeyDown):
1934
1935 2013-03-07  Vsevolod Vlasov  <vsevik@chromium.org>
1936
1937         Web Inspector: Support setting up file system mappings from scripts panel context menu.
1938         https://bugs.webkit.org/show_bug.cgi?id=111583
1939
1940         Reviewed by Pavel Feldman.
1941
1942         Added context menu items to set up network - file system mappings from sources panel.
1943         Implemented mapping add/remove methods on Workspace.
1944         Added a dialog suggesting to reload front-end after making such changes.
1945
1946         * English.lproj/localizedStrings.js:
1947         * inspector/front-end/FileSystemMapping.js:
1948         (WebInspector.FileSystemMappingImpl.prototype.fileSystemPath):
1949         * inspector/front-end/FileSystemProjectDelegate.js:
1950         (WebInspector.FileSystemWorkspaceProvider.prototype._fileSystemRemoved):
1951         (WebInspector.FileSystemWorkspaceProvider.prototype.fileSystemPath):
1952         * inspector/front-end/FilteredItemSelectionDialog.js:
1953         (WebInspector.FilteredItemSelectionDialog.prototype.onEnter):
1954         (WebInspector.FilteredItemSelectionDialog.prototype.setQuery):
1955         (WebInspector.SelectUISourceCodeDialog):
1956         (WebInspector.SelectUISourceCodeDialog.prototype.uiSourceCodeSelected):
1957         (WebInspector.SelectUISourceCodeDialog.prototype.filterProject):
1958         (WebInspector.SelectUISourceCodeDialog.prototype.filterUISourceCode):
1959         (WebInspector.SelectUISourceCodeDialog.prototype.selectItem):
1960         (WebInspector.SelectUISourceCodeDialog.prototype._uiSourceCodeAdded):
1961         (WebInspector.OpenResourceDialog):
1962         (WebInspector.OpenResourceDialog.prototype.uiSourceCodeSelected):
1963         (WebInspector.OpenResourceDialog.prototype.filterProject):
1964         (WebInspector.SelectUISourceCodeForProjectTypeDialog):
1965         (WebInspector.SelectUISourceCodeForProjectTypeDialog.prototype.uiSourceCodeSelected):
1966         (WebInspector.SelectUISourceCodeForProjectTypeDialog.prototype.filterProject):
1967         (WebInspector.SelectUISourceCodeForProjectTypeDialog.show):
1968         * inspector/front-end/ScriptsPanel.js:
1969         (WebInspector.ScriptsPanel.prototype._mapFileSystemToNetwork.mapFileSystemToNetwork):
1970         (WebInspector.ScriptsPanel.prototype._mapFileSystemToNetwork):
1971         (WebInspector.ScriptsPanel.prototype._removeNetworkMapping):
1972         (WebInspector.ScriptsPanel.prototype._mapNetworkToFileSystem.mapNetworkToFileSystem):
1973         (WebInspector.ScriptsPanel.prototype._mapNetworkToFileSystem):
1974         (WebInspector.ScriptsPanel.prototype.):
1975         (WebInspector.ScriptsPanel.prototype._appendUISourceCodeMappingItems):
1976         (WebInspector.ScriptsPanel.prototype._appendUISourceCodeItems):
1977         * inspector/front-end/SettingsScreen.js:
1978         (WebInspector.WorkspaceSettingsTab):
1979         (WebInspector.WorkspaceSettingsTab.prototype.wasShown):
1980         (WebInspector.WorkspaceSettingsTab.prototype._reset):
1981         * inspector/front-end/ViewportControl.js:
1982         (WebInspector.ViewportControl.prototype.refresh):
1983         * inspector/front-end/Workspace.js:
1984         (WebInspector.Workspace.prototype.addMapping):
1985         (WebInspector.Workspace.prototype.removeMapping):
1986         * inspector/front-end/externs.js:
1987         (WebInspector.suggestReload):
1988         * inspector/front-end/inspector.js:
1989         (WebInspector.suggestReload):
1990
1991 2013-03-07  Vsevolod Vlasov  <vsevik@chromium.org>
1992
1993         Web Inspector: Add support for frontend reloading
1994         https://bugs.webkit.org/show_bug.cgi?id=111727
1995
1996         Reviewed by Pavel Feldman.
1997
1998         This patch adds support for frontend reloading including:
1999           - making sure no messages are sent to backend once frontend started reloading
2000           - updating frontend url with up-to-date dockSide query parameter value.
2001
2002         * inspector/front-end/InspectorBackend.js:
2003         (InspectorBackendClass.prototype.sendMessageObjectToBackend):
2004         (InspectorBackendClass.prototype.disconnect):
2005         * inspector/front-end/externs.js:
2006         (WebInspector.reload):
2007         * inspector/front-end/inspector.js:
2008         (WebInspector.reload):
2009
2010 2013-03-07  Alexei Filippov  <alph@chromium.org>
2011
2012         Web Inspector: Change profile start button caption depending on profile type.
2013         https://bugs.webkit.org/show_bug.cgi?id=111698
2014
2015         Change the start profiling button caption to "Snapshot" for
2016         snapshot-like profile types, e.g. JS heap snapshot, native memory snapshot.
2017
2018         Reviewed by Yury Semikhatsky.
2019
2020         * English.lproj/localizedStrings.js:
2021         * inspector/front-end/HeapSnapshotView.js:
2022         (WebInspector.HeapSnapshotProfileType.prototype.isInstantProfile):
2023         * inspector/front-end/NativeMemorySnapshotView.js:
2024         (WebInspector.NativeSnapshotProfileType.prototype.isInstantProfile):
2025         (WebInspector.NativeMemoryProfileType.prototype.isInstantProfile):
2026         * inspector/front-end/ProfileLauncherView.js:
2027         (WebInspector.ProfileLauncherView):
2028         (WebInspector.ProfileLauncherView.prototype.addProfileType):
2029         (WebInspector.ProfileLauncherView.prototype._updateControls):
2030         (WebInspector.MultiProfileLauncherView.prototype._updateControls):
2031         (WebInspector.MultiProfileLauncherView.prototype._profileTypeChanged):
2032         * inspector/front-end/ProfilesPanel.js:
2033         (WebInspector.ProfileType.prototype.isInstantProfile):
2034
2035 2013-03-07  Bruno de Oliveira Abinader  <bruno.abinader@basyskom.com>
2036
2037         [texmap] Remove direct access to clip state from clip stack
2038         https://bugs.webkit.org/show_bug.cgi?id=111630
2039
2040         Reviewed by Allan Sandfeld Jensen.
2041
2042         As we are now monitoring the clip state from
2043         TextureMapperGL/BitmapTextureGL, have direct access to clip state object
2044         would eventually make it dirty without properly setting the
2045         'clipStateDirty' flag. This bug intends to substitute direct access with
2046         auxiliary functions which would set the clip state dirty when necessary.
2047
2048         No new tests. No user visible behavior changed.
2049
2050         * platform/graphics/texmap/TextureMapperGL.cpp:
2051         (WebCore::TextureMapperGL::ClipStack::intersect):
2052         (WebCore::TextureMapperGL::ClipStack::setStencilIndex):
2053         (WebCore::TextureMapperGL::drawBorder):
2054         (WebCore::TextureMapperGL::drawTexture):
2055         (WebCore::TextureMapperGL::beginScissorClip):
2056         (WebCore::TextureMapperGL::beginClip):
2057         Replaced direct access with auxiliary functions.
2058
2059         * platform/graphics/texmap/TextureMapperGL.h:
2060         (ClipStack): Removed ClipStack::current() function.
2061         (WebCore::TextureMapperGL::ClipStack::getStencilIndex): Added.
2062         (WebCore::TextureMapperGL::ClipStack::isCurrentScissorBoxEmpty): Added.
2063
2064 2013-03-07  Bruno de Oliveira Abinader  <bruno.abinader@basyskom.com>
2065
2066         [Texturemapper] transform-style 'flat' value is broken
2067         https://bugs.webkit.org/show_bug.cgi?id=111566
2068
2069         Reviewed by Allan Sandfeld Jensen.
2070
2071         After changes from r144290, the CSS3 'transform-styles' property, when
2072         used with 'flat' value, resulted in non-stenciled rendering inside
2073         clipped area - vide example from Surfin' Safari blog:
2074         https://www.webkit.org/blog-files/3d-transforms/transform-style.html
2075
2076         This patch forces the clip state to be applied when binding the default
2077         surface.
2078
2079         No new tests. No user visible behavior changed.
2080
2081         * platform/graphics/texmap/TextureMapperGL.cpp:
2082         (WebCore::TextureMapperGL::ClipStack::apply):
2083         (WebCore::TextureMapperGL::ClipStack::applyIfNeeded): Added.
2084         Moved state cache check from apply() to applyIfNeeded().
2085
2086         (WebCore::BitmapTextureGL::clearIfNeeded):
2087         (WebCore::BitmapTextureGL::bind):
2088         (WebCore::TextureMapperGL::beginScissorClip):
2089         (WebCore::TextureMapperGL::beginClip):
2090         (WebCore::TextureMapperGL::endClip):
2091         * platform/graphics/texmap/TextureMapperGL.h:
2092         (ClipStack):
2093         Use applyIfNeeded() to check for clip state before clipping.
2094
2095 2013-03-07  Andrey Lushnikov  <lushnikov@chromium.org>
2096
2097         Web Inspector: refactoring: move TextEditorModel.Indent enum into TextUtils
2098         https://bugs.webkit.org/show_bug.cgi?id=111715
2099
2100         Reviewed by Pavel Feldman.
2101
2102         Move WebInspector.TextEditorModel.Indent into WebInspector.TextUtils namespace.
2103
2104         No new tests: no change in behaviour.
2105
2106         * inspector/front-end/SettingsScreen.js:
2107         (WebInspector.GenericSettingsTab):
2108         * inspector/front-end/TextEditorModel.js:
2109         (WebInspector.TextEditorModel.endsWithBracketRegex.):
2110         * inspector/front-end/TextUtils.js:
2111
2112 2013-03-07  Ian Vollick  <vollick@chromium.org>
2113
2114         Fix painting phases for composited scrolling
2115         https://bugs.webkit.org/show_bug.cgi?id=107618
2116
2117         Reviewed by Simon Fraser.
2118
2119         With composited scrolling, the scrolling contents layer paints the 
2120         foreground and the main graphics layer paints the background. This 
2121         causes a few problems:
2122
2123           1) If we create a foreground layer, we end up with two layers painting 
2124              the foreground phase.
2125           2) Focus rings / outlines paint into the foreground layer, so they end
2126              up moving around with the scrolling contents.
2127           3) Neg z-order descendants paint in the the main graphics layer and
2128              will therefore not scroll.
2129
2130         To deal with 1) we need to stop painting the foreground into both the
2131         foreground and scrolling contents layers. We also need to ensure that
2132         the foreground layer is the right size and has the right offset from
2133         renderer if we're on the composited scrolling path.
2134
2135         To deal with 2) and 3), I have added a new graphics layer painting phase 
2136         flag -- GraphicsLayerPaintCompositedScroll -- and applied it to two
2137         layers in the subtree created by RenderLayerBacking. This ultimately
2138         affects the paint phase passed to RenderLayer::paintLayerContents and
2139         allows us to paint the focus rings, outlines and negative z-order
2140         descendants into the proper layers.
2141
2142         Tests: compositing/overflow/composited-scrolling-paint-phases.html
2143                compositing/overflow/do-not-paint-outline-into-composited-scrolling-contents.html
2144                compositing/overflow/paint-neg-z-order-descendants-into-scrolling-contents-layer.html
2145
2146         * page/Frame.h:
2147           Added a flag for including painting phases in the layer tree dump.
2148         (WebCore::GraphicsLayer::dumpProperties):
2149           Can now dump painting phase information, but only if requested.
2150         * platform/graphics/GraphicsLayerClient.h:
2151           Added a new entry to GraphicsLayerPaintingPhaseFlags for comp-scroll.
2152         (WebCore::RenderLayer::paintLayerContents):
2153           Updated the logic to account for the new comp-scroll-related paint
2154           phase flag.
2155         * rendering/RenderLayer.h:
2156           Added the RenderLayer painting phase counterpart to
2157           GraphicsLayerPaintCompositedScroll.
2158         * rendering/RenderLayerBacking.cpp:
2159         (WebCore::RenderLayerBacking::updateGraphicsLayerGeometry):
2160           Ensures that the foreground layer is sized correctly for comp-scroll.
2161         (WebCore::RenderLayerBacking::updateScrollingLayers):
2162           If we have a foreground layer, the scrolling contents layer no
2163           longer gets assigned the foreground painting phase.
2164         (WebCore::RenderLayerBacking::paintingPhaseForPrimaryLayer):
2165           If we're comp-scrolling, then the primary layer gets the new phase.
2166         (WebCore::RenderLayerBacking::paintIntoLayer):
2167           Simply translates the new graphics layer painting phase to its
2168           render layer counterpart.
2169         (WebCore::RenderLayerCompositor::layerTreeAsText):
2170         * testing/Internals.cpp:
2171         (WebCore::Internals::layerTreeAsText):
2172         * testing/Internals.h:
2173         * testing/Internals.idl:
2174           The above changes are solely plumbing to allow layout tests to
2175           request that paint phase information be included in the layer tree
2176           dump.
2177
2178 2013-03-07  Allan Sandfeld Jensen  <allan.jensen@digia.com>
2179
2180         [Qt] Use Qt5.1 supportedMimeTypes methods.
2181         https://bugs.webkit.org/show_bug.cgi?id=111185
2182
2183         Reviewed by Jocelyn Turcotte.
2184
2185         Uses the supportedMimeTypes() methods from QImageReader and QImageWriter when available.
2186
2187         * platform/MIMETypeRegistry.cpp:
2188         (WebCore::initializeSupportedImageMIMETypes):
2189         (WebCore::initializeSupportedImageMIMETypesForEncoding):
2190
2191 2013-03-07  Ilya Tikhonovsky  <loislo@chromium.org>
2192
2193         Web Inspector: Flame Chart. Stick item color to the function.
2194         https://bugs.webkit.org/show_bug.cgi?id=111697
2195
2196         Reviewed by Yury Semikhatsky.
2197
2198         Different nodes associated with a single function have to use the same color.
2199         Minor polish: do not filter out (idle) and (program) items. They were big due to an error on v8 side.
2200         Set minimum width to 0 for more precise picture.
2201
2202         * inspector/front-end/FlameChart.js:
2203         (WebInspector.FlameChart):
2204         (WebInspector.FlameChart.prototype._rootNodes):
2205         (WebInspector.FlameChart.prototype.draw):
2206         (WebInspector.FlameChart.prototype._drawNode):
2207         (WebInspector.FlameChart.prototype._drawBar):
2208
2209 2013-03-07  Andrey Lushnikov  <lushnikov@chromium.org>
2210
2211         Web Inspector: [ACE] gutter size should be fixed.
2212         https://bugs.webkit.org/show_bug.cgi?id=111576
2213
2214         Reviewed by Pavel Feldman.
2215
2216         Add a custom ace editor build that supports setFixedGutterWidth configuration
2217         parameter and switch this setting on.
2218
2219         No new tests.
2220
2221         * inspector/front-end/AceTextEditor.js:
2222         (WebInspector.AceTextEditor): Switch fixedGutterWidth setting on.
2223         * inspector/front-end/ace/ace.js:
2224         (.):
2225
2226 2013-03-07  Sheriff Bot  <webkit.review.bot@gmail.com>
2227
2228         Unreviewed, rolling out r145059.
2229         http://trac.webkit.org/changeset/145059
2230         https://bugs.webkit.org/show_bug.cgi?id=111707
2231
2232         crash webkit build (Requested by tasak on #webkit).
2233
2234         * CMakeLists.txt:
2235         * GNUmakefile.list.am:
2236         * Target.pri:
2237         * WebCore.gypi:
2238         * WebCore.xcodeproj/project.pbxproj:
2239         * css/CSSAllInOne.cpp:
2240         * css/DocumentRuleSets.cpp:
2241         (WebCore::ShadowDistributedRules::collectMatchRequests):
2242         * css/DocumentRuleSets.h:
2243         * css/ElementRuleCollector.cpp: Removed.
2244         * css/ElementRuleCollector.h: Removed.
2245         * css/PageRuleCollector.cpp: Removed.
2246         * css/PageRuleCollector.h: Removed.
2247         * css/StyleResolver.cpp:
2248         (WebCore::leftToRightDeclaration):
2249         (WebCore):
2250         (WebCore::rightToLeftDeclaration):
2251         (WebCore::StyleResolver::State::ensureRuleList):
2252         (WebCore::StyleResolver::State::clear):
2253         (WebCore::StyleResolver::addMatchedProperties):
2254         (WebCore::StyleResolver::addElementStyleProperties):
2255         (MatchingUARulesScope):
2256         (WebCore::MatchingUARulesScope::MatchingUARulesScope):
2257         (WebCore::MatchingUARulesScope::~MatchingUARulesScope):
2258         (WebCore::MatchingUARulesScope::isMatchingUARules):
2259         (WebCore::StyleResolver::collectMatchingRules):
2260         (WebCore::StyleResolver::collectMatchingRulesForRegion):
2261         (WebCore::StyleResolver::sortAndTransferMatchedRules):
2262         (WebCore::StyleResolver::matchScopedAuthorRules):
2263         (WebCore::StyleResolver::matchHostRules):
2264         (WebCore::StyleResolver::matchAuthorRules):
2265         (WebCore::StyleResolver::matchUserRules):
2266         (WebCore::StyleResolver::matchUARules):
2267         (WebCore::StyleResolver::collectMatchingRulesForList):
2268         (WebCore::compareRules):
2269         (WebCore::StyleResolver::sortMatchedRules):
2270         (WebCore::StyleResolver::matchAllRules):
2271         (WebCore::StyleResolver::State::initForStyleResolve):
2272         (WebCore::StyleResolver::styleSharingCandidateMatchesRuleSet):
2273         (WebCore::StyleResolver::styleForElement):
2274         (WebCore::StyleResolver::styleForKeyframe):
2275         (WebCore::StyleResolver::pseudoStyleForElement):
2276         (WebCore::StyleResolver::styleForPage):
2277         (WebCore::StyleResolver::pseudoStyleRulesForElement):
2278         (WebCore::StyleResolver::ruleMatches):
2279         (WebCore::StyleResolver::checkRegionSelector):
2280         (WebCore::comparePageRules):
2281         (WebCore::StyleResolver::matchPageRules):
2282         (WebCore::checkPageSelectorComponents):
2283         (WebCore::StyleResolver::matchPageRulesForList):
2284         (WebCore::StyleResolver::isLeftPage):
2285         (WebCore::StyleResolver::isFirstPage):
2286         (WebCore::StyleResolver::pageName):
2287         * css/StyleResolver.h:
2288         (WebCore::MatchRequest::MatchRequest):
2289         (MatchRequest):
2290         (StyleResolver):
2291         (MatchResult):
2292         (WebCore::StyleResolver::State::State):
2293         (State):
2294         (WebCore::StyleResolver::State::takeRuleList):
2295         (WebCore::StyleResolver::State::setSameOriginOnly):
2296         (WebCore::StyleResolver::State::isSameOriginOnly):
2297         (WebCore::StyleResolver::State::pseudoStyleRequest):
2298         (WebCore::StyleResolver::State::setMode):
2299         (WebCore::StyleResolver::State::mode):
2300         (WebCore::StyleResolver::State::matchedRules):
2301         (WebCore::StyleResolver::State::addMatchedRule):
2302         * inspector/InspectorCSSAgent.cpp:
2303         (WebCore::InspectorCSSAgent::willMatchRule):
2304         * inspector/InspectorCSSAgent.h:
2305         (WebCore):
2306         (InspectorCSSAgent):
2307         * inspector/InspectorInstrumentation.cpp:
2308         (WebCore):
2309         (WebCore::InspectorInstrumentation::willMatchRuleImpl):
2310         * inspector/InspectorInstrumentation.h:
2311         (WebCore):
2312         (InspectorInstrumentation):
2313         (WebCore::InspectorInstrumentation::willMatchRule):
2314
2315 2013-03-07  Kentaro Hara  <haraken@chromium.org>
2316
2317         Unreviewed. Rebaselined run-bindings-tests.
2318
2319         * bindings/scripts/test/V8/V8TestInterface.cpp:
2320         (WebCore):
2321         * bindings/scripts/test/V8/V8TestObj.cpp:
2322         (WebCore):
2323
2324 2013-03-07  Takashi Sakamoto  <tasak@google.com>
2325
2326         [Refactoring] Implement RuleCollector
2327         https://bugs.webkit.org/show_bug.cgi?id=109916
2328
2329         Reviewed by Antti Koivisto.
2330
2331         Implemented rule collector for an element and collector for a page.
2332         Not all members in class State are required entire while resolving
2333         a style.
2334
2335         No new tests, because just refactoring.
2336
2337         * CMakeLists.txt:
2338         * GNUmakefile.list.am:
2339         * Target.pri:
2340         * WebCore.gypi:
2341         * WebCore.xcodeproj/project.pbxproj:
2342         * css/CSSAllInOne.cpp:
2343         Added ElementRuleCollector and PageRuleCollector.
2344         * css/DocumentRuleSets.cpp:
2345         (WebCore::ShadowDistributedRules::collectMatchRequests):
2346         Since behaviorAtBoundary is a state owned by ElementRuleCollector,
2347         removed from here.
2348         * css/DocumentRuleSets.h:
2349         (WebCore::ShadowDistributedRules::isEmpty):
2350         Added to quickly check whether there exist any ShadowDistributedRules
2351         or not.
2352         * css/ElementRuleCollector.cpp: Copied from Source/WebCore/css/StyleResolver.cpp.
2353         (WebCore):
2354         (WebCore::ElementRuleCollector::matchedResult):
2355         (WebCore::ElementRuleCollector::matchedRuleList):
2356         (WebCore::ElementRuleCollector::addMatchedRule):
2357         (WebCore::ElementRuleCollector::clearMatchedRules):
2358         (WebCore::ElementRuleCollector::ensureRuleList):
2359         (WebCore::ElementRuleCollector::addElementStyleProperties):
2360         (WebCore::ElementRuleCollector::collectMatchingRules):
2361         (WebCore::ElementRuleCollector::collectMatchingRulesForRegion):
2362         (WebCore::ElementRuleCollector::sortAndTransferMatchedRules):
2363         (WebCore::ElementRuleCollector::matchScopedAuthorRules):
2364         (WebCore::ElementRuleCollector::matchHostRules):
2365         (WebCore::ElementRuleCollector::matchShadowDistributedRules):
2366         (WebCore::ElementRuleCollector::matchAuthorRules):
2367         (WebCore::ElementRuleCollector::matchUserRules):
2368         (WebCore::ElementRuleCollector::matchUARules):
2369         (WebCore::ElementRuleCollector::ruleMatches):
2370         (WebCore::ElementRuleCollector::collectMatchingRulesForList):
2371         (WebCore::ElementRuleCollector::sortMatchedRules):
2372         (WebCore::ElementRuleCollector::matchAllRules):
2373         Moved these methods from StyleResolver to this class.
2374         (WebCore::ElementRuleCollector::hasAnyMatchingRules):
2375         This method is used for checking whether a given element can share
2376         a cache.
2377         * css/ElementRuleCollector.h: Copied from Source/WebCore/css/StyleResolver.h.
2378         (WebCore):
2379         (WebCore::ElementRuleCollector::ElementRuleCollector):
2380         Use styleResolver instance to initialize its member variables, i.e.
2381         SelectorFilter, RuleSets, InspectorCSSOMWrappers, and
2382         StyleScopedResolver.
2383         (ElementRuleCollector):
2384         (WebCore::ElementRuleCollector::setMode):
2385         (WebCore::ElementRuleCollector::setPseudoStyleRequest):
2386         (WebCore::ElementRuleCollector::setSameOriginOnly):
2387         (WebCore::ElementRuleCollector::setRegionForStyling):
2388         Mode, SameOriginOnly, RegionForStyling are only used while collecting
2389         matched rules.
2390         (WebCore::ElementRuleCollector::setMedium):
2391         Need to know which default stylesheet should be looked up.
2392         (WebCore::ElementRuleCollector::document):
2393         * css/PageRuleCollector.cpp: Copied from Source/WebCore/css/StyleResolver.cpp.
2394         (WebCore::comparePageRules):
2395         (WebCore::PageRuleCollector::isLeftPage):
2396         (WebCore::PageRuleCollector::isFirstPage):
2397         (WebCore::PageRuleCollector::pageName):
2398         (WebCore::PageRuleCollector::matchAllPageRules):
2399         (WebCore::PageRuleCollector::matchPageRules):
2400         (WebCore::checkPageSelectorComponents):
2401         (WebCore::PageRuleCollector::matchPageRulesForList):
2402         Moved from StyleResolver.
2403         * css/PageRuleCollector.h: Copied from Source/WebCore/css/StyleResolver.h.
2404         (WebCore):
2405         (WebCore::PageRuleCollector::PageRuleCollector):
2406         (PageRuleCollector):
2407         (WebCore::PageRuleCollector::matchedResult):
2408         * css/StyleResolver.cpp:
2409         (WebCore):
2410         (WebCore::StyleResolver::State::clear):
2411         (WebCore::StyleResolver::MatchResult::addMatchedProperties):
2412         (WebCore::StyleResolver::State::initForStyleResolve):
2413         (WebCore::StyleResolver::styleSharingCandidateMatchesRuleSet):
2414         (WebCore::StyleResolver::styleForElement):
2415         (WebCore::StyleResolver::styleForKeyframe):
2416         (WebCore::StyleResolver::pseudoStyleForElement):
2417         (WebCore::StyleResolver::styleForPage):
2418         (WebCore::StyleResolver::pseudoStyleRulesForElement):
2419         (WebCore::StyleResolver::applyMatchedProperties):
2420         * css/StyleResolver.h:
2421         (WebCore::MatchRequest::MatchRequest):
2422         Removed behaviorAtBoundary. Instead, ElementRuleCollector have the
2423         state.
2424         (MatchRequest):
2425         (WebCore::StyleResolver::selectorFilter):
2426         Added to obtain SelectorFilter in ElementRuleCollector's constructor.
2427         (StyleResolver):
2428         (MatchResult):
2429         (WebCore::StyleResolver::State::State):
2430         To pass ASSERT in StyleResolver::applyProperties, need to keep
2431         m_regionForStyling.
2432         (State):
2433         (WebCore::StyleResolver::State::regionForStyling):
2434         (WebCore::StyleResolver::State::useSVGZoomRules):
2435         (WebCore::StyleResolver::hasSelectorForId):
2436         (WebCore):
2437         (WebCore::checkRegionSelector):
2438         * inspector/InspectorCSSAgent.cpp:
2439         (WebCore::InspectorCSSAgent::willMatchRule):
2440         Removed StyleResolver from its parameter list. Instead, added
2441         InspectorCSSOMWrappers and DocumentStyleSheetCollection.
2442         * inspector/InspectorCSSAgent.h:
2443         (WebCore):
2444         (InspectorCSSAgent):
2445         * inspector/InspectorInstrumentation.cpp:
2446         (WebCore):
2447         (WebCore::InspectorInstrumentation::willMatchRuleImpl):
2448         * inspector/InspectorInstrumentation.h:
2449         (WebCore):
2450         (InspectorInstrumentation):
2451         (WebCore::InspectorInstrumentation::willMatchRule):
2452
2453 2013-03-07  Andrey Lushnikov  <lushnikov@chromium.org>
2454
2455         Web Inspector: [ACE] add experimental breakpoint support
2456         https://bugs.webkit.org/show_bug.cgi?id=111573
2457
2458         Reviewed by Pavel Feldman.
2459
2460         No new tests.
2461
2462         - Implement attributes model for ace editor. Update attribute
2463         locations by handling onTextChange event from editor.
2464         - Implement breakpoints atop of attributes model.
2465
2466         * inspector/front-end/AceTextEditor.js:
2467         (WebInspector.AceTextEditor):
2468         (WebInspector.AceTextEditor.prototype._updateBreakpoints):
2469         (WebInspector.AceTextEditor.prototype._updateLineAttributes):
2470         (WebInspector.AceTextEditor.prototype._onTextChange):
2471         (WebInspector.AceTextEditor.prototype.addBreakpoint):
2472         (WebInspector.AceTextEditor.prototype.removeBreakpoint):
2473         (WebInspector.AceTextEditor.prototype.getAttribute):
2474         (WebInspector.AceTextEditor.prototype.setAttribute):
2475         (WebInspector.AceTextEditor.prototype.removeAttribute):
2476         * inspector/front-end/ace/acedevtools.css:
2477         (.ace-editor-container):
2478         (.ace_gutter-cell.webkit-breakpoint):
2479         (.ace_gutter-cell.webkit-breakpoint-conditional):
2480         (.ace_gutter-cell.webkit-breakpoint-disabled):
2481         (.ace_gutter-cell):
2482
2483 2013-03-07  Antoine Quint  <graouts@apple.com>
2484
2485         Web Inspector: identify layers for CSS generated content in LayerTreeAgent
2486         https://bugs.webkit.org/show_bug.cgi?id=111551
2487
2488         Layers can be associated with pseudo elements, elements that are generated
2489         when ::before or ::after pseudo-classes are used to style an element and
2490         provide additional rendering using the CSS "content" property. In order to
2491         identify that a layer is associated to a pseudo element, we add a new set of
2492         optional properties on the Layer object: "isGeneratedContent", "pseudoElementId"
2493         and "pseudoClass".
2494
2495         We need to provide the "pseudoElementId" for the same reason we provide a
2496         "nodeId" for the Layer. This is so that the front-end can identify that a
2497         layer whose "layerId" may have changed between two layer tree updates is
2498         used to render content for the same pseudo element.
2499
2500         In the instance that a layer is rendering generated content, we also set
2501         the "nodeId" to be the generating node's id. The generating node is the
2502         node in the DOM that the user styled using ::before or ::after pseudo-classes.
2503         We also add the pseudo-class used as the "pseudoClass" property such that the
2504         front-end may provide useful information to the user about what type of
2505         pseudo-class yielded the generation of this layer. We also deal with the
2506         possibility that the layer is a reflection for a pseudo element.
2507     
2508         Since pseudo elements are not part of the user-visible DOM, and thus can't be
2509         pushed to the front-end, we maintain a special ID hash map in the LayerTreeAgent.
2510         In order to be able to unbind a pseudo element id and a pseudo element, we add a
2511         destructor method to PseudoElement and provide a new instrumentation call so that
2512         the LayerTreeAgent may be notified of a PseudoElement being destroyed. This
2513         reflects the principle we use to update the RenderLayer bindings when a
2514         RenderLayer is destroyed, as notified by the RenderLayerCompositor.
2515
2516         Reviewed by Simon Fraser.
2517
2518         Test: inspector-protocol/layers/layers-generated-content.html
2519
2520         * dom/PseudoElement.cpp:
2521         (WebCore::PseudoElement::~PseudoElement): New destructor used to notify
2522         InspectorInstrumentation of a PseudoElement being destroyed, such that
2523         it can eventually be relayed to the InspectorLayerTreeAgent.
2524         (WebCore):
2525         * dom/PseudoElement.h:
2526         (PseudoElement):
2527         * inspector/Inspector.json: Add the new PseudoElementId type used for
2528         the new "pseudoElementId" property on Layer, to which we also add the
2529         "isGeneratedContent" and "pseudoClass" properties.
2530         * inspector/InspectorInstrumentation.cpp:
2531         (WebCore):
2532         (WebCore::InspectorInstrumentation::pseudoElementDestroyedImpl):
2533         * inspector/InspectorInstrumentation.h:
2534         (WebCore):
2535         (InspectorInstrumentation):
2536         (WebCore::InspectorInstrumentation::pseudoElementDestroyed): New method
2537         called in the PseudoElement destructor used to relay the fact that a
2538         PseudoElement was destroyed to the InspectorLayerTreeAgent.
2539         * inspector/InspectorLayerTreeAgent.cpp:
2540         (WebCore::InspectorLayerTreeAgent::reset): Clear the new PseudoElement
2541         identifier maps.
2542         (WebCore::InspectorLayerTreeAgent::pseudoElementDestroyed): Remove any
2543         identifier binding for the provided PseudoElement being destroyed.
2544         (WebCore):
2545         (WebCore::InspectorLayerTreeAgent::buildObjectForLayer): Set the new
2546         "isGeneratedContent", "pseudoElementId" and "pseudoClass" properties on
2547         the Layer object for layers associated with a pseudo element.
2548         (WebCore::InspectorLayerTreeAgent::bind): Use emptyString() instead of "".
2549         (WebCore::InspectorLayerTreeAgent::unbind): Use an iterator instead of a
2550         get() and remove() combination in order to reduce lookups and mimick the
2551         code written for unbindPseudoElement().
2552         (WebCore::InspectorLayerTreeAgent::bindPseudoElement): Binds the provided
2553         PseudoElement to a unique identifier.
2554         (WebCore::InspectorLayerTreeAgent::unbindPseudoElement): Unbinds the
2555         provided PseudoElement from its unique identifier.
2556         * inspector/InspectorLayerTreeAgent.h:
2557         (InspectorLayerTreeAgent):
2558
2559 2013-03-07  Keishi Hattori  <keishi@webkit.org>
2560
2561         Add clear button to date/time input types
2562         https://bugs.webkit.org/show_bug.cgi?id=111319
2563
2564         Reviewed by Kent Tamura.
2565
2566         We want to remove the clear button from the calendar picker (Bug 109439)
2567         so we are adding the clear button to the right side of the input element.
2568
2569         Tests: fast/forms/date-multiple-fields/date-multiple-fields-clearbutton-change-and-input-events.html
2570                fast/forms/datetimelocal-multiple-fields/datetimelocal-multiple-fields-clearbutton-change-and-input-events.html
2571                fast/forms/month-multiple-fields/month-multiple-fields-clearbutton-change-and-input-events.html
2572                fast/forms/time-multiple-fields/time-multiple-fields-clearbutton-change-and-input-events.html
2573                fast/forms/week-multiple-fields/week-multiple-fields-clearbutton-change-and-input-events.html
2574
2575         * CMakeLists.txt: Added ClearButtonElement.cpp
2576         * GNUmakefile.list.am: Ditto.
2577         * Target.pri: Ditto.
2578         * WebCore.gypi: Ditto.
2579         * WebCore.vcproj/WebCore.vcproj: Ditto.
2580         * WebCore.vcxproj/WebCore.vcxproj: Ditto.
2581         * WebCore.vcxproj/WebCore.vcxproj.filters: Ditto.
2582         * WebCore.xcodeproj/project.pbxproj: Ditto.
2583         * css/html.css:
2584         (input::-webkit-clear-button): Styles for the clear button.
2585         * html/BaseMultipleFieldsDateAndTimeInputType.cpp:
2586         (WebCore::BaseMultipleFieldsDateAndTimeInputType::editControlValueChanged):
2587         (WebCore::BaseMultipleFieldsDateAndTimeInputType::BaseMultipleFieldsDateAndTimeInputType):
2588         (WebCore::BaseMultipleFieldsDateAndTimeInputType::~BaseMultipleFieldsDateAndTimeInputType):
2589         (WebCore::BaseMultipleFieldsDateAndTimeInputType::createShadowSubtree):
2590         (WebCore::BaseMultipleFieldsDateAndTimeInputType::destroyShadowSubtree):
2591         (WebCore::BaseMultipleFieldsDateAndTimeInputType::disabledAttributeChanged):
2592         (WebCore::BaseMultipleFieldsDateAndTimeInputType::requiredAttributeChanged): Hide clear button if the value is required.
2593         (WebCore):
2594         (WebCore::BaseMultipleFieldsDateAndTimeInputType::readonlyAttributeChanged):
2595         (WebCore::BaseMultipleFieldsDateAndTimeInputType::updateInnerTextValue):
2596         (WebCore::BaseMultipleFieldsDateAndTimeInputType::focusAndSelectClearButtonOwner): Called on mouse down on clear button.
2597         (WebCore::BaseMultipleFieldsDateAndTimeInputType::shouldClearButtonRespondToMouseEvents):
2598         (WebCore::BaseMultipleFieldsDateAndTimeInputType::clearValue):
2599         (WebCore::BaseMultipleFieldsDateAndTimeInputType::updateClearButtonVisibility): We want to hide the clear button if the value is required or the value is empty.
2600         * html/BaseMultipleFieldsDateAndTimeInputType.h:
2601         (BaseMultipleFieldsDateAndTimeInputType):
2602         * html/HTMLInputElement.cpp:
2603         (WebCore::HTMLInputElement::updateClearButtonVisibility):
2604         (WebCore):
2605         (WebCore::HTMLInputElement::requiredAttributeChanged):
2606         * html/HTMLInputElement.h:
2607         (HTMLInputElement):
2608         * html/InputType.cpp:
2609         (WebCore::InputType::requiredAttributeChanged): Notifies the InputType that the required attribute has changed.
2610         (WebCore):
2611         (WebCore::InputType::updateClearButtonVisibility):
2612         * html/InputType.h:
2613         (InputType):
2614         * html/shadow/ClearButtonElement.cpp: Added.
2615         (WebCore):
2616         (WebCore::ClearButtonElement::ClearButtonElement):
2617         (WebCore::ClearButtonElement::create):
2618         (WebCore::ClearButtonElement::detach):
2619         (WebCore::ClearButtonElement::releaseCapture): Stop capturing mouse events.
2620         (WebCore::ClearButtonElement::defaultEventHandler):
2621         * html/shadow/ClearButtonElement.h: Added.
2622         (WebCore):
2623         (ClearButtonElement):
2624         (ClearButtonOwner):
2625         (WebCore::ClearButtonElement::ClearButtonOwner::~ClearButtonOwner):
2626         (WebCore::ClearButtonElement::removeClearButtonOwner):
2627         (WebCore::ClearButtonElement::isMouseFocusable):
2628
2629 2013-03-07  Eugene Klyuchnikov  <eustas@chromium.org>
2630
2631         Web Inspector: Refactorings: Prepare SuggestBox for reuse.
2632         https://bugs.webkit.org/show_bug.cgi?id=111301
2633
2634         Reviewed by Alexander Pavlov.
2635
2636         1) Remove userEnteredText from delegate interface.
2637            Pass prefix to updateSuggestions instead.
2638         2) Clarify that suggestions array is never null.
2639
2640         * inspector/front-end/SuggestBox.js:
2641         (WebInspector.SuggestBox): Renamed parameter/member.
2642         (WebInspector.SuggestBox.prototype._updateItems):
2643         Minor readability changes.
2644         (WebInspector.SuggestBox.prototype._canShowBox):
2645         Use userEnteredText parameter.
2646         (WebInspector.SuggestBox.prototype.updateSuggestions):
2647         Pass userEnteredText to _canShowBox.
2648         * inspector/front-end/DatabaseQueryView.js: Fix JSDocs.
2649         * inspector/front-end/RuntimeModel.js: Ditto.
2650         * inspector/front-end/TextPrompt.js: Ditto.
2651         (WebInspector.TextPrompt.prototype._completionsReady):
2652         Pass userEnteredText to updateSuggestions.
2653
2654 2013-03-07  Victor Carbune  <vcarbune@chromium.org>
2655
2656         TextTrackRegion Constructor
2657         https://bugs.webkit.org/show_bug.cgi?id=110511
2658
2659         Reviewed by Adam Barth.
2660
2661         This is an initial patch for implementing the TextTrackRegion
2662         defined in the "WebVTT Extension: Regions for rendering cue groups":
2663         https://dvcs.w3.org/hg/text-tracks/raw-file/default/608toVTT/region.html
2664
2665         The feature components are hidden behind the WEBVTT_REGIONS flag
2666         and is currently disabled by default in all ports and tests skipped.
2667
2668         Test: media/track/regions-webvtt/text-track-region-constructor.html
2669
2670         * WebCore.gypi: Added files to be included for building Chromium with
2671         feature enabled (it is disabled by default).
2672         * html/track/TextTrackRegion.cpp: Added.
2673         (WebCore):
2674         (WebCore::TextTrackRegion::TextTrackRegion):
2675         (WebCore::TextTrackRegion::~TextTrackRegion):
2676         (WebCore::TextTrackRegion::setId): Setter.
2677         (WebCore::TextTrackRegion::setWidth): Setter.
2678         (WebCore::TextTrackRegion::setHeight): Setter.
2679         (WebCore::TextTrackRegion::setRegionAnchorX): Setter.
2680         (WebCore::TextTrackRegion::setRegionAnchorY): Setter.
2681         (WebCore::TextTrackRegion::setViewportAnchorX): Setter.
2682         (WebCore::TextTrackRegion::setViewportAnchorY): Setter.
2683         (WebCore::TextTrackRegion::scroll): Getter. Internally, the scroll
2684         value is stored as a boolean, but when returned is converted to either
2685         the empty string or "up".
2686         (WebCore::TextTrackRegion::setScroll): Setter.
2687         (WebCore::TextTrackRegion::setRegionSettings): Not used yet (see b/109818)
2688         * html/track/TextTrackRegion.h: Added.
2689         (WebCore):
2690         (TextTrackRegion):
2691         (WebCore::TextTrackRegion::create):
2692         (WebCore::TextTrackRegion::track): Getter.
2693         (WebCore::TextTrackRegion::id): Getter.
2694         (WebCore::TextTrackRegion::width): Getter.
2695         (WebCore::TextTrackRegion::height): Getter.
2696         (WebCore::TextTrackRegion::regionAnchorX): Getter.
2697         (WebCore::TextTrackRegion::regionAnchorY): Getter.
2698         (WebCore::TextTrackRegion::viewportAnchorX): Getter.
2699         (WebCore::TextTrackRegion::viewportAnchorY): Getter.
2700         (WebCore::TextTrackRegion::regionSettings): Getter, used only internally (see b/109818).
2701         * html/track/TextTrackRegion.idl: Added.
2702         * page/DOMWindow.idl: Constructor support.
2703
2704 2013-03-07  Dan Carney  <dcarney@google.com>
2705
2706         [v8] remove latin-1 transition flag
2707         https://bugs.webkit.org/show_bug.cgi?id=111692
2708
2709         Reviewed by Jochen Eisinger.
2710
2711         No new tests. No change in functionality.
2712
2713         * bindings/v8/V8ValueCache.cpp:
2714         (WebCore::makeExternalString):
2715
2716 2013-03-07  Vsevolod Vlasov  <vsevik@chromium.org>
2717
2718         Web Inspector: NavigatorView should show (program) for uiSourceCodes with empty name.
2719         https://bugs.webkit.org/show_bug.cgi?id=111691
2720
2721         Reviewed by Alexander Pavlov.
2722
2723         Made String.prototype methods return string literal, not String object.
2724
2725         * inspector/front-end/utilities.js:
2726         (String.prototype.escapeCharacters):
2727
2728 2013-03-07  Eugene Klyuchnikov  <eustas@chromium.org>
2729
2730         Web Inspector: Cmd+L (Go-to-Line) masks Go to location bar action
2731         https://bugs.webkit.org/show_bug.cgi?id=111357
2732
2733         Reviewed by Pavel Feldman.
2734
2735         Allow panel shortcut handlers to bubble event.
2736
2737         * inspector/front-end/GoToLineDialog.js:
2738         (WebInspector.GoToLineDialog.install): Minor refactoring, added JSDocs.
2739         (WebInspector.GoToLineDialog._show): Added JSDocs and return value.
2740         * inspector/front-end/Panel.js:
2741         (WebInspector.Panel.prototype.handleShortcut):
2742         Mark event as handled iff handler returned true.
2743         * inspector/front-end/ScriptsPanel.js: Added return values to handlers.
2744         * inspector/front-end/TimelinePanel.js: Ditto.
2745
2746 2013-03-06  Takashi Sakamoto  <tasak@google.com>
2747
2748         Box-shadow displayed improperly with border-radius.
2749         https://bugs.webkit.org/show_bug.cgi?id=111256
2750
2751         Reviewed by Simon Fraser.
2752
2753         RoundedRect::adjustRadii doesn't adjust radii correctly, because
2754         the method compares maxRadiusWidth with maxRadiusHeight. However,
2755         we have to compare maxRadiusWidth / rect.width() with
2756         maxRadiusHeight / rect.height().
2757
2758         Test: fast/borders/border-radius-with-box-shadow-01.html
2759
2760         * platform/graphics/RoundedRect.cpp:
2761         (WebCore::RoundedRect::adjustRadii):
2762         Should check which ratio is smaller.
2763
2764 2013-03-06  Mike West  <mkwst@chromium.org>
2765
2766         [V8] Preprocess constant values to avoid a "static_cast<signed int>" in CodeGeneratorV8.
2767         https://bugs.webkit.org/show_bug.cgi?id=111625
2768
2769         Reviewed by Kentaro Hara.
2770
2771         When processing constants in IDL files, CodeGeneratorV8 currently runs
2772         the values through 'static_cast<signed int>' in the generated code. We
2773         can avoid this miniscule bit of overhead by preprocessing the hex value
2774         in Perl when generating the code.
2775
2776         The FIXME has been in the code since it originally landed in 2009[1].
2777         Now's as good a time as any to take care of it.
2778
2779         [1]: http://trac.webkit.org/browser/trunk/Source/WebCore/bindings/scripts/CodeGeneratorV8.pm?rev=144976#L2933
2780
2781         * bindings/scripts/CodeGeneratorV8.pm:
2782         (GenerateImplementation):
2783             If we're presented with a string which begins with '0x', run it
2784             through some fairly obtuse Perlisms to first convert from a hex
2785             string to an integer ('hex($value)'), "pack" the integer as an
2786             unsigned integer ('pack("I", ...)'), and then "unpack" it as a
2787             signed integer ('unpack("i", ...)'). Because that's _of course_
2788             how you would do things.
2789
2790 2013-03-06  PaweĊ‚ Forysiuk  <tuxator@o2.pl>
2791
2792         WebKit does not build without accelerated compositing after Changeset 144823
2793         https://bugs.webkit.org/show_bug.cgi?id=111597
2794
2795         Reviewed by Kentaro Hara.
2796
2797         Properly guard functions ifdefed in ScrollingCoordinator.h.
2798         Remove redundant checks and fallback code inside those functions.
2799
2800         * page/scrolling/ScrollingCoordinator.cpp:
2801         (WebCore::ScrollingCoordinator::scrollLayerForScrollableArea):
2802         (WebCore::ScrollingCoordinator::horizontalScrollbarLayerForScrollableArea):
2803         (WebCore::ScrollingCoordinator::verticalScrollbarLayerForScrollableArea):
2804         (WebCore):
2805
2806 2013-03-06  Hajime Morrita  <morrita@google.com>
2807
2808         Custom Elements Refactoring: CustomElementConstructor API shouldn't bound to HTMLElement
2809         https://bugs.webkit.org/show_bug.cgi?id=111678
2810
2811         Reviewed by Kentaro Hara.
2812
2813         The latest Custom Elements standard supports non-HTML custom elements. Even though current implementation
2814         support only HTML, it'd be better off to make API generic enough to support them.
2815
2816         This change
2817
2818         - eliminates HTMLElement from the API signature by replacing it with Element, and
2819         - rename V8HTMLCustomElement to V8CustomElement.
2820
2821         No new tests, just changing signatures and a class name.
2822
2823         * WebCore.gypi:
2824         * bindings/v8/V8CustomElement.cpp: Renamed from Source/WebCore/bindings/v8/V8HTMLCustomElement.cpp.
2825         (WebCore):
2826         (WebCore::findWrapperTypeOf):
2827         (WebCore::V8CustomElement::createWrapper):
2828         * bindings/v8/V8CustomElement.h: Renamed from Source/WebCore/bindings/v8/V8HTMLCustomElement.h.
2829         (WebCore):
2830         (V8CustomElement):
2831         (WebCore::V8CustomElement::toV8):
2832         (WebCore::V8CustomElement::wrap):
2833         (WebCore::HTMLCustomElement::wrap):
2834         * bindings/v8/custom/V8CustomElementConstructorCustom.cpp:
2835         (WebCore::V8CustomElementConstructor::callAsFunctionCallback):
2836         * dom/CustomElementConstructor.cpp:
2837         (WebCore::CustomElementConstructor::createElement):
2838         * dom/CustomElementConstructor.h:
2839         (WebCore):
2840         (CustomElementConstructor):
2841         * dom/CustomElementRegistry.cpp:
2842         (WebCore::CustomElementRegistry::constructorOf):
2843         (WebCore::CustomElementRegistry::createElement):
2844         * dom/CustomElementRegistry.h:
2845         (WebCore):
2846         (CustomElementRegistry):
2847         * dom/Document.cpp: Ensured that the document is an HTML.
2848         (WebCore::Document::registerElement):
2849         * dom/Document.idl:
2850         * dom/make_names.pl:
2851         (printWrapperFactoryCppFile):
2852         * html/HTMLDocument.idl: Moved an API to Document.idl
2853
2854 2013-03-06  Tim Horton  <timothy_horton@apple.com>
2855
2856         TileCache debug minimap should fit inside the intersection of the visible rect and exposed rect
2857         https://bugs.webkit.org/show_bug.cgi?id=111655
2858         <rdar://problem/13355773>
2859
2860         Reviewed by Simon Fraser.
2861
2862         If content clips to the exposed rect, make the TileCache minimap fit in the exposed rect too.
2863
2864         * page/scrolling/mac/ScrollingCoordinatorMac.mm:
2865         (WebCore::ScrollingCoordinatorMac::commitTreeState):
2866         * platform/graphics/TiledBacking.h:
2867         * platform/graphics/ca/mac/TileCache.mm:
2868         (WebCore::TileCache::updateTileCoverageMap):
2869
2870 2013-03-06  Sheriff Bot  <webkit.review.bot@gmail.com>
2871
2872         Unreviewed, rolling out r144726.
2873         http://trac.webkit.org/changeset/144726
2874         https://bugs.webkit.org/show_bug.cgi?id=111681
2875
2876         caused performance regression for Dromaeo attribute tests.
2877         (Requested by arpitab on #webkit).
2878
2879         * dom/Element.h:
2880         (WebCore::ElementData::getAttributeItemIndex):
2881
2882 2013-03-04  Kinuko Yasuda  <kinuko@chromium.org>
2883
2884         File.lastModifiedDate() should return the current date/time if the file date/time is not available
2885         https://bugs.webkit.org/show_bug.cgi?id=111403
2886
2887         Reviewed by Kent Tamura.
2888
2889         Per the recent File API spec change:
2890         http://www.w3.org/TR/2012/WD-FileAPI-20121025/#dfn-lastModifiedDate
2891
2892         Test: http/tests/local/fileapi/script-tests/file-last-modified-after-delete.js:
2893
2894         * fileapi/File.cpp:
2895         (WebCore::File::lastModifiedDate): Changed to return the current date/time instead null if the valid file date/time is not available.
2896         * fileapi/File.h:
2897         (File):
2898
2899 2013-03-06  Philippe Liard  <pliard@chromium.org>
2900
2901         Make RuleData support up to 8191 selectors
2902         https://bugs.webkit.org/show_bug.cgi?id=111663
2903
2904         Reviewed by Andreas Kling.
2905
2906         r125294 made RuleData consume less memory by replacing a pointer with
2907         an index encoded on 12 bits.
2908         This unfortunately breaks Chrome for Android (and others) when a lot of
2909         CSS is used or more precisely when selectorIndex cannot be stored on 12
2910         bits.
2911
2912         Threfore this change decreases the number of bits used to store
2913         m_position by 1 (from 19 to 18) and adds this extra bit to
2914         m_selectorIndex so that values up to 8191 can be stored safely without
2915         overflowing.
2916
2917         * css/RuleSet.h:
2918         (RuleData):
2919
2920 2013-03-06  Seokju Kwon  <seokju.kwon@gmail.com>
2921
2922         Web Inspector: Remove unused code from contextmenu of element panel
2923         https://bugs.webkit.org/show_bug.cgi?id=111658
2924
2925         Reviewed by Pavel Feldman.
2926
2927         No new tests (no functional changes).
2928
2929         * inspector/front-end/ElementsPanel.js:
2930         (WebInspector.ElementsPanel.prototype._contextMenuEventFired.set get var):
2931         * inspector/front-end/ElementsTreeOutline.js:
2932         (WebInspector.ElementsTreeOutline.prototype.populateContextMenu):
2933
2934 2013-03-06  Julien Chaffraix  <jchaffraix@webkit.org>
2935
2936         [CSS Grid Layout] Extend our grammar to support 2 positions for grid-{row|column}
2937         https://bugs.webkit.org/show_bug.cgi?id=110777
2938
2939         Reviewed by Tony Chang.
2940
2941         Now that we support all the logical grid properties, we can change grid-{row|column}
2942         into shorthands. That's what this change does along with extending our parsing support
2943         to handle 2 positions.
2944
2945         Tests: fast/css-grid-layout/grid-item-column-row.html
2946                fast/css-grid-layout/grid-item-end-after-get-set.html
2947                fast/css-grid-layout/grid-item-start-before-get-set.html
2948
2949         * css/CSSComputedStyleDeclaration.cpp:
2950         Removed grid-{row|column} from computedProperties as they are shorthands (see comments
2951         at computedProperties definition).
2952
2953         (WebCore::CSSComputedStyleDeclaration::getPropertyCSSValue):
2954         (WebCore::CSSComputedStyleDeclaration::getCSSPropertyValuesForGridShorthand):
2955         Switched to using the StylePropertyShorthand and reusing the existing longhand code.
2956
2957         * css/CSSComputedStyleDeclaration.h:
2958         Added getCSSPropertyValuesForGridShorthand.
2959
2960         * css/CSSParser.cpp:
2961         (WebCore::CSSParser::parseValue):
2962         (WebCore::CSSParser::parseGridItemPositionShorthand):
2963         Added custom parsing for the shorthand, that builds on top of the longhand code.
2964
2965         * css/CSSParser.h:
2966         Added parseGridItemPositionShorthand.
2967
2968         * css/StyleResolver.cpp:
2969         (WebCore::StyleResolver::applyProperty):
2970         Removed the previous handling as shorthand are expanded at parse time.
2971
2972         * css/StylePropertySet.cpp:
2973         (WebCore::StylePropertySet::getPropertyValue):
2974         Added the new shorthands to the list.
2975
2976         * css/StylePropertyShorthand.cpp:
2977         (WebCore::webkitGridColumnShorthand):
2978         (WebCore::webkitGridRowShorthand):
2979         (WebCore::shorthandForProperty):
2980         * css/StylePropertyShorthand.h:
2981         Registered grid-{row|column} as shorthands.
2982
2983 2013-03-06  Kenneth Russell  <kbr@google.com>
2984
2985         [Chromium] Fix byte ordering bugs reading back WebGL canvases' content on Android
2986         https://bugs.webkit.org/show_bug.cgi?id=111661
2987
2988         Reviewed by James Robinson.
2989
2990         No new tests; covered by existing tests. Ran WebGL conformance
2991         tests on Android and desktop Linux to verify fix.
2992
2993         * platform/chromium/support/GraphicsContext3DChromium.cpp:
2994         (WebCore::GraphicsContext3D::paintRenderingResultsToImageData):
2995             Avoid incorrect byte swap on Android and other OSs which don't
2996             swizzle R and B channels.
2997
2998 2013-03-06  Gyuyoung Kim  <gyuyoung.kim@samsung.com>
2999
3000         [EFL] Improve warning messages when input value is out of range.
3001         https://bugs.webkit.org/show_bug.cgi?id=111534
3002
3003         Reviewed by Laszlo Gombos.
3004
3005         Show input value range when user inputs greater or less value.
3006
3007         * platform/efl/LocalizedStringsEfl.cpp:
3008         (WebCore::validationMessageRangeOverflowText):
3009         (WebCore::validationMessageRangeUnderflowText):
3010
3011 2013-03-06  Gyuyoung Kim  <gyuyoung.kim@samsung.com>
3012
3013         [EFL][WK2] Enable interactive form validation for email and url input type validation
3014         https://bugs.webkit.org/show_bug.cgi?id=111026
3015
3016         Reviewed by Laszlo Gombos.
3017
3018         WebKit EFL can check if input value is valid by enabling this feature.
3019
3020         * platform/efl/LocalizedStringsEfl.cpp: Change validation messages of email and url the same with chromium port.
3021         (WebCore::validationMessageTypeMismatchForEmailText):
3022         (WebCore::validationMessageTypeMismatchForMultipleEmailText):
3023         (WebCore::validationMessageTypeMismatchForURLText):
3024         * platform/efl/RenderThemeEfl.cpp: Add type checking conditions for email and url.
3025         (WebCore::RenderThemeEfl::supportsDataListUI):
3026
3027 2013-03-06  Aaron Colwell  <acolwell@chromium.org>
3028
3029         Remove WebCore::Node::isActiveNode() since it isn't called anywhere.
3030         https://bugs.webkit.org/show_bug.cgi?id=111646
3031
3032         Reviewed by Kentaro Hara.
3033
3034         No new tests. This removes dead code.
3035
3036         * dom/Node.h:
3037         (Node):
3038         * html/HTMLAudioElement.h:
3039
3040 2013-03-06  Abhishek Arya  <inferno@chromium.org>
3041
3042         Crash in SVGViewSpec::viewTarget
3043         https://bugs.webkit.org/show_bug.cgi?id=111648
3044
3045         Reviewed by Philip Rogers.
3046
3047         * svg/SVGViewSpec.cpp:
3048         (WebCore::SVGViewSpec::viewTarget):
3049
3050 2013-03-06  Benjamin Poulain  <benjamin@webkit.org>
3051
3052         WebKitTestRunner needs layoutTestController.elementDoesAutoCompleteForElementWithId
3053         https://bugs.webkit.org/show_bug.cgi?id=42696
3054
3055         Reviewed by Andreas Kling.
3056
3057         Since the method acts directly on a WebCore element and strictly test
3058         HTMLInputElement::shouldAutoComplete(), the test function is moved to internals.
3059
3060         * testing/Internals.cpp:
3061         (WebCore::Internals::elementShouldAutoComplete):
3062         * testing/Internals.h:
3063         * testing/Internals.idl:
3064
3065 2013-03-06  Alexey Proskuryakov  <ap@apple.com>
3066
3067         [Mac] Synthetic ResourceResponses cannot be sent over IPC without losing most information
3068         https://bugs.webkit.org/show_bug.cgi?id=111623
3069
3070         Reviewed by Brady Eidson.
3071
3072         * WebCore.exp.in: Exported functions for building synthetic responses.
3073
3074         * platform/network/ResourceResponseBase.cpp:
3075         * platform/network/ResourceResponseBase.h:
3076         Added a lot of FIXMEs.
3077
3078         * platform/network/cf/ResourceResponse.h:
3079         (WebCore::ResourceResponse::ResourceResponse):
3080         (WebCore::ResourceResponse::platformResponseIsUpToDate):
3081         Track m_platformResponseIsUpToDate flag as well as we can. Currently, it will
3082         be incorrect if a real platform response gets mutated.
3083
3084         * platform/network/cf/ResourceResponseCFNet.cpp:
3085         (WebCore::ResourceResponse::cfURLResponse): Added a FIXME about how useless this
3086         function is when it tries to create a new CFURLResponse.
3087
3088         * platform/network/mac/ResourceResponseMac.mm:
3089         (WebCore::ResourceResponse::initNSURLResponse): Added a FIXME.
3090         (WebCore::ResourceResponse::nsURLResponse): Added a return to make logic more clear.
3091         (WebCore::ResourceResponse::ResourceResponse): Track m_platformResponseIsUpToDate.
3092
3093         * platform/network/blackberry/ResourceResponse.h:
3094         * platform/network/curl/ResourceResponse.h:
3095         * platform/network/qt/ResourceResponse.h:
3096         * platform/network/soup/ResourceResponse.h:
3097         * platform/network/win/ResourceResponse.h:
3098         These platforms do not keep a platform response, so it's never up to date, and
3099         WebCore data needs to be serialized.
3100
3101 2013-03-06  Dana Jansens  <danakj@chromium.org>
3102
3103         [chromium] Remove WebSharedGraphicsContext3D class
3104         https://bugs.webkit.org/show_bug.cgi?id=111492
3105
3106         Reviewed by James Robinson.
3107
3108         Removing dead code, no new tests.
3109
3110         * WebCore.gypi:
3111         * platform/chromium/support/WebSharedGraphicsContext3D.cpp: Removed.
3112
3113 2013-03-06  Dana Jansens  <danakj@chromium.org>
3114
3115         [chromium] Don't get callbacks or create GrContext from unowned WebGraphicsContext3D
3116         https://bugs.webkit.org/show_bug.cgi?id=111638
3117
3118         Reviewed by James Robinson.
3119
3120         If the context is not owned, it's lifetime is not guaranteed, and by the time
3121         the GraphicsContext3D is destroyed, the WGC3D can already be deleted.
3122
3123         When the context is not owned by the GraphicsContext3D, then don't clean it up
3124         in the destructor or set up callbacks, as these are the owner's responsibility.
3125
3126         * platform/chromium/support/GraphicsContext3DPrivate.cpp:
3127         (WebCore::GraphicsContext3DPrivate::~GraphicsContext3DPrivate):
3128         (WebCore::GraphicsContext3DPrivate::grContext):
3129         (WebCore::GraphicsContext3DPrivate::setContextLostCallback):
3130         (WebCore::GraphicsContext3DPrivate::setErrorMessageCallback):
3131
3132 2013-02-22  Jer Noble  <jer.noble@apple.com>
3133
3134         Default mouse cursor behavior should be auto-hide for full screen video with custom controls
3135         https://bugs.webkit.org/show_bug.cgi?id=107601
3136
3137         Reviewed by Beth Dakin.
3138
3139         Test: fullscreen/video-cursor-auto-hide.html
3140
3141         To facilitate automatically hiding the mouse cursor after a certain amount of idle mouse
3142         time, add a new CSS property '-webkit-cursor-visibility', and handle that value inside of
3143         EventHandler. When that value is present, the EventHandler will start a timer which, when
3144         fired, will set the view's cursor to the None cursor. Subsequent mouse moves will either
3145         cancel the timer, or reset the auto-hide timer.
3146
3147         Add a new CSS property, '-webkit-cursor-visibility':
3148         * css/CSSComputedStyleDeclaration.cpp:
3149         (WebCore::CSSComputedStyleDeclaration::getPropertyCSSValue):
3150         * css/CSSParser.cpp:
3151         (WebCore::CSSParser::parseValue):
3152         * css/CSSPrimitiveValueMappings.h:
3153         (WebCore::CSSPrimitiveValue::CSSPrimitiveValue):
3154         (WebCore::CSSPrimitiveValue::operator ECursorVisibility):
3155         * css/CSSProperty.cpp:
3156         (WebCore::CSSProperty::isInheritedProperty):
3157         * css/CSSPropertyNames.in:
3158         * css/CSSValueKeywords.in:
3159         * css/StyleBuilder.cpp:
3160         (WebCore::StyleBuilder::StyleBuilder):
3161         * css/StyleResolver.cpp:
3162         (WebCore::StyleResolver::applyProperty):
3163
3164         Add a rule for video descendants of full screen elements to auto-hide the cursor on hover:
3165         * css/fullscreen.css:
3166         (:-webkit-full-screen video:hover):
3167
3168         Add a new timer, m_autoHideCursorTimer, to control resetting the view's cursor to None after
3169         enough mouse idle time has passed.
3170         * page/EventHandler.cpp:
3171         (WebCore::EventHandler::EventHandler):
3172         (WebCore::EventHandler::~EventHandler):
3173         (WebCore::EventHandler::clear):
3174         (WebCore::EventHandler::selectCursor):
3175         (WebCore::EventHandler::startAutoHideCursorTimer):
3176         (WebCore::EventHandler::cancelAutoHideCursorTimer):
3177         (WebCore::EventHandler::autoHideCursorTimerFired):
3178         * page/EventHandler.h:
3179
3180         Make FrameView::isActive() a public function (like it is in its superclass).
3181         * page/FrameView.h:
3182         (FrameView):
3183
3184         Move the definition for timeWithoutMouseMovementBeforeHidingControls from page->theme()
3185         to page->settings() and allow that setting to be overridden in InternalSettings for 
3186         testing purposes:
3187         * page/Settings.cpp:
3188         (WebCore::Settings::Settings):
3189         * page/Settings.h:
3190         (WebCore::Settings::setTimeWithoutMouseMovementBeforeHidingControls):
3191         (WebCore::Settings::timeWithoutMouseMovementBeforeHidingControls):
3192         * rendering/RenderTheme.h:
3193         * testing/InternalSettings.cpp:
3194         (WebCore::InternalSettings::Backup::Backup):
3195         (WebCore::InternalSettings::Backup::restoreTo):
3196         (WebCore::InternalSettings::setTimeWithoutMouseMovementBeforeHidingControls):
3197         * testing/InternalSettings.h:
3198         (InternalSettings):
3199         * testing/InternalSettings.idl:
3200         * html/shadow/MediaControls.cpp:
3201         (WebCore::MediaControls::startHideFullscreenControlsTimer):
3202
3203         Add support to FeatureObserver for CURSOR_VISIBILITY:
3204         * page/FeatureObserver.h:
3205
3206         Enable the feature flag:
3207         * Configurations/FeatureDefines.xcconfig:
3208
3209 2013-03-06  Jer Noble  <jer.noble@apple.com>
3210
3211         Full screen from an iframe with a z-index style will allow siblings with higher z-index to overlay full screen content.
3212         https://bugs.webkit.org/show_bug.cgi?id=111637
3213
3214         Reviewed by Simon Fraser.
3215
3216         No new tests; updated fullscreen/full-screen-iframe-zIndex.html to expose bug.
3217
3218         Pages with explicit z-index: styles on their iframes will override the default z-index: UA style when
3219         elements within that iframe enter full screen mode. Mark the UA style as !important so as to not allow
3220         iframe siblings with higher z-index styles to overlay the full screen element.
3221
3222         * css/fullscreen.css:
3223         (:-webkit-full-screen):
3224
3225 2013-03-06  Levi Weintraub  <leviw@chromium.org>
3226
3227         InsertUnorderedList can lead to lost content and assertions in moveParagraphs
3228         https://bugs.webkit.org/show_bug.cgi?id=111228
3229
3230         Reviewed by Ryosuke Niwa.
3231
3232         When a list is wrapped in a presentational inline like a b tag, we'd create markup that included
3233         everything up to the b tag from moveParagraphs when intending to only move the contents of the
3234         list item. This could make it impossible to remove content from a list and trigger loss of
3235         editable text.
3236
3237         Test: editing/execCommand/insert-remove-block-list-inside-presentational-inline.html
3238
3239         * editing/EditingStyle.cpp:
3240         (WebCore::elementMatchesAndPropertyIsNotInInlineStyleDecl): Ensure there's an inline style
3241         before calling propertyExistsInStyle.
3242         (WebCore::HTMLElementEquivalent::propertyExistsInStyle): Removing null check for style.
3243         All callers ensure this value isn't null.
3244         * editing/markup.cpp:
3245         (WebCore::highestAncestorToWrapMarkup): Avoid going over RenderBlocks when finding the highest
3246         presentational ancestor to avoid leaving the bounds of the original paragraph.
3247
3248 2013-03-06  Adam Klein  <adamk@chromium.org>
3249
3250         [V8] Use implicit references instead of object groups to keep registered MutationObservers alive
3251         https://bugs.webkit.org/show_bug.cgi?id=111382
3252
3253         Reviewed by Adam Barth.
3254
3255         Two-phase approach to implicit references: after grouping objects
3256         together, add an implicit reference between each registered node's
3257         group and the MutationObserver's group (which includes wrappers from
3258         all worlds).
3259
3260         Also changed many uses of v8::Value to v8::Object where we know we're
3261         dealing with Object and the V8 API expects them.
3262
3263         Test: ManualTests/mutation-observer-leaks-nodes.html
3264
3265         * bindings/v8/V8GCController.cpp:
3266         (WebCore::ImplicitConnection::ImplicitConnection):
3267         (WebCore::ImplicitConnection::wrapper):
3268         (ImplicitConnection):
3269         (WebCore::ImplicitReference::ImplicitReference): Wrapper class holding a parent who should have an implicit reference to a child.
3270         (ImplicitReference):
3271         (WebCore::operator<): Needed for std::sort() call to avoid the overhead of using a HashMap
3272         (WebCore::WrapperGrouper::addObjectWrapperToGroup):
3273         (WebCore::WrapperGrouper::addNodeWrapperToGroup):
3274         (WebCore::WrapperGrouper::addImplicitReference):
3275         (WrapperGrouper):
3276         (WebCore::WrapperGrouper::apply):
3277
3278 2013-03-06  Ankur Taly  <ataly@google.com>
3279
3280         Modify log method in V8DOMActivityLogger so that the apiName and
3281         extraInfo arguments are of type const String& instead of const char*.
3282         This change gets rid of some of the memory ownership issues that arise
3283         with char* pointers.
3284         https://bugs.webkit.org/show_bug.cgi?id=111483
3285
3286         Reviewed by Adam Barth.
3287
3288         There are no new tests as there is no change in behavior.
3289
3290         * bindings/v8/V8DOMActivityLogger.h:
3291         (WebCore::V8DOMActivityLogger::log):
3292
3293 2013-03-06  Mike Reed  <reed@google.com>
3294
3295         Use SkTypeface API directly, rather than (soon to be private) SkFontHost
3296         https://bugs.webkit.org/show_bug.cgi?id=111588
3297
3298         Reviewed by Stephen White.
3299
3300         No new tests, as existing tests in fast/writing-mode exercise this code.
3301
3302         e.g. japanese-rl-text-with-broken-font.html
3303              vertical-subst-font-vert-no-dflt.html
3304
3305         * platform/graphics/harfbuzz/FontPlatformDataHarfBuzz.cpp:
3306         (WebCore::FontPlatformData::emSizeInFontUnits):
3307         (WebCore::FontPlatformData::openTypeTable):
3308         * platform/graphics/harfbuzz/HarfBuzzFaceSkia.cpp:
3309         (WebCore::harfBuzzSkiaGetTable):
3310         (WebCore::HarfBuzzFace::createFace):
3311         * platform/graphics/skia/SimpleFontDataSkia.cpp:
3312         (WebCore::SimpleFontData::platformInit):
3313
3314 2013-03-06  Victor Costan <costan@gmail.com>
3315
3316         Cleanup in multipart FormData sending code.
3317         https://bugs.webkit.org/show_bug.cgi?id=111603
3318
3319         Reviewed by Alexey Proskuryakov.
3320
3321         No new tests. This is cleanup.
3322
3323         * platform/network/FormDataBuilder.cpp:
3324         (WebCore::appendQuotedString): use proper types (e.g, size_t instead of
3325         unsigned long)
3326
3327 2013-03-06  Tony Gentilcore  <tonyg@chromium.org>
3328
3329         Threaded HTML parser should use 8 bit strings for attributes
3330         https://bugs.webkit.org/show_bug.cgi?id=111610
3331
3332         Reviewed by Eric Seidel.
3333
3334         This fixes a 27% regression in dromaeo_jslibattrjquery on the threaded HTML parser vs. the main thread parser.
3335
3336         No new tests because no new functionality.
3337
3338         * html/parser/CompactHTMLToken.cpp:
3339         (WebCore::CompactHTMLToken::CompactHTMLToken):
3340
3341 2013-03-06  Alpha Lam  <hclam@chromium.org>
3342
3343         More cleanup in GIFImageReader
3344         https://bugs.webkit.org/show_bug.cgi?id=111137
3345
3346         Reviewed by Stephen White.
3347
3348         Refactor GIFImageReaderReader with the following changes:
3349         + Separate GIFLZWContext for decoding states.
3350         + Replace unsigned char* with Vector<unsigned char>
3351
3352         There is no change in code behavior and just refactoring.
3353
3354         No new tests. This is covered by existing GIFImageReaderTest.
3355         I also did a local testing on a 50k image corpus and showed no regression.
3356
3357         * platform/image-decoders/gif/GIFImageDecoder.cpp:
3358         (WebCore::GIFImageDecoder::haveDecodedRow):
3359         * platform/image-decoders/gif/GIFImageDecoder.h:
3360         (GIFImageDecoder):
3361         * platform/image-decoders/gif/GIFImageReader.cpp:
3362         (GIFImageReader::outputRow):
3363         (GIFImageReader::doLZW):
3364         (GIFImageReader::decodeInternal):
3365         (GIFImageReader::prepareLZWContext):
3366         * platform/image-decoders/gif/GIFImageReader.h:
3367         (GIFFrameContext):
3368         (GIFFrameContext::GIFFrameContext):
3369         (GIFFrameContext::~GIFFrameContext):
3370         (GIFLZWContext):
3371         (GIFLZWContext::GIFLZWContext):
3372         (GIFImageReader):
3373
3374 2013-03-06  Tim Horton  <timothy_horton@apple.com>
3375
3376         Fix typo'd MainThreadScrollingBecauseOfStyleIndictaion
3377         https://bugs.webkit.org/show_bug.cgi?id=111557
3378
3379         Reviewed by Geoff Garen.
3380
3381         * page/scrolling/mac/ScrollingCoordinatorMac.mm:
3382         (WebCore::ScrollingCoordinatorMac::commitTreeState):
3383         * platform/graphics/TiledBacking.h:
3384         * platform/graphics/ca/mac/TileCache.mm:
3385         (WebCore::TileCache::updateTileCoverageMap):
3386
3387 2013-03-05  Geoffrey Garen  <ggaren@apple.com>
3388
3389         Removed some dead code in the page cache
3390         https://bugs.webkit.org/show_bug.cgi?id=111525
3391
3392         Reviewed by Alexey Proskuryakov.
3393
3394         Page cache autorelease doesn't exist anymore, so there's no need to keep
3395         around these olds hacks.
3396
3397         * WebCore.exp.in:
3398         * history/PageCache.cpp:
3399         (WebCore::PageCache::PageCache):
3400         (WebCore):
3401         * history/PageCache.h:
3402         (PageCache):
3403         * page/Settings.cpp:
3404         (WebCore::Settings::setUsesPageCache):
3405         * platform/mac/MemoryPressureHandlerMac.mm:
3406         (WebCore::MemoryPressureHandler::releaseMemory):
3407         * platform/qt/QtTestSupport.cpp:
3408         (WebKit::QtTestSupport::clearMemoryCaches):
3409
3410 2013-03-06  Rafael Weinstein  <rafaelw@chromium.org>
3411
3412         Unreviewed, rolling out r144924.
3413         http://trac.webkit.org/changeset/144924
3414         https://bugs.webkit.org/show_bug.cgi?id=109908
3415
3416         caused multiple crashes in inspector/debugger tests
3417
3418         * bindings/js/JSInjectedScriptHostCustom.cpp:
3419         * bindings/js/ScriptObject.h:
3420         * bindings/v8/ScriptObject.h:
3421         * bindings/v8/custom/V8InjectedScriptHostCustom.cpp:
3422         * inspector/InjectedScriptHost.cpp:
3423         (WebCore::InjectedScriptHost::create):
3424         (WebCore::InjectedScriptHost::InjectedScriptHost):
3425         (WebCore::InjectedScriptHost::disconnect):
3426         * inspector/InjectedScriptHost.h:
3427         (WebCore):
3428         (InjectedScriptHost):
3429         * inspector/InjectedScriptHost.idl:
3430         * inspector/InjectedScriptManager.cpp:
3431         (WebCore::InjectedScriptManager::InjectedScriptManager):
3432         (WebCore::InjectedScriptManager::discardInjectedScripts):
3433         (WebCore::InjectedScriptManager::discardInjectedScriptsFor):
3434         * inspector/InjectedScriptManager.h:
3435         (InjectedScriptManager):
3436         * inspector/InjectedScriptSource.js:
3437         (.):
3438
3439 2013-03-06  Dmitry Zvorygin  <zvorygin@chromium.org>
3440
3441         Introduce new message sources for logging.
3442         https://bugs.webkit.org/show_bug.cgi?id=110968
3443
3444         Reviewed by Pavel Feldman.
3445